:root {
  color-scheme: dark;
  --bg: #131313;
  --surface: #1c1a18;
  --surface-strong: #26231f;
  --text: #f4efe8;
  --muted: #bdb2a7;
  --line: rgba(244, 239, 232, 0.16);
  --accent: #c76d43;
  --accent-strong: #e89a68;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  --max: 1160px;
  --radius: 8px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f2ec;
  --surface: #fffaf3;
  --surface-strong: #eee4d8;
  --text: #1b1917;
  --muted: #6f655d;
  --line: rgba(27, 25, 23, 0.14);
  --accent: #9e4f32;
  --accent-strong: #743822;
  --shadow: 0 20px 60px rgba(82, 59, 39, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  transition: background 180ms ease, color 180ms ease;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.13;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px);
  background-size: 6px 6px, 10px 10px;
  mix-blend-mode: overlay;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.site-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}

.site-nav a {
  min-width: 4.8rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--surface-strong);
  color: var(--text);
}

.theme-toggle,
.nav-toggle {
  min-height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle {
  min-width: 4.4rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  width: 2.6rem;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 1.1rem;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

main {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 4.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(3rem, 8vw, 7rem) 0 4rem;
}

.hero h1,
.page-hero h1,
.about-copy h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.hero h1 {
  font-size: clamp(1.85rem, 4.5vw, 3.75rem);
  line-height: 1.05;
}

.page-hero h1,
.about-copy h1 {
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  line-height: 0.98;
}

.hero-text,
.page-hero p,
.spotlight p,
.about-copy p {
  color: var(--muted);
  font-size: 1.05rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-actions,
.social-row,
.site-footer div,
.role-list,
.gallery-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fffaf3;
}

.button.secondary {
  background: var(--surface);
}

.button.ghost {
  color: var(--accent-strong);
}

.social-row {
  margin-top: 1.5rem;
  color: var(--muted);
  font-weight: 700;
}

.social-row a,
.site-footer a,
.text-link {
  border-bottom: 1px solid currentColor;
}

.hero-portrait {
  margin: 0;
}

.hero-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-portrait figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.quick-links,
.spotlight,
.page-hero,
.timeline,
.photo-grid,
.about-layout,
.contact-panel {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 1.5rem;
}

.section-heading h2,
.spotlight h2,
.contact-panel h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature-link,
.about-card,
.timeline-content,
.contact-panel form,
.external-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feature-link {
  min-height: 17rem;
  padding: 1.25rem;
}

.feature-link span,
.date {
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.feature-link h3,
.timeline-content h2,
.about-card h2 {
  margin: 0.75rem 0 0.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  line-height: 1.1;
}

.feature-link p,
.timeline-content p,
.about-card dd,
.external-card small {
  color: var(--muted);
}

.spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  border-top: 1px solid var(--line);
}

.page-hero {
  max-width: 820px;
}

.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 5rem;
  bottom: 5rem;
  left: 1rem;
  width: 2px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 1.5rem;
  margin-left: 3rem;
  padding: 1.2rem 0;
}

.timeline-marker {
  position: absolute;
  top: 2rem;
  left: -2.45rem;
  width: 0.95rem;
  height: 0.95rem;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
}

.timeline-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
}

.timeline-content {
  padding: 1.25rem;
}

.role-list {
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.role-list li {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.gallery-tools {
  padding: 0 0 1rem;
}

.filter-button {
  min-height: 2.4rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.filter-button.active,
.filter-button:hover {
  background: var(--accent);
  color: #fffaf3;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 0;
}

.photo-card {
  position: relative;
  min-height: 16rem;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.photo-card[hidden] {
  display: none;
}

.photo-card img {
  width: 100%;
  height: 100%;
  min-height: 16rem;
  object-fit: cover;
  transition: transform 220ms ease;
}

.photo-card:hover img {
  transform: scale(1.035);
}

.photo-card span {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #fffaf3;
  font-size: 0.85rem;
  font-weight: 800;
}

.external-card {
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 0.4rem;
  padding: 1.25rem;
}

.external-card span {
  position: static;
  width: fit-content;
}

.external-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  line-height: 1.05;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.86);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-height: 78vh;
  border-radius: var(--radius);
}

.lightbox p {
  color: #fffaf3;
  font-weight: 800;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: transparent;
  color: #fffaf3;
  cursor: pointer;
  font-size: 1.8rem;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2rem;
}

.about-card {
  align-self: start;
  padding: 1.25rem;
}

.about-card dl {
  margin: 0 0 1.5rem;
}

.about-card div {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.about-card dt {
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.about-card dd {
  margin: 0.25rem 0 0;
}

.contact-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  border-top: 1px solid var(--line);
}

.contact-panel form {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  padding: 0.8rem;
}

textarea {
  resize: vertical;
}

.site-footer {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.section-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.section-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: auto auto auto;
  }

  .nav-toggle {
    display: block;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .site-nav {
    position: fixed;
    inset: 4.5rem 1rem auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--radius);
    padding: 0.5rem;
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    min-width: 100%;
  }

  .theme-toggle {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .hero,
  .spotlight,
  .about-layout,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .link-grid,
  .photo-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 560px) {
  main,
  .site-footer {
    width: min(100% - 1rem, var(--max));
  }

  .site-header {
    padding: 0.8rem;
    gap: 0.5rem;
  }

  .brand {
    font-size: 1.1rem;
  }

  .theme-toggle {
    min-width: 3.8rem;
    padding-inline: 0.55rem;
  }

  .hero-actions .button,
  .contact-panel .button {
    width: 100%;
  }

  .link-grid,
  .photo-grid {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 0.5rem;
  }

  .timeline-item {
    margin-left: 2rem;
  }

  .timeline-marker {
    left: -1.95rem;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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