@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Inter:wght@300;400;500&display=swap');

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

:root {
  --black: #080808;
  --black-2: #0d0d0d;
  --black-3: #111111;
  --border: #1e1e1e;
  --border-2: #2a2a2a;
  --text-primary: #ddd8cc;
  --text-secondary: #888880;
  --text-muted: #444440;
  --gold: #c9b87a;
  --gold-dim: #8a7d50;

  --red: #cc2a2a;
  --amber: #c9a84c;
  --silver: #a0a09a;
  --purple: #7b4fa6;
  --blue: #3a7abf;
  --green: #3a8c5c;
  --rust: #b06030;
  --steel: #4a8aaa;
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--text-primary);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* NAV */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 3rem;
  border-bottom: 0.5px solid var(--border);
  background: var(--black);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo { display: flex; align-items: center; gap: 14px; }
.nav-logo img { width: 34px; height: 34px; object-fit: contain; filter: brightness(0.8); }
.nav-brand { font-size: 11px; letter-spacing: 0.2em; color: var(--text-muted); text-transform: uppercase; font-family: 'Inter', sans-serif; }
.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-links a { font-size: 12px; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; font-family: 'Inter', sans-serif; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-search { display: flex; align-items: center; gap: 8px; }
.nav-search input {
  background: var(--black-3); border: 0.5px solid var(--border-2);
  color: var(--text-primary); font-family: 'Inter', sans-serif;
  font-size: 12px; padding: 6px 14px; width: 180px; outline: none;
  transition: border-color 0.2s;
}
.nav-search input:focus { border-color: var(--gold-dim); }
.nav-search input::placeholder { color: var(--text-muted); }

/* HERO */
.hero {
  text-align: center;
  padding: 7rem 2rem 6rem;
  border-bottom: 0.5px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, #1a1000 0%, transparent 65%);
  pointer-events: none;
}
.hero-logo {
  width: 72px; height: 72px; object-fit: contain;
  filter: brightness(0.75) contrast(1.1);
  margin: 0 auto 2.5rem; display: block;
  position: relative;
}
.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 52px; font-weight: 300;
  color: var(--text-primary);
  letter-spacing: 0.08em;
  margin-bottom: 0.8rem;
  position: relative;
}
.hero h1 em { color: var(--gold); font-style: normal; }
.hero-rule { width: 36px; height: 0.5px; background: var(--gold-dim); margin: 1.8rem auto; }
.hero-sub {
  font-size: 15px; color: var(--text-secondary);
  max-width: 520px; margin: 0 auto 1rem;
  line-height: 1.9; font-family: 'Inter', sans-serif;
  font-weight: 300; letter-spacing: 0.01em;
}
.hero-tagline {
  font-size: 14px; color: var(--text-muted);
  font-style: italic; font-family: 'EB Garamond', serif;
  max-width: 400px; margin: 0 auto;
}

/* STATS */
.stats {
  display: flex; justify-content: center;
  border-bottom: 0.5px solid var(--border);
  background: var(--black-2);
}
.stat {
  padding: 2rem 4rem; text-align: center;
  border-right: 0.5px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat-num { font-size: 30px; color: var(--gold); font-family: 'Cormorant Garamond', serif; font-weight: 300; margin-bottom: 4px; }
.stat-label { font-size: 10px; color: var(--text-muted); letter-spacing: 0.16em; text-transform: uppercase; font-family: 'Inter', sans-serif; }

/* SECTION HEADERS */
.section-head { text-align: center; padding: 4rem 2rem 2.5rem; }
.section-head h2 { font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 300; color: var(--text-primary); letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.section-head p { font-size: 12px; color: var(--text-muted); font-family: 'Inter', sans-serif; letter-spacing: 0.06em; }

/* CATEGORIES GRID */
.categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 0.5px solid var(--border);
}
.cat-card {
  padding: 2.5rem 2rem;
  border-right: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  cursor: pointer; transition: background 0.2s;
  text-decoration: none; display: block;
}
.cat-card:nth-child(4n) { border-right: none; }
.cat-card:hover { background: #0f0f0f; }
.cat-accent { width: 24px; height: 1.5px; margin-bottom: 1.2rem; }
.cat-name { font-size: 15px; color: var(--text-primary); margin-bottom: 0.5rem; font-family: 'Cormorant Garamond', serif; letter-spacing: 0.04em; }
.cat-thinkers { font-size: 11px; color: var(--text-muted); font-family: 'Inter', sans-serif; line-height: 1.8; margin-bottom: 1rem; font-weight: 300; }
.cat-count { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; font-family: 'Inter', sans-serif; }

/* QUIZ */
.quiz-section {
  padding: 6rem 2rem;
  border-top: 0.5px solid var(--border);
  background: var(--black-2);
  text-align: center;
}
.quiz-inner { max-width: 580px; margin: 0 auto; }
.quiz-q { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 300; color: var(--text-primary); margin-bottom: 2rem; letter-spacing: 0.03em; }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 1.5rem; }
.quiz-opt {
  padding: 1rem 1.2rem; border: 0.5px solid var(--border-2);
  background: var(--black-3); color: var(--text-secondary);
  font-size: 13px; font-family: 'Inter', sans-serif;
  text-align: left; transition: all 0.15s; letter-spacing: 0.01em;
  font-weight: 300; line-height: 1.5;
}
.quiz-opt:hover { border-color: var(--gold-dim); color: var(--gold); background: #111; }
.quiz-progress { display: flex; gap: 6px; justify-content: center; margin-bottom: 2.5rem; }
.quiz-dot { width: 20px; height: 1px; background: var(--border-2); }
.quiz-dot.active { background: var(--gold); }
.quiz-result { display: none; padding: 2.5rem; border: 0.5px solid var(--border-2); background: var(--black-3); text-align: left; }
.quiz-result.show { display: block; }
.result-label { font-size: 10px; letter-spacing: 0.16em; color: var(--text-muted); text-transform: uppercase; font-family: 'Inter', sans-serif; margin-bottom: 0.5rem; }
.result-title { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 300; margin-bottom: 1rem; }
.result-desc { font-size: 13px; color: var(--text-secondary); font-family: 'Inter', sans-serif; line-height: 1.9; margin-bottom: 1.8rem; font-weight: 300; }
.result-cta {
  display: inline-block; padding: 0.65rem 1.8rem;
  border: 0.5px solid var(--gold-dim); color: var(--gold);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  font-family: 'Inter', sans-serif; transition: all 0.2s; cursor: pointer;
}
.result-cta:hover { background: var(--gold); color: var(--black); }
.quiz-reset { margin-top: 1.2rem; font-size: 11px; color: var(--text-muted); font-family: 'Inter', sans-serif; cursor: pointer; display: block; }
.quiz-reset:hover { color: var(--text-secondary); }

/* FOOTER */
footer {
  padding: 3rem 2rem; border-top: 0.5px solid var(--border);
  text-align: center; background: #060606;
}
footer img { width: 26px; height: 26px; object-fit: contain; filter: brightness(0.45); margin-bottom: 1rem; display: block; margin: 0 auto 1rem; }
footer p { font-size: 11px; color: var(--text-muted); font-family: 'Inter', sans-serif; letter-spacing: 0.08em; margin-bottom: 0.3rem; }
footer a:hover { color: var(--gold); }

/* CATEGORY PAGE */
.page-hero {
  padding: 4rem 3rem 3rem;
  border-bottom: 0.5px solid var(--border);
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0.04; pointer-events: none;
}
.page-back { font-size: 11px; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; font-family: 'Inter', sans-serif; margin-bottom: 1.5rem; display: inline-block; }
.page-back:hover { color: var(--gold); }
.page-accent { width: 32px; height: 1.5px; margin-bottom: 1.2rem; }
.page-title { font-family: 'Cormorant Garamond', serif; font-size: 40px; font-weight: 300; letter-spacing: 0.06em; margin-bottom: 0.6rem; }
.page-thinkers { font-size: 12px; color: var(--text-muted); font-family: 'Inter', sans-serif; letter-spacing: 0.08em; margin-bottom: 1rem; }
.page-desc { font-size: 14px; color: var(--text-secondary); max-width: 560px; line-height: 1.9; font-family: 'Inter', sans-serif; font-weight: 300; }

/* TEXT GRID */
.text-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 0.5px solid var(--border);
}
.text-card {
  padding: 2rem; border-right: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  cursor: pointer; transition: background 0.2s;
  display: block; text-decoration: none;
}
.text-card:nth-child(3n) { border-right: none; }
.text-card:hover { background: var(--black-3); }
.text-author { font-size: 10px; color: var(--text-muted); letter-spacing: 0.14em; text-transform: uppercase; font-family: 'Inter', sans-serif; margin-bottom: 0.5rem; }
.text-title { font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 400; color: var(--text-primary); margin-bottom: 0.5rem; letter-spacing: 0.02em; }
.text-year { font-size: 11px; color: var(--text-muted); font-family: 'Inter', sans-serif; margin-bottom: 0.8rem; }
.text-excerpt { font-size: 12px; color: var(--text-muted); font-family: 'Inter', sans-serif; line-height: 1.7; font-weight: 300; }

/* READER PAGE */
.reader-wrap { max-width: 680px; margin: 0 auto; padding: 4rem 2rem 6rem; }
.reader-meta { margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 0.5px solid var(--border); }
.reader-cat { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; font-family: 'Inter', sans-serif; color: var(--text-muted); margin-bottom: 1rem; }
.reader-title { font-family: 'Cormorant Garamond', serif; font-size: 36px; font-weight: 300; color: var(--text-primary); margin-bottom: 0.5rem; letter-spacing: 0.04em; line-height: 1.3; }
.reader-author { font-size: 13px; color: var(--text-secondary); font-family: 'Inter', sans-serif; font-weight: 300; margin-bottom: 0.3rem; }
.reader-year { font-size: 12px; color: var(--text-muted); font-family: 'Inter', sans-serif; }
.reader-body { font-family: 'EB Garamond', serif; font-size: 18px; line-height: 1.85; color: var(--text-primary); }
.reader-body p { margin-bottom: 1.4rem; }
.reader-body h2 { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 400; color: var(--text-secondary); margin: 2.5rem 0 1rem; letter-spacing: 0.04em; }
.reader-body h3 { font-size: 18px; font-weight: 500; color: var(--text-secondary); margin: 2rem 0 0.8rem; }
.reader-body blockquote { border-left: 1.5px solid var(--gold-dim); padding-left: 1.5rem; color: var(--text-secondary); margin: 2rem 0; font-style: italic; }

/* THINKERS PAGE */
.thinkers-grid { padding: 3rem; }
.alpha-group { margin-bottom: 3rem; }
.alpha-letter { font-family: 'Cormorant Garamond', serif; font-size: 36px; font-weight: 300; color: var(--gold-dim); margin-bottom: 1rem; border-bottom: 0.5px solid var(--border); padding-bottom: 0.5rem; }
.thinker-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.thinker-item {
  padding: 1rem 1.2rem; border: 0.5px solid var(--border);
  margin: -0.5px 0 0 -0.5px; cursor: pointer;
  transition: background 0.15s; display: block; text-decoration: none;
}
.thinker-item:hover { background: var(--black-3); }
.thinker-name { font-size: 14px; color: var(--text-primary); font-family: 'Cormorant Garamond', serif; margin-bottom: 2px; }
.thinker-dates { font-size: 11px; color: var(--text-muted); font-family: 'Inter', sans-serif; }

/* SEARCH PAGE */
.search-wrap { max-width: 800px; margin: 0 auto; padding: 4rem 2rem; }
.search-bar { display: flex; gap: 12px; margin-bottom: 3rem; }
.search-bar input {
  flex: 1; background: var(--black-3); border: 0.5px solid var(--border-2);
  color: var(--text-primary); font-family: 'EB Garamond', serif;
  font-size: 18px; padding: 12px 20px; outline: none; transition: border-color 0.2s;
}
.search-bar input:focus { border-color: var(--gold-dim); }
.search-bar input::placeholder { color: var(--text-muted); }
.search-btn {
  padding: 12px 28px; border: 0.5px solid var(--gold-dim);
  color: var(--gold); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; font-family: 'Inter', sans-serif;
  transition: all 0.2s; background: transparent;
}
.search-btn:hover { background: var(--gold); color: var(--black); }
.search-result {
  padding: 1.5rem 0; border-bottom: 0.5px solid var(--border);
  cursor: pointer; display: block; text-decoration: none;
  transition: padding-left 0.2s;
}
.search-result:hover { padding-left: 8px; }
.search-result-cat { font-size: 10px; color: var(--text-muted); letter-spacing: 0.14em; text-transform: uppercase; font-family: 'Inter', sans-serif; margin-bottom: 4px; }
.search-result-title { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 300; color: var(--text-primary); margin-bottom: 4px; }
.search-result-author { font-size: 12px; color: var(--text-secondary); font-family: 'Inter', sans-serif; }
.search-empty { text-align: center; padding: 4rem 0; color: var(--text-muted); font-family: 'Inter', sans-serif; font-size: 13px; }

/* UTILITIES */
.container { max-width: 1200px; margin: 0 auto; }
.tag {
  display: inline-block; font-size: 9px; letter-spacing: 0.14em;
  text-transform: uppercase; font-family: 'Inter', sans-serif;
  padding: 3px 10px; border: 0.5px solid currentColor; margin-right: 6px;
  margin-bottom: 6px; opacity: 0.7;
}

@media (max-width: 900px) {
  .categories { grid-template-columns: repeat(2, 1fr); }
  .cat-card:nth-child(4n) { border-right: 0.5px solid var(--border); }
  .cat-card:nth-child(2n) { border-right: none; }
  .text-grid { grid-template-columns: repeat(2, 1fr); }
  .text-card:nth-child(3n) { border-right: 0.5px solid var(--border); }
  .text-card:nth-child(2n) { border-right: none; }
  .thinker-list { grid-template-columns: repeat(2, 1fr); }
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .stats { flex-wrap: wrap; }
  .stat { flex: 1 1 50%; }
}
