:root {
    /* Dark Mode (Default) */
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #b026ff;
    --accent-glow: rgba(176, 38, 255, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-hover: rgba(255, 255, 255, 0.07);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
    --blob-color-1: #b026ff;
    --blob-color-2: #00d4ff;
    --nav-bg: rgba(5, 5, 5, 0.8);
}

[data-theme="light"] {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --accent: #6c5ce7;
    --accent-glow: rgba(108, 92, 231, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.05);
    --card-hover: rgba(255, 255, 255, 0.9);
    --blob-color-1: #a29bfe;
    --blob-color-2: #74b9ff;
    --nav-bg: rgba(240, 242, 245, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.theme-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: none;
}

.theme-btn:hover {
    color: var(--accent);
    transform: rotate(15deg);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10%;
    position: relative;
    overflow: hidden;
}

/* Blobs */
.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--blob-color-1);
    filter: blur(150px);
    border-radius: 50%;
    opacity: 0.2;
    z-index: -1;
    animation: float 10s infinite alternate;
}

.blob-2 {
    background: var(--blob-color-2);
    right: -100px;
    bottom: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, -30px) scale(1.1);
    }
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.greeting {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero h1 {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    position: relative;
}

/* Glitch Effect - Simplified */
.hero h1:hover {
    text-shadow: 2px 2px var(--accent), -2px -2px #00d4ff;
    transition: text-shadow 0.2s;
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary:active {
    scale: 0.95;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--accent);
    z-index: -1;
    transition: width 0.3s ease;
}

.btn-primary:hover {
    color: var(--bg-primary);
    /* Contrast text color on hover */
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover::before {
    width: 100%;
}


.social-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.scrolling-text-container {
    overflow: hidden;
    white-space: nowrap;
    margin: 1rem 0;
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.scrolling-text {
    display: inline-block;
    animation: scroll 20s linear infinite;
}

.scrolling-text span {
    font-size: 1.5rem;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 1px var(--text-secondary);
    margin: 0 1.5rem;
    opacity: 0.5;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}



.social-links a {
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-5px);
}

/* Sections */
.section {
    padding: 6rem 10%;
    margin-top: 2rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title::after {
    content: '';
    height: 1px;
    background: var(--glass-border);
    flex-grow: 1;
    margin-left: 20px;
}

/* Glass Card Global */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, background 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
    border-color: var(--accent-glow);
}

/* Timeline (Education) */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    margin-bottom: 2rem;
    position: relative;
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.35rem;
    /* Adjust based on padding line width */
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-primary);
}

.grade {
    margin-top: 0.5rem;
    font-style: italic;
    color: var(--text-secondary);
}

/* Skills */
.skill-category {
    margin-bottom: 2rem;
}

.skill-category h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tags span {
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.tags span:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: scale(1.05);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.project-icon {
    font-size: 2rem;
    color: var(--accent);
}

.project-links a {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.project-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.8rem;
    font-family: var(--font-body);
}

.project-tech span {
    color: var(--text-primary);
    opacity: 0.8;
}

/* Internships */
.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.company {
    color: var(--accent);
    font-weight: 700;
}

.exp-list {
    margin-left: 1.5rem;
    color: var(--text-secondary);
}

.exp-list li {
    margin-bottom: 0.5rem;
}

/* Achievements */
.achievement-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.achievement-list li {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.achievement-list i {
    color: var(--accent);
    font-size: 1.2rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        backdrop-filter: blur(15px);
        /* Stronger blur for mobile */
    }

    .nav-links {
        display: flex;
        gap: 1rem;
        width: 100%;
        justify-content: space-evenly;
        font-size: 0.9rem;
    }

    .hero {
        padding: 0 1rem;
        text-align: center;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .scrolling-text span {
        font-size: 1rem;
    }

    .section {
        padding: 4rem 1rem;
    }

    .exp-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero-sub {
        font-size: 1rem;
        padding: 0 1rem;
        word-wrap: break-word;
    }
}