/* * ============================================================
 * THE "I HATE BROWSER DEFAULTS" STYLESHEET
 * Because every browser has a different opinion on what
 * "margin: 0" actually means.
 * ============================================================
 */

/* Nuke the box model. If I say 100px, I mean 100px. */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* --- THE "MY RETINA DISPLAY LOOKS BETTER THAN YOURS" PALETTE --- */
    
    /* Core Voids */
    --bg-main: #111827;           /* The color of my soul after 3 AM debugging */
    --bg-overlay: rgba(17, 24, 39, 0.95); /* Hiding the mess underneath */
    --bg-glass: rgba(17, 24, 39, 0.85);   /* Frosty, like the client's feedback */
    --bg-dim: rgba(17, 24, 39, 0.4);      /* Dimming the lights for drama */
    
    /* Text Colors */
    --text-primary: #f3f4f6;      /* White, but not #FFF because that hurts my eyes */
    --text-secondary: #94a3b8;    /* Important, but not "H1" important */
    --text-muted: #cbd5e1;        /* Lorem Ipsum placeholder until copy arrives */
    --text-copyright: #6b7280;    /* The fine print nobody reads */
    
    /* UI Elements */
    --ui-border-light: rgba(255, 255, 255, 0.1);  /* Barely there, like my patience */
    --ui-border-hover: rgba(255, 255, 255, 0.3);  /* Ooh, you touched it */
    --ui-bg-light: rgba(255, 255, 255, 0.02);     /* Ghost button background */
    --ui-scrollbar-track: #1f2937;
    --ui-scrollbar-thumb: #4b5563;
    
    /* The Brand (Do not touch or the Art Director will scream) */
    --accent-primary: #30FFC1;    /* That specific radioactive cyan */
    
    /* --- Z-INDEX WARS (The Layer Cake of Doom) --- */
    --z-background: 1;      /* The wallpaper */
    --z-base: 10;           /* The floor */
    --z-content: 20;        /* The furniture */
    --z-fixed-ui: 50;       /* Things that stick to your face */
    --z-modal: 55;          /* "Look at me!" overlays */
    --z-controls: 100;      /* Buttons I need you to click */
    --z-hero-overlay: 60;   /* Hero heading floating over the 3D scene */
    --z-loader: 10000;      /* Hiding the heavy assets loading time */
    --z-tutorial: 10001;    /* RTFM layer */
    --z-tutorial-top: 10005;/* Click here to escape the RTFM layer */
    --z-god-mode: 20000;    /* The Chaos Gimmick overrides all */

    --scroll-behavior: auto; /* Let JS handle the smooth stuff */
}
        
body {
    font-family: 'Raleway', sans-serif; /* Because Helvetica was too mainstream */
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow: hidden; /* Scrolljacking initiated. Sorry not sorry. */
    touch-action: none; /* No zooming allowed. This isn't a map. */
    width: 100vw; height: 100vh; /* The mobile address bar is my enemy */
}
@media (max-width: 768px) {
    body { touch-action: pan-y; }
}
body.nav-menu-open {
    overflow: hidden;
}

/* --- UTILITIES (Because writing styles inline is a sin) --- */
.hidden { display: none !important; }
.svg-hidden { position: absolute; height: 0; width: 0; /* Sneaky SVG definitions */ }
.text-center { text-align: center; }
.flex-center-col { display: flex; flex-direction: column; align-items: center; justify-content: center; } /* The holy grail of centering */
.flex-grow { flex-grow: 1; }
.mt-1 { margin-top: 0.25rem; }
.mr-1 { margin-right: 0.25rem; }

/* --- UI BUTTONS (Floating ghosts) --- */
.ui-btn {
    position: fixed; 
    z-index: var(--z-controls);
    color: var(--text-secondary);
    background: transparent; border: none;
    font-size: 1.25rem; padding: 0.5rem;
    transition: all 0.3s ease; /* Smooth like butter */
    cursor: pointer;
}
.ui-btn.top-right { top: 1.5rem; right: 1.5rem; }
.ui-btn:hover { color: white; transform: scale(1.1); /* "Click me" dance */ }
.ui-faded-out { opacity: 0 !important; pointer-events: none !important; /* Go away, but stay in DOM */ }
.hide-toggle-btn { opacity: 0; pointer-events: none; }

/* --- PRELOADER (Please wait while I download 30MB of textures) --- */
#preloader {
    position: fixed; inset: 0; 
    z-index: var(--z-loader); 
    background-color: var(--bg-main);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.8s ease-out, visibility 0.8s;
}
.preloader-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-content { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
#preloader-progress {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    font-weight: 600;
}

/* --- FLASH OVERLAY (The seizure warning section) --- */
#flash-overlay {
    position: fixed; inset: 0; 
    z-index: var(--z-god-mode);
    background-color: transparent;
    display: block; opacity: 0; visibility: hidden; pointer-events: none;
    overflow: hidden; transition: opacity 0.2s ease-out;
}
#flash-overlay.active { opacity: 1; visibility: visible; transition: none; }

.chaos-text {
    position: absolute; white-space: pre-wrap; text-align: center;
    line-height: 0.9; user-select: none; pointer-events: none;
    text-shadow: 3px 3px 0px #000000; padding: 0.5rem; box-sizing: border-box;
}

/* ==========================================
   CHAOS MODE (When the user breaks the rules)
   ========================================== */

#flash-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 9000; 
    pointer-events: none; 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.1s ease-in-out, visibility 0.1s; 
    overflow: hidden; 
}

#flash-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Stop clicking, you maniac */
}

/* The random text screaming at you */
.chaos-text {
    position: absolute; 
    white-space: pre-wrap; 
    text-align: center;
    line-height: 1;
    font-size: 3rem; 
    padding: 5px;
    box-sizing: border-box;
    animation: chaos-glitch 0.2s infinite alternate; /* Shake it like a polaroid */
    text-shadow: 2px 2px 0px #000;
}

@keyframes chaos-glitch {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    50% { transform: translate(-1px, -1px) rotate(0.5deg); }
    100% { transform: translate(0px, 0px) rotate(-0.5deg); }
}

/* The big text in the middle */
#flash-overlay .chaos-text:first-child {
    animation: chaos-glitch-main 0.1s infinite alternate; 
    text-shadow: 8px 8px 0px #000, -8px -8px 0px #FFF; 
}

@keyframes chaos-glitch-main {
    0% { transform: translate(-50%, -50%) skew(0deg, 0deg); }
    25% { transform: translate(-50% + 5px, -50% - 5px) skew(1deg, -0.5deg); }
    75% { transform: translate(-50% - 5px, -50% + 5px) skew(-1deg, 0.5deg); }
    100% { transform: translate(-50%, -50%) skew(0deg, 0deg); }
}

/* --- INSTRUCTION OVERLAY (RTFM) --- */
#instruction-overlay {
    position: fixed; inset: 0; 
    z-index: var(--z-tutorial);
    background-color: var(--bg-dim);
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); /* Safari needs the prefix because Safari */
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
}
#instruction-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }

.instruction-content { max-width: 600px; padding: 2rem; text-align: center; color: white; }
.instruction-icon-large {
    display: block; width: 60px; height: 60px; margin: 0 auto 1.5rem;
    background-image: url('https://mook.gr/wp-content/uploads/2025/12/multi-directional1x.svg');
    background-size: contain; background-repeat: no-repeat; background-position: center;
    transform: scale(1.1);
}
.instruction-text {
    font-family: 'Raleway', sans-serif; font-size: 1.125rem; font-weight: 400; line-height: 1.6;
    margin-bottom: 2.5rem; 
}
.btn-understand-wrapper { 
    position: relative; 
    z-index: var(--z-tutorial-top); 
    display: inline-block; 
}
.btn-understand { 
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.5rem; 
    border: 1px solid var(--ui-border-hover);
    background: rgba(255,255,255,0.1); 
    border-radius: 2px; cursor: pointer;
    color: white; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.85rem;
    transition: all 0.3s ease; 
}
.btn-understand:hover { background: rgba(255,255,255,0.25); transform: translateY(-2px); border-color: white; }


/* --- MAIN LAYOUT (The actual website, finally) --- */
#main-content {
    display: flex; flex-direction: column; width: 100vw; height: 700vh; /* Yes, 700vh. Fight me. */
    overflow: hidden; transition: transform 0.8s cubic-bezier(0.5, 0, 0.5, 1);
    will-change: transform; /* Hint to the browser: "Get ready, it moves." */
}

.section-container { height: 100vh; width: 100vw; flex-shrink: 0; position: relative; display: flex; flex-direction: column; }
.section-container { opacity: 0.5; transition: opacity 0.6s ease; }
.section-container.active-section { opacity: 1; }

#s-0 { 
    z-index: var(--z-base); 
    overflow: hidden; justify-content: center; align-items: center; padding: 2rem; background-color: var(--bg-main); 
}
.hero-overlay-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    pointer-events: none;
    z-index: var(--z-hero-overlay);
}
.hero-overlay-text::after { content: ''; display: none; } /* Calm down lint tools; this line only exists to spook DOM voyeurs. */
.hero-overlay-heading {
    font-family: 'Raleway', sans-serif;
    font-size: clamp(0.85rem, 1.6vw, 1.8rem);
    font-weight: 800;
    text-align: center;
    line-height: 1.25;
    color: var(--text-primary);
    letter-spacing: 0.03em;
    max-width: 620px;
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}
.hero-overlay-heading { margin: 0 0.75rem; }

.hero-tip-wrapper {
    position: absolute;
    bottom: calc(7rem + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: min(90vw, 520px);
    z-index: var(--z-hero-overlay);
    pointer-events: none;
}
.hero-tip-wrapper .bio-tip-text { margin-bottom: 0; }
.hero-tip-wrapper .bio-tip-text { margin-left: auto; margin-right: auto; }
.bio-tip-text .tip-line { display: block; }

@media (max-width: 768px) {
    .hero-overlay-text { padding: 0 1.5rem; }
    .hero-overlay-heading {
        font-size: 1.5rem;
        max-width: 90%;
        margin: 0 auto;
    }
}
#s-0 .hero-scroll-btn {
    position: absolute;
    left: 50%;
    bottom: calc(2rem + env(safe-area-inset-bottom, 0px)); /* Raised it slightly */
    transform: translate3d(-50%, 0, 0);
    z-index: var(--z-content);
    
    /* NEW FLEX SETTINGS */
    display: flex;
    flex-direction: column; /* Stacks text on top of arrow */
    align-items: center;    /* Centers them horizontally */
    gap: 0.5rem;            /* Adds space between text and arrow */
    
    transition: transform 0.35s ease;
}

/* Ensure the arrow is pointing down correctly */
.hero-scroll-btn .dynamic-arrow {
    transform: translateY(0) rotate(90deg); /* Make sure it points down */
    margin: 0; /* Remove old margins */
}

/* Update the hover effect to move the arrow down, not the whole button */
#s-0 .hero-scroll-btn:hover .dynamic-arrow {
    transform: translateY(5px) rotate(90deg);
}
#s-0 .hero-scroll-btn:hover {
    transform: translate3d(-50%, 0, 0); /* Stop the button from moving left/right on hover */
}
.hero-scroll-btn {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0; border: none; background: none;
    color: white; font-size: 0.75rem; letter-spacing: 0.2em;
    text-transform: uppercase; font-weight: 700; cursor: pointer; 
    transition: color 0.3s ease;
}
.hero-scroll-btn .dynamic-arrow { width: 0.9rem; height: 0.9rem; transition: transform 0.3s ease; transform: translateY(0) rotate(90deg); }
.hero-scroll-btn:hover, .hero-scroll-btn:focus-visible { color: var(--accent-primary); outline: none; }
.hero-scroll-btn:hover .dynamic-arrow, .hero-scroll-btn:focus-visible .dynamic-arrow { transform: translateY(4px) rotate(90deg); }
.hero-orbit-btn {
    position: absolute; bottom: 2rem; right: 2rem; z-index: var(--z-content);
    display: flex; flex-direction: column; align-items: flex-end; gap: 0.1rem;
    padding: 0.6rem 1rem; border: 1px solid rgba(255,255,255,0.3); border-radius: 999px;
    background: rgba(17,24,39,0.75); color: white; font-size: 0.75rem; text-transform: uppercase;
    letter-spacing: 0.08em; font-weight: 700; cursor: pointer; transition: transform 0.3s, border-color 0.3s, background 0.3s;
}
.hero-orbit-btn .orbit-label-main { font-size: 0.75rem; }
.hero-orbit-btn .orbit-label-sub { font-size: 0.6rem; opacity: 0.7; }
.hero-orbit-btn.hidden { display: none; }
.hero-orbit-btn.active { background: rgba(48,255,193,0.15); border-color: rgba(48,255,193,0.7); }
.hero-orbit-btn:active { transform: scale(0.95); }

/* Parallax effects that confuse the eye */
#s-0::before {
    content: ''; position: absolute; inset: 0; 
    z-index: var(--z-background); 
    pointer-events: none;
    background-size: cover; background-position: center;
    transform: scale(1.05); transition: transform 1.2s cubic-bezier(0.5, 0, 0.5, 1);
    will-change: transform;
    box-shadow: inset 0 0 100px rgba(17, 24, 39, 0.9);
}
#s-0.parallax-active::before { transform: scale(1.05) translateY(-5%); }
#s-0.active-section::before { transform: scale(1.05) translateY(0); }

.intro-content { 
    position: relative; 
    z-index: var(--z-content); 
    width: 100%; max-width: 56rem; height: 100%; display: flex; flex-direction: column; justify-content: space-between; transition: opacity 0.5s ease-in-out; 
}

.hero-center { flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 0.5rem; }
.hero-bottom { display: flex; flex-direction: column; align-items: center; }

.scroll-down-btn {
    display: flex; flex-direction: column; align-items: center; margin-bottom: 4rem; 
    cursor: pointer; text-decoration: none; color: var(--accent-primary);
}
.scroll-down-btn span { font-size: 1.125rem; font-weight: 500; margin-bottom: 0.25rem; transition: all 0.3s; }
.arrow-icon { width: 1.5rem; height: 1.5rem; transition: transform 0.3s; }
.scroll-down-btn:hover .arrow-icon { transform: translateY(5px); }
.hero-subtitle { font-size: 1.5rem; color: var(--text-secondary); font-weight: 300; display: none; }

/* Section Branding Colors (Or: "Fifty shades of hex codes") */
.section-color-1 { --section-accent-color: #3B82F6; background-color: var(--bg-main); }
.section-color-2 { --section-accent-color: #EF4444; background-color: var(--bg-main); }
.section-color-3 { --section-accent-color: rgb(48, 255, 193); background-color: var(--bg-main); }
.section-color-4 { --section-accent-color: #F59E0B; background-color: var(--bg-main); }
.section-color-5 { --section-accent-color: #10B981; background-color: var(--bg-main); }
.section-color-6 { --section-accent-color: #A855F7; background-color: var(--bg-main); }
.section-title-text { color: var(--section-accent-color) !important; }

/* Bio Section (Narcissism container) — a safe space for dramatic monologues */
.bio-section { justify-content: center; align-items: center; padding: 2rem; padding-bottom: 4rem; }
.bio-section .intro-content { max-width: 640px; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: space-between; align-items: stretch; gap: 1.5rem; margin: 0 auto; }
.bio-content-stack { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; }
.bio-section .breathe-container { display: flex; justify-content: center; align-items: center; height: auto; margin-bottom: 0; }
.bio-intro-text { font-size: 1rem; color: var(--text-secondary); margin-bottom: 0; font-weight: 300; max-width: 42rem; margin-left: auto; margin-right: auto; line-height: 1.6; text-align: center; }

.bio-btn-wrapper { 
    margin-bottom: 0; 
    display: flex; 
    justify-content: center; 
    width: 100%; 
}
.bio-toggle-btn { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem !important; color: var(--accent-primary) !important; font-weight: 700; transition: 0.3s; }
.bio-tip-wrapper { width: 100%; display: flex; justify-content: center; padding-top: 2rem; }
.bio-tip-text {
    font-size: 0.7rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 480px;
    text-align: center;
    letter-spacing: 0.04em;
}
.keycap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6em;
    padding: 0.1em 0.45em;
    margin: 0 0.1rem;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.05);
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-primary);
}

/* Epilogue (The end is nigh) */
.epilogue-section { justify-content: center; align-items: center; flex-direction: column; padding: 2rem; text-align: center; min-height: 100vh; }
.spacer-top { flex-grow: 0; height: 1rem; }
.epilogue-section .intro-content {
    flex: 1;
    max-width: 75rem;
    width: 100%;
    padding: 0 2rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.epilogue-subtitle { 
    font-size: 1.25rem; 
    color: var(--text-secondary); 
    margin-bottom: 1rem; 
    font-weight: 500; 
    text-align: center; 
    width: 100%; 
    max-width: 46rem; 
    margin-left: auto; 
    margin-right: auto; 
}
.epilogue-logo { width: 30px; height: 30px; margin-bottom: 1rem; }
.logo-img-reset { width: 100%; height: 100%; object-fit: contain; }
.copyright-text { font-size: 0.75rem; color: var(--text-copyright); }
#epilogue-footer-content { display: flex; flex-direction: column; align-items: center; margin-bottom: 1rem; margin-top: auto; }

#btn-back-to-top {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.2rem 0.75rem; font-size: 0.65rem; 
    border: 1px solid transparent; background: none; color: var(--text-secondary);
    font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; transition: all 0.3s ease; 
    cursor: pointer; margin-top: 1rem; margin-bottom: 0.5rem;
}
#btn-back-to-top:hover { 
    background: rgba(48, 255, 193, 0.1); transform: translateY(-2px); border-color: rgba(48, 255, 193, 0.3); color: var(--accent-primary); 
}

/* --- HORIZONTAL SCROLL (Swiping left and right like tinder) --- */
.horizontal-scroll-container {
    padding: 0 !important; width: 100%; overflow-x: scroll; 
    -webkit-overflow-scrolling: touch; /* iOS Momentum scrolling because Apple is special */
    scroll-snap-type: x mandatory; /* Snap to grid */
    height: 100vh; display: flex; touch-action: pan-x; flex-grow: 1;
}
body.section-scrolling .horizontal-scroll-container {
    pointer-events: none;
}
.horizontal-scroll-container::-webkit-scrollbar { height: 4px; }
.horizontal-scroll-container::-webkit-scrollbar-track { background: var(--ui-scrollbar-track); }
.horizontal-scroll-container::-webkit-scrollbar-thumb { background-color: var(--ui-scrollbar-thumb); border-radius: 2px; }

.work-item { flex: 0 0 100%; scroll-snap-align: start; height: 100%; position: relative; display: flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0; }
.project-background { height: 100%; width: 100%; position: absolute; top: 0; left: 0; background-size: cover; background-position: center; transition: background-image 0.5s ease-in-out;}
.project-background { transform: scale(1); transition: background-image 0.5s ease-in-out; background-position: center; }
.project-embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: none;
    z-index: 2;
}
.project-embed.is-interactive { display: block; }
.project-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    pointer-events: none;
}
.project-embed.is-interactive iframe { pointer-events: auto; }
.experiment-toggle {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 999px;
    background: rgba(0,0,0,0.2);
}
.experiment-toggle:hover { color: white; border-color: rgba(255,255,255,0.6); }
.video-item { background: black; }
.project-video-wrapper { width: 100%; height: 100%; position: absolute; inset: 0; cursor: pointer; }
.project-video-wrapper:focus-visible {
    outline: 2px solid rgba(255,255,255,0.85);
    outline-offset: 6px;
}
.project-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.video-play-icon {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.25);
    transition: transform 0.3s ease, background 0.3s ease, opacity 0.2s ease;
    pointer-events: none;
}
.video-play-icon::before {
    content: '';
    width: 0; height: 0;
    border-left: 16px solid white;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    margin-left: 5px;
}
.video-item:hover .video-play-icon { transform: translate(-50%, -50%) scale(1.08); background: rgba(0,0,0,0.35); }
.project-video-wrapper.video-playing .video-play-icon { opacity: 0; }
.video-control-bar {
    position: absolute;
    left: 50%;
    bottom: clamp(1.2rem, 5vh, 2.75rem);
    transform: translateX(-50%);
    width: min(80%, 520px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 3;
}
.project-video-wrapper.video-playing .video-control-bar {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.video-control-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.4);
    background: rgba(0,0,0,0.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}
.video-control-icon {
    display: block;
    width: 0;
    height: 0;
    border-left: 14px solid #ffffff;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    margin-left: 3px;
    transition: all 0.2s ease;
}
.video-control-btn.is-playing .video-control-icon {
    width: 4px;
    height: 18px;
    border: none;
    border-top: 0;
    border-bottom: 0;
    border-left: 0;
    background: #ffffff;
    box-shadow: 8px 0 0 0 #ffffff;
    margin-left: 0;
}
.video-control-btn:focus-visible {
    outline: 2px solid rgba(255,255,255,0.7);
    outline-offset: 3px;
}
.video-control-btn:hover {
    transform: scale(1.05);
    border-color: var(--section-accent-color, #30FFC1);
    background: rgba(255,255,255,0.15);
}
.video-progress {
    flex: 1;
    cursor: pointer;
    outline: none;
}
.video-progress-track {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: rgba(255,255,255,0.25);
    position: relative;
    overflow: hidden;
}
.video-progress:focus-visible .video-progress-track {
    box-shadow: 0 0 0 2px rgba(255,255,255,0.6);
}
.video-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--section-accent-color, var(--accent-primary));
    box-shadow: 0 0 8px rgba(48,255,193,0.5);
}
.video-progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: inherit;
    transform: translate(50%, -50%);
    box-shadow: 0 0 6px rgba(48,255,193,0.6);
}

/* --- NAV PILLS (Because normal menus are boring) --- */
#vertical-nav { 
    position: fixed; left: 1.5rem; top: 1.5rem; 
    z-index: var(--z-fixed-ui); 
    padding: 0.35rem 0.35rem 0.35rem 1.2rem;
    transform: scale(1.25);
    transform-origin: top left;
    transition: opacity 0.5s ease-in-out, visibility 0.5s;
    display: flex; flex-direction: column; justify-content: center;
    --nav-logo-size: 22px;
    --nav-line-height: 22px;
    --nav-line-width: 2px;
    --nav-line-gap: 0.55rem;
    --nav-label-size: 0.55rem;
}
@media (min-width: 1024px) {
    #vertical-nav { transform: scale(1.25); transform-origin: top left; }
}
@media (min-width: 768px) {
    #vertical-nav {
        --nav-logo-size: 26px;
        --nav-line-height: 26px;
        --nav-label-size: 0.6rem;
    }
}
@media (min-width: 1024px) {
    #vertical-nav {
        --nav-logo-size: 30px;
        --nav-line-height: 30px;
        --nav-label-size: 0.65rem;
    }
}
.nav-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
#nav-items {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    background: #06080a;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow-y: auto;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    text-align: center;
    z-index: 9999;
}
#vertical-nav.nav-expanded #nav-items { display: flex; }
#vertical-nav.nav-expanded {
    z-index: 9999;
    transform: none;
    left: 0;
    top: 0;
    width: 100vw;
}

#vertical-nav.nav-expanded .nav-pill {
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: clamp(0.9rem, 3.5vw, 1.7rem);
    line-height: 1.1;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.85);
    height: auto;
    text-align: center;
    box-shadow: none;
}
#vertical-nav.nav-expanded .nav-pill-item:hover .nav-pill,
#vertical-nav.nav-expanded .nav-pill-item:focus-visible .nav-pill {
    color: var(--hover-color, var(--section-accent-color, var(--accent-primary)));
}
#vertical-nav.nav-expanded .nav-pill.active {
    background: transparent;
    box-shadow: none;
    color: var(--nav-active-accent, var(--accent-primary));
}
#vertical-nav.nav-expanded .nav-pill::before {
    display: none;
}
#vertical-nav.nav-expanded .nav-pill-item {
    width: auto;
    justify-content: center;
    align-items: center;
}
.nav-menu-logo { animation: navMenuFade 0.5s ease both; }
#vertical-nav.nav-expanded .nav-pill-item { animation: navItemIn 0.6s ease both; animation-delay: calc(var(--nav-index, 0) * 0.05s); }

@keyframes navMenuFade {
    from { opacity: 0; transform: translateY(-14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes navItemIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}


@media (prefers-reduced-motion: reduce) {
    .section-container,
    .project-background,
    .nav-menu-logo,
    #vertical-nav.nav-expanded .nav-pill-item,
    .nav-label-exit,
    .nav-label-enter {
        transition: none !important;
        animation: none !important;
    }
}
.nav-menu-logo {
    width: 40px;
    height: auto;
    opacity: 0.9;
    margin-bottom: 1.6rem;
}
body.nav-menu-open .fixed-footer-bar,
body.nav-menu-open #project-details-overlay,
body.nav-menu-open #main-content,
body.nav-menu-open #dynamic-footers-wrapper {
    display: none !important;
}
#nav-content-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
}
.nav-mobile-header { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-mobile-header-left { display: inline-flex; align-items: center; gap: 0.6rem; }
.nav-mobile-header-right { display: inline-flex; align-items: center; gap: 0.6rem; }
.nav-mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: var(--nav-label-size);
    padding: 0;
    border-radius: 999px;
    cursor: pointer;
    position: relative;
}
.nav-mobile-toggle-label {
    display: inline-block;
    transition: color 0.2s ease;
}
.nav-label-exit {
    animation: navLabelExit 0.18s ease forwards;
}
.nav-label-enter {
    animation: navLabelEnter 0.22s ease forwards;
}
@keyframes navLabelExit {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}
@keyframes navLabelEnter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.nav-mobile-toggle::before {
    content: '';
    width: var(--nav-line-width);
    height: var(--nav-line-height);
    border-radius: 999px;
    background: var(--mobile-section-color, var(--section-accent-color, var(--accent-primary)));
    margin-right: var(--nav-line-gap);
}
.nav-mobile-logo {
    display: inline-flex;
    height: var(--nav-logo-size);
    width: var(--nav-logo-size);
    margin-bottom: 0;
    opacity: 0.85;
    background-color: var(--section-accent-color, var(--accent-primary));
    -webkit-mask-image: var(--nav-logo-url);
    mask-image: var(--nav-logo-url);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    border: none;
    padding: 0;
}
.nav-menu-close-overlay {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.45rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
}
.nav-menu-close-overlay:hover { color: white; transform: scale(1.08); }
.nav-menu-close-overlay .dynamic-arrow { margin: 0; width: 1.6em; height: 1.6em; }
.nav-pill-item {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 2px 0 2px 0;
    width: 100%;
    cursor: pointer;
}
.nav-logo-btn { width: 26px; height: auto; opacity: 0.8; transition: transform 0.3s, opacity 0.3s; margin-bottom: 8px; display: block; }
.nav-pill-item:hover .nav-logo-btn { opacity: 1; transform: scale(1.1); }
.nav-pill {
    height: 12px; width: auto; background-color: rgba(255,255,255,0.08); border-radius: 2px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    color: var(--text-secondary); white-space: nowrap; margin-left: 0; --hover-color: var(--text-primary);
    padding: 0 6px; font-family: 'Raleway', sans-serif; font-weight: 600;
    font-size: 0.42rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7;
    position: relative;
}
.nav-pill-index { display: none; }
.nav-pill-label { display: inline; }
.nav-pill::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: var(--ui-scrollbar-thumb);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.25);
    transition: transform 0.35s ease, box-shadow 0.35s ease, background-color 0.35s ease;
}
.nav-pill-item:hover .nav-pill::before {
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 0 0 4px rgba(0,0,0,0.2), 0 0 10px rgba(255,255,255,0.25);
}
.nav-pill.active::before {
    background: var(--section-accent-color, var(--accent-primary));
    box-shadow: 0 0 0 4px rgba(0,0,0,0.18), 0 0 10px rgba(48,255,193,0.4);
}
.nav-pill-item:hover .nav-pill:not(.active) { 
    background-color: rgba(255,255,255,0.2);
    color: white; opacity: 0.9;
}
.nav-pill.active {
    height: 16px; padding: 0 8px; color: var(--bg-main);
    font-weight: 700; font-size: 0.52rem; letter-spacing: 0.06em; border-radius: 2px; 
    opacity: 1; background-color: var(--section-accent-color, var(--accent-primary));
}

@media (max-width: 1024px) {
    #s-0 .hero-overlay-text { display: flex; }
    #s-0 .hero-tip-wrapper { display: none; }
    #vertical-nav {
        left: 0;
        right: 0;
        top: 0.75rem;
        bottom: auto;
        transform: scale(1);
        padding: 0.5rem 0.9rem;
        background: transparent;
        border-radius: 0;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
        width: 100%;
    }
    #nav-content-wrapper {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
    }
    #nav-items {
        flex-direction: column;
        align-items: center;
        gap: 0.3rem;
    }
    .nav-mobile-toggle {
        display: inline-flex;
        background: transparent;
        border: none;
        padding: 0;
        align-self: center;
        gap: 0;
    }
    .nav-mobile-toggle::before {
        height: 22px;
    }
    .nav-mobile-header {
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    .nav-mobile-header-left {
        display: inline-flex;
        align-items: center;
        gap: 0.6rem;
    }
    .nav-mobile-header-right {
        display: inline-flex;
        align-items: center;
        gap: 0.6rem;
    }
    .nav-mobile-logo {
        display: block;
        align-self: center;
        margin: 0;
    }
    .nav-logo-btn {
        display: none;
    }
    .nav-pill-item {
        padding: 0;
    }
    .nav-pill {
        height: 26px;
        width: auto;
        padding: 0 12px;
        font-size: 0.55rem;
        letter-spacing: 0.16em;
        background-color: rgba(255,255,255,0.12);
        border-radius: 999px;
        opacity: 0.85;
    }
    .nav-pill::before {
        display: none;
    }
    .nav-pill.active {
        height: 28px;
        width: auto;
        background-color: var(--section-accent-color, var(--accent-primary));
        box-shadow: 0 0 12px rgba(48,255,193,0.35);
    }
    .nav-pill-index { display: none; }
    .nav-pill-label { display: inline; }
    #ui-toggle-btn {
        position: static;
        padding: 0;
    }
}

/* --- FOOTER (Floating text that breaks on small screens) --- */
.fixed-footer-bar {
    position: fixed; bottom: 0; left: 0; right: 0; 
    z-index: var(--z-fixed-ui);
    background-color: var(--bg-glass); backdrop-filter: blur(10px);
    padding: 1.25rem 1.5rem; height: auto; 
    display: flex; flex-direction: row; align-items: center; justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.05);
    width: 100vw; transition: opacity 0.5s ease;
}

@media (min-width: 768px) {
    .fixed-footer-bar {
        width: 480px; border-radius: 2px; border: 1px solid rgba(255,255,255,0.05);
        bottom: 1.5rem; left: 1.5rem; padding-left: 34px; padding-right: 1.5rem; 
    }
    
    /* Move the button so it doesn't overlap my dreams */
    .fixed-footer-bar .gallery-toggle-btn {
        margin-top: 1.5rem; 
    }
}

.footer-text-col { display: flex; flex-direction: column; align-items: flex-start; width: 70%; }
.footer-nav-col { display: flex; align-items: center; justify-content: flex-end; height: 100%; }

.gallery-toggle-btn {
    font-size: 0.75rem; font-weight: 500; letter-spacing: 0.05em;
    text-transform: uppercase; color: var(--section-accent-color) !important;
    transition: color 0.3s; background: none; border: none; cursor: pointer; display: flex; align-items: center; gap: 0.25rem;
}
.gallery-toggle-btn.details-disabled {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}
.gallery-toggle-btn:hover { color: white !important; }

.footer-title { font-size: clamp(0.9rem, 2.5vw, 1.4rem); line-height: 1.1; font-weight: 700; color: white; margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: -0.025em; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.footer-desc { font-size: clamp(0.6rem, 1.2vw, 0.8rem); line-height: 1.4; color: var(--text-secondary); font-weight: 500; min-height: 2.8em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 0; width: 100%; }

.nav-controls-container {
    display: flex; align-items: center; gap: 0.75rem;
    font-family: 'Raleway', sans-serif; font-size: 0.9rem; font-weight: 700;
    color: var(--section-accent-color);
}
.nav-arrow-btn {
    padding: 8px; font-size: 1.5rem; opacity: 0.7; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer; color: inherit;
}
.nav-arrow-btn:hover { opacity: 1; transform: scale(1.1); }
.nav-counter { letter-spacing: 0.05em; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; white-space: nowrap; }
.counter-divider { opacity: 0.5; margin: 0 4px; }
.active-nav-num { color: white !important; transition: color 0.2s; }

/* --- DETAILS OVERLAY (The modal I swore I'd never build) --- */
#project-details-overlay {
    position: fixed; inset: 0; 
    z-index: var(--z-modal);
    background-color: var(--bg-overlay);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    display: block;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem;
    overflow-y: auto;
}
#project-details-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }

#project-details-overlay.cv-mode { padding-top: 6rem; }
#project-details-overlay.cv-mode .details-images-col { display: none !important; }
#project-details-overlay.cv-mode .details-container { grid-template-columns: 1fr; max-width: 900px; display: block; height: auto; max-height: none; overflow: visible; padding-bottom: 6rem; margin: 0 auto; }
#project-details-overlay.cv-mode .detail-main-title, #project-details-overlay.cv-mode .detail-separator { display: none; }

.details-container {
    width: 100%; max-width: 1200px;
    display: grid; grid-template-columns: 1fr; gap: 2rem;
    margin: 4rem auto; padding-bottom: 6rem;
}
@media (min-width: 1024px) {
    .details-container { grid-template-columns: 1.2fr 0.8fr; gap: 4rem; align-items: flex-start; }
}
.detail-description-block { width: 100%; }
.detail-description-block.hidden { display: none; }
@media (min-width: 1024px) {
    .detail-description-block { grid-column: 2; }
}
@media (max-width: 768px) {
    .details-container { display: flex; flex-direction: column; }
    .details-text-col { order: 1; }
    .details-images-col { order: 2; }
    .detail-description-block { order: 3; }
}

.details-images-col { display: flex; flex-direction: column; gap: 1.5rem; }
.detail-images-list { display: flex; flex-direction: column; gap: 1.5rem; width: 100%; }
.details-images-col::-webkit-scrollbar,
.details-text-col::-webkit-scrollbar { width: 0; height: 0; } /* disable nested scrollbars */

#project-details-overlay::-webkit-scrollbar {
    width: 6px;
}
#project-details-overlay::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 999px;
}
#project-details-overlay::-webkit-scrollbar-thumb {
    background: var(--section-accent-color, var(--accent-primary));
    border-radius: 999px;
}
#project-details-overlay::-webkit-scrollbar-thumb:hover {
    background: rgba(48,255,193,0.9);
}
#project-details-overlay {
    scrollbar-width: thin;
    scrollbar-color: var(--section-accent-color, var(--accent-primary)) rgba(255,255,255,0.08);
}

.detail-img { width: 100%; height: auto; border-radius: 2px; object-fit: contain; box-shadow: 0 10px 30px rgba(0,0,0,0.3); border: 1px solid var(--ui-border-light); }
.detail-video { width: 100%; border-radius: 2px; border: 1px solid var(--ui-border-light); background: black; box-shadow: 0 10px 30px rgba(0,0,0,0.3); margin-bottom: 1.5rem; }
.details-text-col { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; color: var(--text-primary); padding-right: 1rem; gap: 1.25rem; width: 100%; }
#detail-content-area { width: 100%; }
.detail-meta-wrapper { width: 100%; margin: 0; }
.detail-meta { margin: 0; display: flex; flex-direction: column; gap: 1rem; width: 100%; }
.detail-meta-block { width: 100%; }
.detail-separator { width: 60px; height: 4px; background-color: var(--section-accent-color, var(--accent-primary)); margin: 0; }
.detail-separator-top { margin: 0 0 2rem; }
.meta-separator { background-color: var(--section-accent-color, var(--accent-primary)); margin: 1.5rem 0 1.25rem; opacity: 1; }
.details-text-col::-webkit-scrollbar-thumb { background: var(--section-accent-color, var(--accent-primary)); }
.details-text-col::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.detail-main-title { font-family: 'Raleway', sans-serif; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 800; line-height: 1; text-transform: uppercase; margin-bottom: 1.5rem; color: white; }
.detail-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; color: var(--text-secondary); margin-bottom: 0.25rem; display: block; }
.detail-value { font-size: 1rem; font-weight: 400; color: white; }
.detail-description { font-family: 'Raleway', sans-serif; font-size: 1rem; line-height: 1.7; font-weight: 300; color: var(--text-muted); max-width: 600px; margin: 3rem 0 0; }
.detail-cta { margin-top: 1.75rem; }
.detail-cta-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.75rem 1.1rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--section-accent-color, var(--accent-primary)) 55%, white 45%);
    background: rgba(0,0,0,0.25);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.detail-cta-label { font-size: 0.75rem; }
.detail-cta-sub { font-size: 0.6rem; letter-spacing: 0.12em; color: var(--text-secondary); }
.detail-cta-btn:hover { color: white; }

/* --- CV / BIO (The Resume Section) --- */
.cv-header { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; margin-bottom: 3rem; padding-bottom: 1rem; border-bottom: 1px solid var(--ui-border-light); /* resume couture for bored inspectors */ }
.cv-header img { width: 70px; height: auto; }
.cv-header > div { text-align: left; }
.cv-header h1 { font-family: 'Raleway', sans-serif; font-size: 2rem; font-weight: 900; letter-spacing: 0.05em; color: white; line-height: 1; margin-bottom: 0.25rem; }
.cv-split-container { display: grid; grid-template-columns: 1fr; gap: 4rem; padding-bottom: 4rem; }
@media (min-width: 1024px) { 
    .cv-split-container { grid-template-columns: 0.8fr 1.2fr; gap: 5rem; } 
    .cv-sidebar { position: sticky; top: 0; }
}
.cv-sidebar { display: flex; flex-direction: column; gap: 3rem; text-align: left; }
.cv-skills-group { display: flex; flex-direction: column; gap: 0.75rem; }
.cv-skills-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cv-print-wrapper { margin-top: 1.25rem; }
.cv-print-mobile { display: none; }
.cv-print-btn {
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
    color: white;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    padding: 0.35rem 1rem;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}
.cv-print-btn:hover { background: rgba(255,255,255,0.2); color: var(--bg-main); }
.cv-skill-pill {
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.25rem 0.9rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    white-space: nowrap;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
}
.cv-intro-block h3 { font-size: 1.5rem; font-weight: 800; color: white; margin-bottom: 1rem; line-height: 1.2; }
.cv-intro-text { font-size: 0.95rem; line-height: 1.7; color: var(--text-muted); font-weight: 400; }
.cv-section-title { font-size: 0.75rem; font-weight: 800; color: var(--section-accent-color, #30FFC1); text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 2.5rem; margin-top: 3rem; border-bottom: 1px solid var(--ui-border-light); padding-bottom: 0.5rem; display: block; }
.cv-list-item { display: grid; grid-template-columns: 1fr; gap: 0.5rem; margin-bottom: 2rem; }
.cv-list-date { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); font-family: 'Raleway', sans-serif; letter-spacing: 0.05em; opacity: 0.9; }
.cv-list-title { font-size: 1.1rem; font-weight: 700; color: white; line-height: 1.3; }
.cv-list-sub, .cv-list-item .cv-exp-desc { font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; }
.cv-exp-item { display: grid; grid-template-columns: 1fr; gap: 0.5rem; margin-bottom: 3rem; position: relative; }
@media (min-width: 768px) {
    .cv-exp-item,
    .cv-list-item { grid-template-columns: 130px 1fr; gap: 2rem; }
}
.cv-exp-date { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); font-family: 'Raleway', sans-serif; padding-top: 5px; letter-spacing: 0.05em; }
.cv-exp-role { font-size: 1.25rem; font-weight: 800; color: white; margin-bottom: 0.25rem; }
.cv-exp-company { font-size: 1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.75rem; }
.cv-exp-desc { font-size: 0.9rem; line-height: 1.6; color: var(--text-muted); font-weight: 400; opacity: 0.9; }
.cv-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cv-tag { font-size: 0.7rem; padding: 0.3rem 0.6rem; border: 1px solid rgba(255,255,255,0.15); border-radius: 2px; color: var(--text-muted); background: var(--ui-bg-light); }

#mookcontainer { position: relative; display: flex; justify-content: center; align-items: center; margin: 0 auto; width: 100%; max-width: 950px; height: 200pt; color: #f3f4f6; filter: url(#threshold) blur(0.6px); }
#mooklogo { position: absolute; display: block; width: 200px; height: 200px; top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: 100%; filter: none; }
#mooktext1, #mooktext2 { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: 'Raleway', sans-serif; font-size: 10rem; font-weight: 900; text-align: center; line-height: 1; user-select: none; }

#epilogue-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 2.5rem;
    width: 100%;
    max-width: 1100px;
    min-height: 180pt;
    color: #f3f4f6;
    filter: url(#threshold-epilogue) blur(0.6px);
    padding: 0 1rem;
}

#epilogue-text1, #epilogue-text2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Raleway', sans-serif;
    font-size: clamp(3rem, 14vw, 10.5rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    text-align: center;
    line-height: 1;
    user-select: none;
}

#epilogue-text2 {
    filter: blur(50px);
    opacity: 0;
}

#epilogue-text1 {
    filter: blur(50px);
    opacity: 0;
}


@media (max-width: 767px) {
    #mooktext1, #mooktext2 { font-size: 3rem; }
    #mookcontainer { height: 6rem; }
    #mooklogo { width: 80px; height: 80px; } 
    #epilogue-container { min-height: 110pt; margin-bottom: 1.5rem; padding: 0 1.25rem; }
    #epilogue-text1, #epilogue-text2 { font-size: clamp(2rem, 12vw, 4.5rem); }
    .epilogue-section .intro-content { padding: 0 1.25rem; }
    .footer-title { font-size: 1.2rem; }
    .footer-desc { margin-bottom: 0.85rem; }
    .fixed-footer-bar .gallery-toggle-btn { margin-top: 0.55rem; }
    .cv-print-desktop { display: none; }
    .cv-print-mobile { display: block; margin-top: 1.25rem; text-align: center; }
    .cv-print-mobile .cv-print-btn {
        font-size: 0.95rem;
        padding: 0.7rem 1.8rem;
        width: 100%;
    }
}

@page { margin: 0.5in 0.6in 0.6in 0.6in; }

@media print {
    body.print-bio { background: #fff !important; color: #000 !important; }
    body.print-bio > *:not(#project-details-overlay) { display: none !important; }
    body.print-bio #project-details-overlay {
        display: block !important;
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: #fff !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    body.print-bio #project-details-overlay .details-container {
        display: block !important;
        max-width: 100% !important;
        width: 100% !important;
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    body.print-bio #project-details-overlay .details-images-col { display: none !important; }
    body.print-bio #project-details-overlay .details-text-col { padding: 0 !important; }
    body.print-bio .cv-split-container { display: block !important; }
    body.print-bio .cv-sidebar,
    body.print-bio .cv-main { width: 100% !important; background: #fff !important; position: static !important; }
    body.print-bio .cv-header { margin-bottom: 1.2rem !important; }
    body.print-bio .cv-intro-block { margin-bottom: 1.5rem !important; }
    body.print-bio .cv-sidebar,
    body.print-bio .cv-main,
    body.print-bio .cv-section-title,
    body.print-bio .cv-intro-text,
    body.print-bio .cv-exp-role,
    body.print-bio .cv-exp-company,
    body.print-bio .cv-exp-desc,
    body.print-bio .cv-list-title,
    body.print-bio .cv-list-date { color: #000 !important; border-color: #000 !important; }
    body.print-bio .cv-skill-pill { color: #000 !important; border-color: #000 !important; background: transparent !important; }
    body.print-bio .cv-header img { filter: grayscale(1); opacity: 0.8; }
    body.print-bio .cv-print-btn { display: none !important; }
    body.print-bio .cv-section-title { margin-top: 1.75rem !important; margin-bottom: 1rem !important; }
}

@media print {
    .cv-header,
    .cv-intro-block,
    .cv-section-title,
    .cv-skills-group,
    .cv-exp-item,
    .cv-list-item,
    .cv-skills-list,
    .cv-skill-pill {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    body.print-bio .cv-sidebar { margin-bottom: 1.5rem !important; }
    body.print-bio .cv-section-title { margin-top: 2rem !important; }
}

@font-face { font-family: 'TheFont'; src: url("https://garet.typeforward.com/assets/fonts/shared/TFMixVF.woff2") format('woff2'); }
.breathe-container { display: flex; align-items: center; justify-content: center; height: 20vh; margin-bottom: 2rem; }
.breathe-container span { font-family: 'TheFont'; font-size: clamp(4vw, 8vw, 12vh); color: white; text-align: center; animation: letter-breathe 3s ease-in-out infinite; }
@keyframes letter-breathe { from, to { font-variation-settings: 'wght' 100; } 50% { font-variation-settings: 'wght' 900; } }

/* --- INSTRUCTION TEXT LOGIC --- */
.desktop-text { display: none; }
.mobile-text { display: block; }
@media (min-width: 1024px) {
    .desktop-text { display: block; }
    .mobile-text { display: none; }
}

/* --- ACCESSIBILITY FIXES (Because we care, mostly) --- */
/* Resets default button styles for the navigation items */
button.nav-pill-item {
    background: transparent;
    border: none;
    text-align: left;
    font-family: inherit; /* buttons don't inherit fonts by default */
    padding: 2px 0; /* Maintain original padding */
    width: 100%;
}

/* --- NEW: BABYLON.JS CANVAS SETUP (The Heavy Lifter) --- */
#renderCanvas {
    width: 100%;
    height: 100%;
    touch-action: none; 
    position: absolute; 
    top: 0; left: 0;
    z-index: var(--z-content); 
}
@media (max-width: 768px) {
    #renderCanvas { touch-action: pan-y; }
}

/* ======================================================= */
/* SVG MASKING MAGIC (How to color icons without pain)    */
/* ======================================================= */

/* The magic trick: Use a mask so the icon takes the text color */
.dynamic-arrow {
    display: inline-block;
    width: 0.9em;  /* Tiny, like my attention span */
    height: 0.9em;
    vertical-align: middle;
    margin-right: 0.4rem; 
    
    background-color: currentColor; /* The holy grail: inherits color from parent */
    
    /* Standard mask properties */
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}

/* Loading the specific SVGs (Absolute paths because relative ones betray you) */
.arrow-mask-right {
    -webkit-mask-image: url('https://mook-assets.pages.dev/images/arrow-right.svg');
    mask-image: url('https://mook-assets.pages.dev/images/arrow-right.svg');
}

.arrow-mask-left {
    -webkit-mask-image: url('https://mook-assets.pages.dev/images/arrow-left.svg');
    mask-image: url('https://mook-assets.pages.dev/images/arrow-left.svg');
}

/* --- FIX FOR CLOSE BUTTON (X) --- */
.mask-close {
    -webkit-mask-image: url('https://mook-assets.pages.dev/images/close.svg');
    mask-image: url('https://mook-assets.pages.dev/images/close.svg');
}

/* --- FIX FOR EYE TOGGLE (I see you) --- */
.mask-eye-open {
    -webkit-mask-image: url('https://mook-assets.pages.dev/images/open-eye.svg');
    mask-image: url('https://mook-assets.pages.dev/images/open-eye.svg');
}

.mask-eye-closed {
    -webkit-mask-image: url('https://mook-assets.pages.dev/images/closed-eye.svg');
    mask-image: url('https://mook-assets.pages.dev/images/closed-eye.svg');
}

/* Special centering logic for icon-only buttons */
.ui-btn .dynamic-arrow {
    margin: 0;
    width: 1.5em; /* Make it 25% Bigger (Was 1.2em, now 1.5em). You are welcome. */
    height: 1.5em;
}

/* --- NAVIGATION ARROWS (The project swipers) --- */

/* 1. Centering the mask */
.nav-arrow-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem; 
    height: 2rem;
    transition: all 0.2s ease;
    /* Color inherits from accent container */
}

/* 2. Sizing the mask */
.nav-arrow-btn .dynamic-arrow {
    width: 1.5rem; /* Big enough to tap */
    height: 1.5rem;
    margin: 0; 
    background-color: currentColor; /* Accent or White */
    
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}

/* 3. Counter Colors: Container is Accent, Active is White */
.nav-counter {
    color: currentColor; 
}
.active-nav-num {
    color: white !important; /* Stand out */
}

/* --- FIX FOR MISSING ARROW DOWN (The MacGyver Fix) --- */
/* Rotate arrow-right 90 degrees so we don't need a new file */
.mask-arrow-down {
    -webkit-mask-image: url('https://mook-assets.pages.dev/images/arrow-right.svg');
    mask-image: url('https://mook-assets.pages.dev/images/arrow-right.svg');
    transform: rotate(90deg);
}

/* Screen Reader Only (Hides visually but keeps it for Google/Screen Readers) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
#vertical-nav.nav-expanded .nav-mobile-header {
    display: flex;
}
