/* =============================
   Harbingers — Site Styles (v2)
   Top nav · Large font · Dark theme
   Montserrat + Comfortaa · Accent: #32ea88
   ============================= */

@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;400;600;700&family=Montserrat:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-nav: #0d0d14;
  --bg-hover: #1a1a28;
  --text-primary: #e8e8e8;
  --text-secondary: #9898b0;
  --text-muted: #5a5a72;
  --accent: #32ea88;
  --accent-dim: #1fa86a;
  --accent-glow: rgba(50, 234, 136, 0.12);
  --border: #1a1a2a;
  --border-light: #242438;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-quote: 'Comfortaa', cursive;
  --font-size-base: 20px;
  --line-height-base: 1.55;
  --content-max-width: 820px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: var(--line-height-base);
  min-height: 100vh;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* ===== Top Navigation ===== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  height: 64px;
}

.top-nav .nav-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1200px;
}

.top-nav .nav-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-shrink: 0;
}

.top-nav .nav-brand h1 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-nav .nav-brand .subtitle {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.top-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.top-nav .nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 400;
  transition: all 0.2s ease;
  border-radius: 6px;
  white-space: nowrap;
}

.top-nav .nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.top-nav .nav-links a.active {
  color: var(--accent);
  background: var(--accent-glow);
  font-weight: 500;
}

/* Mobile nav toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.3rem;
  margin-left: auto;
  background: var(--bg-secondary);
}

/* ===== Main Content ===== */
.main-content {
  padding-top: 64px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  flex: 1;
  max-width: var(--content-max-width);
  width: 100%;
  margin: 0 auto;
  padding: 56px 32px 40px;
}

/* ===== Page Header ===== */
.page-header {
  margin-bottom: 40px;
}

.page-header .section-number {
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 500;
  margin-bottom: 8px;
}

.page-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.page-header .divider {
  width: 56px;
  height: 2px;
  background: var(--accent);
  margin-top: 16px;
  border-radius: 1px;
}

/* ===== Typography ===== */
p {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 18px;
  font-weight: 300;
  line-height: 1.7;
}

p strong {
  font-weight: 600;
  color: var(--text-primary);
}

h3 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 40px 0 16px;
  line-height: 1.3;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 28px 0 14px;
  line-height: 1.3;
}

/* ===== Quotes (Comfortaa) ===== */
.quote {
  font-family: var(--font-quote);
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--accent);
  line-height: 1.7;
  padding: 20px 24px;
  margin: 28px 0;
  border-left: 3px solid var(--accent);
  background: var(--accent-glow);
  border-radius: 0 10px 10px 0;
}

.quote p {
  font-family: var(--font-quote);
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 0;
}

/* ===== Character Cards ===== */
.character-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin: 28px 0;
  transition: border-color 0.2s ease;
}

.character-card:hover {
  border-color: var(--border-light);
}

.character-card .char-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.character-card .char-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
}

.character-card .char-title {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.character-card .char-role {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

.character-card .char-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  font-size: 0.9rem;
  margin-bottom: 18px;
  padding: 14px 16px;
  background: var(--bg-primary);
  border-radius: 8px;
}

.character-card .char-meta .label {
  color: var(--text-muted);
  font-weight: 400;
}

.character-card .char-meta .value {
  color: var(--text-primary);
  font-weight: 400;
}

.character-card .char-desc {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 300;
  line-height: 1.7;
}

.character-card .char-desc p {
  font-size: 0.95rem;
  margin-bottom: 10px;
  line-height: 1.7;
}

.character-card .char-quote {
  font-family: var(--font-quote);
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 300;
  padding: 14px 20px;
  margin: 16px 0;
  border-left: 2px solid var(--accent-dim);
  background: var(--accent-glow);
  border-radius: 0 8px 8px 0;
  line-height: 1.7;
}

.char-image-placeholder {
  width: 100%;
  height: 220px;
  background: var(--bg-primary);
  border: 1px dashed var(--border-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.char-image-placeholder span {
  opacity: 0.5;
}

/* ===== Home Page ===== */
.home-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 160px);
}

.home-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.home-title .accent {
  color: var(--accent);
}

.home-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 24px;
}

.home-quote {
  font-family: var(--font-quote);
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 300;
  line-height: 1.8;
  padding: 24px 28px;
  margin: 24px 0 40px;
  border-left: 3px solid var(--accent);
  background: var(--accent-glow);
  border-radius: 0 10px 10px 0;
}

.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  transition: all 0.2s ease;
}

.home-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* ===== Archive Page ===== */
.archive-record {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin: 28px 0;
  font-family: 'Courier New', monospace;
}

.archive-record .record-header {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  letter-spacing: 0.05em;
}

.archive-record .record-warning {
  font-size: 0.82rem;
  color: #e8604c;
  margin-bottom: 20px;
  font-weight: 500;
}

.archive-record .record-entry {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-primary);
  font-weight: 300;
}

.archive-record .record-entry p {
  font-size: 0.92rem;
  margin-bottom: 12px;
  line-height: 1.7;
}

.archive-redacted {
  display: inline;
  background: #1a1a2a;
  color: #2a2a40;
  padding: 0 6px;
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.archive-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ===== Extras / Music ===== */
.music-section {
  margin: 28px 0;
}

.music-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 20px;
}

.music-card h4 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.music-card .music-type {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 8px;
}

.music-card .music-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 10px;
  transition: all 0.2s ease;
}

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

.read-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.read-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.read-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ===== Divider ===== */
.section-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

/* ===== Subsection dividers ===== */
.char-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 48px 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ===== Footer ===== */
.site-footer {
  margin-top: 48px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.site-footer .footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.site-footer .footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.site-footer .footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

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

.site-footer .footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

.site-footer .footer-copy strong {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== Image container ===== */
.image-container {
  margin: 24px 0;
  border-radius: 10px;
  overflow: hidden;
}

.image-container img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.image-container .img-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding: 10px 0;
  font-style: italic;
}

/* ===== Genre Tags ===== */
.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 20px;
}

.genre-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 0.8rem;
  border-radius: 16px;
  font-weight: 500;
}

/* ===== Back to Top ===== */
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-top: 28px;
  transition: color 0.2s ease;
}

.back-to-top:hover {
  color: var(--accent);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  :root {
    --font-size-base: 17px;
  }

  .content-wrapper {
    padding: 32px 16px 32px;
  }

  .home-title {
    font-size: 2.4rem;
  }

  .page-header h2 {
    font-size: 1.7rem;
  }

  .character-card {
    padding: 20px;
  }

  .character-card .char-header {
    flex-direction: column;
  }

  .top-nav {
    padding: 0 16px;
  }

  .top-nav .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px;
    gap: 2px;
  }

  .top-nav .nav-links.open {
    display: flex;
  }

  .top-nav .nav-links a {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .mobile-nav-toggle {
    display: flex;
  }

  .top-nav .nav-brand .subtitle {
    display: none;
  }
}

@media (min-width: 769px) {
  .mobile-nav-toggle {
    display: none !important;
  }
}

/* ===== Print protection ===== */
@media print {
  body { display: none; }
}
