/* =========================================================
   Dylan Allison — photographs
   The same look as the résumé site (blueprint navy + hi-vis
   safety): Oswald display, Archivo text, JetBrains Mono for
   labels and readouts, a faint drafting grid behind it all.
   Photos keep their true proportions; the viewer is a
   near-black room so nothing tints them.
   ========================================================= */

/* ---------- fonts (self-hosted at /fonts/, shared by the front page, photos and résumé; SIL Open Font License) ---------- */
@font-face {
  font-family: "Oswald"; font-style: normal; font-display: swap; font-weight: 200 700;
  src: url("/fonts/oswald-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
}

/* ---------- tokens ---------- */
/* Night (blueprint navy) is the default, as on the résumé; the switch in the
   header offers a daylight version. */
:root {
  --wall: #0c1622;        /* blueprint navy */
  --mat: #16263a;         /* behind a photo that's still loading */
  --ink: #eef3f7;         /* drafting white */
  --ink-soft: #b3c3d1;
  --graphite: #71879c;    /* labels, readouts */
  --rule: #2c4258;
  --rule-soft: #1d3044;
  --accent: #f7b500;      /* hi-vis yellow */
  --accent-2: #ff6b2c;    /* safety orange */
  --hivis: #f7b500;       /* the yellow button, same in both looks */
  --on-hivis: #14100a;
  --glow: radial-gradient(1200px 600px at 80% -10%, rgba(247, 181, 0, 0.06), transparent 60%),
          radial-gradient(900px 500px at -10% 110%, rgba(255, 107, 44, 0.05), transparent 60%);
  --grid-line: rgba(120, 160, 200, 0.05);
  --dot-glow: 0 0 8px rgba(247, 181, 0, 0.7);
  --room: #070a0e;        /* the viewer: near-black, so photos aren't tinted */
  --room-ink: #eef3f7;
  --room-muted: #9fb0c0;
  --room-rule: rgba(238, 243, 247, 0.14);

  --display: "Oswald", "Arial Narrow", sans-serif;
  --body: "Archivo", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --maxw: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --gap: clamp(6px, 0.8vw, 12px);
  --cover-h: clamp(240px, 100vh - 380px, 720px);
  color-scheme: dark;
}
@supports (height: 100svh) { :root { --cover-h: clamp(240px, 100svh - 380px, 720px); } }
/* Daylight: drafting paper. */
:root[data-theme="light"] {
  --wall: #f2f5f8; --mat: #e1e7ee; --ink: #0c1622; --ink-soft: #2f4255; --graphite: #52657a;
  --rule: #c9d3de; --rule-soft: #dbe2ea; --accent: #875c00; --accent-2: #c2410c;
  --glow: none; --grid-line: rgba(12, 22, 34, 0.05); --dot-glow: none;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background-color: var(--wall);
  background-image: var(--glow);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  font-weight: 380;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* The faint drafting grid. It sits behind the page, never over a photo. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--hivis); color: var(--on-hivis); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }
.num { font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.page { position: relative; z-index: 1; }
.container {
  width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter);
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 14px;
  background: var(--ink); color: var(--wall); font: 500 0.8125rem/1 var(--mono);
}
.skip:focus { top: 12px; }
.notice {
  position: relative; z-index: 2;
  margin: 0; padding: 10px var(--gutter); background: var(--mat); color: var(--ink);
  font: 400 0.8125rem/1.45 var(--mono); text-align: center; text-wrap: balance;
}
.notice.problem { background: #b3261e; color: #ffffff; font-weight: 500; }

/* ---------- header ---------- */
.site-header { padding-block: 1.6rem 1rem; border-bottom: 1px solid var(--rule-soft); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand {
  display: inline-flex; align-items: baseline; gap: 0.55rem; min-width: 0; white-space: nowrap;
  font-family: var(--display); font-weight: 500; font-size: 1.1rem; line-height: 1.65;
  letter-spacing: 0.03em; text-transform: uppercase;
}
.brand .mark {
  font: 500 0.72rem/1.4 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--rule); border-radius: 2px; padding: 0.28rem 0.5rem;
}
.brand .name { color: var(--ink); }
.nav {
  display: flex; align-items: center; gap: 1.75rem;
  font: 400 0.78rem/1.65 var(--mono); letter-spacing: 0.16em; text-transform: uppercase;
}
.nav a { position: relative; color: var(--ink-soft); padding-bottom: 0.2rem; white-space: nowrap; transition: color 220ms ease; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--accent);
  transition: right 280ms cubic-bezier(0.6, 0, 0.2, 1);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { right: 0; }
/* Light/dark switch: a sun at night (switch to daylight), a moon in daylight. */
.theme {
  display: inline-grid; place-items: center; width: 34px; height: 34px; margin: -8px -9px -8px -0.6rem;
  padding: 0; border: 0; border-radius: 2px; background: none; color: var(--ink-soft); cursor: pointer;
  transition: color 220ms ease;
}
.theme:hover { color: var(--accent); }
.theme svg { grid-area: 1 / 1; width: 16px; height: 16px; }
.theme .moon { display: none; }
:root[data-theme="light"] .theme .moon { display: block; }
:root[data-theme="light"] .theme .sun { display: none; }
@media (max-width: 640px) {
  .site-header .container { gap: 1rem; }
  .nav { gap: 1.1rem; letter-spacing: 0.1em; }
}
/* On a phone the badge stands in for the name; the big name is right below. */
@media (max-width: 480px) {
  .brand .name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav { gap: 0.95rem; letter-spacing: 0.08em; }
}
/* Small phones: the badge shortens to the initials so the four menu links fit. */
@media (max-width: 400px) {
  .brand .mark .pg { display: none; }
  .site-header .container { gap: 0.75rem; }
  .nav { gap: 0.8rem; letter-spacing: 0.04em; }
}

/* ---------- coordinate strip (archive readout) ---------- */
.coord-strip {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.2rem 1rem;
  padding-block: 0.7rem; border-bottom: 1px solid var(--rule-soft);
  font: 400 0.7rem/1.65 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--graphite);
}
.coord-strip span { white-space: nowrap; }
.coord-strip .dot {
  display: inline-block; width: 6px; height: 6px; margin-right: 0.5rem; border-radius: 50%;
  background: var(--accent); box-shadow: var(--dot-glow); transform: translateY(-1px);
}
@media (max-width: 560px) {
  .coord-strip { letter-spacing: 0.12em; }
  .coord-strip .vol { display: none; }
}

/* ---------- hero (photos) ---------- */
.hero {
  display: grid; align-content: center;
  padding-block: clamp(3rem, 9vw, 7rem) clamp(3rem, 7vw, 5rem);
  min-height: calc(100vh - 140px);
}
@supports (height: 100svh) { .hero { min-height: calc(100svh - 140px); } }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 5rem); align-items: center;
}
.hero-grid.no-cover { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 880px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

.kicker {
  display: inline-flex; align-items: center; gap: 0.7rem; margin: 0 0 1.6rem;
  font: 400 0.74rem/1.65 var(--mono); letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent);
}
.kicker::before { content: ""; flex: none; display: inline-block; width: 28px; height: 1px; background: var(--accent); }
.hero h1 {
  margin: 0 0 1.6rem; color: var(--ink);
  font-family: var(--display); font-weight: 500; font-size: clamp(3.4rem, 10vw, 8.4rem);
  line-height: 0.95; letter-spacing: 0.01em; text-transform: uppercase; overflow-wrap: break-word;
}
.hero h1 span { display: block; }
.hero h1 .second { color: var(--accent); font-weight: 300; }
/* Inside the photo hero the name shares the row with the cover, so it tops out a little smaller. */
.hero-grid:not(.no-cover) h1 { font-size: clamp(3.4rem, 8.4vw, 7.6rem); }
@media (max-width: 880px) { .hero-grid:not(.no-cover) h1 { font-size: clamp(3.4rem, 13vw, 7.6rem); } }
.lede {
  max-width: 38ch; margin: 0 0 2.4rem;
  font-size: 1.18rem; line-height: 1.55; color: var(--ink-soft); font-weight: 380; text-wrap: pretty;
}
.cta-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.action {
  display: inline-flex; align-items: center; gap: 0.7rem; padding: 0.95rem 1.5rem;
  border: 1px solid var(--rule); border-radius: 2px; background: transparent; color: var(--ink);
  font: 400 0.78rem/1.65 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; cursor: pointer;
  transition: background 240ms ease, border-color 240ms ease, color 240ms ease;
}
.action .arrow { transition: transform 240ms cubic-bezier(0.6, 0, 0.2, 1); }
.action:hover { background: var(--ink); color: var(--wall); border-color: var(--ink); }
.action:hover .arrow { transform: translateX(4px); }
.action--primary { background: var(--hivis); border-color: var(--hivis); color: var(--on-hivis); }
.action--primary:hover { background: var(--ink); color: var(--wall); border-color: var(--ink); }
@media (max-width: 480px) {
  .cta-row { gap: 0.75rem; }
  .action { padding-inline: 1.1rem; letter-spacing: 0.14em; }
}

/* The cover photo, uncropped, where the résumé has its illustration. It
   resolves from coarse pixels as it loads. */
.cover { min-width: 0; display: grid; justify-items: end; }
@media (max-width: 880px) { .cover { justify-items: start; } }
.cover-inner { margin: 0; width: min(100%, calc(var(--cover-h) * var(--r, 1.5))); }
.cover-box {
  position: relative; display: block; width: 100%; aspect-ratio: var(--ar, 3 / 2);
  background: var(--mat); overflow: hidden; cursor: zoom-in;
}
.cover-box img, .cover-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-box img { object-fit: cover; }
.cover-box canvas { image-rendering: pixelated; transition: opacity 0.5s ease; }
.cover-cap {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.25rem 1.5rem;
  min-height: 1.4rem; margin-top: 0.9rem;
  font: 400 0.7rem/1.6 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--graphite);
}
.cover-cap .t { font: 500 1.05rem/1.3 var(--display); letter-spacing: 0.03em; color: var(--ink); }
.cover-cap .m { display: flex; flex-wrap: wrap; gap: 0.25rem 1.2rem; }
.cover-cap .m span { white-space: nowrap; }

/* ---------- the archive ---------- */
.intro-strip { border-top: 1px solid var(--rule-soft); padding-block: clamp(3rem, 6vw, 5rem) 0; }
.intro-grid {
  display: grid; grid-template-columns: minmax(0, 220px) 1fr; align-items: start;
  gap: clamp(1.5rem, 4vw, 4rem); margin-bottom: clamp(2rem, 4vw, 3rem);
}
@media (max-width: 720px) { .intro-grid { grid-template-columns: 1fr; gap: 1rem; } }
.section-label {
  margin: 0; font: 400 0.72rem/1.65 var(--mono); letter-spacing: 0.24em; text-transform: uppercase; color: var(--graphite);
}
.section-label .num { color: var(--accent); margin-right: 0.55rem; }
.strip-text {
  margin: 0; max-width: 36ch; color: var(--ink);
  font-family: var(--display); font-weight: 320; font-size: clamp(1.3rem, 2.4vw, 1.85rem); line-height: 1.4;
}

/* Album cards: a way in to each album, like the résumé's skill cards. */
.album-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3rem);
}
@media (max-width: 560px) { .album-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; } }
.album-card {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0.15rem 0.7rem;
  padding: 0.6rem 0.6rem 0.9rem; border: 1px solid var(--rule); border-radius: 2px;
  background: color-mix(in srgb, var(--wall) 90%, transparent);
  transition: border-color 240ms ease, transform 240ms ease;
}
.album-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.album-card[aria-current="page"] { border-color: var(--accent); }
.album-card .ac-img {
  grid-column: 1 / -1; position: relative; display: block; aspect-ratio: 4 / 3; margin-bottom: 0.6rem;
  overflow: hidden; background: var(--mat);
}
.album-card .ac-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s ease, transform 0.5s ease; }
.album-card .ac-img img.in { opacity: 1; }
.album-card:hover .ac-img img { transform: scale(1.03); }
.album-card .ac-num { font: 400 0.7rem/1.4 var(--mono); letter-spacing: 0.16em; color: var(--accent); }
.album-card .ac-name {
  font: 500 1.2rem/1.2 var(--display); letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink);
  min-width: 0; overflow-wrap: anywhere;
}
.album-card .ac-meta {
  grid-column: 1 / -1; font: 400 0.66rem/1.5 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--graphite);
}
@media (max-width: 560px) { .album-card .ac-name { font-size: 1.02rem; } .album-card { padding: 0.5rem 0.5rem 0.75rem; } }

/* Album chips, like the résumé's tags. The bar stays in reach while scrolling. */
.albums {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--wall); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
}
@supports (backdrop-filter: blur(1px)) {
  .albums { background: color-mix(in srgb, var(--wall) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
}
.albums-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 0.6rem; border-bottom: 1px solid var(--rule-soft);
}
.tabs {
  display: flex; gap: 0.7rem; min-width: 0; overflow-x: auto; padding: 4px; margin: -4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs.more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.tabs.more-left { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); }
.tabs.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.tab {
  display: inline-flex; align-items: baseline; gap: 0.6em; flex: none; padding: 0.4rem 0.7rem;
  border: 1px solid var(--rule); border-radius: 2px;
  font: 400 0.72rem/1.65 var(--mono); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft); white-space: nowrap; transition: border-color 220ms ease, color 220ms ease;
}
.tab:hover { color: var(--ink); border-color: var(--ink-soft); }
.tab .n { letter-spacing: 0.04em; color: var(--graphite); font-variant-numeric: tabular-nums; }
.tab[aria-current="page"] { color: var(--ink); border-color: var(--accent); }
.tab[aria-current="page"] .n { color: var(--accent); }
.albums .total {
  flex: none; font: 400 0.7rem/1.65 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--graphite);
}
@media (max-width: 560px) { .albums .total { display: none; } }
.album-desc {
  margin: 0; padding-block: 1.2rem 0.4rem; max-width: 62ch; white-space: pre-line;
  font-size: 1.0625rem; line-height: 1.6; color: var(--ink-soft); text-wrap: pretty;
}

.grid { display: grid; gap: var(--gap); padding-top: clamp(14px, 2vw, 24px); }
.row { display: flex; gap: var(--gap); align-items: flex-start; }
.tile { position: relative; display: block; min-width: 0; overflow: hidden; background: var(--mat); cursor: zoom-in; }
.tile img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.5s ease, filter 0.25s ease;
}
.tile img.in { opacity: 1; }
.tile:hover img { filter: brightness(1.06); }
.tile:focus-visible { outline-offset: 2px; }
.spacer { min-width: 0; }
.empty { padding-block: 2rem; max-width: 44ch; color: var(--ink-soft); }
.empty h3 { margin: 0 0 0.5rem; color: var(--ink); font: 500 2rem/1.05 var(--display); letter-spacing: 0.02em; text-transform: uppercase; }

/* ---------- about ---------- */
.page-hero { padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--rule-soft); }
.page-hero h1 {
  margin: 0.6rem 0 1.4rem; max-width: 20ch; text-wrap: balance;
  font-family: var(--display); font-weight: 500; font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 1; letter-spacing: 0.01em; text-transform: uppercase; overflow-wrap: break-word;
}
.page-hero .lede {
  max-width: 60ch; margin: 0;
  font-family: var(--display); font-weight: 320; font-size: clamp(1.15rem, 1.8vw, 1.5rem); line-height: 1.5; color: var(--ink-soft);
}
.page-hero .lede p { margin: 0 0 1em; }
.page-hero .lede p:last-child { margin-bottom: 0; }
/* The About hero: text, and the résumé's power-line drawing beside it. */
.about-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(2rem, 6vw, 5rem);
}
.orbit { width: clamp(240px, 30vw, 400px); aspect-ratio: 1; justify-self: end; }
@media (max-width: 880px) {
  .about-hero { grid-template-columns: minmax(0, 1fr); }
  .orbit { justify-self: start; width: min(80vw, 320px); }
}
/* A portrait (if there's a _portrait.jpg) sits beside the details. */
.facts-wrap.has-portrait {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); align-items: start; gap: clamp(2rem, 6vw, 5rem);
}
.portrait { margin: 0; }
.portrait img {
  width: 100%; height: auto; aspect-ratio: var(--ar, 4 / 5); max-height: 70vh;
  object-fit: cover; background: var(--mat);
}
@media (max-width: 880px) {
  .facts-wrap.has-portrait { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 22rem; }
}

/* ---------- the power-line drawing (as on the résumé) ---------- */
:root { --steel: #3a5670; --steel-hot: #4a6a8c; --brace: #2c333c; }
:root[data-theme="light"] { --steel: #6d87a0; --steel-hot: #5b7896; --brace: #b9c6d3; }
.pylon-svg { width: 100%; height: 100%; }
.pylon-svg .wire, .pylon-svg .wire-hot { fill: none; stroke: var(--steel); stroke-width: 1; }
.pylon-svg .wire-hot { stroke: var(--steel-hot); }
.pylon-svg .pole { fill: none; stroke: var(--steel); stroke-width: 1.2; }
.pylon-svg .crossarm { stroke: var(--steel); stroke-width: 1.2; }
.pylon-svg g[stroke] line { stroke: var(--brace); }
.pylon-svg .insulator { fill: var(--accent-2); }
.pylon-svg .insulator-hot { fill: #f7b500; }
.pylon-svg .ground { stroke: var(--rule); stroke-width: 0.8; }
.pylon-svg .charge {
  fill: none; stroke: #f7b500; stroke-width: 1.4; stroke-dasharray: 3 500;
  animation: charge-travel 7s linear infinite;
}
.pylon-svg .charge-2 { animation-delay: 3.5s; }
.pylon-svg .spark-node { animation: pulse 2.4s ease-in-out infinite; }
.pylon-svg .spark-node-2 { animation: pulse 3.1s ease-in-out infinite; animation-delay: 0.8s; }
@keyframes charge-travel { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -503; } }
@keyframes pulse { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }

section.block { padding-block: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--rule-soft); }
.page-hero + section.block { border-top: 0; }
.block-head {
  display: grid; grid-template-columns: minmax(0, 220px) 1fr; align-items: end;
  gap: clamp(1.5rem, 4vw, 4rem); margin-bottom: 2.5rem;
}
@media (max-width: 720px) { .block-head { grid-template-columns: 1fr; gap: 0.75rem; margin-bottom: 1.5rem; } }
.block-title {
  margin: 0; font-family: var(--display); font-weight: 360; font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05; letter-spacing: -0.015em;
}

/* Entries: a label column and the content, as on the résumé. The details
   list (camera, lenses, contact) uses the same rows. */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
.entry, .facts > div {
  display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: clamp(1rem, 3vw, 3rem);
  padding-block: 1.4rem; border-top: 1px dashed var(--rule-soft);
}
.entry:first-child, .facts > div:first-child { border-top: 0; padding-top: 0; }
@media (max-width: 720px) { .entry, .facts > div { grid-template-columns: 1fr; gap: 0.4rem; } }
.entry .meta, .facts dt {
  font: 400 0.72rem/1.65 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--graphite);
}
.entry h3 { margin: 0 0 0.3rem; font: 500 1.35rem/1.3 var(--display); }
.entry p { margin: 0.4rem 0 0; max-width: 70ch; color: var(--ink-soft); }
.facts { margin: 0; }
.facts dd { margin: 0; font: 500 1.35rem/1.3 var(--display); overflow-wrap: anywhere; }
.facts dd span { display: block; }
.facts dd span + span { margin-top: 0.2rem; }
.facts a, .entry a {
  background-image: linear-gradient(var(--accent), var(--accent)); background-repeat: no-repeat;
  background-size: 0% 1px; background-position: 0 100%; padding-bottom: 2px;
  transition: background-size 320ms cubic-bezier(0.6, 0, 0.2, 1), color 240ms ease;
}
.entry p a { background-size: 100% 1px; background-image: linear-gradient(var(--rule), var(--rule)); }
.facts a:hover, .entry a:hover { color: var(--accent); background-size: 100% 1px; background-image: linear-gradient(var(--accent), var(--accent)); }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 3rem; padding-block: 2.5rem calc(2rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--rule-soft); text-align: center;
  font: 400 0.74rem/1.65 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--graphite);
}
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.7rem 1.6rem; }
.site-footer .links { display: contents; }
@media (min-width: 700px) { .site-footer .container > *, .site-footer .links > * { white-space: nowrap; } }
@media (max-width: 560px) {
  .site-footer { letter-spacing: 0.09em; }
  .site-footer .container { gap: 0.6rem 1.1rem; }
}
.site-footer a { color: var(--ink-soft); border-bottom: 1px solid transparent; transition: color 240ms ease, border-color 240ms ease; }
.site-footer a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.site-footer #copyright a { color: inherit; }
.site-footer #copyright a:hover { color: var(--accent); }

/* ---------- 404 + share pages ---------- */
.lost .page-hero { border-bottom: 0; padding-block: clamp(4rem, 10vw, 8rem); }
.lost .lede { margin-bottom: 2.4rem; }

/* ---------- entrance (as on the résumé) ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; animation: rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.reveal.d1 { animation-delay: 80ms; }
.reveal.d2 { animation-delay: 220ms; }
.reveal.d3 { animation-delay: 360ms; }
.reveal.d4 { animation-delay: 500ms; }
.reveal.d5 { animation-delay: 640ms; }

/* ---------- viewer ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--room); color: var(--room-ink); overscroll-behavior: contain;
  touch-action: none;           /* pinches and drags move the photo, never the page */
  -webkit-user-select: none; user-select: none;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.v-top { grid-row: 1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 6px 8px 6px 20px; }
.v-pos { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 0.72rem/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--room-muted); }
.v-pos b { font-weight: 500; color: var(--room-ink); }
.vbtn {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%;
  background: transparent; color: var(--room-ink); cursor: pointer;
}
.vbtn:hover { background: rgba(255, 255, 255, 0.1); }
.vbtn svg { width: 22px; height: 22px; }
.viewer :focus-visible { outline-color: #f7b500; }
.v-mid { grid-row: 2; position: relative; min-height: 0; overflow: hidden; }
.v-stage { position: absolute; inset: 4px 72px 20px; cursor: zoom-in; }
.viewer.zoomed .v-stage { cursor: grab; }
.v-stage.dragging { cursor: grabbing; }
/* The photo layer: zoomed and moved with a transform, so only the photo changes. */
.v-stage > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  transform-origin: 0 0; will-change: transform;
  user-select: none; -webkit-user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none;
  transition: opacity 0.25s ease;
}
.v-stage.anim > img { transition: opacity 0.25s ease, transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1); }
.v-stage .lo { filter: blur(12px); }
.v-error {
  position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; gap: 12px; padding: 24px;
  text-align: center; color: var(--room-muted); font-size: 0.9375rem;
}
.v-error .btn { justify-self: center; }
.v-side { position: absolute; top: 50%; translate: 0 -50%; z-index: 3; }
.v-side.prev { left: 14px; }
.v-side.next { right: 14px; }
.v-info {
  grid-row: 3; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px 32px;
  padding: 16px 20px 20px; border-top: 1px solid var(--room-rule);
}
.v-text { min-width: 0; display: grid; gap: 6px; -webkit-user-select: text; user-select: text; }
.v-title { margin: 0; font: 500 1.375rem/1.15 var(--display); letter-spacing: 0.03em; text-transform: uppercase; overflow-wrap: anywhere; }
.v-cap { margin: 0; max-width: 70ch; font: 380 0.9375rem/1.5 var(--body); color: var(--room-muted); }
.v-line { display: flex; flex-wrap: wrap; gap: 3px 18px; margin: 0; font: 400 0.75rem/1.5 var(--mono); letter-spacing: 0.02em; color: var(--room-muted); }
.v-line span { white-space: nowrap; }
.v-line a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.v-line a:hover { color: var(--room-ink); }
.v-status { margin: 0; font: 400 0.75rem/1.5 var(--mono); color: #f7b500; }
.v-actions { display: flex; gap: 8px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: 2px; border: 1px solid var(--room-rule); background: transparent; color: var(--room-ink);
  font: 400 0.75rem/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase;
  white-space: nowrap; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover { border-color: var(--room-muted); }
.btn[aria-pressed="true"] { background: rgba(238, 243, 247, 0.12); border-color: var(--room-muted); }
.btn.icon { width: 40px; padding: 0; flex: none; }
/* Download: the hi-vis button, as on the résumé. */
.btn.solid { background: #f7b500; color: #14100a; border-color: #f7b500; }
.btn.solid:hover { background: var(--room-ink); border-color: var(--room-ink); color: var(--room); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.icon svg { width: 18px; height: 18px; }
.viewer.zoomed .v-side { display: none; }
.viewer.bare .v-top, .viewer.bare .v-info, .viewer.bare .v-side { display: none; }
.viewer.bare .v-stage { inset: 0; }
@media (max-width: 700px) {
  .v-top { padding-right: 156px; min-height: 56px; }
  .v-stage { inset: 0 0 12px; }
  .v-side { top: calc(env(safe-area-inset-top, 0px) + 6px); translate: none; }
  .v-side.prev { left: auto; right: 104px; }
  .v-side.next { right: 56px; }
  .v-close { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 6px); right: 8px; }
  .v-info { grid-template-columns: minmax(0, 1fr); padding: 14px 16px 16px; }
  .v-actions .btn:not(.icon) { flex: 1; }
  .v-line.file { display: none; }
  .v-line.file.only { display: flex; }
  .v-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
  .v-cap { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
}

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