:root {
  --bg: #ece9de;
  --paper: #f8f8f8;
  --ink: #11131a;
  --muted: #c9c5ae;
  --line: #d7d3bf;
  --header-bg: #d7d3bf;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  color: var(--ink);
  background: var(--bg);
}

body.legal-page {
  background: var(--header-bg);
}

.page-shell {
  width: min(980px, calc(100vw - 40px));
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-left: 1px solid #d4d0be;
  border-right: 1px solid #d4d0be;
}

.page-shell > main {
  flex: 1 0 auto;
}

.site-header {
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-strip {
  height: 34px;
  background: var(--header-bg);
}

.header-row {
  height: 92px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3.2rem;
  background: var(--header-bg);
  padding: 0 2rem;
  position: relative;
}

.brand {
  font-size: clamp(1.7rem, 1.7vw, 2rem);
  font-weight: 500;
  text-decoration: none;
  color: #111;
}

.site-nav {
  display: flex;
  gap: clamp(1.6rem, 2.2vw, 2.8rem);
}

.site-nav a {
  text-decoration: none;
  font-size: clamp(1.35rem, 1.3vw, 1.55rem);
  color: rgba(17, 17, 17, 0.5);
  font-weight: 600;
}

.site-nav a.active {
  color: #111;
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 0.2rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
}

.section {
  width: min(1080px, 92%);
  margin: 0 auto;
  padding: 2.2rem 0;
}

.home-screen {
  min-height: 690px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.home-image {
  width: min(630px, 90vw);
  aspect-ratio: 395 / 353;
  overflow: hidden;
}

.home-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.home-screen h1 {
  margin: 0;
  font-size: clamp(2.205rem, 2.565vw, 2.655rem);
  letter-spacing: 0.01em;
  font-weight: 700;
  color: var(--muted);
}

.content-page h1 {
  margin: 0 0 1.4rem;
  font-size: clamp(2.2rem, 2.4vw, 3rem);
}

.content-page p {
  font-size: 1.06rem;
  line-height: 1.33;
  margin: 0 0 1rem;
}

.lang-toggle {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 0 0 0.8rem;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: rgba(17, 17, 17, 0.5);
  font-family: inherit;
  font-size: 1rem;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.lang-btn.active {
  color: #1b2030;
  font-weight: 600;
  text-decoration: none;
}

.is-hidden {
  display: none;
}

.vita-layout {
  display: block;
}

.vita-hero {
  width: 100%;
  height: clamp(155px, 18vw, 195px);
  overflow: hidden;
  margin: 0 0 0;
}

.vita-hero img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 85%;
}

.vita-text {
  max-width: 660px;
  margin: 0 auto;
}

.project-list {
  display: grid;
  gap: 1.25rem;
}

.project-card {
  border: 2px solid var(--line);
  border-radius: 28px;
  background: transparent;
  overflow: hidden;
}

.project-card summary {
  padding: 1.15rem 1.5rem 0.7rem;
  cursor: pointer;
  font-size: 1.55rem;
  list-style: none;
}

.project-card summary::-webkit-details-marker {
  display: none;
}

.project-card summary::marker {
  content: "";
}

.project-card p {
  padding: 0 1.5rem 1.35rem;
  margin: 0;
  line-height: 1.4;
}

.media-section-heading {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 0.8rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.3rem;
}

.media-section-heading:first-of-type {
  margin-top: 0.5rem;
}

.media-submenu {
  display: flex;
  gap: 0.8rem;
  margin: 0.3rem 0 1.3rem;
  flex-wrap: wrap;
}

.media-submenu-link {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: #1b2030;
  background: #fff;
  padding: 0.45rem 0.8rem;
  font-size: 1rem;
}

.media-submenu-link.active,
.media-submenu-link:hover,
.media-submenu-link:focus-visible {
  background: var(--header-bg);
}

.media-hub-grid {
  grid-template-columns: repeat(2, 1fr);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.media-card {
  border: 1px solid var(--line);
  padding: 1rem;
  background: #fff;
}

.media-card h2 {
  margin: 0 0 0.6rem;
  font-size: 1.7rem;
}

.video-list {
  display: grid;
  gap: 1rem;
  margin-top: 0.8rem;
}

.video-list-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
}

.video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.va-section {
  margin-bottom: 2rem;
}

.audio-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.audio-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 30px;
  padding: 0.35rem 0.6rem;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: #ece8d8;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
}

.audio-row:hover,
.audio-row:focus-visible {
  background: #e4dfcb;
}

.audio-arrow {
  font-size: 1.3rem;
  color: #8c8366;
  line-height: 1;
}

.media-intro {
  margin: 0 0 1.2rem;
  color: var(--ink);
}

/* Photo gallery */
.photo-slider {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
}

.slider-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #e8e4d8;
  overflow: hidden;
  border: 1px solid var(--line);
}

#slider-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.slider-nav {
  border: 0;
  background: rgba(17, 19, 26, 0.08);
  color: #1b2030;
  font-size: 2.2rem;
  line-height: 1;
  width: 2.2rem;
  height: 3rem;
  cursor: pointer;
}

.slider-nav:hover {
  background: rgba(17, 19, 26, 0.15);
}

.slider-credit {
  grid-column: 1 / -1;
  margin: 0.1rem 0 0;
  font-size: 0.92rem;
  color: #313643;
  text-align: center;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
  margin-bottom: 2rem;
}

.gallery-item {
  margin: 0;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  background: #e8e4d8;
  aspect-ratio: 3 / 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item.is-active {
  outline: 2px solid #1b2030;
  outline-offset: -2px;
}

.gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(17, 19, 26, 0.65);
  color: #fff;
  font-size: 0.72rem;
  padding: 0.25rem 0.45rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-item:hover figcaption,
.gallery-item:focus figcaption {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 14, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox[hidden] {
  display: none;
}

.lb-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

#lb-img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  display: block;
}

.lb-credit {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin: 0;
  text-align: center;
}

.lb-close {
  position: fixed;
  top: 1rem;
  right: 1.4rem;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  padding: 0.2rem 0.5rem;
}

.lb-close:hover { opacity: 1; }

.lb-prev,
.lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 3.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  padding: 0.5rem 1rem;
  user-select: none;
}

.lb-prev { left: 0.5rem; }
.lb-next { right: 0.5rem; }
.lb-prev:hover, .lb-next:hover { opacity: 1; }

/* old table credits (kept for compat) */
.photo-credits-label {
  margin: 1rem 0 0.3rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.photo-credits {
  border-collapse: collapse;
  font-size: 0.95rem;
}

.photo-credits td {
  padding: 0.15rem 0.6rem 0.15rem 0;
  vertical-align: top;
}

.credit-key {
  font-weight: 600;
  min-width: 1.5rem;
}

.contact-card {
  border: 3px solid #cdc8b0;
  border-radius: 36px;
  padding: 1.75rem 1.35rem 1.55rem;
  background: transparent;
  width: min(560px, 100%);
  margin: 1rem auto 0;
  text-align: center;
}

.contact-card p {
  margin: 0 0 0.95rem;
  font-size: clamp(1.28rem, 1.75vw, 1.68rem);
  line-height: 1.2;
}

.contact-card a {
  color: #111;
  text-decoration: none;
}

.contact-card .contact-name {
  font-size: clamp(1.52rem, 2.1vw, 1.98rem);
  margin-bottom: 1.05rem;
}

.contact-card .contact-locations {
  margin-bottom: 0;
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 4rem;
  padding: 0.8rem 1rem 2.2rem;
  background: var(--paper);
  margin-top: auto;
}

.site-footer a {
  color: #1b2030;
  text-decoration: none;
  font-size: 1.08rem;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .page-shell {
    width: 100%;
    border-left: 0;
    border-right: 0;
  }

  .photo-slider {
    display: block;
    position: relative;
  }

  .slider-prev,
  .slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 2rem;
    height: 2.6rem;
    font-size: 1.6rem;
  }

  .slider-prev { left: 0.3rem; }
  .slider-next { right: 0.3rem; }

  .slider-credit {
    margin-top: 0.3rem;
  }

  .header-row {
    justify-content: space-between;
    height: auto;
    padding: 1rem 1.2rem;
    gap: 1rem;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0.8rem;
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    padding: 0.8rem 1.2rem 1rem;
    z-index: 5;
  }

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

  .site-nav a {
    font-size: 1.2rem;
  }

  .nav-toggle {
    display: inline-block;
  }

  .brand {
    font-size: 1.35rem;
  }

  .vita-hero {
    height: 148px;
  }

  .vita-hero img {
    object-position: 50% 85%;
  }

  .home-screen {
    min-height: 520px;
  }

  .home-screen h1 {
    font-size: clamp(1.35rem, 5.9vw, 2.05rem);
    text-align: center;
  }

  .vita-layout {
    display: block;
  }

  .media-grid {
    grid-template-columns: 1fr;
  }

  .video-list-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    border-radius: 28px;
    padding: 1.35rem 0.9rem 1.1rem;
  }

  .contact-card p {
    font-size: clamp(1.02rem, 4.9vw, 1.35rem);
    margin-bottom: 0.8rem;
  }

  .contact-card .contact-name {
    font-size: clamp(1.2rem, 5.6vw, 1.58rem);
  }
}
