/* ==========================================================================
   Chris Theme - Desert Design System
   Australian outback-inspired, motion-ready design system
   ========================================================================== */

/* ==========================================================================
   1. Design Tokens (CSS Custom Properties)
   ========================================================================== */

:root {
    /* ---------- Colors ---------- */
    /* Primary - Bitcoin orange accent for CTAs and highlights */
    --color-accent: #F7931A;
    --color-accent-hover: #D9820F;
    --color-accent-light: rgba(247, 147, 26, 0.1);

    /* Neutrals - Sand and charcoal */
    --color-bg: #F5F0E8;
    --color-bg-alt: #EDE5D8;
    --color-bg-dark: #2D2D2D;
    --color-text: #2D2D2D;
    --color-text-soft: #4A4A4A;
    --color-text-muted: #6B6B6B;
    --color-text-on-dark: #F5F0E8;

    /* Desert accents */
    --color-warm: #D4A574;
    --color-sky: #87CEEB;
    --color-earth: #8B4513;
    --color-earth-light: rgba(139, 69, 19, 0.1);

    /* Borders */
    --color-border: rgba(45, 45, 45, 0.1);
    --color-border-strong: rgba(45, 45, 45, 0.2);

    /* ---------- Typography ---------- */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', SFMono-Regular, Consolas, monospace;

    /* Fluid type scale */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-lg: clamp(1.25rem, 1rem + 1vw, 1.5rem);
    --text-xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
    --text-2xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
    --text-3xl: clamp(2.5rem, 1.8rem + 3.5vw, 4rem);
    --text-hero: clamp(3rem, 2rem + 5vw, 6rem);

    /* Line heights */
    --leading-tight: 1.2;
    --leading-snug: 1.4;
    --leading-normal: 1.6;
    --leading-relaxed: 1.8;

    /* Font weights */
    --weight-normal: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;

    /* ---------- Spacing ---------- */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    --space-24: 6rem;     /* 96px */
    --space-32: 8rem;     /* 128px */

    /* ---------- Layout ---------- */
    --max-width: 1400px;
    --content-width: 720px;
    --wide-width: 1000px;

    /* ---------- Shadows ---------- */
    --shadow-sm: 0 2px 8px rgba(45, 45, 45, 0.06);
    --shadow-md: 0 8px 24px rgba(45, 45, 45, 0.08);
    --shadow-lg: 0 20px 40px rgba(45, 45, 45, 0.12);
    --shadow-xl: 0 32px 64px rgba(45, 45, 45, 0.16);
    --shadow-glow: 0 0 40px rgba(247, 147, 26, 0.2);

    /* ---------- Borders ---------- */
    --radius-sm: 0.25rem;  /* 4px */
    --radius-md: 0.5rem;   /* 8px */
    --radius-lg: 1rem;     /* 16px */
    --radius-xl: 1.5rem;   /* 24px */
    --radius-full: 9999px;

    /* ---------- Animation (from motion research) ---------- */
    --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);

    --duration-instant: 0.1s;
    --duration-fast: 0.15s;
    --duration-normal: 0.3s;
    --duration-slow: 0.5s;
    --duration-slower: 0.8s;

    --stagger-delay: 0.1s;

    /* Ghost custom fonts support */
    --gh-font-heading: var(--font-sans);
    --gh-font-body: var(--font-sans);
}

/* ==========================================================================
   2. Base / Reset
   ========================================================================== */

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

html {
    font-size: 16px;
    line-height: var(--leading-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior: none;
    -webkit-overscroll-behavior: none;
}

/* Lenis smooth scroll - required styles */
html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* Fallback smooth scroll when Lenis not active */
html:not(.smooth-scroll) {
    scroll-behavior: smooth;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}

/* Reduced motion class (set by JS) */
html.reduced-motion {
    scroll-behavior: auto !important;
}

html.reduced-motion *,
html.reduced-motion *::before,
html.reduced-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* Background on html allows fixed depth-map canvas to show through transparent body */
/* Dark background ensures no gap shows below footer */
html {
    background: var(--color-bg-dark, #1a1a1a);
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    color: var(--color-text);
    /* Transparent to allow depth-map canvas (z-index: -1) to show through */
    background: transparent;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport - adapts to mobile browser chrome changes */
    overscroll-behavior: none;
}

/* Depth-map canvas containers - fixed position, behind content
   Use 100lvh (largest viewport height) to prevent gaps when mobile browser chrome hides */
.hero__depth-canvas,
.claude-codes__depth-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;      /* Fallback for older browsers */
    height: 100lvh;     /* Largest viewport - always covers max height */
    pointer-events: none;
    z-index: -1;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--color-text);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

p {
    margin-bottom: var(--space-6);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
    color: var(--color-accent-hover);
}

strong, b {
    font-weight: var(--weight-semibold);
}

code, pre {
    font-family: var(--font-mono);
}

code {
    font-size: 0.875em;
    background: var(--color-bg-alt);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

pre {
    background: var(--color-bg-dark);
    color: var(--color-text-on-dark);
    padding: var(--space-6);
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-6);
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ==========================================================================
   4. Layout
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container--narrow {
    max-width: var(--content-width);
}

.container--wide {
    max-width: var(--wide-width);
}

/* ==========================================================================
   5. Components - Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    line-height: 1;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
}

.btn--primary {
    background: var(--color-accent);
    color: white;
}

.btn--primary:hover {
    background: var(--color-accent-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border-strong);
}

.btn--secondary:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-text);
    color: var(--color-text);
}

.btn--large {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
    border-radius: var(--radius-lg);
}

/* ==========================================================================
   6. Components - Cards
   ========================================================================== */

.card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card--interactive {
    cursor: pointer;
}

.card--interactive:hover {
    transform: translateY(-8px) perspective(1000px) rotateX(2deg);
}

.card__image {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.card__content {
    padding: var(--space-6);
}

.card__title {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

.card__description {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

/* ==========================================================================
   7. Site Header
   ========================================================================== */

.site-header {
    padding: var(--space-6) 0;
    position: relative;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

.site-title:hover {
    color: var(--color-accent);
}

.site-nav {
    display: flex;
    gap: var(--space-8);
}

.site-nav a {
    color: var(--color-text-soft);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    position: relative;
    transition: color var(--duration-fast) var(--ease-out);
}

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

.site-nav a:hover {
    color: var(--color-text);
}

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

/* ==========================================================================
   8. Site Main
   ========================================================================== */

.site-main {
    min-height: 70vh;
}

/* ==========================================================================
   9. Hero Section
   ========================================================================== */

.hero {
    position: relative;
    padding: var(--space-24) var(--space-6);
    text-align: center;
    overflow: hidden;
}

.hero--full {
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport - adapts to mobile browser chrome changes */
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__background {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero__layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    will-change: transform;
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: var(--wide-width);
    margin: 0 auto;
}

.hero__title {
    font-size: var(--text-hero);
    font-weight: var(--weight-bold);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-4);
    color: var(--color-text);
}

.hero__subtitle {
    font-size: var(--text-xl);
    color: var(--color-text-soft);
    font-weight: var(--weight-normal);
    margin-bottom: var(--space-8);
}

.hero__cta {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   9b. Hero Parallax (Desert Theme)
   ========================================================================== */

.hero--parallax {
    position: relative;
    z-index: 1; /* Ensure hero content stays above the depth-map canvas (z-index: -1) */
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Transparent to show depth-map canvas beneath */
    background: transparent;
    /* Initial state for scroll-captured choreography */
    clip-path: inset(0 0 0% 0);
    will-change: clip-path;
}

.hero--parallax .hero__background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero--parallax .hero__layer {
    position: absolute;
    inset: 0;
    will-change: transform;
}

.hero--parallax .hero__layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
}

/* Sky layer - sunset/clouds */
.hero__layer--sky {
    z-index: 1;
}

.hero__layer--sky img {
    object-position: center top;
}

/* Dunes layer - main desert landscape */
.hero__layer--dunes {
    z-index: 2;
}

.hero__layer--dunes img {
    object-position: center 60%;
}

/* Overlay for text readability */
.hero__layer--overlay {
    z-index: 3;
    background: linear-gradient(
        to bottom,
        rgba(45, 45, 45, 0.3) 0%,
        rgba(45, 45, 45, 0.1) 40%,
        rgba(45, 45, 45, 0.4) 100%
    );
}

/* Content layer */
.hero--parallax .hero__content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: var(--space-6);
}

.hero--parallax .hero__title {
    font-size: var(--text-hero);
    font-weight: var(--weight-bold);
    letter-spacing: 0.05em;
    color: var(--color-text-on-dark);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: var(--space-4);
}

.hero--parallax .hero__subtitle {
    font-size: var(--text-xl);
    font-weight: var(--weight-medium);
    color: var(--color-text-on-dark);
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: var(--space-8);
}

.hero--parallax .hero__cta .btn--primary {
    background: var(--color-accent);
    color: white;
    box-shadow: 0 4px 20px rgba(247, 147, 26, 0.3);
}

.hero--parallax .hero__cta .btn--secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-on-dark);
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
}

.hero--parallax .hero__cta .btn--secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* Scroll indicator */
.hero__scroll-indicator {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-text-on-dark);
    opacity: 0.7;
    animation: hero-scroll-bounce 2s ease-in-out infinite;
}

.hero__scroll-text {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero__scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, currentColor 0%, transparent 100%);
}

@keyframes hero-scroll-bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        opacity: 0.7;
    }
    50% {
        transform: translateX(-50%) translateY(8px);
        opacity: 1;
    }
}

/* Hero content visible by default - shows immediately on load
   GSAP scroll choreography handles the exit animation */
.hero--parallax [data-animate="fade-up"] {
    opacity: 1;
    transform: none;
}

/* Reduced motion: show content immediately */
@media (prefers-reduced-motion: reduce) {
    .hero--parallax [data-animate="fade-up"] {
        opacity: 1;
        transform: none;
    }

    .hero__scroll-indicator {
        animation: none;
    }

    .hero__layer {
        will-change: auto;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .hero--parallax .hero__title {
        font-size: clamp(2.5rem, 10vw, 4rem);
        letter-spacing: 0.03em;
    }

    .hero--parallax .hero__subtitle {
        font-size: var(--text-lg);
    }

    .hero__scroll-indicator {
        bottom: var(--space-6);
    }

    /* Reduce parallax intensity on mobile */
    .hero__layer--sky,
    .hero__layer--dunes {
        /* Parallax will be reduced via JS */
    }
}

/* ==========================================================================
   10. Homepage
   ========================================================================== */

.homepage-content {
    margin-bottom: var(--space-16);
}

.intro {
    text-align: center;
    max-width: var(--content-width);
    margin: 0 auto var(--space-12);
}

.intro h2 {
    margin-bottom: var(--space-4);
}

.intro p {
    color: var(--color-text-soft);
    font-size: var(--text-lg);
}

/* ==========================================================================
   10b. Projects Section
   ========================================================================== */

.projects-section {
    padding: var(--space-24) 0;
    background: var(--color-bg-alt);
}

.projects-section .section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-title {
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-4);
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-soft);
    max-width: 600px;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-8);
}

/* Project Card */
.project-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out);
    will-change: transform;
}

.project-card:hover {
    transform: translateY(-8px) perspective(1000px) rotateX(2deg);
    box-shadow: var(--shadow-xl);
}

/* Project Card Media */
.project-card__media {
    position: relative;
    overflow: hidden;
}

.project-card__thumbnail {
    aspect-ratio: 16/10;
    background-size: cover;
    background-position: center;
    transition: transform var(--duration-slow) var(--ease-out);
}

.project-card:hover .project-card__thumbnail {
    transform: scale(1.05);
}

.project-card__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.project-card:hover .project-card__video {
    opacity: 1;
}

/* Project Card Content */
.project-card__content {
    padding: var(--space-6);
}

.project-card__title {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-2);
    color: var(--color-text);
}

.project-card__description {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
    line-height: var(--leading-relaxed);
}

/* Project Tags */
.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.tag {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: var(--color-bg-alt);
    color: var(--color-text-soft);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    border-radius: var(--radius-full);
    transition: background var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out);
}

.project-card:hover .tag {
    background: var(--color-accent-light);
    color: var(--color-accent);
}

/* Project Links */
.project-card__links {
    display: flex;
    gap: var(--space-3);
}

.project-card__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--color-bg-alt);
    color: var(--color-text-soft);
    transition: background var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
}

.project-card__link:hover {
    background: var(--color-accent);
    color: white;
    transform: translateY(-2px);
}

.project-card__link:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Initial animation state */
.project-card[data-animate="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
}

/* Reduced motion for projects */
@media (prefers-reduced-motion: reduce) {
    .project-card[data-animate="fade-up"] {
        opacity: 1;
        transform: none;
    }

    .project-card:hover {
        transform: none;
    }

    .project-card:hover .project-card__thumbnail {
        transform: none;
    }
}

/* Mobile responsive projects */
@media (max-width: 768px) {
    .projects-section {
        padding: var(--space-16) 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .project-card:hover {
        transform: translateY(-4px);
    }
}

/* ==========================================================================
   10c. Dev Playground Section
   ========================================================================== */

.dev-playground {
    padding: var(--space-16) 0;
    background: var(--color-bg);
}

.dev-playground .section-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.dev-playground .section-label {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-2);
}

.playground-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    max-width: 800px;
    margin: 0 auto;
}

.playground-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-5);
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--color-text);
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal) var(--ease-out);
}

.playground-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
}

.playground-tile__icon {
    font-size: var(--text-2xl);
}

.playground-tile__domain {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text);
}

.playground-tile:hover .playground-tile__domain {
    color: var(--color-accent);
}

.playground-tile__status {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
    background: var(--color-bg-alt);
    color: var(--color-text-muted);
    border-radius: var(--radius-full);
}

/* Animation initial state */
.playground-tile[data-animate="fade-up"] {
    opacity: 0;
    transform: translateY(20px);
}

/* Mobile responsive */
@media (max-width: 480px) {
    .playground-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }

    .playground-tile {
        padding: var(--space-4);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .playground-tile[data-animate="fade-up"] {
        opacity: 1;
        transform: none;
    }

    .playground-tile:hover {
        transform: none;
    }
}

/* ==========================================================================
   11. Post Grid
   ========================================================================== */

.section-header {
    margin-bottom: var(--space-8);
}

.section-header h2 {
    font-size: var(--text-2xl);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-8);
}

.post-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.post-card-image {
    display: block;
    aspect-ratio: 16/10;
    background-size: cover;
    background-position: center;
}

.post-card-content {
    padding: var(--space-6);
}

.post-card-content h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

.post-card-content h3 a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

.post-card-content h3 a:hover {
    color: var(--color-accent);
}

.post-card-content p {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-content time {
    color: var(--color-text-muted);
    font-size: var(--text-xs);
}

/* ==========================================================================
   12. Single Post - Ultra Clean Reading Experience
   ========================================================================== */

/* Post Header */
.post-header {
    padding: var(--space-16) 0 var(--space-8);
    text-align: center;
}

.post-tag {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    text-decoration: none;
    margin-bottom: var(--space-4);
    transition: color var(--duration-fast) var(--ease-out);
}

.post-tag:hover {
    color: var(--color-accent-hover);
}

.post-title {
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-6);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.post-author {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.post-author__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.post-author__name {
    font-weight: var(--weight-medium);
    color: var(--color-text-soft);
}

/* Post Feature Image */
.post-feature-image {
    margin: 0 0 var(--space-12);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--space-6);
}

.post-feature-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.post-feature-image figcaption {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-3);
}

/* Post Content */
.post-content {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
}

.post-content > * {
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
}

.post-content h2 {
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    margin-top: var(--space-16);
    margin-bottom: var(--space-4);
}

.post-content h3 {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    margin-top: var(--space-12);
    margin-bottom: var(--space-4);
}

.post-content h4 {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    margin-top: var(--space-8);
    margin-bottom: var(--space-3);
}

.post-content p {
    margin-bottom: var(--space-6);
}

.post-content a {
    color: var(--color-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.post-content a:hover {
    color: var(--color-accent-hover);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--space-8) auto;
    display: block;
}

/* Wide images break out */
.post-content .kg-width-wide img,
.post-content figure.kg-width-wide {
    max-width: 1000px;
}

.post-content ul,
.post-content ol {
    margin-bottom: var(--space-6);
    padding-left: var(--space-6);
}

.post-content li {
    margin-bottom: var(--space-2);
}

.post-content li::marker {
    color: var(--color-accent);
}

/* Blockquotes */
.post-content blockquote {
    border-left: 4px solid var(--color-accent);
    padding: var(--space-4) var(--space-6);
    margin: var(--space-8) auto;
    font-size: var(--text-xl);
    font-style: italic;
    color: var(--color-text-soft);
    background: var(--color-bg-alt);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Code Blocks */
.post-content code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--color-bg-alt);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    color: var(--color-text);
}

.post-content pre {
    max-width: 900px;
    margin: var(--space-8) auto;
    padding: var(--space-6);
    background: var(--color-bg-dark);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    box-shadow: var(--shadow-md);
}

.post-content pre code {
    background: transparent;
    padding: 0;
    color: var(--color-text-on-dark);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

/* Syntax Highlighting */
.post-content pre .token.comment { color: #6a737d; }
.post-content pre .token.punctuation { color: #e1e4e8; }
.post-content pre .token.property,
.post-content pre .token.tag,
.post-content pre .token.boolean,
.post-content pre .token.number { color: #f97583; }
.post-content pre .token.string,
.post-content pre .token.attr-name { color: #9ecbff; }
.post-content pre .token.function,
.post-content pre .token.class-name { color: #b392f0; }
.post-content pre .token.keyword { color: #f97583; }

/* Horizontal Rules */
.post-content hr {
    border: none;
    height: 1px;
    background: var(--color-border);
    margin: var(--space-12) auto;
}

/* Tables */
.post-content table {
    width: 100%;
    margin: var(--space-8) auto;
    border-collapse: collapse;
}

.post-content th,
.post-content td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}

.post-content th {
    font-weight: var(--weight-semibold);
    background: var(--color-bg-alt);
}

/* Embeds in Post Content */
.post-content .embed,
.post-content .kg-embed-card,
.post-content .kg-video-card {
    max-width: 900px;
    margin: var(--space-12) auto;
}

.post-content iframe {
    max-width: 100%;
    border-radius: var(--radius-lg);
}

/* Post Footer */
.post-footer {
    margin-top: var(--space-16);
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.post-tags {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.post-tags__label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-right: var(--space-2);
}

.post-tags a {
    display: inline-block;
    background: var(--color-bg-alt);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--color-text-soft);
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease-out);
}

.post-tags a:hover {
    background: var(--color-accent);
    color: white;
}

/* Share Links */
.post-share {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.post-share__label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.post-share__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--color-bg-alt);
    color: var(--color-text-soft);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.post-share__link:hover {
    background: var(--color-accent);
    color: white;
}

.post-share__link--copy .icon-check {
    display: none;
}

.post-share__link--copy.copied .icon-link {
    display: none;
}

.post-share__link--copy.copied .icon-check {
    display: block;
    color: #27c93f;
}

/* Author Bio */
.post-author-bio {
    display: flex;
    gap: var(--space-5);
    padding: var(--space-6);
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
}

.post-author-bio__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.post-author-bio__content {
    flex: 1;
}

.post-author-bio__label {
    display: block;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-1);
}

.post-author-bio__name {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-2);
}

.post-author-bio__text {
    font-size: var(--text-sm);
    color: var(--color-text-soft);
    line-height: var(--leading-relaxed);
    margin: 0;
}

/* Related Posts */
.related-posts {
    padding: var(--space-16) 0;
    background: var(--color-bg-alt);
    margin-top: var(--space-16);
}

.related-posts__title {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-8);
    text-align: center;
}

.related-posts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

.related-post-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--duration-normal) var(--ease-out);
}

.related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.related-post-card__image {
    display: block;
    aspect-ratio: 16/10;
    background-size: cover;
    background-position: center;
}

.related-post-card__content {
    padding: var(--space-5);
}

.related-post-card__content h4 {
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-2);
    line-height: var(--leading-snug);
}

.related-post-card__content h4 a {
    color: var(--color-text);
    text-decoration: none;
}

.related-post-card__content h4 a:hover {
    color: var(--color-accent);
}

.related-post-card__content time {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* Post Comments */
.post-comments {
    margin-top: var(--space-16);
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border);
}

/* Post Mobile Responsive */
@media (max-width: 768px) {
    .post-header {
        padding: var(--space-12) 0 var(--space-6);
    }

    .post-title {
        font-size: var(--text-2xl);
    }

    .post-meta {
        flex-direction: column;
        gap: var(--space-2);
    }

    .post-feature-image {
        padding: 0;
        margin-bottom: var(--space-8);
    }

    .post-feature-image img {
        border-radius: 0;
    }

    .post-content {
        font-size: var(--text-base);
    }

    .post-content pre {
        border-radius: 0;
        margin-left: calc(var(--space-6) * -1);
        margin-right: calc(var(--space-6) * -1);
        max-width: none;
    }

    .post-footer {
        margin-top: var(--space-12);
    }

    .post-author-bio {
        flex-direction: column;
        text-align: center;
    }

    .post-author-bio__avatar {
        margin: 0 auto;
    }

    .related-posts__grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   13. Site Footer
   ========================================================================== */

.site-footer {
    padding: var(--space-12) 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.site-footer a {
    color: var(--color-text-soft);
}

.site-footer a:hover {
    color: var(--color-accent);
}

/* ==========================================================================
   14. Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-12);
}

.pagination a {
    padding: var(--space-3) var(--space-6);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    color: var(--color-text);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: all var(--duration-fast) var(--ease-out);
}

.pagination a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* ==========================================================================
   15. Ghost Koenig Editor Cards
   ========================================================================== */

.kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin: var(--space-6) calc(50% - 42.5vw);
}

.kg-width-full {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.kg-width-wide img,
.kg-width-full img {
    width: 100%;
}

.kg-card {
    margin: var(--space-8) 0;
}

.kg-image-card img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.kg-gallery-card {
    margin: var(--space-8) 0;
}

.kg-gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.kg-gallery-row {
    display: flex;
    flex-direction: row;
    gap: var(--space-2);
}

.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.kg-bookmark-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out);
}

.kg-bookmark-card:hover {
    box-shadow: var(--shadow-md);
}

.kg-bookmark-container {
    display: flex;
    text-decoration: none;
    color: inherit;
}

.kg-bookmark-content {
    flex: 1;
    padding: var(--space-6);
}

.kg-bookmark-title {
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-2);
    color: var(--color-text);
}

.kg-bookmark-description {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.kg-bookmark-author {
    font-weight: var(--weight-medium);
}

.kg-bookmark-author::after {
    content: "•";
    margin: 0 var(--space-2);
}

.kg-bookmark-publisher {
    color: var(--color-text-muted);
}

.kg-bookmark-icon {
    width: 1rem;
    height: 1rem;
    margin-right: var(--space-2);
}

.kg-bookmark-thumbnail {
    width: 200px;
    min-height: 160px;
}

.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   16. Utility Classes
   ========================================================================== */

/* Spacing */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

/* Text */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }
.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }

/* Display */
.hidden { display: none; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ==========================================================================
   17. Animation Classes (for GSAP/JS integration)
   ========================================================================== */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity var(--duration-slow) var(--ease-out),
                transform var(--duration-slow) var(--ease-out);
}

.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-children.is-visible > * {
    opacity: 1;
    transform: translateY(0);
    transition: opacity var(--duration-slow) var(--ease-out),
                transform var(--duration-slow) var(--ease-out);
}

/* Stagger delays (0.1s apart) */
.stagger-children.is-visible > *:nth-child(1) { transition-delay: 0s; }
.stagger-children.is-visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.is-visible > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-children.is-visible > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-children.is-visible > *:nth-child(5) { transition-delay: 0.4s; }
.stagger-children.is-visible > *:nth-child(6) { transition-delay: 0.5s; }
.stagger-children.is-visible > *:nth-child(7) { transition-delay: 0.6s; }
.stagger-children.is-visible > *:nth-child(8) { transition-delay: 0.7s; }

/* ==========================================================================
   17b. Scene Sections (Portfolio Scenes)
   ========================================================================== */

.scene {
    padding: var(--space-24) 0;
    position: relative;
    overflow: hidden;
}

.scene__header {
    text-align: center;
    max-width: var(--content-width);
    margin: 0 auto var(--space-12);
}

.scene__label {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: var(--space-4);
}

.scene__title {
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-4);
}

.scene__description {
    font-size: var(--text-lg);
    color: var(--color-text-soft);
    line-height: var(--leading-relaxed);
}

/* ==========================================================================
   17c. Scene: The Speaker
   ========================================================================== */

.scene--speaker {
    background: var(--color-bg-alt);
}

.speaker__gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-12);
}

.speaker__photo {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg);
    margin: 0;
}

.speaker__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-out);
}

.speaker__photo:hover img {
    transform: scale(1.05);
}

.speaker__photo figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-4);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    color: white;
    font-size: var(--text-sm);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.speaker__photo:hover figcaption {
    opacity: 1;
}

/* Primary photo (larger) */
.speaker__photo--primary {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    aspect-ratio: 3/4;
}

/* Secondary photos */
.speaker__photo:not(.speaker__photo--primary) {
    aspect-ratio: 4/3;
}

/* Initial animation state for gallery items */
.speaker__gallery [data-animate="stagger"] .speaker__photo,
.speaker__gallery[data-animate="stagger"] .speaker__photo {
    opacity: 0;
    transform: translateY(30px) rotate(-2deg);
}

/* Speaker CTA */
.speaker__cta {
    text-align: center;
}

.speaker__cta-text {
    font-size: var(--text-lg);
    color: var(--color-text-soft);
    margin-bottom: var(--space-6);
}

/* Responsive adjustments for speaker section */
@media (max-width: 768px) {
    .speaker__gallery {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .speaker__photo--primary {
        grid-column: 1;
        grid-row: auto;
        aspect-ratio: 16/10;
    }

    .speaker__photo:not(.speaker__photo--primary) {
        aspect-ratio: 16/10;
    }

    .speaker__photo figcaption {
        opacity: 1;
    }
}

/* ==========================================================================
   17c1b. Scene: The Content Creator - DRAMATIC YouTube Embed
   WOW FACTOR: TV power-on, particles, chromatic aberration, neon glow
   ========================================================================== */

.scene--content-creator {
    background: var(--color-bg);
    overflow: hidden;
    /* Dark ambient background for contrast */
    position: relative;
}

/* Ambient background glow */
.scene--content-creator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        ellipse at center,
        rgba(247, 147, 26, 0.03) 0%,
        transparent 50%
    );
    pointer-events: none;
}

.content-creator__showcase {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--space-12);
    perspective: 2000px;
    position: relative;
}

/* ==========================================================================
   TV Turn-On YouTube Embed
   Classic CRT power-on effect - clean and simple
   ========================================================================== */

.youtube-3d-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto; /* CENTER THE VIDEO */
    perspective: 1500px;
    position: relative;
}

/* 3D YouTube embed wrapper */
.youtube-3d-container .embed--3d {
    position: relative;
    transform-style: preserve-3d;
}

/* ===== TV POWER-ON EFFECTS ===== */

/* TV power-on white flash overlay */
.youtube-flash {
    position: absolute;
    inset: 0;
    background: white;
    pointer-events: none;
    z-index: 20;
    border-radius: var(--radius-lg);
    opacity: 0;
}

/* Subtle scan line overlay for CRT feel */
.youtube-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.02) 2px,
        rgba(0, 0, 0, 0.02) 4px
    );
    pointer-events: none;
    z-index: 15;
    border-radius: var(--radius-lg);
    opacity: 0;
}

/* ===== MAIN EMBED STYLES ===== */

.youtube-3d-container .embed--3d lite-youtube {
    transform: perspective(1500px) translateZ(0);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.5s var(--ease-out),
                transform 0.5s var(--ease-out);
    will-change: transform, box-shadow;
    backface-visibility: hidden;
}

/* TV bezel frame */
.youtube-3d-container .embed--3d lite-youtube::before {
    content: '';
    position: absolute;
    inset: 0;
    height: auto; /* Override lite-youtube library's 99px height */
    border-radius: var(--radius-lg);
    box-shadow:
        inset 0 0 0 4px rgba(20, 20, 20, 0.95),
        inset 0 0 20px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 10;
}

/* Screen glare/reflection - created via JS to not interfere with lite-youtube aspect ratio */
.youtube-glare {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.02) 30%,
        transparent 60%
    );
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    pointer-events: none;
    z-index: 11;
    opacity: 0;
}

/* HOVER STATE: Subtle lift */
.youtube-3d-container .embed--3d:hover lite-youtube {
    transform: perspective(1500px) translateY(-6px) translateZ(15px);
    box-shadow:
        0 50px 100px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Ensure proper aspect ratio and positioning context for pseudo-elements */
.youtube-3d-container lite-youtube {
    aspect-ratio: 16/9;
    display: block;
    position: relative;
    max-width: 100%;
    margin: 0 auto; /* Center the lite-youtube element */
}

/* ===== FLOATING ANIMATION (Post-entrance) ===== */

@keyframes youtube-float {
    0%, 100% {
        transform: perspective(1500px) translateY(0) rotateX(0deg) rotateY(0deg);
    }
    25% {
        transform: perspective(1500px) translateY(-3px) rotateX(0.5deg) rotateY(-0.5deg);
    }
    75% {
        transform: perspective(1500px) translateY(2px) rotateX(-0.3deg) rotateY(0.3deg);
    }
}

/* Apply floating after animation completes */
.youtube-3d-container.animation-complete .embed--3d lite-youtube {
    animation: youtube-float 8s ease-in-out infinite;
}

/* Content Creator CTA */
.content-creator__cta {
    text-align: center;
}

.content-creator__cta-text {
    font-size: var(--text-lg);
    color: var(--color-text-soft);
    margin-bottom: var(--space-6);
}

.content-creator__cta .btn svg {
    margin-right: var(--space-1);
}

/* Initial animation state */
.content-creator__showcase[data-animate="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .youtube-3d-container {
        max-width: 100%;
    }

    .youtube-3d-container .embed--3d lite-youtube {
        box-shadow:
            0 20px 40px rgba(0, 0, 0, 0.35),
            0 0 0 1px rgba(255, 255, 255, 0.08);
    }

    .youtube-3d-container .embed--3d:hover lite-youtube {
        transform: perspective(1500px) translateY(-4px) translateZ(10px);
        box-shadow:
            0 30px 60px rgba(0, 0, 0, 0.4);
    }

    /* Disable floating on mobile for performance */
    .youtube-3d-container.animation-complete .embed--3d lite-youtube {
        animation: none;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .youtube-scanlines,
    .youtube-flash {
        display: none;
    }

    .youtube-3d-container .embed--3d lite-youtube {
        transform: none;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
        animation: none !important;
    }

    .youtube-3d-container .embed--3d:hover lite-youtube {
        transform: none;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    }

    .youtube-3d-container.animation-complete .embed--3d lite-youtube {
        animation: none;
    }

    .content-creator__showcase[data-animate="fade-up"] {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   17c2. Scene: The Coder
   ========================================================================== */

.scene--coder {
    /* Transparent to show unified depth-map canvas beneath */
    background: transparent;
    /* Position above the fixed depth-map canvas (z-index: 0) */
    z-index: 1;
    /* Needed for overlay positioning */
    position: relative;
}

/* White overlay for text readability - fades in/out via GSAP */
.coder__overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.55);
    pointer-events: none;
    z-index: 0; /* Behind section content */
    opacity: 0;
}

/* Ensure coder content is above the overlay */
.scene--coder .scene__header {
    position: relative;
    z-index: 2;
}

/* Text styling for readability against background */
.scene--coder .scene__label {
    color: var(--color-accent);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.scene--coder .scene__title {
    color: var(--color-text);
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.6);
}

.scene--coder .scene__description {
    color: var(--color-text);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.coder__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: start;
    position: relative;
    z-index: 2; /* Above the white overlay */
}

/* Keyboard */
.coder__keyboard {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: var(--space-6);
    background: var(--color-bg-dark);
    border-radius: var(--radius-lg);
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out);
}

.coder__keyboard:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-glow);
}

.keyboard {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
}

.keyboard__row {
    display: flex;
    gap: var(--space-1);
    justify-content: center;
}

.key {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 var(--space-2);
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    border: 1px solid #4a4a4a;
    border-radius: var(--radius-sm);
    color: var(--color-text-on-dark);
    font-size: 10px;
    text-transform: uppercase;
    transition: all var(--duration-fast) var(--ease-out);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.key--wide {
    min-width: 44px;
}

.key--space {
    min-width: 180px;
}

.key--accent {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
    border-color: var(--color-accent-hover);
}

/* Typing animation - keys light up */
.key[data-key] {
    animation: key-press 2s ease-in-out infinite;
}

.key[data-key="1"] { animation-delay: 0s; }
.key[data-key="2"] { animation-delay: 0.15s; }
.key[data-key="3"] { animation-delay: 0.3s; }
.key[data-key="4"] { animation-delay: 0.45s; }
.key[data-key="5"] { animation-delay: 0.6s; }
.key[data-key="6"] { animation-delay: 0.75s; }
.key[data-key="7"] { animation-delay: 0.9s; }
.key[data-key="8"] { animation-delay: 1.05s; }

@keyframes key-press {
    0%, 100% {
        background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    10%, 20% {
        background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
        transform: translateY(2px);
        box-shadow: 0 0 10px var(--color-accent);
    }
}

.coder__keyboard-label {
    display: block;
    text-align: center;
    margin-top: var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-on-dark);
    opacity: 0.7;
    transition: opacity var(--duration-fast) var(--ease-out);
}

.coder__keyboard:hover .coder__keyboard-label {
    opacity: 1;
}

/* Code Window */
.coder__code {
    grid-column: 2;
    grid-row: 1 / 3;
}

.code-window {
    background: var(--color-bg-dark);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.code-window__header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-window__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-window__dot--red { background: #ff5f56; }
.code-window__dot--yellow { background: #ffbd2e; }
.code-window__dot--green { background: #27c93f; }

.code-window__title {
    margin-left: auto;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}

.code-window__content {
    padding: var(--space-6);
    margin: 0;
    background: transparent;
    font-size: var(--text-sm);
    line-height: 1.8;
    overflow-x: auto;
}

.code-lines {
    display: block;
}

.code-line {
    display: block;
    /* Content visible - parent container handles show/hide animation */
}

/* Syntax highlighting */
.code-keyword {
    color: #c792ea;
}

.code-function {
    color: #82aaff;
}

.code-string {
    color: #c3e88d;
}

.code-comment {
    color: #546e7a;
}

/* GitHub Graph */
.coder__github {
    grid-column: 1;
}

.coder__github-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-4);
    color: var(--color-text);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.coder__github-icon {
    color: var(--color-text);
}

.github-graph {
    display: block;
    text-decoration: none;
    padding: var(--space-4);
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: border-color var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out);
}

.github-graph:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

.github-graph__grid {
    display: grid;
    grid-template-columns: repeat(20, 1fr);
    grid-template-rows: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: var(--space-3);
}

.github-graph__cell {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 2px;
    background: var(--color-bg-alt);
    transition: transform var(--duration-fast) var(--ease-out);
}

.github-graph__cell--1 { background: #9be9a8; }
.github-graph__cell--2 { background: #40c463; }
.github-graph__cell--3 { background: #30a14e; }
.github-graph__cell--4 { background: #216e39; }

.github-graph__legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-1);
    font-size: 10px;
    color: var(--color-text-muted);
}

.github-graph__level {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.github-graph__level--0 { background: var(--color-bg-alt); }
.github-graph__level--1 { background: #9be9a8; }
.github-graph__level--2 { background: #40c463; }
.github-graph__level--3 { background: #30a14e; }
.github-graph__level--4 { background: #216e39; }

/* Initial animation states for coder section */
.coder__keyboard[data-animate="fade-up"],
.coder__code[data-animate="fade-up"],
.coder__github[data-animate="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
}

/* Mobile responsive for coder section */
@media (max-width: 768px) {
    .coder__content {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    /* Hide keyboard on mobile - too cramped and not essential */
    .coder__keyboard {
        display: none;
    }

    .coder__code {
        grid-column: 1;
        grid-row: auto;
    }

    /* GitHub activity comes after code window on mobile */
    .coder__github {
        grid-column: 1;
    }

    /* Compact code window for mobile - so both code + github fit */
    .code-window__content {
        padding: var(--space-3);
        font-size: 11px;
        line-height: 1.6;
    }

    .code-window__header {
        padding: var(--space-2) var(--space-3);
    }

    /* Compact GitHub graph for mobile */
    .github-graph {
        padding: var(--space-3);
    }

    .github-graph__grid {
        grid-template-columns: repeat(15, 1fr);
        gap: 2px;
        margin-bottom: var(--space-2);
    }

    .coder__github-title {
        font-size: var(--text-base);
        margin-bottom: var(--space-2);
    }

    /* Tighter scene header on mobile */
    .scene--coder .scene__header {
        padding-bottom: var(--space-4);
    }

    .scene--coder .scene__description {
        font-size: var(--text-sm);
    }
}

/* Reduced motion for coder section */
@media (prefers-reduced-motion: reduce) {
    .key[data-key] {
        animation: none;
    }

    .coder__keyboard[data-animate="fade-up"],
    .coder__code[data-animate="fade-up"],
    .coder__github[data-animate="fade-up"] {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   17c2. Scene: 8 Claude Codes
   ========================================================================== */

.scene--claude-codes {
    /* Transparent to show depth-map canvas beneath (revealed by windswept mask) */
    background: transparent;
    color: var(--color-text-on-dark);
    /* Ensure section is above the fixed depth canvases */
    position: relative;
    z-index: 1;
}

/* Dark overlay for text readability - fades in/out via GSAP */
.claude-codes__overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 30, 0.55);
    pointer-events: none;
    z-index: 0; /* Behind section content */
    opacity: 0;
}

/* Claude Codes header - no backdrop needed, dark overlay provides readability */
.scene--claude-codes .scene__header {
    position: relative;
    padding: var(--space-8);
    z-index: 2; /* Above the dark overlay */
}

.scene--claude-codes .scene__label {
    color: var(--color-accent);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.scene--claude-codes .scene__title {
    color: var(--color-text-on-dark);
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.6),
        0 4px 16px rgba(0, 0, 0, 0.3);
}

.scene--claude-codes .scene__description {
    color: rgba(255, 255, 255, 0.9);
    text-shadow:
        0 1px 4px rgba(0, 0, 0, 0.6),
        0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Terminal Grid */
.terminal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-12);
    position: relative;
    z-index: 2; /* Above the dark overlay */
}

/* Individual Terminal */
.terminal {
    background: #1a1a1a;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out);
    will-change: transform;
}

.terminal:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
                0 0 30px rgba(247, 147, 26, 0.1);
}

/* Terminal Header */
.terminal__header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal__dot--red { background: #ff5f56; }
.terminal__dot--yellow { background: #ffbd2e; }
.terminal__dot--green { background: #27c93f; }

.terminal__title {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Terminal Body */
.terminal__body {
    padding: var(--space-3);
    height: 160px;
    overflow: hidden;
    position: relative;
}

/* Fade gradient at bottom */
.terminal__body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent 0%, #1a1a1a 100%);
    pointer-events: none;
}

/* Terminal Scroll Container */
.terminal__scroll {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    animation: terminal-scroll var(--scroll-duration, 10s) linear infinite;
}

/* Varying scroll speeds for visual variety */
.terminal[data-terminal="1"] .terminal__scroll { --scroll-duration: 12s; }
.terminal[data-terminal="2"] .terminal__scroll { --scroll-duration: 9s; }
.terminal[data-terminal="3"] .terminal__scroll { --scroll-duration: 14s; }
.terminal[data-terminal="4"] .terminal__scroll { --scroll-duration: 8s; }
.terminal[data-terminal="5"] .terminal__scroll { --scroll-duration: 11s; }
.terminal[data-terminal="6"] .terminal__scroll { --scroll-duration: 13s; }
.terminal[data-terminal="7"] .terminal__scroll { --scroll-duration: 7s; }
.terminal[data-terminal="8"] .terminal__scroll { --scroll-duration: 10s; }

@keyframes terminal-scroll {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

/* Pause scroll on hover */
.terminal:hover .terminal__scroll {
    animation-play-state: paused;
}

/* Terminal Lines */
/* Override global code element styling (cream background, padding, border-radius) */
.terminal__line {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.terminal__prompt {
    color: var(--color-accent);
    margin-right: var(--space-2);
}

.terminal__line--output {
    color: rgba(255, 255, 255, 0.5);
    padding-left: var(--space-4);
}

.terminal__line--success {
    color: #27c93f;
}

.terminal__line--error {
    color: #ff5f56;
}

/* Claude Codes CTA */
.claude-codes__cta {
    text-align: center;
    position: relative;
    z-index: 2; /* Above the dark overlay */
}

.claude-codes__cta-text {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-6);
}

/* Initial animation states for terminals */
.terminal-grid[data-animate="stagger"] .terminal {
    opacity: 0;
    transform: translateY(20px);
}

/* Mobile responsive for 8 Claude Codes */
@media (max-width: 1024px) {
    .terminal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .terminal-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    /* Show only 3 terminals on mobile for better fit */
    .terminal:nth-child(n+4) {
        display: none;
    }

    .terminal__body {
        height: 120px;
    }

    .terminal__line {
        font-size: 10px;
    }

    .scene--claude-codes .scene__header {
        padding: var(--space-4);
    }

    .scene--claude-codes .scene__description {
        font-size: var(--text-sm);
    }
}

/* Reduced motion for terminal animations */
@media (prefers-reduced-motion: reduce) {
    .terminal__scroll {
        animation: none;
    }

    .terminal-grid[data-animate="stagger"] .terminal {
        opacity: 1;
        transform: none;
    }

    .terminal:hover {
        transform: none;
    }
}

/* ----------------------------------------
   Chaos Terminal Animation Styles
   ---------------------------------------- */

/* Focused terminal - active typing state */
.terminal--focused {
    border-color: rgba(39, 201, 63, 0.4);
    z-index: 10;
}

.terminal--focused .terminal__header {
    background: rgba(39, 201, 63, 0.1);
}

.terminal--focused .terminal__title {
    color: #27c93f;
}

/* Unfocused terminals are slightly dimmed for contrast */
.terminal:not(.terminal--focused) {
    opacity: 0.75;
}

.terminal:not(.terminal--focused):hover {
    opacity: 1;
}

/* Active indicator - small pulse on focused terminal's dots */
.terminal--focused .terminal__dot--green {
    animation: terminal-pulse 1.5s ease-in-out infinite;
}

@keyframes terminal-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(39, 201, 63, 0.4); }
    50% { box-shadow: 0 0 8px 3px rgba(39, 201, 63, 0.6); }
}

/* Typing cursor - blinking block cursor */
.terminal__cursor {
    display: inline-block;
    color: #27c93f;
    animation: cursor-blink 0.8s step-end infinite;
    margin-left: 1px;
    font-weight: normal;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Terminal text span for typing effect */
.terminal__text {
    display: inline;
}

/* Prompt line styling for active typing */
.terminal--focused .terminal__prompt {
    color: #27c93f;
}

/* Active terminal has slightly brighter text */
.terminal--focused .terminal__line {
    color: rgba(255, 255, 255, 0.9);
}

.terminal--focused .terminal__line--output {
    color: rgba(255, 255, 255, 0.7);
}

/* Override hover scale when GSAP is controlling */
.terminal--active {
    transform: scale(1.02) !important;
}

/* Terminal scroll container - disable CSS animation when JS takes over */
.terminal--active .terminal__scroll,
.terminal--focused .terminal__scroll {
    animation: none;
    transform: none;
    overflow-y: auto;
}

/* Hide scrollbar but keep functionality */
.terminal__scroll::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* Mobile: reduce visual complexity of focus effect */
@media (max-width: 640px) {
    .terminal:not(.terminal--focused) {
        opacity: 0.85;
    }

    .terminal--focused {
        box-shadow: 0 0 20px rgba(39, 201, 63, 0.25) !important;
    }
}

/* ----------------------------------------
   CRT Shutdown Effect Overlay
   Classic Mac-style horizontal line collapse
   ---------------------------------------- */

.crt-shutdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
}

.crt-line {
    width: 100%;
    height: 4px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 10%,
        rgba(255, 255, 255, 0.9) 50%,
        rgba(255, 255, 255, 0.3) 90%,
        transparent 100%
    );
    box-shadow:
        0 0 20px 8px rgba(255, 255, 255, 0.5),
        0 0 40px 16px rgba(200, 200, 255, 0.3),
        0 0 60px 24px rgba(150, 150, 255, 0.2);
    transform-origin: center center;
}

/* Subtle CRT glow on the section during shutdown */
.scene--claude-codes.crt-active {
    filter: brightness(1.1) contrast(1.05);
}

/* Reduced motion: skip CRT effect entirely */
@media (prefers-reduced-motion: reduce) {
    .crt-shutdown-overlay {
        display: none;
    }
}

/* ==========================================================================
   17c3. Scene: The Consultant
   ========================================================================== */

.scene--consultant {
    background: var(--color-bg-alt);
}

.consultant__content {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.consultant__cases {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    max-width: 900px; /* Keep cards from stretching too wide */
    margin: 0 auto; /* Center the cards */
}

/* Case Study Card */
.case-study {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-4);
    align-items: center;
    padding: var(--space-6);
    background: white;
    border-radius: var(--radius-lg);
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out);
}

.case-study:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.case-study__problem,
.case-study__solution {
    padding: var(--space-4);
}

.case-study__label {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
}

.case-study__label--accent {
    color: var(--color-accent);
}

.case-study__title {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-2);
    color: var(--color-text);
}

.case-study__text {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: var(--leading-relaxed);
    margin: 0;
}

.case-study__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--color-bg-alt);
    border-radius: 50%;
    color: var(--color-accent);
    transition: background var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
}

.case-study:hover .case-study__arrow {
    background: var(--color-accent-light);
    transform: translateX(4px);
}

/* Consultant Visual */
.consultant__visual {
    order: -1; /* Image above cards */
}

.consultant__image {
    margin: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 21 / 9; /* Wider crop on desktop */
    position: relative;
}

.consultant__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-out);
}

.consultant__visual:hover .consultant__image img {
    transform: scale(1.02);
}

/* Consultant CTA */
.consultant__cta {
    text-align: center;
    margin-top: var(--space-12);
}

.consultant__cta-text {
    font-size: var(--text-lg);
    color: var(--color-text-soft);
    margin-bottom: var(--space-4);
}

/* Mobile responsive for consultant */
@media (max-width: 1024px) {
    .consultant__image {
        aspect-ratio: 4 / 3; /* Taller on mobile */
    }
}

@media (max-width: 768px) {
    .case-study {
        grid-template-columns: 1fr;
        gap: var(--space-4);
        text-align: center;
    }

    .case-study__arrow {
        transform: rotate(90deg);
        margin: 0 auto;
    }

    .case-study:hover .case-study__arrow {
        transform: rotate(90deg) translateX(4px);
    }
}

/* Reduced motion for consultant */
@media (prefers-reduced-motion: reduce) {
    .case-study:hover {
        transform: none;
    }

    .consultant__visual:hover .consultant__image img {
        transform: none;
    }

    .case-study:hover .case-study__arrow {
        transform: none;
    }
}

/* ==========================================================================
   17c4. Scene: The Teacher
   ========================================================================== */

.scene--teacher {
    background: var(--color-bg);
}

.teacher__content {
    margin-bottom: var(--space-12);
}

.teacher__highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.teacher__highlight {
    text-align: center;
    padding: var(--space-8);
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out);
}

.teacher__highlight:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.teacher__highlight-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-4);
    background: var(--color-accent-light);
    border-radius: 50%;
    color: var(--color-accent);
}

.teacher__highlight-title {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-2);
    color: var(--color-text);
}

.teacher__highlight-text {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: var(--leading-relaxed);
    margin: 0;
}

/* Teacher CTA */
.teacher__cta {
    text-align: center;
}

.teacher__cta-text {
    font-size: var(--text-lg);
    color: var(--color-text-soft);
    margin-bottom: var(--space-6);
}

/* Mobile responsive for teacher */
@media (max-width: 768px) {
    .teacher__highlights {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .teacher__highlight {
        padding: var(--space-6);
    }
}

/* Reduced motion for teacher */
@media (prefers-reduced-motion: reduce) {
    .teacher__highlight:hover {
        transform: none;
    }
}

/* ==========================================================================
   17c5. Contact Page
   ========================================================================== */

.contact-page {
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport - adapts to mobile browser chrome changes */
    display: flex;
    flex-direction: column;
}

.contact-hero {
    flex: 1;
    display: flex;
    align-items: center;
    padding: var(--space-24) 0;
    background: var(--color-bg);
}

.contact-header {
    text-align: center;
    max-width: var(--content-width);
    margin: 0 auto var(--space-12);
}

.contact-label {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: var(--space-4);
}

.contact-title {
    font-size: var(--text-4xl);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-4);
    color: var(--color-text);
}

.contact-description {
    font-size: var(--text-lg);
    color: var(--color-text-soft);
    line-height: var(--leading-relaxed);
    max-width: 600px;
    margin: 0 auto;
}

/* Contact Methods Grid */
.contact-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    max-width: 600px;
    margin: 0 auto var(--space-12);
}

.contact-method {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5);
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--color-text);
    transition: all var(--duration-normal) var(--ease-out);
}

.contact-method:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.contact-method--primary {
    grid-column: 1 / -1;
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

.contact-method--primary:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: white;
    box-shadow: var(--shadow-lg), 0 0 30px rgba(247, 147, 26, 0.3);
}

.contact-method__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--color-bg-alt);
    color: var(--color-text);
    flex-shrink: 0;
}

.contact-method--primary .contact-method__icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.contact-method__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.contact-method__label {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.contact-method__text {
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
}

.contact-method__arrow {
    color: var(--color-text-muted);
    opacity: 0;
    transform: translateX(-8px);
    transition: all var(--duration-fast) var(--ease-out);
}

.contact-method--primary .contact-method__arrow {
    color: white;
}

.contact-method:hover .contact-method__arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Contact Footer */
.contact-footer {
    text-align: center;
}

.contact-note {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0;
}

/* Mobile responsive for contact page */
@media (max-width: 640px) {
    .contact-methods {
        grid-template-columns: 1fr;
    }

    .contact-method--primary {
        grid-column: 1;
    }

    .contact-title {
        font-size: var(--text-3xl);
    }

    .contact-hero {
        padding: var(--space-16) 0;
    }
}

/* Reduced motion for contact page */
@media (prefers-reduced-motion: reduce) {
    .contact-method:hover {
        transform: none;
    }

    .contact-method__arrow {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   17d. Projects Section
   ========================================================================== */

.projects-section {
    padding: var(--space-24) 0;
}

.projects-section .section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-title {
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-4);
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-soft);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-8);
}

.project-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out);
}

.project-card:hover {
    transform: translateY(-8px) perspective(1000px) rotateX(2deg);
    box-shadow: var(--shadow-xl);
}

.project-card__media {
    position: relative;
    overflow: hidden;
}

.project-card__thumbnail {
    aspect-ratio: 16/10;
    background-size: cover;
    background-position: center;
    transition: transform var(--duration-slow) var(--ease-out);
}

/* Support for img thumbnails */
img.project-card__thumbnail {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.project-card:hover .project-card__thumbnail {
    transform: scale(1.05);
}

.project-card__content {
    padding: var(--space-6);
}

.project-card__title {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-2);
}

.project-card__description {
    font-size: var(--text-sm);
    color: var(--color-text-soft);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.tag {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: var(--color-bg-alt);
    color: var(--color-text-soft);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    border-radius: var(--radius-full);
}

.project-card__links {
    display: flex;
    gap: var(--space-3);
}

.project-card__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--color-bg-alt);
    color: var(--color-text-soft);
    transition: all var(--duration-fast) var(--ease-out);
}

.project-card__link:hover {
    background: var(--color-accent);
    color: white;
}

/* Initial animation state for project cards */
.project-card[data-animate="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   17d2. Dev Playground Section
   ========================================================================== */

.dev-playground {
    padding: var(--space-16) 0;
    background: var(--color-bg-alt);
}

.dev-playground .section-header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.dev-playground .section-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-2);
}

.dev-playground .section-subtitle {
    font-size: var(--text-base);
    color: var(--color-text-muted);
}

.playground-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    max-width: var(--wide-width);
    margin: 0 auto;
}

.playground-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-6) var(--space-4);
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--duration-normal) var(--ease-out);
}

.playground-tile:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

.playground-tile__icon {
    font-size: var(--text-2xl);
    line-height: 1;
}

.playground-tile__domain {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text);
}

.playground-tile:hover .playground-tile__domain {
    color: var(--color-accent);
}

.playground-tile__status {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    background: var(--color-bg-alt);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Focus styles for accessibility */
.playground-tile:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Initial animation state */
.playground-tile[data-animate="fade-up"] {
    opacity: 0;
    transform: translateY(20px);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .playground-grid {
        grid-template-columns: 1fr 1fr;
    }

    .playground-tile {
        padding: var(--space-4) var(--space-3);
    }

    .playground-tile__icon {
        font-size: var(--text-xl);
    }

    .playground-tile__domain {
        font-size: var(--text-xs);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .playground-tile[data-animate="fade-up"] {
        opacity: 1;
        transform: none;
    }

    .playground-tile:hover {
        transform: none;
    }
}

/* Playground tile with multiple links */
.playground-tile--with-links {
    position: relative;
    cursor: default;
}

.playground-tile--with-links:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

.playground-tile__links {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-2);
}

.playground-tile__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--color-text-muted);
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    transition: all var(--duration-fast) var(--ease-out);
}

.playground-tile__link:hover {
    color: var(--color-accent);
    background: white;
    transform: scale(1.1);
}

.playground-tile__link:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Playground tile with GitHub overlay */
.playground-tile--with-github {
    position: relative;
    padding: 0;
    overflow: hidden;
}

.playground-tile__card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-5) var(--space-4);
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.playground-tile--with-github:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

.playground-tile--with-github:hover .playground-tile__domain {
    color: var(--color-accent);
}

.playground-tile__github {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: var(--radius-full);
    background: var(--color-bg-alt);
    color: var(--color-text-muted);
    transition: all 0.2s ease;
    z-index: 2;
}

.playground-tile__github:hover {
    color: var(--color-accent);
    background: white;
    transform: scale(1.1);
}

.playground-tile__github:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .playground-tile__card-link {
        padding: var(--space-4) var(--space-3);
    }

    .playground-tile__github {
        width: 24px;
        height: 24px;
    }

    .playground-tile__github svg {
        width: 14px;
        height: 14px;
    }
}

/* ==========================================================================
   17e. Infinite Blog Carousel (Scroll-Hijack)
   ========================================================================== */

/* Hide carousel and show static fallback for reduced motion */
.recent-posts--fallback {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .carousel-section {
        display: none;
    }

    .recent-posts--fallback {
        display: block;
    }
}

/* Also hide for no-js */
.no-js .carousel-section {
    display: none;
}

.no-js .recent-posts--fallback {
    display: block;
}

/* ==========================================================================
   17e. Reel Navigator - Circular Article Wheel
   ========================================================================== */

.reel-navigator {
    position: relative;
    /* Desktop: fill viewport when pinned */
    min-height: auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background: var(--color-bg-dark, #1a1a1a);
    color: var(--color-text-on-dark);
    overflow: hidden;
    padding: var(--space-4) 0 0;
}

/* Background Video */
.reel-navigator__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.5;
}

/* Gradient overlay for depth */
.reel-navigator__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(
        ellipse 80% 60% at 50% 70%,
        transparent 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
    pointer-events: none;
}

/* Header */
.reel-navigator__header {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 var(--space-6);
    margin-bottom: var(--space-8);
}

.reel-navigator__title {
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    color: var(--color-text-on-dark);
    margin-bottom: var(--space-2);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.reel-navigator__subtitle {
    font-size: var(--text-base);
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Wheel Container - Cog geometry
   The wheel center is positioned below the visible section (at 70% height).
   We see the top semicircle of the cog rising up like gear teeth.
   Cards use absolute positioning from the container origin (0,0). */
.reel-navigator__wheel {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 50vh;
    flex: 1;
    overflow: visible;
}

/* Reel Card - Cog tooth style
   Cards are positioned via JS transform: translate(x, y) translate(-50%, -50%)
   This places the card center at the calculated position on the arc.
   The rotation makes them point outward like cog teeth. */
.reel-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 260px;
    height: 320px;
    transition: opacity 0.15s ease-out;
    will-change: transform, opacity;
    /* No transition on transform - JS handles smooth positioning */
}

.reel-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.reel-card__link:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
}

.reel-card__link:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 4px;
}

/* Card Image */
.reel-card__image {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: var(--color-bg-alt);
}

.reel-card__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-earth) 100%);
}

.reel-card__placeholder-icon {
    font-size: 3rem;
}

/* Card Content */
.reel-card__content {
    flex: 1;
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    color: var(--color-text);
}

.reel-card__date {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2);
}

.reel-card__title {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-snug);
    color: var(--color-text);
    margin: 0;

    /* Truncate after 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Active card emphasis */
.reel-card--active .reel-card__link {
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Scroll Hint */
.reel-navigator__hint {
    position: relative;
    z-index: 10;
    margin-top: var(--space-8);
    text-align: center;
}

.reel-navigator__hint-text {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: reel-hint-pulse 2s ease-in-out infinite;
}

@keyframes reel-hint-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Footer inside reel-navigator - visible during pinned scroll */
.reel-navigator__footer {
    position: relative;
    z-index: 15;
    width: 100%;
    margin-top: auto;
    /* Solid background to prevent bleed-through */
    background: var(--color-bg-dark, #1a1a1a);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile adjustments - ensure section fills viewport */
@media (max-width: 768px) {
    .reel-navigator {
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
    }

    .reel-navigator__wheel {
        height: 55vh;
    }

    .reel-card {
        width: 180px;
        height: 240px;
    }

    .reel-card__image {
        height: 120px;
    }

    .reel-navigator__title {
        font-size: var(--text-xl);
    }
}

@media (max-width: 480px) {
    .reel-navigator {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .reel-navigator__wheel {
        height: 50vh;
    }

    .reel-card {
        width: 140px;
        height: 180px;
    }

    .reel-card__image {
        height: 90px;
    }

    .reel-card__content {
        padding: var(--space-3);
    }

    .reel-card__title {
        font-size: var(--text-sm);
    }
}

/* Reduced motion: show grid instead of wheel */
@media (prefers-reduced-motion: reduce) {
    .reel-navigator__video {
        display: none;
    }

    .reel-navigator {
        background: linear-gradient(
            135deg,
            var(--color-bg-dark, #1a1a1a) 0%,
            var(--color-accent-dark, #c77418) 100%
        );
        min-height: auto;
        padding: var(--space-16) 0;
    }

    .reel-navigator__wheel {
        height: auto;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: var(--space-6);
        padding: 0 var(--space-6);
        max-width: 1200px;
    }

    .reel-card {
        position: relative;
        width: 100%;
        height: auto;
        opacity: 1 !important;
        transform: none !important;
    }

    .reel-card__link {
        height: auto;
    }

    .reel-navigator__hint {
        display: none;
    }
}

/* ==========================================================================
   17e2. Social Footer
   ========================================================================== */

.social-footer {
    background: var(--color-bg-dark, #1a1a1a);
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Ensure footer is at absolute bottom with no gap */
    margin-top: auto;
}

.social-footer__nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.social-footer__link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.2s ease;
    /* 44px min touch target via padding */
    padding: var(--space-2) var(--space-2);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.social-footer__link:hover,
.social-footer__link:focus {
    color: var(--color-accent);
}

.social-footer__link:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.social-footer__copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--text-xs);
    letter-spacing: 0.05em;
    padding: var(--space-2);
    margin-left: auto;
}

/* Mobile footer - extra slim */
@media (max-width: 768px) {
    .social-footer {
        padding: var(--space-2) var(--space-3);
    }

    .social-footer__nav {
        gap: var(--space-2);
    }

    .social-footer__link {
        font-size: 0.65rem;
        letter-spacing: 0.05em;
        padding: var(--space-1) var(--space-2);
        min-height: 44px;
    }

    .social-footer__copyright {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .social-footer {
        padding: var(--space-2);
    }

    .social-footer__nav {
        gap: var(--space-1);
        justify-content: space-between;
    }

    .social-footer__link {
        font-size: 0.6rem;
        padding: var(--space-1);
        min-height: 44px;
    }

    .social-footer__copyright {
        font-size: 0.6rem;
        width: 100%;
        text-align: center;
        order: 99;
        margin-left: 0;
        margin-top: var(--space-1);
    }
}

/* ==========================================================================
   18. Responsive
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --space-6: 1.25rem;
        --space-8: 1.5rem;
        --space-12: 2rem;
        --space-16: 3rem;
        --space-24: 4rem;
    }

    .site-header .container {
        flex-direction: column;
        gap: var(--space-4);
    }

    .site-nav {
        gap: var(--space-6);
    }

    .hero {
        padding: var(--space-16) var(--space-4);
    }

    .hero__cta {
        flex-direction: column;
        align-items: center;
    }

    .post-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .kg-width-wide {
        width: 100%;
        margin: var(--space-6) 0;
    }

    .kg-bookmark-container {
        flex-direction: column;
    }

    .kg-bookmark-thumbnail {
        width: 100%;
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .site-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .post-card-content {
        padding: var(--space-4);
    }
}

/* ==========================================================================
   18b. Embed Components
   ========================================================================== */

/* Base embed styles */
.embed {
    margin: var(--space-8) 0;
}

.embed__caption {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-3);
}

/* YouTube Embed - 3D transform effect */
.embed--youtube {
    perspective: 1000px;
}

.embed--youtube lite-youtube {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out);
}

.embed--youtube.embed--3d lite-youtube {
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
}

.embed--youtube.embed--3d:hover lite-youtube,
.embed--youtube lite-youtube:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
    box-shadow: var(--shadow-xl);
}

/* GitHub Repo Card */
.github-repo-card {
    display: block;
    padding: var(--space-5);
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--color-text);
    transition: border-color var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out),
                transform var(--duration-normal) var(--ease-out);
}

.github-repo-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--color-text);
}

.github-repo-card__header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.github-repo-card__icon {
    color: var(--color-text-muted);
}

.github-repo-card__owner {
    color: var(--color-text-muted);
}

.github-repo-card__sep {
    color: var(--color-text-muted);
}

.github-repo-card__name {
    font-weight: var(--weight-semibold);
    color: var(--color-accent);
}

.github-repo-card:hover .github-repo-card__name {
    text-decoration: underline;
}

.github-repo-card__description {
    font-size: var(--text-sm);
    color: var(--color-text-soft);
    margin-bottom: var(--space-4);
    line-height: var(--leading-relaxed);
}

.github-repo-card__stats {
    display: flex;
    gap: var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.github-repo-card__stat {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.github-repo-card__stat svg {
    color: var(--color-text-muted);
}

.github-repo-card__lang-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-accent);
}

/* Twitter/X Preview */
.twitter-preview {
    padding: var(--space-5);
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin: 0;
    transition: border-color var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out);
}

.twitter-preview:hover {
    border-color: var(--color-border-strong);
    box-shadow: var(--shadow-md);
}

.twitter-preview__header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.twitter-preview__icon {
    color: var(--color-text);
}

.twitter-preview__author {
    font-weight: var(--weight-medium);
    color: var(--color-text-soft);
}

.twitter-preview__text {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
    color: var(--color-text);
}

.twitter-preview__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-accent);
    text-decoration: none;
    font-weight: var(--weight-medium);
}

.twitter-preview__link:hover {
    text-decoration: underline;
}

.twitter-preview__link svg {
    opacity: 0.7;
}

/* ==========================================================================
   18c. Blog Post Template
   ========================================================================== */

.post {
    padding-bottom: var(--space-24);
    background: var(--color-bg);
    min-height: 100vh;
}

/* Post Header */
.post-header {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: var(--space-16) var(--space-6) var(--space-12);
    text-align: center;
}

.post-title {
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-6);
    color: var(--color-text);
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.post-meta > * {
    display: flex;
    align-items: center;
}

.post-meta > *:not(:last-child)::after {
    content: '·';
    margin-left: var(--space-4);
    color: var(--color-text-muted);
}

.reading-time {
    color: var(--color-accent);
}

/* Feature Image */
.post-feature-image {
    margin: var(--space-8) 0 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.post-feature-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Content */
.post-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-text);
}

/* Typography in content */
.post-content h2 {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    margin: var(--space-12) 0 var(--space-4);
    color: var(--color-text);
}

.post-content h3 {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    margin: var(--space-8) 0 var(--space-3);
    color: var(--color-text);
}

.post-content h4 {
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    margin: var(--space-6) 0 var(--space-2);
    color: var(--color-text);
}

.post-content p {
    margin-bottom: var(--space-6);
}

.post-content p:last-child {
    margin-bottom: 0;
}

.post-content a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--duration-fast) var(--ease-out);
}

.post-content a:hover {
    color: var(--color-accent-hover);
}

/* Lists */
.post-content ul,
.post-content ol {
    margin: var(--space-6) 0;
    padding-left: var(--space-6);
}

.post-content li {
    margin-bottom: var(--space-2);
}

.post-content li::marker {
    color: var(--color-accent);
}

/* Blockquotes */
.post-content blockquote {
    margin: var(--space-8) 0;
    padding: var(--space-6) var(--space-8);
    border-left: 4px solid var(--color-accent);
    background: var(--color-bg-alt);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--color-text-soft);
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Code blocks */
.post-content pre {
    margin: var(--space-8) 0;
    padding: var(--space-6);
    background: var(--color-bg-dark);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.post-content pre code {
    background: none;
    padding: 0;
    color: var(--color-text-on-dark);
}

.post-content code {
    background: var(--color-bg-alt);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--color-accent);
}

/* Images */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--space-6) 0;
}

.post-content figure {
    margin: var(--space-8) 0;
}

.post-content figcaption {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-align: center;
    margin-top: var(--space-3);
}

/* Horizontal rule */
.post-content hr {
    border: none;
    height: 1px;
    background: var(--color-border);
    margin: var(--space-12) 0;
}

/* Tables */
.post-content table {
    width: 100%;
    margin: var(--space-8) 0;
    border-collapse: collapse;
}

.post-content th,
.post-content td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.post-content th {
    font-weight: var(--weight-semibold);
    background: var(--color-bg-alt);
}

/* Post Footer */
.post-footer {
    max-width: var(--content-width);
    margin: var(--space-12) auto 0;
    padding: var(--space-8) var(--space-6);
    border-top: 1px solid var(--color-border);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.post-tags a {
    display: inline-flex;
    padding: var(--space-2) var(--space-4);
    background: var(--color-bg-alt);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--color-text-soft);
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease-out);
}

.post-tags a:hover {
    background: var(--color-accent);
    color: white;
}

/* Comments Section */
.post-comments {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: var(--space-12) var(--space-6);
}

/* Responsive Post Styles */
@media (max-width: 768px) {
    .post-header {
        padding: var(--space-12) var(--space-4) var(--space-8);
    }

    .post-title {
        font-size: var(--text-2xl);
    }

    .post-meta {
        flex-direction: column;
        gap: var(--space-2);
    }

    .post-meta > *:not(:last-child)::after {
        display: none;
    }

    .post-content {
        padding: 0 var(--space-4);
    }

    .post-content blockquote {
        padding: var(--space-4) var(--space-5);
    }

    .post-footer {
        padding: var(--space-6) var(--space-4);
    }
}

/* ==========================================================================
   19. Scroll Parallax Support
   ========================================================================== */

/*
 * Scroll parallax images need overflow: visible to show movement,
 * but we use clip-path to maintain rounded corners.
 * The image is scaled up to prevent gaps during parallax movement.
 */

/* Containers that hold parallax images - allow overflow but clip with rounded corners */
.speaker__photo:has([data-scroll-parallax]),
.consultant__image:has([data-scroll-parallax]),
.project-card__media:has([data-scroll-parallax]),
.post-feature-image:has([data-scroll-parallax]) {
    overflow: visible;
    clip-path: inset(0 round var(--radius-lg));
}

/* Scale parallax images larger so they can move without showing gaps */
[data-scroll-parallax] {
    scale: 1.15;
    will-change: transform;
}

/* Disable hover scale on parallax images (conflicts with parallax transform) */
.speaker__photo:has([data-scroll-parallax]):hover img,
.consultant__visual:hover .consultant__image:has([data-scroll-parallax]) img {
    transform: none !important;
}

/* ==========================================================================
   20. Print Styles
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .site-nav,
    .pagination {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    .post-content {
        max-width: 100%;
    }
}

/* ==========================================================================
   18d. Page Template (Static Pages)
   ========================================================================== */

/* Light background for post and page templates (vs dark landing page) */
body.post-template,
body.page-template {
    background: var(--color-bg);
}

/* Page Article Container */
.page {
    padding-bottom: var(--space-24);
    background: var(--color-bg);
    min-height: 100vh;
}

/* Page Header */
.page-header {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: var(--space-16) var(--space-6) var(--space-12);
    text-align: center;
}

.page-title {
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-6);
    color: var(--color-text);
}

/* Page Feature Image */
.page-feature-image {
    max-width: var(--wide-width);
    margin: 0 auto var(--space-12);
    padding: 0 var(--space-6);
}

.page-feature-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
}

/* Page Content - uses same styles as post content */
.page-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-text);
}

/* Typography in page content */
.page-content h2 {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    margin: var(--space-12) 0 var(--space-4);
    color: var(--color-text);
}

.page-content h3 {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    margin: var(--space-8) 0 var(--space-3);
    color: var(--color-text);
}

.page-content h4 {
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    margin: var(--space-6) 0 var(--space-2);
    color: var(--color-text);
}

.page-content p {
    margin-bottom: var(--space-6);
}

.page-content p:last-child {
    margin-bottom: 0;
}

.page-content a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--duration-fast) var(--ease-out);
}

.page-content a:hover {
    color: var(--color-accent-hover);
}

/* Lists */
.page-content ul,
.page-content ol {
    margin: var(--space-6) 0;
    padding-left: var(--space-6);
}

.page-content li {
    margin-bottom: var(--space-2);
}

.page-content li::marker {
    color: var(--color-accent);
}

/* Blockquotes */
.page-content blockquote {
    margin: var(--space-8) 0;
    padding: var(--space-6) var(--space-8);
    border-left: 4px solid var(--color-accent);
    background: var(--color-bg-alt);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--color-text-soft);
}

.page-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Code blocks */
.page-content pre {
    margin: var(--space-8) 0;
    padding: var(--space-6);
    background: var(--color-bg-dark);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.page-content pre code {
    background: none;
    padding: 0;
    color: var(--color-text-on-dark);
}

.page-content code {
    background: var(--color-bg-alt);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--color-accent);
}

/* Images */
.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--space-6) 0;
}

.page-content figure {
    margin: var(--space-8) 0;
}

.page-content figcaption {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-align: center;
    margin-top: var(--space-3);
}

/* Horizontal rule */
.page-content hr {
    border: none;
    height: 1px;
    background: var(--color-border);
    margin: var(--space-12) 0;
}

/* Tables */
.page-content table {
    width: 100%;
    margin: var(--space-8) 0;
    border-collapse: collapse;
}

.page-content th,
.page-content td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.page-content th {
    font-weight: var(--weight-semibold);
    background: var(--color-bg-alt);
}

/* Responsive Page Styles */
@media (max-width: 768px) {
    .page-header {
        padding: var(--space-12) var(--space-4) var(--space-8);
    }

    .page-title {
        font-size: var(--text-2xl);
    }

    .page-content {
        padding: 0 var(--space-4);
    }

    .page-content blockquote {
        padding: var(--space-4) var(--space-6);
    }
}
