/* Direction B: stretch. Built from the email letterhead: olive ink on beige, one long rule, tall condensed type. */
:root {
  --bg: #e7e0d1;
  --bg-lift: #f0ebdf;
  --bg-sink: #d9d0bc;
  --ink: #2e3024;
  --olive: #4d4f3d;
  --olive-soft: #66674f;
  --hair: #b9b19b;
  --sans: "Geist", system-ui, sans-serif;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --logo-h: 104px;
  --head-pad: 30px;
  --gutter: clamp(20px, 3.6vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 3; }
.skip:focus { left: 8px; top: 8px; }

.wrap { padding-inline: var(--gutter); }
.tiny {
  font: 500 16px/1.2 var(--display);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--olive-soft);
}
.sq::before {
  content: ""; display: inline-block; width: .44em; height: .44em;
  background: currentColor; margin-right: .55em; vertical-align: .1em;
}

/* Letterhead: nav above the rule, address below it, as on the email signature. */
.head { position: relative; padding-block: var(--head-pad) 18px; }
.head__rule {
  position: absolute; left: 0; right: 0;
  top: calc(var(--head-pad) + var(--logo-h) * .5385);
  height: calc(var(--logo-h) * .0658);
  background: var(--olive);
}
.head__row { position: relative; display: flex; justify-content: space-between; }
.logo { position: relative; display: block; flex: none; }
.logo img { height: var(--logo-h); width: auto; }
.nav {
  position: absolute; right: 0;
  bottom: calc(var(--logo-h) * .4615 + 10px);
  display: flex; gap: clamp(16px, 2.2vw, 34px);
  font: 500 19px/1 var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nav a { text-decoration: none; color: var(--olive-soft); transition: color .2s; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.nav a[aria-current]::before {
  content: ""; display: inline-block; width: .42em; height: .42em;
  background: var(--olive); margin-right: .42em; vertical-align: .13em;
}
.addr {
  position: absolute; right: 0;
  top: calc(var(--logo-h) * .6043 + 8px);
  white-space: nowrap;
  font: 400 16px/1.25 var(--display);
  letter-spacing: .07em;
  color: var(--olive-soft);
}
.addr a { text-decoration: none; }
.dot {
  display: inline-block; width: .4em; height: .4em;
  background: currentColor; margin-inline: .7em; vertical-align: .14em;
}

/* Large title */
.title {
  padding-top: clamp(26px, 3.4vw, 54px);
  font: 500 clamp(64px, 11vw, 180px)/.84 var(--display);
  letter-spacing: -.012em;
  color: var(--olive);
}

/* Title block, from a drawing sheet */
.block {
  margin-top: clamp(20px, 2.6vw, 38px);
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  border-top: 2px solid var(--olive);
  border-bottom: 1px solid var(--hair);
}
.block > div { padding: 12px 18px 16px; border-left: 1px solid var(--hair); }
.block > div:first-child { padding-left: 0; border-left: 0; }
.block dd { margin-top: 5px; font-weight: 500; font-size: 18px; line-height: 1.35; }
.block__tags { display: flex; flex-wrap: wrap; gap: 2px 20px; }

/* Photo strip */
.strip-wrap { margin-top: clamp(22px, 2.6vw, 38px); }
.strip {
  display: flex; gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding-inline: var(--gutter);
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip figure { flex: none; scroll-snap-align: start; }
.shot { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; overflow: hidden; }
.strip img { height: clamp(250px, 32vw, 440px); width: auto; aspect-ratio: 1.7; object-fit: cover; background: var(--bg-sink); transition: transform .4s ease; }
.shot:hover img { transform: scale(1.015); }
.strip figcaption { display: flex; gap: 12px; padding-top: 9px; font-size: 14.5px; line-height: 1.35; color: var(--olive); max-width: 44ch; }
.strip figcaption b { font: 500 15px/1.35 var(--display); letter-spacing: .08em; color: var(--olive-soft); }
.strip-ctrl { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.strip-ctrl button {
  width: 46px; height: 38px; border: 1px solid var(--olive); background: none; color: var(--olive);
  cursor: pointer; font: 500 20px/1 var(--display); transition: background .2s, color .2s;
}
.strip-ctrl button:hover { background: var(--olive); color: var(--bg); }
.strip-ctrl button:active { transform: translateY(1px); }

/* Lightbox */
html:has(.lb[open]) { overflow: hidden; }
.lb {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 18px var(--gutter) 20px; border: 0;
  background: #22231a; color: var(--bg);
}
.lb::backdrop { background: #22231a; }
.lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px; animation: lb-in .2s ease; }
.lb__top, .lb__foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.lb__count { font: 500 18px/1 var(--display); letter-spacing: .1em; color: #b9b19b; }
.lb__stage { display: flex; align-items: center; justify-content: center; min-height: 0; }
.lb__stage img {
  width: min(100%, 1320px, calc((100dvh - 150px) * 1.7));
  aspect-ratio: 1.7; object-fit: contain;
}
.lb__stage img.is-in { animation: lb-in .25s ease; }
.lb__cap { font-size: 16px; line-height: 1.35; }
.lb__ctrl { display: flex; flex: none; gap: 6px; }
.lb button {
  min-width: 46px; height: 38px; padding: 0 12px;
  border: 1px solid #8d8d76; background: none; color: var(--bg); cursor: pointer;
  font: 500 19px/1 var(--display); letter-spacing: .06em; transition: background .2s, color .2s;
}
.lb button:hover { background: var(--bg); color: #22231a; }
.lb button:active { transform: translateY(1px); }
.lb :focus-visible { outline-color: var(--bg); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

/* Story */
.story {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 20px;
  align-items: end;
  padding-block: clamp(46px, 7vw, 104px);
}
.fact { grid-column: 1 / span 4; }
.fact__num { font: 500 clamp(90px, 11.25vw, 168px)/.8 var(--display); color: var(--olive); }
.fact p:last-child { margin-top: 14px; max-width: 22ch; font-size: 15.5px; line-height: 1.4; color: var(--olive); }
.prose { grid-column: 5 / span 7; }
.prose p:first-child { font-size: clamp(23px, 2.5vw, 35px); line-height: 1.26; letter-spacing: -.018em; text-wrap: pretty; }
.go {
  display: inline-block; margin-top: 24px;
  font: 500 19px/1 var(--display); letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; padding-bottom: 4px; border-bottom: 2px solid var(--olive);
  color: var(--olive); transition: padding-right .2s;
}
.go:hover { padding-right: 12px; }

/* Project ledger */
.ledger-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--olive); padding-bottom: 20px; }
.h2 { font: 500 clamp(28px, 2.5vw, 36px)/1 var(--display); letter-spacing: .02em; text-transform: uppercase; color: var(--olive); }
.row {
  display: grid;
  grid-template-columns: 148px minmax(0, 5fr) minmax(0, 3fr) minmax(0, 1.5fr) 24px;
  column-gap: 22px;
  align-items: center;
  padding-block: 9px;
  border-bottom: 1px solid var(--hair);
  text-decoration: none;
  transition: background .2s;
}
.row:hover { background: var(--bg-lift); }
.row__img { overflow: hidden; }
.row img { width: 148px; aspect-ratio: 1.7; object-fit: cover; transition: transform .4s ease; }
.row:hover img { transform: scale(1.06); }
.row h3 { font: 500 clamp(26px, 2.7vw, 38px)/1.02 var(--display); color: var(--olive); }
.row span { font-size: 15px; line-height: 1.35; color: var(--olive); }
.row i { font: 500 20px/1 var(--display); color: var(--olive); transition: transform .2s; }
.row:hover i { transform: translateX(4px); }

/* Blog */
.blog-top {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; align-items: baseline;
  border-bottom: 2px solid var(--olive);
  padding-bottom: clamp(24px, 2.8vw, 40px);
}
.blog-top h1 { grid-column: 1 / span 3; }
.blog-top p { grid-column: 4 / span 9; font-size: clamp(17px, 1.36vw, 22px); line-height: 1.3; letter-spacing: -.008em; }

.lead { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; padding-top: clamp(30px, 4vw, 56px); }
.lead__meta { grid-column: 1 / span 3; }
.lead__date { margin-top: 6px; }
.lead__body { grid-column: 4 / span 9; }
.lead h2 { font: 500 clamp(42px, 6vw, 100px)/.92 var(--display); color: var(--olive); text-wrap: balance; }
.lead h2 a { text-decoration: none; transition: color .2s; }
.lead h2 a:hover { color: var(--ink); }
.lead p { margin-top: 18px; max-width: 54ch; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.42; }

.year { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; padding-top: clamp(30px, 4vw, 56px); }
.year__n { grid-column: 1 / span 3; }
.year__n span { position: sticky; top: 18px; display: block; font: 500 clamp(56px, 7vw, 108px)/.86 var(--display); color: var(--olive); }
.year ul { grid-column: 4 / span 9; border-top: 2px solid var(--olive); }
.year li { border-bottom: 1px solid var(--hair); }
.year li a {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 200px);
  column-gap: 16px; align-items: baseline;
  padding-block: 13px 14px; text-decoration: none; transition: background .2s, padding .2s;
}
.year li a:hover { background: var(--bg-lift); padding-left: 8px; }
.year time, .year .cat { font-size: 14.5px; line-height: 1.3; color: var(--olive); }
.year b { font-weight: 500; font-size: clamp(18px, 1.65vw, 22px); line-height: 1.25; letter-spacing: -.012em; }
.older-wrap { display: flex; justify-content: flex-end; padding-top: 30px; }

/* Topics and the code hub, tucked in at the end of the archive */
.browse { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; padding-top: clamp(44px, 5.5vw, 80px); }
.browse__label { grid-column: 1 / span 3; }
.browse__body {
  grid-column: 4 / span 9;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
}
.browse__cell { padding: 12px 18px 18px; }
.browse__cell:first-child { padding-left: 0; }
.browse__cell + .browse__cell { border-left: 1px solid var(--hair); }
.browse__topics { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 8px; font-size: 15.5px; line-height: 1.4; }
.browse__topics a { text-decoration: none; }
.browse__topics a:hover { text-decoration: underline; }
.browse__hub { display: block; margin-top: 8px; text-decoration: none; }
.browse__hub b { display: block; font: 500 24px/1.05 var(--display); color: var(--olive); }
.browse__hub:hover b { color: var(--ink); }
.browse__hub span { display: block; margin-top: 6px; font-size: 14.5px; line-height: 1.4; color: var(--olive); }

/* Footer */
.foot { position: relative; margin-top: clamp(56px, 8vw, 112px); padding-block: 0 30px; }
.foot__rule { height: 7px; background: var(--olive); }
.foot__row {
  display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between;
  padding-top: 14px;
  font: 400 17px/1.3 var(--display); letter-spacing: .07em; color: var(--olive-soft);
}
.foot a { text-decoration: none; }

@media (max-width: 1040px) {
  .addr { display: none; }
  .row { grid-template-columns: 112px minmax(0, 1fr) minmax(0, 1fr); row-gap: 2px; }
  .row img { width: 112px; }
  .row__img { grid-row: span 2; }
  .row h3 { grid-column: 2 / -1; }
  .row span:nth-of-type(1) { grid-column: 2; }
  .row i { display: none; }
}
@media (max-width: 860px) {
  :root { --logo-h: 72px; --head-pad: 20px; }
  .head__row { flex-direction: column; }
  .nav { position: static; margin-top: 16px; flex-wrap: wrap; gap: 8px 18px; font-size: 18px; }
  .block { grid-template-columns: 1fr 1fr; }
  .block > div:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--hair); padding-left: 0; }
  .fact, .prose { grid-column: 1 / -1; }
  .prose { margin-top: 30px; }
  .blog-top { row-gap: 12px; }
  .blog-top h1, .blog-top p, .lead__meta, .lead__body, .year__n, .year ul, .browse__label, .browse__body { grid-column: 1 / -1; }
  .lead__body { margin-top: 12px; }
  .browse__body { grid-template-columns: minmax(0, 1fr); margin-top: 10px; }
  .browse__cell { padding-inline: 0; }
  .browse__cell + .browse__cell { border-left: 0; border-top: 1px solid var(--hair); }
  .year__n span { position: static; margin-bottom: 10px; }
  .year li a { grid-template-columns: minmax(0, 1fr); row-gap: 3px; }
  .year .cat { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .foot__row .dot { display: none; }
  .foot__row a { display: block; }
  .strip img { height: 220px; }
  .strip figure { max-width: calc(100vw - 2 * var(--gutter)); }
  .row { grid-template-columns: 92px minmax(0, 1fr); column-gap: 14px; }
  .row img { width: 92px; }
  .row__img { grid-row: span 3; }
  .row h3, .row span:nth-of-type(1), .row span:nth-of-type(2) { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .strip { scroll-behavior: auto; }
}
