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

:root {
  --bg: #fafaf8;
  --bg2: #f2f1ec;
  --bg3: #e8e6de;
  --ink: #1a1916;
  --ink2: #4a4843;
  --ink3: #8a877f;
  --accent: #d4a017;
  --accent2: #2563eb;
  --accent3: #16a34a;
  --accent4: #9333ea;
  --red: #dc2626;
  --border: #e0ddd5;
  --card: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --radius: 12px;
  --radius-lg: 20px;
}

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

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,250,248,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: 'Instrument Serif', serif;
  font-size: 1.4rem; color: var(--ink);
  text-decoration: none;
  display: flex; align-items: center; gap: 0.5rem;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a {
  color: var(--ink2); text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  padding: 0.4rem 0.8rem; border-radius: 6px;
  transition: all 0.15s;
}
.nav-links a:hover { background: var(--bg2); color: var(--ink); }
.nav-cta {
  background: var(--ink) !important; color: var(--bg) !important;
  padding: 0.4rem 1rem !important; border-radius: 8px !important;
}
.nav-cta:hover { background: var(--ink2) !important; }
.nav-hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-hamburger span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.3s; }

.offer-cta {
    margin: 1.5rem 0 2rem;
}

.offer-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 230px;
    padding: 14px 28px;
    border-radius: 12px;
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.offer-button span {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.offer-button small {
    margin-top: 4px;
    font-size: 0.78rem;
    opacity: 0.85;
}

.offer-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.22);
}

/* ── HERO ── */
.hero {
  padding: 6rem 2rem 5rem;
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: #fef3c7; color: #92400e;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.35rem 0.9rem; border-radius: 100px; border: 1px solid #fde68a;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1.12; letter-spacing: -0.02em;
  color: var(--ink); margin-bottom: 1.25rem;
}
.hero h1 em { color: var(--accent); font-style: italic; }
.hero p {
  font-size: 1.1rem; color: var(--ink2); line-height: 1.7;
  margin-bottom: 2rem; max-width: 480px;
}
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--ink); color: var(--bg);
  padding: 0.75rem 1.5rem; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  transition: all 0.2s; box-shadow: var(--shadow);
}
.btn-primary:hover { background: #333; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--card); color: var(--ink);
  padding: 0.75rem 1.5rem; border-radius: 10px;
  font-weight: 500; font-size: 0.95rem; text-decoration: none;
  border: 1px solid var(--border); transition: all 0.2s;
}
.btn-secondary:hover { background: var(--bg2); transform: translateY(-1px); }
.hero-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2.5rem;
}
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
}
.stat-num {
  font-family: 'Instrument Serif', serif;
  font-size: 2rem; color: var(--ink); line-height: 1;
}
.stat-label { font-size: 0.82rem; color: var(--ink3); margin-top: 0.2rem; }
.hero-visual {
  position: relative;
}
.code-window {
  background: #1e1e2e; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.code-titlebar {
  background: #2a2a3e; padding: 0.75rem 1rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.code-filename { margin-left: 0.5rem; font-size: 0.8rem; color: #888; font-family: 'DM Mono', monospace; }
.code-body { padding: 1.5rem; font-family: 'DM Mono', monospace; font-size: 0.82rem; line-height: 1.8; }
.c-comment { color: #6272a4; }
.c-keyword { color: #ff79c6; }
.c-func { color: #50fa7b; }
.c-string { color: #f1fa8c; }
.c-num { color: #bd93f9; }
.c-var { color: #8be9fd; }
.c-plain { color: #f8f8f2; }
.typing-cursor::after { content: '|'; animation: blink 1s infinite; color: var(--accent); }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── SECTIONS ── */
section { padding: 5rem 2rem; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-label {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent2); margin-bottom: 0.75rem;
}
.section-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.15; letter-spacing: -0.02em; color: var(--ink);
  margin-bottom: 1rem;
}
.section-sub { font-size: 1.05rem; color: var(--ink2); max-width: 560px; line-height: 1.7; }

/* ── ROADMAP ── */
.roadmap-section { background: var(--bg2); }
.roadmap-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; margin-top: 3rem; }
.roadmap-card {
  background: var(--card); border-radius: var(--radius-lg);
  padding: 2rem; border: 1px solid var(--border);
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.roadmap-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
}
.roadmap-card.beginner::before { background: var(--accent3); }
.roadmap-card.intermediate::before { background: var(--accent2); }
.roadmap-card.advanced::before { background: var(--accent4); }
.roadmap-level {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.25rem 0.7rem; border-radius: 100px; margin-bottom: 1rem;
}
.beginner .roadmap-level { background: #dcfce7; color: #166534; }
.intermediate .roadmap-level { background: #dbeafe; color: #1e40af; }
.advanced .roadmap-level { background: #f3e8ff; color: #6b21a8; }
.roadmap-card h3 { font-family: 'Instrument Serif', serif; font-size: 1.4rem; margin-bottom: 0.5rem; }
.roadmap-card p { font-size: 0.88rem; color: var(--ink2); margin-bottom: 1.25rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.skill-tag {
  font-size: 0.76rem; padding: 0.2rem 0.6rem; border-radius: 6px;
  background: var(--bg2); border: 1px solid var(--border); color: var(--ink2);
  font-family: 'DM Mono', monospace;
}

/* ── MODULES ── */
.modules-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; margin-top: 3rem; }
.module-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow); transition: all 0.2s;
  text-decoration: none; color: inherit; display: block;
}
.module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--ink); }
.module-num {
  font-family: 'DM Mono', monospace; font-size: 0.78rem;
  color: var(--ink3); margin-bottom: 0.75rem;
}
.module-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.module-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.module-card p { font-size: 0.85rem; color: var(--ink2); line-height: 1.6; margin-bottom: 1rem; }
.module-meta { display: flex; gap: 0.75rem; align-items: center; }
.module-lessons {
  font-size: 0.78rem; color: var(--ink3);
  display: flex; align-items: center; gap: 0.3rem;
}
.module-diff {
  font-size: 0.73rem; font-weight: 600; padding: 0.2rem 0.6rem;
  border-radius: 100px; letter-spacing: 0.04em;
}
.diff-beginner { background: #dcfce7; color: #166534; }
.diff-intermediate { background: #dbeafe; color: #1e40af; }
.diff-advanced { background: #f3e8ff; color: #6b21a8; }

/* ── PROJECTS ── */
.projects-section { background: var(--bg2); }
.projects-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; margin-top: 3rem; }
.project-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow); transition: all 0.2s;
}
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.project-emoji { font-size: 2.2rem; margin-bottom: 0.75rem; }
.project-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.project-card p { font-size: 0.84rem; color: var(--ink2); line-height: 1.6; margin-bottom: 1rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.project-tag {
  font-size: 0.73rem; padding: 0.18rem 0.55rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; color: var(--ink2); font-family: 'DM Mono', monospace;
}

/* ── CHEATSHEETS ── */
.sheets-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-top: 3rem; }
.sheet-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  box-shadow: var(--shadow); transition: all 0.2s;
  text-align: center; cursor: pointer;
}
.sheet-card:hover { transform: translateY(-2px); border-color: var(--accent2); }
.sheet-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.sheet-card h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.25rem; }
.sheet-card p { font-size: 0.78rem; color: var(--ink3); }
.sheet-dl {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.78rem; color: var(--accent2); margin-top: 0.75rem; font-weight: 500;
}

/* ── RESOURCES ── */
.resources-section { background: var(--bg2); }
.resources-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 2rem; margin-top: 3rem; }
.resource-group h3 {
  font-size: 1rem; font-weight: 600; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.resource-list { display: flex; flex-direction: column; gap: 0.6rem; }
.resource-item {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.75rem 1rem;
  text-decoration: none; color: var(--ink); transition: all 0.2s;
}
.resource-item:hover { border-color: var(--accent2); transform: translateX(3px); }
.resource-item-icon { font-size: 1.25rem; }
.resource-item-text { flex: 1; }
.resource-item-title { font-size: 0.9rem; font-weight: 500; }
.resource-item-sub { font-size: 0.78rem; color: var(--ink3); }
.resource-arrow { color: var(--ink3); font-size: 0.8rem; }

/* ── CTA ── */
.cta-section {
  background: var(--ink); color: var(--bg);
  text-align: center; padding: 6rem 2rem;
}
.cta-section .section-title { color: var(--bg); }
.cta-section .section-sub { color: #9ca3af; margin: 0 auto 2rem; }
.cta-section .section-label { color: var(--accent); }
.cta-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.btn-white {
  background: var(--bg); color: var(--ink);
  padding: 0.75rem 1.75rem; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  transition: all 0.2s; display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-white:hover { background: #e5e5e0; transform: translateY(-1px); }
.btn-outline-white {
  border: 1.5px solid #4b5563; color: var(--bg);
  padding: 0.75rem 1.75rem; border-radius: 10px;
  font-weight: 500; font-size: 0.95rem; text-decoration: none;
  transition: all 0.2s; display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-outline-white:hover { border-color: #9ca3af; transform: translateY(-1px); }

/* ── FOOTER ── */
footer {
  background: #111; color: #9ca3af;
  padding: 3rem 2rem 2rem;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 2.5rem; }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; margin-top: 0.75rem; max-width: 260px; }
.footer-col h4 { color: #f3f4f6; font-size: 0.88rem; font-weight: 600; margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col ul li a { color: #9ca3af; text-decoration: none; font-size: 0.84rem; transition: color 0.15s; }
.footer-col ul li a:hover { color: #f3f4f6; }
.footer-bottom {
  border-top: 1px solid #1f2937; padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem;
}
.footer-bottom a { color: #9ca3af; text-decoration: none; }
.footer-bottom a:hover { color: #f3f4f6; }

/* ── CURRICULUM PAGE ── */
.curriculum-hero {
  background: var(--bg2); padding: 4rem 2rem 3rem;
  border-bottom: 1px solid var(--border);
}
.curriculum-hero-inner { max-width: 800px; margin: 0 auto; text-align: center; }
.module-detail { max-width: 900px; margin: 0 auto; padding: 3rem 2rem; }
.module-header {
  display: flex; gap: 1.5rem; align-items: flex-start;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem; margin-bottom: 2rem;
  box-shadow: var(--shadow);
}
.module-header-icon { font-size: 3rem; }
.topic-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }
.topic-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  transition: all 0.15s; cursor: pointer;
}
.topic-item:hover { border-color: var(--accent2); }
.topic-title { font-size: 0.92rem; font-weight: 500; }
.topic-meta { display: flex; gap: 0.75rem; align-items: center; font-size: 0.8rem; color: var(--ink3); }

/* ── PROGRESS BAR ── */
.progress-bar {
  width: 100%; height: 4px; background: var(--border);
  border-radius: 2px; margin-top: 0.4rem;
}
.progress-fill { height: 100%; border-radius: 2px; background: var(--accent3); transition: width 0.8s ease; }

/* ── RESPONSIVE ── */
@media(max-width:1024px) {
  .modules-grid { grid-template-columns: repeat(2,1fr); }
  .projects-grid { grid-template-columns: repeat(2,1fr); }
  .sheets-grid { grid-template-columns: repeat(3,1fr); }
  .roadmap-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media(max-width:768px) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; padding: 3rem 1.25rem 2.5rem; }
  .hero-visual { display: none; }
  .modules-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .sheets-grid { grid-template-columns: repeat(2,1fr); }
  .resources-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  nav.open .nav-links {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 1rem; gap: 0.25rem;
  }
  .footer-top { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
}
@media(max-width:480px) {
  .sheets-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { grid-template-columns: repeat(2,1fr); }
}

/* ── ANIMATIONS ── */
.fade-up {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════════════
   DARK MODE
══════════════════════════════════════ */
[data-theme="dark"] {
  --bg: #0f0f0e;
  --bg2: #1a1916;
  --bg3: #242320;
  --ink: #f0ede6;
  --ink2: #b0ad a6;
  --ink3: #6a6760;
  --border: #2e2c28;
  --card: #1a1916;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.2);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
}
[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
[data-theme="dark"] nav { background: rgba(15,15,14,0.95); border-color: var(--border); }
[data-theme="dark"] .nav-logo { color: var(--ink); }
[data-theme="dark"] .nav-links a { color: var(--ink2); }
[data-theme="dark"] .nav-links a:hover { background: var(--bg2); color: var(--ink); }
[data-theme="dark"] .nav-cta { background: var(--ink) !important; color: var(--bg) !important; }
[data-theme="dark"] .stat-card,
[data-theme="dark"] .module-card,
[data-theme="dark"] .project-card,
[data-theme="dark"] .sheet-card,
[data-theme="dark"] .roadmap-card,
[data-theme="dark"] .resource-item,
[data-theme="dark"] .toc-item,
[data-theme="dark"] .topic-card,
[data-theme="dark"] .mod-header,
[data-theme="dark"] .blog-card,
[data-theme="dark"] .interview-card,
[data-theme="dark"] .glossary-item { background: var(--card); border-color: var(--border); color: var(--ink); }
[data-theme="dark"] .roadmap-section,
[data-theme="dark"] .projects-section,
[data-theme="dark"] .resources-section,
[data-theme="dark"] .sec-alt,
[data-theme="dark"] .mod-section:nth-child(even) { background: var(--bg2); }
[data-theme="dark"] .hero-badge { background: #2a1f00; color: #fbbf24; border-color: #3d2e00; }
[data-theme="dark"] .skill-tag,
[data-theme="dark"] .stag,
[data-theme="dark"] .project-tag,
[data-theme="dark"] .ptag { background: var(--bg3); border-color: var(--border); color: var(--ink2); }
[data-theme="dark"] .code-window { box-shadow: var(--shadow-lg); }
[data-theme="dark"] .btn-secondary { background: var(--bg2); border-color: var(--border); color: var(--ink); }
[data-theme="dark"] .btn-secondary:hover { background: var(--bg3); }
[data-theme="dark"] .section-label { color: #60a5fa; }
[data-theme="dark"] .search-wrap input { background: var(--bg2); border-color: var(--border); color: var(--ink); }
[data-theme="dark"] .search-wrap input::placeholder { color: var(--ink3); }
[data-theme="dark"] #search-results { background: var(--bg2); border-color: var(--border); }
[data-theme="dark"] .sr-item { color: var(--ink); border-color: var(--border); }
[data-theme="dark"] .sr-item:hover { background: var(--bg3); }
[data-theme="dark"] .sr-item strong { color: var(--ink); }
[data-theme="dark"] .sr-item span { color: var(--ink3); }
[data-theme="dark"] .curriculum-hero { background: var(--bg2); border-color: var(--border); }
[data-theme="dark"] .progress-banner { background: var(--bg2); border-color: var(--border); }
[data-theme="dark"] .progress-bar { background: var(--border); }
[data-theme="dark"] .lesson-row { background: var(--card); border-color: var(--border); }
[data-theme="dark"] .lesson-row:hover { border-color: #60a5fa; }
[data-theme="dark"] footer { background: #0a0a09; }
[data-theme="dark"] .footer-bottom { border-color: #1f1e1a; }
[data-theme="dark"] .tag-filter button { background: var(--bg2); border-color: var(--border); color: var(--ink2); }
[data-theme="dark"] .tag-filter button.active,
[data-theme="dark"] .tag-filter button:hover { background: var(--bg3); color: var(--ink); }
[data-theme="dark"] .mod-meta-pill { background: var(--bg3); border-color: var(--border); color: var(--ink2); }

/* ── DARK MODE TOGGLE BUTTON ── */
#dm-toggle {
  background: none; border: 1px solid var(--border);
  border-radius: 8px; padding: 0.3rem 0.6rem;
  cursor: pointer; font-size: 1rem; color: var(--ink2);
  transition: all 0.15s; line-height: 1;
}
#dm-toggle:hover { background: var(--bg2); }

/* ── COPY BUTTON ── */
.copy-btn {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  color: #aaa; font-size: 0.72rem; font-family: 'DM Mono', monospace;
  padding: 0.2rem 0.6rem; border-radius: 5px; cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.copy-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.copy-btn.copied { background: rgba(40,200,80,0.2); color: #50fa7b; border-color: rgba(80,250,123,0.3); }

/* ── SEARCH ── */
.search-wrap {
  position: relative; max-width: 520px; margin: 0 auto 3rem;
}
.search-wrap input {
  width: 100%; padding: 0.85rem 1.25rem 0.85rem 3rem;
  border: 1.5px solid var(--border); border-radius: 12px;
  font-size: 0.95rem; font-family: 'DM Sans', sans-serif;
  background: var(--card); color: var(--ink);
  box-shadow: var(--shadow); transition: all 0.2s;
}
.search-wrap input:focus { outline: none; border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.search-wrap::before {
  content: '🔍'; position: absolute; left: 1rem; top: 50%;
  transform: translateY(-50%); font-size: 1rem; pointer-events: none;
}
#search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg);
  z-index: 200; display: none; overflow: hidden;
}
.sr-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--border); transition: background 0.1s;
  flex-wrap: wrap;
}
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: var(--bg2); }
.sr-tag {
  font-size: 0.68rem; font-weight: 600; padding: 0.15rem 0.5rem;
  border-radius: 100px; background: #dbeafe; color: #1e40af;
  white-space: nowrap; flex-shrink: 0;
}
.sr-item strong { font-size: 0.88rem; flex: 1; min-width: 120px; }
.sr-item span { font-size: 0.78rem; color: var(--ink3); width: 100%; }
.sr-empty { padding: 1rem; font-size: 0.88rem; color: var(--ink3); text-align: center; }

/* ── PROGRESS BANNER ── */
.progress-banner {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
  margin-bottom: 2rem; box-shadow: var(--shadow);
}
.progress-banner-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.progress-banner-top h3 { font-size: 0.9rem; font-weight: 600; }
#progress-label { font-size: 0.82rem; color: var(--ink3); }
.progress-bar { height: 8px; background: var(--bg2); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent3); border-radius: 4px; transition: width 0.6s ease; width: 0%; }

/* ── LESSON ROWS ── */
.lesson-row {
  display: flex; align-items: center; gap: 1rem;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.85rem 1.1rem;
  margin-bottom: 0.5rem; transition: all 0.15s;
}
.lesson-row:hover { border-color: var(--accent2); }
.lesson-check { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent3); flex-shrink: 0; }
.lesson-row.done { opacity: 0.6; }
.lesson-row.done .lesson-title { text-decoration: line-through; }
.lesson-title { font-size: 0.9rem; flex: 1; }
.lesson-duration { font-size: 0.78rem; color: var(--ink3); }

/* ── BLOG ── */
.blog-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; margin-top: 2rem; }
.blog-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); transition: all 0.2s;
  text-decoration: none; color: inherit; display: block;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.blog-thumb {
  height: 140px; display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; background: var(--bg2);
}
.blog-body { padding: 1.25rem; }
.blog-meta { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; flex-wrap: wrap; }
.blog-tag {
  font-size: 0.7rem; font-weight: 600; padding: 0.18rem 0.55rem;
  border-radius: 100px; background: #dbeafe; color: #1e40af;
}
.blog-date { font-size: 0.75rem; color: var(--ink3); }
.blog-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; line-height: 1.4; }
.blog-card p { font-size: 0.83rem; color: var(--ink2); line-height: 1.6; }
.blog-read { font-size: 0.78rem; color: var(--accent2); font-weight: 500; margin-top: 0.75rem; display: inline-block; }

/* ── INTERVIEW ── */
.interview-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 2rem; }
.interview-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
}
.interview-q {
  padding: 1.1rem 1.25rem; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  transition: background 0.15s;
}
.interview-q:hover { background: var(--bg2); }
.interview-q .arrow { transition: transform 0.25s; font-size: 0.8rem; color: var(--ink3); }
.interview-card.open .arrow { transform: rotate(180deg); }
.interview-a {
  padding: 0 1.25rem; max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease, padding 0.2s;
  font-size: 0.88rem; color: var(--ink2); line-height: 1.8;
  border-top: 0px solid var(--border);
}
.interview-card.open .interview-a {
  max-height: 600px; padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
}
.interview-diff {
  font-size: 0.7rem; font-weight: 600; padding: 0.18rem 0.55rem;
  border-radius: 100px; margin-left: 0.5rem; flex-shrink: 0;
}

/* ── GLOSSARY ── */
.glossary-alpha { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 2rem; }
.alpha-btn {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; color: var(--ink2); transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.alpha-btn:hover, .alpha-btn.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.glossary-section { margin-bottom: 2.5rem; }
.glossary-letter {
  font-family: 'Instrument Serif', serif; font-size: 2rem;
  color: var(--ink3); border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem; margin-bottom: 1rem;
}
.glossary-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 0.6rem;
}
.glossary-term { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.35rem; }
.glossary-def { font-size: 0.86rem; color: var(--ink2); line-height: 1.7; }
.glossary-also { font-size: 0.78rem; color: var(--accent2); margin-top: 0.4rem; }

/* ── 404 ── */
.not-found {
  min-height: 80vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 2rem;
}
.not-found-code { font-family: 'Instrument Serif', serif; font-size: 8rem; line-height: 1; color: var(--border); }
.not-found h1 { font-family: 'Instrument Serif', serif; font-size: 2rem; margin-bottom: 1rem; }
.not-found p { color: var(--ink2); max-width: 400px; margin-bottom: 2rem; }

/* ── TAG FILTERS ── */
.tag-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.tag-filter button {
  padding: 0.4rem 1rem; border-radius: 100px; border: 1px solid var(--border);
  background: var(--card); color: var(--ink2); font-size: 0.82rem;
  cursor: pointer; transition: all 0.15s; font-family: 'DM Sans', sans-serif;
}
.tag-filter button.active, .tag-filter button:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ── BACK TO TOP ── */
#back-to-top {
  position: fixed; bottom: 2rem; right: 2rem;
  background: var(--ink); color: var(--bg);
  width: 42px; height: 42px; border-radius: 10px; border: none;
  font-size: 1.1rem; cursor: pointer; opacity: 0; pointer-events: none;
  transition: opacity 0.3s; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg); z-index: 99;
}

@media(max-width:768px) { .blog-grid { grid-template-columns: 1fr; } }
@media(max-width:640px) { .blog-grid { grid-template-columns: 1fr; } }
