/* Infinite Canvas — antjanus.com redesign 046
   Every page is a board. Sections are positioned frames with labels, wired together. */

:root {
  --ground: #eceae4;
  --dot: #c4c0b5;
  --chrome: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f5f4f0;
  --ink: #16171a;
  --text: #33363d;
  --muted: #595d65;
  --line: #d8d5cc;
  --line-strong: #a9a59b;
  --sel: #2d62a6;
  --sel-ink: #ffffff;
  --brand: #364f6a;
  --wire: #8f8b82;
  --code-bg: #1d2129;
  --code-ink: #e3e7ee;
  --code-dim: #97a1b0;

  --note-ink: #1e1f22;
  --note-yellow: #ffe68a;
  --note-pink: #ffcfdb;
  --note-mint: #c6eed4;
  --note-lilac: #dcd4ff;
  --note-blue: #cfe0ff;
  --note-peach: #ffd8b8;

  --hue-ai: #7b61d9;
  --hue-garden: #2e9a63;
  --hue-tools: #c98a12;
  --hue-projects: #2d62a6;
  --hue-work: #c4553b;

  --shadow: 0 1px 2px rgba(20, 20, 20, .06), 0 10px 28px -14px rgba(20, 20, 20, .28);
  --shadow-lift: 0 2px 4px rgba(20, 20, 20, .08), 0 22px 44px -18px rgba(20, 20, 20, .38);
  --radius: 12px;
  --toolbar-h: 56px;
  --rail-w: 240px;

  --font-ui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-hand: "Shantell Sans", "Comic Sans MS", "Chalkboard SE", cursive;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #15171b;
    --dot: #30343c;
    --chrome: #1c1f24;
    --surface: #22252b;
    --surface-2: #1b1e23;
    --ink: #f2f3f5;
    --text: #d2d6dc;
    --muted: #a3a9b3;
    --line: #363b44;
    --line-strong: #555c68;
    --sel: #82b1ea;
    --sel-ink: #0d1520;
    --wire: #6d7482;
    --code-bg: #111318;
    --note-yellow: #f1d772;
    --note-pink: #f0bccb;
    --note-mint: #addfc0;
    --note-lilac: #c9bff5;
    --note-blue: #b7cdf2;
    --note-peach: #efc39e;
    --hue-ai: #a592f5;
    --hue-garden: #5cc58d;
    --hue-tools: #e0ad45;
    --hue-projects: #82b1ea;
    --hue-work: #ec8a70;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -14px rgba(0, 0, 0, .7);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .4), 0 22px 44px -18px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ground: #15171b;
  --dot: #30343c;
  --chrome: #1c1f24;
  --surface: #22252b;
  --surface-2: #1b1e23;
  --ink: #f2f3f5;
  --text: #d2d6dc;
  --muted: #a3a9b3;
  --line: #363b44;
  --line-strong: #555c68;
  --sel: #82b1ea;
  --sel-ink: #0d1520;
  --wire: #6d7482;
  --code-bg: #111318;
  --note-yellow: #f1d772;
  --note-pink: #f0bccb;
  --note-mint: #addfc0;
  --note-lilac: #c9bff5;
  --note-blue: #b7cdf2;
  --note-peach: #efc39e;
  --hue-ai: #a592f5;
  --hue-garden: #5cc58d;
  --hue-tools: #e0ad45;
  --hue-projects: #82b1ea;
  --hue-work: #ec8a70;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -14px rgba(0, 0, 0, .7);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .4), 0 22px 44px -18px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--ground);
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.4px);
  background-size: 24px 24px;
  overflow-x: hidden;
  padding-top: var(--toolbar-h);
}
img { max-width: 100%; display: block; }
a { color: var(--sel); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; margin: 0; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sel); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--sel); color: var(--sel-ink); padding: .6rem 1rem; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 8px; }
.mono { font-family: var(--font-mono); }
code { font-variant-ligatures: none; font-family: var(--font-mono); font-size: .88em; background: var(--surface-2); border: 1px solid var(--line); padding: .08em .35em; border-radius: 5px; }

/* ---------- toolbar (global nav) ---------- */
.toolbar {
  position: fixed; inset: 0 0 auto 0; height: var(--toolbar-h); z-index: 50;
  display: flex; align-items: center; gap: 1rem;
  padding: 0 .75rem 0 .5rem;
  background: var(--chrome); border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); min-height: 44px; padding: 0 .4rem; border-radius: 8px; }
.logo svg { width: 34px; height: 34px; flex: none; }
.crumb { font-family: var(--font-mono); font-size: .8125rem; color: var(--muted); white-space: nowrap; line-height: 1.2; }
.crumb b { display: block; color: var(--ink); font-family: var(--font-ui); font-size: .95rem; font-weight: 600; }
.tabs { display: flex; gap: .15rem; margin: 0 auto; padding: 0; list-style: none; }
.tabs a {
  display: flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0 .85rem;
  font-size: .9375rem; font-weight: 500; color: var(--text); text-decoration: none; border-radius: 8px;
}
.tabs a:hover { background: var(--surface-2); color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--sel); color: var(--sel-ink); }
.tabs a .glyph { font-family: var(--font-mono); font-size: .8125rem; opacity: .75; }
.tabs a.ai-tab:not([aria-current]) { background: color-mix(in srgb, var(--hue-ai) 16%, transparent); color: var(--ink); }
.tool-right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.search { display: flex; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; height: 40px; padding-left: .7rem; }
.search input { border: 0; background: transparent; width: 11rem; font-size: .9375rem; outline: none; }
.search button { border: 0; background: transparent; height: 38px; padding: 0 .7rem; font-size: .875rem; font-weight: 600; color: var(--sel); cursor: pointer; border-left: 1px solid var(--line); }
.search:focus-within { outline: 3px solid var(--sel); outline-offset: 2px; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink);
}
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-dark-icon { display: none; }
:root[data-theme="dark"] .theme-dark-icon { display: block; }
:root[data-theme="dark"] .theme-light-icon { display: none; }
.pages-menu { display: none; position: relative; }
.pages-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .8rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 600; font-size: .9375rem; color: var(--ink); }
.pages-menu summary::-webkit-details-marker { display: none; }
.pages-menu ul { position: absolute; right: 0; top: calc(100% + 8px); width: min(88vw, 300px); list-style: none; margin: 0; padding: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lift); }
.pages-menu li a { display: flex; justify-content: space-between; min-height: 44px; align-items: center; padding: 0 .75rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.pages-menu li a[aria-current="page"] { background: var(--sel); color: var(--sel-ink); }
.pages-menu li a span { font-family: var(--font-mono); font-size: .8125rem; opacity: .8; }
.pages-menu form { margin-top: .5rem; display: flex; gap: .4rem; }
.pages-menu form input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 .7rem; background: var(--surface-2); }
.pages-menu form button { height: 44px; border: 0; border-radius: 8px; padding: 0 .9rem; background: var(--sel); color: var(--sel-ink); font-weight: 600; }

@media (max-width: 1180px) { .search { display: none; } }
@media (max-width: 900px) {
  .tabs { display: none; }
  .pages-menu { display: block; margin-left: auto; }
}
@media (max-width: 420px) { .crumb { display: none; } }

/* ---------- layers rail ---------- */
.layers {
  display: none; position: fixed; left: 0; top: var(--toolbar-h); bottom: 0; width: var(--rail-w); z-index: 40;
  background: var(--chrome); border-right: 1px solid var(--line); padding: 1rem .6rem 1.5rem; overflow-y: auto;
}
.layers h2 { font-family: var(--font-mono); font-size: .8125rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 .6rem .6rem; border-bottom: 1px solid var(--line); margin-bottom: .5rem; display: flex; justify-content: space-between; }
.layers ol { list-style: none; margin: 0; padding: 0; }
.layers a {
  display: flex; gap: .55rem; align-items: center; min-height: 36px; padding: .25rem .6rem; border-radius: 6px;
  color: var(--text); text-decoration: none; font-size: .9375rem; line-height: 1.3;
}
.layers a .ico { font-family: var(--font-mono); font-size: .8125rem; color: var(--muted); width: 1rem; flex: none; }
.layers a:hover { background: var(--surface-2); color: var(--ink); }
.layers a.is-active { background: color-mix(in srgb, var(--sel) 16%, transparent); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--sel); }
.layers .hint { font-size: .875rem; color: var(--muted); padding: 1rem .6rem 0; line-height: 1.5; }
.layers kbd { font-family: var(--font-mono); font-size: .8125rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 .3rem; background: var(--surface); color: var(--ink); }
@media (min-width: 1280px) {
  .layers { display: block; }
  .with-rail { padding-left: var(--rail-w); }
}

/* ---------- minimap ---------- */
.minimap {
  margin: 1.25rem .4rem 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .5rem;
}
:root:not(.js) .minimap { display: none; }
.minimap-head { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .8125rem; color: var(--muted); padding: 0 .15rem .35rem; }
.minimap-map { position: relative; background: var(--ground); border-radius: 6px; overflow: hidden; cursor: pointer; }
.minimap-map .mm-node { position: absolute; background: var(--line-strong); border-radius: 2px; opacity: .8; }
.minimap-map .mm-node.is-dark { background: var(--ink); }
.minimap-map .mm-view { position: absolute; border: 2px solid var(--sel); background: color-mix(in srgb, var(--sel) 12%, transparent); border-radius: 3px; pointer-events: none; }

/* ---------- frames / nodes ---------- */
.node {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-top: 1.9rem;
}
.frame-label {
  position: absolute; left: 2px; bottom: calc(100% + .4rem); display: flex; gap: .6rem; align-items: baseline;
  font-family: var(--font-mono); font-size: .8125rem; line-height: 1.2; color: var(--muted); white-space: nowrap; max-width: 100%; overflow: hidden;
}
.frame-label::before { content: "#"; color: var(--line-strong); }
.frame-label .dim { opacity: .75; }
.frame-label[data-drag] { cursor: grab; user-select: none; }
.frame-label[data-drag]:active { cursor: grabbing; }

/* Figma-style selection: outline + four handles. Shown on hover and on keyboard focus within. */
.selectable::after {
  content: ""; position: absolute; inset: -6px; pointer-events: none; border: 1.5px solid var(--sel); border-radius: calc(var(--radius) + 4px);
  outline: 0; opacity: 0; transition: opacity .15s ease;
}
.selectable:hover::after, .selectable:focus-within::after { opacity: 1; }
.selectable:focus-within { z-index: 2; }
.handles { position: absolute; inset: -9.5px; pointer-events: none; opacity: 0; transition: opacity .15s ease; z-index: 3; }
.handles i { position: absolute; width: 9px; height: 9px; background: var(--surface); border: 1.5px solid var(--sel); border-radius: 2px; }
.handles i:nth-child(1) { left: 0; top: 0; } .handles i:nth-child(2) { right: 0; top: 0; }
.handles i:nth-child(3) { left: 0; bottom: 0; } .handles i:nth-child(4) { right: 0; bottom: 0; }
.selectable:hover > .handles, .selectable:focus-within > .handles { opacity: 1; }
@media (hover: none) { .selectable::after, .handles { display: none; } }

/* Figma "section": tinted region with a colored tab */
.section {
  position: relative; border-radius: 18px; padding: 3.4rem 1.5rem 1.6rem; margin-top: 1rem;
  background: color-mix(in srgb, var(--hue, var(--sel)) 9%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--hue, var(--sel)) 40%, transparent);
}
.section-tab {
  position: absolute; left: 1rem; top: -1px; transform: translateY(-50%);
  display: inline-flex; gap: .5rem; align-items: center; padding: .3rem .85rem; border-radius: 999px;
  background: var(--hue, var(--sel)); color: #fff; font-family: var(--font-mono); font-size: .8125rem; font-weight: 500; letter-spacing: .02em;
}
:root[data-theme="dark"] .section-tab { color: #111; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .section-tab { color: #111; } }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .5rem 1.5rem; margin-bottom: 1.5rem; }
.section-head h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem); }
.section-head p { color: var(--muted); margin: .25rem 0 0; }
.more { font-weight: 600; text-decoration: none; display: inline-flex; gap: .35rem; align-items: center; min-height: 44px; }
.more:hover { text-decoration: underline; }
.hue-ai { --hue: var(--hue-ai); }
.hue-garden { --hue: var(--hue-garden); }
.hue-tools { --hue: var(--hue-tools); }
.hue-projects { --hue: var(--hue-projects); }
.hue-work { --hue: var(--hue-work); }

/* ---------- cards ---------- */
.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: visible;
}
.card-img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; background: var(--surface-2); }
.card-ph {
  aspect-ratio: 16 / 9; border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: .8125rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em;
  background:
    linear-gradient(to top right, transparent calc(50% - .75px), var(--line) calc(50% - .75px), var(--line) calc(50% + .75px), transparent calc(50% + .75px)),
    linear-gradient(to bottom right, transparent calc(50% - .75px), var(--line) calc(50% - .75px), var(--line) calc(50% + .75px), transparent calc(50% + .75px)),
    var(--surface-2);
}
.card-ph span { background: var(--surface-2); padding: .2rem .6rem; border-radius: 4px; border: 1px solid var(--line); }
.card-body { padding: 1rem 1.15rem 1.2rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.meta { font-family: var(--font-mono); font-size: .8125rem; color: var(--muted); margin: 0; letter-spacing: .01em; }
.card-title { font-size: 1.25rem; line-height: 1.25; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); z-index: 1; }
.card-title a:focus-visible { outline: none; }
.card-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.card-desc { color: var(--text); font-size: 1.0625rem; line-height: 1.55; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: .25rem 0 0; padding: 0; }
.chip { font-family: var(--font-mono); font-size: .8125rem; line-height: 1.2; padding: .3rem .55rem; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
a.chip { text-decoration: none; position: relative; z-index: 2; }
a.chip:hover { border-color: var(--sel); color: var(--ink); }
.badge { font-family: var(--font-mono); font-size: .8125rem; font-weight: 500; padding: .15rem .5rem; border-radius: 999px; background: var(--note-yellow); color: var(--note-ink); }
.badge.new { background: var(--note-mint); }

/* row list variant */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.row-item { position: relative; display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.row-item h3 { font-size: 1.1875rem; line-height: 1.3; margin-bottom: .2rem; }
.row-item h3 a { color: var(--ink); text-decoration: none; }
.row-item h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.row-item h3 a:hover { text-decoration: underline; }
.row-item p { margin: 0; font-size: 1.0625rem; }
.row-item .meta { padding-top: .3rem; }
@media (max-width: 560px) { .row-item { grid-template-columns: 1fr; gap: .25rem; } }

/* ---------- sticky notes, comments ---------- */
.sticky {
  position: relative; background: var(--note, var(--note-yellow)); color: var(--note-ink); padding: 1.1rem 1.2rem 1.25rem;
  border-radius: 3px 3px 14px 3px; box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 14px 22px -14px rgba(0,0,0,.45);
  font-family: var(--font-hand); font-size: 1.125rem; line-height: 1.45; transform: rotate(var(--r, -1.5deg));
}
.sticky a { color: var(--note-ink); font-weight: 600; }
.sticky strong.big { display: block; font-family: var(--font-head); font-size: 2.6rem; line-height: 1; letter-spacing: -.02em; }
.sticky .small { font-family: var(--font-mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; }
.n-yellow { --note: var(--note-yellow); } .n-pink { --note: var(--note-pink); } .n-mint { --note: var(--note-mint); }
.n-lilac { --note: var(--note-lilac); } .n-blue { --note: var(--note-blue); } .n-peach { --note: var(--note-peach); }

.comment { display: flex; gap: .6rem; align-items: flex-start; max-width: 22rem; }
.comment .avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50% 50% 50% 4px; background: var(--sel); color: var(--sel-ink);
  display: grid; place-items: center; font-family: var(--font-mono); font-size: .8125rem; font-weight: 600; box-shadow: var(--shadow);
}
.comment .bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: .7rem .95rem; box-shadow: var(--shadow); font-size: 1.0625rem; line-height: 1.5; }
.comment .bubble b { display: block; font-size: .875rem; color: var(--muted); font-weight: 600; margin-bottom: .15rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 46px; padding: 0 1.2rem;
  border-radius: 10px; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-primary { background: var(--sel); color: var(--sel-ink); box-shadow: 0 3px 0 color-mix(in srgb, var(--sel) 55%, #000); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--sel) 55%, #000); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--sel); }
.btn-text { color: var(--muted); padding: 0 .4rem; }
.btn-text:hover { color: var(--ink); text-decoration: underline; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; }

/* ---------- wires ---------- */
.wires { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; z-index: 0; }
.wires path { fill: none; stroke: var(--wire); stroke-width: 2; stroke-linecap: round; }
.wires path.dash { stroke-dasharray: 6 7; }
.wires circle { fill: var(--surface); stroke: var(--wire); stroke-width: 2; }
.wires .arrow { fill: var(--wire); stroke: none; }
.wire-label {
  position: absolute; z-index: 1; transform: translate(-50%, -50%); pointer-events: none; white-space: nowrap;
  font-family: var(--font-hand); font-size: 1rem; color: var(--ink); background: var(--ground); padding: .1rem .5rem; border-radius: 6px; border: 1px dashed var(--line-strong);
}

/* ---------- board pages (scrolling) ---------- */
.board { position: relative; max-width: 1340px; margin: 0 auto; padding: 3rem 2.5rem 7rem; }
.board > *:not(.wires):not(.wire-label) { position: relative; z-index: 1; }
.grid12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3.5rem 2.5rem; align-items: start; margin-bottom: 4.5rem; }
.s-12 { grid-column: span 12; } .s-8 { grid-column: span 8; } .s-7 { grid-column: span 7; } .s-6 { grid-column: span 6; }
.s-5 { grid-column: span 5; } .s-4 { grid-column: span 4; } .s-3 { grid-column: span 3; }
.drop-1 { margin-top: 4rem; } .drop-2 { margin-top: 7rem; }
@media (max-width: 1100px) {
  .s-3 { grid-column: span 6; } .s-4, .s-5 { grid-column: span 6; } .s-7, .s-8 { grid-column: span 12; }
  .drop-2 { margin-top: 3rem; }
}
@media (max-width: 760px) {
  .board { padding: 1.5rem 16px 5rem; }
  .grid12, .after-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; margin-bottom: 3rem; }
  .grid12 > *, .after-grid > * { grid-column: auto !important; }
  .frame-label .dim { display: none; }
  .drop-1, .drop-2 { margin-top: 1.9rem; }
  .wires, .wire-label { display: none; }
  .section { padding: 3rem 1rem 1.2rem; }
}

.page-frame { padding: 2.25rem 2.25rem 2rem; }
.eyebrow { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.page-frame h1 { font-size: clamp(2.5rem, 1.8rem + 3vw, 4.4rem); line-height: 1.02; letter-spacing: -.03em; margin-bottom: 1rem; }
.lede { font-size: clamp(1.2rem, 1.1rem + .4vw, 1.4rem); line-height: 1.5; color: var(--text); max-width: 40ch; }
.img-frame { padding: 0; }
.img-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius) - 1px); }
.pad { padding: 1.5rem 1.6rem; }
.pad h2 { font-size: 1.6rem; margin-bottom: .6rem; }
.pad h3 { font-size: 1.25rem; margin-bottom: .4rem; }

.dark-node { background: #14181f; border-color: #14181f; color: #d7dde6; }
.dark-node h2, .dark-node h3 { color: #fff; }
.dark-node .meta { color: #a8b1be; }
.dark-node a:not(.btn) { color: #9cc3f2; }
.dark-node .btn-primary { background: #f2f3f5; color: #14181f; box-shadow: 0 3px 0 #8b93a0; }

/* statistic strip used on home/about/projects */
.stat-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stat-strip div { background: var(--surface); padding: .9rem 1rem; }
.stat-strip dt { overflow-wrap: anywhere; font-family: var(--font-mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stat-strip dd { margin: 0; font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- footer frame ---------- */
.foot { padding: 2rem 2rem 1.5rem; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.5fr; gap: 2rem; }
.foot h2 { font-family: var(--font-mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; margin-bottom: .6rem; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li a { display: inline-flex; min-height: 34px; align-items: center; color: var(--text); text-decoration: none; }
.foot li a:hover { color: var(--sel); text-decoration: underline; }
.foot-brand p { color: var(--muted); margin-top: .75rem; }
.foot-bottom { margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .9375rem; color: var(--muted); }
.subscribe { display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
.subscribe input { flex: 1 1 12rem; min-width: 0; height: 46px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); padding: 0 .85rem; }
.subscribe input:focus-visible { outline: 3px solid var(--sel); outline-offset: 1px; }
.form-status { font-size: 1rem; margin-top: .5rem; min-height: 1.5em; }
.form-status b { color: var(--ink); }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } .foot { padding: 1.5rem 1.25rem; } }

/* ===================================================================
   HOME: a true pannable, zoomable canvas at >=1024px (JS adds .is-canvas)
   Without JS or on narrow screens it is a stacked board.
   =================================================================== */
.home-canvas { position: relative; }
.world { position: relative; padding: 1.5rem 16px 4rem; display: flex; flex-direction: column; gap: 2.4rem; }
.world > .wires, .world > .wire-label { display: none; }
.world > [data-node] { position: relative; }
.flow-link { display: none; }

.is-canvas body { overflow: hidden; height: 100vh; }
.is-canvas .home-canvas {
  position: fixed; left: 0; right: 0; top: var(--toolbar-h); bottom: 0; overflow: hidden; touch-action: none; cursor: default;
  background-color: var(--ground); background-image: radial-gradient(var(--dot) 1.2px, transparent 1.4px);
}
.is-canvas.has-rail .home-canvas { left: var(--rail-w); }
.is-canvas .home-canvas.is-panning { cursor: grabbing; }
.is-canvas .world {
  position: absolute; left: 0; top: 0; width: 3140px; height: 2140px; padding: 0; display: block; transform-origin: 0 0; will-change: transform;
}
.is-canvas .world > [data-node] { position: absolute; left: var(--x); top: var(--y); width: var(--w); margin: 0; }
.is-canvas .world > .wires, .is-canvas .world > .wire-label { display: block; }
.is-canvas .world.is-animating { transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
@media (prefers-reduced-motion: reduce) { .is-canvas .world.is-animating { transition: none; } }

/* semantic zoom: when zoomed far out, hide fine detail and blow up the landmarks */
.zoom-far .world .card-desc, .zoom-far .world .chips, .zoom-far .world .meta { visibility: hidden; }
.zoom-far .world .section-head h2 { font-size: 3.2rem; }
.is-canvas .world .frame-label, .is-canvas .world .section-tab, .is-canvas .world .wire-label { font-size: calc(0.8125rem / var(--zoom, 1)); }
.is-canvas .world .wire-label { font-size: calc(1rem / max(var(--zoom, 1), 0.7)); }
.is-canvas .world .section-tab { font-size: calc(0.8125rem / max(var(--zoom, 1), 0.55)); padding: calc(.3rem / max(var(--zoom, 1), 0.55)) calc(.85rem / max(var(--zoom, 1), 0.55)); }

.dock {
  display: none; position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 45;
  align-items: center; gap: .25rem; padding: .35rem; background: var(--chrome); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lift);
}
.is-canvas.has-rail .dock { left: calc(50% + var(--rail-w) / 2); }
.dock button {
  min-width: 44px; height: 44px; padding: 0 .75rem; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  font-size: .9375rem; font-weight: 600; color: var(--ink);
}
.dock button:hover { background: var(--surface-2); }
.dock .zoom-read { font-family: var(--font-mono); font-size: .875rem; min-width: 4.2rem; text-align: center; color: var(--ink); }
.dock .sep { width: 1px; height: 26px; background: var(--line); margin: 0 .25rem; }
.dock .hint { font-size: .875rem; color: var(--muted); padding: 0 .6rem; white-space: nowrap; }
.js .dock.for-list { display: none; }
@media (min-width: 1024px) {
  .is-canvas .dock { display: flex; }
  .js:not(.is-canvas) .dock-list-toggle { display: flex; }
}
.dock-list-toggle { display: none; position: fixed; right: 16px; top: calc(var(--toolbar-h) + 16px); z-index: 45; }

/* home node specifics */
.hero { display: grid; grid-template-columns: 0.95fr 1.05fr; }
.hero-photo { position: relative; min-height: 100%; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 20% 30%; border-radius: calc(var(--radius) - 1px) 0 0 calc(var(--radius) - 1px); }
.hero-copy { padding: 2.4rem 2.4rem 2.2rem; }
.hero h1 { font-size: clamp(2.4rem, 1.8rem + 2.2vw, 3.5rem); line-height: 1.02; letter-spacing: -.035em; margin-bottom: 1.1rem; }
.is-canvas .hero h1 { font-size: 3.5rem; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--note-yellow) 62%); color: var(--ink); padding: 0 .1em; }
:root[data-theme="dark"] .hero h1 em { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--note-yellow) 45%, transparent) 62%); }
.hero-copy > p { font-size: 1.1875rem; margin-bottom: 1.5rem; }
.hero .stat-strip { margin-bottom: 1.6rem; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-photo { aspect-ratio: 4 / 3; }
  .hero-photo img { border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
  .hero-copy { padding: 1.5rem 1.25rem 1.5rem; }
  .stat-strip dd { font-size: 1.5rem; }
  .stat-strip div { padding: .7rem .7rem; }
}
.note-stack { display: flex; flex-direction: column; gap: 1.3rem; }
.world .note-stack { flex-direction: row; flex-wrap: wrap; }
.is-canvas .world .note-stack { flex-direction: column; }
.world .note-stack .sticky { flex: 1 1 150px; }

.exp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.exp { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: .9rem; padding: 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.exp .glyph { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--note, var(--note-yellow)); color: var(--note-ink); }
.exp .glyph svg { width: 24px; height: 24px; }
.exp h3 { font-size: 1.15rem; margin-bottom: .2rem; }
.exp h3 a { color: var(--ink); text-decoration: none; }
.exp h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.exp h3 a:hover { text-decoration: underline; }
.exp p { font-size: 1.0625rem; margin: 0 0 .5rem; }
@media (max-width: 640px) { .exp-grid { grid-template-columns: 1fr; } }

.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-top: 1px solid var(--line); }
.link-list li:first-child { border-top: 0; }
.link-list a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 52px; color: var(--ink); text-decoration: none; font-weight: 600; }
.link-list a span { font-family: var(--font-mono); font-size: .8125rem; color: var(--muted); font-weight: 400; }
.link-list a:hover { color: var(--sel); }

/* stacked-flow connectors between nodes on narrow screens */
@media (max-width: 1023px) {
  .world > [data-node] + [data-node]::before {
    content: ""; position: absolute; left: 50%; top: calc(-2.4rem + 4px); height: calc(2.4rem - 8px - 1.9rem); border-left: 2px dashed var(--wire);
  }
}

/* ===================================================================
   ARTICLE
   =================================================================== */
.progress { position: fixed; left: 0; top: var(--toolbar-h); height: 3px; width: 100%; z-index: 49; background: transparent; }
.progress span { display: block; height: 100%; width: 0; background: var(--sel); }
.art-wrap { max-width: 1180px; margin: 0 auto; padding: 2.5rem 2rem 6rem; position: relative; }
.art-hero { }
.art-hero img { width: 100%; aspect-ratio: 21 / 8; object-fit: cover; border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.art-hero .pad { padding: 1.8rem 2.2rem 2rem; }
.art-hero h1 { font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.8rem); line-height: 1.04; letter-spacing: -.03em; margin: .4rem 0 .8rem; max-width: 20ch; }
.art-hero .lede { max-width: 50ch; }
.art-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; margin-top: 1rem; font-family: var(--font-mono); font-size: .875rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.art-meta a { text-transform: none; letter-spacing: 0; font-family: var(--font-ui); font-size: 1rem; font-weight: 600; }

.doc-frame { max-width: 780px; padding: 2.6rem 3rem 3rem; margin-top: 3.5rem; }
.prose { display: flow-root; font-size: 1.1875rem; line-height: 1.7; color: var(--text); }
.prose > * { max-width: 66ch; }
.prose h2 { font-size: 2rem; margin: 2.8rem 0 1rem; scroll-margin-top: calc(var(--toolbar-h) + 1.5rem); display: flex; gap: .7rem; align-items: baseline; }
.prose h2 .hnum { font-family: var(--font-mono); font-size: .875rem; color: var(--sel); font-weight: 500; letter-spacing: 0; }
.prose ol, .prose ul { padding-left: 1.4rem; }
.prose li { margin-bottom: .35rem; }
.prose blockquote { margin: 1.6rem 0; padding: 1rem 1.2rem; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.prose blockquote.skill { background: color-mix(in srgb, var(--hue-projects) 10%, var(--surface)); border-color: color-mix(in srgb, var(--hue-projects) 35%, transparent); }
.prose blockquote p { margin: 0; }

/* Why? / Question notes become sticky notes pinned into the margin with a wire back to the text */
.margin-note {
  font-family: var(--font-hand); font-size: 1.0625rem; line-height: 1.5; color: var(--note-ink);
  background: var(--note); padding: 1rem 1.1rem; border-radius: 3px 3px 14px 3px; margin: 1.5rem 0; max-width: 34rem;
  box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 14px 22px -14px rgba(0,0,0,.45); position: relative;
}
.margin-note .tag { display: block; font-family: var(--font-mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .3rem; }
.margin-note.why { --note: var(--note-yellow); }
.margin-note.ask { --note: var(--note-pink); }
.margin-note code { background: rgba(255,255,255,.55); border-color: rgba(0,0,0,.12); color: var(--note-ink); }
@media (min-width: 1240px) and (max-width: 1279px), (min-width: 1420px) {
  .doc-frame { margin-left: 0; }
  .prose .margin-note { float: right; clear: right; width: 300px; margin: -.5rem -370px 1rem 0; transform: rotate(var(--r, 1.2deg)); }
  .prose .margin-note.ask { --r: -1.4deg; }
  .prose .margin-note::before {
    content: ""; position: absolute; right: 100%; top: 1.4rem; width: 70px; border-top: 2px dashed var(--wire);
  }
  .prose .margin-note::after {
    content: ""; position: absolute; right: calc(100% + 64px); top: calc(1.4rem - 4px); width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--wire);
  }
}

.code-frame { margin: 1.8rem 0; border-radius: 12px; background: var(--code-bg); border: 1px solid #2b313c; overflow: hidden; max-width: none; position: relative; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: .45rem .5rem .45rem 1rem; border-bottom: 1px solid #2b313c; font-family: var(--font-mono); font-size: .8125rem; color: var(--code-dim); }
.code-head .dots { display: inline-flex; gap: 6px; margin-right: .8rem; }
.code-head .dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a414d; }
.copy-btn { min-height: 36px; padding: 0 .8rem; border-radius: 7px; border: 1px solid #3a414d; background: #262c36; color: #e3e7ee; font-family: var(--font-mono); font-size: .8125rem; cursor: pointer; }
.copy-btn:hover { border-color: #82b1ea; }
.code-frame pre { margin: 0; padding: 1.1rem 1.2rem 1.3rem; overflow-x: auto; font-family: var(--font-mono); font-size: .9375rem; line-height: 1.65; color: var(--code-ink); tab-size: 2; font-variant-ligatures: none; }
.code-frame pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.tok-k { color: #c9a6ff; } .tok-s { color: #9fdc9a; } .tok-c { color: #8792a3; font-style: italic; } .tok-t { color: #7fc8f5; } .tok-f { color: #ffcf7a; }

.toc-mobile { margin: 1.5rem 0 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.toc-mobile summary { min-height: 48px; display: flex; align-items: center; padding: 0 1rem; font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; color: var(--ink); }
.toc-mobile ol { margin: 0; padding: 0 1rem 1rem 2.2rem; }
.toc-mobile li a { display: inline-flex; min-height: 40px; align-items: center; }
@media (min-width: 1280px) { .toc-mobile { display: none; } }

.after-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3rem 2.5rem; margin-top: 4.5rem; align-items: start; }
.share-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; }
@media (max-width: 1100px) { .after-grid > * { grid-column: span 12 !important; } }
@media (max-width: 760px) {
  .art-wrap { padding: 1.25rem 16px 5rem; }
  .art-hero .pad { padding: 1.3rem 1.2rem 1.5rem; }
  .art-hero img { aspect-ratio: 16 / 9; }
  .doc-frame { padding: 1.5rem 1.15rem 2rem; margin-top: 2.5rem; }
  .prose { font-size: 1.125rem; }
  .prose h2 { font-size: 1.6rem; }
  .code-frame { margin-left: -.5rem; margin-right: -.5rem; }
  .code-frame pre { font-size: .875rem; }
}

/* ===================================================================
   PATTERNS
   =================================================================== */
.pat-toolbar { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; padding: 1rem 1.2rem; }
.pat-search { flex: 1 1 22rem; display: flex; align-items: center; gap: .5rem; height: 48px; padding: 0 .9rem; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); }
.pat-search input { flex: 1; border: 0; background: transparent; outline: none; min-width: 0; font-size: 1.0625rem; }
.pat-search:focus-within { outline: 3px solid var(--sel); outline-offset: 2px; }
.pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.pill { min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-weight: 500; font-size: .9375rem; color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pat-count { font-family: var(--font-mono); font-size: .875rem; color: var(--muted); display: flex; gap: .8rem; align-items: center; }
.pat-count button { border: 0; background: none; color: var(--sel); font-weight: 600; cursor: pointer; min-height: 44px; text-decoration: underline; }
.pat-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.pat-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.pat-card[hidden] { display: none; }
.pat-thumb { height: 128px; border-bottom: 1px solid var(--line); border-radius: 11px 11px 0 0; background: var(--surface-2); position: relative; overflow: hidden; }
.pat-card .card-body { gap: .35rem; }
.pat-card h3 { font-size: 1.15rem; line-height: 1.25; }
.pat-card h3 a { color: var(--ink); text-decoration: none; }
.pat-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.pat-card h3 a:hover { text-decoration: underline; }
.pat-card p { font-size: 1rem; line-height: 1.5; margin: 0; }
.pat-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.pat-sections .section { margin-bottom: 3.5rem; }
.empty { display: none; text-align: center; padding: 3rem 1rem; }
.empty.is-shown { display: block; }
.empty h2 { font-size: 1.6rem; margin-bottom: .4rem; }

/* category thumbnails, drawn in CSS */
.th { position: absolute; inset: 14px 18px; }
.th-data { background:
  linear-gradient(var(--hue) 0 0) 0 10% / var(--a, 78%) 12px no-repeat,
  linear-gradient(color-mix(in srgb, var(--hue) 55%, transparent) 0 0) 0 40% / var(--b, 52%) 12px no-repeat,
  linear-gradient(color-mix(in srgb, var(--hue) 35%, transparent) 0 0) 0 70% / var(--c, 90%) 12px no-repeat,
  linear-gradient(var(--line-strong) 0 0) 0 100% / var(--d, 36%) 12px no-repeat; }
.th-layout { display: grid; grid-template-columns: var(--cols, 2fr 1fr 1fr); gap: 6px; }
.th-layout i { border-radius: 5px; background: color-mix(in srgb, var(--hue) 30%, var(--surface)); border: 1px solid color-mix(in srgb, var(--hue) 45%, transparent); }
.th-layout i:first-child { grid-row: span 2; }
.th-inter { display: grid; place-items: center; }
.th-inter i { width: var(--c, 58%); height: 40px; border-radius: 9px; background: var(--hue); box-shadow: 0 5px 0 color-mix(in srgb, var(--hue) 50%, #000); }
.th-inter b { position: absolute; left: var(--px, 70%); top: var(--py, 60%); width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 22px solid var(--ink); transform: rotate(-30deg); }
.th-forms { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.th-forms i { height: 30px; border-radius: 7px; border: 1.5px solid var(--line-strong); background: var(--surface); }
.th-forms i + i { width: var(--b, 60%); background: color-mix(in srgb, var(--hue) 22%, var(--surface)); border-color: var(--hue); border-radius: 999px; }
.th-color { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; filter: hue-rotate(var(--hr, 0deg)); }
.th-color i { border-radius: 6px; }
.th-color i:nth-child(1) { background: #364f6a; } .th-color i:nth-child(2) { background: #6f92bd; } .th-color i:nth-child(3) { background: #a65210; }
.th-color i:nth-child(4) { background: #1c6e52; } .th-color i:nth-child(5) { background: #a03227; }

/* ===================================================================
   PATTERN DETAIL: canvas + inspector panel
   =================================================================== */
.inspect-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.5rem; align-items: start; }
.inspector { position: sticky; top: calc(var(--toolbar-h) + 1.5rem); padding: 0; }
.inspector section { padding: 1rem 1.2rem; border-top: 1px solid var(--line); }
.inspector section:first-of-type { border-top: 0; }
.inspector h2 { font-family: var(--font-mono); font-size: .8125rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .6rem; }
.inspector dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0; font-size: 1rem; }
.inspector dt { color: var(--muted); }
.inspector dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.inspector ul.uses { margin: 0; padding-left: 1.1rem; font-size: 1rem; }
@media (max-width: 1100px) { .inspect-layout { grid-template-columns: 1fr; } .inspector { position: static; } }

.panes { padding: 0; }
.pane-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding: .5rem; border-bottom: 1px solid var(--line); background: var(--surface-2); border-radius: 11px 11px 0 0; }
.pane-tabs { display: flex; flex-wrap: wrap; gap: .25rem; }
.pane-tabs button { min-height: 44px; padding: 0 1rem; border: 1px solid transparent; border-radius: 8px; background: transparent; cursor: pointer; font-weight: 500; color: var(--text); }
.pane-tabs button[aria-selected="true"] { background: var(--surface); border-color: var(--line); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.pane-actions { display: flex; gap: .4rem; }
.pane-actions button { min-height: 44px; padding: 0 .9rem; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-weight: 600; font-size: .9375rem; color: var(--ink); }
.pane { padding: 1.5rem; }
.pane[hidden] { display: none; }
.pane pre { font-variant-ligatures: none; margin: 0; overflow-x: auto; font-family: var(--font-mono); font-size: .9375rem; line-height: 1.6; background: var(--code-bg); color: var(--code-ink); padding: 1.1rem 1.2rem; border-radius: 10px; }
.pane-note { font-size: 1rem; color: var(--muted); margin-bottom: 1rem; }
.prompt-text { font-size: 1.125rem; max-width: 68ch; }
.stage { background: var(--ground); background-image: radial-gradient(var(--dot) 1.2px, transparent 1.4px); background-size: 20px 20px; border-radius: 10px; padding: 1.5rem; border: 1px dashed var(--line-strong); }
.stage-cap { font-size: 1rem; color: var(--muted); margin: 0 0 .7rem; }

/* the hairline stat strip pattern itself */
.hss-strip { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; grid-template-columns: 1fr; margin-bottom: 1.6rem; }
@media (min-width: 21rem) { .hss-strip { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .hss-strip.four { grid-template-columns: repeat(4, 1fr); } }
.hss-strip.filter { display: flex; flex-wrap: wrap; }
.hss-strip.filter > .hss-tile { flex: 1 1 8.5rem; }
.hss-tile { background: var(--surface); padding: .9rem 1rem; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.hss-label { font-family: var(--font-mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hss-fig { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.hss-fig.missing { color: var(--muted); opacity: .8; }
.hss-sub { font-size: .9375rem; color: var(--muted); }
button.hss-tile { border: 0; text-align: left; cursor: pointer; font: inherit; min-height: 44px; }
button.hss-tile:hover { background: var(--surface-2); }
button.hss-tile[aria-pressed="true"] { background: color-mix(in srgb, var(--sel) 16%, var(--surface)); box-shadow: inset 0 -3px 0 var(--sel); }
button.hss-tile:focus-visible { outline-offset: -3px; }
.dl-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.dl-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 1rem; border-top: 1px solid var(--line); font-size: 1rem; }
.dl-list li:first-child { border-top: 0; }
.dl-list li[hidden] { display: none; }
.dl-list .st { font-family: var(--font-mono); font-size: .8125rem; padding: .1rem .5rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; align-self: center; }
.hss-status { font-size: 1rem; margin: .8rem 0 0; color: var(--ink); }

/* ===================================================================
   PROJECTS / ABOUT / AI specifics
   =================================================================== */
.proj { display: grid; grid-template-columns: 1fr; }
.proj .shot { aspect-ratio: 16 / 9; background: #0f1115; border-radius: 11px 11px 0 0; overflow: hidden; position: relative; }
.proj .shot img { width: 100%; height: 100%; object-fit: cover; }
.proj .shot.term img { object-fit: contain; }
.proj .shot .rec { position: absolute; left: .7rem; top: .7rem; font-family: var(--font-mono); font-size: .8125rem; color: #f2f3f5; background: rgba(0,0,0,.6); padding: .2rem .5rem; border-radius: 5px; }
.proj .body { padding: 1.2rem 1.3rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; }
.proj h3 { font-size: 1.35rem; }
.proj h3 a { color: var(--ink); text-decoration: none; }
.proj h3 a:hover { text-decoration: underline; }
.proj .stars { font-family: var(--font-mono); font-size: .875rem; color: var(--muted); }
.proj-wide { grid-template-columns: 1.1fr 1fr; }
.proj-wide .shot { aspect-ratio: auto; min-height: 100%; border-radius: 11px 0 0 11px; }
@media (max-width: 760px) { .proj-wide { grid-template-columns: minmax(0, 1fr); } .proj-wide .shot { aspect-ratio: 16 / 9; border-radius: 11px 11px 0 0; } }

.flowline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 3rem; position: relative; }
@media (min-width: 1600px) { .flowline { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2rem; } }
.flowline > * { position: relative; }
@media (max-width: 1000px) { .flowline { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .flowline { grid-template-columns: 1fr; } }
.ghost { background: transparent; border: 2px dashed var(--line-strong); box-shadow: none; }
.ghost h3 { color: var(--muted); }

.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 1100px) { .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .timeline { grid-template-columns: 1fr; } }
.phase .pad { display: flex; flex-direction: column; gap: .5rem; }
.phase ul { margin: .3rem 0 0; padding-left: 1.1rem; font-size: 1rem; }
.phase li { margin-bottom: .3rem; }
.career { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.career li { font-size: .9375rem; padding: .4rem .7rem; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.career li b { color: var(--ink); }
.career li span { font-family: var(--font-mono); font-size: .8125rem; color: var(--muted); margin-left: .35rem; }

.skill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 760px) { .skill-grid { grid-template-columns: 1fr; } }

.tag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-cloud a { font-family: var(--font-mono); font-size: .875rem; padding: .45rem .75rem; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); text-decoration: none; color: var(--ink); min-height: 40px; display: inline-flex; align-items: center; gap: .4rem; }
.tag-cloud a span { color: var(--muted); }
.tag-cloud a:hover { border-color: var(--sel); color: var(--sel); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
  .sticky, .margin-note { transform: none !important; }
}

.canvas-only { display: none; }
.is-canvas .canvas-only { display: block; }
.is-canvas .flow-only { display: none; }
.card .card-desc { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.is-canvas .cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.logo-mark rect { fill: #364f6a; }
.logo-mark .h { fill: var(--chrome); stroke: var(--sel); stroke-width: 1.5; }
:root[data-theme="dark"] .logo-mark rect { fill: #4a6d8c; }
.dark-node .chip { background: #1f2530; border-color: #334055; color: #dfe5ee; }
.cap-group { border: 1px solid #2e3643; border-radius: 12px; padding: 1.2rem; border-top: 3px solid var(--cap, #82b1ea); }
.proj:not(.proj-wide) { grid-template-rows: auto 1fr; align-content: start; }

@media (max-width: 760px) {
  .after-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .after-grid > * { grid-column: auto !important; }
}
