@layer reset, base, components, responsive;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body, h1, h2, h3, p, figure, dl, dd { margin: 0; }
  ul, ol { margin: 0; padding: 0; }
  img { display: block; max-width: 100%; }
  button, input, textarea, select { font: inherit; }
}

@layer base {
  :root {
    color-scheme: dark;
    --bg: #090a0c;
    --bg-raised: #0e1013;
    --surface: #12151a;
    --surface-2: #171b21;
    --surface-3: #1d2229;
    --text: #f3f5f7;
    --text-soft: #a7b0bc;
    --text-dim: #737e8c;
    --line: rgba(255, 255, 255, .1);
    --line-strong: rgba(255, 255, 255, .17);
    --accent: #77e6b6;
    --accent-strong: #a5f3d2;
    --accent-wash: rgba(79, 218, 161, .1);
    --blue: #72a8ff;
    --blue-wash: rgba(75, 135, 255, .11);
    --warm: #f0be72;
    --shadow: 0 24px 80px rgba(0, 0, 0, .33);
    --radius: 18px;
    --radius-lg: 28px;
    --shell: 1440px;
  }

  :root[data-theme="light"] {
    color-scheme: light;
    --bg: #f5f5f2;
    --bg-raised: #fafaf8;
    --surface: #ffffff;
    --surface-2: #f0f1ed;
    --surface-3: #e8eae5;
    --text: #13171a;
    --text-soft: #4e5961;
    --text-dim: #707a80;
    --line: rgba(18, 28, 33, .11);
    --line-strong: rgba(18, 28, 33, .19);
    --accent: #087e56;
    --accent-strong: #056744;
    --accent-wash: rgba(8, 126, 86, .09);
    --blue: #286dcc;
    --blue-wash: rgba(40, 109, 204, .09);
    --warm: #a75d07;
    --shadow: 0 24px 70px rgba(34, 44, 38, .10);
  }

  body {
    min-width: 320px;
    background:
      radial-gradient(circle at 8% 2%, rgba(65, 209, 151, .055), transparent 24rem),
      radial-gradient(circle at 92% 12%, rgba(73, 128, 220, .05), transparent 28rem),
      var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }

  a { color: inherit; }
  code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: .9em;
    color: var(--accent-strong);
  }
  h1, h2, h3 { line-height: 1.08; letter-spacing: -.035em; }
  h1 { max-width: 900px; font-size: clamp(3rem, 4vw, 4.9rem); font-weight: 660; }
  h2 { font-size: clamp(2.2rem, 4.2vw, 4.4rem); font-weight: 640; }
  h3 { font-size: clamp(1.4rem, 2vw, 2rem); font-weight: 620; }
  ::selection { background: var(--accent); color: var(--bg); }
  :focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
  .sr-only { position: absolute !important; overflow: hidden !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; margin: -1px !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; }

  .shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
  .section { padding-block: clamp(5.5rem, 10vw, 9rem); }
  .eyebrow {
    color: var(--accent);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .13em;
    line-height: 1.4;
    text-transform: uppercase;
  }
  .muted-label { color: var(--text-dim); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
}

@layer components {
  .skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: .65rem 1rem;
    border-radius: 8px;
    background: var(--accent);
    color: var(--bg);
    font-weight: 700;
    transform: translateY(-160%);
  }
  .skip-link:focus { transform: none; }

  .site-header {
    position: sticky;
    z-index: 50;
    top: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 20%);
    background: color-mix(in srgb, var(--bg) 84%, transparent);
    backdrop-filter: blur(18px) saturate(130%);
  }
  .nav-wrap { display: flex; min-height: 74px; align-items: center; gap: 2rem; }
  .brand { display: inline-flex; align-items: center; gap: .75rem; font-size: .9rem; font-weight: 700; text-decoration: none; }
  .brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--blue) 45%, var(--line));
    border-radius: 9px;
    background: var(--blue-wash);
    color: var(--blue);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: .68rem;
  }
  .site-nav { display: flex; margin-left: auto; gap: 1.75rem; }
  .site-nav a { color: var(--text-soft); font-size: .82rem; font-weight: 600; text-decoration: none; }
  .site-nav a:hover { color: var(--text); }
  .theme-toggle {
    display: inline-flex;
    min-width: 86px;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .5rem .7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-soft);
    cursor: pointer;
  }
  .theme-toggle:hover { border-color: var(--line-strong); color: var(--text); }
  .theme-icon { width: 1rem; line-height: 1; }
  .theme-icon-moon { display: none; }
  .theme-label { font-size: .72rem; font-weight: 700; }
  [data-theme="light"] .theme-icon-sun { display: none; }
  [data-theme="light"] .theme-icon-moon { display: inline; }

  .hero {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0, 1.55fr) minmax(360px, .9fr);
    gap: clamp(2rem, 4vw, 4rem);
    padding-block: clamp(2.5rem, 4.5vw, 4.5rem);
  }
  .hero-copy > .eyebrow { margin-bottom: 1.8rem; }
  .status-dot { display: inline-block; width: 7px; height: 7px; margin-right: .55rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px var(--accent-wash); }
  .hero-lede { max-width: 760px; margin-top: 2rem; color: var(--text-soft); font-size: clamp(1.05rem, 1.8vw, 1.32rem); }
  .hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.5rem; }
  .button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .72rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 750;
    text-decoration: none;
    transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
  }
  .button:hover { transform: translateY(-2px); }
  .button-primary { background: var(--accent); color: #07110d; }
  [data-theme="light"] .button-primary { color: white; }
  .button-primary:hover { background: var(--accent-strong); }
  .button-secondary { border-color: var(--line-strong); background: var(--surface); color: var(--text); }
  .button-secondary:hover { border-color: var(--text-dim); }
  .origin-note { max-width: 680px; margin-top: 2.8rem; padding-left: 1rem; border-left: 2px solid var(--accent); color: var(--text-soft); font-size: .9rem; }
  .origin-note strong { color: var(--text); }

  .hero-panel {
    position: relative;
    overflow: hidden;
    padding: 1.15rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface-2) 92%, var(--accent) 8%), var(--surface));
    box-shadow: var(--shadow);
  }
  .panel-glow { position: absolute; top: -70px; right: -70px; width: 180px; height: 180px; border-radius: 50%; background: var(--accent); filter: blur(80px); opacity: .16; }
  .hero-profile { position: relative; display: flex; align-items: center; gap: 1rem; padding: .55rem .45rem 1.15rem; }
  .hero-profile img { width: 64px; height: 64px; border: 2px solid var(--line-strong); border-radius: 16px; object-fit: cover; filter: grayscale(15%); }
  .hero-profile div { display: grid; }
  .hero-profile strong { font-size: 1.02rem; }
  .mini-terminal { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: color-mix(in srgb, var(--bg) 84%, transparent); }
  .terminal-bar { display: flex; align-items: center; gap: 6px; padding: .75rem .9rem; border-bottom: 1px solid var(--line); }
  .terminal-bar i { width: 8px; height: 8px; border-radius: 50%; opacity: .9; }
  .terminal-bar i:first-child { background: #ff5f57; }
  .terminal-bar i:nth-child(2) { background: #febc2e; }
  .terminal-bar i:nth-child(3) { background: #28c840; }
  .terminal-bar span { margin-left: auto; color: var(--text-dim); font-family: monospace; font-size: .64rem; }
  .mini-terminal dl { padding: .85rem 1rem 1rem; }
  .mini-terminal dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .48rem 0; border-bottom: 1px dashed var(--line); font-family: "SFMono-Regular", Consolas, monospace; font-size: .68rem; }
  .mini-terminal dl div:last-child { border: 0; }
  .mini-terminal dt { color: var(--text-dim); }
  .mini-terminal dd { color: var(--text-soft); text-align: right; }
  .ok { color: var(--accent); }

  .route-section { padding-block: clamp(4rem, 7vw, 6.5rem); border-block: 1px solid var(--line); background: color-mix(in srgb, var(--bg-raised) 92%, transparent); }
  .section-heading { display: grid; align-items: end; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 3rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
  .section-heading .eyebrow { margin-bottom: 1rem; }
  .section-heading > p { max-width: 500px; color: var(--text-soft); font-size: 1rem; }
  .compact-heading h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
  .route-flow { display: grid; grid-template-columns: repeat(5, 1fr); list-style: none; }
  .route-flow li { position: relative; min-height: 148px; padding: 1.15rem 1rem 1rem 1.3rem; border-left: 1px solid var(--line-strong); }
  .route-flow li:last-child { border-right: 1px solid var(--line-strong); }
  .route-flow li:not(:last-child)::after { content: "→"; position: absolute; z-index: 1; top: 20px; right: -10px; color: var(--accent); font-family: monospace; }
  .route-index { display: block; margin-bottom: 2.2rem; color: var(--accent); font-family: monospace; font-size: .65rem; }
  .route-flow strong { display: block; font-size: .9rem; }
  .route-flow small { display: block; margin-top: .35rem; color: var(--text-dim); font-size: .72rem; line-height: 1.45; }

  .mtr-window { overflow: hidden; margin-top: 2rem; border: 1px solid rgba(255, 255, 255, .16); border-radius: 13px; background: #0b0b0d; box-shadow: 0 28px 80px rgba(0, 0, 0, .42), 0 0 0 1px rgba(0, 0, 0, .45); color: #c9d2dc; transition: border-color .18s ease, box-shadow .18s ease; }
  .mtr-window:focus-within { border-color: rgba(119, 230, 182, .45); box-shadow: 0 28px 80px rgba(0, 0, 0, .42), 0 0 0 1px rgba(119, 230, 182, .12); }
  .ghostty-window { font-family: "SFMono-Regular", Menlo, Monaco, Consolas, monospace; }
  .mtr-titlebar { display: grid; min-height: 42px; align-items: center; grid-template-columns: 1fr auto 1fr; gap: 1rem; padding-inline: 14px; border-bottom: 1px solid rgba(0, 0, 0, .65); background: linear-gradient(#2b2b2e, #222225); box-shadow: inset 0 1px rgba(255, 255, 255, .08); }
  .mtr-titlebar > strong { color: #b8b8bb; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: .69rem; font-weight: 500; letter-spacing: .01em; text-align: center; text-shadow: 0 1px rgba(0, 0, 0, .75); }
  .ghostty-title-spacer { min-width: 54px; }
  .terminal-dots { display: flex; align-items: center; gap: 8px; width: 54px; }
  .terminal-dots i { width: 12px; height: 12px; border: .5px solid rgba(0, 0, 0, .38); border-radius: 50%; background: #8b8b8d; box-shadow: inset 0 .5px rgba(255, 255, 255, .22); }
  .terminal-dots i:first-child { background: #ff5f57; }
  .terminal-dots i:nth-child(2) { background: #febc2e; }
  .terminal-dots i:last-child { background: #28c840; }
  .mtr-live { display: inline-flex; align-items: center; justify-self: end; gap: .45rem; color: #70737a; font-size: .58rem; text-transform: uppercase; }
  .mtr-live i { width: 6px; height: 6px; border-radius: 50%; background: #77e6b6; box-shadow: 0 0 0 4px rgba(119, 230, 182, .1); }
  .mtr-body { position: relative; padding: clamp(1.1rem, 3vw, 1.8rem); background: radial-gradient(circle at 15% 0, rgba(119, 230, 182, .035), transparent 22rem), #0b0b0d; }
  .terminal-activate, .terminal-release { display: none; }
  .mtr-command-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
  .mtr-session-label { color: #626871; font-size: .57rem; letter-spacing: .08em; text-transform: uppercase; }
  .ghostty-terminal { position: relative; width: 100%; height: 250px; overflow: hidden; opacity: 0; caret-color: transparent; cursor: text; transition: opacity .18s ease; }
  .ghostty-terminal textarea { caret-color: transparent; }
  .ghostty-terminal.is-ready { opacity: 1; }
  .ghostty-terminal canvas { display: block; }
  .renix-terminal-window { margin-top: 1rem; }
  .renix-ghostty-terminal { height: 340px; }
  .ghostty-fallback { min-height: 250px; overflow-x: auto; margin: 0; color: #aeb8c2; font-family: "SFMono-Regular", Menlo, Monaco, Consolas, monospace; font-size: 16px; line-height: 1.7; white-space: pre; }
  .ghostty-fallback span { color: #e0e0e2; }
  .mtr-note { padding: .65rem 1.2rem .75rem; border-top: 1px solid rgba(255, 255, 255, .07); background: #0b0d10; color: #707c88; font-size: 11px; line-height: 1.45; }
  .mtr-note strong { color: #9aa6b2; }
  .mtr-note a { color: #9ba7b4; text-underline-offset: 3px; }
  .mtr-note kbd { padding: .08rem .38rem; border: 1px solid #39404a; border-bottom-width: 2px; border-radius: 4px; background: #15181d; color: #c9d2dc; font-family: inherit; font-size: .9em; }

  .ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .feature-card, .workflow-card, .renix-card, .contribution-card, .repo-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }
  .feature-card { position: relative; overflow: hidden; padding: clamp(1.5rem, 3vw, 2.4rem); }
  .feature-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, var(--accent), transparent 70%); opacity: .75; }
  .feature-card-gpu::before { background: linear-gradient(90deg, var(--blue), transparent 70%); }
  .card-topline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2.5rem; }
  .inline-topline { align-items: baseline; justify-content: flex-start; margin-bottom: .65rem; }
  .inline-topline .card-kicker { margin-bottom: 0; }
  .card-icon { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 13px; background: var(--accent-wash); color: var(--accent); font-family: monospace; font-size: .72rem; font-weight: 800; }
  .gpu-icon { border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); background: var(--blue-wash); color: var(--blue); }
  .pill { display: inline-flex; align-items: center; width: fit-content; padding: .33rem .58rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-raised); color: var(--text-dim); font-family: monospace; font-size: .62rem; line-height: 1.2; text-transform: uppercase; }
  .pill-planned { border-color: color-mix(in srgb, var(--warm) 35%, var(--line)); color: var(--warm); }
  .pill-merged { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); background: var(--accent-wash); color: var(--accent); }
  .card-kicker { margin-bottom: .55rem; color: var(--text-dim); font-family: monospace; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
  .feature-card h3 { margin-bottom: 1rem; }
  .feature-card > p:not(.card-kicker) { min-height: 5.2rem; color: var(--text-soft); font-size: .9rem; }
  .spec-list { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 2rem; border-block: 1px solid var(--line); list-style: none; }
  .spec-list li { display: grid; gap: .05rem; padding: 1rem .65rem; border-right: 1px solid var(--line); }
  .spec-list li:first-child { padding-left: 0; }
  .spec-list li:last-child { border: 0; }
  .spec-list strong { font-size: .94rem; }
  .spec-list span { color: var(--text-dim); font-size: .62rem; }
  .card-pipeline { display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: .65rem; margin-top: 1.5rem; color: var(--text-soft); font-family: monospace; font-size: .67rem; }
  .card-pipeline + .card-pipeline { margin-top: .65rem; }
  .card-pipeline span { text-align: center; }
  .card-pipeline span:first-child { text-align: left; }
  .card-pipeline span:last-child { text-align: right; }
  .card-pipeline i { color: var(--accent); font-style: normal; text-align: center; }
  .hardware-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 2rem; border: 1px solid var(--line); border-radius: 12px; }
  .hardware-list > div { display: grid; padding: .95rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .hardware-list > div:nth-child(2n) { border-right: 0; }
  .hardware-list > div:nth-last-child(-n+2) { border-bottom: 0; }
  .hardware-list span { color: var(--blue); font-family: monospace; font-size: .62rem; }
  .hardware-list strong { margin-top: .3rem; font-size: .88rem; }
  .hardware-list small { color: var(--text-dim); font-size: .65rem; }
  .input-link { display: grid; margin-top: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-raised); text-decoration: none; }
  .input-link span { color: var(--blue); font-family: monospace; font-size: .6rem; text-transform: uppercase; }
  .input-link strong { margin-top: .25rem; font-size: .82rem; }
  .input-link small { margin-top: .1rem; color: var(--text-dim); font-size: .62rem; }
  .input-link:hover { border-color: var(--blue); }

  .nixnode-card { display: grid; align-items: center; grid-template-columns: .7fr 1.3fr; gap: 2rem; margin-top: 1rem; padding: clamp(1.5rem, 3vw, 2.3rem); border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(120deg, var(--blue-wash), var(--surface) 38%); }
  .nixnode-copy > p:last-child { margin-top: .8rem; color: var(--text-soft); font-size: .84rem; }
  .nixnode-specs { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 12px; background: var(--bg-raised); }
  .nixnode-specs div { display: grid; padding: .85rem 1rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .nixnode-specs div:nth-child(4n) { border-right: 0; }
  .nixnode-specs div:nth-last-child(-n+4) { border-bottom: 0; }
  .nixnode-specs dt { color: var(--blue); font-family: monospace; font-size: .58rem; text-transform: uppercase; }
  .nixnode-specs dd { margin-top: .25rem; color: var(--text-soft); font-size: .72rem; line-height: 1.4; }
  .nixnode-specs a { color: var(--accent); text-underline-offset: 3px; }
  .nixnode-specs .input-spec dd { margin-top: .3rem; }
  .input-spec a { display: grid; color: inherit; text-decoration: none; }
  .input-spec a span { color: var(--blue); font-family: monospace; font-size: .55rem; text-transform: uppercase; }
  .input-spec a strong { margin-top: .15rem; color: var(--text-soft); font-size: .68rem; }
  .input-spec a small { margin-top: .12rem; color: var(--accent); font-size: .58rem; }

  .input-layer-card { display: grid; align-items: center; grid-template-columns: 1fr auto; gap: 2rem; margin-top: 1rem; padding: 1.5rem 1.8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .input-layer-card h3 { font-size: 1.25rem; }
  .input-layer-card p:last-child { max-width: 760px; margin-top: .55rem; color: var(--text-soft); font-size: .8rem; }

  .workflow-card { display: grid; align-items: center; grid-template-columns: .64fr 1.36fr; gap: 2rem; margin-top: 1rem; padding: clamp(1.5rem, 3vw, 2.3rem); }
  .workflow-copy p:last-child { margin-top: .9rem; color: var(--text-soft); font-size: .86rem; }
  .workflow-flow { display: flex; align-items: center; justify-content: flex-end; list-style: none; }
  .workflow-flow li:not(.connector) { display: grid; min-width: 84px; justify-items: center; gap: .14rem; text-align: center; }
  .node-icon { display: grid; width: 42px; height: 42px; margin-bottom: .42rem; place-items: center; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-2); color: var(--accent); font-family: monospace; font-weight: 800; }
  .workflow-flow strong { font-size: .7rem; }
  .workflow-flow small { color: var(--text-dim); font-size: .58rem; }
  .workflow-flow .connector { position: relative; width: 70px; height: 1px; margin-inline: .25rem; background: var(--line-strong); }
  .workflow-flow .connector::after { content: ">"; position: absolute; top: -.72rem; right: -3px; color: var(--accent); font-family: monospace; }
  .workflow-flow .connector span { position: absolute; top: -1.4rem; width: 100%; color: var(--text-dim); font-family: monospace; font-size: .52rem; text-align: center; }

  .renix-card { display: grid; align-items: center; grid-template-columns: auto 1fr auto; gap: 1.5rem; margin-top: 1rem; padding: 1.5rem 1.8rem; scroll-margin-top: 90px; background: linear-gradient(110deg, var(--surface), color-mix(in srgb, var(--surface) 94%, var(--blue) 6%)); }
  .renix-mark { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 14px; background: var(--blue-wash); }
  .renix-mark img { width: 38px; height: 38px; object-fit: contain; }
  .renix-card h3 { margin-bottom: .55rem; font-size: 1.25rem; }
  .renix-card p:last-child { max-width: 680px; color: var(--text-soft); font-size: .82rem; }
  .sync-visual { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-raised); font-family: monospace; font-size: .65rem; }
  .sync-visual i { color: var(--accent); font-style: normal; }

  .platform-section { border-block: 1px solid var(--line); background: var(--bg-raised); }
  .photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
  .property-photo { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .property-photo img { display: block; width: 100%; height: 260px; border-bottom: 1px solid var(--line); object-fit: cover; }
  .property-photo figcaption { display: grid; padding: 1.15rem 1.25rem; }
  .property-photo figcaption strong { font-size: .85rem; }
  .property-photo figcaption span { color: var(--text-dim); font-size: .68rem; }

  .platform-map { display: grid; grid-template-columns: .4fr 1.6fr; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .ai-grid + .platform-map { margin-top: 1rem; }
  .platform-core { position: relative; overflow: hidden; padding: 2rem; border-right: 1px solid var(--line); background: linear-gradient(150deg, var(--accent-wash), transparent 55%); }
  .platform-core h3 { margin-bottom: 1.4rem; font-family: monospace; font-size: 1.7rem; }
  .platform-core > span { display: block; width: fit-content; margin-top: .45rem; padding: .3rem .55rem; border: 1px solid var(--line); border-radius: 5px; color: var(--text-soft); font-family: monospace; font-size: .66rem; }
  .core-stat { display: grid; margin-top: 2.5rem; }
  .core-stat strong { color: var(--accent); font-size: 3.2rem; line-height: 1; }
  .core-stat small { color: var(--text-dim); font-family: monospace; }
  .service-groups { display: grid; grid-template-columns: 1fr 1fr; }
  .service-groups article { position: relative; min-height: 210px; padding: 1.5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .service-groups article:nth-child(2n) { border-right: 0; }
  .service-groups article:nth-last-child(-n+2) { border-bottom: 0; }
  .group-number { position: absolute; top: 1.25rem; right: 1.25rem; color: var(--accent); font-family: monospace; font-size: .7rem; }
  .service-groups h3 { margin-bottom: 1.2rem; font-size: 1rem; letter-spacing: -.01em; }
  .service-groups ul { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; }
  .service-groups li { padding: .32rem .56rem; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-raised); color: var(--text-soft); font-family: monospace; font-size: .62rem; }

  .storage-card { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2rem; margin-top: 1rem; padding: clamp(1.6rem, 4vw, 2.8rem); border: 1px solid color-mix(in srgb, var(--blue) 24%, var(--line)); border-radius: var(--radius); background: linear-gradient(120deg, var(--blue-wash), var(--surface) 44%); }
  .linked-pill { color: var(--blue); text-decoration: none; }
  .linked-pill:hover { border-color: var(--blue); }
  .storage-copy > p:not(.card-kicker) { max-width: 720px; margin-top: 1rem; color: var(--text-soft); font-size: .88rem; }
  .replication-flow { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-top: 1.8rem; font-family: monospace; font-size: .65rem; }
  .replication-flow span { padding: .38rem .55rem; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-raised); color: var(--text-soft); }
  .replication-flow i { color: var(--accent); font-style: normal; }
  .storage-specs { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-raised); }
  .storage-specs div { display: grid; padding: .85rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .storage-specs div:nth-child(2n) { border-right: 0; }
  .storage-specs div:nth-last-child(-n+2) { border-bottom: 0; }
  .storage-specs dt { color: var(--blue); font-family: monospace; font-size: .58rem; text-transform: uppercase; }
  .storage-specs dd { margin-top: .2rem; color: var(--text-soft); font-size: .7rem; line-height: 1.4; }

  .service-spotlights { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; margin-top: 1rem; }
  .service-spotlights a { display: flex; min-height: 0; aspect-ratio: 1 / 1; flex-direction: column; padding: 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; transition: transform .18s ease, border-color .18s ease; }
  .service-spotlights a:hover { border-color: var(--line-strong); transform: translateY(-2px); }
  .service-spotlights span { color: var(--text-dim); font-family: monospace; font-size: .58rem; text-transform: uppercase; }
  .service-spotlights h3 { margin-top: 1.4rem; font-size: 1.15rem; }
  .service-spotlights p { margin-top: .7rem; color: var(--text-soft); font-size: .74rem; line-height: 1.5; }
  .service-spotlights b { margin-top: auto; color: var(--accent); font-family: monospace; font-size: .62rem; }

  .contribution-card { position: relative; display: grid; align-items: center; grid-template-columns: 1fr auto; gap: 2.5rem; overflow: hidden; padding: clamp(1.6rem, 4vw, 3rem); border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); background: linear-gradient(120deg, var(--accent-wash), var(--surface) 45%); }
  .contribution-card::before { content: ""; position: absolute; z-index: 0; top: -130px; right: 5%; width: 280px; height: 280px; border: 1px solid var(--line); border-radius: 50%; box-shadow: 0 0 0 40px var(--accent-wash), 0 0 0 80px color-mix(in srgb, var(--accent-wash), transparent 45%); }
  .contribution-card::after { content: ""; position: absolute; z-index: 1; top: 50%; right: 5%; width: 220px; height: 220px; background-position: center; background-repeat: no-repeat; background-size: contain; opacity: .09; pointer-events: none; transform: translateY(-50%); }
  .contribution-card > * { position: relative; z-index: 2; }
  .contribution-pi::after { background-image: url('/assets/pi-logo.svg'); }
  .contribution-exo { border-color: color-mix(in srgb, var(--warm) 25%, var(--line)); background: linear-gradient(120deg, color-mix(in srgb, var(--warm) 10%, transparent), var(--surface) 45%); }
  .contribution-exo::after { background-image: url('/assets/exo-logo.png'); opacity: .12; }
  .contribution-card + .contribution-card { margin-top: 1rem; }
  .contribution-card .pill { margin-bottom: 1.8rem; }
  .contribution-card h3 { margin-bottom: .85rem; }
  .contribution-card p:not(.card-kicker) { max-width: 700px; color: var(--text-soft); font-size: .9rem; }
  .pr-summary { position: relative; z-index: 1; display: grid; min-width: 150px; justify-items: end; }
  .pr-summary span, .pr-summary small { color: var(--text-dim); font-family: monospace; font-size: .64rem; }
  .pr-summary strong { font-size: 2.2rem; }
  .card-link { position: absolute; right: 2rem; bottom: 1.4rem; color: var(--accent); font-size: .72rem; font-weight: 700; text-decoration: none; }
  .card-link:hover { text-decoration: underline; }

  .repo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1rem; }
  .repo-card { display: flex; min-height: 245px; flex-direction: column; padding: 1.5rem; text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
  .repo-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
  .repo-kind { margin-bottom: 2rem; color: var(--text-dim); font-family: monospace; font-size: .62rem; text-transform: uppercase; }
  .repo-card h3 { margin-bottom: .8rem; font-size: 1.4rem; }
  .repo-card p { color: var(--text-soft); font-size: .82rem; }
  .repo-meta { display: flex; align-items: center; gap: .45rem; margin-top: auto; color: var(--text-dim); font-family: monospace; font-size: .63rem; }
  .repo-meta b { margin-left: auto; color: var(--accent); }
  .language-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
  .rust { background: var(--warm); } .docs { background: var(--accent); } .keyboard { background: #c7a0ff; }

  .profile-cta { display: grid; align-items: center; grid-template-columns: auto 1fr auto; gap: 2rem; margin-bottom: clamp(5.5rem, 10vw, 9rem); padding: clamp(1.5rem, 4vw, 2.6rem); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
  .profile-cta img { width: 92px; height: 92px; border-radius: 20px; object-fit: cover; }
  .profile-cta .eyebrow { margin-bottom: .55rem; }
  .profile-cta h2 { font-size: clamp(1.4rem, 3vw, 2.3rem); }
  .profile-cta p:last-child { margin-top: .45rem; color: var(--text-soft); font-size: .82rem; }
  .profile-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .7rem; }

  .site-footer { padding-block: 2rem; border-top: 1px solid var(--line); color: var(--text-dim); font-size: .7rem; }
  .site-footer .shell { display: flex; justify-content: space-between; gap: 1rem; }
  .site-footer a { color: var(--text-soft); text-decoration: none; }
}

@layer responsive {
  @media (min-width: 761px) {
    html { font-size: 137.5%; }
  }

  @media (max-width: 980px) {
    .hero { min-height: auto; grid-template-columns: 1fr; }
    .hero-panel { width: min(100%, 560px); }
    .route-flow { grid-template-columns: repeat(3, 1fr); }
    .route-flow li:nth-child(3) { border-right: 1px solid var(--line-strong); }
    .route-flow li:nth-child(n+4) { border-top: 1px solid var(--line-strong); }
    .nixnode-card, .storage-card { grid-template-columns: 1fr; }
    .workflow-card { grid-template-columns: 1fr; }
    .workflow-flow { justify-content: center; margin-top: 1rem; }
    .service-spotlights { grid-template-columns: repeat(3, 1fr); }
    .renix-card { grid-template-columns: auto 1fr; }
    .sync-visual { grid-column: 1 / -1; justify-content: center; }
    .profile-cta { grid-template-columns: auto 1fr; }
    .profile-links { grid-column: 1 / -1; justify-content: flex-start; }
  }

  @media (max-width: 760px) {
    .site-nav { display: none; }
    .theme-toggle { margin-left: auto; }
    .section-heading { grid-template-columns: 1fr; gap: 1.2rem; }
    .ai-grid { grid-template-columns: 1fr; }
    .feature-card > p:not(.card-kicker) { min-height: 0; }
    .photo-grid { grid-template-columns: 1fr; }
    .property-photo img { height: auto; aspect-ratio: 4 / 3; }
    .platform-map { grid-template-columns: 1fr; }
    .platform-core { border-right: 0; border-bottom: 1px solid var(--line); }
    .nixnode-specs { grid-template-columns: repeat(2, 1fr); }
    .nixnode-specs div:nth-child(n) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .nixnode-specs div:nth-child(2n) { border-right: 0; }
    .nixnode-specs div:nth-last-child(-n+2) { border-bottom: 0; }
    .input-layer-card { grid-template-columns: 1fr; }
    .input-layer-card .button { justify-self: start; }
    .service-spotlights { grid-template-columns: repeat(2, 1fr); }
    .repo-grid { grid-template-columns: 1fr; }
    .repo-card { min-height: 210px; }
    .contribution-card { grid-template-columns: 1fr; padding-bottom: 4.5rem; }
    .pr-summary { justify-items: start; }
    .card-link { right: auto; left: 1.6rem; }
  }

  @media (max-width: 600px) {
    .shell { width: min(calc(100% - 26px), var(--shell)); }
    .nav-wrap { min-height: 64px; }
    .brand > span:last-child { display: none; }
    .hero { padding-block: 2.5rem 4rem; }
    h1 { font-size: clamp(2.25rem, 10.5vw, 3.2rem); overflow-wrap: break-word; }
    .route-flow { grid-template-columns: 1fr; }
    .route-flow li { min-height: 112px; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
    .route-flow li:not(:last-child)::after { top: auto; right: auto; bottom: -.68rem; left: 50%; width: 1.4rem; background: var(--bg-raised); content: "↓"; line-height: 1; text-align: center; transform: translateX(-50%); }
    .route-flow li:nth-child(n+4) { border-top: 0; }
    .route-index { margin-bottom: 1rem; }
    .mtr-titlebar { grid-template-columns: 54px 1fr 54px; gap: .45rem; padding-inline: 10px; }
    .mtr-titlebar > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mtr-command-row .mtr-live { display: none; }
    .mtr-body { padding-inline: .8rem; }
    .mtr-note { padding-inline: .9rem; }
    .ghostty-fallback { font-size: 14px; }
    .ghostty-terminal { pointer-events: none; touch-action: pan-y; }
    .terminal-activate, .terminal-release { z-index: 8; align-items: center; justify-content: center; min-height: 42px; padding: .62rem .85rem; border: 1px solid rgba(119, 230, 182, .38); border-radius: 8px; background: rgba(15, 20, 20, .94); color: #a5f3d2; font-family: "SFMono-Regular", Menlo, Monaco, Consolas, monospace; font-size: .65rem; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
    .terminal-activate { display: inline-flex; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
    .terminal-release { position: absolute; top: 3.2rem; right: 1rem; min-height: 34px; padding: .38rem .62rem; }
    .mtr-window.terminal-active .terminal-activate { display: none; }
    .mtr-window.terminal-active .terminal-release { display: inline-flex; }
    .mtr-window.terminal-active .ghostty-terminal { pointer-events: auto; }
    .card-pipeline { grid-template-columns: 1fr; justify-items: center; gap: .3rem; padding: .75rem; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-raised); }
    .card-pipeline span, .card-pipeline span:first-child, .card-pipeline span:last-child { text-align: center; }
    .card-pipeline i { line-height: 1; transform: rotate(90deg); }
    .replication-flow { display: grid; grid-template-columns: 1fr; justify-items: center; gap: .3rem; padding: .75rem; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-raised); }
    .replication-flow span { width: 100%; padding: 0; border: 0; background: transparent; text-align: center; }
    .replication-flow i { line-height: 1; transform: rotate(90deg); }
    .workflow-flow { display: grid; grid-template-columns: 1fr; gap: .55rem; }
    .workflow-flow .connector { width: 1px; height: 28px; margin: 0 auto; }
    .workflow-flow .connector::after { top: auto; right: auto; bottom: -.6rem; left: 50%; width: 1rem; background: var(--surface); content: "⌄"; line-height: 1; text-align: center; transform: translateX(-50%); }
    .workflow-flow .connector span { top: 5px; left: 12px; width: max-content; text-align: left; }
    .renix-card { grid-template-columns: 1fr; }
    .renix-mark { display: none; }
    .inline-topline { align-items: flex-start; flex-direction: column; }
    .hardware-list, .service-groups, .nixnode-specs, .storage-specs { grid-template-columns: 1fr; }
    .hardware-list > div, .hardware-list > div:nth-child(2n), .hardware-list > div:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--line); }
    .hardware-list > div:last-child { border-bottom: 0; }
    .service-groups article, .service-groups article:nth-child(2n), .service-groups article:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--line); }
    .service-groups article:last-child { border-bottom: 0; }
    .nixnode-specs div:nth-child(n), .storage-specs div, .storage-specs div:nth-child(2n), .storage-specs div:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--line); }
    .nixnode-specs div:last-child, .storage-specs div:last-child { border-bottom: 0; }
    .replication-flow { align-items: flex-start; flex-direction: column; }
    .replication-flow i { transform: rotate(90deg); }
    .service-spotlights { grid-template-columns: 1fr; }
    .service-spotlights a { min-height: 190px; }
    .profile-cta { grid-template-columns: 1fr; text-align: left; }
    .profile-cta img { width: 72px; height: 72px; }
    .profile-links { grid-column: auto; flex-direction: column; }
    .site-footer .shell { flex-direction: column; }
    .site-footer p:nth-child(2) { display: none; }
  }

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