@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,400&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;1,9..144,300;1,9..144,400&display=swap');

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

:root {
  --bg: #0d0f0e;
  --bg2: #131614;
  --bg3: #1a1d1b;
  --border: #2a2e2c;
  --border2: #3a3e3c;
  --text: #e8ebe9;
  --text2: #9ba89f;
  --text3: #6b7870;
  --accent: #4afa8a;
  --accent2: #2dd46a;
  --accent-dim: rgba(74,250,138,0.08);
  --accent-dim2: rgba(74,250,138,0.15);
  --red: #fa6e4a;
  --amber: #f5c842;
  --blue: #4ab8fa;
  --mono: 'DM Mono', monospace;
  --serif: 'Fraunces', serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,15,14,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: center; gap: 0;
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 1rem 0;
  text-decoration: none;
  margin-right: 2rem;
}

.nav-brand-icon {
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 500;
  color: #0d0f0e;
  font-family: var(--mono);
  flex-shrink: 0;
}

.nav-brand-text {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex; align-items: stretch;
  list-style: none;
  gap: 0;
  flex: 1;
  overflow-x: auto;
}

.nav-links a {
  display: flex; align-items: center;
  padding: 0 1rem;
  height: 56px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  letter-spacing: 0.03em;
}

.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); border-bottom-color: var(--accent); }

.nav-links .num {
  font-size: 10px;
  color: var(--text3);
  margin-right: 6px;
}

/* ── LAYOUT ── */
.page { flex: 1; }

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── HERO ── */
.hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-tag::before {
  content: '';
  width: 20px; height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 14px;
  color: var(--text2);
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 2rem;
}

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  align-items: center;
}

.meta-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text3);
}

.meta-item strong { color: var(--text2); font-weight: 400; }

/* ── PAGE HEADER (inner pages) ── */
.page-header {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.page-header .breadcrumb {
  font-size: 11px; color: var(--text3);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.page-header .breadcrumb a { color: var(--accent); text-decoration: none; }
.page-header .breadcrumb a:hover { text-decoration: underline; }

.page-header h1 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.page-header .module-num {
  font-size: 11px; font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 14px; color: var(--text2);
  max-width: 600px; line-height: 1.75;
}

/* ── SECTIONS ── */
.section { padding: 2.5rem 0; border-bottom: 1px solid var(--border); }
.section:last-child { border-bottom: none; }

.section-label {
  font-size: 11px; font-weight: 500;
  color: var(--text3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.3;
}

h3 {
  font-size: 13px; font-weight: 500;
  color: var(--text);
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

p { font-size: 14px; color: var(--text2); line-height: 1.8; margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── LEARNING OBJECTIVES ── */
.objectives {
  background: var(--accent-dim);
  border: 1px solid rgba(74,250,138,0.2);
  border-radius: 8px;
  padding: 1.5rem;
}

.objectives h3 {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.objectives ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.objectives li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; color: var(--text2); line-height: 1.6;
}

.objectives li::before {
  content: '→';
  color: var(--accent);
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── TOPIC TABLE ── */
.topic-list { display: flex; flex-direction: column; gap: 0; }

.topic-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
}

.topic-item:last-child { border-bottom: 1px solid var(--border); }

.topic-name {
  font-size: 12.5px; font-weight: 500;
  color: var(--text);
  padding-right: 1.5rem;
  line-height: 1.5;
  padding-top: 1px;
}

.topic-desc {
  font-size: 13px; color: var(--text2);
  line-height: 1.7;
}

/* ── MODULE CARDS (index) ── */
.module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin: 1.5rem 0;
}

.module-card {
  background: var(--bg2);
  padding: 1.5rem;
  text-decoration: none;
  transition: background 0.15s;
  display: block;
}

.module-card:hover { background: var(--bg3); }

.module-card-num {
  font-size: 11px; font-weight: 500;
  color: var(--text3);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.module-card-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.module-card-focus {
  font-size: 12px; color: var(--text3);
  margin-bottom: 0.75rem;
}

.module-card-duration {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 10px;
  border-radius: 99px;
}

/* ── LEARNING PATH TABLE ── */
.lp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 1rem 0;
}

.lp-table th {
  text-align: left;
  font-size: 11px; font-weight: 500;
  color: var(--text3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
}

.lp-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
  vertical-align: top;
  line-height: 1.6;
}

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

.lp-table td:first-child {
  color: var(--text3);
  font-size: 12px;
  white-space: nowrap;
}

.lp-table td strong { color: var(--text); font-weight: 500; }

.lp-table a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.lp-table a:hover { color: var(--accent); }

.duration-badge {
  display: inline-flex;
  font-size: 11px; font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 2px 8px;
  border-radius: 99px;
}

/* ── ACTIVITY CARDS ── */
.activity-cards { display: flex; flex-direction: column; gap: 12px; }

.activity-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
}

.activity-card h3 {
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.activity-card p { font-size: 13px; color: var(--text2); }

/* ── COMPETENCY LIST ── */
.competency-list {
  display: flex; flex-direction: column; gap: 0;
}

.competency-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px; color: var(--text2);
  line-height: 1.65;
}

.competency-item:last-child { border-bottom: none; }

.competency-num {
  font-size: 11px; font-weight: 500;
  color: var(--accent);
  font-family: var(--mono);
  flex-shrink: 0;
  margin-top: 2px;
  width: 24px;
}

/* ── INFO BOX ── */
.info-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 1rem 1.25rem;
  font-size: 13px; color: var(--text2);
  line-height: 1.7;
  margin: 1rem 0;
}

.info-box strong { color: var(--text); font-weight: 500; }

/* ── NOTICE ── */
.notice {
  background: rgba(245,200,66,0.06);
  border: 1px solid rgba(245,200,66,0.2);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 12.5px; color: var(--text2);
  margin: 2rem 0 0;
  display: flex; align-items: flex-start; gap: 8px;
}

.notice-icon { color: var(--amber); flex-shrink: 0; }

/* ── PAGE NAV ── */
.page-nav {
  display: flex; justify-content: space-between;
  padding: 2rem 0 3rem;
  gap: 1rem;
}

.page-nav a {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text2);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.15s, color 0.15s;
  max-width: 48%;
}

.page-nav a:hover { border-color: var(--accent); color: var(--accent); }
.page-nav a.next { margin-left: auto; }
.page-nav a span { font-size: 11px; color: var(--text3); display: block; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}

footer p { font-size: 11px; color: var(--text3); margin: 0; }

.footer-notice {
  font-size: 11px; color: var(--text3);
  display: flex; align-items: center; gap: 6px;
}

.footer-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--amber);
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp 0.5s ease both; }
.fade-up-1 { animation-delay: 0.05s; }
.fade-up-2 { animation-delay: 0.12s; }
.fade-up-3 { animation-delay: 0.2s; }
.fade-up-4 { animation-delay: 0.28s; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .container { padding: 0 1.25rem; }
  nav { padding: 0 1.25rem; }
  .module-grid { grid-template-columns: 1fr; }
  .topic-item { grid-template-columns: 1fr; gap: 0.4rem; }
  .topic-name { font-size: 12px; }
  .hero { padding: 3rem 0 2.5rem; }
  .page-nav { flex-direction: column; }
  .page-nav a { max-width: 100%; }
}
