/* ── TOKENS ── */
:root {
    --bg: #080810;
    --surface: rgba(255,255,255,0.04);
    --surface-hover: rgba(255,255,255,0.08);
    --border: rgba(255,255,255,0.08);
    --border-hover: rgba(255,255,255,0.2);
    --text: #e8e8f0;
    --text-muted: #888;
    --text-dim: #555;
    --accent: #7c6fcd;
    --accent-glow: rgba(124,111,205,0.3);
    --mono: 'IBM Plex Mono', monospace;
    --sans: 'Inter', sans-serif;
    --radius: 2px;
    --transition: 350ms cubic-bezier(0.19, 1, 0.22, 1);
}

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

/* smooth scrolling is JS-driven (1.75s easeInOutExpo in site.js);
   native smooth would fight it */
html { scroll-behavior: auto; }

/* anchor targets land clear of the fixed nav */
section[id], #explorations, #latest, #ai-work, #creative-tech, #about, #contact {
    scroll-margin-top: 84px;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: opacity var(--transition);
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ── WEBGL CANVAS ── */
canvas.webgl {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* black dim layer between the WebGL corridor and the content */
#bg-dim {
    position: fixed;
    inset: 0;
    background: #000;
    /* starts fully black; script.js expo-eases it down to the resting value
       so the corridor fades in on arrival instead of popping */
    opacity: 1;
    z-index: 1;
    pointer-events: none;
}

/* ── UTILITIES ── */
.mono { font-family: var(--mono); }

/* ── NAV ── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 48px;
    background: linear-gradient(to bottom, rgba(8,8,16,0.9), transparent);
    backdrop-filter: blur(8px);
}

.nav-logo {
    font-family: var(--mono);
    font-size: 0.85em;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    font-weight: 400;
    cursor: pointer;
    transition: color var(--transition);
}

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

/* hamburger: hidden on desktop, takes over below 820px */
.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    position: relative;
    z-index: 3;
}

.nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: transform var(--transition), opacity var(--transition);
}

@media (max-width: 820px) {
    /* collapse applies only to the main nav (.nav-collapsible), so sub-page
       navs without a burger keep their inline links.
       backdrop-filter would make .nav the containing block for the
       fixed full-screen menu — drop it on mobile */
    .nav-collapsible { padding: 14px 20px; backdrop-filter: none; background: linear-gradient(to bottom, rgba(5,3,2,0.92), rgba(5,3,2,0.55) 70%, transparent); }
    .nav-logo { position: relative; z-index: 3; }
    .nav-collapsible .nav-burger { display: flex; }

    .nav-collapsible .nav-links { display: none; }

    .nav.nav-open .nav-links {
        display: flex;
        position: fixed;
        inset: 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        background: rgba(5, 3, 2, 0.94);
        backdrop-filter: blur(14px);
        z-index: 2;
    }

    .nav.nav-open .nav-links a {
        font-size: 1.3em;
        letter-spacing: 0.14em;
        padding: 6px 12px;
    }

    .nav.nav-open .lang-toggle {
        font-size: 1em;
        margin-top: 14px;
        padding: 10px 18px;
    }

    .nav.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
    .nav.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.82em;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 400;
    transition: color var(--transition);
}

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

.lang-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-dim);
    font-family: var(--mono);
    font-size: 0.72em;
    letter-spacing: 0.08em;
    padding: 5px 10px;
    cursor: pointer;
    transition: border-color var(--transition);
}

.lang-toggle:hover { border-color: var(--border-hover); }

.lang-toggle span { color: var(--text-dim); transition: color var(--transition); }
.lang-toggle .lang-sep { margin: 0 4px; }
.lang-toggle span.on { color: var(--text); }

/* ── HERO ── */
.hero {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 64px;
    align-items: center;
    padding: 120px 48px 80px;
    max-width: 1280px;
    margin: 0 auto;
}

.hero-label {
    font-size: 0.75em;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    margin-bottom: 28px;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2.8em, 5vw, 4.5em);
    font-weight: 200;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
    color: #fff;
}

.hero-static {
    display: block;
    color: var(--text-muted);
}

.hero-typewriter {
    display: block;
    min-height: 1.15em;
    color: #fff;
    position: relative;
}

.hero-typewriter::after {
    content: '▊';
    display: inline;
    animation: blink 1s step-end infinite;
    color: var(--accent);
    font-size: 0.8em;
    margin-left: 2px;
}

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

.hero-sub {
    font-size: 1em;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: 32px;
    font-weight: 300;
}

.hero-sub a {
    color: var(--text);
    border-bottom: 1px solid var(--border-hover);
    padding-bottom: 1px;
}

.hero-sub a:hover { border-color: var(--accent); color: #fff; }

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
}

.tag {
    font-family: var(--mono);
    font-size: 0.72em;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.tag:hover,
.tag.tag-active {
    border-color: var(--accent);
    color: var(--text);
    background: var(--accent-glow);
}

.cta-btn {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.82em;
    letter-spacing: 0.1em;
    color: var(--text);
    border: 1px solid var(--border-hover);
    padding: 12px 28px;
    transition: all var(--transition);
}

.cta-btn:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: #fff;
}

/* ── TERMINAL ── */
.hero-terminal {
    background: rgba(10,10,20,0.85);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    font-family: var(--mono);
    font-size: 0.78em;
    backdrop-filter: blur(12px);
    box-shadow: 0 32px 64px rgba(0,0,0,0.6);
}

.terminal-bar {
    display: flex;
    gap: 7px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid var(--border);
}

.terminal-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-dim);
}

.terminal-bar span:nth-child(1) { background: #ff5f57; }
.terminal-bar span:nth-child(2) { background: #ffbd2e; }
.terminal-bar span:nth-child(3) { background: #28ca41; }

.terminal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 280px;
}

.t-line { line-height: 1.7; }
.t-blank { height: 8px; }

.t-prompt { color: var(--accent); margin-right: 8px; }
.t-cmd { color: #7ec8e3; }
.t-out { color: var(--text-muted); padding-left: 16px; }
.t-highlight { color: #a8e6cf; }
.t-cursor { color: var(--accent); animation: blink 1s step-end infinite; }

/* the terminal is real: folders are links, the prompt takes input */
.t-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    border-radius: 3px;
    padding: 1px 4px;
    margin: -1px -4px;
    transition: color var(--transition), background var(--transition);
}
.t-link:hover, .t-link:focus-visible {
    color: var(--text);
    background: rgba(255, 161, 77, 0.14);
    outline: none;
}
.t-input-row { display: flex; align-items: center; }
.t-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 0;
    color: var(--text);
    font: inherit;
    outline: none;
    caret-color: var(--accent);
}
.t-err { color: #ff6a55; }
.t-ascii { white-space: pre; line-height: 1.15; font-size: 0.85em; color: var(--accent); padding-left: 16px; }
.terminal-body.term-live { overflow-y: auto; }

/* traffic lights behave like a real window */
.terminal-bar span { cursor: pointer; transition: transform var(--transition), filter var(--transition); }
.terminal-bar span:hover { transform: scale(1.25); filter: brightness(1.3); }
.hero-terminal.term-min .terminal-body { display: none; }
.hero-terminal.term-max {
    position: fixed;
    inset: 6vh 8vw;
    z-index: 1000;
    background: rgba(8, 8, 14, 0.96);
    max-width: none;
    font-size: 0.9em;
    display: flex;
    flex-direction: column;
}
.hero-terminal.term-max .terminal-body { flex: 1; height: auto !important; max-height: none; overflow-y: auto; }
/* smart dock: ignored terminal tucks itself into the bottom-left corner */
.hero-terminal.term-docked {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 250;
    width: 270px;
    max-width: calc(100vw - 40px);
    cursor: pointer;
    background: rgba(10, 10, 18, 0.96);
    animation: dock-pulse 3.2s ease-in-out infinite;
}
.hero-terminal.term-docked .terminal-body { display: none !important; }
.hero-terminal.term-docked .terminal-bar { border-bottom: none; }
.terminal-bar span.terminal-bar-title {
    display: none;
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    margin-left: 10px;
    font-size: 0.72em;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.terminal-bar span.terminal-bar-title:hover { transform: none; filter: none; }
.hero-terminal.term-docked .terminal-bar-title { display: inline; }
.hero-terminal.term-docked:hover .terminal-bar-title { color: var(--text); }
@keyframes dock-pulse {
    0%, 100% { box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 0 0 var(--accent-glow); }
    50%      { box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 26px 4px var(--accent-glow); }
}
@keyframes term-shake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(3px); }
    30%, 50%, 70% { transform: translateX(-5px); }
    40%, 60% { transform: translateX(5px); }
}
.hero-terminal.term-shake { animation: term-shake 420ms ease; }

/* nube-lamp scene simulation */
.nube-sim {
    margin: 8px 0 4px 16px;
    width: min(300px, 90%);
    border: 1px solid var(--border);
    border-radius: 6px;
    background: linear-gradient(180deg, #14121f 0%, #090812 100%);
    padding: 18px 16px 12px;
}
.nube-cloud {
    width: 110px;
    height: 38px;
    margin: 8px auto 14px;
    border-radius: 24px;
    background: radial-gradient(circle at 30% 30%, var(--nc3, #b8c4e0), var(--nc2, #7c6fcd));
    box-shadow:
        -28px 6px 0 -6px var(--nc2, #7c6fcd),
        30px 8px 0 -8px var(--nc1, #3a4a6b),
        0 0 34px 10px var(--nc4, #ffd27a);
    animation: nube-glow 4s ease-in-out infinite alternate;
}
@keyframes nube-glow {
    from { box-shadow: -28px 6px 0 -6px var(--nc2, #7c6fcd), 30px 8px 0 -8px var(--nc1, #3a4a6b), 0 0 26px 6px var(--nc4, #ffd27a); filter: hue-rotate(0deg); }
    to   { box-shadow: -28px 6px 0 -6px var(--nc1, #3a4a6b), 30px 8px 0 -8px var(--nc3, #b8c4e0), 0 0 44px 16px var(--nc2, #7c6fcd); filter: hue-rotate(18deg); }
}
.nube-swatches { display: flex; gap: 6px; justify-content: center; }
.nube-swatches span { width: 22px; height: 10px; border-radius: 2px; border: 1px solid rgba(255,255,255,0.15); }
.terminal-body::-webkit-scrollbar { width: 4px; }
.terminal-body::-webkit-scrollbar-thumb { background: rgba(255, 161, 77, 0.25); border-radius: 2px; }

/* ── SECTIONS ── */
.section {
    position: relative;
    z-index: 10;
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 48px;
}

.section-header {
    margin-bottom: 56px;
}

.section-label {
    font-size: 0.72em;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(2em, 3.5vw, 3em);
    font-weight: 200;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 12px;
}

.section-title-sm {
    font-size: clamp(1.5em, 2.5vw, 2em);
}

.section-desc {
    color: var(--text-muted);
    font-size: 0.95em;
    max-width: 500px;
    font-weight: 300;
}

.section-secondary { padding-top: 40px; }

/* ── BENTO GRID ── */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto auto;
    gap: 16px;
}

.bento-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    grid-column: span 6;
}

.bento-featured {
    grid-column: span 8;
}

.bento-wide {
    grid-column: span 8;
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--card-accent, var(--accent));
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 2;
}

.bento-card:hover::before { opacity: 1; }

.bento-card:hover .bento-category {
    color: var(--card-accent, var(--accent));
}

.bento-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px var(--border-hover);
}

.bento-card:hover .bento-media-overlay {
    opacity: 0;
}

.bento-media {
    width: 100%;
    height: 260px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.bento-media img {
    transition: transform 600ms cubic-bezier(0.19, 1, 0.22, 1);
}

.bento-card:hover .bento-media img {
    transform: scale(1.04);
}

.bento-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bento-media-video { cursor: pointer; }

.bento-play-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 3;
    font-size: 0.62em;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    background: rgba(8,8,16,0.6);
    backdrop-filter: blur(4px);
    padding: 5px 10px;
    border-radius: 3px;
    pointer-events: none;
    transition: opacity var(--transition);
}

.bento-card:hover .bento-play-hint { opacity: 0.4; }

.bento-media-sq {
    height: 220px;
}

.bento-media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8,8,16,0.7), transparent 60%);
    transition: opacity var(--transition);
}

.bento-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.bento-category {
    font-size: 0.68em;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    text-transform: uppercase;
}

.bento-title {
    font-size: 1.15em;
    font-weight: 400;
    color: #fff;
    line-height: 1.3;
}

.bento-desc {
    font-size: 0.88em;
    color: var(--text-muted);
    line-height: 1.6;
    font-weight: 300;
    flex: 1;
}

.bento-link {
    font-family: var(--mono);
    font-size: 0.72em;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    transition: color var(--transition);
    margin-top: 8px;
    align-self: flex-start;
}

.bento-card:hover .bento-link {
    color: var(--text);
}

/* ── SECTION DIVIDER ── */
.section-divider {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 48px;
    max-width: 1280px;
    margin: 0 auto;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider-text {
    font-size: 0.68em;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    text-transform: uppercase;
    white-space: nowrap;
}

/* ── CREATIVE TECH GRID ── */
.ct-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.ct-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    transition: all var(--transition);
}

.ct-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    background: var(--surface-hover);
}

.ct-media {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.ct-media img {
    transition: transform 600ms cubic-bezier(0.19, 1, 0.22, 1);
}

.ct-card:hover .ct-media img {
    transform: scale(1.05);
}

.ct-media-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    background: rgba(255,255,255,0.03);
}

.ct-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ct-tags {
    font-size: 0.65em;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    text-transform: uppercase;
}

.ct-title {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text);
    line-height: 1.3;
}

.ct-desc {
    font-size: 0.8em;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.5;
}

.ct-link {
    font-family: var(--mono);
    font-size: 0.68em;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-top: 4px;
    transition: color var(--transition);
}

.ct-card:hover .ct-link { color: var(--text); }

/* ── CONTACT ── */
.contact-section {
    padding-top: 120px;
    padding-bottom: 120px;
}

.contact-inner {
    max-width: 640px;
}

.contact-label {
    font-size: 0.72em;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.contact-title {
    font-size: clamp(2.2em, 4vw, 3.5em);
    font-weight: 200;
    letter-spacing: -0.02em;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 24px;
}

.contact-body {
    color: var(--text-muted);
    font-size: 0.95em;
    line-height: 1.7;
    font-weight: 300;
    margin-bottom: 40px;
}

.contact-links {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.contact-btn {
    font-family: var(--mono);
    font-size: 0.82em;
    letter-spacing: 0.1em;
    color: var(--text);
    border: 1px solid var(--border-hover);
    padding: 12px 28px;
    transition: all var(--transition);
}

.contact-btn:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
}

.contact-btn-ghost {
    border-color: var(--border);
    color: var(--text-muted);
}

.contact-at {
    font-size: 0.78em;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}

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

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .fade-in { opacity: 1; transform: none; transition: none; }
    .hero-typewriter::after, .t-cursor { animation: none; }
}

/* ── FOOTER ── */
footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 32px 48px;
    border-top: 1px solid var(--border);
}

footer p {
    font-size: 0.72em;
    letter-spacing: 0.1em;
    color: var(--text-dim);
}

footer a {
    color: var(--text-dim);
    transition: color var(--transition);
}

footer a:hover { color: var(--text); }

/* ── FADE IN ── */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 900ms cubic-bezier(0.19, 1, 0.22, 1), transform 900ms cubic-bezier(0.19, 1, 0.22, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── BENTO META ROWS ── */
.bento-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 0 2px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.bento-meta-item {
    font-size: 0.68em;
    letter-spacing: 0.06em;
    color: var(--text-dim);
}

/* ── ABOUT ── */
.about-section { padding-top: 100px; }

.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 64px;
    align-items: start;
}

.about-body {
    color: var(--text-muted);
    font-size: 0.95em;
    line-height: 1.75;
    font-weight: 300;
    margin-bottom: 1.2em;
}

.about-body strong { color: var(--text); font-weight: 500; }

/* ── ABOUT · HUD readout (same language as the port monitor: corner
   brackets, mono caps, hairline rulers, thin numerals, one lit hue) ── */
.hud-stage { margin-top: 52px; perspective: 1200px; }
.hud {
    --hud-lit: #b9b3ff;
    --hud-line: rgba(185,179,255,0.2);
    --hud-dim: rgba(185,179,255,0.16);
    --hud-ok: #7be0a8;
    position: relative;
    padding: 20px 24px 6px;
    transform-style: preserve-3d;   /* no overflow / backdrop-filter here: either would flatten the depth */
}
/* the glass itself, flat at z=0; everything else floats in front of it */
.hud-plate {
    position: absolute; inset: 0; overflow: hidden; pointer-events: none;
    background:
        radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(185,179,255,0.11), transparent 58%),
        linear-gradient(180deg, rgba(12,10,28,0.74), rgba(10,9,24,0.58));
    border: 1px solid rgba(185,179,255,0.12);
    box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7), 0 0 40px -10px rgba(124,111,205,0.25);
}
.hud::before, .hud::after { content: ''; position: absolute; width: 22px; height: 22px; pointer-events: none; transform: translateZ(22px); }
.hud::before { top: -1px; left: -1px; border-top: 2px solid var(--hud-lit); border-left: 2px solid var(--hud-lit); }
.hud::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--hud-lit); border-right: 2px solid var(--hud-lit); }

.hud-scan {
    position: absolute; left: 0; right: 0; top: 0; height: 1px; opacity: 0; pointer-events: none;
    background: linear-gradient(90deg, transparent, var(--hud-lit), transparent);
    box-shadow: 0 0 12px var(--hud-lit);
}
.about-grid.visible .hud-scan { animation: hud-scan 1.9s cubic-bezier(0.45, 0, 0.2, 1) 0.2s 1 both; }
@keyframes hud-scan { 0% { top: 0; opacity: 0; } 10% { opacity: 0.85; } 90% { opacity: 0.45; } 100% { top: 100%; opacity: 0; } }

.hud-head { transform: translateZ(16px); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--hud-line); }
.hud-id { font-size: 0.6em; letter-spacing: 0.24em; color: rgba(200,196,240,0.5); text-transform: uppercase; }

.hud-pill {
    display: inline-flex; align-items: center; gap: 7px; flex: none;
    padding: 4px 10px 4px 8px;
    font-family: var(--mono); font-size: 0.62em; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
    color: #fff; background: rgba(185,179,255,0.08); border: 1px solid rgba(185,179,255,0.5);
}
.hud-pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--hud-lit); box-shadow: 0 0 6px var(--hud-lit); }
.hud-pill-ok { color: #c9f7de; background: rgba(123,224,168,0.07); border-color: rgba(123,224,168,0.55); }
.hud-pill-ok i { background: var(--hud-ok); box-shadow: 0 0 6px var(--hud-ok); animation: hud-pulse 2.4s ease-in-out infinite; }
@keyframes hud-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(123,224,168,0.55); } 50% { box-shadow: 0 0 0 5px rgba(123,224,168,0); } }

.hud-row { transform: translateZ(8px); transform-style: preserve-3d; display: flex; flex-direction: column; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--hud-line); }
.hud-row:last-child { border-bottom: none; }
.hud-label { font-size: 0.62em; letter-spacing: 0.26em; text-transform: uppercase; color: rgba(200,196,240,0.55); }

.hud-base { flex-direction: row; align-items: center; gap: 16px; }
.hud-base-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.hud-base-main { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.hud-city { font-size: 0.95em; font-weight: 300; color: var(--text); }
.hud-clock {
    transform: translateZ(20px); transform-origin: 0 50%;
    display: flex; align-items: baseline; gap: 8px;
    font-family: var(--mono); font-weight: 300; font-size: 1.7rem; line-height: 1; letter-spacing: 0.06em;
    color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 0 16px rgba(185,179,255,0.35);
}
.hud-tz { font-size: 0.36em; letter-spacing: 0.22em; color: var(--hud-lit); padding: 3px 6px; border: 1px solid var(--hud-line); text-shadow: none; }
.hud-coord { overflow: hidden; display: flex; align-items: center; gap: 12px; font-size: 0.6em; letter-spacing: 0.22em; color: rgba(200,196,240,0.5); white-space: nowrap; }
.hud-trace { position: relative; flex: 1; height: 1px; border-top: 1px dotted rgba(185,179,255,0.38); margin-right: 28px; }
.hud-trace::after {
    content: ''; position: absolute; right: -28px; top: -7px; width: 24px; height: 13px;
    background: repeating-linear-gradient(90deg, rgba(185,179,255,0.75) 0 1px, transparent 1px 3px);
}

.hud-big { display: flex; align-items: baseline; gap: 14px; }
.hud-num {
    transform: translateZ(20px); transform-origin: 0 50%;
    font-family: var(--sans); font-weight: 200; font-size: clamp(2.6rem, 5vw, 3.4rem); line-height: 1; letter-spacing: -0.02em;
    color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(185,179,255,0.35);
}
.hud-unit { font-family: var(--mono); font-size: 0.7em; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-muted); }

/* experience: a 0–25 ruler, 20 lit and a dim run-out for the "+" */
.hud-ticks { display: grid; grid-template-columns: repeat(26, 1fr); align-items: end; height: 16px; margin-top: 4px; }
.hud-ticks i { display: block; width: 1px; height: 7px; background: var(--hud-dim); transition: background 0.4s, box-shadow 0.4s; }
.hud-ticks i:nth-child(5n + 1) { height: 13px; }
.about-grid.visible .hud-ticks i.on {
    background: var(--hud-lit); box-shadow: 0 0 6px rgba(185,179,255,0.7);
    transition-delay: calc(var(--i) * 32ms + 350ms);
}

/* recognition: one ring per award, drawn in turn */
.hud-rings { display: flex; gap: 12px; margin-top: 4px; }
.hud-rings svg { width: 30px; height: 30px; overflow: visible; }
.hud-rings .r-base { fill: none; stroke: var(--hud-dim); stroke-width: 1.5; }
.hud-rings .r-arc {
    fill: none; stroke: var(--hud-lit); stroke-width: 1.8;
    stroke-dasharray: 0 100; transform: rotate(-90deg); transform-origin: 50% 50%;
    filter: drop-shadow(0 0 3px var(--hud-lit));
    transition: stroke-dasharray 0.9s cubic-bezier(0.19, 1, 0.22, 1) calc(var(--i) * 170ms + 400ms);
}
.hud-rings .r-dot { fill: rgba(185,179,255,0.35); transition: fill 0.5s calc(var(--i) * 170ms + 900ms); }
.about-grid.visible .hud-rings .r-arc { stroke-dasharray: 100 0; }
.about-grid.visible .hud-rings .r-dot { fill: #fff; }

.hud-now { display: flex; align-items: center; gap: 10px; font-size: 0.95em; font-weight: 300; color: var(--text); }
.hud-dot { flex: none; width: 6px; height: 6px; background: var(--hud-lit); box-shadow: 0 0 8px var(--hud-lit); transform: rotate(45deg); }
.hud-open-line { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.hud-open-text { flex: 1 1 200px; font-size: 0.9em; font-weight: 300; line-height: 1.5; color: var(--text); }

@media (max-width: 480px) {
    .hud { padding: 18px 18px 4px; }
    .hud-clock { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
    .hud-scan { display: none; }
    .hud-ticks i.on { background: var(--hud-lit); transition: none; }
    .hud-rings .r-arc { stroke-dasharray: 100 0; transition: none; }
    .hud-rings .r-dot { fill: #fff; transition: none; }
    .hud-pill-ok i { animation: none; }
}

/* ── LIDER SECTION ── */
.section-latest {
    padding-bottom: 40px;
}

.lider-meta {
    display: flex;
    gap: 48px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.lider-meta-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lider-meta-label {
    font-size: 0.65em;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    text-transform: uppercase;
}

.lider-meta-value {
    font-size: 0.9em;
    color: var(--text);
    font-weight: 300;
}

.case-header {
    margin-bottom: 40px;
}

.case-header-sep {
    border-top: 2px solid var(--border-hover);
    padding-top: 48px;
    margin-top: 72px;
}

.case-title {
    font-size: 1.7em;
    font-weight: 300;
    letter-spacing: -0.01em;
    color: #fff;
    margin: 8px 0 12px;
}

.case-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 36px;
}

.case-gallery figure {
    margin: 0;
}

.case-gallery img {
    width: 100%;
    display: block;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: border-color var(--transition);
}

.case-gallery figure:hover img {
    border-color: var(--border-hover);
}

.case-gallery figcaption {
    font-size: 0.68em;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    padding-top: 10px;
    text-transform: uppercase;
}

.case-flow {
    margin-top: 36px;
}

.case-flow img,
.case-flow video {
    width: 100%;
    display: block;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.case-flow-caption {
    font-size: 0.68em;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    padding-top: 10px;
    text-transform: uppercase;
}

.case-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 36px;
}

.case-visit {
    display: inline-block;
}

.case-soon {
    font-size: 0.72em;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    border: 1px dashed var(--border);
    border-radius: 4px;
    padding: 28px;
    text-align: center;
    margin-top: 32px;
}

.lider-sub {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 40px;
    border-top: 1px solid var(--border);
    padding-top: 36px;
    margin-bottom: 48px;
}

.lider-sub-full {
    display: block;
}

.lider-sub-label {
    font-size: 0.68em;
    letter-spacing: 0.18em;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 18px;
}

.lider-sub-title {
    font-size: 1.25em;
    font-weight: 400;
    color: #fff;
    margin-bottom: 10px;
}

.lider-sub-desc {
    font-size: 0.86em;
    color: var(--text-muted);
    line-height: 1.7;
    font-weight: 300;
}

.lider-sub-videos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.lider-feature-media {
    position: relative;
    aspect-ratio: 16/9;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--transition);
}

.lider-feature-media:hover { border-color: var(--border-hover); }

.lider-feature-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lider-feature-info {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 40px;
    padding: 24px 4px 0;
}

.lider-feature-title {
    font-size: 1.6em;
    font-weight: 300;
    color: #fff;
    letter-spacing: -0.01em;
    margin-top: 8px;
}

.lider-feature-desc {
    font-size: 0.92em;
    color: var(--text-muted);
    line-height: 1.7;
    font-weight: 300;
    margin-bottom: 14px;
}


.lider-video-wrap {
    position: relative;
    aspect-ratio: 9/16;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}

.lider-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 600ms cubic-bezier(0.19, 1, 0.22, 1);
}

.lider-video-wrap:hover video {
    transform: scale(1.03);
}

.lider-video-caption {
    padding: 14px 4px 0;
}

.lider-video-label {
    font-size: 0.65em;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.lider-video-desc {
    font-size: 0.78em;
    color: var(--text-muted);
    line-height: 1.55;
    font-weight: 300;
}

.lider-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    padding-top: 32px;
}

.breakdown-title {
    font-family: var(--mono);
    font-size: 0.72em;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 12px;
    font-weight: 400;
}

.breakdown-body {
    font-size: 0.88em;
    color: var(--text-muted);
    line-height: 1.75;
    font-weight: 300;
}

.breakdown-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.breakdown-step {
    display: flex;
    gap: 14px;
    align-items: baseline;
}

.breakdown-step-num {
    font-size: 0.7em;
    color: var(--accent);
    letter-spacing: 0.1em;
    flex-shrink: 0;
    padding-top: 2px;
}

.breakdown-step-text {
    font-size: 0.84em;
    color: var(--text-muted);
    line-height: 1.65;
    font-weight: 300;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 100px 32px 60px;
        min-height: auto;
        gap: 48px;
    }

    .hero-terminal { max-width: 480px; }

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

    .bento-card, .bento-featured, .bento-wide {
        grid-column: span 1;
    }

    .ct-grid { grid-template-columns: repeat(2, 1fr); }

    .section { padding: 60px 32px; }
    .section-divider { padding: 0 32px; }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hud-stage { margin-top: 0; }

    .lider-sub {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 640px) {
    .t-input { font-size: 16px; }   /* under 16px iOS zooms the page on focus */

    .nav { padding: 16px 24px; }
    .nav-links { gap: 20px; }
    .nav-links a { font-size: 0.78em; }

    .hero { padding: 90px 24px 48px; }

    .bento-grid { grid-template-columns: 1fr; }
    .bento-card, .bento-featured, .bento-wide { grid-column: span 1; }
    .bento-media, .bento-media-sq { height: 200px; }

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

    .section { padding: 48px 24px; }
    .section-divider { padding: 0 24px; }

    .contact-section { padding: 80px 24px; }
    .contact-links { gap: 16px; }

    .lider-sub-videos { grid-template-columns: repeat(2, 1fr); }

    .case-gallery { grid-template-columns: 1fr; }

    .lider-feature-info {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    footer { padding: 24px; }
}

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

/* ── EXPLORATIONS: one wide card (media left, copy right) ── */
.section-explore { padding-bottom: 40px; }   /* first section after the hero: normal top padding, tight bottom into "latest" */
.bento-explore { grid-column: span 12; flex-direction: row; }
.bento-explore .bento-media { width: 58%; height: auto; min-height: 340px; }
.bento-explore .bento-media img { width: 100%; height: 100%; object-fit: cover; }
.bento-explore .bento-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 1024px) {
    .bento-explore { flex-direction: column; grid-column: 1 / -1; }
    .bento-explore .bento-media { width: 100%; height: 240px; min-height: 0; }
}

/* ── PHONES: no terminal, light video chrome ── */
.is-phone .hero-terminal { display: none !important; }
.is-phone .hero { min-height: auto; }

.vid-sound {
    display: none;
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 4;
    align-items: center;
    gap: 7px;
    font: inherit;
    font-size: 0.62em;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(8,8,16,0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.vid-sound .vs-on, .vid-sound .vs-ico-on { display: none; }
.is-unmuted .vid-sound .vs-on { display: inline; }
.is-unmuted .vid-sound .vs-ico-on { display: block; }
.is-unmuted .vid-sound .vs-off, .is-unmuted .vid-sound .vs-ico-off { display: none; }

@media (hover: none) {
    .vid-sound { display: inline-flex; }
    .bento-play-hint { display: none; }
}

/* ── Canela: third video, coming soon ── */
.lider-sub-videos-3 { grid-template-columns: repeat(3, 1fr); }
.lider-video-soon { position: relative; }
.vid-soon {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 4;
    font-size: 0.58em;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(8,8,16,0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 5px 10px;
    pointer-events: none;
}
@media (max-width: 640px) {
    .lider-sub-videos-3 { grid-template-columns: repeat(2, 1fr); }
    .lider-sub-videos-3 .lider-video-soon { grid-column: 1 / -1; width: calc(50% - 6px); justify-self: center; }
}

/* ── 3D PANELS: float, pan with scroll, tilt toward the pointer ──
   site.js drives the individual `rotate` / `translate` properties, so they
   compose with each card's own hover transform instead of fighting it.
   Perspective lives on the grids; the cards must not animate those two
   properties through the old `transition: all`. */
.bento-grid, .ct-grid { perspective: 1600px; }
.bento-card, .ct-card {
    transition: border-color var(--transition), background var(--transition),
                transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}
.f3d-live { will-change: rotate, translate; }

/* ── HUD map: the Netherlands as a halftone, Hilversum as the live dot ── */
.hud-map { flex: none; width: 98px; height: auto; overflow: visible; transform: translateZ(14px); }
.hud-map .m-dots { fill: none; stroke: rgba(185,179,255,0.5); stroke-width: 1.6; stroke-linecap: round; }
.hud-map .m-coast { fill: none; stroke: rgba(185,179,255,0.55); stroke-width: 0.6; stroke-linejoin: round; }
.hud-map .m-lake { stroke: rgba(185,179,255,0.3); stroke-dasharray: 1.5 1.5; }
.hud-map .m-grid { stroke: rgba(185,179,255,0.28); stroke-width: 0.5; stroke-dasharray: 1 2.5; fill: none; }
.hud-map .m-pin { fill: #fff; filter: drop-shadow(0 0 4px var(--hud-lit)) drop-shadow(0 0 8px var(--hud-lit)); }
.hud-map .m-ring { fill: none; stroke: var(--hud-lit); stroke-width: 0.8; transform-box: fill-box; transform-origin: center; opacity: 0; }
.about-grid.visible .hud-map .m-ring { animation: hud-ping 2.8s cubic-bezier(0.2, 0.6, 0.3, 1) infinite; }
.about-grid.visible .hud-map .m-ring2 { animation-delay: 1.4s; }
@keyframes hud-ping { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(5); opacity: 0; } }
@media (max-width: 480px) {
    .hud-map { width: 84px; }
    .hud-trace { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hud-map .m-ring { animation: none !important; opacity: 0.5; } }

/* ── CT cards without a GIF: the case's own captures, cross-faded ── */
.ct-slides { position: relative; }
.ct-slides img { position: absolute; inset: 0; opacity: 0; animation: ct-slide 10.5s ease-in-out infinite; }
.ct-slides img:nth-child(2) { animation-delay: 3.5s; }
.ct-slides img:nth-child(3) { animation-delay: 7s; }
@keyframes ct-slide { 0% { opacity: 0; } 6% { opacity: 1; } 33% { opacity: 1; } 40% { opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .ct-slides img { animation: none; }
    .ct-slides img:first-child { opacity: 1; }
}
