:root {
  color-scheme: dark;
  --paper: #080a0b;
  --ink: #eceeeb;
  --muted: #a3aaa6;
  --line: #373c39;
  --gutter: clamp(22px, 4.2vw, 76px);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); scroll-behavior: smooth; scrollbar-gutter: stable; }
body { margin: 0; min-width: 300px; -webkit-font-smoothing: antialiased; }
body.viewer-open { overflow: hidden; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 5px; }
button { font: inherit; color: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid #a7dce7; outline-offset: 7px; }
img { display: block; max-width: 100%; }
button { border: 0; border-radius: 0; }
::selection { background: #d9e5e0; color: #111312; }
.skip-link { position: fixed; top: -80px; left: 20px; padding: 14px; background: var(--ink); color: var(--paper); z-index: 100; }
.skip-link:focus { top: 15px; }
.site-header, main { width: min(100%, 1440px); margin-inline: auto; padding-inline: var(--gutter); }
.site-header { min-height: 118px; display: flex; align-items: center; justify-content: space-between; gap: 36px; }
.wordmark { font-size: clamp(24px,2.5vw,34px); letter-spacing: -.045em; text-decoration: none; white-space: nowrap; }
.site-nav { display: flex; gap: clamp(20px, 2.5vw, 42px); }
.site-nav a { position: relative; display:inline-flex; align-items:center; min-height:44px; padding-block: 12px; color: var(--muted); font-size: 13px; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"]::after { position: absolute; content: ""; bottom: 5px; left: 0; right: 0; height: 1px; background: currentColor; }
main { padding-top: 56px; padding-bottom: 120px; min-height: calc(100svh - 212px); }
.page-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 66px; }
h1, h2, h3, p, figure { margin: 0; }
h1 { font-weight: 400; font-size: clamp(48px, 6.2vw, 94px); line-height: 1.05; letter-spacing: -.065em; }
.page-note { white-space: nowrap; }
.text-link { font-size: 14px; }

/* Home: the name and navigation are the entire page. */
.home-header { justify-content: flex-end; }
.home-main { display: grid; place-items: center; min-height: calc(100svh - 110px); padding-block: 0 110px; }
.home-main h1 { font-size: clamp(20px, 3vw, 40px); line-height: 1.4; font-weight: 400; letter-spacing: -.035em; text-align: center; }

/* Photography: plain, uncropped images. */
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; align-items: center; }
.photo { min-width: 0; margin: 0; }
.photo-link { display: block; position: relative; width: 100%; overflow: hidden; cursor: zoom-in; background: #181d19; }
.photo-link img { width: 100%; height: auto; transition: opacity .18s ease; }
.photo-link:hover img { opacity: .88; }
.photo-link.screenshot { aspect-ratio: 1179 / 884; }
.photo-link.screenshot img { position: absolute; top: 50%; transform: translateY(-50%); }

/* Full-screen photo viewer */
.photo-viewer { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; border: 0; margin: 0; padding: 0; background: #0a0b0a; color: var(--ink); }
.photo-viewer::backdrop { background: #0a0b0a; }
.viewer-layout { height: 100%; height: 100dvh; display: grid; grid-template-rows: 80px minmax(0, 1fr) 86px; padding-inline: clamp(16px, 4vw, 64px); }
.viewer-top { display: flex; align-items: center; justify-content: flex-end; gap: 20px; }
.viewer-close { min-height: 44px; min-width: 72px; padding: 10px 0 10px 18px; background: transparent; cursor: pointer; font-size: 14px; }
.viewer-stage { display: grid; place-items: center; min-height: 0; touch-action: pan-y pinch-zoom; }
.viewer-frame { width: 100%; height: 100%; min-height: 0; position: relative; }
.viewer-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.viewer-frame.screenshot { display: block; width: min(100%, calc((100dvh - 166px) * 1179 / 884)); height: auto; aspect-ratio: 1179 / 884; overflow: hidden; }
.viewer-frame.screenshot img { inset: auto; left: 0; top: 50%; transform: translateY(-50%); width: 100%; height: auto; }
.viewer-frame.figure-on-white { width:min(100%,calc((100dvh - 166px) * var(--image-ratio, 1))); height:auto; aspect-ratio:var(--image-ratio, 1); background:#fff; }
.viewer-bottom { display: flex; align-items: center; justify-content: center; gap: 18px; }
.viewer-controls { display: flex; gap: 26px; align-items: center; }
.viewer-controls[hidden] { display:none; }
.viewer-controls button { width: 46px; height: 46px; background: transparent; cursor: pointer; font-size: 25px; }
.viewer-controls button:hover, .viewer-close:hover { color: #a7dce7; }
.viewer-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* CV */
.cv-heading { align-items: center; }
.download-link { display: inline-flex; min-height:44px; gap: 25px; align-items: center; padding-block: 8px; border-bottom: 1px solid var(--ink); text-decoration: none; white-space: nowrap; font-size: 14px; }
.cv-section { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 42px; padding-block: 38px; border-top: 1px solid var(--line); }
.cv-section > h2 { font-size: 13px; font-weight: 400; padding-top: 5px; color: var(--muted); }
.cv-entry + .cv-entry { margin-top: 38px; }
.cv-entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 25px; }
.cv-entry h3 { font-size: 21px; line-height: 1.35; font-weight: 400; letter-spacing: -.025em; }
.cv-date { font-size: 12px; color: var(--muted); white-space: nowrap; }
.cv-role { font-size: 14px; margin-top: 6px; }
.cv-description { font-size: 14px; line-height: 1.75; color: var(--muted); margin-top: 14px; max-width: 730px; }
.cv-description + .cv-description { margin-top: 8px; }
.cv-compact { display: grid; grid-template-columns: 140px 1fr; gap: 14px 25px; margin: 0; font-size: 14px; line-height: 1.6; }
.cv-compact dt { color: var(--muted); }
.cv-compact dd { margin: 0; }

@media (max-width: 900px) {
  .site-header { min-height: 100px; }
  main { padding-top: 40px; padding-bottom: 80px; }
  .page-heading { margin-bottom: 46px; }
  .cv-section { grid-template-columns: 125px 1fr; gap: 28px; }
  .cv-entry-head { display: block; }
  .cv-date { display: block; margin-top: 9px; }
}
@media (max-width: 620px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 19px; padding-top: 25px; padding-bottom: 16px; }
  .wordmark { font-size: 27px; }
  .site-nav { width: 100%; gap: 24px; flex-wrap:wrap; }
  .site-nav a { font-size: 13px; padding-block: 10px; }
  .site-nav a[aria-current="page"]::after { bottom: 0; }
  main { padding-top: 38px; padding-bottom: 64px; }
  h1 { font-size: clamp(43px, 11vw, 64px); }
  .page-heading { gap: 14px; margin-bottom: 34px; }
  .page-note { font-size: 10px; }
  .home-main { padding-top: 0; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 15px; }
  .viewer-layout { grid-template-rows: 66px minmax(0, 1fr) 90px; padding-inline: 15px; }
  .viewer-frame.screenshot { width: min(100%, calc((100dvh - 156px) * 1179 / 884)); }
  .viewer-frame.figure-on-white { width:min(100%,calc((100dvh - 156px) * var(--image-ratio, 1))); }
  .viewer-controls { gap: 10px; }
  .cv-heading { align-items: flex-start; }
  .download-link { font-size: 12px; gap: 15px; margin-top: 12px; }
  .cv-section { grid-template-columns: 1fr; gap: 23px; padding-block: 28px; }
  .cv-entry h3 { font-size: 20px; }
  .cv-compact { grid-template-columns: 95px 1fr; font-size: 13px; }
}
@media (max-width: 380px) {
  .page-heading:not(.cv-heading) { display: block; }
  .page-heading .page-note { margin-top: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Project direction: photographs stand alone, without captions or numbering. */
.viewer-top { justify-content: flex-end; }
.viewer-bottom { justify-content: center; }
@media (max-width: 620px) {
  .home-header { align-items: stretch; min-height: 77px; }
  .home-main { min-height: calc(100svh - 77px); padding-block: 0 77px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .photo:last-child { grid-column: span 2; }
}

@media (min-width: 621px) and (max-width: 900px) { .home-main { min-height: calc(100svh - 100px); padding-block: 0 100px; } }
