/* Hexad Solutions. Theme: Trading terminal. Near-black, the hexad logo tiled
   faintly across the whole page, Space Grotesk headings, Inter text and
   JetBrains Mono for numbers. Green marks what you can act on and the lit arm of
   the Square of Nine; teal marks detail (dates, stacks). Every layout sits on
   one 12-column grid with a 24px gutter. */
:root {
  --paper: #0b0f17;
  --sheet: #111827;
  --sheet-2: #172033;
  --ink: #e5e7eb;          /* 14.1:1 on --sheet */
  --ink-soft: #94a3b8;     /* 6.9:1 on --sheet */
  --rule: #1f2937;
  --rule-strong: #334155;
  --brass: #22c55e;        /* fills: buttons, lit cells */
  --on-brass: #052e14;
  --brass-ink: #4ade80;    /* 10.4:1 on --sheet: links */
  --verdigris: #5eead4;    /* 11.9:1 on --sheet: dates, stacks */
  --todo: #fb923c;
  --media-bg: #05080d;
  --font: "Inter", system-ui, sans-serif;
  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --col-gap: 24px;
  --radius: 6px;
  --header-h: 68px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--ink);
  font-variation-settings: "wdth" 100;
  background-color: var(--paper);
  background-image: url("/assets/img/tiles/tile-mark.svg"), url("/assets/img/tiles/tile-mark.svg");
  background-size: 64px 64px, 64px 64px;
  background-position: 0 0, 32px 32px;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brass-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; line-height: 1.1; color: #fff; font-weight: 600; font-family: var(--font-display); }
h1, h2 { letter-spacing: -0.02em; }
h1 { font-weight: 700; }
h2 { font-size: clamp(32px, 3.4vw, 44px); }
h3 { font-size: 20px; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 68ch; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brass); color: var(--on-brass); padding: 8px 12px; z-index: 30; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.todo { display: inline-block; color: var(--todo); border: 1px dashed var(--todo); border-radius: 4px; padding: 0 6px; font-size: 14px; font-weight: 600; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); }
.mark { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.mark:hover { color: var(--ink); }
.mark-text { display: flex; flex-direction: column; line-height: 1.15; }
.mark-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.mark-by { font-size: 14px; color: var(--ink-soft); }
.logo { width: 46px; height: 46px; flex: none; }
.logo polygon, .logo path { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.logo .tri-up { stroke: #4fc4b6; stroke-width: 3; fill: rgba(79, 196, 182, .14); }
.logo .tri-down { stroke: #e2b255; stroke-width: 3; fill: rgba(226, 178, 85, .14); }
.logo .spiral { stroke: var(--ink); stroke-width: 1.8; }
.logo .eye { fill: var(--ink); }

.nav { display: flex; align-items: center; gap: 2px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 6px; border: 0; background: none;
  color: var(--ink-soft); font: inherit; font-size: 16px; font-weight: 500; text-decoration: none; cursor: pointer;
}
.nav-link svg { width: 12px; height: 12px; transition: transform .2s; }
.nav-link:hover { color: var(--ink); background: var(--sheet-2); }
.nav-link[aria-current="page"], .nav-work-btn.current { color: #fff; box-shadow: inset 0 -2px 0 var(--brass); border-radius: 0; }
.nav-work-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav .btn-small { margin-left: 10px; }
.nav-work { position: relative; }
.work-menu {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%); width: min(560px, 92vw);
  list-style: none; margin: 0; padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.work-menu[hidden] { display: none; }
.work-menu li.extra { display: none; }
.work-menu a { display: block; padding: 10px 12px; border-radius: 6px; text-decoration: none; color: var(--ink); }
.work-menu a:hover, .work-menu a[aria-current="page"] { background: var(--sheet-2); }
.work-menu a[aria-current="page"] strong { color: var(--brass-ink); }
.work-menu strong { display: block; font-size: 16px; font-weight: 600; }
.work-menu span { display: block; font-size: 14px; color: var(--ink-soft); line-height: 1.4; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 11px 20px; border-radius: 6px;
  border: 1px solid var(--rule-strong); background: var(--sheet); color: var(--ink); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--sheet-2); border-color: var(--ink-soft); color: var(--ink); }
.btn-solid { background: var(--brass); border-color: var(--brass); color: var(--on-brass); }
.btn-solid:hover { background: #4ade80; border-color: #4ade80; color: var(--on-brass); }
.btn-small { padding: 7px 14px; font-size: 15px; }

/* ---------- Panels ---------- */
.panel { padding-top: clamp(32px, 4.5vw, 64px); padding-bottom: clamp(48px, 7vw, 96px); outline: none; }
.panel[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .panel:not([hidden]) { animation: panel-in .25s ease-out; }
  @keyframes panel-in { from { opacity: 0; } to { opacity: 1; } }
}

/* ---------- Overview ---------- */
.overview { padding-top: clamp(24px, 3vw, 48px); padding-bottom: 40px; }
.hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 32px; align-items: center; }
.hero-text { grid-column: 1 / span 6; }
.kicker { font-size: 16px; font-weight: 600; color: var(--verdigris); margin: 0 0 16px; }
.hero h1 { font-size: clamp(42px, 4.8vw, 68px); line-height: 1.02; margin-bottom: 22px; max-width: 14ch; }
.lede { font-size: clamp(17px, 1.3vw, 19px); color: var(--ink-soft); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Square of Nine: printed like a table in an almanac */
.sq9 { grid-column: 7 / span 6; margin: 0; justify-self: end; width: 100%; max-width: 520px; }
.sq9-frame { position: relative; padding: 30px; }
/* The hexad's two triangles laid lightly over the square, centred on 1. */
.sq9-frame::after { content: ""; position: absolute; inset: 30px; background: url("/assets/img/hexad-overlay.svg") center / 100% 100% no-repeat; opacity: .9; pointer-events: none; }
.sq9-grid {
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); grid-template-rows: repeat(9, minmax(0, 1fr)); gap: 0;
  aspect-ratio: 1; background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.cell {
  display: grid; place-items: center; min-width: 0; background: var(--sheet); color: #64748b;
  border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono); font-size: clamp(10px, 0.85vw, 13px); font-weight: 500; cursor: default;
  transition: background-color .2s, color .2s;
}
.cell:nth-child(9n) { border-right: 0; }
.cell:nth-last-child(-n+9) { border-bottom: 0; }
.cell.spoke { color: var(--ink); background: var(--sheet-2); font-weight: 600; cursor: pointer; }
.cell.spoke.lit { background: var(--brass); color: var(--on-brass); font-weight: 700; }
.cell.center { background: #fff; color: var(--paper); font-weight: 700; }
.cell.pre { opacity: 0; }
.cell.on { opacity: 1; transition: opacity .18s, background-color .2s, color .2s; }
.arm-label {
  position: absolute; transform: translate(-50%, -50%); padding: 2px 9px; border-radius: 4px; white-space: nowrap;
  background: var(--sheet); border: 1px solid var(--rule-strong); color: var(--ink-soft); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.arm-label:hover { color: var(--ink); border-color: var(--ink-soft); }
.arm-label.side-e { transform: translate(-50%, -50%) rotate(90deg); }
.arm-label.side-w { transform: translate(-50%, -50%) rotate(-90deg); }
.arm-label[aria-pressed="true"] { background: var(--brass); border-color: var(--brass); color: var(--on-brass); }
.sq9-readout { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; margin: 10px 30px 0; }
.sq9-angle { font-family: var(--font-mono); font-size: 34px; font-weight: 700; line-height: 1; color: var(--brass-ink); font-variant-numeric: tabular-nums; min-width: 2.6ch; letter-spacing: -0.02em; }
.sq9-copy { display: grid; gap: 2px; }
.sq9-name { font-weight: 600; font-size: 18px; }
.sq9-desc { color: var(--ink-soft); font-size: 15px; }
.sq9-open { font-weight: 600; font-size: 15px; }
.sq9-note { font-size: 14px; color: var(--ink-soft); margin: 12px 30px 0; }
.area-list { display: none; }

.stats {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: var(--col-gap); margin: 0 0 clamp(24px, 3vw, 40px);
  padding: 20px 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); border-bottom: 1px solid var(--rule);
}
.stats div { padding: 0 0 0 16px; border-left: 1px solid var(--rule); }
.stats div:first-child { border-left: 0; padding-left: 16px; }
.stats dt { font-size: 14px; color: var(--ink-soft); }
.stats dd { margin: 2px 0 0; font-family: var(--font-mono); color: var(--brass-ink); font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stats small { font-size: 18px; color: var(--ink-soft); font-weight: 500; margin-left: 2px; }
.stats-compact { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; }

/* ---------- Section heads and calls to action ---------- */
.sec-head { margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--rule-strong); max-width: none; }
.sec-head > * { max-width: 760px; }
.sec-lede { font-size: 19px; color: var(--ink); margin-top: 14px; }
.sec-jargon { font-size: 15px; color: var(--ink-soft); margin-bottom: 0; }
.cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin: 0 0 40px; padding: 20px 24px; max-width: none;
  background: var(--sheet); color: #fff; border: 1px solid var(--rule-strong); border-left: 3px solid var(--brass); border-radius: var(--radius); font-family: var(--font-display); font-size: 20px; font-weight: 600;
}
.cta .btn { background: var(--brass); border-color: var(--brass); color: var(--on-brass); }
.cta .btn:hover { background: #4ade80; }
.cta .btn + .btn { background: transparent; border-color: var(--rule-strong); color: var(--ink); }
.cta .btn + .btn:hover { background: var(--sheet-2); }
.cta .btn:first-of-type { margin-left: auto; }
.sub { font-size: 26px; margin: 0 0 16px; }
.quotes + .timeline { margin-top: 48px; }

/* ---------- Projects: 12-column grid, cards span 6 or 12 ---------- */
.projects { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--col-gap); margin-bottom: 48px; }
.project { grid-column: span 6; padding: 24px 28px; background: var(--sheet); border: 1px solid var(--rule); border-top: 2px solid var(--brass); border-radius: 0 0 var(--radius) var(--radius); }
.project-wide { grid-column: 1 / -1; }
/* A wide card followed by three: set the three in one row of thirds. */
.projects:has(> .project-wide:first-child + .project + .project + .project:last-child) > .project:not(.project-wide) { grid-column: span 4; }
.project-media { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--col-gap); align-items: start; }
.project-media > :first-child { grid-column: span 5; }
.project-media > :last-child { grid-column: span 7; }
/* A card left alone after a media card takes the full row. */
.project-media + .project:last-child { grid-column: 1 / -1; }
.project-media .media, .project-media .zoom img { width: auto; max-width: 100%; height: auto; max-height: 560px; object-fit: contain; margin: 0 auto; border-radius: 4px; border: 1px solid var(--rule-strong); background: var(--media-bg); }
.project h3 { font-size: 22px; margin-bottom: 8px; }
.one-line { font-size: 17px; color: var(--ink-soft); margin-bottom: 16px; }
.facts { margin: 0; display: grid; gap: 0; }
.facts div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px solid var(--rule); }
.facts dt { font-size: 14px; color: var(--ink-soft); font-weight: 600; padding-top: 2px; }
.facts dd { margin: 0; font-size: 15.5px; color: var(--ink); }
.facts div:nth-child(3) dd { color: var(--verdigris); font-weight: 500; }

/* ---------- Media: tours, galleries, lightbox ---------- */
.tours { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--col-gap); margin-bottom: 40px; }
.tour { grid-column: span 6; margin: 0; }
.tour video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--rule-strong); border-radius: 4px; background: var(--media-bg); }
.tour figcaption, .gallery-main figcaption { margin-top: 10px; color: var(--ink-soft); font-size: 15px; }
.tour-wide { grid-column: 1 / -1; margin-bottom: 40px; }
.tour-wide video { aspect-ratio: 16 / 7; object-position: top; }

.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; position: relative; border-radius: 4px; }
.zoom::after {
  content: "Click to enlarge"; position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 4px;
  background: rgba(5, 8, 13, 0.88); color: var(--ink); font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .2s;
}
.zoom:hover::after, .zoom:focus-visible::after { opacity: 1; }
.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--col-gap); }
.gallery-main { grid-column: span 9; margin: 0; }
.gallery-main img { width: 100%; height: auto; border: 1px solid var(--rule-strong); border-radius: 4px; background: var(--media-bg); }
.thumbs { grid-column: span 3; list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: start; }
.thumbs button {
  width: 100%; display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; padding: 6px;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; text-align: left; cursor: pointer;
}
.thumbs button img { width: 84px; height: 52px; object-fit: cover; object-position: top left; border-radius: 3px; }
.thumbs button:hover { border-color: var(--rule-strong); }
.thumbs button[aria-pressed="true"] { border-color: var(--brass); box-shadow: inset 3px 0 0 var(--brass); }

.lightbox { width: min(96vw, 1800px); max-height: 94vh; padding: 16px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--sheet); color: var(--ink); }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.85); }
.lightbox img { width: 100%; height: auto; max-height: calc(94vh - 110px); object-fit: contain; }
.lightbox p { margin: 10px 0 0; color: var(--ink-soft); font-size: 15px; max-width: none; }
.lightbox form { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.lightbox-close { font: inherit; font-weight: 600; font-size: 15px; color: var(--on-brass); background: var(--brass); border: 0; border-radius: 6px; padding: 6px 16px; cursor: pointer; }

/* ---------- Scrapers table ---------- */
.table-wrap { overflow-x: auto; background: var(--sheet); border: 1px solid var(--rule); border-top: 2px solid var(--brass); border-radius: 0 0 var(--radius) var(--radius); }
.scrapers { width: 100%; border-collapse: collapse; min-width: 720px; }
.scrapers th, .scrapers td { text-align: left; vertical-align: top; padding: 14px 18px; border-bottom: 1px solid var(--rule); font-size: 16px; }
.scrapers thead th { font-size: 14px; color: var(--ink-soft); font-weight: 600; background: var(--sheet-2); }
.scrapers tbody th { font-weight: 600; }
.scrapers td:nth-child(2) { color: var(--verdigris); white-space: nowrap; }
.scrapers tbody tr:last-child > * { border-bottom: 0; }

/* ---------- Video, games, AI ---------- */
.channels { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--col-gap); margin-bottom: 32px; }
.channel { grid-column: span 3; }
.channel video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--rule-strong); border-radius: 4px; background: var(--media-bg); }
.channel h3 { margin: 14px 0 4px; }
.channel p { color: var(--ink-soft); font-size: 15.5px; }

.phones { list-style: none; padding: 4px 0 16px; margin: 32px 0 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: var(--col-gap); overflow-x: auto; scroll-snap-type: x mandatory; }
.phones li { scroll-snap-align: start; }
@media (min-width: 761px) {
  .phones { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); overflow: visible; }
}
.phones figure { margin: 0; }
.phones img { width: 100%; height: auto; aspect-ratio: 1 / 2; object-fit: cover; border: 3px solid var(--rule-strong); border-radius: 22px; background: var(--media-bg); }
.phones figcaption { margin-top: 10px; font-size: 14.5px; color: var(--ink-soft); }
.phones strong { display: block; color: var(--ink); font-size: 16px; }

.ai-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--col-gap); }
.ai-block { grid-column: span 4; padding: 24px; background: var(--sheet); border: 1px solid var(--rule); border-top: 2px solid var(--brass); border-radius: 0 0 var(--radius) var(--radius); }
.ai-block h3 { margin-bottom: 8px; }
.ai-block p { font-size: 15.5px; color: var(--ink-soft); margin: 0; }

/* ---------- Experience ---------- */
.timeline { list-style: none; padding: 0; margin: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }
.timeline li { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); padding: 18px 16px; border-bottom: 1px solid var(--rule); }
.timeline .when { grid-column: span 3; font-family: var(--font-mono); font-size: 15px; font-weight: 500; color: var(--verdigris); font-variant-numeric: tabular-nums; }
.timeline li > div { grid-column: span 9; }
.timeline h3 { font-size: 18px; margin-bottom: 4px; }
.timeline p { color: var(--ink-soft); margin: 0; font-size: 16px; }
.quotes { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--col-gap); margin-top: 24px; }
.quotes blockquote { grid-column: span 6; margin: 0; padding: 20px 24px; background: var(--sheet); border: 1px solid var(--rule); border-left: 3px solid var(--brass); border-radius: 0 var(--radius) var(--radius) 0; }
.quotes p { font-size: 18px; }
.quotes footer { color: var(--ink-soft); font-size: 14px; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--col-gap); }
.contact > :first-child { grid-column: span 5; }
.contact > :last-child { grid-column: 7 / span 6; }
.links { list-style: none; padding: 0; margin: 24px 0 0; }
.links li { border-top: 1px solid var(--rule); padding: 12px 0; font-size: 18px; font-weight: 600; }
.links a { text-decoration: none; }
.contact-form { display: grid; gap: 16px; padding: clamp(20px, 3vw, 32px); background: var(--sheet); border: 1px solid var(--rule); border-top: 2px solid var(--brass); border-radius: 0 0 var(--radius) var(--radius); }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.contact-form input, .contact-form textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); padding: 10px 12px; border-radius: 6px; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--brass); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 35%, transparent); }
.contact-form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 0; min-height: 1.6em; font-weight: 600; font-size: 15px; }
.form-status.ok { color: var(--verdigris); }
.form-status.err { color: var(--todo); }

.foot { background: transparent; border-top: 1px solid var(--rule-strong); padding: 24px 0; color: var(--ink-soft); font-size: 14px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; }
  .stats div:nth-child(4) { border-left: 0; }
}
@media (max-width: 1000px) {
  .hero-text, .sq9, .contact > :first-child, .contact > :last-child,
  .project-media > :first-child, .project-media > :last-child,
  .gallery-main, .thumbs, .tour { grid-column: 1 / -1; }
  .sq9 { justify-self: center; }
  .projects:has(> .project-wide:first-child + .project + .project + .project:last-child) > .project:not(.project-wide) { grid-column: 1 / -1; }
  .thumbs { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .channel, .ai-block { grid-column: span 6; }
}
@media (max-width: 760px) {
  .project, .quotes blockquote { grid-column: 1 / -1; }
  .nav > .nav-link:not(.nav-work-btn) { display: none; }
  .nav-work-btn { font-weight: 600; color: var(--ink); }
  .work-menu { position: fixed; top: var(--header-h); left: 0; right: 0; transform: none; width: auto; grid-template-columns: 1fr; border-radius: 0 0 var(--radius) var(--radius); max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .work-menu li.extra { display: block; }
  .timeline .when, .timeline li > div { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .sq9 { display: none; }
  .area-list { grid-column: 1 / -1; display: grid; gap: 0; list-style: none; padding: 0; margin: 0; background: var(--sheet); border-top: 2px solid var(--brass); }
  .area-list a { display: block; padding: 12px 14px; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
  .area-list strong { display: block; font-size: 16px; }
  .area-list span { font-size: 14px; color: var(--ink-soft); }
  .stats, .stats-compact { grid-template-columns: 1fr 1fr; }
  .stats div, .stats div:first-child { border-left: 0; padding-left: 14px; }
  .stats div:nth-child(even) { border-left: 1px solid var(--rule); }
  .stats dd { font-size: 28px; }
  .channel, .ai-block { grid-column: 1 / -1; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .cta { font-size: 18px; }
  .cta .btn:first-of-type { margin-left: 0; }
  .mark-by { display: none; }
}
@media (max-width: 480px) {
  :root { --gutter: 16px; --col-gap: 16px; }
  .mark { gap: 8px; }
  .logo { width: 30px; height: 30px; }
  .mark-name { font-size: 16px; }
  .nav { gap: 0; }
  .nav-link { padding: 8px 8px; }
  .nav .btn-small { margin-left: 4px; padding: 6px 12px; font-size: 14px; }
}
@media (max-width: 420px) {
  .mark-by { display: none; }
  .nav .btn-small { padding: 6px 10px; font-size: 13.5px; }
  .mark-name { font-size: 15px; }
}
@media (max-width: 380px) {
  .mark-text { display: none; }
}
