@font-face {
  font-family: "Libre Baskerville";
  src: url("build/libre-baskerville.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "ABC Areal Mono";
  src: local("ABC Areal Mono Regular"), local("ABCArealMono-Regular"), url("fonts/abc-areal-mono.woff2") format("woff2");
  font-display: swap;
}
:root {
  --paper: #f4f5f1;
  --ink: #242a26;
  --muted: #58605a;
  --line: #bfc5bc;
  --serif: "Libre Baskerville", Georgia, serif;
  --mono: "ABC Areal Mono", "Courier New", monospace;
  --gutter: clamp(26px, 3.5vw, 68px);
  --top: clamp(28px, 4.6vh, 58px);
  --motion: 210ms;
}
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; background: var(--paper); color: var(--ink); }
body { margin: 0; font: 16px/1.6 var(--serif); }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.skip { position: fixed; left: 10px; top: -100px; z-index: 4; background: var(--paper); padding: .5em; }
.skip:focus { top: 10px; }
.rail { position: fixed; top: var(--top); left: var(--gutter); max-width: 33%; }
.identity { display: inline-block; font-size: clamp(25px, 2.25vw, 38px); line-height: 1.25; letter-spacing: -.057em; }
.practice, .metadata, .index-heading, .colophon, figcaption, .back, .viewer-controls, .contact {
  font: 12px/1.55 var(--mono);
}
.practice { color: var(--muted); margin: 8px 0 0; }
nav { margin-top: 48px; display: grid; justify-items: start; }
nav a { position: relative; padding: 4px 0; font: 16px/1.45 var(--serif); }
nav a[aria-current]::before { content: ""; position: absolute; top: 50%; left: -13px; width: 5px; height: 5px; background: var(--ink); border-radius: 50%; transform: translateY(-50%); }
nav a:hover, .back:hover, .contact:hover { text-decoration: underline; text-underline-offset: .23em; }
main { margin-left: 39%; padding: var(--top) var(--gutter) 90px 0; min-height: 92vh; }
main:focus { outline: none; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 400; line-height: 1.22; letter-spacing: -.045em; }
.index { max-width: 410px; }
.index-heading { display: flex; align-items: baseline; gap: 8px; color: var(--muted); margin-bottom: 26px; }
.index-heading h1 { font: inherit; letter-spacing: inherit; color: var(--ink); }
.entry + .entry { margin-top: 34px; }
.entry + .entry::before { content: ""; display: block; height: 1px; width: 18px; background: var(--line); margin-bottom: 34px; }
.project-link { display: block; width: fit-content; max-width: 100%; }
img { display: block; max-width: 100%; height: auto; }
.entry img { max-width: min(100%, 350px); width: auto; max-height: 355px; object-fit: contain; object-position: left center; }
.metadata { color: var(--muted); }
.metadata span { color: var(--muted); margin-inline: .3em; }
.entry .metadata { margin: 15px 0 5px; }
.entry h2 { font-size: clamp(21px, 1.7vw, 29px); }
.entry-arrow { display: inline-block; font: 16px/1 var(--mono); margin-left: 9px; transform: translateY(-2px); transition: transform var(--motion); }
.project-link:hover .entry-arrow { transform: translate(3px,-5px); }
.colophon { position: fixed; bottom: 26px; left: var(--gutter); color: var(--muted); font-size: 11px; }
.detail { max-width: 810px; }
.detail h1, .about h1 { font-size: clamp(34px, 4vw, 62px); line-height: 1.13; }
.project-intro { margin: 52px 0 30px; }
.project-intro h1 { margin: 9px 0 16px; }
.prose, .column { line-height: 1.72; }
.prose { max-width: 39em; }
.prose p + p, .column p + p { margin-top: 1em; }
.prose a, .column p a, .contact { text-decoration: underline; text-underline-offset: .2em; }
.cover, .layout { margin-bottom: clamp(25px, 4.5vw, 65px); }
.cover img { max-height: 85vh; width: auto; }
.layout { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 16px; }
.column { grid-column: span var(--span); min-width: 0; }
.column > * + * { margin-top: 22px; }
.column :is(h2,h3) { margin-bottom: 12px; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
figcaption { margin-top: 10px; color: var(--muted); }
.view-photo { display: block; width: fit-content; max-width: 100%; cursor: zoom-in; }
.about { max-width: 550px; }
.about h1 { margin-bottom: 36px; }
.about .prose { font-size: clamp(17px, 1.5vw, 22px); }
.contact { display: inline-block; margin-top: 35px; }
dialog.viewer { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 24px; border: 0; background: var(--paper); color: var(--ink); }
.viewer[open] { display: grid; grid-template-rows: 1fr auto; gap: 16px; }
.viewer img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.viewer-controls { display: flex; align-items: center; justify-content: center; gap: 22px; }
.viewer button { font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; padding: 10px 4px; }
html:has(.viewer[open]) { overflow: hidden; }
@media (max-width: 760px) {
  :root { --gutter: 23px; --top: 23px; }
  .rail { position: static; max-width: none; margin: var(--top) var(--gutter) 0; display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 12px; }
  .identity { font-size: clamp(23px, 6.2vw, 32px); }
  .practice { grid-column: 1/-1; grid-row: 2; margin-top: 4px; }
  nav { margin: 0; display: flex; gap: 13px; justify-self: end; }
  nav a { font-size: 13px; }
  nav a[aria-current]::before { display: none; }
  nav a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }
  main { margin-left: 0; min-height: 60vh; padding: 54px var(--gutter) 55px; }
  .entry img { max-width: min(100%, 80vw, 350px); max-height: 320px; }
  .index-heading { margin-bottom: 18px; }
  .colophon { position: static; margin: 0 var(--gutter) 20px; }
  .project-intro { margin-top: 30px; }
  .layout { gap: 18px; }
  .column { grid-column: 1/-1; }
  .column:empty { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(root) { animation-duration: var(--motion); }
  .rail { view-transition-name: portfolio-navigation; }
  .colophon { view-transition-name: portfolio-footer; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
