@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Syne:wght@400;600;700;800&display=swap');

:root {
  --bg: #f5f5f4;
  --surface: #ffffff;
  --border: #dddcd7;
  --accent: #1f6feb;
  --accent2: #0f766e;
  --accent3: #334155;
  --text: #171717;
  --muted: #52525b;
  --yellow: #a16207;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

body::before {
  content: none;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 60px 24px 100px;
  position: relative;
  z-index: 1;
}

/* HEADER */
.header {
  margin-bottom: 64px;
}

.header-tag {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  color: var(--text);
  margin-bottom: 20px;
}

h1 span.accent { color: var(--accent); }
h1 span.accent2 { color: var(--accent2); }

.header-sub {
  color: var(--muted);
  font-size: 12px;
  max-width: 500px;
  line-height: 1.7;
}

.stat-row {
  display: flex;
  gap: 32px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent2);
  letter-spacing: -1px;
}

.stat-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* PHASE CARDS */
.phase {
  margin-bottom: 48px;
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(23, 23, 23, 0.04);
}

.phase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
}

.phase-1::before { background: var(--accent); }
.phase-2::before { background: var(--accent2); }
.phase-3::before { background: var(--accent3); }
.phase-4::before { background: var(--yellow); }
.phase-5::before { background: linear-gradient(90deg, var(--accent), var(--accent3), var(--accent2)); }

.phase-header {
  padding: 28px 32px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}

.phase-num {
  font-family: 'Syne', sans-serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  min-width: 48px;
  opacity: 0.15;
  letter-spacing: -2px;
}

.phase-1 .phase-num { color: var(--accent); opacity: 1; }
.phase-2 .phase-num { color: var(--accent2); opacity: 1; }
.phase-3 .phase-num { color: var(--accent3); opacity: 1; }
.phase-4 .phase-num { color: var(--yellow); opacity: 1; }
.phase-5 .phase-num { color: var(--accent3); opacity: 1; }

.phase-title-block { flex: 1; }

.phase-label {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.phase-1 .phase-label { color: var(--accent); }
.phase-2 .phase-label { color: var(--accent2); }
.phase-3 .phase-label { color: var(--accent3); }
.phase-4 .phase-label { color: var(--yellow); }
.phase-5 .phase-label { color: #aaa; }

.phase-title {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.phase-meta {
  font-size: 11px;
  color: var(--muted);
}

.phase-goal {
  font-size: 12px;
  color: var(--text);
  margin-top: 8px;
  line-height: 1.6;
  opacity: 0.8;
}

.phase-body {
  padding: 32px;
}

/* TOPICS */
.topic-group {
  margin-bottom: 32px;
}

.topic-group:last-child { margin-bottom: 0; }

.topic-group-title {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.topic-group-title .dot {
  display: none;
}

.topics {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.topic {
  display: block;
}

.topic-content {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.topic-name {
  font-size: 12px;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 2px;
  font-family: 'Space Mono', monospace;
}

.topic-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tag {
  font-size: 9px;
  padding: 2px 7px;
  border: 1px solid var(--border);
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.tag.resource { border-color: rgba(15, 118, 110, 0.22); color: var(--accent2); }
.tag.tool { border-color: rgba(31, 111, 235, 0.22); color: var(--accent); }
.tag.project { border-color: rgba(51, 65, 85, 0.22); color: var(--accent3); }
.tag.concept { border-color: rgba(161, 98, 7, 0.22); color: var(--yellow); }

.codeblock {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent3);
  padding: 14px 16px;
  margin: 12px 0;
  font-size: 11px;
  color: var(--text);
  overflow-x: auto;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.codeblock .kw { color: var(--accent3); }
.codeblock .fn { color: var(--accent2); }
.codeblock .cm { color: var(--muted); }
.codeblock .str { color: var(--yellow); }
.codeblock .num { color: var(--accent); }

/* TRACK CARDS (Phase 5) */
.tracks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.track-card {
  border: 1px solid var(--border);
  padding: 20px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface);
}

.track-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}

.track-a::before { background: var(--accent2); }
.track-b::before { background: var(--accent); }
.track-c::before { background: var(--accent3); }

.track-label {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.track-a .track-label { color: var(--accent2); }
.track-b .track-label { color: var(--accent); }
.track-c .track-label { color: var(--accent3); }

.track-title {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 10px;
}

.track-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.track-items li {
  font-size: 11px;
  color: var(--muted);
  padding-left: 12px;
  position: relative;
}

.track-items li::before {
  content: '';
  position: absolute;
  left: 0;
  color: var(--border);
}

/* TIMELINE */
.timeline-bar {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
  margin-bottom: 8px;
}

.tl-cell {
  height: 8px;
  background: var(--border);
  position: relative;
}

.tl-cell.p1 { background: var(--accent); }
.tl-cell.p2 { background: var(--accent2); }
.tl-cell.p3 { background: var(--accent3); }
.tl-cell.p4 { background: var(--yellow); }
.tl-cell.p5 { background: linear-gradient(90deg, var(--accent), var(--accent3)); }

.tl-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 10px;
  color: var(--muted);
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.legend-dot {
  display: none;
}

/* SECTION: PROGRESS */


/* NOTICE BLOCK */
.notice {
  border: 1px solid var(--border);
  padding: 18px 20px;
  margin-bottom: 48px;
  background: var(--surface);
  border-radius: 12px;
}

.notice-icon { display: none; }
.notice-text { font-size: 11px; color: var(--muted); line-height: 1.7; }
.notice-text strong { color: var(--text); }

/* FOOTER */
footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
  gap: 12px;
}

.footer-logo {
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent3);
  letter-spacing: 2px;
}

/* REFERENCE LINKS */
a {
  color: inherit;
  transition: color 0.2s ease;
}

code {
  font-family: 'Space Mono', monospace;
}

a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); }

/* TABLE OF CONTENTS */
.toc-section {
  margin: 40px 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  max-width: 100%;
}

.toc-link {
  padding: 12px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.2s ease;
}

.toc-link:hover {
  background: #f8fafc;
  color: var(--text);
  border-color: var(--accent3);
  transform: none;
}

/* PHASE SUMMARY */
.phase-summary {
  margin: 24px 0;
  padding: 20px;
  background: #fafaf9;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
}

.phase-2 .phase-summary { border-left-color: var(--accent2); }
.phase-3 .phase-summary { border-left-color: var(--accent3); }
.phase-4 .phase-summary { border-left-color: var(--yellow); }
.phase-5 .phase-summary {
  border-left-color: var(--accent3);
  background: #fafaf9;
}

.summary-header {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.summary-list li {
  padding: 8px 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.summary-list li:last-child {
  border-bottom: none;
}

.summary-list li:before {
  content: "";
  margin-right: 0;
}

/* DIFFICULTY BADGES */
.difficulty-badge {
  display: none;
}

/* FAQ SECTION */
.faq-section {
  margin: 48px 0;
  padding: 32px 24px;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border);
}

.faq-section h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 32px;
  color: #1a1a2e;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 12px;
}

.faq-item {
  margin-bottom: 24px;
  padding: 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.faq-item:hover {
  box-shadow: 0 6px 20px rgba(23, 23, 23, 0.05);
}

.faq-question {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  font-size: 15px;
}

.faq-answer {
  color: #555;
  font-size: 14px;
  line-height: 1.8;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.faq-answer code {
  display: inline-block;
  background: #f0f0f5;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  margin: 0 2px;
  font-family: 'Courier New', monospace;
  color: #5a5a7a;
  word-break: break-word;
}

/* PITFALLS SECTION */
.pitfalls-section {
  margin: 48px 0;
  padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.pitfalls-section h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 32px;
  color: #1a1a2e;
  border-bottom: 2px solid #ff6b35;
  padding-bottom: 12px;
}

.pitfall-group {
  margin-bottom: 32px;
  padding: 24px;
  background: #fafaf9;
  border-left: 4px solid var(--yellow);
  border-radius: 10px;
}

.pitfall-group h3 {
  color: #d32f2f;
  margin: 0 0 16px 0;
  font-size: 18px;
}

.pitfall-item {
  margin-bottom: 16px;
  padding: 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}

.pitfall-item strong {
  color: #d32f2f;
}

/* COMMUNITY SECTION */
.community-section {
  margin: 48px 0;
  padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.community-section h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 32px;
  color: #1a1a2e;
  border-bottom: 2px solid #00a878;
  padding-bottom: 12px;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 100%;
}

.community-card {
  padding: 24px;
  background: #fafaf9;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent2);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.community-card:hover {
  box-shadow: 0 6px 20px rgba(23, 23, 23, 0.05);
  transform: none;
}

.community-card h3 {
  color: #00a878;
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 700;
}

.community-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.community-card li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 168, 120, 0.1);
  font-size: 13px;
}

.community-card li:last-child {
  border-bottom: none;
}

.community-card a {
  color: #00a878;
  text-decoration: none;
  font-weight: 500;
}

.community-card a:hover {
  text-decoration: underline;
}

/* TOOLS GUIDE */
.tools-guide-section {
  margin: 48px 0;
  padding: 32px 24px;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border);
}

.tools-guide-section h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 32px;
  color: #1a1a2e;
  border-bottom: 2px solid #4a90e2;
  padding-bottom: 12px;
}

.install-guide {
  margin-bottom: 24px;
  padding: 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.install-guide h3 {
  color: #4a90e2;
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 700;
}

.code-block {
  background: #f7f9fc;
  padding: 16px;
  border-radius: 4px;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
  color: #222;
  border: 1px solid #ddd;
  display: block;
  word-break: break-word;
  white-space: pre-wrap;
  max-width: 100%;
}

/* CHEAT SHEET */
.cheatsheet-section {
  margin: 48px 0;
  padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.cheatsheet-section h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 32px;
  color: #1a1a2e;
  border-bottom: 2px solid #9c27b0;
  padding-bottom: 12px;
}

.cheatsheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 100%;
}

.cheatsheet-card {
  padding: 24px;
  background: white;
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent3);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.cheatsheet-card:hover {
  box-shadow: 0 6px 20px rgba(23, 23, 23, 0.05);
}

.cheatsheet-card h3 {
  color: #9c27b0;
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 700;
}

.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: auto;
}

.ref-table td {
  padding: 12px 8px;
  border-bottom: 1px solid #f0f0f5;
  vertical-align: top;
  text-align: left;
}

.ref-table td:first-child {
  width: 50%;
  background: #f9f7ff;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: #9c27b0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.ref-table code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.ref-table tr:last-child td {
  border-bottom: none;
}

/* FOOTER META */
.footer-meta {
  font-size: 11px;
  color: #999;
  margin-top: 8px;
  letter-spacing: 0.5px;
}

@media (max-width: 900px) {
  .container {
    padding: 40px 18px 72px;
  }

  .phase-header,
  footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .phase-body,
  .phase-header,
  .faq-section,
  .pitfalls-section,
  .community-section,
  .tools-guide-section,
  .cheatsheet-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .community-grid,
  .cheatsheet-grid,
  .tracks {
    grid-template-columns: 1fr;
  }

  .ref-table,
  .ref-table tbody,
  .ref-table tr,
  .ref-table td {
    display: block;
    width: 100%;
  }

  .ref-table td:first-child {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 8px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 12px;
  }

  h1 {
    letter-spacing: -1px;
  }

  .header {
    margin-bottom: 48px;
  }

  .header-tag {
    letter-spacing: 2px;
  }

  .tl-labels,
  .timeline-legend,
  .topic-tags {
    gap: 8px;
  }

  .toc-grid {
    grid-template-columns: 1fr;
  }

  .toc-link,
  .topic-content,
  .faq-item,
  .community-card,
  .install-guide,
  .cheatsheet-card,
  .pitfall-group {
    padding: 14px;
  }

  .codeblock,
  .code-block {
    padding: 12px;
    font-size: 10px;
  }
}
