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

:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-card: #f4f6f9;
  --bg-accent: #e9eef4;
  --header-bg: rgba(255, 255, 255, 0.95);
  --text: #141820;
  --text-muted: #5a6472;
  --text-light: #8490a0;
  --border: #d5dce6;
  --accent: #1e3a5f;
  --accent-hover: #2a4f7a;
  --error: #c0392b;
  --radius: 10px;
  --max-width: 960px;
  --shadow: 0 2px 12px rgba(30, 58, 95, 0.08);
  --shadow-hover: 0 6px 20px rgba(30, 58, 95, 0.12);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1419;
  --bg-card: #1a2332;
  --bg-accent: #222b38;
  --header-bg: rgba(15, 20, 25, 0.95);
  --text: #edf1f6;
  --text-muted: #9aa8b8;
  --text-light: #6e7d8f;
  --border: #2a3544;
  --accent: #6a9fd4;
  --accent-hover: #8ab8e6;
  --error: #e07060;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.45);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-decoration: none;
}

.logo:hover {
  color: var(--accent-hover);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.site-nav a {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
  font-weight: 600;
}

.theme-toggle {
  flex-shrink: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

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

[data-theme="light"] .theme-toggle .icon-sun,
[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.hero {
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  margin: 0 0 0.75rem;
  color: var(--accent);
  line-height: 1.3;
}

.hero p {
  margin: 0 auto;
  max-width: 560px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

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

.breadcrumbs a:hover {
  text-decoration: underline;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.person-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
  box-shadow: var(--shadow);
}

.person-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.person-card-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-accent);
  margin-bottom: 1rem;
}

.person-card h2 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  color: var(--accent);
}

.person-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  flex-grow: 1;
}

.person-card .more {
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.person-hero {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.person-hero-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-accent);
  flex-shrink: 0;
}

.person-hero h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: var(--accent);
}

.person-hero .summary {
  margin: 0;
  color: var(--text-muted);
}

.section-block {
  margin: 1.75rem 0;
}

.section-block h2 {
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
  color: var(--accent);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.section-content {
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.section-content p {
  margin: 0.6rem 0;
  text-align: justify;
}

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

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

.attachments {
  list-style: none;
  padding: 0;
  margin: 0;
}

.attachments li {
  margin: 0.5rem 0;
  padding: 0.6rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.attachments a {
  font-weight: 500;
}

.back-link {
  display: inline-block;
  margin: 2rem 0 1rem;
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.page-content h2 {
  font-size: 1.3rem;
  color: var(--accent);
  margin: 2rem 0 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--border);
}

.page-content h2:first-child {
  margin-top: 0;
}

.page-content p {
  text-align: justify;
  margin: 0.75rem 0;
}

details {
  margin: 0.75rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--accent);
}

.quote-footer {
  margin-top: 3rem;
  padding: 1.25rem;
  background: var(--bg-accent);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.quote-footer cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.82rem;
  color: var(--text-light);
}

.disclaimer {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

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

.loading,
.error,
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.error {
  color: var(--error);
}

.demo-note {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin: 1rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-accent);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 600px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }

  .logo {
    grid-column: 1;
    grid-row: 1;
  }

  .theme-toggle {
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: center;
  }

  .person-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
