:root {
  color-scheme: light dark;
  --bg: #fbfaf6;
  --panel: #ffffff;
  --text: #171a17;
  --muted: #5d665f;
  --quiet: #7d867f;
  --line: #d9ddd6;
  --strong-line: #bfc7be;
  --accent: #395d46;
  --accent-2: #a45535;
  --shadow: 0 18px 50px rgb(32 34 30 / 10%);
  --focus: #b85f37;
  --max: 1120px;
  --space: clamp(1rem, 2.6vw, 2rem);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

:root[data-theme="dark"] {
  --bg: #111411;
  --panel: #181d19;
  --text: #f3f0e8;
  --muted: #b7beb6;
  --quiet: #939c93;
  --line: #2f382f;
  --strong-line: #536052;
  --accent: #9fbea7;
  --accent-2: #d38a62;
  --shadow: 0 18px 50px rgb(0 0 0 / 24%);
  --focus: #e29a72;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111411;
    --panel: #181d19;
    --text: #f3f0e8;
    --muted: #b7beb6;
    --quiet: #939c93;
    --line: #2f382f;
    --strong-line: #536052;
    --accent: #9fbea7;
    --accent-2: #d38a62;
    --shadow: 0 18px 50px rgb(0 0 0 / 24%);
    --focus: #e29a72;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--line) 38%, transparent) 1px, transparent 1px),
    linear-gradient(0deg, color-mix(in srgb, var(--line) 28%, transparent) 1px, transparent 1px),
    var(--bg);
  background-size: 72px 72px;
  color: var(--text);
  text-rendering: optimizeLegibility;
}

body.gallery-page {
  --bg: #080908;
  --panel: #0f110f;
  --text: #f4f1e8;
  --muted: #c0c6be;
  --quiet: #8f968e;
  --line: #232a24;
  --strong-line: #3a453b;
  --accent: #b6c8af;
  --accent-2: #d8a06e;
  background:
    radial-gradient(120% 70% at 50% 0%, rgb(255 255 255 / 5%), transparent 58%),
    #080908;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 38%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  inset-block-start: 0.75rem;
  inset-inline-start: 0.75rem;
  z-index: 20;
  transform: translateY(-150%);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 0.7rem 0.9rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-footer,
.page-shell {
  width: min(calc(100% - 2 * var(--space)), var(--max));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.2rem;
}

.brand {
  font-weight: 740;
  letter-spacing: 0;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.35rem);
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 680;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  color: var(--text);
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.theme-toggle::before {
  content: "";
  width: 0.66rem;
  height: 0.66rem;
  border-radius: 999px;
  background: var(--accent-2);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  margin-top: clamp(3rem, 9vw, 7rem);
  padding-block: 1.4rem 2rem;
  color: var(--quiet);
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.gateway {
  min-height: 100svh;
  display: grid;
  align-content: center;
  width: min(calc(100% - 2 * var(--space)), 1180px);
  margin-inline: auto;
  padding-block: clamp(2rem, 7vw, 4.5rem);
}

.gateway-main {
  display: grid;
  gap: clamp(2rem, 7vw, 5.5rem);
}

.gateway-name {
  margin: 0;
  font-size: clamp(2.55rem, 10vw, 8.4rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-wrap: balance;
}

.gateway-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.gateway-option {
  display: grid;
  min-height: clamp(12rem, 32vw, 22rem);
  align-content: end;
  gap: 1.25rem;
  padding: clamp(1.2rem, 4vw, 2.6rem);
  text-decoration: none;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.gateway-option + .gateway-option {
  border-inline-start: 1px solid var(--line);
}

.gateway-option:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.gateway-option span:first-child {
  max-width: 11ch;
  font-size: clamp(2.2rem, 6vw, 5.8rem);
  line-height: 0.98;
  font-weight: 760;
  letter-spacing: 0;
}

.gateway-option span:last-child,
.section-kicker,
.timeline-date {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gateway-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(1.2rem, 4vw, 2.5rem);
  color: var(--quiet);
  font-size: 0.92rem;
}

.page-shell {
  padding-block: clamp(3rem, 9vw, 7rem) 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(16rem, 0.55fr);
  gap: clamp(2rem, 7vw, 5rem);
  align-items: end;
  border-block: 1px solid var(--line);
  padding-block: clamp(3rem, 8vw, 6rem);
}

.hero h1,
.photo-hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 6.6rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero p,
.photo-hero p {
  margin: 1.25rem 0 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-aside {
  display: grid;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-list,
.writing-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list a,
.writing-list a,
.photo-links a {
  display: inline-flex;
  width: fit-content;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  padding-block: clamp(3rem, 7vw, 5rem);
}

.section {
  content-visibility: auto;
  contain-intrinsic-block-size: 420px;
}

.section + .section {
  margin-top: clamp(2.25rem, 6vw, 4rem);
}

.section h2 {
  margin: 0.35rem 0 1rem;
  font-size: clamp(1.35rem, 3vw, 2.05rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.section p {
  color: var(--muted);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip-list li {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  padding: 0.45rem 0.65rem;
  font-size: 0.92rem;
  font-weight: 650;
}

.principles {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.principles li {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 1.35rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1.2rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.timeline-item h3 {
  margin: 0 0 0.4rem;
  font-size: 1.06rem;
  letter-spacing: 0;
}

.timeline-item p {
  margin: 0;
}

.writing-list li {
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.photo-hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: clamp(42rem, 86svh, 58rem);
  margin-inline: auto;
  padding-block: clamp(3rem, 9vw, 7rem) clamp(2.5rem, 7vw, 5rem);
  overflow: clip;
}

.photo-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.photo-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.photo-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 78%) 0%, rgb(0 0 0 / 58%) 42%, rgb(0 0 0 / 26%) 100%),
    linear-gradient(180deg, rgb(0 0 0 / 58%) 0%, transparent 24%, rgb(0 0 0 / 72%) 100%);
}

.photo-hero-inner {
  width: min(calc(100% - 2 * var(--space)), 1040px);
  min-height: clamp(28rem, 58svh, 42rem);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(14rem, 0.38fr);
  gap: clamp(2rem, 7vw, 5rem);
  align-items: end;
  border-block: 1px solid rgb(255 255 255 / 18%);
  padding-block: clamp(2.6rem, 7vw, 5rem);
}

.photo-hero h1 {
  max-width: 12ch;
  font-size: clamp(2.6rem, 7vw, 5.9rem);
  font-weight: 760;
  line-height: 0.98;
}

.gallery-page .section-kicker {
  color: color-mix(in srgb, var(--accent) 74%, var(--text));
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.photo-links {
  display: grid;
  gap: 0.7rem;
  color: rgb(255 253 245 / 82%);
}

.photo-stack {
  width: 100%;
  margin-inline: auto;
  padding-block-start: clamp(0.45rem, 1.3vw, 0.9rem);
  display: grid;
  gap: clamp(0.45rem, 1.3vw, 0.9rem);
}

.photo-item {
  position: relative;
  margin: 0;
  overflow: clip;
  background: var(--panel);
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 600ms ease,
    transform 600ms ease;
}

.photo-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.photo-item img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 800ms ease;
}

.photo-item.portrait img {
  aspect-ratio: 45 / 32;
}

.photo-note {
  position: absolute;
  display: grid;
  gap: 0.35rem;
  max-width: min(22rem, calc(100% - 2rem));
  padding: clamp(0.85rem, 2vw, 1.15rem);
  color: #fffdf5;
  text-shadow: 0 1px 16px rgb(0 0 0 / 80%);
}

.photo-note::before {
  content: "";
  position: absolute;
  inset: -1.5rem;
  z-index: -1;
  background: radial-gradient(closest-side, rgb(0 0 0 / 54%), transparent 72%);
}

.photo-note.top-left {
  inset-block-start: clamp(0.8rem, 3vw, 2rem);
  inset-inline-start: clamp(0.8rem, 3vw, 2rem);
}

.photo-note.top-right {
  inset-block-start: clamp(0.8rem, 3vw, 2rem);
  inset-inline-end: clamp(0.8rem, 3vw, 2rem);
  text-align: end;
}

.photo-note.bottom-left {
  inset-block-end: clamp(0.8rem, 3vw, 2rem);
  inset-inline-start: clamp(0.8rem, 3vw, 2rem);
}

.photo-note.bottom-right {
  inset-block-end: clamp(0.8rem, 3vw, 2rem);
  inset-inline-end: clamp(0.8rem, 3vw, 2rem);
  text-align: end;
}

.photo-note strong {
  font-family: Georgia, ui-serif, serif;
  font-size: clamp(1.3rem, 3vw, 2.3rem);
  line-height: 1;
  letter-spacing: 0;
}

.photo-note span {
  max-width: 26ch;
  color: rgb(255 253 245 / 82%);
  font-size: clamp(0.86rem, 1.4vw, 1rem);
}

.photo-item:hover img {
  transform: scale(1.015);
}

@media (max-width: 840px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .gateway-options,
  .hero,
  .content-grid,
  .photo-hero-inner {
    grid-template-columns: 1fr;
  }

  .gateway-option + .gateway-option {
    border-inline-start: 0;
    border-block-start: 1px solid var(--line);
  }

  .gateway-option {
    min-height: 11rem;
  }

  .hero {
    align-items: start;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .photo-hero-inner {
    align-items: start;
    min-height: clamp(34rem, 72svh, 44rem);
  }
}

@media (max-width: 520px) {
  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .theme-toggle {
    padding-inline: 0.65rem;
  }

  .photo-stack {
    width: calc(100% - 2rem);
  }

  .photo-note {
    max-width: calc(100% - 1rem);
    padding: 0.75rem;
  }

  .photo-note strong {
    font-size: 1.25rem;
  }

  .photo-note span {
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }

  .photo-item {
    opacity: 1;
    transform: none;
  }
}
