:root {
  color-scheme: light;
  --color-bg: #f5efe4;
  --color-surface: #fffdf8;
  --color-text: #17130f;
  --color-muted: #645d54;
  --color-primary: #0b5d8f;
  --color-primary-strong: #092f4f;
  --color-gold: #efc84a;
  --color-green: #22644b;
  --color-red: #c92a2a;
  --color-ink: #08131c;
  --color-border: rgba(23, 19, 15, 0.12);
  --shadow-soft: 0 18px 54px rgba(27, 20, 12, 0.11);
  --radius: 8px;
  --header-height: 74px;
  --max-width: 1160px;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #0b1218;
  --color-surface: #111c25;
  --color-text: #fff8eb;
  --color-muted: #c7bfb4;
  --color-primary: #6bb8e8;
  --color-primary-strong: #b9ddf5;
  --color-gold: #f2cf58;
  --color-green: #83c4a4;
  --color-red: #ff6b6b;
  --color-ink: #fff8eb;
  --color-border: rgba(255, 248, 235, 0.15);
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--color-bg), #ffffff 28%), var(--color-bg) 42rem),
    linear-gradient(154deg, transparent 0 64%, rgba(239, 200, 74, 0.17) 64% 65.2%, rgba(201, 42, 42, 0.11) 65.2% 67.2%, transparent 67.2%);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

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

.skip-link:focus {
  z-index: 100;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  clip: auto;
  background: var(--color-ink);
  color: var(--color-bg);
  border-radius: var(--radius);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-bg), transparent 6%);
  box-shadow: 0 1px 18px rgba(8, 19, 28, 0.05);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--max-width));
  min-height: var(--header-height);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: #007fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(8, 19, 28, 0.18), 0 10px 22px rgba(8, 19, 28, 0.13);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  inset: auto -0.55rem 0.6rem -0.55rem;
  height: 0.9rem;
  content: "";
  transform: rotate(-33deg);
  transform-origin: center;
}

.brand-mark::before {
  background: #f7d618;
}

.brand-mark::after {
  inset: auto -0.65rem 0.78rem -0.65rem;
  height: 0.5rem;
  background: #ce1021;
}

.flag-star {
  position: absolute;
  top: 0.34rem;
  left: 0.44rem;
  z-index: 2;
  color: #f7d618;
  font-size: 0.82rem;
  line-height: 1;
}

.brand-text {
  max-width: 13rem;
  line-height: 1.15;
}

.language-switcher-top {
  margin-left: auto;
}

.language-switcher-panel {
  display: none;
}

.nav-toggle,
.theme-toggle,
.lang-button {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}

.nav-toggle {
  display: grid;
  gap: 0.28rem;
  width: 2.75rem;
  height: 2.75rem;
  place-content: center;
  border-radius: var(--radius);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 1.2rem;
  height: 2px;
  background: currentColor;
}

.nav-panel {
  position: fixed;
  inset: var(--header-height) 0 auto 0;
  display: none;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-bg), var(--color-surface) 34%);
  box-shadow: var(--shadow-soft);
}

.nav-panel.is-open {
  display: block;
}

.nav-links {
  display: grid;
  gap: 0.3rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.8rem 0.2rem;
  color: var(--color-muted);
  text-decoration: none;
  font-weight: 800;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--color-red);
}

.nav-actions,
.language-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-actions {
  justify-content: flex-end;
  margin-top: 1rem;
}

.language-switcher {
  padding: 0.2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--color-surface), transparent 22%);
}

.lang-button {
  min-width: 2.35rem;
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 800;
}

.lang-button.is-active {
  background: var(--color-ink);
  color: var(--color-bg);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.4rem;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius);
  font-weight: 800;
}

.section {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: 3.3rem 0;
}

.hero {
  position: relative;
  display: grid;
  width: 100%;
  max-width: none;
  min-height: calc(94svh - var(--header-height));
  align-items: end;
  padding: 0 max(1rem, calc((100vw - var(--max-width)) / 2)) 4.4rem;
  overflow: hidden;
  isolation: isolate;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--color-red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.02;
}

h1 {
  max-width: 10ch;
  font-size: clamp(2.75rem, 9.4vw, 6.15rem);
}

h2 {
  font-size: clamp(2.1rem, 8vw, 4.2rem);
}

h3 {
  margin: 0 0 0.45rem;
  line-height: 1.25;
}

.hero-title {
  margin: 1rem 0 0;
  color: var(--color-gold);
  font-size: clamp(1.18rem, 4.2vw, 1.75rem);
  font-weight: 900;
}

.hero-copy,
.section-heading p {
  max-width: 42rem;
  color: var(--color-muted);
  font-size: 1.05rem;
}

.hero .eyebrow,
.hero h1,
.hero-copy {
  color: #ffffff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.34);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 44rem;
  padding-top: 10rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.hero-badges span {
  padding: 0.42rem 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(8, 19, 28, 0.38);
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.7rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.78rem 1.05rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}

.button.primary {
  background: var(--color-gold);
  color: #17130f;
  box-shadow: 0 14px 32px rgba(239, 200, 74, 0.24);
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  margin: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 22% 31%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(8, 19, 28, 0.93), rgba(8, 19, 28, 0.62) 40%, rgba(8, 19, 28, 0.18) 68%),
    linear-gradient(180deg, rgba(8, 19, 28, 0.05), rgba(8, 19, 28, 0.82));
}

figcaption {
  margin-top: 0.6rem;
  color: var(--color-muted);
  font-size: 0.88rem;
}

.hero-media figcaption {
  position: absolute;
  right: max(1rem, calc((100vw - var(--max-width)) / 2));
  bottom: 1rem;
  z-index: 2;
  max-width: min(24rem, calc(100% - 2rem));
  color: rgba(255, 255, 255, 0.78);
  text-align: right;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

.section-heading {
  margin-bottom: 1.35rem;
}

.compact-section {
  padding-top: 2.8rem;
  padding-bottom: 2.8rem;
}

.intro-strip {
  display: grid;
  gap: 0;
  padding-top: 1.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--color-border);
}

.intro-strip article {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
  background: transparent;
}

.intro-strip strong {
  color: var(--color-primary-strong);
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
}

.intro-strip span {
  color: var(--color-muted);
  font-weight: 800;
  text-align: right;
}

.bio-grid,
.contact-grid {
  display: grid;
  gap: 1.5rem;
}

.prose {
  max-width: 72ch;
  font-size: 1.05rem;
}

.prose p:first-child {
  margin-top: 0;
}

.fact-panel,
.social-panel,
.contact-form {
  border: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-surface), transparent 8%);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.fact-panel {
  display: grid;
  gap: 1rem;
  align-self: start;
  padding: 1rem;
}

.fact-panel div {
  padding-left: 1rem;
  border-left: 4px solid var(--color-gold);
}

.fact-panel span {
  color: var(--color-red);
  font-size: 1.8rem;
  font-weight: 950;
}

.bio-details {
  margin-top: 1rem;
}

.bio-details summary {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--color-surface), transparent 6%);
  color: var(--color-primary-strong);
  font-weight: 900;
  cursor: pointer;
}

.bio-details summary::marker {
  color: var(--color-red);
}

.fact-panel p {
  margin: 0.2rem 0 0;
  color: var(--color-muted);
}

.choir {
  width: 100%;
  max-width: none;
  padding-right: max(1rem, calc((100vw - var(--max-width)) / 2));
  padding-left: max(1rem, calc((100vw - var(--max-width)) / 2));
  border-top: 6px solid var(--color-gold);
  border-bottom: 6px solid var(--color-red);
  background: var(--color-ink);
  color: #fff8eb;
}

.choir .eyebrow {
  color: var(--color-gold);
}

.choir .section-heading p,
.choir h2 {
  color: #fff8eb;
}

.stats-grid,
.publication-grid,
.gallery-grid {
  display: grid;
  gap: 1rem;
}

.stat-card,
.publication-card,
.gallery-grid figure {
  margin: 0;
  border: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-surface), transparent 4%);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat-card {
  display: grid;
  min-height: 8.8rem;
  align-content: end;
  padding: 1.2rem;
  border-color: rgba(255, 248, 235, 0.16);
  background: rgba(255, 248, 235, 0.07);
}

.stat-card strong {
  color: var(--color-gold);
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 13vw, 4.8rem);
  line-height: 0.95;
}

.stat-card span {
  color: rgba(255, 248, 235, 0.78);
  font-weight: 800;
}

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

.timeline li {
  display: grid;
  gap: 0.8rem;
  padding: 1.2rem;
  border: 1px solid var(--color-border);
  border-left: 6px solid var(--color-gold);
  background: color-mix(in srgb, var(--color-surface), transparent 5%);
  border-radius: var(--radius);
}

.timeline time {
  color: var(--color-red);
  font-weight: 950;
}

.timeline p,
.publication-card h3,
.social-panel p,
.form-note {
  color: var(--color-muted);
}

.publication-card {
  display: grid;
  min-height: 12rem;
  align-content: end;
  padding: 1.1rem;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--color-gold), transparent 82%), transparent 54%),
    var(--color-surface);
}

.publication-card h3 {
  padding: 0;
  margin: 1.2rem 0 0;
  color: var(--color-text);
  font-size: 1.12rem;
}

.publication-mark {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-ink);
  color: var(--color-gold);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.gallery-grid figcaption {
  padding: 0 1rem 1rem;
}

.video-card {
  border: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-surface), transparent 4%);
  border-radius: var(--radius);
  overflow: hidden;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--color-ink);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card h3,
.video-card p {
  padding: 0 1rem;
}

.video-card h3 {
  margin-top: 1rem;
}

.video-card p {
  margin-bottom: 1rem;
  color: var(--color-muted);
}

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

.contact-form label {
  font-weight: 900;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-bg), var(--color-surface) 38%);
  color: var(--color-text);
  border-radius: var(--radius);
  padding: 0.8rem;
}

.contact-form input:focus,
.contact-form textarea:focus,
.button:focus-visible,
.lang-button:focus-visible,
.theme-toggle:focus-visible,
.nav-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-gold), transparent 35%);
  outline-offset: 3px;
}

.form-note {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
}

.social-panel {
  align-self: start;
  padding: 1.2rem;
}

.social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.social-link {
  display: inline-flex;
  min-height: 2.7rem;
  align-items: center;
  padding: 0.6rem 0.9rem;
  background: var(--color-primary-strong);
  color: #fff8eb;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 900;
}

.site-footer {
  padding: 2rem 1rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  text-align: center;
}

@media (min-width: 720px) {
  .bio-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  }

  .stats-grid,
  .publication-grid,
  .gallery-grid,
  .intro-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline li {
    grid-template-columns: 11rem minmax(0, 1fr);
  }
}

@media (min-width: 980px) {
  .nav-toggle {
    display: none;
  }

  .nav-panel {
    position: static;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .language-switcher-top {
    order: 3;
    margin-left: 0;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 0.2rem;
  }

  .nav-links a {
    padding: 0.45rem 0.55rem;
    font-size: 0.92rem;
  }

  .nav-actions {
    order: 4;
    margin-top: 0;
  }

  .stats-grid,
  .intro-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
