:root {
  --bg: #ffffff;
  --ink: #0F0F0E;
  --muted: #66665F;
  --line: #D9D9D3;
  --fill: #F4F4F1;
  --live: #2E7D4F;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--muted); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap { max-width: 1440px; margin: 0 auto; padding-inline: 64px; }
.label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Placeholder text, still to be written. */
.ph { color: var(--muted); }
.u { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* Header */
.top { height: 80px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.nav { display: flex; gap: 32px; font-size: 15px; }

/* Hero */
.hero {
  padding-block: 96px 72px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 64px;
}
.hero-name { display: flex; flex-direction: column; gap: 20px; }
.hero h1 {
  margin: 0;
  font-size: clamp(56px, 8vw, 104px);
  line-height: 0.92;
  font-weight: 500;
  letter-spacing: -0.045em;
}
.hero-about { width: 420px; max-width: 100%; display: flex; flex-direction: column; gap: 20px; padding-bottom: 6px; }
.hero-about p { margin: 0; font-size: 18px; line-height: 1.5; }
.inline-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; }

/* Filter tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 4px 28px; padding-bottom: 20px; }
.tab {
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  font: inherit;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tab .n { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Project grid. Cells overlap by 1px so partial rows keep clean lines. */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 1px 1px 0; }
.cell {
  min-height: 300px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  border: 1px solid var(--line);
  margin: 0 -1px -1px 0;
  background: var(--bg);
}
a.cell:hover { background: var(--fill); color: var(--ink); }
.cell-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.where.known { color: var(--ink); }
.status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status.unknown { color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); flex-shrink: 0; }
.dot.open { background: none; border: 1px solid currentColor; }
.cell-body { display: flex; flex-direction: column; gap: 10px; }
.cell-name { font-size: 30px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.cell-desc { font-size: 16px; line-height: 1.45; color: var(--muted); }
.cell.links { background: var(--fill); }
.cell.links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 17px; }

/* Project pages */
.project {
  margin-top: 120px;
  padding-top: 40px;
  border-top: 1px solid var(--ink);
  display: flex;
  gap: 64px;
  align-items: flex-start;
  scroll-margin-top: 16px;
}
.meta { width: 380px; flex-shrink: 0; display: flex; flex-direction: column; gap: 28px; position: sticky; top: 24px; }
.meta-head { display: flex; flex-direction: column; gap: 12px; }
.meta-head .label.known { color: var(--ink); }
.meta h2 { margin: 0; font-size: 44px; line-height: 1.05; font-weight: 500; letter-spacing: -0.03em; text-wrap: balance; }
.meta-head p { margin: 0; font-size: 18px; line-height: 1.45; color: var(--muted); }
.facts { margin: 0; font-size: 15px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.facts dd { margin: 0; text-align: right; }
.body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 48px; }
.setting { padding: 24px 28px; display: flex; flex-direction: column; gap: 10px; background: var(--fill); }
.setting p { margin: 0; font-size: 18px; line-height: 1.55; }
.shot {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fill);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 48px; }
.part { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--ink); }
.part h3 { margin: 0; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.part p { margin: 0; font-size: 17px; line-height: 1.55; }

/* Footer */
.foot {
  margin-top: 120px;
  padding-block: 40px 48px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { flex-direction: column; align-items: flex-start; gap: 28px; }
  .project { flex-direction: column; gap: 40px; }
  .meta { width: 100%; position: static; }
}

@media (max-width: 640px) {
  .wrap { padding-inline: 20px; }
  .top { height: 60px; }
  .nav { gap: 20px; font-size: 14px; }
  .hero { padding-block: 48px 40px; }
  .hero-about p { font-size: 17px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .cell { min-height: 0; padding: 20px; gap: 22px; }
  .cell-name { font-size: 24px; }
  .cell-desc { font-size: 15px; }
  .project { margin-top: 72px; padding-top: 28px; gap: 28px; }
  .meta h2 { font-size: 34px; }
  .meta-head p { font-size: 16px; }
  .body { gap: 28px; }
  .setting { padding: 20px; }
  .setting p { font-size: 16px; }
  .shot { font-size: 11px; }
  .parts { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .part p { font-size: 16px; }
  .foot { margin-top: 72px; }
}
