/*
  Sebastián Llovera — shared design system
  Hand-written (not generated). Linked from every page, including index.html.

  Two voices:
    --font-sans  Inter           text, titles
    --font-mono  JetBrains Mono  metadata (years, media, labels, nav)

  Type scale (5 sizes only): xs / sm / md / lg / xl
  Colour tokens: --bg --fg --fg-muted --line --accent
  --accent is used only for hover, focus and "current page" states.
*/

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;

  /* colour */
  --bg: #0a0a0a;
  --fg: #ececec;
  --fg-muted: #a6a6a6;
  --line: rgba(255, 255, 255, 0.16);
  --accent: #00e87e;
  --accent-cool: #8fb0ff;
  --surface: rgba(10, 10, 10, 0.94);

  /* type: families */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

  /* type: the only five sizes */
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-md: clamp(17px, 0.2vw + 16px, 19px);
  --fs-lg: clamp(22px, 1.1vw + 14px, 28px);
  --fs-xl: clamp(34px, 3.6vw + 10px, 56px);

  /* type: rhythm */
  --lh-tight: 1.12;
  --lh-title: 1.2;
  --lh-base: 1.6;
  --measure: 65ch;

  /* layout */
  --nav-h: 56px;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1560px;
  --gap: clamp(16px, 2vw, 28px);
  --space-section: clamp(56px, 9vw, 120px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3, p, ul, ol, dl, dd, figure, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }
::selection { background: var(--accent); color: #000; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; left: var(--gutter); top: -80px; z-index: 1000;
  background: var(--fg); color: #000; padding: 8px 14px;
  font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase;
}
.skip-link:focus { top: 8px; color: #000; }

/* ── type utilities ── */
.mono { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.04em; line-height: 1.5; }
.mono-up { text-transform: uppercase; }
.muted { color: var(--fg-muted); }
.title {
  font-family: var(--font-sans);
  font-weight: 500;
  line-height: var(--lh-title);
}
.subtitle { color: var(--fg-muted); font-size: var(--fs-md); line-height: var(--lh-title); margin-top: 0.4em; }
.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1em; }
.prose a, .link {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.prose a:hover, .link:hover { text-decoration-color: var(--accent); color: var(--accent); }

/* ── site navigation (same on every page) ──
   Mono labels (links, EN/ES, view switch) are uppercase UI labels. The artist's name is written as is. */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: var(--nav-h);
  background: var(--surface);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
  column-gap: clamp(14px, 3vw, 40px);
  padding: 0 var(--gutter);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-nav a { color: var(--fg); }
.site-nav .brand { font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 500; letter-spacing: 0; text-transform: none; white-space: nowrap; padding: 10px 0; }
.site-nav .brand:hover, .site-nav a:hover { color: var(--accent); }
.site-nav .nav-links { display: flex; gap: clamp(14px, 2.2vw, 30px); flex: 1 1 auto; }
.site-nav .nav-links a { padding: 10px 0; color: var(--fg-muted); border-bottom: 1px solid transparent; line-height: 1.2; white-space: nowrap; }
.site-nav .nav-links a:hover { color: var(--accent); }
.site-nav .nav-links a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }
.site-nav .nav-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.site-nav .nav-lang, .site-nav .nav-view { display: flex; align-items: center; gap: 4px; }
.site-nav .nav-view-label { color: var(--fg-muted); margin-right: 6px; }
.site-nav .lang-btn, .site-nav .view-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 40px; height: 32px; padding: 0 8px;
  color: var(--fg-muted); border: 1px solid var(--line);
  border-radius: 2px; background: transparent;
  font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer;
}
.site-nav .view-btn { opacity: 1; min-width: 0; padding: 0 10px; }
.site-nav .view-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; flex: 0 0 auto; }
.site-nav .lang-btn:hover, .site-nav .view-btn:hover { color: var(--accent); border-color: var(--accent); }
.site-nav .lang-btn[aria-pressed="true"], .site-nav .view-btn[aria-pressed="true"] { color: var(--fg); border-color: var(--fg); }
.site-nav .view-btn.-hidden { display: none; }
.site-nav .view-btn.motion-btn { border-style: dashed; }
.site-nav .view-btn.motion-btn.-active { color: var(--fg); border-color: var(--fg); }

@media (max-width: 1000px) {
  .site-nav .nav-view-label { display: none; }
}

/* Neural view is desktop only: viewport >= 900px AND a fine pointer (same query as NEURAL_DESKTOP_MQ in index.html).
   Anywhere else the view switch, the Tilt button and every Neural control are removed. */
@media not all and (min-width: 900px) and (pointer: fine) {
  .site-nav .nav-view,
  .graph-ui, .graph-tag-legend, .graph-node-legend, .graph-search-bar, .graph-controls, .graph-results,
  .space-view, .space-hints, .node-submode-toolbar { display: none !important; }
}

/* Header stays one row, full name, down to 360px. */
@media (max-width: 640px) {
  .site-nav { column-gap: 12px; }
  .site-nav .nav-links { gap: 12px; flex: 0 1 auto; }
  .site-nav .nav-right { gap: 8px; }
  .site-nav .lang-btn { min-width: 30px; width: 30px; height: 30px; padding: 0; }
  .site-nav .nav-lang { gap: 2px; }
}
@media (max-width: 440px) {
  .site-nav { padding: 0 12px; column-gap: 10px; }
  .site-nav .nav-links { gap: 10px; }
  .site-nav .nav-links a { letter-spacing: 0.02em; }
  .site-nav .nav-right { gap: 6px; }
  .site-nav .lang-btn { width: 28px; min-width: 28px; }
  .site-nav .brand { font-size: 13px; }
}
@media (max-width: 380px) {
  .site-nav { padding: 0 10px; column-gap: 8px; }
  .site-nav .nav-links { gap: 8px; }
  .site-nav .nav-links a { letter-spacing: 0; font-size: 10.5px; }
  .site-nav .lang-btn { width: 26px; min-width: 26px; }
}

/* ── page frame ── */
.page {
  flex: 1 0 auto;
  width: 100%; max-width: var(--max); margin: 0 auto;
  padding: calc(var(--nav-h) + clamp(32px, 6vw, 80px)) var(--gutter) var(--space-section);
}
.page-title { font-size: var(--fs-lg); margin-bottom: clamp(24px, 4vw, 48px); }

/* ── footer: one line ── */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  padding: 24px var(--gutter) calc(24px + 56px);
  color: var(--fg-muted);
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.03em; line-height: 1.6;
}
.site-footer .foot-row {
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px;
}
.site-footer p { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; }
.site-footer a { color: var(--fg-muted); text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--fg); }

/* ── technical sheet ── */
.sheet { display: grid; gap: 0; border-top: 1px solid var(--line); }
.sheet > div {
  display: grid; grid-template-columns: minmax(96px, 9em) 1fr; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.sheet dt { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-muted); padding-top: 3px; }
.sheet dd { font-size: var(--fs-sm); line-height: 1.5; }
.sheet a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.2em; }
.sheet a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-block; padding: 2px 8px; border: 1px solid var(--line); border-radius: 2px;
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.04em;
  color: var(--fg-muted); background: transparent; text-decoration: none !important; cursor: pointer;
}
a.tag:hover, button.tag:hover { color: var(--accent); border-color: var(--accent); }
button.tag[aria-pressed="true"] { color: var(--bg); background: var(--fg); border-color: var(--fg); }
button.tag[aria-pressed="true"]:hover { background: var(--accent); border-color: var(--accent); color: #000; }

/* ── work page ── */
.work-head { margin-bottom: clamp(20px, 3vw, 36px); max-width: 60rem; }
.work-head h1 { font-size: var(--fs-lg); }
.work-head .year { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.04em; color: var(--fg-muted); margin-top: 10px; }
.hero { margin: 0 0 clamp(28px, 5vw, 64px); }
.hero img { display: block; width: 100%; height: auto; max-height: 85vh; object-fit: contain; object-position: center; background: transparent; }
.work-body {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 6vw, 96px);
  margin-bottom: clamp(40px, 7vw, 96px);
}
.work-body .text { max-width: var(--measure); }
.work-body .text p + p { margin-top: 1em; }
.work-body .text a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.2em; overflow-wrap: anywhere; }
.work-body .text a:hover { color: var(--accent); text-decoration-color: var(--accent); }
@media (max-width: 800px) { .work-body { grid-template-columns: 1fr; } }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px) var(--gap); align-items: start; margin-bottom: clamp(40px, 7vw, 96px); }
.gallery figure img { width: 100%; height: auto; background: #111; }
.gallery figcaption, .hero figcaption { margin-top: 8px; font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.03em; color: var(--fg-muted); line-height: 1.5; max-width: 60ch; }
.gallery figcaption .n { color: var(--fg); margin-right: 8px; }
.hero figcaption .n { color: var(--fg); margin-right: 8px; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } }
.back-link { display: inline-block; margin-bottom: 18px; font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-muted); padding: 8px 0; }
.back-link:hover, .back-link:focus-visible { color: var(--fg); }
/* Phones: images run edge to edge, captions keep the text gutter. */
@media (max-width: 700px) {
  .hero, .hero-video, .gallery figure { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
  .hero img { max-height: none; }
  .hero figcaption, .gallery figcaption { padding: 0 var(--gutter); }
  .gallery { row-gap: 28px; }
  .pn a { padding: 18px 0; min-height: 64px; }
}
.work-video { position: relative; aspect-ratio: 16 / 9; background: #000; margin-bottom: clamp(40px, 7vw, 96px); }
.work-video.hero-video { margin-bottom: clamp(28px, 5vw, 64px); }
.work-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: clamp(40px, 7vw, 96px); }
.pn a { display: block; padding: 22px 0; }
.pn a + a { text-align: right; }
.pn .dir { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-muted); display: block; margin-bottom: 6px; }
.pn .t { font-size: var(--fs-md); font-weight: 500; line-height: var(--lh-title); }
.pn a:hover .t { color: var(--accent); }
@media (max-width: 560px) { .pn .t { font-size: var(--fs-sm); } }
.connections h2 { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 16px; }
.connections ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px) var(--gap); list-style: none; }
.connections li a { display: flex; flex-direction: column; gap: 6px; height: 100%; }
.connections .thumb { display: block; aspect-ratio: 4 / 3; background: rgba(255, 255, 255, 0.04); overflow: hidden; margin-bottom: 4px; }
.connections .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.connections .why { font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.4; color: var(--accent-cool); }
.connections .t { font-size: var(--fs-sm); font-weight: 500; line-height: var(--lh-title); }
.connections .y { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-muted); }
.connections li a:hover .t { color: var(--accent); }
.connections .all-wrap { margin-top: 28px; }
.connections a.all { font-family: var(--font-mono); font-size: var(--fs-xs); }
@media (max-width: 900px) { .connections ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .connections ul { grid-template-columns: 1fr; } }

/* ── index of works ── */
.index-tools { display: flex; flex-wrap: wrap; gap: 12px var(--gap); align-items: center; justify-content: space-between; margin-bottom: 20px; }
.index-tools .tag-list { flex: 1 1 28rem; }
.index-search {
  background: transparent; color: var(--fg); border: 1px solid var(--line); border-radius: 2px;
  font-family: var(--font-mono); font-size: var(--fs-sm); padding: 7px 10px; min-width: 15rem;
}
.index-search::placeholder { color: var(--fg-muted); }
.index-search:focus-visible { outline: 2px solid var(--accent); border-color: var(--accent); }
.index-count { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-muted); margin-bottom: 8px; }
.index-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); line-height: 1.4; }
.index-table caption { text-align: left; }
.index-table th {
  text-align: left; font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 400;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-muted);
  padding: 10px 12px 10px 0; border-bottom: 1px solid var(--fg);
}
.index-table th button {
  all: unset; cursor: pointer; display: inline-flex; gap: 6px; align-items: center;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit;
}
.index-table th button:hover { color: var(--accent); }
.index-table th button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.index-table th button .arrow { opacity: 0; font-size: var(--fs-xs); }
.index-table th[aria-sort="ascending"] button .arrow, .index-table th[aria-sort="descending"] button .arrow { opacity: 1; color: var(--accent); }
.index-table td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.index-table td.c-year { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-muted); white-space: nowrap; padding-top: 17px; width: 10.5em; }
.index-table td.c-title a { font-size: var(--fs-md); font-weight: 500; line-height: var(--lh-title); display: inline-block; }
.index-table td.c-title .sub { display: block; color: var(--fg-muted); font-size: var(--fs-sm); margin-top: 2px; }
.index-table td.c-medium { color: var(--fg-muted); max-width: 34em; }
.index-table td.c-place { max-width: 24em; }
.index-table tbody tr:hover td, .index-table tbody tr:focus-within td { background: rgba(255, 255, 255, 0.04); }
.index-table tbody tr:hover a.row-link, .index-table tbody tr:focus-within a.row-link { color: var(--accent); }
.index-table tr[hidden] { display: none; }
.index-table .empty { color: var(--fg-muted); }
.index-table .row-thumb { display: none; }
.index-empty { padding: 32px 0; color: var(--fg-muted); }
.index-preview {
  position: fixed; left: 0; top: 0; z-index: 400; pointer-events: none;
  width: min(30vw, 420px); aspect-ratio: 4 / 3; background: #000 center / cover no-repeat;
  border: 1px solid var(--line);
  opacity: 0; transition: opacity 0.12s linear;
}
.index-preview.on { opacity: 1; }
@media (max-width: 760px), (hover: none) {
  .index-preview { display: none; }
}
@media (max-width: 760px) {
  .index-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .index-table, .index-table tbody, .index-table tr, .index-table td { display: block; width: 100%; }
  .index-table tr { position: relative; padding: 14px 0 14px 78px; border-bottom: 1px solid var(--line); min-height: 94px; }
  .index-table tr[hidden] { display: none; }
  .index-table td { padding: 0; border: 0; max-width: none !important; width: auto !important; }
  .index-table td.c-year { padding: 0 0 2px; font-size: var(--fs-xs); }
  .index-table .row-thumb { display: block; position: absolute; left: 0; top: 14px; width: 64px; height: 64px; object-fit: cover; background: #111; }
  .index-table td.c-medium, .index-table td.c-place { font-size: var(--fs-xs); font-family: var(--font-mono); color: var(--fg-muted); margin-top: 4px; }
  .index-table td.c-medium:empty, .index-table td.c-place:empty { display: none; }
}

/* ── about ── */
.about-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(24px, 6vw, 96px); align-items: start; }
.about-index { position: sticky; top: calc(var(--nav-h) + 32px); display: flex; flex-direction: column; gap: 10px; font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.04em; text-transform: uppercase; }
.about-index a { color: var(--fg-muted); border-bottom: 1px solid transparent; align-self: flex-start; padding: 2px 0; }
.about-index a:hover, .about-index a:focus-visible { color: var(--accent); }
.about-sections { min-width: 0; }
.about-sec + .about-sec { margin-top: var(--space-section); }
.about-sec > h2, .cv-head h2 { font-size: var(--fs-md); font-weight: 500; margin-bottom: 16px; }
.about-sec .body { max-width: var(--measure); }
.about-sec .body p + p { margin-top: 1em; }
.about-sec .body a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.2em; }
.about-sec .body a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.link-list li + li { margin-top: 12px; }
.link-list a { display: inline-block; }
.link-list .src { display: block; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-muted); letter-spacing: 0.03em; }
@media (max-width: 1000px) {
  .about-layout { grid-template-columns: 1fr; gap: 24px; }
  .about-index { position: static; flex-direction: row; gap: 18px; }
}

/* ── CV (inside About) ── */
.cv-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.cv-head .dl { display: inline-block; font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 12px; border: 1px solid var(--line); border-radius: 2px; }
.cv-head .dl:hover { border-color: var(--accent); }
.cv-print-title { display: none; }
.cv-section { margin-top: clamp(28px, 4vw, 48px); }
.cv-section h3 { font-size: var(--fs-sm); font-weight: 500; margin-bottom: 8px; }
.cv-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); line-height: 1.5; }
.cv-table th { text-align: left; font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 400; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-muted); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--fg); }
.cv-table td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.cv-table td.y { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-muted); width: 9em; white-space: nowrap; padding-top: 12px; }
.cv-table td.x { max-width: 60em; }
.cv-table a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.2em; }
.cv-table a:hover { color: var(--accent); text-decoration-color: var(--accent); }
@media (max-width: 560px) { .cv-table td.y { width: 4.8em; } }

/* ── plain text pages (image rights, 404) ── */
.plain h1 { font-size: var(--fs-lg); margin-bottom: 24px; }
.plain .link-list { margin-top: 24px; }

/* ── motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ── print: the About page prints as the CV only (used for the CV PDF) ── */
@media print {
  :root { color-scheme: light; --bg: #fff; --fg: #111; --fg-muted: #555; --line: #ccc; --accent: #111; }
  body { background: #fff; color: #111; font-size: 11pt; display: block; }
  .site-nav, .site-footer, .skip-link, .about-index, .page-title, #biography, #contact, .cv-head { display: none !important; }
  .page { padding: 0; max-width: none; }
  .about-layout { display: block; }
  .about-sec + .about-sec { margin-top: 0; }
  .cv-print-title { display: block; }
  .cv-print-title .name { font-size: 20pt; font-weight: 500; line-height: 1.2; }
  .cv-print-title .sub { font-family: var(--font-mono); font-size: 9pt; color: var(--fg-muted); letter-spacing: 0.04em; margin-top: 4pt; }
  .cv-table td, .cv-table th { padding-top: 4px; padding-bottom: 4px; }
  .cv-section { break-inside: auto; margin-top: 18pt; }
  .cv-section h3 { break-after: avoid; }
  .cv-table tr { break-inside: avoid; }
  a { text-decoration: none; }
}

/* ── Work page viewer (desktop only; see assets/viewer.js) ── */
.viewer-on article .hero img, .viewer-on article .gallery img { cursor: zoom-in; }
.viewer-lock, .viewer-lock body { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 2000; background: var(--bg); display: none; }
.viewer.-open { display: block; }
.viewer-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 56px; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); background: var(--bg);
}
.viewer-title { flex: 1; min-width: 0; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-year { color: var(--fg-muted); margin-left: .5em; }
.viewer-count { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .06em; color: var(--fg-muted); }
.viewer-close {
  background: none; border: 0; color: var(--fg); cursor: pointer; padding: 8px 0;
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase;
}
.viewer-close:hover, .viewer-close:focus-visible { color: var(--accent); }
.viewer-stage {
  position: absolute; top: 72px; bottom: 32px; left: clamp(64px, 6vw, 104px); right: clamp(64px, 6vw, 104px);
  display: flex; align-items: center; justify-content: center; cursor: e-resize;
}
.viewer-stage::before { content: ''; position: absolute; left: 0; top: 0; width: 50%; height: 100%; cursor: w-resize; }
.viewer-stage.-single, .viewer-stage.-single::before { cursor: default; }
.viewer-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; pointer-events: none; }
.viewer-arrow {
  position: absolute; top: calc(50% + 20px); transform: translateY(-50%);
  background: none; border: 0; color: var(--fg-muted); cursor: pointer; padding: 12px; font-size: var(--fs-md);
}
.viewer-arrow:hover, .viewer-arrow:focus-visible { color: var(--fg); }
.viewer-prev { left: calc((clamp(64px, 6vw, 104px) - 44px) / 2); }
.viewer-next { right: calc((clamp(64px, 6vw, 104px) - 44px) / 2); }
