/* LLM Inference Engineer Curriculum — shared lesson styles (Day 1+).
   Day 0 has its own page-specific stylesheet inline. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 18px; line-height: 1.65; color: #1A1A1A; background: #FAF7F2; overflow-x: hidden; }

:root {
  --cream: #FAF7F2; --cream-dark: #F2EDE3;
  --ink: #1A1A1A; --ink-soft: #3A3A3A; --ink-muted: #6E6E6E;
  --rule: #D6CFBF; --accent: #8B2635; --accent-soft: #C44651;
  --gold: #B8932E; --paper: #FFFFFF;
}

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(139, 38, 53, 0.3); transition: all 0.18s ease; }
a:hover { color: var(--accent-soft); border-bottom-color: var(--accent-soft); }
h1, h2, h3, h4 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; line-height: 1.15; color: var(--ink); }
h3 { font-size: 24px; margin: 32px 0 12px; }
h4 { font-size: 18px; margin: 24px 0 8px; }
code, pre { font-family: 'JetBrains Mono', Consolas, monospace; }
code { background: var(--cream-dark); padding: 2px 6px; border-radius: 3px; font-size: 0.9em; color: var(--accent); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 32px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 32px; }

.topbar { border-bottom: 1px solid var(--rule); background: rgba(250, 247, 242, 0.85); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 100; padding: 16px 0; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.topbar-brand { font-weight: 600; color: var(--ink); letter-spacing: 0.12em; }
.topbar-meta a { color: var(--ink-muted); border: none; }
.topbar-meta a:hover { color: var(--accent); }
.topbar-meta span + span { margin-left: 24px; }

.hero { padding: 80px 0 64px; border-bottom: 1px solid var(--rule); }
.hero-eyebrow { font-size: 12px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 24px; }
.hero-icon { font-size: 64px; line-height: 1; margin-bottom: 24px; }
.hero-title { font-size: clamp(44px, 6vw, 76px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 24px; max-width: 18ch; }
.hero-title em { font-style: italic; font-weight: 400; color: var(--accent); }
.hero-deck { font-size: 22px; line-height: 1.5; color: var(--ink-soft); max-width: 60ch; margin-bottom: 32px; font-weight: 300; }
.hero-meta { display: flex; gap: 32px; padding: 24px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-top: 32px; flex-wrap: wrap; }
.hero-meta-item { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); }
.hero-meta-item strong { display: block; color: var(--ink); font-family: 'Fraunces', serif; font-size: 16px; text-transform: none; letter-spacing: 0; margin-top: 4px; font-weight: 500; }

section { padding: 72px 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: none; }
.section-eyebrow { font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 16px; }
.section-title { font-size: clamp(30px, 3.6vw, 42px); font-weight: 500; line-height: 1.1; letter-spacing: -0.015em; margin-bottom: 24px; max-width: 24ch; }
.section-deck { font-size: 19px; line-height: 1.55; color: var(--ink-soft); max-width: 65ch; margin-bottom: 32px; font-weight: 300; }
.section-body { font-size: 17px; line-height: 1.7; color: var(--ink-soft); max-width: 70ch; }
.section-body p { margin-bottom: 16px; }
.section-body p strong { color: var(--ink); font-weight: 600; }
.section-body ul, .section-body ol { margin: 12px 0 20px 24px; }
.section-body li { margin-bottom: 8px; }
.section-body table { border-collapse: collapse; margin: 24px 0; width: 100%; font-size: 15px; max-width: 100%; }
.section-body th { text-align: left; padding: 10px 14px; background: var(--cream-dark); font-family: 'Fraunces', serif; font-size: 13px; letter-spacing: 0.05em; }
.section-body td { padding: 10px 14px; border-bottom: 1px solid var(--cream-dark); vertical-align: top; }
.section-body td code, .section-body th code { background: transparent; color: var(--ink); padding: 0; }

.diagram { margin: 32px auto; max-width: 820px; background: var(--paper); border: 1px solid var(--rule); padding: 24px; }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram-caption { font-size: 13px; color: var(--ink-muted); text-align: center; margin-top: 12px; font-style: italic; }

pre { background: #2A2A2A; color: #F0EAE0; padding: 22px 24px; padding-right: 92px; overflow-x: auto; font-size: 13px; line-height: 1.7; border-left: 3px solid var(--accent); margin: 24px 0; position: relative; }
pre code { color: inherit; background: none; padding: 0; }
.copy-code-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #F0EAE0;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.copy-code-btn:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.32); }
.copy-code-btn.copied { background: var(--accent); border-color: var(--accent); color: #fff; }

.math { background: var(--paper); border: 1px solid var(--rule); padding: 20px 24px; font-family: 'JetBrains Mono', monospace; font-size: 15px; line-height: 1.7; margin: 20px 0; color: var(--ink); white-space: pre-wrap; }

.fact { background: linear-gradient(135deg, #FFF8E8 0%, #FBEFD3 100%); border-left: 4px solid var(--gold); padding: 28px 32px; margin: 40px 0; position: relative; }
.fact::before { content: 'DID YOU KNOW?'; position: absolute; top: -10px; left: 24px; background: var(--gold); color: white; font-size: 10px; letter-spacing: 0.2em; font-weight: 600; padding: 3px 10px; }
.fact-text { font-family: 'Fraunces', serif; font-size: 18px; line-height: 1.5; color: var(--ink); font-weight: 400; padding-top: 4px; }
.fact-text strong { color: var(--accent); font-weight: 600; }
.fact-text a { color: var(--accent); }

.pullquote { text-align: center; padding: 56px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 48px 0; background: var(--paper); }
.pullquote-text { font-family: 'Fraunces', serif; font-size: clamp(24px, 3.2vw, 36px); line-height: 1.3; max-width: 28ch; margin: 0 auto 24px; font-weight: 400; font-style: italic; }
.pullquote-attr { font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-muted); }
.pullquote-attr strong { color: var(--ink); font-weight: 600; }

.lib-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; }
.lib-card { background: var(--paper); border: 1px solid var(--rule); padding: 22px 24px; transition: all 0.18s ease; display: flex; flex-direction: column; cursor: pointer; }
.lib-card:hover { border-color: var(--accent); box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.lib-card-meta { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-muted); margin-bottom: 10px; }
.lib-card h4 { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 600; line-height: 1.3; margin: 0 0 8px; }
.lib-card h4 a { color: var(--ink); border-bottom-color: transparent; }
.lib-card h4 a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.lib-card p { font-size: 13px; line-height: 1.5; color: var(--ink-soft); flex-grow: 1; margin-bottom: 14px; }
.lib-card-link { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); border: none; }
.lib-card-link:after { content: ' →'; }
@media (max-width: 700px) { .lib-grid { grid-template-columns: 1fr; } }

.checklist { margin: 24px 0; padding: 0; list-style: none; counter-reset: ck; }
.checklist li { counter-increment: ck; padding: 14px 0 14px 44px; position: relative; border-bottom: 1px solid var(--cream-dark); font-size: 16px; line-height: 1.5; }
.checklist li::before { content: counter(ck, decimal-leading-zero); position: absolute; left: 0; top: 14px; font-family: 'Fraunces', serif; font-size: 16px; font-weight: 600; color: var(--accent); }

.day-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--rule); }
.day-nav a { padding: 32px 36px; border: none; transition: background 0.18s; display: block; }
.day-nav a:hover { background: var(--cream-dark); }
.day-nav a.prev { border-right: 1px solid var(--rule); text-align: left; }
.day-nav a.next { text-align: right; }
.day-nav-label { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.day-nav-title { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 500; color: var(--ink); }
@media (max-width: 700px) { .day-nav { grid-template-columns: 1fr; } .day-nav a.prev { border-right: none; border-bottom: 1px solid var(--rule); } }

footer { background: var(--cream-dark); color: var(--ink-soft); padding: 56px 0 32px; text-align: center; border-top: 1px solid var(--rule); }
footer h3 { color: var(--ink); font-family: 'Fraunces', serif; font-size: 26px; font-weight: 500; margin-bottom: 16px; }
footer p { font-size: 15px; line-height: 1.6; color: var(--ink-soft); max-width: 56ch; margin: 0 auto 16px; }
footer a { color: var(--accent); border-bottom-color: rgba(139, 38, 53, 0.3); }
footer a:hover { color: var(--accent-soft); border-bottom-color: var(--accent-soft); }
.footer-meta { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 11px; color: var(--ink-muted); letter-spacing: 0.1em; text-transform: uppercase; }

.svg-figure { display: block; margin: 56px auto 16px; max-width: 100%; padding: 0 16px; }
.svg-caption { text-align: center; font-size: 12px; color: var(--ink-muted); font-style: italic; margin: 0 auto 56px; max-width: 60ch; padding: 0 24px; }

.ha-img-placeholder { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; background: #f4f4f5; border: 1px dashed #d4d4d8; border-radius: 8px; color: #71717a; font-size: 12px; font-family: system-ui, sans-serif; min-height: 80px; padding: 16px; box-sizing: border-box; animation: ha-img-pulse 1.5s ease-in-out infinite; }
.ha-img-placeholder.ha-failed { animation: none; opacity: .7; }
@keyframes ha-img-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@media (prefers-color-scheme: dark) { .ha-img-placeholder { background: #27272a; border-color: #3f3f46; color: #a1a1aa; } }
