/* ========================================
   CSS Variables & Design Tokens
======================================== */
:root {
    /* Colors - Moody Magenta & Cyan Theme */
    --color-bg-dark: #050506;
    --color-bg-gradient-1: #0a0a0c;
    --color-bg-gradient-2: #050506;
    --color-bg-gradient-3: #000000;
    --color-accent-orange: #e8a54b;
    --color-accent-blue: #28b4c8;
    --color-accent-cyan: #1e8ca0;
    --color-accent-purple: #b43264;
    --color-accent-pink: #a03258;
    --color-accent-teal: #1e7896;
    --color-text-primary: #ffffff;
    --color-text-secondary: rgba(255, 255, 255, 0.7);
    --color-text-muted: rgba(255, 255, 255, 0.5);

    /* Liquid Glass - Apple Style */
    /* Reduced blur for better Chrome performance */
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-bg-hover: rgba(255, 255, 255, 0.18);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-border-inner: rgba(255, 255, 255, 0.4);
    --glass-highlight: rgba(255, 255, 255, 0.5);
    --glass-blur: 40px;
    --glass-saturation: 180%;
    --glass-brightness: 1.1;

    /* Performance: Reduced blur values for navigation */
    --nav-blur: 12px;
    --orb-blur: 60px;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 5rem;

    /* Apple-style Spring Transitions */
    --spring-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --spring-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --spring-snappy: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-fast: 0.15s var(--spring-smooth);
    --transition-smooth: 0.4s var(--spring-smooth);
    --transition-bounce: 0.6s var(--spring-bounce);
    --transition-spring: 0.8s var(--spring-snappy);
}

/* ========================================
   Reset & Base Styles
======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    /* Remove blue highlight on mobile */
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-dark);
    color: var(--color-text-primary);
    overflow: hidden;
    height: 100vh;
    line-height: 1.6;
}

/* ========================================
   WebGL Shader Background Canvas
======================================== */
#shader-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ========================================
   CSS Fallback Background (hidden if WebGL active)
======================================== */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    /* Restore Original Deep Blue/Navy Base */
    background: linear-gradient(145deg,
            #050a12 0%,
            #0a1525 25%,
            #0d1a2d 50%,
            #0a1525 75%,
            #050a12 100%);
    contain: strict;
    transform: translateZ(0);
    display: none;
    /* Hidden by default — shown if WebGL unavailable */
}

/* Subtle underlying noise/tint */
.gradient-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.05), transparent 60%);
    pointer-events: none;
    z-index: -2;
}

/* The Abstract Shapes (formerly orbs)
   Now styled as fluid, morphing blobs */
.gradient-orb {
    display: block;
    position: absolute;
    /* Create organic blob shapes */
    border-radius: 50%;
    /* Heavy blur to diffuse the shapes */
    filter: blur(80px);
    opacity: 0.7;
    /* Soft blending typical of liquid glass */
    mix-blend-mode: normal;
    /* Smooth transition for visual properties only - NOT transform, as JS handles movement */
    transition: opacity 1.5s ease, filter 1.5s ease;
    will-change: transform, border-radius, opacity;
}

/* Alternate Theme (Color Shift) */
.theme-alt .gradient-orb {
    filter: blur(80px) hue-rotate(140deg) saturate(1.2);
}

/* Orb 1: Sky Blue (Original Top Right) */
.gradient-orb-1 {
    width: 60vw;
    height: 50vh;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.6), rgba(14, 165, 233, 0.2));
    top: -15%;
    right: -15%;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morphBlob 15s ease-in-out infinite alternate;
}

/* Orb 2: Violet/Purple (Original Bottom Left) */
.gradient-orb-2 {
    width: 50vw;
    height: 60vh;
    background: linear-gradient(45deg, rgba(139, 92, 246, 0.6), rgba(168, 85, 247, 0.2));
    top: 25%;
    left: -15%;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morphBlob 12s ease-in-out infinite alternate-reverse;
}

/* Orb 3: Pink/Rose (Original Accent) */
.gradient-orb-3 {
    width: 45vw;
    height: 45vw;
    background: linear-gradient(to top, rgba(236, 72, 153, 0.5), transparent);
    bottom: -20%;
    left: 15%;
    border-radius: 50% 50% 20% 80% / 25% 80% 20% 75%;
    animation: morphBlob 18s ease-in-out infinite alternate;
    filter: blur(90px);
}

/* Orb 4: Bright Cyan (Original Top Left Accent) */
.gradient-orb-4 {
    width: 70vw;
    height: 40vh;
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.4), transparent);
    top: 45%;
    right: -15%;
    transform: rotate(-15deg);
    border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
    animation: morphBlob 20s ease-in-out infinite alternate;
    filter: blur(70px);
}

/* Animation for Organic Shape Morphing */
@keyframes morphBlob {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    100% {
        border-radius: 60% 30% 60% 40% / 40% 50% 60% 30%;
    }

    100% {
        border-radius: 60% 30% 60% 40% / 40% 50% 60% 30%;
    }
}

/* Organic Morph for Avatar Wrapper */
@keyframes morphOrganic {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    50% {
        border-radius: 60% 30% 60% 40% / 40% 50% 60% 30%;
    }

    75% {
        border-radius: 40% 60% 30% 60% / 60% 30% 70% 40%;
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

/* Slow Floating Animations to break circular movement */
@keyframes floatBlob1 {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(-5%, 5%) rotate(5deg);
    }
}

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

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

@keyframes floatBlob3 {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(-10%, 0) rotate(-10deg);
    }
}

@keyframes floatBlob4 {
    0% {
        transform: rotate(-15deg) translate(0, 0);
    }

    100% {
        transform: rotate(-12deg) translate(-5%, 10%);
    }
}

.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
    filter: url(#noiseFilter);
    /* Improve performance */
    transform: translate3d(0, 0, 0);
}

/* ========================================
   Main Content
======================================== */
.main-content {
    position: relative;
    z-index: 1;
    z-index: 1;
    height: 100vh;
}

.section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-xl);
    padding-bottom: 120px;
    /* Space for nav */
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    display: none;
}

.section.active {
    opacity: 1;
    transform: translateY(0);
    display: flex;
}

.section-content {
    max-width: 1200px;
    width: 100%;
    margin: auto;
    /* Vertically center content safely */
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 400;
    margin-bottom: var(--spacing-xl);
    background: linear-gradient(135deg, var(--color-text-primary) 0%, var(--color-text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Custom Scrollbar & Smooth Scroll
======================================== */
::-webkit-scrollbar {
    width: 10px;
    background: var(--color-bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
    border: 2px solid var(--color-bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

html,
body {
    scroll-behavior: smooth !important;
}

/* ========================================
   Timeline Component (Centered & Refined)
======================================== */
.timeline-container {
    width: 100%;
    margin-top: var(--spacing-2xl);
    padding-bottom: var(--spacing-2xl);
    position: relative;
    max-width: 90rem;
    /* Increased max-width for spacing */
    margin-left: auto;
    margin-right: auto;
}

.timeline-header {
    margin: 0 auto;
    padding: 0 var(--spacing-lg) var(--spacing-xl);
    max-width: 80rem;
    text-align: center;
    /* Center header too */
}

.timeline-heading {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-primary);
}

.timeline-subheading {
    color: var(--color-text-secondary);
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    max-width: 600px;
    margin: 0 auto;
}

.timeline-wrapper {
    position: relative;
    padding-top: var(--spacing-xl);
}

/* 
   Line & Beam Layout 
   Centered absolutely
*/
.timeline-line-container {
    position: absolute;
    left: 20px;
    /* Mobile: Left aligned */
    top: 0;
    bottom: 0px;
    width: 2px;
    overflow: hidden;
    z-index: 1;
}

@media (min-width: 768px) {
    .timeline-line-container {
        left: 50%;
        margin-left: -1px;
        /* Center perfectly */
    }
}

.timeline-line-background {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.1) 10%, rgba(255, 255, 255, 0.1) 90%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
}

.timeline-line-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    /* Beam Gradient: Purple -> Blue -> Fade */
    background: linear-gradient(to top, var(--color-accent-purple) 0%, var(--color-accent-blue) 50%, transparent 100%);
    box-shadow: 0 0 20px 2px var(--color-accent-blue);
    border-radius: 9999px;
    transition: height 0.05s linear;

    /* Soften the bottom edge so it dissolves */
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

/* Timeline Item Layout */
.timeline-item {
    display: flex;
    flex-direction: column;
    /* Mobile default */
    justify-content: flex-start;
    padding-top: 40px;
    position: relative;
    margin-bottom: var(--spacing-2xl);
    z-index: 2;
    /* Above line */
}

@media (min-width: 768px) {
    .timeline-item {
        flex-direction: row;
        justify-content: center;
        width: 100%;
    }
}

/* 
   Left Column: Sticky Year + Dot
*/
.timeline-left {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    position: sticky;
    top: 15vh;
    /* Stick position */
    align-self: flex-start;
    z-index: 10;
    width: 100%;
    /* Mobile: Full width */
}

@media (min-width: 768px) {
    .timeline-left {
        width: 50%;
        /* Half width */
        justify-content: flex-end;
        /* Align content to center line */
        padding-right: 60px;
        /* Space from line */
        text-align: right;
        /* Align text to line */
    }
}

/* The Dot */
.timeline-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #000;
    /* Dark center */
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-left: 11px;
    /* Mobile positioning */
    flex-shrink: 0;
    box-shadow: 0 0 0 4px #050506;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-dot.active {
    background: var(--color-accent-blue);
    border-color: var(--color-accent-blue);
    box-shadow: 0 0 20px var(--color-accent-blue), 0 0 40px var(--color-accent-purple);
    transform: scale(1.2);
}

@media (min-width: 768px) {
    .timeline-dot {
        width: 24px;
        height: 24px;
        position: absolute;
        right: -12px;
        /* Center on the right edge of left column (which aligns with center line) */
        top: 10px;
        /* Align with text top approximately */
        margin-left: 0;
    }
}

/* The Year Title */
.timeline-year-title {
    display: none;
    /* Hidden on mobile */
    font-size: 5rem;
    /* Large font */
    font-weight: 700;
    color: rgba(255, 255, 255, 0.1);
    line-height: 1;
    margin: 0;
    transition: color 0.3s ease;
}

.timeline-dot.active+.timeline-year-title {
    color: rgba(255, 255, 255, 0.8);
    /* Light up year too */
}

/* We need to re-order HTML slightly via Flex order or just structure to make sure Dot and Year interact well or just target parent */
/* Actually, CSS selector .timeline-dot.active + .timeline-year-title works if they are siblings. */

@media (min-width: 768px) {
    .timeline-year-title {
        display: block;
    }
}

/* 
   Right Column: Content
*/
.timeline-right {
    position: relative;
    padding-left: 50px;
    /* Space for mobile dot */
    padding-right: 20px;
    width: 100%;
}

@media (min-width: 768px) {
    .timeline-right {
        width: 50%;
        padding-left: 60px;
        /* Space from line */
        padding-right: 0;
    }
}

.timeline-year-mobile {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: var(--spacing-sm);
    margin-top: -10px;
}

@media (min-width: 768px) {
    .timeline-year-mobile {
        display: none;
    }
}

.timeline-text {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
    max-width: 600px;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* Grid Images */
.timeline-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.timeline-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    object-fit: cover;
    aspect-ratio: 16/10;

    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);

    box-shadow:
        0 0 24px rgba(34, 42, 53, 0.1),
        0 1px 1px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);

    transition: transform 0.3s ease;
}

.timeline-img:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Checklist */
.timeline-checklist {
    margin-bottom: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.check-item {
    font-size: 1rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ========================================
   Hero Section
======================================== */
.hero-section {
    padding: var(--spacing-2xl);
}

.hero-content {
    max-width: 1400px;
    width: 100%;
}

.hero-main-layout {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Push to right but keep tight */
    gap: var(--spacing-xl);
    width: 100%;
    position: relative;
    padding-right: 5vw;
    /* Breathing room from edge */
}

.hero-avatar-wrapper {
    flex-shrink: 0;
    position: relative;
    padding: 1px;
    /* Rim border */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.0) 100%);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    /* Organic Static Shape */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    /* Animation Removed */
    /* animation: morphOrganic 12s ease-in-out infinite; */
    /* will-change: border-radius; */

    transition: transform 0.2s ease-out;
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;

    /* Positioning Refined (matching screenshot) */
    margin-left: -5vw;
    margin-top: 2vh;
}

.hero-avatar-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%),
            rgba(255, 255, 255, 0.15) 0%,
            rgba(255, 255, 255, 0.05) 20%,
            transparent 50%);
    pointer-events: none;
    z-index: 2;
    mix-blend-mode: overlay;
    transform: translate(-25%, -25%);
}

.hero-avatar {
    width: clamp(280px, 25vw, 450px);
    height: clamp(380px, 35vw, 650px);
    /* Taller aspect ratio */
    border-radius: inherit;
    object-fit: cover;
    object-position: 70% center;
    /* Keep face well-presented based on reference */
    display: block;
    position: relative;
    z-index: 1;
    filter: contrast(1.05) brightness(0.95);
    transition: transform 0.2s ease-out;
}

.hero-title {
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: clamp(4rem, 15vw, 12rem);
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin-bottom: var(--spacing-2xl);
    flex: 1;
}

.title-line {
    display: block;
}

.title-accent {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    color: var(--color-accent-orange);
    display: inline-block;
    margin-left: 40%;
    margin-top: -0.2em;
    font-size: 0.6em;
}

.hero-info {
    display: flex;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
    margin-top: var(--spacing-xl);
}

.info-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.info-label {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.info-value {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    text-transform: uppercase;
}

/* ========================================
   Works Section
======================================== */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.work-card {
    /* Clear Glass */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: var(--spacing-xl);

    /* Performance: Reduced blur for Chrome */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    /* Dispersion & Shadow */
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.1),
        inset 2px 0 5px rgba(255, 50, 50, 0.05),
        inset -2px 0 5px rgba(0, 255, 255, 0.05);

    transition: transform var(--transition-bounce), box-shadow var(--transition-smooth);
    cursor: pointer;
    /* Performance: GPU layer */
    transform: translateZ(0);
    will-change: transform;
}

.work-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
}

.work-number {
    font-size: 0.8rem;
    color: var(--color-accent-orange);
    font-weight: 500;
    letter-spacing: 0.1em;
}

.work-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 400;
    margin: var(--spacing-sm) 0;
}

.work-desc {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

/* ========================================
   About Section
======================================== */
.about-content {
    max-width: 700px;
}

.about-text {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xl);
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.skill-tag {
    /* Clear Glass */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 50px;
    font-size: 0.9rem;

    /* Performance */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    /* Subtle Dispersion */
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.1),
        inset 1px 0 2px rgba(255, 50, 50, 0.05),
        inset -1px 0 2px rgba(0, 255, 255, 0.05);

    transition: all var(--transition-fast);
    transform: translateZ(0);
}

.skill-tag:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ========================================
   Contact Section
======================================== */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-text {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
}

.contact-email {
    display: inline-block;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--color-accent-orange);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
}

.contact-email::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent-orange);
    transition: width var(--transition-smooth);
}

.contact-email:hover::after {
    width: 100%;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.social-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: color var(--transition-fast);
}

.social-link:hover {
    color: var(--color-text-primary);
}

/* ========================================
   Apple Liquid Glass Navigation - Enhanced
======================================== */
.liquid-glass-nav {
    position: fixed;
    /* Use bottom for transitioning */
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    /* Subtler floating animation suitable for both top and bottom */
    animation: navFloat 6s ease-in-out infinite;
    width: max-content;
    /* Ensure smooth movement - Slower and smoother */
    transition: bottom 1.2s cubic-bezier(0.25, 1, 0.5, 1), transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: bottom, transform;
}

/* Language Switch Bubble */
.lang-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;

    /* Performance: Solid background instead of heavy blur */
    background: var(--glass-bg);
    backdrop-filter: blur(var(--nav-blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--nav-blur)) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    transition: all 0.3s var(--spring-smooth);

    /* Position absolutely to the right of the centered menu */
    position: absolute;
    left: 100%;
    margin-left: 16px;
    top: 50%;
    margin-top: -32px;
    /* Half height to center vertically */

    overflow: hidden;
    /* Performance: GPU layer */
    transform: translateZ(0);
    will-change: transform;
}

.lang-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 35px 70px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.lang-btn:active {
    transform: scale(0.95);
}

.lang-icon svg {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes navFloat {

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

    50% {
        transform: translateX(-50%) translateY(-4px);
    }
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    /* Clear Glass Style: Transparent with minimal blur */
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    /* Rounded pill */
    border-radius: 50px;

    /* Crisp Edge */
    border: 1px solid rgba(255, 255, 255, 0.15);

    /* Dispersion & Shadow */
    box-shadow:
        /* Deep drop shadow */
        0 20px 50px rgba(0, 0, 0, 0.4),
        /* Light top reflection */
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        /* FAKE DISPERSION: Subtle chromatic aberration on edges */
        inset 4px 0 8px rgba(255, 50, 50, 0.08),
        /* Red Tint Left */
        inset -4px 0 8px rgba(0, 255, 255, 0.08);
    /* Cyan Tint Right */
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--spring-smooth);
    /* Performance: Force GPU layer */
    transform: translateZ(0);
    will-change: transform, width, height, padding;
    contain: layout style;
    height: auto;
    min-height: auto;
}

/* ========================================
   Top Mode (About Section)
   ======================================== */
.liquid-glass-nav.nav-top-mode {
    bottom: calc(100% - 100px);
    /* Float to top */
    animation: none;
    /* Disable float animation when fixed at top */
}

/* Smoothly hide text labels in top mode */
.liquid-glass-nav.nav-top-mode .nav-label {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Ensure buttons are just icons */
.liquid-glass-nav.nav-top-mode .nav-btn {
    min-width: auto;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icon size adjustment if needed */
.liquid-glass-nav.nav-top-mode .nav-icon {
    width: 20px;
    height: 20px;
    transform: scale(1) !important;
}

.liquid-glass-nav.nav-top-mode .nav-container {
    padding: 1px 16px 1px 1px;
    gap: 20px;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

/* Language button matches menu style in top mode */
.liquid-glass-nav.nav-top-mode .lang-btn {
    width: 48px;
    height: 48px;
    margin-top: -24px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

/* Profile section - hidden from layout by default */
.nav-profile {
    display: none;
    align-items: center;
    gap: 0;
    margin-right: 0;
    padding-right: 0;
    border-right: 0 solid rgba(255, 255, 255, 0.1);

    /* Animation: slide in */
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-width 0.6s var(--spring-smooth),
        opacity 0.4s ease,
        gap 0.4s ease,
        margin 0.4s ease;
}

.liquid-glass-nav.nav-top-mode .nav-profile {
    display: flex;
    max-width: 300px;
    opacity: 1;
    margin-right: 8px;
    padding-right: 0;
    gap: 10px;
}

.nav-name {
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1;
}

/* Show indicator as bubbly circle in top mode */
.liquid-glass-nav.nav-top-mode .nav-indicator {
    border-radius: 50%;
    width: 36px !important;
    height: 36px !important;
    top: 50% !important;
    transform: translateY(-50%) translateZ(0) !important;
}

.liquid-glass-nav.nav-top-mode .nav-btn.active {
    color: var(--color-text-primary);
}

.nav-container:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 40px;
    transition: all 0.3s var(--spring-smooth);
    position: relative;
    z-index: 2;
    color: rgba(255, 255, 255, 0.5);
    user-select: none;
    -webkit-user-select: none;
    min-width: 120px;
}

.nav-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

.nav-btn.active {
    color: rgba(255, 255, 255, 1);
}

.nav-btn.active .nav-label {
    opacity: 1;
    font-weight: 600;
}

.nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s var(--spring-bounce);
}

/* Home Icon Correction */
.nav-btn[data-section="hero"] .nav-icon svg {
    transform: scale(0.85);
    /* Slightly smaller to match visual weight */
}

.nav-icon svg {
    width: 100%;
    height: 100%;
}

/* Smooth scale on active */
.nav-btn.active .nav-icon svg {
    transform: scale(1.1);
    fill: currentColor;
    /* Fill icon on active */
    stroke: none;
}

/* Home Icon Active Correction */
.nav-btn.active[data-section="hero"] .nav-icon svg {
    transform: scale(0.95);
}

/* Press animation */
.nav-btn:active .nav-icon {
    transform: scale(0.9);
    transition-duration: 0.1s;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: capitalize;
    opacity: 0.8;
    max-height: 20px;
    transform: scale(1);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-btn:hover .nav-label {
    opacity: 1;
}

.nav-btn.active .nav-label {
    opacity: 1;
    font-weight: 600;
}

/* Sliding indicator - glass effect */
/* Sliding Bubble Indicator */
.nav-indicator {
    position: absolute;
    height: calc(100% - 12px);
    /* Subtle 5% Bubble Lens */
    background: radial-gradient(circle at center,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 255, 255, 0.02) 40%,
            rgba(255, 255, 255, 0.0) 100%);
    /* Performance: Removed backdrop-filter from indicator - parent already blurs */
    border-radius: 50px;
    transition: all 0.6s cubic-bezier(0.25, 1.5, 0.5, 1), opacity 0.3s ease;
    z-index: 1;
    top: 6px;
    opacity: 0;
    /* Hidden by default */

    /* Soft volume shadows - Bottom/Right only */
    box-shadow:
        /* Outer soft shadow */
        0 4px 12px rgba(0, 0, 0, 0.08),
        /* Soft rim light (white) - Bottom Right */
        inset -1px -1px 4px rgba(255, 255, 255, 0.1);

    /* No border to avoid outlines */
    border: none;
    /* Performance: GPU layer */
    transform: translateZ(0);
    will-change: transform, left, width;
}

/* Specular Reflection - Subtle Sheen */
.nav-indicator::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 15%;
    width: 70%;
    height: 40%;
    border-radius: 50%;
    /* Soft ambient white gradient */
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(255, 255, 255, 0.05) 100%);
    filter: blur(5px);
    /* Increased blur for softness */
    opacity: 0.3;
    pointer-events: none;
}

/* Secondary bottom glow (caustics) - Barely visible */
.nav-indicator::before {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 20%;
    width: 60%;
    height: 20%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(255, 255, 255, 0) 70%);
    filter: blur(8px);
    /* Heavy blur for ambience */
    opacity: 0.2;
}

/* Ripple effect on click */
.nav-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
}

.nav-btn.ripple::before {
    animation: rippleEffect 0.6s var(--spring-smooth) forwards;
}

@keyframes rippleEffect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.6;
    }

    100% {
        width: 120px;
        height: 120px;
        opacity: 0;
    }
}

/* ========================================
   Animations
======================================== */
/* Old keyframes removed - using new orbFloat animations defined above */

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 768px) {
    .hero-main-layout {
        flex-direction: column;
        justify-content: center;
        gap: var(--spacing-xl);
        margin-top: 0;
        text-align: center;
    }

    .hero-avatar {
        width: clamp(250px, 70vw, 350px);
        height: clamp(300px, 85vw, 450px);
        border-radius: inherit;
    }

    .hero-avatar-wrapper {
        order: 2;
        /* Move avatar below text */
        border-radius: 65% 35% 40% 60% / 60% 40% 60% 40%;
        transform: none !important;
        /* Disable tilt on mobile for better UX */
        margin-left: 0;
        margin-top: var(--spacing-lg);
    }

    .hero-content {
        order: 1;
    }

    .hero-title {
        /* Maximize width usage */
        font-size: clamp(3.5rem, 17vw, 6rem);
        width: 100%;
        line-height: 0.9;
    }

    .title-accent {
        /* Shifted to the right, but not fully */
        margin-left: 35%;
        display: block;
    }

    .hero-info {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: center;
    }

    .nav-container {
        padding: 8px;
        gap: 4px;
        /* Ensure fits on small screens */
        max-width: 95vw;
    }

    .nav-btn {
        padding: 8px 16px;
        min-width: 0;
        /* Allow shrinking */
        flex: 1;
        /* Distribute space */
    }

    .nav-icon {
        width: 20px;
        height: 20px;
        margin-bottom: 2px;
    }

    .nav-label {
        font-size: 0.65rem;
    }

    .section {
        /* "Little padding" - maximizing screen real estate */
        padding: var(--spacing-md) var(--spacing-sm);
    }

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

    /* Hide language button on mobile - doesn't fit */
    .lang-btn {
        display: none;
    }

    /* Make top-mode menu take full width on mobile */
    .liquid-glass-nav.nav-top-mode {
        width: calc(100% - 32px);
    }

    .liquid-glass-nav.nav-top-mode .nav-container {
        width: 100%;
    }

    :root {
        --glass-blur: 40px;
    }
}

@media (max-width: 480px) {
    .liquid-glass-nav {
        bottom: 24px;
        width: calc(100% - 32px);
        max-width: 100vw;
    }

    .nav-container {
        justify-content: space-around;
    }

    .nav-btn {
        padding: 6px 12px;
        flex: 1;
    }

    :root {
        --glass-blur: 30px;
    }
}

/* ========================================
   Page Transitions
======================================== */
.section-enter {
    opacity: 0;
    transform: translateY(40px);
}

.section-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.section-exit {
    opacity: 1;
    transform: translateY(0);
}

.section-exit-active {
    opacity: 0;
    transform: translateY(-40px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Force avatar dimensions to prevent squashing */
.nav-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    display: block;
    margin: 0;
}

/* ─── Loader ────────────────────────────────────────────────────────── */

.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    pointer-events: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-wrapper.loaded {
    pointer-events: none;
}

.loader-scaler {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    box-shadow: 0 0 0 200vmax #000;
    transition: transform 1.5s cubic-bezier(0.85, 0, 0.15, 1);
}

.loader-wrapper.loaded .loader-scaler {
    transform: scale(80);
}

.loader {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: loader-rotate 1.5s linear infinite;
    pointer-events: none;
}

@keyframes loader-rotate {
    0% {
        transform: rotate(0deg);
        box-shadow: 0 10px 20px 0 #fff inset, 0 20px 30px 0 #ad5fff inset, 0 60px 60px 0 #471eec inset;
    }

    50% {
        transform: rotate(180deg);
        box-shadow: 0 10px 20px 0 #fff inset, 0 20px 10px 0 #d60a47 inset, 0 40px 60px 0 #311e80 inset;
    }

    100% {
        transform: rotate(360deg);
        box-shadow: 0 10px 20px 0 #fff inset, 0 20px 30px 0 #ad5fff inset, 0 60px 60px 0 #471eec inset;
    }
}

/* ========================================
   Loading Mode - Initial States
======================================== */
body.loading-mode {
    overflow: hidden;
}

/* Initially hide Nav by sliding far down */
body.loading-mode .liquid-glass-nav {
    transform: translateX(-50%) translateY(150px);
    opacity: 0;
    transition: none !important;
}

/* Text Elements & Avatar - Initial Hidden State */
body.loading-mode [data-i18n],
body.loading-mode .hero-avatar-wrapper {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(15px) scale(0.95);
    transition: none !important;
    will-change: opacity, filter, transform;
}

/* Reveal Transition (Normal State) */
[data-i18n],
.hero-avatar-wrapper {
    transition:
        opacity 1.2s ease-out,
        filter 1.2s ease-out,
        transform 1.2s cubic-bezier(0.25, 1, 0.25, 1);
}

/* Stagger Delays for Hero Text */
.hero-title .title-line:nth-child(1) {
    transition-delay: 0.4s;
}

.hero-title .title-line:nth-child(2) {
    transition-delay: 0.5s;
}

.hero-title .title-line:nth-child(3) {
    transition-delay: 0.6s;
}

.hero-info .info-group:nth-child(1) .info-label {
    transition-delay: 0.8s;
}

.hero-info .info-group:nth-child(1) .info-value {
    transition-delay: 0.9s;
}

.hero-info .info-group:nth-child(2) .info-label {
    transition-delay: 1.0s;
}

.hero-info .info-group:nth-child(2) .info-value {
    transition-delay: 1.1s;
}

.hero-avatar-wrapper {
    transition-delay: 1.3s;
    /* Reveals last, matching text flow */
}

/* Separate state for Nav to allow timed reveal */
body.nav-hidden .liquid-glass-nav {
    transform: translateX(-50%) translateY(150px);
    opacity: 0;
    transition: none !important;
    pointer-events: none;
}

/* Nav Reveal Transition - controlled by class removal */
.liquid-glass-nav {
    transition: bottom 1.2s cubic-bezier(0.25, 1, 0.5, 1),
        transform 1.2s cubic-bezier(0.25, 1, 0.5, 1),
        opacity 1.2s ease;
}

/* Fix for About Section overlapped by top nav */
#about {
    padding-top: 140px;
    /* Force more space for top menu */
}

/* Fix for About Section overlapped by top nav */
#about {
    padding-top: 140px;
    /* Force more space for top menu */
}