/* Direction A: refresh. Keeps the dark brown ground and orange rule from the current site. */
:root {
  --bg: #2b1a12;
  --bg-raise: #38231a;
  --line: #553c2e;
  --text: #f1e7dd;
  --muted: #c9b5a6;
  --blush: #d5aa9d;
  --orange: #c14c28;
  --orange-lit: #ec7d55;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --accent: "Saira Extra Condensed", "Arial Narrow", sans-serif;
  --logo-h: 92px;
  --head-pad: 26px;
  --gutter: clamp(20px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--orange-lit); text-underline-offset: 3px; transition: color .2s; }
a:hover { color: var(--orange-lit); }
:focus-visible { outline: 2px solid var(--orange-lit); 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(--text); color: var(--bg); padding: 8px 14px; z-index: 3; }
.skip:focus { left: 8px; top: 8px; }

.wrap { max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.label {
  font: 500 17px/1.2 var(--accent);
  letter-spacing: .14em;
  text-transform: lowercase;
  color: var(--blush);
}

/* Header: the orange rule passes through the logo and runs the full width of the page. */
.site-head { position: relative; padding-block: var(--head-pad) 22px; }
.site-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(--orange);
}
.site-head .wrap { position: relative; display: flex; justify-content: space-between; align-items: flex-start; }
.logo { position: relative; display: block; flex: none; }
.logo img { height: var(--logo-h); width: auto; }
.nav {
  position: absolute;
  right: var(--gutter);
  bottom: calc(var(--logo-h) * .4615 + 9px);
  display: flex; gap: clamp(16px, 2.2vw, 30px);
  font: 500 18px/1 var(--accent);
  letter-spacing: .1em;
  text-transform: lowercase;
}
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }
.nav a[aria-current] { color: var(--text); }
.nav a[aria-current]::before {
  content: ""; display: inline-block; width: .42em; height: .42em;
  background: var(--orange-lit); margin-right: .45em; vertical-align: .12em;
}

/* Page title */
.page-title { padding-top: clamp(28px, 4vw, 52px); padding-bottom: clamp(20px, 2.4vw, 30px); }
.crumb a { text-decoration: none; }
h1 {
  margin-top: 8px;
  font-weight: 600;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -.028em;
  text-wrap: balance;
}

/* Property layout */
.project {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.stage img { width: 100%; aspect-ratio: 1.7; object-fit: cover; background: var(--bg-raise); }
.stage figcaption { padding-top: 10px; font-size: 14.5px; color: var(--muted); min-height: 2.2em; }
.thumbs { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.thumbs button {
  padding: 0; border: 0; background: none; cursor: pointer;
  opacity: .62; transition: opacity .2s; position: relative;
}
.thumbs button:hover { opacity: 1; }
.thumbs button[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--orange-lit); }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.lede { font-size: 18.5px; line-height: 1.6; }
.meta { margin-top: 28px; border-top: 1px solid var(--line); }
.meta > div { padding: 13px 0; border-bottom: 1px solid var(--line); }
.meta dd { margin-top: 3px; font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags li {
  padding: 3px 9px 4px;
  background: var(--bg-raise);
  border-left: 3px solid var(--orange);
  font-size: 14px; font-weight: 500; line-height: 1.4;
}
.text-link { display: inline-block; margin-top: 22px; font-weight: 600; font-size: 15.5px; }

/* More projects */
.more { padding-block: clamp(52px, 7vw, 92px); }
.more__head { padding-bottom: 14px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
h2 { font-weight: 600; font-size: 26px; line-height: 1.2; letter-spacing: -.018em; }
.grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 34px 20px; }
.tile { display: block; text-decoration: none; }
.tile__img { overflow: hidden; background: var(--bg-raise); }
.tile img { width: 100%; aspect-ratio: 1.7; object-fit: cover; transition: transform .4s ease; }
.tile:hover img { transform: scale(1.035); }
.tile h3 { margin-top: 11px; font-weight: 600; font-size: 16px; line-height: 1.3; letter-spacing: -.008em; }
.tile p { margin-top: 3px; font-size: 13.5px; line-height: 1.4; color: var(--muted); }

/* Blog */
.blog {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
  padding-bottom: clamp(52px, 7vw, 92px);
}
.posts { border-top: 3px solid var(--orange); }
.post { padding-block: 24px; border-bottom: 1px solid var(--line); }
.post[hidden] { display: none; }
.post__meta { font: 500 16px/1.2 var(--accent); letter-spacing: .1em; color: var(--blush); }
.post__meta span::before { content: "▪"; margin-inline: .5em; color: var(--orange-lit); }
.post h2 { margin-top: 7px; font-size: 23px; line-height: 1.25; text-wrap: balance; }
.post h2 a { text-decoration: none; }
.post p:last-child { margin-top: 7px; color: var(--muted); font-size: 16px; line-height: 1.55; max-width: 62ch; }
.post--lead { padding-block: 30px 34px; }
.post--lead h2 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -.024em; margin-top: 10px; }
.post--lead p:last-child { margin-top: 12px; font-size: 18.5px; color: var(--text); }
.older { display: inline-block; margin-top: 24px; font-weight: 600; font-size: 15.5px; }

.side { position: sticky; top: 24px; display: grid; gap: 34px; }
.filter { margin-top: 10px; border-top: 1px solid var(--line); }
.filter button {
  display: flex; justify-content: space-between; width: 100%;
  padding: 10px 0; border: 0; border-bottom: 1px solid var(--line);
  background: none; color: var(--muted); cursor: pointer;
  font: 500 15.5px/1.4 var(--sans); text-align: left; transition: color .2s;
}
.filter button:hover { color: var(--text); }
.filter button[aria-pressed="true"] { color: var(--text); font-weight: 700; }
.filter button[aria-pressed="true"] span:first-child::before {
  content: ""; display: inline-block; width: .5em; height: .5em;
  background: var(--orange-lit); margin-right: .55em; vertical-align: .1em;
}
.hub { display: block; padding: 22px; background: var(--bg-raise); border-top: 3px solid var(--orange); text-decoration: none; }
.hub h2 { margin-top: 6px; font-size: 21px; }
.hub p { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.hub:hover h2 { color: var(--orange-lit); }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 26px 34px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; font-size: 14px; color: var(--muted); }
.site-foot a { text-decoration: none; }

@media (max-width: 1040px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  :root { --logo-h: 68px; --head-pad: 18px; }
  .nav {
    position: static; margin-top: 16px; flex-wrap: wrap; gap: 8px 18px;
  }
  .site-head .wrap { flex-direction: column; }
  .project, .blog { grid-template-columns: minmax(0, 1fr); }
  .side { display: contents; }
  .side > div { order: -1; }
  .filter { display: flex; flex-wrap: wrap; gap: 6px 18px; border: 0; }
  .filter button { width: auto; border: 0; padding: 4px 0; gap: 6px; }
  .thumbs { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
