/* 
   Design System: Modern Technical (Vercel/Raycast inspired)
   - Engineered Minimalism
   - Dark Mode (Deep)
   - Subtle Gradients & Glows
   - Bento Grid
*/

:root {
    /* Color Palette - Deeper, colder */
    --color-bg: #000000;
    --color-surface: #0a0a0a;
    --color-surface-hover: #111111;
    --color-text-main: #ededed;
    --color-text-muted: #888888;
    --color-border: #333333;
    --color-border-hover: #555555;

    /* New Accent: Soft Electric Yellow */
    --color-accent: #FDFEBD;
    /* Very pale, soft yellow */
    --color-accent-glow: rgba(253, 254, 189, 0.15);

    --color-glow: var(--color-accent-glow);

    /* Typography - Technical Sans */
    --font-main: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Space Mono', monospace;
    /* New "Fun" Technical Font */

    --size-h1: clamp(3rem, 6vw, 5rem);
    /* Tighter, cleaner */
    --size-h2: clamp(1.8rem, 4vw, 3rem);
    --size-h3: clamp(1.1rem, 2vw, 1.5rem);
    --size-body: 1rem;

    /* Spacing & Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;

    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 60px;
    --space-buffer: max(3rem, 4vw);
}

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

::selection {
    background: var(--color-accent);
    color: #000;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Accessibility: Keyboard Focus States */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Ensure buttons with specific radii match */
button:focus-visible,
.action-btn:focus-visible,
.nav-link:focus-visible {
    outline-offset: 2px;
}

/* Background Gradients (Subtle ambient light) */
.noise-overlay {
    /* Repurposing this div for the ambient gradient */
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: transparent;
    /* Solid BG established by body color */
    pointer-events: none;
    z-index: -1;
    animation: rotate 60s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}



/* Layout Utilities */
.container {
    padding: 0 var(--space-buffer);
}

/* Header - Floating Glass Pill */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Compact padding: tight vertical, text near edges */
    padding: 0.8rem 2rem;
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    /* Fixed width to ensure size, with small padding to push text to edges */
    width: 500px;
    max-width: 90vw;
    gap: 3rem;
    /* Explicit space between Logo/Nav */

    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(253, 254, 189, 0.15);
    border-radius: 999px;
    z-index: 100;
    box-shadow: 0 4px 20px -10px rgba(0, 0, 0, 0.5);
}

.logo {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.nav-link {
    color: var(--color-text-muted);
    text-decoration: none;
    /* margin-left: 1.5rem;  Removed margin since it's the only child now */
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover {
    color: var(--color-text-main);
}

/* Global Background Container */
.site-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 130vh;
    /* Reduced from 160vh to fade out earlier */
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    /* Let clicks pass through */
    /* Fade out starts at 70% (just below hero) and is gone by 100% (mid-Philosophy) */
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: heroCanvasFadeIn 3.5s ease-out forwards;
}

@keyframes heroCanvasFadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* 1. Interactive Warm Glow (Follows Mouse) applied to background container */
.site-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    opacity: 0.8;
    transition: opacity 0.5s ease;
}

/* 2. Static Ambient Deep Glow */
.site-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    filter: blur(80px);
}

/* Hero Section - Transparents */
.hero-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 var(--space-buffer);
    padding-top: var(--space-xl);
    position: relative;
    z-index: 2;
    /* Ensure text is above background */
    /* Removed accidental opacity/pointer-events from background mix-up */
}

.hero-title {
    font-size: var(--size-h1);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.3;
    /* Increased from 1.1 to fix clipped 'g' descenders */
    padding-bottom: 0.2em;
    /* Ensure gradient covers full height */
    margin-bottom: var(--space-md);
    /* High contrast gradient: Pure text against dark bg */
    background: linear-gradient(to bottom right, #ffffff 30%, #a5a5a5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Add subtle drop shadow for "pop" against mesh */
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.5));
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #e5e5e5;
    /* Brighter, sharper gray (was muted) */
    max-width: 690px;
    z-index: 2;
    line-height: 1.5;
    /* Slightly tighter line height for sharpness */
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    /* Ensure rendering crispness */
}

/* Audio Player Pill */
.audio-pill-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    z-index: 2;
}

.audio-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.7rem 1.5rem;
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--color-text-muted);
}

.audio-pill>* {
    pointer-events: none;
}

/* Audio Progress Bar */
.audio-progress-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    z-index: 9999;
    pointer-events: none;
}

.audio-progress-bar {
    width: 0%;
    height: 100%;
    background-color: var(--color-accent);
    transition: width 0.1s linear;
}

.audio-pill:hover {
    border-color: rgba(253, 254, 189, 0.4);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.5);
}

.audio-pill.playing {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(253, 254, 189, 0.05);
}

.audio-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
}

.audio-text {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.04em;
}

/* The "Head of Design" part - Technical & Fun */
/* Animated Title Styles */
.animated-title {
    display: inline-flex;
    /* Align "Design" and rotator side-by-side */
    align-items: baseline;
    /* Align text baselines for pixel perfection */
    gap: 0.3em;
    /* Space between "Design" and [Word] */

    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    /* Yellow */
    opacity: 1;
}

.animated-title::before {
    content: '> ';
    /* Keep the code metaphor */
    opacity: 0.6;
    margin-right: 0.2em;
}

.rotator-window {
    display: inline-block;
    height: 1.25em;
    /* Fixed height for one line */
    line-height: 1.25em;
    overflow: hidden;
    /* MASK: Hides non-active words */
    vertical-align: bottom;
    position: relative;
    width: 7.5em;
    /* Fixed width to fit largest word "Generator" */
    text-align: left;
}

.rotator-track {
    display: flex;
    flex-direction: column;
    /* Stack words vertically */
    animation: rotateWords 8s infinite cubic-bezier(0.7, 0, 0.3, 1);
    /* Quicker snap */
}

.rotator-track span {
    height: 1.25em;
    /* Must match window height */
    line-height: 1.25em;
    display: block;
    flex-shrink: 0;
}

/* 
 Animation Logic (Reversed):
 Stack is reversed in HTML.
 Start at Bottom (Leader) -> -5.0em
 Slide Down to Creator -> -3.75em
 Slide Down to Generator -> -2.5em
 Slide Down to Manager -> -1.25em
 Slide Down to Top (Leader) -> 0
 Loop back to -5.0em
*/
@keyframes rotateWords {

    0%,
    20% {
        transform: translateY(-5.0em);
    }

    25%,
    45% {
        transform: translateY(-3.75em);
    }

    50%,
    70% {
        transform: translateY(-2.5em);
    }

    75%,
    95% {
        transform: translateY(-1.25em);
    }

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

/* Section Common */
section {
    padding: var(--space-lg) var(--space-buffer);
}

.section-header {
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title {
    font-size: var(--size-h2);
    font-weight: 600;
    letter-spacing: -0.03em;
}

.divider {
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(to right, var(--color-border), transparent);
}


/* --- Experimental Split-View Shell --- */

.app-container {
    width: 100%;
    /* Balanced Large Size */
    max-width: 1400px;
    margin: 0 auto;
    /* Returns to cinematic ratio */
    aspect-ratio: 16/9;
    background: #050505;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 20px 50px -10px rgba(0, 0, 0, 0.8);
    /* Soft Yellow ambient glow */
    display: flex;
    overflow: hidden;
    position: relative;
}

/* --- Project Vertical Layout --- */
.project-layout {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    /* Anchor slide indicator */
}

/* Ensure app-container fills width */
.app-container {
    width: 100%;
    max-width: 100%;
}

/* Bottom: Horizontal Project Picker */
/* Bottom: Horizontal Project Picker */
.project-picker-aside {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0;
}

/* Track container for nav */
.picker-track {
    flex: 1;
    overflow: hidden;
    position: relative;
    /* Ensure flex child takes width */
    min-width: 0;
}

.picker-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    border: none;
    padding: 0;
    width: 100%;
}

/* Hide scrollbar globally */
.picker-nav::-webkit-scrollbar {
    display: none;
}

/* Arrow Buttons */
.picker-arrow {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.picker-arrow:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* Rotate the Up/Down icons to Left/Right */
.picker-arrow-prev svg,
.picker-arrow-next svg {
    transform: rotate(-90deg);
}

.nav-item {
    background: transparent;
    border: none;
    padding: 0;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-main);
    color: var(--color-text-muted);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    opacity: 0.5;
    flex: 1;
    min-width: 0;
}

.nav-item:hover {
    color: #fff;
    opacity: 0.8;
}

.nav-item.active {
    opacity: 1;
}

.nav-item.active .nav-label {
    color: var(--color-accent);
}

.nav-label {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nav-desc {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--color-text-muted);
    font-weight: 400;
    max-width: 200px;
    letter-spacing: 0.02em;
}

/* Active Indicator (Top Bar for horizontal) */
.nav-item.active::before {
    content: '';
    position: absolute;
    top: -1rem;
    left: 0;
    right: auto;
    width: 32px;
    height: 2px;
    background: var(--color-accent);
    box-shadow: 0 0 8px var(--color-accent-glow);
}

/* === Pill Progress Indicator === */
.pill-indicator {
    display: flex;
    gap: 6px;
    align-items: center;
    margin: 12px 0;
}

.pill {
    height: 3px;
    width: 14px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pill.active {
    width: 36px;
    background: var(--color-accent);
    box-shadow: 0 0 6px var(--color-accent-glow);
}

/* === End of Pill Indicator === */
/* Animation on update */
@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 8px var(--color-accent-glow));
    }

    50% {
        filter: drop-shadow(0 0 15px var(--color-accent-glow));
    }
}

.ring-segment.active.updating {
    animation: pulse-glow 0.6s ease-out;
}

.binary-counter.updating {
    animation: pulse-glow 0.6s ease-out;
}

/* Media Stage (Shell) */
.app-stage {
    flex: 1;
    position: relative;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* (removed inner shadow overlay) */

/* Window Controls Overlay */
.window-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    /* More breathing room */
    display: flex;
    align-items: center;
    padding-left: 1.5rem;
    z-index: 20;
    pointer-events: none;
}

/* Browser Window Components */
.browser-window {
    width: 100%;
    max-width: 1950px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #000;
}

.browser-top-bar {
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    flex-shrink: 0;
}

.address-bar {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 4px 1.5rem;
    width: min(300px, 40%);
    text-align: center;
}

.address-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    opacity: 0.8;
}

.browser-content {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
}

.browser-content {
    flex: 1;
    overflow-y: auto;
    background: #fff;
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.6) transparent;
}

/* Scrollbar Styling - High Contrast for Portfolio Alignment */
.browser-content::-webkit-scrollbar {
    width: 10px;
    background: #0a0a0a;
}

.browser-content::-webkit-scrollbar-track {
    background: #0a0a0a;
}

.browser-content::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 4px;
    border: 2px solid #0a0a0a;
}

.browser-content::-webkit-scrollbar-thumb:hover {
    background: #fff;
}

.browser-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

/* Browser Window Hybrid Fix (Photos inside Browser UI) */
.browser-window-link {
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

.browser-placeholder {
    width: 100%;
    height: auto;
    background: #f4f4f4;
}

/* Sticky Header Container */
.browser-sticky-header {
    position: sticky;
    top: -1px;
    z-index: 10;
    width: 100%;
    background: #fff;
    overflow: hidden;
    border-top: 1px solid #fff;
}

.browser-header-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Scrollable Content Container */
.browser-scroll-content {
    width: 100%;
    background: #fff;
}

.browser-content-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Legacy browser-img support (for backward compatibility) */
.browser-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.browser-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.view-live {
    padding: 0.8rem 1.5rem;
    background: #fff;
    color: #000;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.browser-window-link:hover .browser-overlay {
    opacity: 1;
}

.browser-window-link:hover .view-live {
    transform: translateY(0);
}

.browser-window-link:hover .browser-img {
    transform: scale(1.02);
}

.browser-window-link:hover .browser-content-img {
    transform: scale(1.02);
}

.browser-window-link:hover .address-bar {
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.1);
}

.window-controls {
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

.control {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.app-container:hover .control {
    opacity: 1;
}

.control.red {
    background: #FF5F56;
}

.control.yellow {
    background: #FFBD2E;
}

.control.green {
    background: #27C93F;
}

.media-shell {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    width: 100%;
    height: 100%;
}

.media-shell.active {
    opacity: 1;
    visibility: visible;
}

.media-placeholder {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(20, 20, 20, 1), #000);
    /* Placeholder grid background */
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    padding: 20px;
    box-sizing: border-box;
}

.media-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}


/* Sectors Log (Terminal) */
.sectors-log {
    margin-top: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.8;
}

.sectors-prompt {
    display: block;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 0.4rem;
}

.sectors-line {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.sectors-status {
    flex-shrink: 0;
    letter-spacing: 0.06em;
    font-size: 0.7rem;
}

.sectors-status.active {
    color: var(--color-accent);
}

.sectors-status.active::before {
    content: '[';
    color: rgba(255, 255, 255, 0.2);
}

.sectors-status.active::after {
    content: ']';
    color: rgba(255, 255, 255, 0.2);
}

.sectors-status.watching {
    color: var(--color-accent);
}

.sectors-status.watching::before {
    content: '[';
    color: rgba(255, 255, 255, 0.2);
}

.sectors-status.watching::after {
    content: ']';
    color: rgba(255, 255, 255, 0.2);
}

.sectors-list {
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.02em;
}

/* Info Spread Section (Philosophy + About) */
.info-spread-section {
    padding: var(--space-xl) var(--space-buffer);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: start;
}

.info-col {
    display: flex;
    flex-direction: column;
}

.info-content {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.info-content h3 {
    font-size: 1.5rem;
    color: var(--color-text-main);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* --- Creative Info Specs & Changelog --- */
.creative-layout {
    gap: 4rem;
}

.mono-label {
    font-family: var(--font-mono);
    color: var(--color-accent);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    display: block;
}

/* Left: System Specs */
.spec-item {
    margin-bottom: 3rem;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 1.5rem;
    transition: border-color 0.3s ease;
}

.spec-item:hover {
    border-color: var(--color-accent);
}

.spec-key {
    display: block;
    font-family: var(--font-mono);
    color: var(--color-text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.spec-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.spec-desc {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}


/* Clients Grid Flow */
.clients-grid-flow {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 4rem;
    /* No vertical gap (handled by margin-bottom), wide horizontal gap */
    align-items: start;
}

.client-link-key {
    display: inline-block;
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
    margin-bottom: 0.2rem;
}

.client-link-key:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

/* --- About Section (Timeline + Bio) --- */
.about-section {
    padding: var(--space-xl) var(--space-buffer);
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Timeline Column */
.cv-column {
    display: flex;
    flex-direction: column;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 2rem;
    position: relative;
}

.timeline-year {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 400;
    padding-top: 0.2rem;
}

.timeline-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.timeline-company {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
    font-weight: 400;
}

.timeline-desc {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Bio Column */
.bio-column {
    display: flex;
    flex-direction: column;
}

.bio-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.bio-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.bio-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.12);
}

.bio-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.bio-text {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.bio-text:last-child {
    margin-bottom: 0;
}

/* Bio Stats */
.bio-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.stat-number {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Sticky Terminal Top Bar */
.sticky-terminal-bar {
    position: fixed;
    top: env(safe-area-inset-top, 0px);
    left: 0;
    right: 0;
    z-index: 1000;

    padding: 0.6rem 1.5rem;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);

    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--color-accent);
    text-transform: uppercase;

    cursor: pointer;
    text-align: center;

    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-terminal-bar.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.sticky-terminal-bar:hover {
    background: rgba(0, 0, 0, 0.97);
    border-bottom-color: rgba(253, 254, 189, 0.15);
}

.sticky-terminal-bar:hover .terminal-text {
    color: var(--color-text-main);
}

.terminal-text {
    transition: color 0.3s ease;
}

.terminal-cursor {
    display: inline-block;
    color: var(--color-accent);
    animation: terminalBlink 1s step-end infinite;
    margin-left: 1px;
    font-size: 0.9em;
}

@keyframes terminalBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ======================================== */

/* Small Mobile: 480px and below */
@media (max-width: 480px) {
    :root {
        --space-xl: 60px;
        --space-lg: 2.5rem;
        --space-md: 1.5rem;
        --space-buffer: 1.25rem;
    }

    /* Hero Section */
    .hero-section {
        min-height: 70vh;
        padding-top: 80px;
    }

    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.6;
    }

    .animated-title {
        font-size: 0.75rem;
        gap: 0.25em;
    }

    .rotator-window {
        width: 7.5em;
    }

    /* Info Grid */
    .info-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .spec-value {
        font-size: 1.1rem;
    }

    .spec-desc {
        font-size: 0.9rem;
    }

    /* Clients Grid - Force single column */
    .clients-grid-flow {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    /* Carousel */
    .carousel-container {
        padding: 0 0.5rem;
        padding-bottom: 100px;
    }



    .carousel-slide-title {
        font-size: 1.65rem;
        margin-bottom: 1.5rem;
        padding: 0;
        word-wrap: break-word;
    }

    .carousel-slide-text {
        font-size: 0.95rem;
        line-height: 1.8;
        max-width: 100%;
        padding: 0;
    }


    .carousel-arrow {
        width: 32px;
        height: 32px;
    }

    .carousel-arrow svg {
        width: 16px;
        height: 16px;
    }

    /* Section Headers */
    .mono-label {
        font-size: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .section-main-title {
        font-size: 2rem;
        margin: 1rem auto 2rem;
    }

    .section-intro p {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* App Container - Remove aspect ratio on mobile */
    .app-container {
        aspect-ratio: auto;
        min-height: 300px;
        height: 400px;
    }

    /* Project Picker */
    /* Project Picker */
    .picker-nav {
        display: flex;
        flex-direction: row;
        gap: 1.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    .nav-item {
        min-width: max-content;
        flex: 0 0 auto;
    }

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

    .nav-desc {
        font-size: 0.8rem;
    }

    /* Timeline */
    .timeline-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .timeline-year {
        font-size: 0.75rem;
    }

    .timeline-content h3 {
        font-size: 1.1rem;
    }

    .timeline-desc {
        font-size: 0.9rem;
    }

    /* Bio */
    .bio-title {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .bio-text {
        font-size: 0.95rem;
    }

    .bio-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .stat-item {
        padding: 1rem 0.5rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    /* Footer */
    .footer-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .footer-description {
        font-size: 0.95rem;
        max-width: 100%;
        line-height: 1.5;
    }

    .footer-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .action-btn {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    /* System Boundary */
    .system-boundary {
        padding: 3rem var(--space-buffer) 2rem;
    }
}

/* Medium Mobile: 481px - 640px */
@media (min-width: 481px) and (max-width: 640px) {
    :root {
        --space-xl: 80px;
        --space-lg: 3rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .carousel-container {
        padding-bottom: 100px;
    }



    .carousel-slide-title {
        font-size: 2.25rem;
        padding: 0;
        margin-bottom: 1.5rem;
    }

    .carousel-slide-text {
        font-size: 1.1rem;
        line-height: 1.8;
        max-width: 100%;
        padding: 0;
    }

    .app-container {
        height: 450px;
    }

    .footer-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .action-btn {
        flex: 1;
        min-width: 140px;
    }
}

/* Sticky Button Mobile Fix: 640px and below */
@media (max-width: 640px) {
    .sticky-terminal-bar {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }

    /* Move Audio Progress Bar to Top on Mobile */
    .audio-progress-container {
        top: 0 !important;
        bottom: auto !important;
    }
}

/* Tablet: 641px - 768px */
@media (min-width: 641px) and (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .clients-grid-flow {
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .app-container {
        aspect-ratio: 16/10;
    }
}

/* General Mobile & Tablet: Up to 768px */
@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        grid-column: span 1 !important;
        aspect-ratio: auto;
        min-height: 300px;
    }

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

    .about-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .bio-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .carousel-container {
        padding-bottom: 100px;
    }



    .creative-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Clients Grid - Single column on all mobile */
    .clients-grid-flow {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .spec-item {
        margin-bottom: 1.25rem;
    }

    /* Remove fixed header styling on mobile */
    .site-header {
        top: 0;
        width: 100%;
        border-radius: 0;
        border-top: none;
        border-left: none;
        border-right: none;
        background: rgba(0, 0, 0, 0.8);
        padding: 1rem 1.5rem;
    }

    /* Carousel adjustments */
    .carousel-container {
        padding: 0 1rem;
    }

    .carousel-nav-stack {
        display: flex;
        flex-direction: row;
        gap: 16px;
        margin-top: 1.5rem;
    }

    .carousel-arrow {
        width: 44px;
        height: 44px;
        border-radius: 50%;
    }

    .carousel-arrow svg {
        width: 18px;
        height: 18px;
    }

    /* Rotate chevrons to point left/right on mobile */
    .carousel-arrow-prev svg {
        transform: rotate(-90deg);
    }

    .carousel-arrow-next svg {
        transform: rotate(-90deg);
    }

    .carousel-slide-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .carousel-slide-text {
        font-size: 1.1rem;
        max-width: 100%;
    }

    /* Project Picker - Horizontal scroll on mobile */
    .picker-nav {
        display: flex;
        flex-direction: row;
        grid-template-columns: unset;
        gap: 1.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    .nav-item {
        min-width: max-content;
        flex: 0 0 auto;
    }

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

    .nav-desc {
        font-size: 0.7rem;
        max-width: 140px;
    }

    /* Active indicator on mobile */
    .nav-item.active::before {
        width: 24px;
    }

    /* Hero breathing room */
    .hero-section {
        padding-left: var(--space-buffer);
        padding-right: var(--space-buffer);
    }

    .hero-subtitle {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Section content padding */
    .info-spread-section {
        padding-left: var(--space-buffer);
        padding-right: var(--space-buffer);
    }


    /* Sectors log - prevent overflow */
    .sectors-log {
        word-break: break-word;
    }

    /* Metrics cards - ensure stacking */
    .bio-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    /* App container on mobile */
    .app-container {
        aspect-ratio: auto;
        min-height: 280px;
        height: 350px;
    }
}

/* Medium Tablet: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .carousel-container {
        padding: 0 60px;
    }

    .info-grid {
        gap: 3rem;
    }

    .about-container {
        gap: 3rem;
    }

    .app-container {
        aspect-ratio: 16/9.5;
    }

    .picker-nav {
        gap: 2rem;
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding-top: 100px;
    }



    .app-container {
        height: 350px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {

    /* Increase touch targets */
    .action-btn {
        min-height: 48px;
    }

    .nav-item {
        padding: 0.5rem 0;
    }

    .carousel-arrow,
    .picker-arrow {
        min-width: 44px;
        min-height: 44px;
    }

    /* Remove hover effects on touch devices */
    .spec-item:hover {
        border-color: rgba(255, 255, 255, 0.1);
    }

    .nav-item:hover {
        opacity: 0.5;
    }
}

/* Remove old specific styles */
.philosophy-section {
    display: none;
    /* Just in case */
}

/* Footer */
footer {
    padding: 4.5rem var(--space-buffer) 3rem;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

.footer-title {
    text-align: center;
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin: 0 auto 0.75rem;
    color: #fff;
    max-width: 1200px;
}

.footer-description {
    font-size: 1.35rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
    max-width: 80%;
    /* Matching the reduced width we set earlier for readability */
    margin: 0 auto 2rem;
}

/* Footer Actions */
.project-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    position: relative;
    /* Anchor indicator */
}

.footer-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;

    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;

    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn.terminal-btn {
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.7rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    white-space: nowrap;
}

/* Hover State */
.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(253, 254, 189, 0.4);
    transform: translateY(-2px);
}

.action-btn:hover .btn-text {
    color: var(--color-accent);
}

/* Active/Copied State */
.action-btn.copied {
    background: rgba(253, 254, 189, 0.15);
    border-color: var(--color-accent);
}

.action-btn.copied .btn-text {
    color: var(--color-accent);
}

.copyright {
    margin-top: 2rem;
    padding-bottom: 3rem;
    color: rgba(255, 255, 255, 0.25);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* Animations */
.reveal-text,
.reveal-text-delayed,
.project-card,
.section-title,
.about-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Delays */
.reveal-text:nth-child(2) {
    transition-delay: 0.1s;
}

.reveal-text:nth-child(3) {
    transition-delay: 0.2s;
}

.reveal-text-delayed {
    transition-delay: 0.3s;
}

/* --- System Divider --- */
.system-boundary {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 10rem;
    opacity: 0.8;
    width: 100%;
}

@media (max-width: 768px) {
    .system-boundary {
        justify-content: flex-start;
        padding: 2rem 1.25rem;
    }
}

.boundary-line {
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    width: 100%;
}

.boundary-terminal {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.15em;
    overflow: hidden;
    white-space: nowrap;
    display: block;
    width: 100%;
    text-overflow: clip;
    user-select: none;
}

@media (max-width: 768px) {
    .boundary-terminal {
        display: block;
    }
}

.boundary-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    text-shadow: 0 0 8px var(--color-accent-glow);
    white-space: nowrap;
}

.blink-text {
    animation: blink-soft 3s infinite;
}

@keyframes blink-soft {

    0%,
    100% {
        opacity: 1;
        text-shadow: 0 0 8px var(--color-accent-glow);
    }

    50% {
        opacity: 0.6;
        text-shadow: 0 0 2px var(--color-accent-glow);
    }
}

/* --- Post AI Carousel --- */
.carousel-container {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    padding: 0 1rem;
    padding-bottom: 20px;
}

.carousel-slides {
    position: relative;
    display: grid;
    grid-template-areas: "slide";
    min-height: auto;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- Pill Indicator (Centered Top) --- */
.pill-indicator-centered {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 1.25rem auto 1.5rem;
}

/* --- Carousel Navigation Stack (Below Slides) --- */
.carousel-nav-stack {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin: 1.25rem auto 0;
    justify-content: center;
}

.carousel-slide {
    grid-area: slide;
    align-self: start;
    position: relative;
    width: 100%;
    height: auto;
    opacity: 0;
    transform: translateY(20px);
    /* Default hidden below */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease;
    pointer-events: none;
    /* Center content within the slide */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    /* Removed extra top padding so it sits closer to header (which has 2rem margin) */
    background: var(--color-bg);
    /* Ensure background covers underlying slides */
    z-index: 0;
}

.carousel-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    z-index: 2;
}

.carousel-slide.exit-up {
    transform: translateY(-100%);
    opacity: 0;
}

.carousel-slide.exit-down {
    transform: translateY(100%);
    opacity: 0;
}

/* Helpers for initial states */
.carousel-slide.from-top {
    transform: translateY(-100%) !important;
    transition: none !important;
    opacity: 1 !important;
}

.carousel-slide.from-bottom {
    transform: translateY(100%) !important;
    transition: none !important;
    opacity: 1 !important;
}

/* --- Carousel Arrow Buttons --- */
.carousel-arrow {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: var(--font-mono);
}

/* Mobile carousel arrows handled in main mobile block above */

.carousel-arrow:hover {
    border-color: rgba(253, 254, 189, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-accent);
}

/* Clear legacy specific positioning if needed, 
   though they are now inside a flex container so left/right might not apply 
   if position is not absolute. */
.carousel-arrow-prev,
.carousel-arrow-next {
    left: auto;
    right: auto;
}


/* --- Carousel Typography --- */
.carousel-slide-title {
    font-size: clamp(3.5rem, 7vw, 5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 2.5rem;
    color: #ffffff;
    text-align: center;
}

.carousel-slide-title .highlight {
    color: #ffffff;
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.carousel-slide-text {
    font-size: 1.35rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
    text-align: center;
    max-width: 960px;
    margin: 0 auto;
}

.carousel-slide-text::first-line {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}


/* --- Section Introduction Text --- */
.section-intro {
    max-width: 960px;
    margin: 2rem auto 4rem;
    text-align: center;
}

.section-intro p {
    font-size: 1.35rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
}

.section-intro p::first-line {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.section-main-title {
    text-align: center;
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin: 1rem auto 3rem;
    color: #fff;
    max-width: 1200px;
}

/* --- IKEA Blue Glow Fix --- */
/* Overlay white shadow on edges to mask the blue vignette from screenshot */

/* === Visuals from the Past — Carousel === */
.visuals-section {
    padding: 0.5rem 0 0;
    overflow: hidden;
}

.visuals-section .section-header {
    padding: 0 var(--space-buffer);
}

.visuals-carousel-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Fade edges applied to the carousel itself */
.visuals-carousel {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 2.5rem 0 2.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    /* Hide scrollbar across browsers */
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Fade edges — starts after padding so first/last labels aren't clipped */
    mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
}

.visuals-carousel::-webkit-scrollbar {
    display: none;
}

.visuals-carousel:active {
    cursor: grabbing;
}

.visual-card {
    flex: 0 0 340px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    user-select: none;
}

.visual-card-img {
    aspect-ratio: 4/3;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0a0a0a;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.visual-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.visual-card:hover .visual-card-img {
    border-color: rgba(253, 254, 189, 0.2);
    box-shadow: 0 8px 30px -8px rgba(0, 0, 0, 0.6),
        0 0 60px -15px var(--color-accent-glow);
    transform: translateY(-4px);
}

.visual-card:hover .visual-card-img img {
    transform: scale(1.03);
}

.visual-card-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
    padding-left: 2px;
    transition: color 0.3s ease;
}

.visual-card:hover .visual-card-label {
    color: var(--color-text-main);
}

/* Visuals Carousel Arrows */
.visuals-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    padding: 0;
}

.visuals-arrow:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(253, 254, 189, 0.3);
    color: var(--color-text-main);
    transform: scale(1.08);
}

.visuals-arrow:active {
    transform: scale(0.95);
}

/* Responsive: smaller cards on mobile */
@media (max-width: 768px) {
    .visuals-carousel {
        gap: 1rem;
        padding: 1rem 1rem 0 1rem;
        scroll-snap-type: x mandatory;
    }

    .visual-card {
        flex: 0 0 calc(100% - 2rem);
        scroll-snap-align: center;
    }

    .visuals-arrow {
        width: 30px;
        height: 30px;
    }
}