:root {
  color-scheme: dark;
  --paper: #080908;
  --ink: #f4f4f1;
  --muted: #a9aeaa;
  --line: #4c514e;
  --soft: #d5d8d3;
  --image-well: #242824;
  --accent: #f0a678;
}
html[data-theme="light"] {
  color-scheme: light;
  --paper: #f5f5f1;
  --ink: #181b18;
  --muted: #5b625d;
  --line: #aeb5af;
  --soft: #39413b;
  --image-well: #e6e9e4;
  --accent: #ad493c;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.46 Arial, Helvetica, sans-serif; transition: background .2s, color .2s; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, .gallery:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
button { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
.wrap { max-width: 1800px; margin: auto; padding: 0 clamp(18px, 2.4vw, 42px); }
header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { font-size: 1.2rem; letter-spacing: -.045em; font-weight: 600; }
nav { display: flex; align-items: center; gap: 26px; font-size: .91rem; }
.theme-toggle { color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 30px; padding: 5px 10px; cursor: pointer; font-size: .77rem; white-space: nowrap; }
.theme-toggle:hover { border-color: var(--ink); }
.eyebrow { text-transform: uppercase; letter-spacing: .065em; font-size: .76rem; color: var(--muted); }

/* Work index */
.index { min-height: 100vh; }
.index-intro { display: flex; justify-content: space-between; align-items: baseline; gap: 30px; padding: 42px 0 46px; }
.index-intro h1 { font-size: clamp(1.7rem, 3vw, 3.25rem); letter-spacing: -.06em; font-weight: 500; margin: 0; }
.index-intro p { max-width: 360px; margin: 0; color: var(--muted); font-size: .93rem; }
.index-rule { border-top: 1px solid var(--line); padding: 10px 0 28px; display: flex; justify-content: space-between; gap: 20px; }
.archive { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 66px) clamp(17px, 2vw, 35px); padding-bottom: 130px; }
.archive-card { display: grid; grid-template-columns: clamp(82px, 8vw, 128px) 1fr; gap: 15px; align-items: start; min-width: 0; }
.archive-card:hover { text-decoration: none; }
.archive-card:hover h2 { text-decoration: underline; text-underline-offset: 3px; }
.thumb { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: var(--image-well); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.archive-card h2 { font-size: clamp(1.05rem, 1.45vw, 1.4rem); line-height: 1.1; letter-spacing: -.045em; font-weight: 600; margin: 0 0 8px; }
.archive-card p { margin: 0; font-size: .81rem; line-height: 1.33; color: var(--soft); }
.tags { display: flex; flex-wrap: wrap; gap: 4px 5px; margin-top: 8px; }
.tag { font-size: .72rem; line-height: 1.2; padding: 1px 3px; color: #fff; background: #6f566c; }
.tag.t1 { background: #5e6f84; }.tag.t2 { background: #805c48; }.tag.t3 { background: #617565; }.tag.t4 { background: #825e75; }
.archive-footer { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 2fr; gap: 40px; padding: 25px 0 78px; }
.archive-footer h2 { font-size: 1.4rem; letter-spacing: -.045em; margin: 0; font-weight: 500; }
.archive-footer p { max-width: 690px; margin: 0 0 14px; color: var(--soft); }
.archive-footer .links { display: flex; gap: 23px; font-size: .88rem; }

/* Project details share the index's palette, rules, metadata and tags. */
.detail-top { border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; margin-bottom: 34px; }
.back { font-size: .84rem; color: var(--soft); }
.detail-layout { display: grid; grid-template-columns: minmax(300px, 34%) minmax(0, 66%); gap: clamp(24px, 4vw, 70px); align-items: start; }
.project-copy { position: sticky; top: 22px; padding-bottom: 40px; }
.project-title { font-size: clamp(2.35rem, 4.5vw, 5rem); line-height: .98; font-weight: 500; letter-spacing: -.07em; margin: 12px 0 18px; }
.project-meta { font-size: .82rem; color: var(--muted); line-height: 1.5; margin: 0 0 18px; }
.project-copy .tags { margin: 0 0 27px; }
.project-copy p { font-size: 1.02rem; line-height: 1.53; max-width: 530px; margin: 0 0 20px; }
.project-copy .summary { font-size: 1.14rem; }
.project-copy .note { color: var(--muted); font-size: .87rem; border-left: 2px solid var(--accent); padding-left: 12px; margin-top: 25px; }
.visual-head { border-top: 1px solid var(--line); padding-top: 11px; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filters button { border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 4px 10px; border-radius: 20px; cursor: pointer; font-size: .78rem; }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.gallery { display: flex; gap: clamp(20px, 3vw, 50px); overflow-x: auto; scroll-snap-type: x proximity; padding: 0 0 24px; scrollbar-color: var(--muted) var(--image-well); min-width: 0; }
.gallery-item { flex: 0 0 min(48vw, 720px); scroll-snap-align: start; min-width: 0; margin: 0; }
.gallery-item[hidden] { display: none; }
.image-space { height: min(64vh, 650px); min-height: 340px; display: flex; align-items: center; justify-content: center; background: var(--image-well); padding: 18px; }
.image-space img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-item figcaption { font-size: .79rem; color: var(--muted); padding-top: 9px; display: flex; justify-content: space-between; gap: 12px; }
.gallery-item figcaption span:last-child { white-space: nowrap; }
.gallery-help { font-size: .78rem; color: var(--muted); text-align: right; margin: 9px 0 120px; }
.detail-footer { border-top: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 24px 0 75px; }
.detail-footer span { font-size: .84rem; color: var(--muted); }
.detail-footer a { font-size: clamp(1.35rem, 2.5vw, 2.6rem); letter-spacing: -.05em; text-align: right; }
@media (max-width: 1100px) { .detail-layout { grid-template-columns: minmax(270px, 38%) minmax(0, 62%); } .gallery-item { flex-basis: min(56vw, 660px); } }
@media (max-width: 740px) {
  .index-intro { display: block; padding: 32px 0 42px; }.index-intro p { margin-top: 12px; }
  .archive { grid-template-columns: 1fr; gap: 35px; padding-bottom: 85px; }.archive-card { grid-template-columns: 95px 1fr; }
  .archive-footer { grid-template-columns: 1fr; gap: 15px; }
  .detail-layout { display: block; }.project-copy { position: static; padding-bottom: 15px; }.project-title { font-size: clamp(2.5rem, 8vw, 4rem); }
  .gallery { margin-right: calc(-1 * clamp(18px, 2.4vw, 42px)); padding-right: 18px; }.gallery-item { flex-basis: 82vw; }
  .image-space { height: 55vh; min-height: 280px; }.gallery-help { margin-bottom: 75px; }
}
@media (max-width: 460px) {
  header { min-height: 65px; align-items: flex-start; padding: 16px 0; }.brand { font-size: 1rem; }.theme-toggle { padding: 3px 8px; }
  nav { gap: 10px; font-size: .75rem; flex-wrap: wrap; justify-content: flex-end; }
  .archive-card { grid-template-columns: 84px 1fr; }.thumb { width: 84px; }.gallery-item { flex-basis: 86vw; }.image-space { height: 45vh; min-height: 250px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } body { transition: none; } }
