@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --bg: #efe9df;
  --bg-deep: #e5ddcf;
  --surface: rgba(255, 255, 255, 0.95);
  --surface-solid: #fcf8f1;
  --surface-alt: #f3ede2;
  --ink: #171310;
  --muted: #5f564f;
  --line: #d4c8b8;
  --line-strong: #bea98b;
  --accent: #8b6b43;
  --accent-strong: #6f5332;
  --accent-soft: rgba(139, 107, 67, 0.14);
  --focus: #2f618e;
  --radius: 22px;
  --shadow-soft: 0 14px 34px rgba(30, 22, 14, 0.08);
  --shadow: 0 24px 56px rgba(28, 20, 12, 0.14);
}

[data-theme="dark"] {
  --bg: #15120f;
  --bg-deep: #100d0a;
  --surface: rgba(35, 30, 25, 0.92);
  --surface-solid: #211c17;
  --surface-alt: #2a2420;
  --ink: #ece4d6;
  --muted: #b1a89d;
  --line: #41392f;
  --line-strong: #675a49;
  --accent: #c9a36e;
  --accent-strong: #d7b889;
  --accent-soft: rgba(201, 163, 110, 0.18);
  --focus: #75a8d9;
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.3);
  --shadow: 0 24px 56px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

:root:not([data-theme="dark"]) body {
  background: radial-gradient(150% 86% at 50% -20%, #ffffff 0%, #f8f3e9 42%, var(--bg) 72%, var(--bg-deep) 100%);
}

[data-theme="dark"] body {
  background: radial-gradient(150% 86% at 50% -20%, #221d18 0%, #191612 45%, var(--bg) 72%, var(--bg-deep) 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image: radial-gradient(rgba(120, 98, 68, 0.2) 0.45px, transparent 0.45px), linear-gradient(180deg, rgba(120, 98, 68, 0.07), rgba(120, 98, 68, 0));
  background-size: 3px 3px, 100% 100%;
}

[data-theme="dark"] body::before {
  opacity: 0.14;
  background-image: radial-gradient(rgba(248, 222, 181, 0.2) 0.45px, transparent 0.45px), linear-gradient(180deg, rgba(248, 222, 181, 0.08), rgba(248, 222, 181, 0));
}

a {
  color: var(--ink);
  text-decoration-color: rgba(22, 20, 19, 0.35);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--ink);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  left: 10px;
  top: -60px;
  background: #fff;
  color: #000;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  z-index: 1000;
}

.skip-link:focus {
  top: 10px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 8px 14px 9px;
  background: linear-gradient(180deg, rgba(244, 239, 232, 0.95), rgba(241, 234, 224, 0.78));
  backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid rgba(97, 84, 69, 0.24);
}

[data-theme="dark"] .site-header {
  background: linear-gradient(180deg, rgba(20, 18, 16, 0.95), rgba(20, 18, 16, 0.78));
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.nav-wrap {
  max-width: 1460px;
  margin: 0 auto;
  padding: 11px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(120, 100, 73, 0.3);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(245, 238, 227, 0.9));
  box-shadow: 0 10px 30px rgba(34, 26, 16, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .nav-wrap {
  background: linear-gradient(145deg, rgba(36, 31, 26, 0.96), rgba(29, 25, 20, 0.93));
  border-color: rgba(154, 126, 92, 0.34);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  flex: 0 1 auto;
  min-width: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fdfcf9;
  background: radial-gradient(120% 120% at 20% 18%, #ae8c62 0%, #8f6d44 42%, #6a4f31 100%);
  border: 1px solid rgba(71, 52, 30, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44), 0 8px 18px rgba(71, 50, 25, 0.3);
}

[data-theme="dark"] .brand-mark {
  background: radial-gradient(120% 120% at 20% 18%, #d5b482 0%, #b78f5d 42%, #8f6e49 100%);
  border-color: rgba(227, 194, 145, 0.35);
  color: #13100e;
}

.brand-crest {
  width: 32px;
  height: 32px;
  display: block;
}

.brand-crest .crest-shell {
  fill: rgba(255, 255, 255, 0.08);
  stroke: rgba(255, 255, 255, 0.48);
  stroke-width: 1.4;
}

.brand-crest .crest-core {
  fill: none;
  stroke: rgba(255, 255, 255, 0.24);
  stroke-width: 1;
}

.brand-crest .crest-mono {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-crest .crest-dot {
  fill: currentColor;
}

[data-theme="dark"] .brand-crest .crest-shell {
  fill: rgba(31, 24, 18, 0.16);
  stroke: rgba(29, 22, 15, 0.62);
}

[data-theme="dark"] .brand-crest .crest-core {
  stroke: rgba(29, 22, 15, 0.38);
}

.brand-text {
  line-height: 1.15;
}

.brand-title {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.82rem;
  letter-spacing: 0.03em;
  color: var(--ink);
  line-height: 0.88;
}

.brand-sub {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  margin-top: 4px;
}

.nav-actions {
  order: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: 2px;
}

.menu-toggle,
.lang-select {
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, var(--surface-solid), #f5eee2);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.menu-toggle {
  display: none;
}

.lang-select {
  min-width: 68px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #64513d 50%), linear-gradient(135deg, #64513d 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-nav {
  order: 2;
  flex: 1 1 auto;
  min-width: 0;
}

.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav ul::-webkit-scrollbar {
  display: none;
}

.site-nav li {
  flex: 0 0 auto;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  line-height: 1;
  font-weight: 600;
  text-transform: uppercase;
  padding: 9px 11px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.site-nav a[aria-current='page'],
.site-nav a:hover {
  background: linear-gradient(180deg, rgba(139, 107, 67, 0.18), rgba(139, 107, 67, 0.11));
  border-color: rgba(139, 107, 67, 0.35);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

main {
  display: block;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px;
}

.hero {
  min-height: clamp(560px, 76vh, 800px);
  position: relative;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(11, 9, 8, 0.81) 10%, rgba(20, 15, 12, 0.6) 44%, rgba(24, 18, 15, 0.16) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 840px;
  margin: 0 auto 10vh 0;
  color: #f6f1e8;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.hero .eyebrow {
  color: #e5d6be;
}

.eyebrow::before {
  content: '';
  width: 30px;
  height: 1px;
  background: currentColor;
}

h1,
h2,
h3,
h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1.1;
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.6rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 600;
}

h3 {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 600;
}

p,
li {
  font-size: 1.02rem;
  color: var(--muted);
}

.lead {
  margin-top: 16px;
  font-size: clamp(1.02rem, 1.5vw, 1.24rem);
  color: var(--muted);
  max-width: 64ch;
}

.hero .lead {
  color: #ece4d8;
}

.section {
  padding: clamp(56px, 8vw, 110px) 0;
}

.section-tight {
  padding: clamp(40px, 5.6vw, 70px) 0;
}

.surface {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(248, 243, 234, 0.68));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 241, 230, 0.88));
  border: 1px solid rgba(127, 104, 75, 0.22);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(127, 104, 75, 0.34);
}

.card h3,
.card h4 {
  color: var(--ink);
}

.card p:last-child,
.card ul:last-child,
.card ol:last-child {
  margin-bottom: 0;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  text-decoration: none;
  padding: 12px 20px;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  transition: transform 220ms ease, background-color 220ms ease;
}

.btn.primary {
  background: linear-gradient(160deg, #261c15, #3b2d22);
  border-color: #3b2d22;
  color: #fff;
  box-shadow: 0 10px 22px rgba(30, 21, 13, 0.23);
}

.btn.secondary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(247, 240, 229, 0.84));
  color: var(--ink);
}

.hero .btn.primary {
  background: #f7efe3;
  border-color: #f7efe3;
  color: #1e1712;
}

.hero .btn.secondary {
  color: #f7efe3;
  border-color: rgba(247, 239, 227, 0.75);
  background: rgba(0, 0, 0, 0.18);
}

.hero .btn.secondary:hover,
.hero .btn.primary:hover {
  filter: brightness(1.05);
}

.btn:hover {
  transform: translateY(-2px);
}

.citation {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(139, 107, 67, 0.35);
  background: rgba(139, 107, 67, 0.1);
  color: #5a4326;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  margin-left: 8px;
  vertical-align: middle;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.timeline-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}

.timeline-list li {
  margin: 0 0 20px 0;
  padding: 0 0 0 22px;
  position: relative;
}

.timeline-list li::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-date {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.94rem;
}

.people-layout {
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
}

.person-header {
  display: flex;
  gap: 16px;
  align-items: start;
}

.person-header img {
  border-radius: 14px;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.kv {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.kv dt {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
}

.kv dd {
  margin: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.input,
.select {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
}

.input {
  min-width: min(460px, 100%);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.work-card {
  border: 1px solid rgba(127, 104, 75, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 241, 230, 0.88));
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.work-meta {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  border: 1px solid var(--line);
  background: var(--surface-alt);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.78rem;
  color: var(--muted);
}

.badge.verified {
  border-color: rgba(63, 123, 85, 0.45);
  background: rgba(114, 188, 130, 0.2);
}

.badge.attributed {
  border-color: rgba(188, 117, 114, 0.45);
  background: rgba(188, 114, 114, 0.14);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
  border: 1px solid rgba(127, 104, 75, 0.25);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  background: var(--surface);
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.table th {
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 0.84rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.gallery-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 241, 230, 0.88));
  border: 1px solid rgba(127, 104, 75, 0.22);
  border-radius: 16px;
  overflow: clip;
  box-shadow: var(--shadow-soft);
}

.gallery-card button {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-card figcaption {
  padding: 11px 12px 14px;
  font-size: 0.9rem;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 8, 0.9);
  display: none;
  place-items: center;
  z-index: 100;
}

.lightbox.open {
  display: grid;
}

.lightbox-inner {
  max-width: min(92vw, 1200px);
  max-height: 90vh;
  position: relative;
}

.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 10px;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
}

.lightbox-caption {
  color: #ddd2c4;
  margin-top: 8px;
  font-size: 0.9rem;
}

.biblio-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.biblio-item {
  border: 1px solid rgba(127, 104, 75, 0.22);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 241, 230, 0.88));
  box-shadow: var(--shadow-soft);
}

.biblio-item h4 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.biblio-item p {
  margin: 0.3rem 0;
}

.media-list {
  display: grid;
  gap: 14px;
}

.media-item {
  border: 1px solid rgba(127, 104, 75, 0.22);
  border-radius: 16px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 241, 230, 0.88));
  box-shadow: var(--shadow-soft);
}

.verbatim-panel {
  border: 1px solid rgba(127, 104, 75, 0.25);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 241, 230, 0.9));
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.verbatim-list {
  margin: 0;
  padding-left: 22px;
  list-style: disc;
}

.verbatim-list li {
  color: #3d332b;
  margin-bottom: 10px;
}

small, .small {
  font-size: 0.86rem;
}

footer {
  border-top: 1px solid rgba(122, 100, 73, 0.24);
  background: linear-gradient(180deg, #eee5d6, #e6dac8);
  padding: 30px 0;
}

.footer-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  color: #4f4336;
}

.fade-up {
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 560ms ease forwards;
}

.fade-up.delay-1 {
  animation-delay: 120ms;
}

.fade-up.delay-2 {
  animation-delay: 220ms;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 1260px) {
  .site-header {
    padding-left: 8px;
    padding-right: 8px;
  }

  .nav-wrap {
    padding: 10px 12px;
  }

  .brand-title {
    font-size: 1.58rem;
  }

  .brand-sub {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
  }

  .site-nav {
    position: absolute;
    top: 78px;
    right: 14px;
    width: min(88vw, 420px);
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(160deg, #ffffff, #f4eee4);
    padding: 12px;
    box-shadow: var(--shadow);
    display: none;
    flex: 0 0 auto;
  }

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

  .site-nav ul {
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
    overflow: visible;
  }

  .site-nav a {
    justify-content: flex-start;
    width: 100%;
    font-size: 0.78rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .people-layout,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 66vh;
  }

  .hero-content {
    margin-bottom: 7vh;
  }
}

@media (max-width: 640px) {
  .nav-wrap {
    padding-inline: 10px;
    gap: 10px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-crest {
    width: 28px;
    height: 28px;
  }

  .brand-title {
    font-size: 1.3rem;
  }

  .brand-sub {
    display: none;
  }

  .lang-select {
    min-width: 62px;
    padding-left: 10px;
    padding-right: 24px;
  }

  .container {
    padding-inline: 14px;
  }

  .section {
    padding: 42px 0;
  }

  .card {
    padding: 18px;
  }

  .input {
    min-width: 100%;
  }
}
