:root {
  --bg: #f5f2ec;
  --surface: #ffffff;
  --ink: #171412;
  --muted: #6b625b;
  --line: #e3ddd4;
  --accent: #a4132e;
  --accent-dark: #761020;
  --gold: #b98c4b;
  --steel: #263442;
  --soft: #eee8df;
  --shadow: 0 28px 90px rgba(31, 24, 19, 0.13);
  --radius: 8px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12100f;
  --surface: #1b1715;
  --ink: #f4eee6;
  --muted: #b7aaa0;
  --line: rgba(244, 238, 230, 0.14);
  --accent: #d73d5b;
  --accent-dark: #ff6f89;
  --gold: #d7a75b;
  --steel: #d8e1e8;
  --soft: #211c19;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 14% 8%, rgba(185, 140, 75, 0.12), transparent 28%),
    linear-gradient(180deg, #fbfaf7 0%, var(--bg) 44%, #ffffff 100%);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 12% 0%, rgba(215, 61, 91, 0.18), transparent 30%),
    radial-gradient(circle at 84% 10%, rgba(215, 167, 91, 0.1), transparent 26%),
    linear-gradient(180deg, #0c0b0a 0%, var(--bg) 46%, #171311 100%);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 16px clamp(20px, 5vw, 72px);
  background: rgba(251, 250, 247, 0.78);
  border-bottom: 1px solid rgba(222, 216, 207, 0.8);
  backdrop-filter: blur(20px) saturate(1.2);
}

html[data-theme="dark"] .site-header {
  background: rgba(15, 13, 12, 0.82);
  border-bottom-color: rgba(244, 238, 230, 0.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: linear-gradient(135deg, var(--ink), #3a241d);
  color: #fff;
  border-radius: 50%;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 17px;
}

html[data-theme="dark"] .brand-mark {
  background: linear-gradient(135deg, #f4eee6, #d7a75b);
  color: #16110f;
}

.brand-text {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  min-width: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.main-nav a:hover {
  color: var(--accent);
}

.main-nav a {
  white-space: nowrap;
}

.social-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.social-nav a {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(23, 20, 18, 0.12);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.theme-toggle {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(23, 20, 18, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: var(--ink);
  color: var(--surface);
}

.theme-toggle svg {
  position: absolute;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.theme-toggle-moon {
  opacity: 0;
  transform: scale(0.72) rotate(-18deg);
}

html[data-theme="dark"] .theme-toggle-sun {
  opacity: 0;
  transform: scale(0.72) rotate(18deg);
}

html[data-theme="dark"] .theme-toggle-moon {
  opacity: 1;
  transform: scale(1) rotate(0);
}

html[data-theme="dark"] .social-nav a,
html[data-theme="dark"] .theme-toggle {
  border-color: rgba(244, 238, 230, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .social-nav a:hover,
html[data-theme="dark"] .theme-toggle:hover {
  background: #f4eee6;
  color: #171412;
}

.social-nav a:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: var(--ink);
  color: #fff;
}

.social-nav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.76fr) minmax(440px, 1.24fr);
  gap: clamp(32px, 6.5vw, 108px);
  align-items: stretch;
  min-height: calc(92vh - 74px);
  padding: clamp(46px, 6vw, 88px) clamp(20px, 6vw, 92px) clamp(34px, 4vw, 56px);
  background:
    linear-gradient(90deg, rgba(251, 250, 247, 0.98) 0%, rgba(251, 250, 247, 0.94) 42%, rgba(251, 250, 247, 0.08) 42%),
    linear-gradient(180deg, #fbfaf7 0%, #efe8de 100%);
  isolation: isolate;
}

html[data-theme="dark"] .hero {
  background:
    linear-gradient(90deg, rgba(18, 16, 15, 0.98) 0%, rgba(18, 16, 15, 0.94) 42%, rgba(18, 16, 15, 0.08) 42%),
    linear-gradient(180deg, #151210 0%, #211a17 100%);
}

.hero::before {
  position: absolute;
  inset: auto clamp(20px, 6vw, 92px) 26px clamp(20px, 6vw, 92px);
  z-index: -1;
  height: 1px;
  background: rgba(23, 20, 18, 0.18);
  content: "";
}

.hero-copy {
  align-self: end;
  max-width: 620px;
  padding-bottom: clamp(10px, 5vw, 58px);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 26px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  display: block;
  width: 42px;
  height: 1px;
  background: currentColor;
  content: "";
}

.hero h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  max-width: 620px;
  font-size: clamp(56px, 6.6vw, 104px);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero p {
  max-width: 540px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.55vw, 21px);
  line-height: 1.62;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.hero-tags span {
  border: 1px solid rgba(23, 20, 18, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--steel);
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
}

.button.primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 18px 34px rgba(23, 20, 18, 0.16);
}

html[data-theme="dark"] .button.primary {
  color: #171412;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.button.primary:hover {
  background: var(--accent);
}

.button.secondary {
  background: transparent;
  border-color: rgba(23, 20, 18, 0.24);
  color: var(--ink);
}

html[data-theme="dark"] .button.secondary {
  border-color: rgba(244, 238, 230, 0.24);
}

.button.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-panel {
  position: relative;
  display: grid;
  min-height: min(690px, calc(92vh - 148px));
  align-self: stretch;
}

.hero-media {
  position: relative;
  display: grid;
  min-height: 100%;
}

.portrait-frame {
  position: relative;
  margin: 0;
  min-height: min(690px, calc(92vh - 148px));
  padding: 0;
  background: #171412;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.portrait-frame::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(23, 20, 18, 0.1) 0%, transparent 34%),
    linear-gradient(180deg, transparent 52%, rgba(23, 20, 18, 0.52) 100%);
  content: "";
  pointer-events: none;
}

.portrait-frame img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: min(690px, calc(92vh - 148px));
  object-fit: cover;
  object-position: center 34%;
}

.portrait-frame figcaption {
  position: absolute;
  right: 22px;
  bottom: 24px;
  z-index: 2;
  max-width: min(320px, calc(100% - 36px));
  border-radius: 0;
  background: rgba(23, 20, 18, 0.58);
  color: rgba(255, 255, 255, 0.82);
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.hero-card {
  position: absolute;
  top: clamp(22px, 4vw, 42px);
  left: clamp(22px, 4vw, 42px);
  z-index: 3;
  width: min(255px, calc(100% - 44px));
  border-left: 3px solid var(--accent);
  background: rgba(251, 250, 247, 0.9);
  padding: 18px 18px 18px 20px;
  box-shadow: 0 20px 44px rgba(23, 20, 18, 0.18);
  backdrop-filter: blur(12px);
}

html[data-theme="dark"] .hero-card {
  background: rgba(27, 23, 21, 0.88);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.38);
}

.hero-card span {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-card strong {
  display: block;
  margin-top: 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 0.95;
}

.hero-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.stat-grid {
  position: absolute;
  left: clamp(22px, 4vw, 42px);
  right: clamp(22px, 4vw, 42px);
  bottom: clamp(28px, 5vw, 54px);
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 0;
  box-shadow: 0 24px 54px rgba(23, 20, 18, 0.22);
  overflow: hidden;
}

.stat-grid div {
  min-width: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(251, 250, 247, 0.9);
  padding: 18px 16px;
  backdrop-filter: blur(12px);
}

html[data-theme="dark"] .stat-grid div {
  background: rgba(27, 23, 21, 0.9);
}

.stat-grid div:last-child {
  border-right: 0;
}

.stat-grid dt {
  margin: 0;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 900;
  line-height: 0.95;
}

.stat-grid dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile,
.timeline-shell,
.featured,
.submit {
  scroll-margin-top: 92px;
  padding: 74px clamp(20px, 6vw, 92px);
}

.profile {
  position: relative;
  background:
    linear-gradient(90deg, #f7f3ec 0%, #f7f3ec 47%, #efe7dc 47%, #efe7dc 100%);
  color: var(--ink);
  border-top: 1px solid rgba(23, 20, 18, 0.12);
  border-bottom: 1px solid rgba(23, 20, 18, 0.12);
}

html[data-theme="dark"] .profile {
  background:
    linear-gradient(90deg, #171311 0%, #171311 47%, #211b18 47%, #211b18 100%);
  border-top-color: rgba(244, 238, 230, 0.12);
  border-bottom-color: rgba(244, 238, 230, 0.12);
}

.profile-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: clamp(34px, 6vw, 86px);
  align-items: end;
}

.profile-copy span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.profile-copy span::before {
  display: block;
  width: 38px;
  height: 1px;
  background: currentColor;
  content: "";
}

.profile h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 0.9;
}

.profile p {
  margin: 18px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.65;
}

.profile-facts {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(23, 20, 18, 0.14);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 22px 60px rgba(23, 20, 18, 0.08);
}

html[data-theme="dark"] .profile-facts,
html[data-theme="dark"] .profile-grid {
  border-color: rgba(244, 238, 230, 0.13);
  background: rgba(244, 238, 230, 0.1);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
}

.profile-facts div {
  padding: 19px 20px;
  border-bottom: 1px solid rgba(23, 20, 18, 0.12);
  background: rgba(255, 255, 255, 0.52);
}

html[data-theme="dark"] .profile-facts div,
html[data-theme="dark"] .profile-grid article {
  border-color: rgba(244, 238, 230, 0.12);
  background: rgba(255, 255, 255, 0.045);
}

html[data-theme="dark"] .profile-facts span,
html[data-theme="dark"] .filter-label,
html[data-theme="dark"] .filter-group.compact label {
  color: rgba(244, 238, 230, 0.55);
}

.profile-facts div:last-child {
  border-bottom: 0;
}

.profile-facts span {
  display: block;
  color: rgba(23, 20, 18, 0.48);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-facts strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.35;
}

.profile-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 50px;
  border: 1px solid rgba(23, 20, 18, 0.12);
  background: rgba(23, 20, 18, 0.12);
}

.profile-grid article {
  min-height: 250px;
  padding: 26px 24px 28px;
  background: rgba(255, 255, 255, 0.56);
}

.profile-grid article > span {
  display: block;
  color: var(--accent);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.profile-grid h3 {
  margin: 54px 0 12px;
  max-width: 260px;
  font-size: 22px;
  line-height: 1.1;
}

.profile-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

.timeline-shell {
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--line);
}

html[data-theme="dark"] .timeline-shell {
  background: rgba(18, 16, 15, 0.94);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-heading h2,
.submit h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(36px, 4vw, 62px);
  line-height: 1;
}

.section-heading p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.search-box {
  display: grid;
  min-width: min(100%, 360px);
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.search-box input,
.filters select,
.submit-form input,
.submit-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
}

html[data-theme="dark"] .search-box input,
html[data-theme="dark"] .filters select,
html[data-theme="dark"] .submit-form input,
html[data-theme="dark"] .submit-form textarea,
html[data-theme="dark"] .owner-form input,
html[data-theme="dark"] .owner-form textarea {
  background-color: rgba(255, 255, 255, 0.055);
  border-color: rgba(244, 238, 230, 0.14);
  color: var(--ink);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: rgba(244, 238, 230, 0.42);
}

.search-box input {
  height: 48px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 500;
  text-transform: none;
}

.era-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 20px;
}

.era-button,
.chip {
  border: 1px solid rgba(23, 20, 18, 0.12);
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  border-radius: 0;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

html[data-theme="dark"] .era-button,
html[data-theme="dark"] .chip {
  border-color: rgba(244, 238, 230, 0.14);
  background: rgba(255, 255, 255, 0.045);
}

.era-button:hover,
.chip:hover {
  border-color: rgba(23, 20, 18, 0.28);
  color: var(--ink);
  transform: translateY(-1px);
}

.chip.is-controversy {
  border-color: rgba(177, 10, 46, 0.34);
  background: rgba(177, 10, 46, 0.08);
  color: var(--accent);
}

.chip.is-controversy:hover {
  border-color: rgba(177, 10, 46, 0.58);
  background: rgba(177, 10, 46, 0.12);
  color: var(--accent);
}

.era-button.is-active,
.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 14px 28px rgba(23, 20, 18, 0.13);
}

.chip.is-controversy.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 16px 30px rgba(177, 10, 46, 0.18);
}

html[data-theme="dark"] .era-button.is-active,
html[data-theme="dark"] .chip.is-active {
  color: #171412;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .chip.is-controversy {
  border-color: rgba(255, 85, 122, 0.34);
  background: rgba(255, 85, 122, 0.1);
  color: #ff8aa6;
}

html[data-theme="dark"] .chip.is-controversy.is-active {
  background: #ff6f92;
  border-color: #ff6f92;
  color: #171412;
}

.filters {
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, 0.25fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  margin-top: 6px;
  border: 1px solid rgba(23, 20, 18, 0.12);
  background:
    linear-gradient(90deg, rgba(164, 19, 46, 0.08), transparent 36%),
    rgba(251, 250, 247, 0.94);
  box-shadow: 0 20px 54px rgba(23, 20, 18, 0.08);
  overflow: hidden;
}

html[data-theme="dark"] .filters {
  background:
    linear-gradient(90deg, rgba(215, 61, 91, 0.13), transparent 36%),
    rgba(27, 23, 21, 0.94);
  border-color: rgba(244, 238, 230, 0.13);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
}

.filters::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--accent);
  content: "";
}

.filters-heading {
  display: grid;
  align-content: space-between;
  gap: 22px;
  border-right: 1px solid rgba(23, 20, 18, 0.12);
  padding: 22px 22px 22px 28px;
}

.filters-heading span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.filters-heading strong {
  display: block;
  max-width: 140px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 24px;
  line-height: 1.02;
}

.filters-body {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(430px, 0.76fr);
  gap: 1px;
  background: rgba(23, 20, 18, 0.1);
}

html[data-theme="dark"] .filters-body {
  background: rgba(244, 238, 230, 0.09);
}

.filter-group {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  background: rgba(255, 255, 255, 0.68);
  padding: 22px 24px 22px 26px;
}

html[data-theme="dark"] .filter-group {
  background: rgba(255, 255, 255, 0.035);
}

.filter-label,
.filter-group.compact label {
  color: rgba(23, 20, 18, 0.54);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-group.compact {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  align-items: start;
  padding-left: 24px;
}

.filters select {
  height: 48px;
  margin-top: 10px;
  padding: 0 38px 0 13px;
  border-radius: 0;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 17px) 20px / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 12px) 20px / 6px 6px no-repeat,
    rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  appearance: none;
}

.filters select:focus,
.search-box input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(164, 19, 46, 0.12);
}

.timeline-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin: 28px 0 14px;
  color: var(--muted);
}

.timeline-summary div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.timeline-summary strong {
  color: var(--accent);
  font-size: 28px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.pagination-top {
  justify-content: flex-start;
  margin: 8px 0 18px;
  padding: 0 0 20px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.pagination button {
  min-width: 42px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  padding: 0 15px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(23, 20, 18, 0.05);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

html[data-theme="dark"] .pagination button {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(244, 238, 230, 0.15);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.pagination button:hover:not(:disabled),
.pagination button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

html[data-theme="dark"] .pagination button:hover:not(:disabled),
html[data-theme="dark"] .pagination button.is-active {
  color: #171412;
}

.pagination button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.pagination .pagination-step {
  min-width: 132px;
  border-color: rgba(164, 19, 46, 0.22);
  color: var(--ink);
}

.pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-list::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 174px;
  width: 1px;
  background: var(--line);
  content: "";
}

.event-item {
  display: grid;
  grid-template-columns: 150px 46px minmax(0, 1fr);
  gap: 0;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.event-date {
  padding-top: 2px;
  color: var(--muted);
  font-weight: 900;
}

.event-date strong {
  display: block;
  color: var(--ink);
  font-size: 24px;
}

.event-dot {
  position: relative;
  display: flex;
  justify-content: center;
}

.event-dot::before {
  position: relative;
  z-index: 1;
  width: 15px;
  height: 15px;
  margin-top: 7px;
  background: var(--accent);
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
  content: "";
}

html[data-theme="dark"] .event-dot::before {
  border-color: #12100f;
}

.event-card {
  display: grid;
  gap: 12px;
  max-width: 920px;
  padding: 20px;
  border: 1px solid transparent;
  border-radius: 18px;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.event-card.clickable {
  cursor: pointer;
}

.event-card.clickable:hover h3 {
  color: var(--accent);
}

.event-card.clickable:hover {
  background: #fff;
  border-color: var(--line);
  transform: translateY(-1px);
}

html[data-theme="dark"] .event-card.clickable:hover {
  background: rgba(255, 255, 255, 0.045);
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.event-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

html[data-theme="dark"] .event-meta span,
html[data-theme="dark"] .drawer-kicker span,
html[data-theme="dark"] .drawer-tags span {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(244, 238, 230, 0.14);
}

.event-card h3 {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.15;
}

.event-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.source-excerpt {
  margin: 0;
  padding: 13px 15px;
  background: #faf7f1;
  border-left: 3px solid var(--gold);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

html[data-theme="dark"] .source-excerpt {
  background: rgba(215, 167, 91, 0.08);
}

.source-excerpt strong {
  color: var(--ink);
}

.source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
}

.source-row a {
  color: var(--accent);
}

.details-button {
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.featured {
  background:
    linear-gradient(180deg, #ffffff 0%, #f6f2eb 100%);
}

html[data-theme="dark"] .featured {
  background:
    linear-gradient(180deg, #171311 0%, #12100f 100%);
}

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

.feature-card {
  display: grid;
  gap: 18px;
  min-height: 230px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(23, 20, 18, 0.06);
}

html[data-theme="dark"] .feature-card {
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.not-found {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 40px 20px;
}

.not-found section {
  max-width: 680px;
}

.not-found h1 {
  margin: 44px 0 18px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.96;
}

.not-found p {
  max-width: 560px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.feature-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.feature-card h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.submit {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 520px);
  gap: 42px;
  align-items: start;
}

.submit-form {
  display: grid;
  gap: 14px;
}

.submit-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.submit-form input,
.submit-form textarea {
  padding: 13px 14px;
  font-size: 15px;
  font-weight: 500;
  text-transform: none;
  resize: vertical;
}

.owner-contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 520px);
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
  padding: 54px clamp(20px, 6vw, 92px);
  background: #fff;
  border-top: 1px solid var(--line);
}

html[data-theme="dark"] .owner-contact {
  background: #171311;
}

.owner-contact span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.owner-contact h2 {
  max-width: 520px;
  margin: 10px 0 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(32px, 3.4vw, 54px);
  line-height: 1;
}

.owner-contact p {
  max-width: 560px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.privacy-note {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
  padding: 34px clamp(20px, 6vw, 92px);
  background: #171412;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .privacy-note {
  background: #0c0b0a;
}

.privacy-note.compact {
  margin-top: 42px;
}

.privacy-note span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.privacy-note h2 {
  max-width: 520px;
  margin: 8px 0 0;
  font-size: clamp(24px, 2.4vw, 38px);
  line-height: 1.05;
}

.privacy-note p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
  line-height: 1.7;
}

.owner-form {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
}

html[data-theme="dark"] .owner-form {
  background: rgba(255, 255, 255, 0.045);
}

.owner-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.owner-form input,
.owner-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  text-transform: none;
}

.owner-form .button {
  justify-self: start;
}

.event-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 560px);
  pointer-events: none;
  visibility: hidden;
}

.event-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.drawer-backdrop {
  background: rgba(23, 20, 18, 0);
  transition: background 160ms ease;
}

.event-drawer.is-open .drawer-backdrop {
  background: rgba(23, 20, 18, 0.28);
}

html[data-theme="dark"] .event-drawer.is-open .drawer-backdrop {
  background: rgba(0, 0, 0, 0.56);
}

.drawer-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 80px rgba(23, 20, 18, 0.16);
  transform: translateX(100%);
  transition: transform 180ms ease;
}

.event-drawer.is-open .drawer-panel {
  transform: translateX(0);
}

.drawer-close {
  justify-self: end;
  margin: 18px 22px 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

html[data-theme="dark"] .drawer-close {
  background: rgba(255, 255, 255, 0.045);
}

.drawer-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.drawer-content {
  overflow-y: auto;
  padding: 18px 34px 44px;
}

.drawer-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.drawer-kicker span,
.drawer-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.drawer-content h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.05;
}

.drawer-date {
  margin: 18px 0 0;
  color: var(--accent);
  font-weight: 900;
}

.drawer-summary {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.drawer-section {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.drawer-section h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.drawer-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.quote-section {
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  padding: 20px;
  border-radius: 14px;
}

.social-section {
  background: #f6f8fb;
  border: 1px solid #dce4ef;
  border-left: 4px solid #476582;
  padding: 20px;
  border-radius: 14px;
}

html[data-theme="dark"] .social-section {
  background: rgba(71, 101, 130, 0.12);
  border-color: rgba(135, 169, 202, 0.22);
}

.quote-section blockquote {
  margin: 16px 0 0;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 24px;
  line-height: 1.25;
}

.drawer-source {
  display: inline-flex;
  margin-top: 12px;
  color: var(--accent);
  font-weight: 900;
}

.drawer-permalink {
  display: grid;
  gap: 5px;
  margin-top: 26px;
  border: 1px solid rgba(23, 20, 18, 0.14);
  border-left: 4px solid var(--accent);
  background: rgba(251, 250, 247, 0.86);
  padding: 15px 16px;
}

html[data-theme="dark"] .drawer-permalink {
  border-color: rgba(244, 238, 230, 0.14);
  background: rgba(255, 255, 255, 0.045);
}

.drawer-permalink span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.drawer-permalink strong {
  color: var(--accent);
  font-size: 15px;
}

.drawer-permalink:hover {
  border-color: rgba(164, 19, 46, 0.34);
  background: #fff;
}

html[data-theme="dark"] .drawer-permalink:hover {
  background: rgba(255, 255, 255, 0.075);
}

.sources-list {
  display: grid;
  gap: 10px;
}

.source-card {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

html[data-theme="dark"] .source-card {
  background: rgba(255, 255, 255, 0.045);
}

.source-card:hover {
  border-color: var(--accent);
}

.source-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.source-card strong {
  color: var(--accent);
  font-size: 15px;
}

.drawer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-page {
  min-height: 100vh;
  padding: 76px clamp(20px, 7vw, 120px);
  background:
    radial-gradient(circle at 12% 0%, rgba(185, 140, 75, 0.12), transparent 30%),
    linear-gradient(180deg, #fbfaf7 0%, #ffffff 100%);
}

html[data-theme="dark"] .event-page {
  background:
    radial-gradient(circle at 12% 0%, rgba(215, 61, 91, 0.16), transparent 30%),
    linear-gradient(180deg, #0c0b0a 0%, #171311 100%);
}

.event-page-shell {
  max-width: 940px;
  margin: 0 auto;
}

.event-page-shell h1 {
  max-width: 840px;
  margin: 18px 0 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(46px, 6vw, 82px);
  line-height: 0.98;
}

.event-page-summary {
  max-width: 760px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.7;
}

.event-page .drawer-section {
  max-width: 760px;
}

.event-page .drawer-section h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.back-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

html[data-theme="dark"] .back-link {
  background: rgba(255, 255, 255, 0.045);
}

.back-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

  .header-actions {
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
  }

  .main-nav {
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .social-nav {
    flex: 0 0 auto;
  }

  .hero,
  .submit,
  .owner-contact,
  .privacy-note,
  .profile-header,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile {
    background: linear-gradient(180deg, #f7f3ec 0%, #efe7dc 100%);
  }

  html[data-theme="dark"] .profile {
    background: linear-gradient(180deg, #171311 0%, #211b18 100%);
  }

  .profile-grid article {
    min-height: auto;
  }

  .hero {
    min-height: auto;
    background: linear-gradient(180deg, #fbfaf7 0%, #efe8de 100%);
  }

  html[data-theme="dark"] .hero {
    background: linear-gradient(180deg, #151210 0%, #211a17 100%);
  }

  .portrait-frame {
    min-height: 280px;
  }

  .portrait-frame img {
    min-height: 320px;
  }

  .hero-panel,
  .hero-media {
    min-height: auto;
  }

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

  .filters-heading {
    align-content: start;
    border-right: 0;
    border-bottom: 1px solid rgba(23, 20, 18, 0.12);
    padding: 18px 22px 16px 26px;
  }

  .filters-heading strong {
    max-width: none;
    font-size: 22px;
  }

  .filters-body {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 720px) {
  .site-header {
    padding: 14px 18px;
  }

  .brand {
    min-width: 0;
  }

  .brand-text {
    font-size: 12px;
  }

  .header-actions {
    flex-direction: column;
    gap: 12px;
  }

  .main-nav {
    width: 100%;
  }

  .social-nav {
    padding-left: 0;
    border-left: 0;
  }

  .hero,
  .timeline-shell,
  .featured,
  .submit,
  .owner-contact,
  .privacy-note,
  .profile {
    padding-left: 18px;
    padding-right: 18px;
  }

  .profile {
    padding-top: 58px;
    padding-bottom: 58px;
  }

  .profile h2 {
    font-size: clamp(46px, 14vw, 64px);
  }

  .profile p {
    font-size: 16px;
  }

  .profile-grid {
    margin-top: 30px;
  }

  .profile-grid h3 {
    margin-top: 28px;
  }

  .profile-grid article {
    padding: 22px 20px 24px;
  }

  .hero {
    gap: 28px;
    padding-top: 28px;
    padding-bottom: 34px;
  }

  .hero-copy {
    padding-bottom: 0;
  }

  .hero-eyebrow {
    margin-bottom: 18px;
    font-size: 11px;
  }

  .hero h1 {
    font-size: clamp(46px, 15vw, 62px);
    line-height: 0.92;
  }

  .hero p {
    margin-top: 18px;
    font-size: 16px;
    line-height: 1.58;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 26px;
  }

  .button {
    width: 100%;
  }

  .hero-media {
    gap: 12px;
  }

  .portrait-frame,
  .portrait-frame img {
    min-height: 390px;
  }

  .portrait-frame img {
    object-position: 48% top;
  }

  .portrait-frame figcaption {
    right: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
    font-size: 9px;
  }

  .hero-card {
    position: static;
    width: 100%;
    box-shadow: none;
  }

  .stat-grid {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    box-shadow: none;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .stat-grid,
  .filter-group.compact {
    grid-template-columns: repeat(2, 1fr);
  }

  .filters-heading {
    padding-left: 22px;
  }

  .filter-group {
    padding: 18px 20px;
  }

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

  .chip {
    width: 100%;
    white-space: normal;
  }

  .timeline-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .pagination {
    justify-content: flex-start;
  }

  .timeline-list::before {
    left: 12px;
  }

  .event-item {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 14px;
  }

  .event-date {
    grid-column: 2;
    grid-row: 1;
    padding-top: 0;
  }

  .event-dot {
    grid-column: 1;
    grid-row: 1 / span 2;
    justify-content: start;
  }

  .event-card {
    grid-column: 2;
    grid-row: 2;
  }

  .event-drawer {
    grid-template-columns: 1fr;
  }

  .drawer-backdrop {
    display: none;
  }

  .drawer-panel {
    border-left: 0;
  }

  .drawer-content {
    padding: 18px 22px 36px;
  }
}

.form-hp {
  height: 0;
  left: -9999px;
  overflow: hidden;
  position: absolute;
  width: 0;
}

.form-result {
  align-items: center;
  background: var(--bg);
  display: flex;
  min-height: 100vh;
  padding: 40px 24px;
}

.form-result section {
  border: 1px solid var(--line);
  margin: 0 auto;
  max-width: 720px;
  padding: 48px;
}

.form-result span {
  color: var(--accent);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.form-result h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.92;
  margin: 0 0 24px;
}

.form-result p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  margin: 0 0 28px;
}
