:root {
  --bg: #fcfbf9;
  --bg-alt: #f4f2ee;
  --surface: #ffffff;
  --text: #24262c;
  --muted: #5d6168;
  --border: #e6e2da;
  --accent: #b3122e;
  --accent-soft: rgba(179, 18, 46, 0.08);
  --shadow: 0 1px 2px rgba(20, 20, 30, 0.05), 0 8px 24px rgba(20, 20, 30, 0.06);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #12141a;
  --bg-alt: #161922;
  --surface: #1b1f29;
  --text: #e7e5e0;
  --muted: #a4a9b4;
  --border: #2a2f3a;
  --accent: #f0616f;
  --accent-soft: rgba(240, 97, 111, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  transition: background 0.25s ease, color 0.25s ease;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  line-height: 1.25;
  margin: 0 0 0.6em;
  color: var(--text);
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0 0 1em;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.35em;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[id] {
  scroll-margin-top: 4.5rem;
}

.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  font-family: var(--serif);
  font-size: clamp(0.95rem, 2.4vw, 1.15rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.main-nav ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 500;
}

.main-nav a:hover {
  color: var(--text);
  background: var(--accent-soft);
  text-decoration: none;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.hero {
  padding-block: 4.5rem 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  margin-bottom: 0.4em;
}

.hero .role {
  font-size: 1.05rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1em;
}

.hero .lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 56ch;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.actions.center {
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.ghost {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface);
}

.social-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.social-links a {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface);
  transition: all 0.15s ease;
}

.social-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 2rem 1.75rem;
  text-align: center;
}

.profile-card img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.25rem;
  border: 4px solid var(--accent-soft);
}

.profile-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.25em;
}

.profile-card .role {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.75em;
}

.profile-card p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.4em;
}

.profile-card .social-links {
  justify-content: center;
  margin-top: 1.25rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  padding-block: 0.5rem 3rem;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1rem;
  text-align: center;
}

.stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.9rem;
  color: var(--accent);
  margin-bottom: 0.15em;
}

.stat span {
  color: var(--muted);
  font-size: 0.88rem;
}

.section {
  padding-block: 3.75rem;
}

.section.alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 720px;
  margin-bottom: 2.25rem;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  margin-bottom: 0.3em;
}

.section-head .lead {
  color: var(--muted);
  margin: 0;
}

.grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.6rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 1.13rem;
  margin-bottom: 0.45em;
}

.card h4 {
  font-size: 1rem;
}

.card .meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.9em;
}

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

.card-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.card.featured {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: linear-gradient(180deg, var(--accent-soft), transparent 60%), var(--surface);
}

.card.wide {
  grid-column: 1 / -1;
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 860px;
}

.news-list li {
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--border);
}

.news-list li:last-child {
  border-bottom: 0;
}

.news-list .when {
  flex: 0 0 9rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
}

.soon {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 0.05rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  margin-left: 0.45rem;
  vertical-align: middle;
}

.pub-type {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.18rem 0.7rem;
  margin-bottom: 0.75rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.photo-slot {
  margin: 0;
}

.photo-placeholder,
.photo-slot img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.photo-placeholder {
  border-style: dashed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
  background: var(--surface);
}

.photo-placeholder i {
  font-size: 1.6rem;
  color: var(--accent);
}

.tag.tag-code {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
}

.tag.tag-code:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.error-page h1 {
  font-size: clamp(4rem, 14vw, 8rem);
  color: var(--accent);
  margin-bottom: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.tag {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  background: var(--bg);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.5rem;
  border-left: 2px solid var(--border);
  display: grid;
  gap: 2.25rem;
  max-width: 820px;
}

.timeline > li {
  position: relative;
  padding-left: 1.5rem;
}

.timeline > li::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 7px);
  top: 0.4rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
}

[data-theme="dark"] .timeline > li::before {
  border-color: var(--bg);
}

.timeline .when {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  margin-bottom: 0.6rem;
}

.timeline h3 {
  font-size: 1.15rem;
  margin-bottom: 0.2em;
}

.timeline .org {
  color: var(--muted);
  font-size: 0.93rem;
  margin-bottom: 0.8em;
}

.timeline .desc {
  color: var(--muted);
  font-size: 0.96rem;
}

.timeline .desc strong,
.card p strong {
  color: var(--text);
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
}

.checklist li {
  padding-left: 1.5rem;
  position: relative;
}

.checklist li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-size: 0.8rem;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.cta-band {
  text-align: center;
  padding-block: 4rem;
}

.cta-band h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.cta-band p {
  color: var(--muted);
  max-width: 52ch;
  margin-inline: auto;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .social-links {
  justify-content: center;
  margin-bottom: 1rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: underline;
}

.site-footer a:hover {
  color: var(--accent);
}

.page-head {
  padding-block: 3.5rem 1rem;
}

.page-head h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 0.3em;
}

.page-head .lead {
  color: var(--muted);
  max-width: 68ch;
}

.form-grid {
  display: grid;
  gap: 1.1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.form-status {
  display: none;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.92rem;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
}

.back-to-top {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 60;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .profile-card {
    max-width: 380px;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: none;
    box-shadow: var(--shadow);
  }
  .main-nav.open {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    padding: 0.75rem;
    gap: 0.15rem;
  }
  .section {
    padding-block: 2.75rem;
  }
  .hero {
    padding-block: 3rem 2.5rem;
  }
}

@media print {
  .site-header,
  .site-footer,
  .back-to-top,
  .actions,
  .social-links {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}
