/* ============================================================
   YEEMS214.XYZ — REBUILD-2 · "STEALTH OPERATOR, DIRECTOR'S CUT"
   Palette + type carried over from stealth-operator.css
   ============================================================ */

:root {
    --bg-0: #0a0a0a;
    --bg-1: #141414;
    --surface-0: #1a1a1a;
    --surface-1: #222222;
    --border-0: #333333;
    --border-hi: #444444;
    --text-0: #e0e0e0;
    --text-muted: #888888;
    --text-dim: #666666;
    --accent: #00f0ff;
    --accent-muted: #007a82;
    /* text-safe muted cyan — ≥4.5:1 on surface-0 (use for small mono text; keep --accent-muted for borders) */
    --accent-muted-text: #00aab5;
    --amber: #ffaa00;
    --ok: #00ff41;
    --err: #ff3333;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --unit: 8px;
    --pad-x: clamp(20px, 5vw, 96px);
}

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

html {
    scroll-behavior: auto;
    /* Lenis owns scrolling */
}

html.lenis,
html.lenis body {
    height: auto;
}

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

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

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

.mono {
    font-family: var(--font-mono);
    letter-spacing: 0.12em;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 4px;
}

img,
video {
    max-width: 100%;
    display: block;
}

/* ============ AMBIENT LAYERS ============ */

.blueprint-grid {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

.grain {
    position: fixed;
    inset: -100px;
    z-index: 90;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain-shift 0.9s steps(4) infinite;
}

@keyframes grain-shift {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-30px, 20px); }
    50% { transform: translate(20px, -35px); }
    75% { transform: translate(-15px, -20px); }
    100% { transform: translate(25px, 30px); }
}

/* ============ PRELOADER ============ */

.preloader {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--bg-0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s;
}

.preloader.is-done {
    opacity: 0;
    visibility: hidden;
}

.preloader__inner {
    width: min(420px, 80vw);
}

.preloader__line {
    color: var(--text-dim);
    font-size: 0.75rem;
    margin-bottom: calc(var(--unit) * 2);
}

.preloader__pct {
    color: var(--accent);
    font-size: 2.5rem;
    margin-bottom: var(--unit);
}

.preloader__bar {
    height: 2px;
    background: var(--border-0);
    overflow: hidden;
}

.preloader__bar span {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--accent);
}

/* ============ CURSOR ============ */

.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 150;
    pointer-events: none;
    border-radius: 50%;
    display: none;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
}

.cursor-ring {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(0, 240, 255, 0.35);
    transition: border-color 0.25s ease, background 0.25s ease;
}

.cursor-ring.is-active {
    border-color: var(--accent);
    background: rgba(0, 240, 255, 0.08);
}

@media (hover: hover) and (pointer: fine) {

    .cursor-dot,
    .cursor-ring {
        display: block;
    }
}

/* ============ NAV ============ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(var(--unit) * 3);
    padding: calc(var(--unit) * 2.5) var(--pad-x);
    font-size: 0.72rem;
    background: linear-gradient(rgba(10, 10, 10, 0.85), transparent);
    transition: transform 0.4s ease;
}

.nav.is-hidden {
    transform: translateY(-100%);
}

.nav__logo {
    color: var(--accent);
    font-weight: 500;
}

.nav__links {
    display: flex;
    gap: calc(var(--unit) * 4);
}

.nav__links a,
.nav__status {
    color: var(--text-muted);
}

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

.nav__status {
    display: flex;
    align-items: center;
    gap: var(--unit);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 8px var(--ok);
    animation: ping 2.4s ease-in-out infinite;
}

.status-dot.is-off {
    background: var(--err);
    box-shadow: 0 0 8px var(--err);
    animation: none;
}

@keyframes ping {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* ============ SHARED SECTION BITS ============ */

section {
    position: relative;
    z-index: 2;
}

.section-eyebrow {
    color: var(--accent);
    font-size: 0.72rem;
    margin-bottom: calc(var(--unit) * 3);
}

.section-title {
    font-size: clamp(2.6rem, 7vw, 6rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    margin-bottom: calc(var(--unit) * 8);
}

.btn {
    display: inline-block;
    padding: calc(var(--unit) * 2) calc(var(--unit) * 4);
    border: 1px solid var(--border-hi);
    color: var(--text-0);
    font-size: 0.72rem;
    position: relative;
    overflow: hidden;
    transition: color 0.35s ease, border-color 0.35s ease;
    background: transparent;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: -1;
}

.btn:hover {
    color: #000;
    border-color: var(--accent);
}

.btn:hover::before {
    transform: scaleX(1);
}

.btn--solid {
    border-color: var(--accent);
    color: var(--accent);
}

.btn--lg {
    padding: calc(var(--unit) * 2.5) calc(var(--unit) * 6);
    font-size: 0.85rem;
}

/* ============ HERO ============ */

.hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 0 var(--pad-x);
    overflow: hidden;
}

.hero__media {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: #000;
}

.hero__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4) grayscale(100%) sepia(20%) hue-rotate(170deg) saturate(150%);
    opacity: 0.6;
}

.hero__scrim {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, transparent 0%, rgba(10, 10, 10, 0.55) 75%),
        linear-gradient(transparent 60%, var(--bg-0) 100%);
}

.hero__content {
    max-width: 1100px;
}

.hero__eyebrow {
    color: var(--accent);
    font-size: 0.72rem;
    margin-bottom: calc(var(--unit) * 3);
}

.hero__title {
    font-size: clamp(3.4rem, 12vw, 10.5rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: calc(var(--unit) * 3);
}

.hero__title-line {
    display: block;
    overflow: hidden;
}

.hero__title-line span {
    display: block;
}

.hero__type {
    color: var(--text-muted);
    font-size: clamp(0.85rem, 1.8vw, 1.15rem);
    min-height: 1.8em;
    margin-bottom: calc(var(--unit) * 2);
}

.hero__type .is-lit {
    color: var(--accent);
}

.hero__caret {
    color: var(--accent);
    animation: caret 1s steps(2) infinite;
}

@keyframes caret {
    50% { opacity: 0; }
}

.hero__sub {
    color: var(--text-muted);
    max-width: 46ch;
    margin-bottom: calc(var(--unit) * 5);
}

.hero__ctas {
    display: flex;
    gap: calc(var(--unit) * 2);
    flex-wrap: wrap;
}

.hero__scrollcue {
    position: absolute;
    bottom: calc(var(--unit) * 4);
    left: var(--pad-x);
    color: var(--text-dim);
    font-size: 0.68rem;
    animation: cue 2.6s ease-in-out infinite;
}

@keyframes cue {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* ============ STATS STRIP ============ */

.stats {
    border-top: 1px solid var(--border-0);
    border-bottom: 1px solid var(--border-0);
    background: var(--bg-1);
    padding: calc(var(--unit) * 6) var(--pad-x);
}

.stats__track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: calc(var(--unit) * 5);
}

.stat__num {
    display: block;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: var(--accent);
    letter-spacing: 0;
}

.stat__num--amber {
    color: var(--amber);
}

.stat__label {
    color: var(--text-dim);
    font-size: 0.65rem;
}

/* ============ MISSION ============ */

.mission {
    padding: 0 var(--pad-x);
}

.mission__pin {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1200px;
}

.mission__quote {
    font-size: clamp(1.7rem, 4.6vw, 4rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.mission__quote .w {
    color: #333;
    transition: color 0.3s linear;
}

.mission__quote .w.is-lit {
    color: var(--text-0);
}

.mission__quote em {
    font-style: normal;
}

.mission__quote em .w.is-lit {
    color: var(--accent);
}

.mission__props {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: calc(var(--unit) * 4);
    padding: calc(var(--unit) * 10) 0 calc(var(--unit) * 14);
}

.prop {
    border: 1px solid var(--border-0);
    background: var(--surface-0);
    padding: calc(var(--unit) * 4);
    border-radius: 8px;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.prop:hover {
    border-color: var(--accent-muted);
    transform: translateY(-4px);
}

.prop__id {
    color: var(--accent);
    font-size: 0.7rem;
    margin-bottom: calc(var(--unit) * 2);
}

.prop__body {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ============ PILLARS ============ */

.pillars {
    padding: calc(var(--unit) * 14) var(--pad-x);
    border-top: 1px solid var(--border-0);
}

.pillar {
    border-top: 1px solid var(--border-0);
    cursor: pointer;
}

.pillar:last-child {
    border-bottom: 1px solid var(--border-0);
}

.pillar__head {
    display: flex;
    align-items: baseline;
    gap: calc(var(--unit) * 4);
    padding: calc(var(--unit) * 4) 0;
}

.pillar__num {
    color: var(--accent-muted);
    font-size: 0.8rem;
}

.pillar__title {
    font-size: clamp(1.5rem, 4.5vw, 3.4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    flex: 1;
    transition: color 0.3s ease, transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.pillar__arrow {
    color: var(--text-dim);
    font-size: 1.4rem;
    transition: transform 0.4s ease, color 0.3s ease;
}

.pillar:hover .pillar__title,
.pillar:focus-visible .pillar__title,
.pillar.is-open .pillar__title {
    color: var(--accent);
    transform: translateX(calc(var(--unit) * 2));
}

.pillar:hover .pillar__arrow,
.pillar.is-open .pillar__arrow {
    color: var(--accent);
    transform: rotate(45deg);
}

.pillar__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.4s ease;
    opacity: 0;
}

.pillar:hover .pillar__body,
.pillar:focus-visible .pillar__body,
.pillar.is-open .pillar__body {
    max-height: 220px;
    opacity: 1;
}

.pillar__tagline {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: calc(var(--unit) * 1.5);
}

.pillar__stack {
    color: var(--accent-muted);
    font-size: 0.7rem;
    padding-bottom: calc(var(--unit) * 4);
}

/* ============ STORY (HORIZONTAL) ============ */

.story {
    overflow: hidden;
}

.story__pin {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--unit) * 12) 0;
}

.story__header {
    padding: 0 var(--pad-x);
    margin-bottom: calc(var(--unit) * 8);
}

.story__header .section-title {
    margin-bottom: 0;
}

.story__track {
    display: flex;
    gap: calc(var(--unit) * 4);
    padding: 0 var(--pad-x);
    will-change: transform;
}

.node {
    flex: 0 0 min(420px, 82vw);
    border: 1px solid var(--border-0);
    background: var(--surface-0);
    border-radius: 12px;
    padding: calc(var(--unit) * 5);
    transition: border-color 0.3s ease;
}

.node:hover {
    border-color: var(--accent-muted);
}

.node__year {
    color: var(--accent);
    font-size: 0.7rem;
    margin-bottom: calc(var(--unit) * 2);
}

.node__title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--unit);
}

.node__role {
    color: var(--amber);
    font-size: 0.68rem;
    margin-bottom: calc(var(--unit) * 2.5);
}

.node__log {
    list-style: none;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.node__log li {
    padding-left: calc(var(--unit) * 2.5);
    position: relative;
    margin-bottom: var(--unit);
}

.node__log li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent-muted);
    font-family: var(--font-mono);
}

.node--terminal {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px dashed var(--accent-muted);
}

.node__granted {
    color: var(--ok);
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    text-shadow: 0 0 24px rgba(0, 255, 65, 0.35);
}

/* ============ BUILDER (SCENE 2) ============ */

.builder {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--unit) * 14) var(--pad-x);
    overflow: hidden;
}

.builder__media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.3) grayscale(100%) sepia(20%) hue-rotate(170deg) saturate(140%);
    will-change: transform;
}

.builder__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.builder__video.is-ready {
    display: block;
}

.builder__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(var(--bg-0) 0%, transparent 25%, transparent 75%, var(--bg-0) 100%);
}

.builder__content {
    position: relative;
    max-width: 1100px;
}

.builder__line {
    display: block;
    font-size: clamp(2.4rem, 7.5vw, 6.5rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.builder__line--accent {
    color: var(--accent);
    text-shadow: 0 0 40px rgba(0, 240, 255, 0.25);
}

.builder__sub {
    color: var(--text-muted);
    max-width: 52ch;
    margin-top: calc(var(--unit) * 4);
}

/* ============ WORK ============ */

.work {
    padding: calc(var(--unit) * 14) var(--pad-x);
    background: var(--bg-0);
}

.work__list {
    border-top: 1px solid var(--border-0);
}

.work-row {
    display: grid;
    grid-template-columns: 90px 1fr auto auto;
    align-items: baseline;
    gap: calc(var(--unit) * 4);
    padding: calc(var(--unit) * 3.5) 0;
    border-bottom: 1px solid var(--border-0);
    transition: padding-left 0.35s cubic-bezier(0.65, 0, 0.35, 1), background 0.35s ease;
}

.work-row:hover {
    padding-left: calc(var(--unit) * 3);
    background: rgba(0, 240, 255, 0.02);
}

.work-row__id {
    color: var(--accent-muted);
    font-size: 0.7rem;
}

.work-row__title {
    font-size: clamp(1.3rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.work-row:hover .work-row__title {
    color: var(--accent);
}

.work-row__meta {
    color: var(--text-dim);
    font-size: 0.65rem;
}

.work-row__status {
    color: var(--text-muted);
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    gap: var(--unit);
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.dot--ok {
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}

.dot--warn {
    background: var(--amber);
    box-shadow: 0 0 6px var(--amber);
}

.dot--live {
    background: var(--ok);
    box-shadow: 0 0 6px var(--ok);
}

.work__reveal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 80;
    width: min(380px, 32vw);
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border: 1px solid var(--border-hi);
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.9);
    filter: grayscale(30%) contrast(1.05);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

/* ============ COMMS (SCENE 3) ============ */

.comms {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--unit) * 14) var(--pad-x);
    overflow: hidden;
}

.comms__media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.25) grayscale(100%) sepia(25%) hue-rotate(170deg) saturate(150%);
}

.comms__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.comms__video.is-ready {
    display: block;
}

.comms__scrim {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 60%, transparent 0%, rgba(10, 10, 10, 0.6) 80%),
        linear-gradient(var(--bg-0) 0%, transparent 30%);
}

.comms__content {
    position: relative;
    text-align: center;
    width: 100%;
}

.comms__title {
    font-size: clamp(3rem, 11vw, 9.5rem);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.04em;
    margin-bottom: calc(var(--unit) * 3);
}

.comms__title-line {
    display: block;
    overflow: hidden;
}

.comms__title-line span {
    display: block;
}

.comms__sub {
    color: var(--text-muted);
    max-width: 52ch;
    margin: 0 auto calc(var(--unit) * 5);
}

.comms__socials {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: calc(var(--unit) * 4);
    margin-top: calc(var(--unit) * 6);
    font-size: 0.7rem;
}

.comms__socials a {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

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

/* ============ FOOTER ============ */

.footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--border-0);
    padding: calc(var(--unit) * 5) var(--pad-x);
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--unit) * 3);
    justify-content: space-between;
    color: var(--text-dim);
    font-size: 0.65rem;
}

.footer__legacy {
    display: flex;
    gap: calc(var(--unit) * 3);
}

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

/* ============================================================
   SUBPAGES — skills / projects / achievements
   ============================================================ */

.nav__links a.is-current {
    color: var(--accent);
}

/* ---- page hero ---- */

.page-hero {
    padding: calc(var(--unit) * 22) var(--pad-x) calc(var(--unit) * 10);
}

.page-hero__title {
    font-size: clamp(2.8rem, 9vw, 7.5rem);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    margin-bottom: calc(var(--unit) * 3);
}

.page-hero__title .accent {
    color: var(--accent);
}

.page-hero__sub {
    color: var(--text-muted);
    max-width: 60ch;
    font-size: 1.05rem;
}

.page-hero--split {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: calc(var(--unit) * 8);
    align-items: end;
}

/* ---- framed photo ---- */

.frame {
    margin: 0;
}

.frame img {
    width: 100%;
    /* REQUIRED alongside the intrinsic width/height attributes on these
       <img> tags. Those attributes are presentational hints, so `width:100%`
       overrides the width one but the height hint would otherwise survive and
       pin the image to its literal pixel height (e.g. 1500px). `height:auto`
       hands sizing back to the aspect ratio while still letting the browser
       reserve the right box up front, so CLS stays at zero. */
    height: auto;
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 8px;
}

.frame--tint img {
    filter: grayscale(35%) contrast(1.05);
    transition: filter 0.4s ease;
}

.frame--tint:hover img {
    filter: grayscale(0%) contrast(1);
}

.frame figcaption {
    font-family: var(--font-mono);
    letter-spacing: 0.12em;
    color: var(--text-dim);
    font-size: 0.62rem;
    padding-top: var(--unit);
}

/* ---- generic content band ---- */

.band {
    padding: calc(var(--unit) * 10) var(--pad-x);
}

.band--line {
    border-top: 1px solid var(--border-0);
}

.band--tinted {
    background: var(--bg-1);
    border-top: 1px solid var(--border-0);
    border-bottom: 1px solid var(--border-0);
}

/* ---- skills modules ---- */

.module {
    border: 1px solid var(--border-0);
    background: var(--surface-0);
    border-radius: 12px;
    padding: calc(var(--unit) * 5);
    margin-bottom: calc(var(--unit) * 4);
    transition: border-color 0.3s ease;
}

.module:hover {
    border-color: var(--accent-muted);
}

.module__head {
    display: flex;
    align-items: baseline;
    gap: calc(var(--unit) * 3);
    margin-bottom: calc(var(--unit) * 2);
    flex-wrap: wrap;
}

.module__id {
    color: var(--accent-muted-text);
    font-size: 0.75rem;
}

.module__title {
    font-size: clamp(1.3rem, 2.6vw, 2rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.module__desc {
    color: var(--text-muted);
    max-width: 75ch;
    margin-bottom: calc(var(--unit) * 3);
}

.module__group {
    margin-top: calc(var(--unit) * 2.5);
}

.module__group-label {
    font-family: var(--font-mono);
    letter-spacing: 0.15em;
    color: var(--accent);
    font-size: 0.62rem;
    margin-bottom: var(--unit);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--unit);
}

.chip {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border: 1px solid var(--border-0);
    border-radius: 4px;
    padding: calc(var(--unit) * 0.75) calc(var(--unit) * 1.5);
    transition: border-color 0.25s ease, color 0.25s ease;
}

.chip:hover {
    border-color: var(--accent-muted);
    color: var(--accent);
}

.band__intro {
    color: var(--text-muted);
    max-width: 75ch;
    margin-bottom: calc(var(--unit) * 3);
}

.band__intro--after {
    margin: calc(var(--unit) * 3) 0 0;
}

/* ---- architecture stack ---- */

.arch-stack {
    display: grid;
    gap: var(--unit);
    max-width: 760px;
}

.arch-layer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: calc(var(--unit) * 3);
    border: 1px solid var(--border-0);
    border-radius: 8px;
    background: var(--surface-0);
    padding: calc(var(--unit) * 2.5) calc(var(--unit) * 3);
    font-family: var(--font-mono);
    letter-spacing: 0.1em;
    font-size: 0.72rem;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.arch-layer:hover {
    border-color: var(--accent-muted);
    transform: translateX(6px);
}

.arch-layer__name {
    color: var(--accent);
}

.arch-layer__tech {
    color: var(--text-muted);
    text-align: right;
}

/* ---- experience meters ---- */

.meters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: calc(var(--unit) * 4) calc(var(--unit) * 6);
    max-width: 1000px;
}

.meter__top {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    letter-spacing: 0.12em;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-bottom: var(--unit);
}

.meter__top strong {
    color: var(--accent);
    font-weight: 500;
}

.meter__bar {
    height: 3px;
    background: var(--border-0);
    border-radius: 2px;
    overflow: hidden;
}

.meter__fill {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent-muted), var(--accent));
    border-radius: 2px;
}

/* ---- project cards ---- */

.proj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
    gap: calc(var(--unit) * 4);
}

.proj-card {
    border: 1px solid var(--border-0);
    background: var(--surface-0);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s ease;
}

.proj-card:hover {
    border-color: var(--accent-muted);
}

.proj-card__media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-bottom: 1px solid var(--border-0);
    background: var(--bg-1);
}

.proj-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    filter: grayscale(25%);
    transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1), filter 0.4s ease;
}

.proj-card:hover .proj-card__media img {
    transform: scale(1.04);
    filter: grayscale(0%);
}

.proj-card__body {
    padding: calc(var(--unit) * 3.5);
    display: flex;
    flex-direction: column;
    gap: calc(var(--unit) * 2);
    flex: 1;
}

.proj-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    letter-spacing: 0.12em;
    font-size: 0.65rem;
    color: var(--accent-muted-text);
}

.proj-card__status {
    display: flex;
    align-items: center;
    gap: var(--unit);
    color: var(--text-muted);
}

.proj-card__title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.proj-card__desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    flex: 1;
}

.proj-card__links {
    display: flex;
    gap: calc(var(--unit) * 2);
    padding-top: var(--unit);
}

.proj-card__links a {
    font-family: var(--font-mono);
    letter-spacing: 0.12em;
    font-size: 0.65rem;
    color: var(--accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease;
}

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

/* ---- achievements ---- */

.ach-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--unit) * 8);
    align-items: center;
    padding: calc(var(--unit) * 8) 0;
    border-top: 1px solid var(--border-0);
}

.ach-feature:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.ach-feature--flip .ach-feature__media {
    order: 2;
}

.ach-feature__year {
    color: var(--accent);
    font-family: var(--font-mono);
    letter-spacing: 0.15em;
    font-size: 0.7rem;
    margin-bottom: calc(var(--unit) * 2);
}

.ach-feature__title {
    font-size: clamp(1.7rem, 3.6vw, 2.8rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: calc(var(--unit) * 2.5);
    text-transform: uppercase;
}

.ach-feature__body {
    color: var(--text-muted);
    max-width: 55ch;
    margin-bottom: calc(var(--unit) * 3);
}

.ach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: calc(var(--unit) * 4);
}

.ach-card {
    border: 1px solid var(--border-0);
    background: var(--surface-0);
    border-radius: 12px;
    padding: calc(var(--unit) * 4);
    transition: border-color 0.3s ease;
}

.ach-card:hover {
    border-color: var(--accent-muted);
}

.ach-card__medal {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    color: var(--accent);
    margin-bottom: calc(var(--unit) * 2);
}

.ach-card__medal--amber {
    color: var(--amber);
}

.ach-card__medal--ok {
    color: var(--ok);
}

.ach-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: var(--unit);
}

.ach-card__where {
    font-family: var(--font-mono);
    letter-spacing: 0.12em;
    font-size: 0.62rem;
    color: var(--accent-muted-text);
    margin-bottom: calc(var(--unit) * 1.5);
}

.ach-card__body {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ---- page CTA strip ---- */

.page-cta {
    text-align: center;
    padding: calc(var(--unit) * 14) var(--pad-x);
    border-top: 1px solid var(--border-0);
}

.page-cta__title {
    font-size: clamp(2rem, 5.5vw, 4.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    margin-bottom: calc(var(--unit) * 4);
}

.section-link {
    font-family: var(--font-mono);
    letter-spacing: 0.15em;
    font-size: 0.72rem;
    color: var(--accent);
    display: inline-block;
    margin-top: calc(var(--unit) * 4);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease;
}

.section-link:hover {
    border-color: var(--accent);
}

/* ============ MOBILE ============ */

@media (max-width: 768px) {

    /* Keep section links reachable on mobile; drop the status chip instead */
    .nav__status {
        display: none;
    }

    .nav__links {
        gap: calc(var(--unit) * 2.5);
    }

    .work-row {
        grid-template-columns: 1fr;
        gap: var(--unit);
    }

    .work-row__id {
        order: -1;
    }

    .work__reveal {
        display: none;
    }

    .story__track {
        flex-direction: column;
    }

    .node {
        flex-basis: auto;
    }

    .story__pin {
        min-height: 0;
    }

    .hero__ctas .btn {
        width: 100%;
        text-align: center;
    }

    .page-hero {
        padding-top: calc(var(--unit) * 16);
    }

    .page-hero--split {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .ach-feature {
        grid-template-columns: 1fr;
        gap: calc(var(--unit) * 4);
    }

    .ach-feature--flip .ach-feature__media {
        order: 0;
    }

    .arch-layer {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--unit);
    }

    .arch-layer__tech {
        text-align: left;
    }
}

/* ============ REDUCED MOTION ============ */

@media (prefers-reduced-motion: reduce) {

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

    .grain {
        animation: none;
    }
}
