/* EduPath - Hub & Spoke Layout - Ferrari-inspired dark editorial */
:root {
  --canvas:    #181818;
  --canvas-el: #242424;
  --surface:   #2e2e2e;
  --surface2:  #383838;
  --accent:    #dc2626;
  --accent-d:  #b91c1c;
  --white:     #ffffff;
  --ink-gray:  #d4d4d4;
  --muted:     #888888;
  --hairline:  #333333;
  --hairline-l:#444444;
  --radius-sm: 2px;
  --radius-md: 6px;
  --radius-lg: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--canvas);
  color: var(--ink-gray);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; color: #ef4444; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Header */
.site-header {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-row {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.3px;
  flex-shrink: 0;
}

.brand-light { color: var(--white); }

.brand-dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 9999px;
  flex-shrink: 0;
}

.brand-dot-sm { width: 8px; height: 8px; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--white);
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  margin-left: auto;
}

/* Breadcrumb */
.breadcrumb-wrap {
  background: var(--canvas-el);
  border-bottom: 1px solid var(--hairline);
  padding: 10px 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}

.breadcrumb a { color: var(--muted); text-decoration: none; text-transform: uppercase; letter-spacing: 0.5px; }
.breadcrumb a:hover { color: var(--white); }
.bc-sep { color: var(--hairline-l); }
.bc-current { color: var(--ink-gray); text-transform: uppercase; letter-spacing: 0.5px; }

/* Hero */
.hero {
  background: var(--canvas);
  padding: 0;
  position: relative;
}

.hero-img-wrap {
  width: 100%;
  height: 500px;
  overflow: hidden;
  position: relative;
}

.hero-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(24,24,24,0.9) 0%, rgba(24,24,24,0.3) 60%, transparent 100%);
}

.hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 48px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  max-width: 700px;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 16px;
  color: var(--ink-gray);
  max-width: 560px;
  line-height: 1.7;
}

/* Hub section */
.hub-section {
  padding: 80px 0;
}

.section-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.section-lead {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 40px;
  max-width: 600px;
}

/* Spoke cards (hub & spoke) */
.spoke-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}

.spoke-card {
  background: var(--canvas-el);
  padding: 32px 28px;
  transition: background 0.15s;
  display: block;
  text-decoration: none;
}

.spoke-card:hover {
  background: var(--surface);
  text-decoration: none;
}

.spoke-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.spoke-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
  line-height: 1.3;
}

.spoke-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* Dark band */
.dark-band {
  background: var(--canvas-el);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 64px 0;
}

/* Article */
.article-section { padding: 80px 0; }

.article-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 60px;
  align-items: start;
}

.article-body h1 {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.4px;
  line-height: 1.15;
}

.article-body .lead {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 36px;
}

.article-body h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin: 40px 0 14px;
  padding-top: 40px;
  border-top: 1px solid var(--hairline);
  scroll-margin-top: 80px;
  letter-spacing: -0.2px;
}
.article-body h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

.article-body h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--white);
  margin: 24px 0 10px;
  scroll-margin-top: 80px;
}

.article-body p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-gray);
  margin-bottom: 14px;
  max-width: 680px;
}

.article-body ul, .article-body ol {
  padding-left: 22px;
  margin-bottom: 14px;
  max-width: 680px;
}

.article-body li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-gray);
  margin-bottom: 5px;
}

/* TOC */
.toc-wrap {
  background: var(--canvas-el);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 36px;
}
.toc-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 14px;
}
.toc-list { list-style: none; counter-reset: toc; }
.toc-item { counter-increment: toc; border-bottom: 1px solid var(--hairline); }
.toc-item:last-child { border-bottom: none; }
.toc-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 13px;
  color: var(--ink-gray);
  text-decoration: none;
}
.toc-item a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  min-width: 18px;
}
.toc-item a:hover { color: var(--white); }

/* Sidebar */
.article-sidebar { position: sticky; top: 80px; }
.sidebar-box {
  background: var(--canvas-el);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 20px;
}
.sidebar-box-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 14px;
}
.sidebar-box ul { list-style: none; }
.sidebar-box li { border-bottom: 1px solid var(--hairline); }
.sidebar-box li:last-child { border-bottom: none; }
.sidebar-box a {
  display: block;
  padding: 9px 0;
  font-size: 13px;
  color: var(--ink-gray);
  text-decoration: none;
}
.sidebar-box a:hover { color: var(--white); }

/* Highlight */
.accent-box {
  background: var(--canvas-el);
  border-left: 3px solid var(--accent);
  padding: 18px 22px;
  margin: 24px 0;
  font-size: 14px;
  color: var(--ink-gray);
  line-height: 1.7;
  max-width: 680px;
}
.accent-box strong { color: var(--white); }

/* Collapsible */
details {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--canvas-el);
  max-width: 680px;
}
details summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 14px;
  color: var(--white);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; font-size: 18px; color: var(--accent); }
details[open] summary::after { content: '−'; }
details > div {
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-gray);
  border-top: 1px solid var(--hairline);
}

/* Steps */
.step-list { margin: 20px 0 28px; max-width: 680px; }
.step-item {
  display: flex;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
}
.step-item:last-child { border-bottom: none; }
.step-n {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  min-width: 36px;
  line-height: 1;
}
.step-body h4 { font-size: 15px; font-weight: 600; color: var(--white); margin-bottom: 6px; }
.step-body p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.6; }

/* Related */
.ep-related {
  background: var(--canvas-el);
  border-top: 1px solid var(--hairline);
  padding: 64px 0;
}
.related-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.2px;
  margin-bottom: 32px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.related-card {
  background: var(--canvas);
  padding: 24px;
  display: flex;
  gap: 16px;
  text-decoration: none;
  transition: background 0.15s;
}
.related-card:hover { background: var(--surface); text-decoration: none; }
.rc-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  min-width: 28px;
}
.related-card h3 { font-size: 15px; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.related-card p { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* Footer */
.site-footer { background: #0f0f0f; border-top: 1px solid var(--hairline); }
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 64px;
  padding: 64px 32px 48px;
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { font-size: 13px; color: var(--muted); line-height: 1.6; max-width: 400px; }
.footer-links-col h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 14px;
}
.footer-links-col ul { list-style: none; }
.footer-links-col li { margin-bottom: 8px; }
.footer-links-col a { font-size: 13px; color: var(--muted); text-decoration: none; }
.footer-links-col a:hover { color: var(--white); }
.footer-bar { border-top: 1px solid var(--hairline); padding: 18px 32px; }
.footer-bar p { font-size: 12px; color: #555; text-align: center; }

/* Responsive */
@media (max-width: 1024px) {
  .article-grid { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
}
@media (max-width: 768px) {
  .menu-btn { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--canvas-el);
    border-bottom: 1px solid var(--hairline);
    padding: 16px 32px;
    flex-direction: column;
    gap: 4px;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .hero-img-wrap { height: 360px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .spoke-grid { grid-template-columns: 1fr; }
}
