/* Rooted AI — Hack4UCar 2026 Pitch Deliverable
 * Brand discipline: Tanit sapphire + Astaria jade. Never blend.
 */

:root {
  /* Tanit (platform) */
  --tanit: #297ce9;
  --tanit-deep: #1b487e;
  --tanit-light: #6290f9;
  --tanit-soft: #e8f0fc;

  /* Astaria (GreenMetric companion) */
  --astaria: #4a7c59;
  --astaria-deep: #2d4a35;
  --astaria-soft: #a8c4ae;
  --astaria-glow: #6baa7e;
  --astaria-tint: #f0f5f1;

  /* Neutral */
  --bg: #fafaf8;
  --card: #ffffff;
  --text: #18181b;
  --text-soft: #52525b;
  --text-muted: #a1a1aa;
  --border: #e4e4e7;

  /* Status */
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

/* ==========================================================================
   LANDING PAGE
   ========================================================================== */

body.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--bg) 0%, #f5f5f3 100%);
}

.container {
  max-width: 880px;
  width: 100%;
  padding: 80px 32px;
  text-align: center;
}

.hero {
  margin-bottom: 80px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  opacity: 0.9;
}

.brand-mark svg {
  width: 64px;
  height: 64px;
}

.title {
  font-family: 'Fraunces', 'Inter', serif;
  font-size: clamp(64px, 10vw, 120px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
  background: linear-gradient(135deg, var(--tanit-deep) 0%, var(--tanit) 50%, var(--astaria) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 24px;
}

.tagline {
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--text-soft);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.5;
}

.tagline em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--text);
  font-weight: 500;
}

.ctas {
  display: grid;
  gap: 16px;
  max-width: 520px;
  margin: 0 auto 80px;
}

.cta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.cta-primary:hover { border-color: var(--tanit); }
.cta-secondary:hover { border-color: var(--astaria); }
.cta-tertiary:hover { border-color: var(--text-soft); }

.cta-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.cta-label {
  flex: 1;
  text-align: left;
}

.cta-arrow {
  font-size: 20px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.cta:hover .cta-arrow {
  transform: translateX(4px);
  color: var(--text);
}

.footer {
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'Geist Mono', 'JetBrains Mono', monospace;
}

.footer p { margin: 4px 0; }

/* ==========================================================================
   SLIDE DECK
   ========================================================================== */

body.deck {
  background: #0f0f0f;
  color: white;
  overflow: hidden;
  height: 100vh;
}

.deck-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--tanit);
  z-index: 100;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.deck-counter {
  position: fixed;
  bottom: 24px;
  right: 32px;
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.1em;
  z-index: 50;
}

.deck-hint {
  position: fixed;
  bottom: 24px;
  left: 32px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.1em;
  z-index: 50;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  background: var(--bg);
  color: var(--text);
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slide-content {
  max-width: 980px;
  width: 100%;
}

.slide.dark { background: #0f0f0f; color: white; }
.slide.tanit { background: var(--tanit-deep); color: white; }
.slide.tanit-light { background: var(--tanit-soft); color: var(--tanit-deep); }
.slide.astaria { background: var(--astaria-deep); color: white; }
.slide.astaria-light { background: var(--astaria-tint); color: var(--astaria-deep); }
.slide.gradient {
  background: linear-gradient(135deg, var(--tanit-deep) 0%, var(--astaria-deep) 100%);
  color: white;
}

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  opacity: 0.6;
  margin-bottom: 24px;
}

.slide h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 32px;
}

.slide h2 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 24px;
}

.slide h3 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 16px;
}

.slide p {
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.5;
  margin-bottom: 16px;
  max-width: 800px;
}

.slide p.lead {
  font-size: clamp(24px, 3.2vw, 36px);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
}

.slide p.huge {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 600;
  font-family: 'Fraunces', serif;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.slide .stat {
  font-size: clamp(80px, 12vw, 160px);
  font-weight: 700;
  font-family: 'Geist Mono', monospace;
  line-height: 1;
  letter-spacing: -0.04em;
}

.slide .stat-label {
  font-size: 18px;
  opacity: 0.7;
  margin-top: 16px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.team-member {
  padding: 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.team-member .role {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.team-member .desc {
  font-size: 14px;
  opacity: 0.7;
  line-height: 1.5;
}

.cascade-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 48px 0;
  flex-wrap: wrap;
}

.cascade-step {
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
}

.cascade-arrow {
  opacity: 0.5;
}

.signature {
  margin-top: 64px;
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  opacity: 0.5;
  letter-spacing: 0.1em;
}

.deck-back {
  position: fixed;
  top: 24px;
  left: 32px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Geist Mono', monospace;
  z-index: 50;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
}

.deck-back:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   ARCHITECTURE PAGE
   ========================================================================== */

body.architecture {
  background: var(--bg);
  min-height: 100vh;
}

.arch-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 32px;
}

.arch-header {
  margin-bottom: 64px;
  text-align: center;
}

.arch-header h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 16px;
}

.arch-header .lead {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--text-soft);
}

.arch-section {
  background: var(--card);
  border-radius: 24px;
  padding: 48px;
  margin-bottom: 48px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.arch-section .eyebrow {
  color: var(--tanit);
  margin-bottom: 12px;
}

.arch-section.astaria-zone .eyebrow {
  color: var(--astaria);
}

.arch-section h2 {
  font-family: 'Fraunces', serif;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.arch-section h2 + p {
  font-size: 18px;
  color: var(--text-soft);
  margin-bottom: 40px;
  max-width: 720px;
}

/* Cascade diagram */
.cascade {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 32px 16px;
}

.cascade-node {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.cascade-node.role-staff { border-color: var(--text-soft); }
.cascade-node.role-director { border-color: var(--tanit-light); }
.cascade-node.role-dean { border-color: var(--tanit); }
.cascade-node.role-tanit {
  border-color: var(--tanit-deep);
  background: var(--tanit-soft);
}

.cascade-node .role-name {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.cascade-node .person-name {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

.cascade-node .scope {
  font-size: 13px;
  color: var(--text-soft);
  font-family: 'Geist Mono', monospace;
}

.cascade-flow-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, var(--border) 5%, var(--border) 95%, transparent 95%);
  z-index: 1;
}

.cascade-pulse {
  position: absolute;
  top: 50%;
  left: 0;
  width: 12px;
  height: 12px;
  background: var(--tanit);
  border-radius: 50%;
  margin-top: -6px;
  box-shadow: 0 0 16px var(--tanit);
  animation: cascade-flow 4s ease-in-out infinite;
  z-index: 3;
}

@keyframes cascade-flow {
  0% { left: 0%; opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.cascade-up {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  background: var(--astaria);
  border-radius: 50%;
  margin-top: -6px;
  box-shadow: 0 0 16px var(--astaria-glow);
  animation: cascade-up 4s ease-in-out infinite 2s;
  z-index: 3;
}

@keyframes cascade-up {
  0% { left: 100%; opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { left: 0%; opacity: 0; }
}

.cascade-step-list {
  margin-top: 32px;
  display: grid;
  gap: 12px;
}

.cascade-step-list .step {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 14px;
  align-items: flex-start;
}

.step .num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--tanit);
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}

.step .desc { flex: 1; line-height: 1.5; }

/* Stack diagram */
.stack {
  display: grid;
  gap: 12px;
}

.stack-layer {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 24px;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  align-items: center;
}

.stack-layer .label {
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
}

.stack-layer .name {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.stack-layer .detail {
  font-size: 14px;
  color: var(--text-soft);
}

.stack-layer.tanit-tier { border-left: 4px solid var(--tanit); }
.stack-layer.astaria-tier { border-left: 4px solid var(--astaria); }
.stack-layer.infra-tier { border-left: 4px solid var(--text-soft); }
.stack-layer.llm-tier { border-left: 4px solid #a855f7; }

/* 3-layer school architecture */
.three-layer {
  display: grid;
  gap: 24px;
}

.layer-block {
  padding: 32px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.layer-block.layer-1 { background: linear-gradient(180deg, #fef9f3 0%, #fdf6e9 100%); border-color: #f3e0ba; }
.layer-block.layer-2 { background: linear-gradient(180deg, #f0f7ff 0%, #e8f0fc 100%); border-color: #c5d8f7; }
.layer-block.layer-3 { background: linear-gradient(180deg, #f0f5f1 0%, #e8eee9 100%); border-color: #c7d8cc; }

.layer-block .num {
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.layer-block h3 {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 12px;
}

.layer-block p {
  color: var(--text-soft);
  line-height: 1.6;
}

.layer-block .examples {
  margin-top: 16px;
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  color: var(--text-soft);
}

.arch-footer {
  text-align: center;
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  color: var(--text-muted);
}

.arch-footer a { color: var(--tanit); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 32px;
  transition: color 0.2s ease;
}

.back-link:hover { color: var(--text); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* ==========================================================================
   TEAM PAGE
   ========================================================================== */

body.team {
  background: var(--bg);
  min-height: 100vh;
}

.team-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 32px;
}

.team-header {
  margin-bottom: 64px;
  text-align: center;
}

.team-header h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 16px;
}

.team-header .lead {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--text-soft);
  max-width: 640px;
  margin: 0 auto;
}

.founder-card {
  background: linear-gradient(135deg, #18181b 0%, #27272a 100%);
  color: white;
  border-radius: 24px;
  padding: 48px;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}

.founder-card::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(41, 124, 233, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.founder-card .eyebrow {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
}

.founder-card .name {
  font-family: 'Fraunces', serif;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 12px;
}

.founder-card .meta {
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 32px;
}

.founder-card .quote {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.4;
  font-weight: 400;
  max-width: 720px;
  position: relative;
  z-index: 1;
}

.team-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--text-soft);
  margin: 48px 0 16px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.member-card {
  background: var(--card);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--border);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-left-width: 4px;
}

.member-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.member-card.tanit-tier { border-left-color: var(--tanit); }
.member-card.astaria-tier { border-left-color: var(--astaria); }
.member-card.research-tier { border-left-color: #71717a; }
.member-card.og-tier { border-left-color: #a16207; }

.member-card .role-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  margin-bottom: 8px;
}

.member-card.tanit-tier .role-eyebrow { color: var(--tanit); }
.member-card.astaria-tier .role-eyebrow { color: var(--astaria); }
.member-card.research-tier .role-eyebrow { color: #52525b; }
.member-card.og-tier .role-eyebrow { color: #a16207; }

.member-card .member-name {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.member-card .joined {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.member-card .signature {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-soft);
}

.team-philosophy {
  margin-top: 64px;
  padding: 48px;
  background: linear-gradient(135deg, var(--tanit-soft) 0%, var(--astaria-tint) 100%);
  border-radius: 24px;
  text-align: center;
}

.team-philosophy p {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.5;
  color: var(--text);
  max-width: 720px;
  margin: 0 auto;
}

.team-philosophy .author {
  margin-top: 24px;
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  color: var(--text-soft);
  font-style: normal;
}

/* ==========================================================================
   TEAM DECK (presentation-style team page)
   ========================================================================== */

body.team-deck {
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100vh;
}

.member-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 50;
}

.member-nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
  color: inherit;
  font-family: inherit;
  transition: all 0.2s ease;
}

.member-nav .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.member-nav .label {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.member-nav button:hover .label,
.member-nav button.active .label {
  opacity: 0.9;
  transform: translateX(0);
}

.member-nav button.active .dot {
  width: 10px;
  height: 10px;
  background: var(--text);
}

.member-nav button[data-color="dark"].active .dot { background: #18181b; }
.member-nav button[data-color="og"].active .dot { background: #a16207; }
.member-nav button[data-color="tanit"].active .dot { background: var(--tanit); }
.member-nav button[data-color="astaria"].active .dot { background: var(--astaria); }
.member-nav button[data-color="research"].active .dot { background: #71717a; }
.member-nav button[data-color="muted"].active .dot { background: #a1a1aa; }

/* Slides */
.member-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 140px 80px 80px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  background: var(--bg);
  color: var(--text);
  overflow-y: auto;
}

.member-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.member-slide.dark {
  background: linear-gradient(135deg, #18181b 0%, #27272a 100%);
  color: white;
}

.member-slide.og {
  background: linear-gradient(180deg, #fef9f3 0%, #fdf6e9 100%);
  color: var(--text);
}

.member-slide.tanit {
  background: linear-gradient(180deg, #ffffff 0%, var(--tanit-soft) 100%);
}

.member-slide.astaria {
  background: linear-gradient(180deg, #ffffff 0%, var(--astaria-tint) 100%);
}

.member-slide.research {
  background: linear-gradient(180deg, #ffffff 0%, #f4f4f5 100%);
}

.member-slide.muted {
  background: var(--card);
  color: var(--text-soft);
}

.member-slide-content {
  max-width: 880px;
  width: 100%;
}

.role-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  margin-bottom: 16px;
  opacity: 0.7;
}

.member-slide.dark .role-eyebrow { color: rgba(255, 255, 255, 0.55); opacity: 1; }
.member-slide.og .role-eyebrow { color: #a16207; }
.member-slide.tanit .role-eyebrow { color: var(--tanit); }
.member-slide.astaria .role-eyebrow { color: var(--astaria-deep); }
.member-slide.research .role-eyebrow { color: #52525b; }
.member-slide.muted .role-eyebrow { color: #71717a; }

.founder-eyebrow { letter-spacing: 0.2em; }

.member-name-big {
  font-family: 'Fraunces', serif;
  font-size: clamp(64px, 10vw, 120px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 12px;
}

.member-meta {
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  opacity: 0.55;
  margin-bottom: 28px;
}

.member-tagline {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: clamp(20px, 2.6vw, 30px);
  line-height: 1.4;
  font-weight: 400;
  margin-bottom: 40px;
  max-width: 720px;
}

.member-slide.dark .member-tagline { color: rgba(255, 255, 255, 0.9); }

.contribs {
  list-style: none;
  display: grid;
  gap: 8px;
  max-width: 760px;
}

.contribs details {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  border-left: 3px solid currentColor;
  overflow: hidden;
  transition: background 0.2s ease;
}

.member-slide.dark .contribs details {
  background: rgba(255, 255, 255, 0.06);
  border-left-color: rgba(255, 255, 255, 0.4);
}

.member-slide.tanit .contribs details { border-left-color: var(--tanit); }
.member-slide.astaria .contribs details { border-left-color: var(--astaria); }
.member-slide.og .contribs details { border-left-color: #a16207; }
.member-slide.research .contribs details { border-left-color: #71717a; }
.member-slide.muted .contribs details { border-left-color: #a1a1aa; }

.contribs details:hover {
  background: rgba(0, 0, 0, 0.06);
}

.member-slide.dark .contribs details:hover {
  background: rgba(255, 255, 255, 0.09);
}

.contribs summary {
  padding: 14px 18px 14px 44px;
  cursor: pointer;
  font-weight: 500;
  font-size: 15px;
  list-style: none;
  position: relative;
  user-select: none;
}

.contribs summary::-webkit-details-marker { display: none; }
.contribs summary::marker { display: none; }

.contribs summary::before {
  content: "✓";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--success);
  font-weight: 700;
  font-size: 14px;
}

.member-slide.dark .contribs summary::before { color: #4ade80; }

.contribs summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: 300;
  opacity: 0.4;
  transition: transform 0.2s ease;
}

.contribs details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(0deg);
  opacity: 0.7;
}

.contribs details[open] summary {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.member-slide.dark .contribs details[open] summary {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.contribs details > p {
  padding: 14px 18px 18px 44px;
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.8;
}

.member-slide.dark .contribs details > p {
  opacity: 0.75;
  color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   CHAT PAGE
   ========================================================================== */

body.chat-page {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

.chat-header {
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: saturate(180%) blur(8px);
}

.chat-title-block { text-align: center; }

.chat-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  margin-bottom: 4px;
  transition: color 0.3s ease;
}

body.agent-tanit .chat-eyebrow { color: var(--tanit); }
body.agent-astaria .chat-eyebrow { color: var(--astaria); }

.chat-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  transition: color 0.3s ease;
}

body.agent-tanit .chat-title { color: var(--tanit-deep); }
body.agent-astaria .chat-title { color: var(--astaria-deep); }

.chat-spacer { /* keeps grid balanced */ }

.chat-toggle {
  display: flex;
  gap: 0;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: sticky;
  top: 73px;
  z-index: 20;
  justify-content: center;
}

.toggle-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: transparent;
  border: 1px solid var(--border);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.25s ease;
  color: var(--text-soft);
}

.toggle-option:first-child {
  border-radius: 12px 0 0 12px;
  border-right-width: 0;
}

.toggle-option:last-child {
  border-radius: 0 12px 12px 0;
}

.toggle-option:hover { background: rgba(0, 0, 0, 0.03); }

.toggle-option.active {
  color: white;
  border-color: transparent;
}

.toggle-option[data-agent="tanit"].active {
  background: var(--tanit-deep);
}

.toggle-option[data-agent="astaria"].active {
  background: var(--astaria-deep);
}

.toggle-mark {
  width: 22px;
  height: 22px;
  display: inline-flex;
  flex-shrink: 0;
}

.toggle-mark svg { width: 100%; height: 100%; }

.toggle-name { font-weight: 600; }

.toggle-sub {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  opacity: 0.7;
  letter-spacing: 0.02em;
}

.chat-shell {
  flex: 1;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 32px 200px;
  display: flex;
  flex-direction: column;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  max-width: 80%;
  padding: 16px 20px;
  border-radius: 16px;
  line-height: 1.55;
  font-size: 15px;
  animation: msg-in 0.25s ease;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.message.user {
  align-self: flex-end;
  background: var(--text);
  color: white;
  border-bottom-right-radius: 4px;
}

.message.user .message-body p {
  margin: 0;
}
.message.user .message-body p + p {
  margin-top: 8px;
}

.message.agent {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.message.agent.tanit { border-left: 3px solid var(--tanit); }
.message.agent.astaria { border-left: 3px solid var(--astaria); }

.message.agent.opener {
  background: linear-gradient(180deg, var(--card) 0%, rgba(0,0,0,0.01) 100%);
  font-style: italic;
  font-family: 'Fraunces', serif;
}

.message.agent.tanit.opener { background: linear-gradient(180deg, var(--card) 0%, var(--tanit-soft) 100%); }
.message.agent.astaria.opener { background: linear-gradient(180deg, var(--card) 0%, var(--astaria-tint) 100%); }

.message-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  margin-bottom: 8px;
  font-family: 'Inter', sans-serif;
  font-style: normal;
}

.message.agent.tanit .message-header .agent-name { color: var(--tanit); }
.message.agent.astaria .message-header .agent-name { color: var(--astaria-deep); }

.message-body p {
  margin: 0;
}

.message-body p + p {
  margin-top: 12px;
}

/* Markdown rendering inside agent messages */
.message-body h1,
.message-body h2,
.message-body h3,
.message-body h4 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 16px 0 8px;
}
.message-body h1 { font-size: 22px; }
.message-body h2 { font-size: 19px; }
.message-body h3 { font-size: 17px; }
.message-body h4 { font-size: 15px; }
.message-body h1:first-child,
.message-body h2:first-child,
.message-body h3:first-child,
.message-body h4:first-child { margin-top: 0; }

.message-body ul,
.message-body ol {
  margin: 8px 0;
  padding-left: 22px;
}
.message-body li {
  margin: 3px 0;
  line-height: 1.55;
}
.message-body li > p { display: inline; }

.message-body code {
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Geist Mono', monospace;
  font-size: 0.9em;
}

.message-body pre {
  background: rgba(0,0,0,0.04);
  padding: 12px 14px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 10px 0;
  font-size: 13px;
  line-height: 1.5;
}
.message-body pre code {
  background: transparent;
  padding: 0;
  font-size: inherit;
}

.message-body table {
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
  width: 100%;
  font-family: 'Inter', sans-serif;
}
.message-body th,
.message-body td {
  padding: 8px 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.message-body th {
  background: rgba(0,0,0,0.04);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.message.agent.tanit .message-body th {
  background: var(--tanit-soft);
  color: var(--tanit-deep);
}
.message.agent.astaria .message-body th {
  background: var(--astaria-tint);
  color: var(--astaria-deep);
}

.message-body strong { font-weight: 600; }
.message-body em { font-style: italic; }

.message-body blockquote {
  border-left: 3px solid currentColor;
  opacity: 0.7;
  margin: 10px 0;
  padding: 4px 12px;
  font-style: italic;
}

.message-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.message-body a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* User messages should never need markdown — but harmless if they do */
.message.user .message-body * {
  color: inherit;
}

.cursor-blink {
  display: inline-block;
  color: currentColor;
  opacity: 0.5;
  animation: blink 1s step-end infinite;
  margin-left: 1px;
}

@keyframes blink {
  0%, 50% { opacity: 0.5; }
  51%, 100% { opacity: 0; }
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 4px 0;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  animation: typing 1.4s infinite ease-in-out;
}

body.agent-tanit .message.tanit .typing-dots span { background: var(--tanit); }
body.agent-astaria .message.astaria .typing-dots span { background: var(--astaria); }

.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-3px); opacity: 1; }
}

.message-error {
  color: var(--danger);
  font-style: italic;
  font-size: 14px;
}

.chat-input-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  padding: 20px 32px 24px;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 30%);
  z-index: 30;
}

.chat-input-bar > * {
  max-width: 880px;
}

#chat-input {
  flex: 1;
  max-width: 760px;
  margin-left: auto;
  padding: 16px 20px;
  font: inherit;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  resize: none;
  outline: none;
  line-height: 1.4;
  min-height: 52px;
  max-height: 160px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

#chat-input:focus {
  border-color: var(--tanit);
  box-shadow: 0 0 0 3px rgba(41, 124, 233, 0.12);
}

body.agent-astaria #chat-input:focus {
  border-color: var(--astaria);
  box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.18);
}

#chat-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.send-btn {
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 14px;
  background: var(--tanit-deep);
  color: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-right: auto;
  flex-shrink: 0;
}

body.agent-astaria .send-btn {
  background: var(--astaria-deep);
}

.send-btn:hover { transform: translateY(-1px); }
.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.send-btn svg { width: 20px; height: 20px; }

.chat-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 8px 16px 8px;
  pointer-events: none;
  z-index: 5;
}

.chat-footer p {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  pointer-events: auto;
  letter-spacing: 0.02em;
}

.chat-footer a {
  color: var(--text-soft);
  text-decoration: none;
}

.chat-footer a:hover { color: var(--text); }

.chat-footer .dot-sep { margin: 0 8px; opacity: 0.5; }

.chat-disclaimer {
  margin-top: 4px !important;
  opacity: 0.65;
}

@media (max-width: 768px) {
  .container { padding: 48px 20px; }
  .arch-page { padding: 48px 20px; }
  .arch-section { padding: 32px 24px; }
  .cascade { grid-template-columns: 1fr; }
  .cascade-flow-line, .cascade-pulse, .cascade-up { display: none; }
  .stack-layer { grid-template-columns: 1fr; gap: 8px; }
  .slide { padding: 40px 24px; }
  .team-page { padding: 48px 20px; }
  .founder-card { padding: 32px 24px; }
  .team-grid { grid-template-columns: 1fr; }
  .member-slide { padding: 60px 60px 60px 24px; }
  .member-nav { right: 8px; gap: 12px; }
  .member-nav .label { display: none; }
  .deck-hint { display: none; }
  .chat-header { grid-template-columns: 60px 1fr 60px; padding: 16px; }
  .chat-toggle { padding: 12px 16px; top: 65px; }
  .toggle-option { padding: 10px 16px; gap: 8px; font-size: 14px; }
  .toggle-sub { display: none; }
  .chat-shell { padding: 20px 16px 180px; }
  .chat-input-bar { padding: 12px 16px 16px; }
  .message { max-width: 92%; }
}
