/* Tucker Romagnoli, portfolio site
   Palette from the shop: drafting paper, graphite, birch plywood, and
   safety orange for arrows and actions. Dark mode is a blueprint. */

:root {
  color-scheme: light dark;

  --paper: #f6f4ef;
  --paper-2: #ece8de;
  --sheet: #ffffff;
  --birch: #e9d8b6;
  --ink: #1d1f22;
  --ink-2: #464a51;
  --ink-3: #62666e;
  --rule: #d5cfc2;
  --grid: rgb(29 31 34 / 0.045);
  --grid-major: rgb(29 31 34 / 0.075);
  --accent: #e8590c;
  --accent-ink: #b5420a;
  --on-accent: #fffaf5;
  --ok: #2b8a3e;
  --screen: #17191c;
  --screen-ink: #dfe5ea;
  --screen-dim: #8f9aa5;
  --screen-hi: #ffad7a;
  --shade: rgb(29 31 34 / 0.16);

  --font-sans: "Archivo", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --font-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;

  --wrap: 1180px;
  --gutter: clamp(16px, 4.5vw, 40px);
  --radius: 16px;
  --line: 1.5px;

  @media (prefers-color-scheme: dark) {
    --paper: #0c2340;
    --paper-2: #10304f;
    --sheet: #f4f6f8;
    --birch: #173a5e;
    --ink: #eaf1f8;
    --ink-2: #bfcddc;
    --ink-3: #9db0c5;
    --rule: rgb(234 241 248 / 0.18);
    --grid: rgb(234 241 248 / 0.05);
    --grid-major: rgb(234 241 248 / 0.09);
    --accent: #ff8a4c;
    --accent-ink: #ffa877;
    --on-accent: #0c2340;
    --ok: #51cf66;
    --screen: #06182c;
    --screen-ink: #dce7f2;
    --screen-dim: #8ea4bb;
    --screen-hi: #ffb48a;
    --shade: rgb(0 0 0 / 0.35);
  }
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 88px;
  @media (prefers-reduced-motion: no-preference) { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  /* engineering paper: minor grid every 24px, major every 120px */
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
  font-kerning: normal;
}

img, video, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.05; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; }
figure { margin: 0; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--accent-ink); }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: var(--on-accent); }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  &:focus { top: 12px; color: var(--paper); }
}

.label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-stretch: 85%;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  svg { width: 34px; height: 34px; flex: none; }
  @media (max-width: 640px) { .brand-name { display: none; } }
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 30px);
  font-size: 0.97rem;
  a { text-decoration: none; padding-block: 6px; }
  a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.45em;
  }
  .nav-cta {
    padding: 6px 12px;
    border: var(--line) solid var(--ink);
    border-radius: 8px;
    font-weight: 600;
    &:hover { border-color: var(--accent-ink); }
  }
}

/* ---------- buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: var(--line) solid var(--ink);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  svg { width: 18px; height: 18px; flex: none; }
  &:hover { border-color: var(--accent-ink); color: var(--accent-ink); }
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  &:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--on-accent); }
}

/* ---------- hero ---------- */

.hero { padding-block: clamp(44px, 8vw, 104px) clamp(48px, 7vw, 88px); }

.hero-grid {
  display: grid;
  gap: clamp(36px, 5vw, 64px);
  align-items: end;
  @media (min-width: 980px) { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}

.hero h1 {
  margin-top: 14px;
  font-size: clamp(3.4rem, 11vw, 7.6rem);
  font-stretch: 70%;
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.012em;
}

.hero .lede {
  margin-top: 26px;
  max-width: 34em;
  font-size: clamp(1.13rem, 1.7vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-2);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 9px 16px 9px 13px;
  border: var(--line) solid var(--ink);
  border-radius: 22px;
  background: var(--paper);
  font-weight: 500;
  line-height: 1.3;
  .dot {
    width: 10px; height: 10px;
    flex: none;
    border-radius: 50%;
    background: var(--ok);
    @media (prefers-reduced-motion: no-preference) { animation: pulse 2.6s ease-out infinite; }
  }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 9px transparent; }
}

.hero .actions { margin-top: 28px; }
.hero-note { margin-top: 16px; font-size: 0.95rem; color: var(--ink-3); }

/* the "drawing title block" spec sheet */
.title-block {
  margin: 0;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--shade);
  font-size: 0.97rem;
  .tb-row {
    display: grid;
    grid-template-columns: 6.6rem 1fr;
    border-top: 1px solid var(--ink);
    &:first-child { border-top: 0; }
  }
  dt {
    padding: 10px 10px 8px 12px;
    border-right: 1px solid var(--ink);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-2);
  }
  dd { margin: 0; padding: 9px 14px 10px; line-height: 1.4; }
  .tb-name dd { font-size: 1.65rem; font-stretch: 72%; font-weight: 500; line-height: 1.1; }
  .tb-status dd { font-weight: 600; }
  .tb-foot {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--ink);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    > div { padding: 8px 12px; border-left: 1px solid var(--ink); }
    > div:first-child { border-left: 0; }
    span { display: block; font-size: 0.62rem; letter-spacing: 0.1em; color: var(--ink-3); }
  }
}

/* ---------- sections ---------- */

.section { padding-block: clamp(56px, 8vw, 112px); }
.section + .section { padding-top: 0; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px 32px;
  margin-bottom: clamp(28px, 4vw, 48px);
  padding-bottom: 14px;
  border-bottom: var(--line) solid var(--ink);
  h2 { font-size: clamp(2.4rem, 5.4vw, 3.75rem); font-stretch: 70%; font-weight: 400; }
  p { max-width: 34em; color: var(--ink-2); }
}

/* ---------- project cards ---------- */

.work-grid {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
  @media (min-width: 780px) { grid-template-columns: 1fr 1fr; }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  transition: translate 0.2s ease, box-shadow 0.2s ease;
  &:hover { translate: 0 -3px; box-shadow: 0 10px 0 -4px var(--shade); }
  &:has(a:focus-visible) { outline: 2.5px solid var(--accent); outline-offset: 3px; }
}

.card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: var(--line) solid var(--ink);
  background: var(--paper-2);
  img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.5s ease; }
}
.card:hover .card-media img { scale: 1.035; }

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 22px;
  h3 { font-size: clamp(1.75rem, 2.8vw, 2.25rem); font-stretch: 72%; font-weight: 500; }
  h3 a { text-decoration: none; }
  h3 a::after { content: ""; position: absolute; inset: 0; }   /* whole card is the link */
  h3 a:focus-visible { outline: none; }
  > p { color: var(--ink-2); }
}

.result {
  display: flex;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  &::before {
    content: "";
    flex: none;
    width: 16px;
    height: 2px;
    margin-top: 0.78em;
    background: var(--accent);
  }
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  list-style: none;
  li {
    padding: 2px 8px;
    border: 1px solid var(--rule);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--ink-2);
  }
}

.more {
  margin-top: auto;
  padding-top: 6px;
  font-weight: 600;
  color: var(--accent-ink);
}

@media (min-width: 780px) {
  .card-feature {
    grid-column: 1 / -1;
    flex-direction: row;
    .card-media {
      flex: 1.45;
      aspect-ratio: auto;
      min-height: 400px;
      border-bottom: 0;
      border-right: var(--line) solid var(--ink);
    }
    .card-body { flex: 1; padding: 28px 30px; justify-content: center; }
    .more { margin-top: 10px; }
  }
}

/* ---------- CAD strip ---------- */

.cad {
  display: grid;
  gap: 18px;
  margin-top: clamp(40px, 6vw, 72px);
  padding: clamp(18px, 3vw, 28px);
  border: var(--line) dashed var(--rule);
  border-radius: var(--radius);
  @media (min-width: 860px) {
    grid-template-columns: 0.95fr 1.25fr 1.25fr 0.55fr;
    align-items: end;
  }
  .cad-intro {
    align-self: center;
    h3 { font-size: 1.7rem; font-stretch: 72%; font-weight: 500; margin: 8px 0 10px; }
    p { color: var(--ink-2); font-size: 0.98rem; }
  }
  a { display: block; text-decoration: none; }
  img { width: 100%; border-radius: 10px; border: 1px solid var(--rule); background: var(--sheet); }
  figcaption { margin-top: 8px; font-size: 0.85rem; color: var(--ink-3); }
}

/* ---------- software readouts ---------- */

.tools-grid {
  display: grid;
  gap: clamp(20px, 3vw, 28px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.tool {
  display: flex;
  flex-direction: column;
  gap: 10px;
  h3 { margin-top: 6px; font-size: 1.5rem; font-stretch: 78%; font-weight: 600; }
  > p:not(.tool-meta) { color: var(--ink-2); font-size: 0.98rem; }
}

.readout {
  margin: 0;
  padding: 14px 16px 16px;
  border-radius: 12px;
  background: var(--screen);
  color: var(--screen-ink);
  font-family: var(--font-mono);
  font-size: 0.79rem;
  line-height: 1.6;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06);
  .readout-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgb(255 255 255 / 0.16);
    font-size: 0.7rem;
    color: var(--screen-dim);
    b { font-weight: 500; color: var(--screen-hi); }
  }
  dl { display: grid; grid-template-columns: max-content 1fr; gap: 1px 14px; margin: 0; }
  dl > div { display: contents; }
  dt { color: var(--screen-dim); }
  dd { margin: 0; }
}

.shot {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--sheet);
  img { width: 100%; }
}

.tool-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--ink-3);
}

.software-cta { margin-top: clamp(28px, 4vw, 40px); }

.group-title {
  margin: clamp(48px, 7vw, 80px) 0 20px;
  font-size: 1.6rem;
  font-stretch: 75%;
  font-weight: 500;
  &:first-of-type { margin-top: 0; }
}

/* ---------- about ---------- */

.about-grid {
  display: grid;
  gap: clamp(36px, 5vw, 80px);
  @media (min-width: 920px) { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
}

.about-text p {
  max-width: 35em;
  margin-bottom: 1.1em;
  font-size: clamp(1.08rem, 1.4vw, 1.2rem);
  line-height: 1.62;
}

.side-block {
  margin-bottom: 30px;
  padding-top: 12px;
  border-top: var(--line) solid var(--ink);
  h3 { margin-bottom: 12px; }
}

.plain-list {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
  li { display: flex; gap: 10px; }
  li::before {
    content: "";
    flex: none;
    width: 7px; height: 7px;
    margin-top: 0.62em;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
  }
}

.toolbox {
  display: grid;
  grid-template-columns: 6.2rem 1fr;
  gap: 8px 14px;
  margin: 0;
  dt { padding-top: 2px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
  dd { margin: 0; }
}

.timeline {
  margin-top: clamp(48px, 7vw, 80px);
  ol { padding: 0; list-style: none; }
  li {
    display: grid;
    gap: 4px 28px;
    padding: 18px 0;
    border-top: 1px solid var(--rule);
    @media (min-width: 760px) { grid-template-columns: 12rem 1fr; }
  }
  time, .when { padding-top: 3px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-3); }
  h4 { font-size: 1.2rem; font-stretch: 88%; font-weight: 600; line-height: 1.25; }
  h4 span { font-weight: 400; color: var(--ink-2); }
  p { margin-top: 4px; max-width: 46em; color: var(--ink-2); }
}

/* ---------- contact ---------- */

.contact {
  .contact-inner {
    padding: clamp(28px, 5vw, 56px);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 8px 8px 0 var(--shade);
  }
  h2 { font-size: clamp(2.6rem, 7vw, 5rem); font-stretch: 70%; font-weight: 300; }
  p { margin-top: 14px; max-width: 34em; color: var(--ink-2); font-size: 1.1rem; }
  .email {
    display: inline-block;
    margin-top: 22px;
    font-size: clamp(1.25rem, 3.4vw, 2.1rem);
    font-weight: 500;
    font-stretch: 85%;
    overflow-wrap: anywhere;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
  }
  .actions { margin-top: 24px; }
}

.copy-status { font-weight: 600; }

/* ---------- footer: the sheet's title block ---------- */

.site-footer { margin-top: clamp(64px, 9vw, 112px); padding-bottom: 32px; }

.footer-block {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
  border-left: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  @media (min-width: 820px) { grid-template-columns: 1.4fr 1.3fr 1fr 1fr 0.8fr; }
  > div { padding: 10px 12px 12px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
  span { display: block; margin-bottom: 2px; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 18px;
  font-size: 0.92rem;
  color: var(--ink-2);
  ul { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; list-style: none; }
}

/* ---------- project pages ---------- */

.project-head { padding-block: clamp(32px, 6vw, 72px) clamp(24px, 4vw, 40px); }

.crumb {
  display: inline-block;
  margin-bottom: clamp(24px, 4vw, 40px);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--ink-2);
}

.project-title {
  margin-top: 12px;
  font-size: clamp(3rem, 10vw, 7rem);
  font-stretch: 70%;
  font-weight: 300;
  line-height: 0.95;
  text-decoration: underline;
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.12em;
  text-decoration-skip-ink: none;
}

.project-head .lede {
  margin-top: 28px;
  max-width: 40em;
  font-size: clamp(1.13rem, 1.7vw, 1.3rem);
  color: var(--ink-2);
}

.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  margin: clamp(28px, 4vw, 44px) 0 0;
  border-top: var(--line) solid var(--ink);
  > div { padding: 12px 16px 14px 0; }
  dt { margin-bottom: 4px; }
  dd { margin: 0; line-height: 1.45; }
}

.hero-figure {
  img { width: 100%; border: var(--line) solid var(--ink); border-radius: 20px; }
  figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--ink-3); }
}

.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  margin-block: clamp(40px, 6vw, 64px);
  border-block: var(--line) solid var(--ink);
  > div { padding: 22px 20px 22px 0; }
  strong { display: block; font-size: clamp(2.2rem, 4.4vw, 3.2rem); font-stretch: 70%; font-weight: 500; line-height: 1; }
  span { display: block; margin-top: 8px; color: var(--ink-2); }
}

.prose {
  max-width: 44em;
  h2 { font-size: clamp(2rem, 4vw, 2.8rem); font-stretch: 70%; font-weight: 400; margin-bottom: 16px; }
  p { font-size: 1.1rem; color: var(--ink-2); margin-bottom: 1em; }
}

.steps {
  display: grid;
  gap: clamp(56px, 9vw, 112px);
  margin-top: clamp(28px, 4vw, 48px);
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  gap: 18px;
  align-items: center;
  @media (min-width: 900px) {
    grid-template-columns: minmax(0, 0.85fr) 96px minmax(0, 1.3fr);
    gap: 12px;
    &:nth-child(even) {
      .step-text { order: 3; }
      .arrow { order: 2; scale: -1 1; }
      .step-media { order: 1; }
    }
  }
}

.balloon {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  margin-bottom: 16px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-family: var(--font-mono);
  font-weight: 500;
}

.step-text {
  h3 { font-size: 1.55rem; font-stretch: 78%; font-weight: 600; margin-bottom: 10px; }
  p { font-size: clamp(1.08rem, 1.5vw, 1.22rem); line-height: 1.6; }
}

.note {
  display: block;
  margin-top: 16px;
  max-width: 19em;
  font-family: var(--font-hand);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--accent-ink);
  rotate: -2deg;
}

.arrow {
  width: 64px;
  margin: -4px auto;
  color: var(--accent);
  rotate: 90deg;
  @media (min-width: 900px) { width: 96px; margin: 0; rotate: 0deg; }
  path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
}

.step-media {
  display: grid;
  gap: 14px;
  &.two { grid-template-columns: 1fr 1fr; align-items: start; }
  &.two .wide { grid-column: 1 / -1; }
  /* rows of mixed portrait and landscape photos share one crop; the viewer shows them whole */
  &.even .photo:not(.wide) img { aspect-ratio: 4 / 3; object-fit: cover; }
}

.photo {
  a { display: block; }
  img { width: 100%; border: var(--line) solid var(--ink); border-radius: var(--radius); background: var(--paper-2); }
  &.drawing img { background: var(--sheet); border-color: var(--rule); border-radius: 10px; }
  figcaption { margin-top: 8px; font-size: 0.9rem; line-height: 1.45; color: var(--ink-3); }
}

.video-frame video {
  width: 100%;
  height: auto;
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  background: #111;
}

.aside-box {
  margin-top: clamp(48px, 7vw, 80px);
  padding: clamp(20px, 3vw, 28px);
  border: var(--line) dashed var(--ink-3);
  border-radius: var(--radius);
  h2 { font-size: 1.6rem; font-stretch: 75%; font-weight: 500; margin: 6px 0 12px; }
  p { color: var(--ink-2); max-width: 52em; }
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 16px;
  margin-top: 16px;
  strong { display: block; font-size: 1.9rem; font-stretch: 70%; font-weight: 500; line-height: 1.05; }
  span { color: var(--ink-2); font-size: 0.95rem; }
}

.gallery-section { margin-top: clamp(64px, 9vw, 112px); }

.gallery {
  columns: 3 250px;
  column-gap: 16px;
  margin-top: 20px;
  a { display: block; margin-bottom: 16px; break-inside: avoid; }
  img { width: 100%; border: var(--line) solid var(--ink); border-radius: 14px; }
}

.pager {
  display: grid;
  gap: 16px;
  margin-top: clamp(64px, 9vw, 112px);
  @media (min-width: 700px) { grid-template-columns: 1fr 1fr; }
  a {
    display: block;
    padding: 18px 20px;
    border: var(--line) solid var(--ink);
    border-radius: 12px;
    text-decoration: none;
    &:hover { border-color: var(--accent-ink); }
  }
  .next { text-align: right; }
  strong { display: block; margin-top: 4px; font-size: 1.5rem; font-stretch: 75%; font-weight: 500; }
}

/* ---------- photo viewer (native <dialog>) ---------- */

.lightbox {
  width: fit-content;
  max-width: min(94vw, 1500px);
  max-height: 96dvh;
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
  color: #f1f3f5;
  &:modal { overscroll-behavior: contain; }
  &::backdrop {
    background: rgb(8 10 12 / 0.9);
    overflow: hidden;
    overscroll-behavior: contain;
  }
  .lb-stage { position: relative; }
  img {
    width: auto;
    max-width: min(94vw, 1500px);
    max-height: 82dvh;
    margin-inline: auto;
    border-radius: 10px;
    background: #222;
  }
  figcaption {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    max-width: 70ch;
    margin: 12px auto 0;
    padding-inline: 4px;
    font-size: 0.95rem;
    line-height: 1.45;
  }
  .lb-count { flex: none; font-family: var(--font-mono); font-size: 0.8rem; color: #aab2bb; padding-top: 2px; }
}

.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgb(255 255 255 / 0.35);
  border-radius: 50%;
  background: rgb(10 12 14 / 0.62);
  color: #fff;
  font: inherit;
  cursor: pointer;
  svg { width: 22px; height: 22px; }
  &:hover { background: rgb(10 12 14 / 0.85); border-color: #fff; }
}
.lb-close { top: 10px; right: 10px; }
.lb-prev, .lb-next { top: 50%; translate: 0 -50%; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-btn[hidden] { display: none; }

/* ---------- 404 ---------- */

.lost { padding-block: clamp(64px, 12vw, 160px); }
.lost h1 { font-size: clamp(3rem, 10vw, 6.5rem); font-stretch: 70%; font-weight: 300; margin: 12px 0 20px; }
.lost p { max-width: 32em; color: var(--ink-2); font-size: 1.15rem; margin-bottom: 28px; }

/* ---------- motion (progressive enhancement) ---------- */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
    .arrow path {
      stroke-dasharray: 1;
      animation: draw linear both;
      animation-timeline: view();
      animation-range: entry 20% cover 45%;
    }
  }
}

@keyframes rise { from { opacity: 0; translate: 0 26px; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* ---------- print ---------- */

@media print {
  body { background: #fff; color: #000; }
  .site-header, .skip, .lb-btn, .actions, .pager { display: none; }
  .card, .title-block, .contact .contact-inner { box-shadow: none; }
}
