:root {
  --paper: #ffffff;
  --paper-deep: #ffffff;
  --ink: #181817;
  --muted: #6c6a65;
  --line: rgba(24, 24, 23, .32);
  --line-soft: rgba(24, 24, 23, .15);
  --panel: #ffffff;
  --accent: #8d2d28;
  --serif: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
}
a { color: inherit; }
button { font: inherit; }

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid rgba(24,24,23,.12);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
}
.brand {
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
}
.site-nav { display: flex; gap: 25px; }
.site-nav a {
  text-decoration: none;
  font-size: 11px;
  letter-spacing: .12em;
}
.site-nav a:hover, .site-nav a:focus-visible { text-decoration: underline; text-underline-offset: 5px; }

main { width: min(100%, 1700px); margin: 0 auto; }
.intro {
  display: grid;
  grid-template-columns: minmax(250px, .8fr) minmax(340px, 1.2fr);
  gap: 30px 80px;
  padding: 70px 42px 46px;
  align-items: end;
}
.intro .eyebrow { grid-column: 1 / -1; }
.intro h1 {
grid-column: 1 / -1;
  white-space: nowrap;  
margin: 0;
  font-family: var(--sans);
  font-size: clamp(20px, 2.7vw, 38px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .12em;
}
.intro > p:last-child {
  max-width: 650px;
  margin: 0 0 5px;
  color: #4f4d49;
  font: 400 clamp(18px, 2vw, 29px)/1.28 var(--serif);
}
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .2em;
}

.map-section { padding: 0 22px 80px; scroll-margin-top: 72px; }
.map-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 20px 12px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .06em;
}
.map-toolbar p { margin: 0; }
.text-button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 10px;
  letter-spacing: .13em;
}
.desktop-map-shell {
  display: grid;
  grid-template-columns: minmax(820px, 1fr) 340px;
  min-height: 790px;
  border: 0;
  background: #ffffff;
}
.map-stage {
  position: relative;
  min-height: 790px;
  overflow: hidden;
  background: #ffffff;
}
#connection-canvas, #nodes-layer, .mare-field { position: absolute; inset: 0; width: 100%; height: 100%; }
#connection-canvas { z-index: 1; pointer-events: none; }
#nodes-layer { z-index: 3; }
.mare-field {
  z-index: 0;
  left: 42%;
  top: 1.5%;
  width: 48%;
  height: 22%;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  pointer-events: none;
}

.mare-field::before {
  content: "";
  position: absolute;
  inset: -8% -5%;
  background-image: url("../assets/projects/mare-cloud.png");
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  filter: grayscale(100%) brightness(106%) blur(1px);
  mix-blend-mode: normal;
  opacity: .78;
  -webkit-mask-image: radial-gradient(
    ellipse 78% 76% at 50% 50%,
    #000 0%,
    #000 38%,
    rgba(0, 0, 0, .82) 57%,
    rgba(0, 0, 0, .34) 75%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 78% 76% at 50% 50%,
    #000 0%,
    #000 38%,
    rgba(0, 0, 0, .82) 57%,
    rgba(0, 0, 0, .34) 75%,
    transparent 100%
  );
}

.mare-field span {
  position: absolute;
  z-index: 1;
  color: rgba(24, 24, 23, .25);
  font: italic 15px var(--serif);
}
.mare-field span:nth-child(1) { left: 12%; top: 50%; }
.mare-field span:nth-child(2) { left: 27%; top: 20%; }
.mare-field span:nth-child(3) { left: 45%; top: 58%; }
.mare-field span:nth-child(4) { left: 62%; top: 26%; }
.mare-field span:nth-child(5) { left: 78%; top: 59%; }
.mare-field span:nth-child(6) { left: 87%; top: 30%; }

.map-node {
  position: absolute;
  width: var(--size);
  transform: translate(-50%, -50%);
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  transition: opacity .25s ease, filter .25s ease, transform .25s ease;
}
.map-node:hover, .map-node:focus-visible { transform: translate(-50%, -50%) scale(1.055); outline: none; }
.node-disc {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  overflow: hidden;
  border: 1.25px solid rgba(115,115,115,.4);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.9), rgba(255,255,255,.12) 30%, transparent 31%),
    linear-gradient(145deg, var(--tone-a), var(--tone-b));
  box-shadow: 0 3px 12px rgba(24,24,23,.06), inset 0 0 0 5px rgba(255,255,255,.12);
}
.node-image {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  opacity: 0;
  transition: opacity .25s ease, transform .35s ease;
}
.node-disc.image-loaded .node-image { opacity: 1; }
.map-node:hover .node-disc.image-loaded .node-image,
.map-node:focus-visible .node-disc.image-loaded .node-image { transform: scale(1.035); }
.map-node.in-development .node-disc { border: 1.5px dashed rgba(115,115,115,.4); box-shadow: none; }
.map-node.hollow .node-disc { background: rgba(241,239,233,.7); box-shadow: inset 0 0 0 12px rgba(255,255,255,.34); }
.map-node.major .node-disc::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(241,239,233,.7);
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
}
.node-monogram {
  position: relative;
  z-index: 0;
  max-width: 75%;
  color: rgba(255,255,255,.9);
  font: 400 clamp(12px, calc(var(--size) * .17), 26px)/.95 var(--serif);
  letter-spacing: -.04em;
  text-shadow: 0 1px 12px rgba(0,0,0,.25);
  transition: opacity .2s ease;
}
.node-disc.image-loaded .node-monogram { opacity: 0; }
.hollow .node-monogram { color: var(--ink); text-shadow: none; }
.node-label {
  display: block;
  width: max(120px, calc(var(--size) + 26px));
  margin: 7px 0 0 50%;
  transform: translateX(-50%);
}
.node-title { display: block; font: 600 11px/1.15 var(--sans); letter-spacing: .01em; }
.node-years, .node-status { display: block; color: var(--muted); font-size: 9px; line-height: 1.3; letter-spacing: .06em; }
.node-status { text-transform: uppercase; }
.map-stage.has-focus .map-node:not(.is-related):not(.is-selected) { opacity: .25; filter: grayscale(1); }
.map-node.is-related, .map-node.is-selected { opacity: 1; }
.map-node.is-selected .node-disc { outline: 2px solid var(--accent); outline-offset: 4px; }

.project-panel {
  position: relative;
  border-left: 0;
  background: var(--panel);
  min-width: 0;
}
.panel-empty {
  position: sticky;
  top: 125px;
  display: grid;
  min-height: 600px;
  place-content: center;
  padding: 42px;
  color: var(--muted);
  text-align: center;
}
.panel-mark { font: 50px var(--serif); }
.panel-content { position: sticky; top: 88px; padding: 28px; }
.panel-image {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  margin-bottom: 24px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--tone-a), var(--tone-b));
  color: rgba(255,255,255,.86);
  font: 400 45px/1 var(--sans);
}
.panel-project-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .25s ease;
}
.panel-image.image-loaded .panel-project-image { opacity: 1; }
.panel-image-fallback { transition: opacity .2s ease; }
.panel-image.image-loaded .panel-image-fallback { opacity: 0; }
.panel-kicker { margin: 0 0 9px; color: var(--muted); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.panel-content h2 { margin: 0 0 5px; font: 700 22px/1.15 var(--sans); letter-spacing: .06em; }
.panel-years { margin: 0 0 18px; color: var(--muted); font-size: 11px; }
.panel-statement { margin: 0 0 25px; font: 400 14px/1.6 var(--sans); }
.connected-list { margin: 0 0 25px; padding: 18px 0 0; border-top: 1px solid rgba(24,24,23,.15); }
.connected-list h3 { margin: 0 0 11px; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.connected-list button { display: block; margin: 4px 0; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; font: 400 12px/1.35 var(--sans); letter-spacing: .02em; text-align: left; }
.connected-list button:hover { color: var(--accent); }
.project-cta {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  text-decoration: none;
  font-size: 10px;
  letter-spacing: .12em;
}
.project-cta[aria-disabled="true"] { border-color: rgba(24,24,23,.25); background: transparent; color: var(--muted); cursor: not-allowed; }

.mobile-map { display: none; }
.index-section { padding: 80px 42px 120px; border-top: 1px solid rgba(24,24,23,.14); scroll-margin-top: 70px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 35px; }
.section-heading h2 { margin: 5px 0 0; font: 400 52px/1 var(--serif); }
.work-index { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.index-card {
  min-height: 165px;
  padding: 18px 18px 22px 0;
  border-bottom: 1px solid rgba(24,24,23,.18);
  text-decoration: none;
}
.index-card:nth-child(4n+2), .index-card:nth-child(4n+3), .index-card:nth-child(4n+4) { padding-left: 18px; border-left: 1px solid rgba(24,24,23,.12); }
.index-card.disabled { color: var(--muted); cursor: default; }
.index-card .number { display: block; margin-bottom: 42px; color: var(--muted); font: italic 12px var(--serif); }
.index-card h3 { margin: 0 0 4px; font: 400 20px/1.05 var(--serif); }
.index-card p { margin: 0; color: var(--muted); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }

.mobile-dialog { width: min(92vw, 560px); max-height: 86vh; padding: 0; border: 0; background: #ffffff; box-shadow: 0 20px 70px rgba(0,0,0,.25); }
.mobile-dialog::backdrop { background: rgba(20,20,18,.45); backdrop-filter: blur(4px); }
.dialog-close { position: absolute; z-index: 2; top: 9px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(241,239,233,.88); cursor: pointer; font-size: 24px; }
.mobile-dialog .panel-content { position: static; padding: 24px; }

footer { display: flex; justify-content: space-between; padding: 25px 32px; border-top: 1px solid rgba(24,24,23,.14); color: var(--muted); font-size: 10px; letter-spacing: .08em; }
footer p { margin: 0; }

@media (max-width: 1220px) {
  .desktop-map-shell { grid-template-columns: minmax(700px, 1fr) 310px; }
  .work-index { grid-template-columns: repeat(3, 1fr); }
  .index-card:nth-child(n) { padding-left: 18px; border-left: 1px solid rgba(24,24,23,.12); }
  .index-card:nth-child(3n+1) { padding-left: 0; border-left: 0; }
}

@media (max-width: 900px) {
  .site-header { padding: 17px 20px; }
  .site-nav a:not(:first-child):not(:last-child) { display: none; }
  .intro { grid-template-columns: 1fr; padding: 55px 22px 38px; }
  .intro .eyebrow { grid-column: auto; }
  .map-section { padding: 0 14px 60px; }
  .desktop-map-shell { display: none; }
  .map-toolbar { margin: 0 4px 18px; }
  .map-toolbar .text-button { display: none; }
  .mobile-map { display: block; border-top: 1px solid var(--ink); }
  .mobile-node {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    gap: 12px;
    align-items: center;
    width: 100%;
    padding: 14px 4px;
    border: 0;
    border-bottom: 1px solid rgba(24,24,23,.16);
    background: transparent;
    color: var(--ink);
    text-align: left;
  }
  .mobile-node-disc { position: relative; display: grid; place-items: center; width: 36px; height: 36px; overflow: hidden; border: 1px solid rgba(115,115,115,.4); border-radius: 50%; background: linear-gradient(145deg, var(--tone-a), var(--tone-b)); }
  .mobile-node-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
  .mobile-node-disc.image-loaded .mobile-node-image { opacity: 1; }
  .mobile-node-fallback { max-width: 82%; color: rgba(255,255,255,.9); font: 400 9px/1 var(--serif); text-align: center; }
  .mobile-node-disc.image-loaded .mobile-node-fallback { opacity: 0; }
  .mobile-node.in-development .mobile-node-disc { border-style: dashed; background: transparent; }
  .mobile-node.hollow .mobile-node-disc { background: transparent; }
  .mobile-node strong { display: block; font: 400 17px/1.1 var(--serif); }
  .mobile-node small { color: var(--muted); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
  .mobile-node .arrow { color: var(--muted); font-size: 18px; }
  .index-section { padding: 65px 20px 80px; }
  .work-index { grid-template-columns: repeat(2, 1fr); }
  .index-card:nth-child(n) { padding-left: 14px; }
  .index-card:nth-child(2n+1) { padding-left: 0; border-left: 0; }
}

@media (max-width: 520px) {
  .site-nav { gap: 14px; }
  .intro h1 { font-size: 21px; }
  .intro > p:last-child { font-size: 20px; }
  .work-index { grid-template-columns: 1fr; }
  .index-card:nth-child(n) { padding-left: 0; border-left: 0; }
  footer { display: block; padding: 22px 20px; }
  footer a { display: inline-block; margin-top: 8px; }
}

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