*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: oklch(0.968 0.014 78);
  --bg-soft: oklch(0.94 0.02 78);
  --bg-media: oklch(0.9 0.02 78);
  --ink: oklch(0.26 0.026 48);
  --ink-soft: oklch(0.34 0.022 48);
  --muted: oklch(0.47 0.02 48);
  --muted-2: oklch(0.5 0.02 48);
  --muted-3: oklch(0.55 0.015 48);
  --accent: oklch(0.52 0.088 48);
  --accent-deep: oklch(0.36 0.07 48);
  --cream: oklch(0.93 0.014 78);
  --cream-soft: oklch(0.83 0.014 78);
  --line: oklch(0.26 0.026 48 / 0.14);
  --pad-x: clamp(20px, 4vw, 44px);
  --safe-l: max(var(--pad-x), env(safe-area-inset-left));
  --safe-r: max(var(--pad-x), env(safe-area-inset-right));
  --nav-h: 66px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Jost', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: oklch(0.52 0.088 48 / 0.14);
}

a { color: var(--accent); text-decoration: none; }
::selection { background: oklch(0.86 0.06 78); }

img { max-width: 100%; }

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.page { overflow-x: hidden; }

section[id], header[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }

@media (hover: hover) {
  a:hover { color: var(--accent-deep); }
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 28px;
  padding: 15px var(--safe-r) 15px var(--safe-l);
  background: oklch(0.968 0.014 78 / 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid oklch(0.26 0.026 48 / 0.11);
}

.nav-top {
  display: contents;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'EB Garamond', serif;
  font-size: 18px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
}

.nav-brand:hover { color: var(--ink); }

.nav-brand img {
  height: 34px;
  width: auto;
  display: block;
}

.nav-toggle { display: none; }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links a { color: oklch(0.42 0.02 48); }
.nav-links a.accent { color: var(--accent); }

@media (hover: hover) {
  .nav-links a:hover { color: var(--accent); }
}

/* Hero */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.hero-copy {
  flex: 1 1 500px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 68px) clamp(48px, 7vw, 96px) var(--safe-l);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
}

.eyebrow-line {
  display: block;
  width: 44px;
  height: 1px;
  background: var(--accent);
}

.eyebrow-text {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  font-size: clamp(46px, 12vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.015em;
}

.hero-lead {
  margin: 0;
  max-width: 44ch;
  font-size: 19px;
  line-height: 1.62;
  font-weight: 300;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  padding-top: 4px;
}

.btn {
  display: inline-block;
  padding: 15px 30px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.15s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}

.btn-ghost {
  border: 1px solid oklch(0.26 0.026 48 / 0.28);
  color: var(--ink);
}

.btn-light {
  background: var(--cream);
  color: var(--ink);
}

.btn-outline-light {
  border: 1px solid oklch(0.93 0.014 78 / 0.32);
  color: var(--cream);
}

@media (hover: hover) {
  .btn-primary:hover { background: var(--accent); color: var(--bg); }
  .btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
  .btn-light:hover { background: oklch(0.78 0.08 78); color: var(--ink); }
  .btn-outline-light:hover {
    border-color: var(--cream);
    background: oklch(0.93 0.014 78 / 0.08);
    color: var(--cream);
  }
}

.hero-media {
  position: relative;
  flex: 1 1 380px;
  min-width: 0;
  min-height: 520px;
  background: var(--bg-media);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.hero-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  width: min(104%, 560px);
  height: auto;
  opacity: 0.16;
  pointer-events: none;
}

.hero-portrait {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 620px;
  object-fit: contain;
  object-position: 50% 100%;
  display: block;
}

/* Sections */
.section {
  padding: clamp(56px, 8vw, 104px) var(--safe-r) clamp(64px, 9vw, 116px) var(--safe-l);
}

.section-tight {
  padding: 0 var(--safe-r) clamp(64px, 9vw, 116px) var(--safe-l);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 34px;
}

.section-head.bordered {
  border-top: 1px solid var(--line);
  padding-top: 44px;
  padding-bottom: 30px;
}

.section h2,
.section-tight h2 {
  margin: 0;
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  font-size: clamp(34px, 8vw, 54px);
  line-height: 1.08;
}

.section-intro {
  margin: 0;
  max-width: 40ch;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 300;
  color: var(--muted);
}

.feature-shot {
  display: block;
  appearance: none;
  border: 0;
  padding: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 300px;
  background: var(--bg-media);
  overflow: hidden;
  cursor: zoom-in;
}

.feature-shot picture {
  display: block;
  width: 100%;
  height: 100%;
}

.feature-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feature-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  align-items: baseline;
  padding: 16px 0 44px;
}

.feature-caption .title {
  font-family: 'EB Garamond', serif;
  font-size: 24px;
}

.feature-caption .place {
  font-size: 14.5px;
  font-weight: 300;
  color: var(--muted-2);
}

.category {
  margin: 0 0 22px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.category.spaced { margin-top: 52px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr));
  gap: 24px;
}

.grid-work {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}

figure {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.thumb {
  display: block;
  appearance: none;
  border: 0;
  padding: 0;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--bg-media);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.thumb:active { transform: scale(0.985); }

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}

@media (hover: hover) {
  figure:hover .thumb img { transform: scale(1.03); }
}

figcaption {
  font-family: 'EB Garamond', serif;
  font-size: 19px;
}

.note {
  margin: 30px 0 0;
  font-size: 14.5px;
  font-weight: 300;
  color: var(--muted-3);
}

/* Video — source is a portrait phone recording (720x1280) */
.video-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: clamp(22px, 4vw, 52px);
  margin-bottom: 36px;
}

.video-wrap {
  height: min(70svh, 620px);
  aspect-ratio: 9 / 16;
  max-width: 100%;
  background: oklch(0.2 0.02 48);
  overflow: hidden;
}

.video-note {
  flex: 1 1 240px;
  min-width: 0;
  max-width: 40ch;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 6px;
}

.video-note-label {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.video-note p {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  font-weight: 300;
  color: var(--muted);
  text-wrap: pretty;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* About */
.about {
  background: var(--ink);
  color: var(--cream);
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.about-media {
  position: relative;
  flex: 1 1 340px;
  min-width: 0;
  min-height: 420px;
  background: oklch(0.34 0.024 48);
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-copy {
  flex: 1.2 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: clamp(52px, 7vw, 96px) clamp(20px, 5vw, 68px);
}

.about-copy h2 {
  margin: 0;
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  font-size: clamp(34px, 8vw, 52px);
  line-height: 1.1;
  color: var(--cream);
}

.quote {
  margin: 0;
  font-family: 'EB Garamond', serif;
  font-size: clamp(21px, 5.4vw, 25px);
  line-height: 1.45;
  font-style: italic;
  color: var(--cream);
  max-width: 34ch;
}

.about-copy p {
  margin: 0;
  max-width: 52ch;
  font-size: 17.5px;
  line-height: 1.72;
  font-weight: 300;
  color: var(--cream-soft);
  text-wrap: pretty;
}

/* Experience */
.experience {
  padding: clamp(64px, 9vw, 116px) var(--safe-r) clamp(64px, 9vw, 116px) var(--safe-l);
}

.experience h2 {
  margin: 0 0 12px;
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  font-size: clamp(34px, 8vw, 54px);
  line-height: 1.08;
}

.job {
  display: flex;
  flex-wrap: wrap;
  gap: 22px clamp(28px, 4vw, 52px);
  padding: 38px 0;
  border-top: 1px solid var(--line);
}

.job-meta {
  flex: 0 1 200px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.job-when {
  font-family: 'EB Garamond', serif;
  font-size: 21px;
  color: var(--accent);
}

.job-place {
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-3);
}

.job-body {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 70ch;
}

.job-body h3 {
  margin: 0;
  font-family: 'EB Garamond', serif;
  font-weight: 500;
  font-size: clamp(23px, 6vw, 27px);
}

.job-body ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.job-body li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  font-size: 16.5px;
  line-height: 1.6;
  font-weight: 300;
  color: oklch(0.38 0.022 48);
}

.job-body li span:first-child { color: var(--accent); }

/* Skills */
.skills {
  background: var(--bg-soft);
  padding: clamp(64px, 9vw, 116px) var(--safe-r) clamp(64px, 9vw, 116px) var(--safe-l);
}

.skills-inner {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(30px, 5vw, 68px);
  align-items: start;
}

.skills-intro {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skills-intro h2 {
  margin: 0;
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  font-size: clamp(34px, 8vw, 50px);
  line-height: 1.1;
}

.skills-intro p {
  margin: 0;
  max-width: 30ch;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 300;
  color: oklch(0.45 0.02 48);
  text-wrap: pretty;
}

.skills-list {
  flex: 2 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.skill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  justify-content: space-between;
  align-items: baseline;
  padding: 17px 0;
  border-bottom: 1px solid oklch(0.26 0.026 48 / 0.16);
}

.skill-name {
  font-family: 'EB Garamond', serif;
  font-size: 24px;
  color: var(--ink);
}

.skill-detail {
  font-size: 15.5px;
  font-weight: 300;
  color: var(--muted);
}

/* Contact */
.contact {
  background: var(--ink);
  color: var(--cream);
  padding: clamp(72px, 10vw, 128px) var(--safe-r) 64px var(--safe-l);
}

.contact-inner {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}

.contact-copy {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.contact-copy h2 {
  margin: 0;
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  font-size: clamp(34px, 8.6vw, 62px);
  line-height: 1.08;
  max-width: 18ch;
  color: var(--cream);
}

.contact-copy p {
  margin: 0;
  max-width: 46ch;
  font-size: 18px;
  line-height: 1.7;
  font-weight: 300;
  color: var(--cream-soft);
  text-wrap: pretty;
}

.contact-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

.contact-cta .btn { padding: 16px 32px; }

.contact-list {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: oklch(0.93 0.014 78 / 0.2);
  border-top: 1px solid oklch(0.93 0.014 78 / 0.2);
}

.contact-row {
  background: var(--ink);
  padding: 18px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  align-items: baseline;
  color: var(--cream);
}

a.contact-row:hover { color: var(--cream); }

.contact-label {
  flex: 0 0 108px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: oklch(0.72 0.075 78);
}

.contact-value {
  flex: 1 1 180px;
  min-width: 0;
  font-family: 'EB Garamond', serif;
  font-size: 20px;
  overflow-wrap: break-word;
}

.site-footer {
  margin-top: clamp(48px, 8vw, 96px);
  padding-top: 26px;
  border-top: 1px solid oklch(0.93 0.014 78 / 0.16);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 300;
  color: oklch(0.7 0.014 78);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand img {
  height: 46px;
  width: auto;
  display: block;
}

/* Sticky contact bar — phones only, shown after the hero */
.mobile-bar {
  display: none;
  position: fixed;
  z-index: 45;
  left: 0;
  right: 0;
  bottom: 0;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: oklch(0.968 0.014 78 / 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid oklch(0.26 0.026 48 / 0.12);
  transform: translateY(110%);
  transition: transform 0.35s ease;
}

.mobile-bar[data-visible="true"] { transform: translateY(0); }

.mobile-bar-btn {
  flex: 1 1 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid oklch(0.26 0.026 48 / 0.28);
  color: var(--ink);
  transition: transform 0.15s ease;
}

.mobile-bar-btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.mobile-bar-btn:active { transform: scale(0.98); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: oklch(0.16 0.014 48);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

.lightbox-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: max(14px, env(safe-area-inset-top)) clamp(14px, 3vw, 30px) 14px;
  border-bottom: 1px solid oklch(0.93 0.014 78 / 0.14);
}

.lightbox-group {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: oklch(0.78 0.075 78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox-count {
  flex: 0 0 auto;
  font-family: 'EB Garamond', serif;
  font-size: 17px;
  color: var(--cream-soft);
  font-variant-numeric: tabular-nums;
}

.lightbox-close {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid oklch(0.93 0.014 78 / 0.28);
  background: none;
  color: var(--cream);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lightbox-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2vw, 26px);
  /* Keeps a zoomed photo from spilling over the caption and rail */
  overflow: hidden;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  opacity: 1;
  transform: none;
  transition: opacity 0.3s ease, transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1);
  cursor: zoom-in;
  touch-action: manipulation;
}

/* Set while the element is repositioned for the next slide */
.lightbox-stage img.no-anim { transition: none; }

.lightbox-stage img.is-loading { opacity: 0; }

.lightbox-stage img.slide-left { opacity: 0; transform: translateX(-34px); }
.lightbox-stage img.slide-right { opacity: 0; transform: translateX(34px); }

.lightbox-stage img.is-zoomed {
  transform: scale(2);
  cursor: zoom-out;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Entrance */
.lightbox.is-open .lightbox-head { animation: lb-head 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.lightbox.is-open .lightbox-stage { animation: lb-stage 0.44s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.lightbox.is-open .lightbox-foot { animation: lb-foot 0.44s cubic-bezier(0.22, 0.61, 0.36, 1) 0.04s both; }

@keyframes lb-head {
  from { opacity: 0; transform: translateY(-12px); }
}

@keyframes lb-stage {
  from { opacity: 0; transform: scale(0.94); }
}

@keyframes lb-foot {
  from { opacity: 0; transform: translateY(16px); }
}

/* First-open hint, touch only */
.lightbox-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 15px;
  background: oklch(0.16 0.014 48 / 0.82);
  border: 1px solid oklch(0.93 0.014 78 / 0.2);
  color: var(--cream-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.lightbox-hint[data-visible="true"] { opacity: 1; }

.lightbox-spinner {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 2px solid oklch(0.93 0.014 78 / 0.24);
  border-top-color: var(--cream);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.lightbox[data-loading="true"] .lightbox-spinner {
  opacity: 1;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  appearance: none;
  border: 1px solid oklch(0.93 0.014 78 / 0.28);
  background: oklch(0.16 0.014 48 / 0.6);
  color: var(--cream);
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  line-height: 1;
  padding-bottom: 4px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lightbox-nav.prev { left: clamp(8px, 2vw, 22px); }
.lightbox-nav.next { right: clamp(8px, 2vw, 22px); }
.lightbox-nav[hidden] { display: none; }

.lightbox-foot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px clamp(14px, 3vw, 30px) max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid oklch(0.93 0.014 78 / 0.14);
}

.lightbox-caption {
  margin: 0;
  font-family: 'EB Garamond', serif;
  font-size: 20px;
  line-height: 1.35;
  color: var(--cream);
  text-align: center;
}

/* Thumbnail rail — only the photos of the open category */
.lightbox-rail {
  display: flex;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.lightbox-rail::-webkit-scrollbar { display: none; }
.lightbox-rail[hidden] { display: none; }

.lightbox-rail button {
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  padding: 0;
  width: 54px;
  height: 68px;
  background: oklch(0.3 0.02 48);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.45;
  outline: 2px solid transparent;
  outline-offset: -2px;
  scroll-snap-align: center;
  transition: opacity 0.2s ease, outline-color 0.2s ease;
}

.lightbox-rail button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightbox-rail button[aria-current="true"] {
  opacity: 1;
  outline-color: oklch(0.86 0.06 78);
}

@media (hover: hover) {
  .lightbox-close:hover,
  .lightbox-nav:hover {
    background: oklch(0.28 0.02 48);
    border-color: var(--cream);
  }

  .lightbox-rail button:hover { opacity: 0.85; }
}

body.no-scroll {
  overflow: hidden;
}

/* Motion */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-copy > * {
  animation: rise 0.7s ease both;
}

.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.15s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.25s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.35s; }

.hero-portrait {
  animation: rise 0.9s ease 0.2s both;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Tablet
   ============================================ */
@media (max-width: 1000px) {
  .hero-media { min-height: 460px; }
  .about-media { min-height: 380px; }
}

/* ============================================
   Phones
   ============================================ */
@media (max-width: 760px) {
  :root { --nav-h: 60px; }

  /* Collapsible nav */
  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 var(--safe-r) 0 var(--safe-l);
  }

  /* Burger left, brand optically centred: the outer columns balance each other */
  .nav-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    min-height: var(--nav-h);
  }

  .nav-brand {
    grid-column: 2;
    justify-self: center;
    gap: 10px;
    font-size: 13.5px;
    letter-spacing: 0.03em;
    white-space: nowrap;
  }

  .nav-brand img { height: 26px; }

  .nav-toggle {
    grid-column: 1;
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 9px;
    appearance: none;
    border: 0;
    background: none;
    padding: 12px 14px 12px 0;
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
  }

  /* The label would crowd the centred brand */
  .nav-toggle-label { display: none; }

  .nav-toggle-bars {
    position: relative;
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    transition: background 0.18s ease 0.08s;
  }

  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    content: '';
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: var(--ink);
    transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1), top 0.24s cubic-bezier(0.32, 0.72, 0, 1) 0.1s;
  }

  .nav-toggle-bars::before { top: -7px; }
  .nav-toggle-bars::after { top: 7px; }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bars {
    background: transparent;
    transition: background 0.12s ease;
  }

  /* Opening: bars slide together first, then cross */
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before,
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
    top: 0;
    transition: top 0.16s cubic-bezier(0.32, 0.72, 0, 1), transform 0.32s cubic-bezier(0.32, 0.72, 0, 1) 0.12s;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: rotate(-45deg); }

  .nav-links {
    flex-direction: column;
    /* A wrapping column would break the links into columns while collapsed */
    flex-wrap: nowrap;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    padding-bottom: 10px;
    font-size: 14px;
    letter-spacing: 0.12em;
    /* Closing: quick, accelerating collapse */
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.9, 0.35);
  }

  .nav[data-open="true"] .nav-links {
    /* Opening: longer, decelerating expand */
    transition: max-height 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .nav-links a {
    flex: 0 0 auto;
    padding: 15px 2px;
    border-top: 1px solid var(--line);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.16s ease, transform 0.2s cubic-bezier(0.4, 0, 0.9, 0.35);
  }

  .nav[data-open="true"] .nav-links a {
    opacity: 1;
    transform: none;
    transition: opacity 0.3s ease, transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  /* Stagger in on the way down; leave together on the way up */
  .nav[data-open="true"] .nav-links a:nth-child(1) { transition-delay: 0.04s; }
  .nav[data-open="true"] .nav-links a:nth-child(2) { transition-delay: 0.08s; }
  .nav[data-open="true"] .nav-links a:nth-child(3) { transition-delay: 0.12s; }
  .nav[data-open="true"] .nav-links a:nth-child(4) { transition-delay: 0.16s; }
  .nav[data-open="true"] .nav-links a:nth-child(5) { transition-delay: 0.2s; }

  /* Hero */
  .hero-copy {
    gap: 22px;
    padding: 40px var(--safe-r) 40px var(--safe-l);
  }

  .eyebrow-line { width: 30px; }
  .eyebrow-text { font-size: 11px; letter-spacing: 0.18em; }

  .hero-lead { font-size: 17px; line-height: 1.58; }

  .cta-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cta-row .btn {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    text-align: center;
  }

  .hero-media {
    min-height: 0;
    height: min(62svh, 460px);
  }

  .hero-portrait { max-height: none; }
  .hero-watermark { width: min(120%, 420px); }

  /* Section rhythm */
  .section-head { padding-bottom: 24px; gap: 12px; }
  .section-head.bordered { padding-top: 36px; padding-bottom: 22px; }
  .section-intro { font-size: 15px; }

  /* Feature photo is portrait — don't crop it into a strip */
  .feature-shot {
    aspect-ratio: 4 / 5;
    min-height: 0;
  }

  .feature-caption { padding: 14px 0 34px; gap: 4px 18px; }
  .feature-caption .title { font-size: 21px; }
  .feature-caption .place { font-size: 13.5px; }

  .category { margin-bottom: 16px; font-size: 11.5px; letter-spacing: 0.14em; }
  .category.spaced { margin-top: 40px; }

  /* Two-up gallery keeps the page scannable */
  .grid,
  .grid-work {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }

  figure { gap: 8px; }
  figcaption { font-size: 15px; line-height: 1.32; }
  .note { margin-top: 24px; font-size: 13.5px; }

  /* Video */
  .video-row {
    gap: 16px;
    margin-bottom: 28px;
  }

  .video-wrap {
    width: 100%;
    height: auto;
  }

  .video-note {
    flex: 1 1 100%;
    max-width: none;
    padding-bottom: 0;
    gap: 8px;
  }

  .video-note-label { font-size: 11px; }
  .video-note p { font-size: 15.5px; }

  /* About */
  .about-media { min-height: 0; aspect-ratio: 4 / 5; }
  .about-copy { gap: 20px; padding: 44px var(--safe-r) 48px var(--safe-l); }
  .about-copy p { font-size: 16.5px; line-height: 1.68; }

  /* Experience */
  .job { gap: 14px; padding: 28px 0; }

  .job-meta {
    flex: 1 1 100%;
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
  }

  .job-when { font-size: 18px; }
  .job-place { font-size: 11.5px; }
  .job-body { flex: 1 1 100%; gap: 12px; }
  .job-body li { font-size: 15.5px; grid-template-columns: 14px 1fr; gap: 8px; }

  /* Skills */
  .skill-row {
    flex-direction: column;
    gap: 3px;
    padding: 14px 0;
  }

  .skill-name { font-size: 20px; }
  .skill-detail { font-size: 14.5px; }

  /* Contact */
  .contact-copy { gap: 20px; }
  .contact-copy p { font-size: 16.5px; }

  .contact-cta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .contact-cta .btn {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
  }

  .contact-row {
    flex-direction: column;
    gap: 2px;
    padding: 14px 0;
  }

  .contact-label { flex: none; }
  .contact-value { flex: none; font-size: 18px; }

  .site-footer {
    flex-direction: column;
    gap: 10px;
    font-size: 12.5px;
  }

  .footer-brand img { height: 38px; }

  /* Room for the sticky action bar */
  .contact { padding-bottom: 96px; }

  .mobile-bar { display: flex; }

  /* Lightbox */
  .lightbox-head { gap: 12px; padding-bottom: 12px; }
  .lightbox-group { font-size: 10.5px; letter-spacing: 0.14em; }
  .lightbox-count { font-size: 15px; }
  .lightbox-close { width: 38px; height: 38px; font-size: 13px; }

  .lightbox-stage { padding: 8px; }

  .lightbox-nav {
    width: 36px;
    height: 36px;
    font-size: 24px;
    background: oklch(0.16 0.014 48 / 0.45);
  }

  .lightbox-foot { gap: 10px; padding-top: 12px; }
  .lightbox-caption { font-size: 17px; }
  .lightbox-rail button { width: 46px; height: 58px; }

  /* A little more travel reads better on a small screen */
  .lightbox-stage img.slide-left { transform: translateX(-26vw); }
  .lightbox-stage img.slide-right { transform: translateX(26vw); }
  .lightbox-stage img.is-zoomed { transform: scale(2.4); }

  .lightbox-hint { font-size: 10px; letter-spacing: 0.06em; padding: 7px 12px; }

  .reveal { transform: translateY(14px); }
}

@media (max-width: 380px) {
  .nav-toggle-label { display: none; }
  .grid, .grid-work { gap: 14px 10px; }
  figcaption { font-size: 14px; }
  .hero h1 { font-size: 42px; }
}

/* Landscape phones: keep the hero from eating the screen */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 520px) {
  .hero-media { height: 78svh; }

  /* Let the 9:16 player derive its width from the available height */
  .video-wrap {
    height: 86svh;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy > *,
  .hero-portrait {
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .thumb img,
  .nav-links,
  .nav-links a,
  .mobile-bar,
  .lightbox,
  .lightbox-stage img {
    transition: none;
  }

  .lightbox.is-open .lightbox-head,
  .lightbox.is-open .lightbox-stage,
  .lightbox.is-open .lightbox-foot,
  .lightbox[data-loading="true"] .lightbox-spinner {
    animation: none;
  }

  figure:hover .thumb img { transform: none; }
}
