:root {
    /* Premium Dark Theme Palette */
    --bg-dark: #050505;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    /* Zinc-400 */
    --accent-glow: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-highlight: rgba(255, 255, 255, 0.1);

    /* Gradients */
    --gradient-text: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    --gradient-btn: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);

    /* Dimensions */
    --container-width: 1100px;
    --nav-height: 70px;

    /* Easing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Ambient Background */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: #4f46e5;
    /* Indigo */
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: #9333ea;
    /* Purple */
    bottom: -150px;
    right: -150px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #06b6d4;
    /* Cyan */
    top: 40%;
    left: 40%;
    opacity: 0.2;
    animation-delay: -10s;
}

.noise-overlay {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.07;
}

/* Typography */
h1,
h2,
h3 {
    letter-spacing: -0.02em;
    font-weight: 700;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.overline {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 3rem;
    display: inline-block;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

/* Header & Nav */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background 0.3s ease;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.05em;
}

.slide {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
}

.slide span {
    display: inline-block;
    margin: 0 8px;
    color: #ff6b6b;
    animation: slideBar 1.8s ease-in-out infinite;
}

@keyframes slideBar {
    0% {
        transform: translateY(-6px);
        opacity: 0.6;
    }

    50% {
        transform: translateY(6px);
        opacity: 1;
    }

    100% {
        transform: translateY(-6px);
        opacity: 0.6;
    }
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
}

/* 3D Tilt Cards System */
.tilt-wrapper,
.tilt-wrapper-small {
    perspective: 1000px;
    /* Essential for 3D effect */
    transform-style: preserve-3d;
}

.tilt-wrapper-small {
    perspective: 800px;
}

.tilt-card,
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    transform-style: preserve-3d;
    /* Allows children to pop out */
    transition: transform 0.1s linear, box-shadow 0.3s ease;
    /* Important: box-shadow helps depth */
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2);
    will-change: transform;
}

.glass-card-solid {
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(20px);
}

.tilt-card:hover,
.glass-card:hover {
    border-color: var(--glass-highlight);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.4);
}

.tilt-content {
    transform: translateZ(20px);
    /* Pushes content forward for depth */
}

/* Specific Sections */

/* Hero */
.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 85vh;
    padding-top: var(--nav-height);
}

/* Hero headline and subheading styles are in the HERO ANIMATION SYSTEM section */


.hero-cta {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.2s var(--ease-out-expo), box-shadow 0.2s ease;
}

.btn:active {
    transform: scale(0.96);
}

.glass-btn {
    background: var(--text-primary);
    color: #000;
}

.glass-btn:hover {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.glass-btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid var(--glass-border);
}

.glass-btn-outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.hero-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: block;
}

About .about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1rem;
    color: #d4d4d8;
}

.education-mini {
    padding-left: 2rem;
    border-left: 1px solid var(--glass-border);
}

.edu-item h4 {
    margin-top: 0.5rem;
}

.edu-item small {
    color: var(--text-secondary);
}

/* ==========================================================================
   HERO ANIMATION SYSTEM
   Cinematic word-by-word reveal with blur transition
   Inspired by: Apple, Linear, Vercel, Stripe
   ========================================================================== */

/**
 * Hero Headline Base Styles
 * - Uses clamp for fluid typography
 * - Overflow visible to allow for animation transforms
 */
.hero-headline {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

/* Ready state - before animation triggers */
.hero-headline.hero-animate-ready .hero-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(24px);
    filter: blur(8px);
    will-change: opacity, transform, filter;
}

/* Active state - animation runs */
.hero-headline.hero-animate-active .hero-word {
    animation: heroWordReveal 600ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/**
 * Word Reveal Keyframes
 * - Smooth upward motion (no bounce/overshoot)
 * - Blur → clear transition for depth
 * - Opacity fade for clean entrance
 * - cubic-bezier(0.16, 1, 0.3, 1) = smooth exponential ease-out
 */
@keyframes heroWordReveal {
    0% {
        opacity: 0;
        transform: translateY(24px);
        filter: blur(8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/**
 * Subheading & CTA Fade-in
 * - Delayed entrance after headline completes
 * - Subtle upward motion
 * - animation-delay set via JavaScript
 */
.hero-subheading {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 500px;
    opacity: 0;
    transform: translateY(16px);
}

.hero-cta {
    opacity: 0;
    transform: translateY(16px);
}

.hero-fade-in {
    animation: heroFadeIn 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroFadeIn {
    0% {
        opacity: 0;
        transform: translateY(16px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   HERO MICRO-INTERACTIONS
   Intelligent hover states for premium feel
   ========================================================================== */

/**
 * Individual word hover intelligence
 * - Subtle color shift on hover
 * - Smooth transition
 * - Only active after animation completes
 */
.hero-headline.hero-animate-active .hero-word {
    transition: color 0.3s ease, opacity 0.3s ease;
    cursor: default;
}

/* Dim siblings on word hover for focus effect */
.hero-headline:hover .hero-word {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.hero-headline .hero-word:hover {
    opacity: 1;
    color: #fff;
}

/**
 * CTA Button hover enhancements
 * - Subtle lift effect
 * - Glow on primary button
 */
.hero-cta .glass-btn {
    transition:
        transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.hero-cta .glass-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px -4px rgba(255, 255, 255, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.hero-cta .glass-btn-outline:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.3);
}




/* Experience & Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.2rem;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.timeline-subheader {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.timeline-list {
    padding-left: 1rem;
}

.timeline-list li {
    list-style-position: outside;
    margin-bottom: 0.5rem;
    color: #d4d4d8;
}

/* Skills */
.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
    transform: translateZ(30px);
}

.skill-tags span {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 0.85rem;
    transition: background 0.3s, border-color 0.3s;
}

.skill-tags span:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

.status-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--text-secondary);
}

.icon-link {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.8rem;
}

.icon-link:hover {
    background: #fff;
    color: #000;
}

.project-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.tech-stack {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: auto;
    /* Push to bottom */
}

.tech-stack span {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Achievement */
.achievement-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.achievement-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transform: translateZ(20px);
}

.text-link {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
    opacity: 0.8;
}

/* Contact */
.content-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-sub {
    margin: 1rem 0 3rem;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem;
}

.social-icon:hover {
    color: #fff;
}

.actual-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    width: 100%;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Mobile & Responsive */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 101;
}

.bar {
    width: 25px;
    height: 2px;
    background: #fff;
    transition: 0.3s;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #000;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }

    .nav-menu.active {
        transform: translateY(0);
        display: flex;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3rem;
        font-size: 1.5rem;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    /* Missing Logic for 3rd bar if present, but here just 2 for simplicity or add 3rd */

    .hero-container {
        grid-template-columns: 1fr;
        padding-top: 6rem;
        text-align: center;
        gap: 2rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .education-mini {
        border-left: none;
        padding-left: 0;
        margin-top: 2rem;
        border-top: 1px solid var(--glass-border);
        padding-top: 2rem;
    }
}

/* Animations */
@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(20px, 40px);
    }
}

/* Utility Animations */
.reveal-text,
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

/* Delays */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}