:root {
    --bg-base: #07090F;
    --bg-surface: #121620;
    --text-primary: #EBE9E1;
    --text-muted: #8A8F9E;
    --accent: #CBA365;
    --glass-bg: rgba(18, 22, 32, 0.6);
    --glass-border: rgba(203, 163, 101, 0.2);
}

[data-theme='light'] {
    --bg-base: #F5F3EC;
    --bg-surface: #EAE6DA;
    --text-primary: #1C1B1A;
    --text-muted: #6B6862;
    --accent: #AD6C4A;
    --glass-bg: rgba(234, 230, 218, 0.6);
    --glass-border: rgba(173, 108, 74, 0.2);
}

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

body,
html {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    /* Kills the horizontal scrollbar completely */
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Manrope', sans-serif;
    transition: background-color 0.6s ease, color 0.6s ease, border-color 0.6s ease;

    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
    display: none;
}

/* ── Global Cinematic Utilities ───────────────────────────── */

/* Horizontal accent divider between sections */
.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--glass-border) 15%,
        var(--accent) 50%,
        var(--glass-border) 85%,
        transparent 100%);
    opacity: 0.5;
    position: relative;
    z-index: 10;
}

/* Fixed scroll-progress laser at top of viewport */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    z-index: 99998;
    pointer-events: none;
}

/* Agency-tier section reveal states */
[data-reveal] {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Typography styles */
h1 {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
}

/* Anti-Hero Section */
.anti-hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: transparent !important;
    transition: background-color 0.6s ease, color 0.6s ease;
    /* Cinematic vignette overlay */
}
.anti-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, var(--bg-base) 110%);
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

/* ============================================================
   WEBGL LIQUID SILK TOPOGRAPHY (HERO BACKGROUND)
   ============================================================ */
.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    display: block;
}

.content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 2vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    mix-blend-mode: difference;
    width: 100%;
    pointer-events: none;
}

[data-theme='light'] .content {
    mix-blend-mode: normal;
}

.title {
    font-size: 14vw;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 1rem;
    white-space: nowrap;
}

.subtitle {
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-primary);
    letter-spacing: 0.8em;
    text-transform: uppercase;
    text-indent: 0.8em;
    max-width: 100%;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    z-index: 1;
}

.scroll-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    font-weight: 300;
}

.scroll-line {
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, var(--text-primary), transparent);
    opacity: 0.4;
}

/* =============================================
   Universal Premium Section Header Component
   ============================================= */
.premium-header-wrapper {
    overflow: visible !important;
    /* Legacy clip removed for new GSAP 2D Skew */
    margin-bottom: 4rem;
}

.pre-title {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--accent);
    opacity: 0;
    /* animated in by JS */
    margin-bottom: 0.3rem;
    display: block;
}

.main-title {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(3rem, 5.5vw, 6rem);
    color: var(--text-primary);
    font-weight: 400;
    line-height: 1;
    opacity: 0;
    /* animated in by JS */
    display: block;
}

/* Projects header: positioned over the scroll-section canvas */
.projects-section-header {
    position: absolute;
    top: 5vh;
    /* Moved up to clear the massive titles */
    left: 4vw;
    /* Moved left for more breathing room */
    z-index: 1000;
    /* Stays fixed above all project content */
    pointer-events: none;
}

/* Cinematic Horizontal Projects Gallery */
.projects-wrapper {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-base);
    position: relative;
    /* lets .projects-section-header position absolutely */
    transition: background-color 0.6s ease, color 0.6s ease;
}

.projects-track {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    height: 100vh;
}

.project-card {
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0;
}

.project-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    width: 100%;
    height: 100%;
}

.massive-title {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(6rem, 15vw, 15rem);
    line-height: 0.9;
    color: var(--text-primary);
    text-transform: uppercase;
    cursor: pointer;
    z-index: 10;
    position: relative;
    mix-blend-mode: difference;
    transition: color 0.4s ease, -webkit-text-stroke 0.4s ease;
    white-space: nowrap;
    margin-top: 5vh;
    /* Pushes the title down to avoid header clash */
}

[data-theme='light'] .massive-title {
    mix-blend-mode: normal;
    color: var(--text-primary);
    -webkit-text-stroke: 0;
}

[data-theme='light'] .project-content:hover .massive-title {
    color: var(--text-primary);
    -webkit-text-stroke: 0;
}

.project-content:hover .massive-title {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-primary);
}

.project-image-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 35vw;
    max-width: 600px;
    aspect-ratio: 4/5;
    overflow: hidden;

    /* GSAP Cinematic Click Reveal Initial State */
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    opacity: 0;
    pointer-events: none;
    transform: scale(1.1);

    z-index: 5;
    border-radius: 10px;
    filter: url(#liquid-distortion);
    transition: filter 0.6s ease-out;
    /* Removed opacity/transform transition so GSAP controls it */
}

.project-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.1) brightness(0.9) saturate(1.2);
    /* Deepens the colors */
    transition: filter 0.5s ease;
}

.project-card:hover .project-image-wrapper img {
    filter: contrast(1.2) brightness(1.1) saturate(1.3);
    /* Wakes up on hover */
}

/* Protective Glass Overlay for legibility */
.project-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Makes the bottom 50% much darker/more solid to protect the description */
    background: linear-gradient(to top, var(--bg-base) 10%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}


.project-content:hover .project-image-wrapper {
    opacity: 1;
}

.panel-number {
    font-family: 'Instrument Serif', serif;
    font-size: 3rem;
    color: var(--text-primary);
    position: absolute;
    top: 12vh;
    /* Moved down to clear the section header */
    left: 4vw;
    opacity: 0.5;
    z-index: 5;
}

/* --- Project Text & Links UI --- */
.project-details {
    position: absolute;
    bottom: 10vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    z-index: 100 !important;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out 0.2s, transform 0.6s ease-out 0.2s;
    pointer-events: none;
}

.project-content:hover .project-details {
    opacity: 1;
    transform: translateY(0);
}

.panel-subtitle {
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0 2px 10px var(--bg-base), 0 0 20px var(--bg-base);
}

.panel-desc {
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 400px;
    /* Adaptive glow for legibility */
    text-shadow: 0 2px 10px var(--bg-base), 0 0 20px var(--bg-base);
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.action-btn {
    pointer-events: auto !important;
    /* ...but explicitly turns clicks BACK ON for buttons */
    position: relative;
    z-index: 60 !important;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-decoration: none;
    transition: all 0.3s ease;
    background: transparent;
}

.action-btn:hover {
    background: var(--text-primary);
    color: var(--bg-base);
}

/* --- AI Generated Micro-Badge --- */
.ai-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.6rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 40;
    pointer-events: none;
}


/* About Me Section */
.about-section {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    background-color: var(--bg-base);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15vh 10vw;
    gap: 5vw;
    transition: background-color 0.6s ease, color 0.6s ease;
    /* Subtle section-specific noise texture for depth */
}
.about-section::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.about-content {
    flex: 0 0 50%;
    text-align: left;
}

.about-label {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    letter-spacing: 0.5em;
    color: var(--accent);
    margin-bottom: 2.5rem;
    text-transform: uppercase;
}

.about-text {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2.5rem, 5vw, 5rem);
    line-height: 1.1;
    color: var(--text-primary);
    font-weight: 400;
}

.about-word {
    opacity: 0.2;
    display: inline;
    will-change: opacity;
}

.about-portrait-wrapper {
    flex: 0 0 40%;
    height: 70vh;
    overflow: hidden;
    border-radius: 4px;
    perspective: 800px;
    cursor: none;
    /* Premium border glow */
    border: 1px solid var(--glass-border);
    box-shadow: 0 30px 80px rgba(0,0,0,0.3), inset 0 0 40px rgba(0,0,0,0.2);
    transition: box-shadow 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.about-portrait-wrapper:hover {
    box-shadow: 0 30px 100px rgba(0,0,0,0.4), 0 0 60px var(--glass-border), inset 0 0 40px rgba(0,0,0,0.2);
}

.about-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Premium High-Contrast Studio Filter */
    filter: url(#about-liquid) grayscale(1);
    transition: filter 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s ease;
    will-change: transform, filter;
    transform-style: preserve-3d;
    display: block;
}

.about-portrait-wrapper:hover .about-portrait {
    /* Slight reveal on hover */
    filter: url(#about-liquid) grayscale(0.2) contrast(1.1) brightness(1.1);
}

/* Education Section */
.education-section,
.experience-section,
.skills-section {
    position: relative;
    width: 100vw;
    background-color: var(--bg-base);
    padding: 10rem 0 5rem 0;
    overflow: hidden;
    transition: background-color 0.6s ease, color 0.6s ease;
}

.skills-section {
    padding-bottom: 10rem;
    transition: background-color 0.6s ease, color 0.6s ease;
}

.section-heading {
    text-align: center;
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--text-primary);
    margin-bottom: 8rem;
    font-weight: 400;
}

.timeline-container {
    position: relative;
    max-width: 1000px;
    height: 1200px;
    margin: 0 auto 10rem auto;
}

.timeline-svg,
.timeline-nodes {
    position: absolute;
    top: 0;
    left: 10%;
    width: 200px;
    height: 100%;
}

.timeline-svg {
    z-index: 0;
}

.timeline-path {
    stroke: var(--text-primary);
    opacity: 0.25;
    transition: stroke 0.6s ease;
}

.timeline-nodes {
    z-index: 1;
}

.timeline-node {
    position: absolute;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    width: max-content;
}

/* Glassmorphism dot */
.node-dot {
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: var(--bg-base);
    border: 2px solid var(--accent);
    border-radius: 50%;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 15px var(--glass-bg);
    transition: background-color 0.6s ease, border-color 0.6s ease;
}

.node-content {
    margin-left: 24px;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1),
        transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.timeline-node.active .node-content {
    opacity: 1;
    transform: translateX(0);
}

.node-title {
    font-family: 'Manrope', sans-serif;
    font-weight: 300;
    font-size: 1.5rem;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    margin-bottom: 0.35rem;
}

.node-company {
    font-family: 'Manrope', sans-serif;
    font-weight: 200;
    font-size: 1.1rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* Matter Skills Bubbles */
.physics-skills-container {
    width: 100%;
    height: 70vh;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-base);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    transition: background-color 0.6s ease, color 0.6s ease;
}

.matter-bubble {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;

    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.8));
    border: 1px solid var(--accent);
    box-shadow: inset -10px -10px 30px rgba(0, 0, 0, 0.6), inset 10px 10px 30px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);

    color: var(--text-primary);
    font-family: 'Manrope', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    user-select: none;
    text-align: center;
    cursor: pointer;
    transition: color 0.6s ease, border-color 0.6s ease, background 0.6s ease, box-shadow 0.6s ease;
}

[data-theme='light'] .matter-bubble {
    color: var(--text-primary);
    border-color: var(--text-primary);
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.6), rgba(0, 0, 0, 0.05));
    box-shadow: inset -10px -10px 30px rgba(0, 0, 0, 0.05), inset 10px 10px 30px rgba(255, 255, 255, 0.5);
}

.matter-bubble.parent-bubble {
    font-size: 1.3rem;
    font-weight: 400;
    z-index: 5;
    transition: transform 0.2s cubic-bezier(0.19, 1, 0.22, 1) scale;
}

.matter-bubble.parent-bubble:hover {
    transform: scale(1.05);
    /* Slight bounce on hover before splitting */
}

.matter-bubble.child-bubble {
    font-size: 0.9rem;
    border-width: 0.5px;
    z-index: 4;
}

/* ═══════════════════════════════════════════════════════════
   EDUCATION SECTION — Sticky Parallax Stack
   ═══════════════════════════════════════════════════════════ */

/* Outer section: enough height for both sticking moments  */
.edu-section {
    position: relative;
    width: 100vw;
    background-color: var(--bg-base);
    padding-top: 10rem;
    padding-bottom: 30vh;
    /* overflow hidden would break sticky; keep visible */
    transition: background-color 0.6s ease, color 0.6s ease;
}

/* Section header: sits above the scroll canvas */
.edu-header {
    text-align: center;
    padding: 0 10vw;
    margin-bottom: 6rem;
}

/* The tall canvas that provides scroll distance for both sticky moments.
   Card 1 is visible for ~100vh, then Card 2 slides over it for another
   ~100vh, then the section exits. 150vh gives comfortable breathing room. */
.edu-scroll-canvas {
    position: relative;
    width: 100%;
    height: 150vh;
}

/* ── Shared card base ──────────────────────────────────────── */
.edu-card {
    position: sticky;
    top: 8vh;
    /* stick point, per spec */
    width: 90vw;
    max-width: 1100px;
    margin: 0 auto;
    height: auto;
    min-height: max-content;
    padding: 4vh 3vw;

    /* Obsidian glass per spec */
    background: var(--glass-bg);
    backdrop-filter: blur(22px) saturate(1.4);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);
    border: 1px solid var(--glass-border);
    /* champagne */
    border-radius: 4px;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;

    /* 3D context for the push-back transform */
    transform-origin: center top;
    transform-style: preserve-3d;
    will-change: transform, filter, opacity;

    /* Entry: not yet pushed back */
    transition: box-shadow 0.6s ease;
}

/* Subtle outer glow on the champagne border */
.edu-card:hover {
    box-shadow: 0 0 60px var(--glass-border), 0 40px 80px var(--glass-bg);
}

/* ── Card stacking z-order ─────────────────────────────────── */
/* Card 1 sits at the top of the canvas in normal flow.          */
.edu-card--hs {
    z-index: 1;
}

/* Card 2 starts 10vh below Card 1's bottom edge so Card 1 is
   fully visible and sticky before Card 2 rises to cover it.     */
.edu-card--btech {
    z-index: 2;
    margin-top: 10vh;
}

/* ── "Pushed back" state — applied by GSAP ────────────────── */
.edu-card--pushed {
    /* These are overridden by GSAP inline; the class is used as a marker */
    pointer-events: none;
}

/* ── Giant faint watermark ─────────────────────────────────── */
.edu-watermark {
    position: absolute;
    right: -2vw;
    bottom: -0.1em;
    font-family: 'Instrument Serif', serif;
    font-size: clamp(8rem, 20vw, 18rem);
    font-weight: 400;
    color: var(--glass-border);
    line-height: 1;
    letter-spacing: -0.04em;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

/* ── Inner content wrapper ─────────────────────────────────── */
.edu-card-inner {
    position: relative;
    z-index: 2;
    padding: 3.5rem 4vw 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    height: 100%;
    justify-content: flex-end;
}

/* ── Top meta row (tag + year) ─────────────────────────────── */
.edu-card-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.edu-card-tag {
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--accent);
}

.edu-card-year {
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.3em;
    color: var(--glass-border);
}

/* ── Main title ────────────────────────────────────────────── */
.edu-card-title {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2.2rem, 4.5vw, 5rem);
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.edu-card-title em {
    font-style: italic;
    color: var(--accent);
}

/* ── Institution subtitle ──────────────────────────────────── */
.edu-card-subtitle {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    line-height: 1.5;
}

/* ── Stats row ─────────────────────────────────────────────── */
.edu-card-stats {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-top: 0.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.edu-stat {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.edu-stat-value {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1;
}

.edu-stat-unit {
    font-size: 0.5em;
    color: var(--accent);
    vertical-align: super;
}

.edu-stat-label {
    font-family: 'Manrope', sans-serif;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.edu-stat-divider {
    width: 1px;
    height: 3rem;
    background: var(--glass-border);
    flex-shrink: 0;
}

/* ── Glowing CGPA Badge (Card 2 only) ─────────────────────── */
.edu-cgpa-badge {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    position: relative;
}

.edu-cgpa-badge::before {
    content: '';
    position: absolute;
    inset: -12px -16px;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: var(--glass-border);
    pointer-events: none;
    /* Animate the glow */
    animation: cgpa-glow-pulse 2.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes cgpa-glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 var(--glass-border);
    }

    50% {
        box-shadow: 0 0 20px 4px var(--glass-border);
    }
}

.edu-cgpa-value {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 400;
    color: var(--accent);
    line-height: 1;
    text-shadow: 0 0 30px var(--glass-border);
}

.edu-cgpa-label {
    font-family: 'Manrope', sans-serif;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--accent);
}

/* ── Bottom champagne accent line ──────────────────────────── */
.edu-card-accent-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right,
            transparent 0%,
            var(--accent) 30%,
            var(--accent) 70%,
            transparent 100%);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .edu-scroll-canvas {
        height: 180vh;
        /* Replaced artificial 440vh blank scroll gap */
    }

    .edu-card {
        width: 94vw;
        height: auto;
        min-height: auto;
        top: 4vh;
        /* Safe buffer from top */
        overflow: hidden;
        /* Restore clipping for the giant watermark */
        padding: 2vh 3vw;
        /* Reduced from 4vh to free up massive screen estate */
    }

    .edu-card--btech {
        margin-top: 60vh;
    }

    .edu-card-title {
        font-size: clamp(1.8rem, 7vw, 2.8rem);
    }

    .edu-card-inner {
        padding: 1.5rem 4vw 1.5rem;
        /* Cut padding by 50% to prevent vertical crushing */
        height: auto;
        flex: 1;
        gap: 1rem;
        /* Closes the vertical space between title and stats */
    }

    .edu-card-stats {
        flex-wrap: wrap;
        gap: 1rem;
        padding-top: 1rem;
        margin-top: 0;
    }

    .edu-cgpa-badge::before {
        inset: -6px -12px;
        /* Shaved down the glowing box margins */
        border-radius: 4px;
    }

    .edu-cgpa-value {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
        /* Slimmed down the number */
    }

    .edu-cgpa-label {
        font-size: 8px;
        /* Tighter label metric */
    }

    .edu-stat-divider {
        display: none;
    }
}

/* Certifications Accordion Section */
.certifications-section {
    position: relative;
    width: 100vw;
    background-color: var(--bg-base);
    padding: 10rem 10vw;
    border-bottom: 1px solid var(--glass-border);
    transition: background-color 0.6s ease, color 0.6s ease;
}

/* Premium accordion hover accent bar */
.accordion-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0px;
    height: 100%;
    background: var(--accent);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
}
.accordion-item:hover::before {
    width: 3px;
}
.accordion-header {
    padding-left: 1rem;
}

.accordion-container {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid var(--glass-border);
}

.accordion-item {
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 0;
}

.accordion-title {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 400;
    color: var(--text-primary);
    text-transform: uppercase;
    transition: color 0.4s ease, opacity 0.4s ease;
    pointer-events: none;
}

.accordion-icon {
    font-family: 'Manrope', sans-serif;
    font-size: 2rem;
    font-weight: 100;
    color: var(--text-primary);
    transition: transform 0.4s ease;
    pointer-events: none;
}

.accordion-content {
    height: 0;
    overflow: hidden;
    transition: height 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.accordion-details {
    padding-bottom: 3rem;
    max-width: 600px;
}

.cert-date {
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.cert-desc {
    font-family: 'Manrope', sans-serif;
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    font-weight: 300;
}

.accordion-item:hover .accordion-title {
    opacity: 0.7;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

/* Isolated DOM Hover Image */
#cert-hover-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 350px;
    height: auto;
    pointer-events: none;
    z-index: 999999;
    opacity: 0;
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    box-shadow: 0 20px 40px var(--glass-bg);
}

/* Custom Magnetic Cursor & Liquid Chrome Blob */
body {
    cursor: none;
}

a,
button {
    cursor: none;
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    background-color: transparent;
    border: 1px solid var(--text-muted);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.4s cubic-bezier(0.19, 1, 0.22, 1),
        height 0.4s cubic-bezier(0.19, 1, 0.22, 1),
        border-color 0.4s ease,
        background-color 0.4s ease;
}

.custom-cursor.hovered {
    width: 60px;
    height: 60px;
    background-color: var(--glass-bg);
    border-color: transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    mix-blend-mode: exclusion;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: blob-morph 3s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

@keyframes blob-morph {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: translate(-50%, -50%) rotate(0deg);
    }

    34% {
        border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
        transform: translate(-50%, -50%) rotate(120deg);
    }

    67% {
        border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%;
        transform: translate(-50%, -50%) rotate(240deg);
    }

    100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ── Premium Footer ──────────────────────────────── */
.premium-footer {
    width: 100vw;
    min-height: 100vh;
    background-color: var(--bg-base);
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 8vh 8vw;
    gap: 4vw;
    overflow: hidden;
    position: relative;
    transition: background-color 0.6s ease, color 0.6s ease;
}

/* ── Left Column ──────────────────────────────────── */
.footer-left {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 80vh;
}

.footer-eyebrow {
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--accent);
}

.footer-headline {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(3.5rem, 6vw, 7.5rem);
    color: var(--text-primary);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.01em;
    margin: 2rem 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-headline em {
    font-style: italic;
    color: var(--accent);
}

.footer-contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 4rem;
}

.scramble-link {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2rem, 4vw, 4.5rem);
    color: var(--text-muted);
    text-decoration: none;
    line-height: 1.15;
    display: inline-block;
    transition: color 0.4s ease;
    will-change: transform;
    letter-spacing: -0.01em;
    position: relative;
}

.scramble-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: var(--accent);
    transition: width 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

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

.scramble-link:hover::after {
    width: 100%;
}

.footer-meta {
    font-family: 'Manrope', sans-serif;
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    display: flex;
    gap: 3rem;
}

/* ── Right Column: Globe ─────────────────────────── */
.footer-globe-wrapper {
    flex: 1 1 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#globe-canvas {
    width: 100% !important;
    height: 100% !important;
    min-height: 400px;
    display: block;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
    .premium-footer {
        flex-direction: column;
        padding: 8vh 6vw;
        min-height: auto;
        transition: background-color 0.6s ease, color 0.6s ease;
    }

    .footer-left {
        min-height: auto;
    }

    .footer-globe-wrapper {
        width: 100%;
        height: 50vw;
        min-height: 300px;
    }
}

.footer-link:hover::after,
.footer-cta:hover::after {
    width: 100%;
}

/* Mobile */
@media (max-width: 768px) {

    body,
    a,
    button {
        cursor: auto;
    }

    .custom-cursor {
        display: none;
    }

    .title {
        font-size: 15vw;
    }

    .panel-title {
        font-size: clamp(3rem, 12vw, 4rem);
    }

    .panel-content {
        padding: 2rem;
    }

    .timeline-container {
        height: auto;
        min-height: 800px;
    }

    .minimal-footer {
        flex-direction: column;
        gap: 3rem;
        padding: 4rem 2rem;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1.5rem;
    }

    /* Deprecated mobile click overrides removed */

    /* Fix 1: About Section Stacking */
    .about-section {
        flex-direction: column;
        padding: 10vh 5vw;
        gap: 2rem;
    }

    .about-content {
        flex: 1;
        width: 100%;
        text-align: left;
    }

    .about-portrait-wrapper {
        flex: 1;
        width: 100%;
        height: 60vh;
        border-radius: 12px;
        /* Professional, grounded boundary */
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        border: 1px solid var(--glass-border);
        overflow: hidden;
        animation: none !important;
        /* Strips the float loop */
    }

    .about-portrait {
        filter: grayscale(0) contrast(1.05) !important;
        /* Ejects the liquid SVG map completely */
        transform: translateZ(0) !important;
        /* Neutralizes skewed interactions */
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Fix 2: Projects Horizontal Overhaul -> LUXURY MOBILE REDESIGN */
    .projects-wrapper {
        height: auto;
        overflow: visible;
        padding: 5vh 0 15vh 0;
    }

    .projects-track {
        flex-direction: column;
        width: 100vw;
        height: auto;
        gap: 15vh;
        /* Massive spacing between projects */
    }

    .projects-section-header {
        position: relative;
        text-align: center;
        margin-bottom: 10vh;
        margin-left: 0;
        width: 100%;
        top: 0;
        left: 0;
    }

    .project-card {
        height: auto !important;
        min-height: auto !important;
        margin-bottom: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        padding: 0 5vw !important;
        position: relative !important;
    }

    .project-content {
        justify-content: flex-start !important;
        height: auto !important;
        align-items: flex-start !important;
        position: relative !important;
    }

    .project-image-wrapper {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100% !important;
        height: 55vh !important;
        max-width: none !important;
        opacity: 1 !important;
        /* ALWAYS VISIBLE ON MOBILE */
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%) !important;
        border-radius: 16px !important;
        margin-bottom: 2rem !important;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2) !important;
    }

    .project-image-wrapper::after {
        background: linear-gradient(to top, var(--bg-base) 0%, transparent 100%) !important;
    }

    .panel-number {
        position: absolute !important;
        top: -4vh !important;
        left: 0 !important;
        font-size: 1.5rem !important;
        opacity: 0.8 !important;
    }

    .massive-title {
        position: absolute !important;
        top: 40vh !important;
        left: 2vw !important;
        font-size: clamp(3rem, 10vw, 4.5rem) !important;
        text-align: left !important;
        white-space: normal !important;
        color: var(--text-primary) !important;
        -webkit-text-stroke: 0 !important;
        line-height: 0.9 !important;
        z-index: 20 !important;
        pointer-events: none !important;
        text-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
    }

    .ai-badge {
        top: 1rem !important;
        right: 1rem !important;
        backdrop-filter: blur(10px) !important;
    }

    .project-details {
        position: relative !important;
        bottom: 0 !important;
        opacity: 1 !important;
        /* ALWAYS VISIBLE */
        transform: none !important;
        pointer-events: auto !important;
        align-items: flex-start !important;
        text-align: left !important;
        width: 100% !important;
        padding-left: 2vw !important;
    }

    .panel-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
        text-shadow: none !important;
        color: var(--accent) !important;
    }

    .panel-desc {
        text-shadow: none !important;
        font-size: 0.9rem !important;
        margin-bottom: 1.5rem !important;
    }

    .project-links {
        justify-content: flex-start !important;
        gap: 0.8rem !important;
    }

    .action-btn {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.75rem !important;
        background: var(--glass-bg) !important;
        backdrop-filter: blur(10px) !important;
        border: 1px solid var(--glass-border) !important;
    }

    /* Fix 3: Experience Timeline Flexbox Architecture */
    .timeline-svg {
        display: none !important;
    }

    .timeline-container {
        height: auto;
        min-height: 0;
        padding-left: 5vw;
        padding-right: 5vw;
    }

    .timeline-nodes {
        position: relative;
        left: 0;
        top: 0;
        height: auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 4rem;
        border-left: 2px solid var(--glass-border);
        padding-left: 30px;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .timeline-node {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100%;
    }

    .node-dot {
        left: -37px !important;
        transform: scale(0);
        transition: transform 0.5s cubic-bezier(0.3, 1.5, 0.5, 1);
    }

    .timeline-node.active .node-dot {
        transform: scale(1);
    }

    .node-content {
        opacity: 0 !important;
        transform: translateY(30px) !important;
        /* Vertical slide for mobile layout */
        max-width: 100%;
        white-space: normal;
        transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 1, 0.1, 1);
    }

    .timeline-node.active .node-content {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    .node-title,
    .node-company {
        white-space: normal;
        word-wrap: break-word;
    }
}

/* --- Holographic Terminal HUD --- */
.holographic-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    perspective: 1200px;
    z-index: 20;
}

.holographic-floater {
    pointer-events: auto;
    animation: zeroGravity 6s ease-in-out infinite;
}

.holographic-terminal {
    position: relative;
    width: 320px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: inset 0 0 20px var(--glass-border), 0 15px 35px var(--glass-bg);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
    font-family: 'Manrope', monospace;
}

.holographic-terminal::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: scannerSweep 4s linear infinite;
    pointer-events: none;
    z-index: 21;
}

.terminal-content {
    /* Slight 3D pop inside the card */
    transform: translateZ(30px);
}

.term-header {
    color: var(--accent);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.85rem;
    text-transform: uppercase;
    font-weight: 500;
}

.term-data {
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.term-time {
    color: var(--accent);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    margin-top: 1.2rem;
    opacity: 0.9;
}

@keyframes zeroGravity {

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

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

@keyframes scannerSweep {
    0% {
        top: -10px;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Add a tiny pulse to the UI dot */
.globe-ui-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--accent);
    animation: radar-ping 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes radar-ping {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

.remarkable-morph {
    display: inline-block;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.remarkable-morph:hover {
    font-family: 'Manrope', sans-serif;
    font-weight: 200;
    font-style: normal;
    letter-spacing: 0.08em;
    color: var(--accent);
    transform: scaleX(1.05) translateX(2%);
}

/* ============================================================
   PREMIUM NAV HUB — The ONLY fixed-positioned element in 
   this corner. Children MUST be position: relative to obey
   the flexbox gap.
   ============================================================ */
.premium-nav-hub {
    position: fixed;
    top: 4vh;
    right: 4vw;
    display: flex;
    align-items: center;
    gap: 2rem;
    z-index: 9999;
    pointer-events: auto;
}

/* ── CRITICAL CHILD RESET ──
   Strip ALL old positioning from children so they physically
   push each other apart by exactly 2rem (parent gap).          */
.premium-nav-hub>.theme-toggle-wrapper,
.premium-nav-hub>.magnetic-menu {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    margin: 0 !important;
}

.theme-toggle-wrapper {
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    height: 40px;
    -webkit-tap-highlight-color: transparent;
}

.theme-toggle-track {
    width: 50px;
    height: 24px;
    background-color: var(--glass-bg);
    border-radius: 50px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4);
    position: relative;
    border: 1px solid var(--glass-border);
    transition: background-color 0.6s ease, border-color 0.6s ease;
}

.theme-orb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--accent), #e3b76f);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme='light'] .theme-orb {
    transform: translateX(26px);
}

/* ============================================================
   MAGNETIC FLOATING MENU
   ============================================================ */
.magnetic-menu {
    background-color: var(--bg-base);
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 50px;
    padding: 0 1.4rem;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Manrope', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--glass-bg);
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.magnetic-menu:hover {
    background-color: var(--glass-border);
    border-color: var(--accent);
    color: var(--text-primary);
}

/* ============================================================
   FULL-SCREEN MENU OVERLAY
   ============================================================ */
.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: var(--glass-bg);
    /* Dark obsidian per req */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow-y: auto;
    padding-block: 10vh;
    transition: background-color 0.6s ease, color 0.6s ease;
}

/* Hide scrollbar gracefully */
.menu-overlay::-webkit-scrollbar {
    display: none;
}

.menu-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 10;
}

.menu-link {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2rem, 9vh, 7rem);
    color: var(--text-primary);
    text-decoration: none;
    line-height: 0.85;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(100px);
    transition: color 0.6s cubic-bezier(0.25, 1, 0.5, 1), -webkit-text-stroke 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Hover logic: unfocused items become outlined */
.menu-nav:hover .menu-link {
    color: transparent;
    -webkit-text-stroke: 1px var(--glass-border);
    /* thin champagne outline */
}

/* Focused item remains solid */
.menu-nav:hover .menu-link:hover {
    color: var(--text-primary);
    -webkit-text-stroke: 0px;
}

/* ── Menu Background Reveal Layer ── */
.menu-hover-background {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.4s ease, background-image 0s;
}

/* ============================================================ */
/* CRITICAL GSAP TYPOGRAPHY OVERRIDES */
/* ============================================================ */
.main-title,
.section-title,
.pre-title,
.word {
    overflow: visible !important;
    clip-path: none !important;
    transform-style: flat !important;
    /* Forces 2D rendering */
    line-height: 1 !important;
    /* Keeps titles tight and professional */
    user-select: none;
    /* Kills the blue highlight glitch */
    -webkit-user-select: none;
}

canvas {
    max-width: 100vw !important;
    overflow: hidden;
}

@media (max-width: 768px) {

    /* Lock the horizontal axis entirely */
    html,
    body {
        width: 100%;
        overflow-x: hidden !important;
        position: relative;
    }

    /* Forces the container to wrap its newly tall text and pushes the next project away */
    .project-card,
    .project-item {
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        margin-bottom: 15vh !important;
        /* Massive cinematic gap between projects */
        height: auto !important;
        min-height: min-content !important;
    }

    /* Shrink the Nav Hub so it doesn't push off-screen */
    .premium-nav-hub {
        top: 20px;
        right: 20px;
        gap: 1rem;
        transform: scale(0.85);
        /* Scales down the toggle and menu button cleanly */
        transform-origin: top right;
    }

    /* Fluid Typography with breathing room */
    .main-title,
    .project-title,
    h1,
    h2 {
        font-size: clamp(2.5rem, 10vw, 5rem) !important;
        word-break: break-word;
        line-height: 1.25 !important;
        /* Gives broken words breathing room */
        padding-bottom: 1rem !important;
    }

    .word {
        display: inline-block !important;
        padding-bottom: 0.2rem !important;
    }

    /* Refined Premium Menu Links for Mobile */
    .menu-link {
        font-size: clamp(1.5rem, 5.5vh, 3rem) !important;
        letter-spacing: 0.02em !important;
        line-height: 1.1 !important;
        margin-bottom: 1.2vh !important;
    }

    /* Use SVH (Small Viewport Height) to fix the mobile URL bar gap glitch */
    .hero-section,
    section {
        min-height: 100svh !important;
        padding-left: 5vw;
        padding-right: 5vw;
    }

    /* Force timeline titles to wrap and stay on screen */
    .timeline-content h3,
    .timeline-content h2,
    .experience-info h3,
    .node-title {
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        width: 100% !important;
        max-width: 75vw !important;
        /* Leaves room for the curved line on the left */
        font-size: clamp(1.2rem, 5vw, 1.8rem) !important;
        /* Fluid mobile sizing */
        line-height: 1.3 !important;
    }

    /* Ensure the container holding the text allows wrapping */
    .timeline-content,
    .experience-info,
    .node-content {
        width: 100% !important;
        overflow: hidden !important;
    }

    /* Strip fixed heights from the parent sections */
    .experience-section,
    .education-section,
    .timeline-container {
        height: auto !important;
        min-height: min-content !important;
        padding-bottom: 3rem !important;
        /* Normal padding, no void */
    }

    /* Constrain the curved line (SVG or Div) so it doesn't stretch past the content */
    .timeline-line,
    .experience-line,
    .timeline-svg,
    .timeline-nodes,
    svg.curve-line {
        height: 100% !important;
        max-height: 100% !important;
    }

    /* 1. Hide the complex desktop SVG curve entirely on mobile */
    .timeline-line svg,
    svg.curve-line,
    .timeline-svg svg {
        display: none !important;
    }

    /* 2. Force the main wrapper into a vertical Flex column */
    .experience-list,
    .education-list,
    .timeline-container,
    .timeline-nodes {
        display: flex !important;
        flex-direction: column !important;
        gap: 3rem !important;
        /* Forces physical space between the jobs! */
        position: relative !important;
        height: auto !important;
        padding-left: 20px !important;
        padding-bottom: 2rem !important;
    }

    /* 3. Strip absolute positioning from the individual job items so they obey Flexbox */
    .experience-item,
    .timeline-item,
    .education-item,
    .timeline-node {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        /* Kills any lingering GSAP translations causing overlap */
        width: 100% !important;
        margin: 0 !important;
    }

    /* 4. Create a simple, robust straight CSS line for mobile */
    .experience-list::before,
    .education-list::before,
    .timeline-nodes::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 2px;
        background: var(--text-muted);
        opacity: 0.3;
    }

    /* Force GSAP's injected pin-spacers to collapse on mobile */
    .pin-spacer {
        padding-bottom: 0 !important;
        padding-top: 0 !important;
        height: auto !important;
        min-height: 0 !important;
    }

    /* Ensure the Education section explicitly stops stretching */
    .education-section,
    .edu-section,
    .education-list {
        height: auto !important;
        min-height: max-content !important;
        margin-bottom: 0 !important;
        padding-bottom: 3rem !important;
        /* Normal padding to reach Certificates */
    }
}

/* ═══════════════════════════════════════════════════════════
   APEX ARCHITECTURAL PRELOADER — Parametric Shard & Tension Line
   ═══════════════════════════════════════════════════════════ */
#apex-preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: transparent;
  pointer-events: none;
  perspective: 1500px;
}

/* The Premium Matte Finish (SVG Base64 Noise) */
.apex-noise {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0.06;
  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.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* The 4 Architectural Columns */
.shard-container {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 1;
  transform-style: preserve-3d;
}

.shard {
  flex: 1;
  height: 100vh;
  background: linear-gradient(180deg, #070707 0%, #000000 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: inset -10px 0 30px rgba(0,0,0,0.5);
  will-change: transform;
  transform-origin: center;
}
.shard:last-child {
  border-right: none;
  box-shadow: none;
}

/* Content overlay — sits above shards */
.apex-content {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* ── Corner metadata ──────────────────────────────────────── */
.apex-meta {
  position: absolute;
  z-index: 10;
  font-family: 'Manrope', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  color: rgba(235, 233, 225, 0.4); /* Forced light color */
  text-transform: uppercase;
  opacity: 0;
}

.apex-meta--tl {
  top: 3rem;
  left: 3.5rem;
}

.apex-meta--br {
  bottom: 3rem;
  right: 3.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.apex-divider {
  opacity: 0.2;
}

/* ── Premium Greeting ────────────────────────────────────── */
.apex-greeting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  position: relative;
  z-index: 2;
  perspective: 800px;
}

.greet-line {
  overflow: hidden;
  line-height: 1.2;
}

.greet-line.large {
  margin-block: 0.4rem;
}

.greet-line.large .g-text {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(6rem, 12vw, 12rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #EBE9E1; /* Forced light color */
  text-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.greet-line.small .g-text,
.greet-line.subtitle .g-text {
  font-family: 'Manrope', sans-serif;
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  color: rgba(235, 233, 225, 0.4); /* Forced light color */
  text-transform: uppercase;
}

.g-text {
  display: inline-block;
  will-change: transform, opacity, filter;
}

/* ── The central geometric tension line ───────────────────── */
.tension-line {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #CBA365, #ffffff, #CBA365, transparent);
  box-shadow: 0 0 20px #CBA365, 0 0 40px rgba(203, 163, 101, 0.4);
  opacity: 0;
}

/* ── Kinetic Brand Typography ─────────────────────────────── */
.brand-reveal {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-top: 1.5rem;
  overflow: visible;
  perspective: 800px;
}

.char-wrap {
  overflow: visible;
  display: inline-block;
  line-height: 1;
}

.char {
  display: inline-block;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1rem, 2vw, 1.6rem);
  font-weight: 400;
  letter-spacing: 0.6em;
  text-transform: uppercase;
  color: #EBE9E1; /* Forced light color */
  will-change: transform, opacity, filter;
}

/* ── Role subtitle ────────────────────────────────────────── */
.apex-role-wrap {
  overflow: hidden;
  line-height: 1;
  margin-top: 1rem;
}

.apex-role {
  font-family: 'Manrope', sans-serif;
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(235, 233, 225, 0.35); /* Forced light color */
  margin: 0;
  text-indent: 0.4em;
}

body.locked { overflow: hidden !important; }