/* .NET Made Easy — shared styles for the static pages
   (About, Contact, Lessons index, Start Here, Interview Prep, Glossary,
   Cheat Sheet, Privacy, Terms, 404). The course player (index.html) and the
   standalone lesson files carry their own inline styles; keep the tokens here
   in step with them. */

:root {
    --bg-base: #0A0C10;
    --bg-panel: #12151C;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.055);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --text-main: #F8FAFC;
    --text-body: #D5DBE6;
    --text-muted: #94A3B8;
    --text-faint: #64748B;
    --accent: #8B5CF6;
    --accent-soft: rgba(139, 92, 246, 0.14);
    --accent-text: #B79BFF;
    --brand-yellow: #FFC107;
    --good: #34D399;
    --warn: #FBBF24;
    --font: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono: 'Fira Code', 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
    --radius: 12px;
    --radius-lg: 18px;
    --measure: 72ch;
    color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg-base);
    background-image: radial-gradient(circle at 50% -10%, #1A1E2D 0%, var(--bg-base) 60%);
    background-attachment: fixed;
    color: var(--text-body);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-text); text-decoration: none; }
a:hover { color: #fff; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ── Header / nav ─────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 14px clamp(16px, 4vw, 40px);
    background: rgba(10, 12, 16, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -0.3px;
    color: #fff;
    white-space: nowrap;
}
.brand:hover { color: #fff; }
.brand .brand-dot {
    width: 13px; height: 13px; border-radius: 50%;
    background: var(--brand-yellow);
    box-shadow: 0 0 14px rgba(255, 193, 7, 0.45);
    flex-shrink: 0;
}
.brand .brand-light { color: var(--text-muted); font-weight: 500; }
.brand .brand-brackets { color: var(--brand-yellow); font-weight: 700; margin-left: 2px; }

.site-nav { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.site-nav a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 11px;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.06); }
.site-nav a.nav-cta {
    color: #fff;
    background: var(--accent);
    font-weight: 600;
}
.site-nav a.nav-cta:hover { filter: brightness(1.1); }

/* ── Page shell ───────────────────────────────────────────────── */
.page { max-width: 1040px; margin: 0 auto; padding: 44px clamp(16px, 4vw, 40px) 90px; }
.page-narrow { max-width: 820px; }

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--accent-text);
    margin-bottom: 12px;
}
h1, h2, h3, h4 { color: var(--text-main); line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.2vw, 2.7rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.8rem); font-weight: 700; letter-spacing: -0.01em; margin: 52px 0 16px; }
h3 { font-size: 1.2rem; font-weight: 600; margin: 30px 0 10px; }
h4 { font-size: 1.02rem; font-weight: 600; margin: 22px 0 8px; }
.lede { font-size: 1.15rem; color: var(--text-muted); max-width: var(--measure); margin: 0 0 26px; }
p { margin: 0 0 18px; max-width: var(--measure); }
ul, ol { margin: 0 0 18px; padding-left: 24px; max-width: var(--measure); }
li { margin-bottom: 7px; }
li::marker { color: var(--text-faint); }
strong { color: var(--text-main); font-weight: 600; }
hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }

code {
    font-family: var(--mono);
    font-size: 0.86em;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 1px 6px;
    color: #C4B5FD;
    word-break: break-word;
}
pre {
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.6;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    overflow-x: auto;
    margin: 0 0 22px;
    max-width: 100%;
    color: #E6EAF2;
}
pre code { background: none; border: none; padding: 0; font-size: inherit; color: inherit; }

/* ── Cards / grids ────────────────────────────────────────────── */
.grid { display: grid; gap: 16px; margin: 22px 0 30px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
a.card { color: inherit; display: block; }
a.card:hover { background: var(--bg-card-hover); border-color: rgba(139, 92, 246, 0.45); transform: translateY(-2px); color: inherit; }
.card h3 { margin: 0 0 6px; font-size: 1.08rem; }
.card p { margin: 0; font-size: 0.95rem; color: var(--text-muted); }
.card .card-meta { font-size: 12px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--accent-text); margin-bottom: 8px; }
.card .card-link { display: inline-block; margin-top: 12px; font-size: 0.92rem; font-weight: 600; }

.stat-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 34px; }
.stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 18px; min-width: 110px; }
.stat .num { font-size: 22px; font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.stat .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.callout {
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 14px 18px;
    margin: 0 0 22px;
    max-width: var(--measure);
}
.callout p:last-child { margin-bottom: 0; }
.callout.good { border-left-color: var(--good); background: rgba(52, 211, 153, 0.1); }
.callout.warn { border-left-color: var(--warn); background: rgba(251, 191, 36, 0.1); }

.btn, .btn-primary, .btn-secondary {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font); font-weight: 600; font-size: 15px;
    padding: 11px 20px; border-radius: 10px; cursor: pointer; border: 1px solid transparent;
    transition: filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); color: #fff; }
.btn-secondary { background: var(--bg-card); border-color: var(--border-strong); color: var(--text-main); }
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--accent); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 36px; }

.pill {
    display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
    padding: 3px 10px; border-radius: 20px;
    background: var(--accent-soft); color: var(--accent-text); border: 1px solid rgba(139, 92, 246, 0.3);
}

/* ── Tables ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--text-main); font-weight: 600; background: rgba(255, 255, 255, 0.03); font-size: 13px; text-transform: uppercase; letter-spacing: 0.4px; }
tr:last-child td { border-bottom: none; }
td code { white-space: nowrap; }

/* ── Details / FAQ ────────────────────────────────────────────── */
details.faq {
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--bg-card); margin-bottom: 10px; max-width: var(--measure);
}
details.faq summary {
    cursor: pointer; padding: 15px 18px; font-weight: 600; color: var(--text-main);
    list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; color: var(--accent-text); font-size: 20px; font-weight: 400; flex-shrink: 0; }
details.faq[open] summary::after { content: '–'; }
details.faq .faq-body { padding: 0 18px 16px; color: var(--text-body); }
details.faq .faq-body p:last-child { margin-bottom: 0; }

/* ── Table of contents ────────────────────────────────────────── */
.toc { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 34px; max-width: var(--measure); }
.toc .toc-title { font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 24px; }
.toc li { margin-bottom: 4px; break-inside: avoid; font-size: 0.95rem; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* ── Lesson lists (lessons.html, glossary) ────────────────────── */
.lesson-list { margin: 0; padding-left: 22px; max-width: none; }
.lesson-list li { margin-bottom: 5px; }
.lesson-list a { font-size: 1rem; }
.lesson-list li::marker { color: var(--text-faint); font-size: 0.85em; font-variant-numeric: tabular-nums; }

.term { max-width: var(--measure); padding: 14px 0; border-bottom: 1px solid var(--border); }
.term:last-child { border-bottom: none; }
.term dt { font-weight: 600; color: var(--text-main); font-size: 1.05rem; margin-bottom: 4px; }
.term dd { margin: 0; color: var(--text-body); }
.term dd a { font-weight: 500; }
.az { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 30px; }
.az a { font-size: 13px; font-weight: 600; padding: 5px 9px; border-radius: 7px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted); }
.az a:hover { color: #fff; border-color: var(--accent); }
.az-letter { font-size: 1.4rem; margin-top: 36px; color: var(--accent-text); }

/* ── Interview Q&A ────────────────────────────────────────────── */
.qa { max-width: var(--measure); border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); padding: 18px 20px; margin-bottom: 14px; }
.qa .q { font-weight: 600; color: var(--text-main); font-size: 1.05rem; margin-bottom: 8px; }
.qa .a { margin: 0; color: var(--text-body); }
.qa .a p:last-child { margin-bottom: 0; }
.qa .deeper { display: block; margin-top: 10px; font-size: 0.9rem; font-weight: 600; }

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 40px;
    padding: 36px clamp(16px, 4vw, 40px) 44px;
    color: var(--text-muted);
    font-size: 14px;
}
.site-footer .footer-inner { max-width: 1040px; margin: 0 auto; display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.site-footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--text-main); margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: #fff; }
.site-footer .footer-about p { margin: 10px 0 0; font-size: 14px; max-width: 34ch; }
.site-footer .footer-bottom { max-width: 1040px; margin: 30px auto 0; padding-top: 18px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-faint); }
@media (max-width: 820px) { .site-footer .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer .footer-inner { grid-template-columns: 1fr; } }

/* ── Misc ─────────────────────────────────────────────────────── */
.breadcrumb { font-size: 14px; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { margin: 0 6px; opacity: 0.5; }
.muted { color: var(--text-muted); }
.small { font-size: 0.9rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
img { max-width: 100%; height: auto; }

@media (max-width: 640px) {
    body { font-size: 16px; }
    .page { padding-top: 30px; }
    h2 { margin-top: 40px; }
    .card { padding: 18px 18px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    a.card:hover { transform: none; }
}
