/* ==========================================================================
   DGTechQA — Design Tokens
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root{
    /* ── Dark theme palette ── */
    --bg:#0d1117;
    --surface:#161b22;
    --surface-2:#1c2230;
    --surface-3:#212a38;
    --border:#2a3444;
    --border-soft:#1f2a38;
    --text:#e6edf3;
    --muted:#8b949e;
    --muted-2:#4d5967;
    --green:#ef4444;
    --green-dim:rgba(239,68,68,.12);
    --amber:#fbbf24;
    --amber-dim:rgba(251,191,36,.12);
    --red:#f87171;
    --blue:#60a5fa;

    --font-display:'Space Grotesk', sans-serif;
    --font-heading:'Sora', 'Space Grotesk', sans-serif;
    --font-body:'Inter', sans-serif;
    --font-mono:'JetBrains Mono', monospace;

    --radius:10px;
    --radius-lg:16px;
    --shadow-card:0 1px 3px rgba(0,0,0,.3), 0 8px 24px -8px rgba(0,0,0,.5);
    --shadow-glow:0 0 0 1px rgba(239,68,68,.15), 0 0 24px rgba(239,68,68,.08);
}

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

html{ scroll-behavior:smooth; }

body{
    background:var(--bg);
    color:var(--text);
    font-family:var(--font-body);
    line-height:1.5;
    -webkit-font-smoothing:antialiased;
}

a{ color:inherit; text-decoration:none; }
ul{ list-style:none; }
img{ max-width:100%; display:block; }
button{ font-family:inherit; cursor:pointer; }

::selection{ background:rgba(239,68,68,.2); color:var(--green); }

:focus-visible{
    outline:2px solid var(--green);
    outline-offset:2px;
    border-radius:4px;
}

@media (prefers-reduced-motion: reduce){
    *{ animation-duration:0.01ms !important; transition-duration:0.01ms !important; scroll-behavior:auto !important; }
}

/* Dark background with subtle grid */
body{
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
    background-size: 48px 48px;
    background-attachment: local;
}

@media (max-width: 768px) {
    body {
        background-image: none;
        background-color: var(--bg);
    }
}

.container{
    width:92%;
    max-width:1240px;
    margin:0 auto;
}

/* ==========================================================================
   Status pills — the signature device. Every card/section gets a
   PASS/RUNNING/INFO style badge, like a CI dashboard.
   ========================================================================== */
.pill{
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-family:var(--font-mono);
    font-size:11px;
    font-weight:600;
    letter-spacing:.04em;
    text-transform:uppercase;
    padding:4px 10px;
    border-radius:100px;
    line-height:1.4;
}
.pill::before{
    content:'';
    width:6px;
    height:6px;
    border-radius:50%;
    background:currentColor;
    box-shadow:0 0 0 3px currentColor, 0 0 0 3px transparent;
    opacity:.9;
}
.pill-pass{ background:var(--green-dim); color:var(--green); }
.pill-info{ background:rgba(96,165,250,.12); color:var(--blue); }
.pill-warn{ background:var(--amber-dim); color:var(--amber); }
.pill-live{ background:rgba(248,113,113,.12); color:var(--red); }
.pill-live::before{ animation:blink 1.6s ease-in-out infinite; }
@keyframes blink{ 0%,100%{opacity:1;} 50%{opacity:.25;} }

/* ==========================================================================
   Top bar — system status strip (signature: site as live dashboard)
   ========================================================================== */
.statusbar{
    background:#0d1117;
    border-bottom:1px solid var(--border-soft);
    font-family:var(--font-mono);
    font-size:12px;
    color:var(--muted-2);
    position:relative;
    z-index:300;
}
.statusbar .container{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:7px 0;
    gap:16px;
    flex-wrap:wrap;
}
.statusbar .status-left{
    display:flex;
    align-items:center;
    gap:18px;
    flex-wrap:wrap;
}
.statusbar .status-mobile-label{ display:none; }
@media (max-width:768px){
    .statusbar .status-mobile-label{ display:inline; }
}
.statusbar .dot{ width:6px; height:6px; border-radius:50%; background:var(--green); box-shadow:0 0 6px rgba(220,38,38,.4); }
.statusbar .dot.amber{ background:var(--amber); box-shadow:0 0 6px rgba(217,119,6,.4); }

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar{
    background:#0b0e13;
    border-bottom:1px solid var(--border);
    position:sticky;
    top:0;
    z-index:300;
}
.navbar .container{
    display:flex;
    align-items:stretch;
    justify-content:flex-start;
    flex-wrap:nowrap;
    padding:0;
    gap:4px;
}
.logo{
    font-family:var(--font-display);
    font-size:20px;
    font-weight:700;
    color:var(--text);
    display:flex;
    align-items:center;
    gap:8px;
    letter-spacing:-.01em;
    white-space:nowrap;
    padding:0 22px 0 0;
    flex-shrink:0;
}
.logo .bracket{ color:var(--green); }

.menu-toggle{
    display:none;
    background:none;
    border:1px solid var(--border);
    border-radius:8px;
    width:40px;
    height:40px;
    align-items:center;
    justify-content:center;
    color:var(--text);
    align-self:center;
}
.menu-toggle svg{ width:20px; height:20px; }

/* ── Full-width tab bar: each link is a flat, full-height tab.
   The active tab gets a solid amber pill instead of a soft tint,
   so the current page reads instantly at a glance. ── */
.menu{
    display:flex;
    align-items:stretch;
    gap:0;
    flex:1 1 auto;
    flex-wrap:nowrap;
    overflow-x:auto;
    scrollbar-width:none;
    min-width:0;
}
.menu::-webkit-scrollbar{ display:none; }
@media (min-width:769px){
    .menu{ margin-left:0; }
    /* Guest-only links (Log In / Register / etc.) live in the mobile
       drawer only — desktop already shows Login/Register buttons in
       the header, so hide the duplicates in the horizontal menu. */
    .menu li.guest-only{ display:none !important; }
}
.menu li{ position:relative; list-style:none; display:flex; flex-shrink:0; }
.menu a{
    display:flex;
    align-items:center;
    gap:5px;
    height:58px;
    color:var(--muted);
    font-family:var(--font-display);
    font-size:13.5px;
    font-weight:600;
    padding:0 13px;
    white-space:nowrap;
    transition:color .15s ease, background .15s ease;
}
.menu a:hover{ color:var(--text); background:rgba(255,255,255,.04); }
.menu a.active{ color:#0b0e13; background:var(--amber); font-weight:700; }
.menu a.active:hover{ color:#0b0e13; background:var(--amber); }
.menu a:not(.active)::after{
    content:'';
    position:absolute;
    left:13px; right:13px; bottom:0;
    height:2px;
    background:var(--green);
    transform:scaleX(0);
    transition:transform .15s ease;
}
.menu a:not(.active):hover::after{ transform:scaleX(1); }
.menu .ico{ font-size:14px; opacity:.85; }

/* Home link now matches every other tab in the bar — no more
   special-cased plain-text treatment. */
#navHomeLink{ font-weight:600; }

/* ── Practice dropdown submenu ── */
.menu li.has-dropdown > a{
    display:flex; align-items:center; gap:6px;
    height:58px;
    color:var(--muted); font-family:var(--font-display); font-size:14px; font-weight:600;
    padding:0 16px; transition:.15s ease;
    cursor:pointer;
}
.menu li.has-dropdown > a:hover{ color:var(--text); background:rgba(255,255,255,.04); }
.menu li.has-dropdown > a.active{ color:#0b0e13; background:var(--amber); font-weight:700; }
.menu li.has-dropdown > a .dropdown-arrow{
    font-size:10px; opacity:.6; margin-left:2px;
    transition:transform .2s ease;
}
.menu li.has-dropdown:hover > a .dropdown-arrow,
.menu li.has-dropdown.open > a .dropdown-arrow{ transform:rotate(180deg); }
.dropdown-menu{
    display:none;
    position:absolute; top:calc(100% + 6px); left:0;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:10px;
    min-width:200px;
    padding:6px;
    box-shadow:0 8px 24px rgba(0,0,0,.4);
    z-index:999;
    flex-direction:column; gap:2px;
}
.menu li.has-dropdown:hover .dropdown-menu,
.menu li.has-dropdown.open .dropdown-menu{ display:flex; }
.dropdown-menu a{
    display:flex; align-items:center; gap:8px;
    color:var(--muted); font-size:13px; font-weight:500;
    padding:9px 12px; border-radius:7px;
    transition:.15s ease; white-space:nowrap;
}
.dropdown-menu a:hover{ color:var(--text); background:var(--surface-2); }
.dropdown-menu a.active{ color:var(--amber); background:var(--amber-dim); }

.auth-buttons{ display:flex; align-items:center; gap:8px; flex-shrink:0; align-self:center; padding-left:10px; }
.auth-buttons a{
    padding:9px 16px;
    border-radius:8px;
    font-family:var(--font-display);
    font-size:13px;
    font-weight:600;
    border:1px solid transparent;
    transition:.15s ease;
    white-space:nowrap;
}
.login-btn{ color:var(--text); border-color:var(--border); }
.login-btn:hover{ background:var(--surface-2); }
.register-btn{ background:var(--green); color:#06231a; }
.register-btn:hover{ background:#2bbd8a; box-shadow:0 0 0 3px rgba(239,68,68,.2); }

/* ==========================================================================
   Hero — terminal window with typed command
   ========================================================================== */
.hero{ padding:64px 0 56px; }
.hero .container{
    display:grid;
    grid-template-columns:1.05fr .95fr;
    grid-template-rows:auto auto;
    gap:32px 48px;
    align-items:start;
}
/* Desktop: hero-text top-left, terminal spans both rows on right, stats bottom-left */
.hero-text{
    grid-column:1;
    grid-row:1;
}
.hero-stats{
    grid-column:1;
    grid-row:2;
    display:flex;
    gap:28px;
    flex-wrap:wrap;
}
.terminal{
    grid-column:2;
    grid-row:1 / 3;
    align-self:center;
}
.hero-eyebrow{
    display:inline-flex;
    align-items:center;
    gap:8px;
    font-family:var(--font-mono);
    font-size:12px;
    color:var(--green);
    background:var(--green-dim);
    padding:6px 12px;
    border-radius:100px;
    margin-bottom:20px;
}
.hero h1{
    font-family:var(--font-heading);
    font-size:clamp(26px, 3.4vw, 40px);
    line-height:1.15;
    font-weight:700;
    letter-spacing:-.015em;
    margin-bottom:18px;
}
.hero h1 .accent{
    color:var(--green);
    animation: textPulse 2.5s ease-in-out infinite;
    display:inline-block;
}
@keyframes textPulse{
    0%,100%{ color:#ef4444; text-shadow:none; opacity:1; }
    50%{ color:#6ee7b7; text-shadow:0 0 20px rgba(239,68,68,.55), 0 0 40px rgba(239,68,68,.25); opacity:.9; }
}
.hero p.lede{
    color:var(--muted);
    font-size:17px;
    max-width:520px;
    margin-bottom:28px;
}
.hero-cta{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom:32px; }
.btn-primary{
    background:var(--green);
    color:#06231a;
    padding:13px 24px;
    border-radius:8px;
    font-weight:700;
    font-size:14px;
    border:none;
    display:inline-flex;
    align-items:center;
    gap:8px;
    transition:.15s ease;
}
.btn-primary:hover{ background:#2bbd8a; transform:translateY(-1px); }
.btn-secondary{
    background:transparent;
    color:var(--text);
    padding:13px 24px;
    border-radius:8px;
    font-weight:600;
    font-size:14px;
    border:1px solid var(--border);
    display:inline-flex;
    align-items:center;
    gap:8px;
    transition:.15s ease;
}
.btn-secondary:hover{ background:var(--surface-2); border-color:var(--muted-2); }

.hero-stats{ display:flex; gap:28px; flex-wrap:wrap; }
.hero-stats .stat-num{
    font-family:var(--font-mono);
    font-size:22px;
    font-weight:600;
    color:var(--text);
}
.hero-stats .stat-label{ font-size:12px; color:var(--muted-2); }

/* terminal card — stays dark for authentic code-editor feel */
.terminal{
    background:#0f172a;
    border:1px solid #1e293b;
    border-radius:var(--radius-lg);
    box-shadow:0 4px 24px rgba(0,0,0,.18), var(--shadow-card);
    overflow:hidden;
}
.terminal-head{
    display:flex;
    align-items:center;
    gap:8px;
    padding:12px 16px;
    background:#1e293b;
    border-bottom:1px solid #334155;
}
.terminal-dot{ width:11px; height:11px; border-radius:50%; }
.terminal-dot.red{ background:#f87171; }
.terminal-dot.amber{ background:#fbbf24; }
.terminal-dot.green{ background:#ef4444; }
.terminal-title{
    margin-left:8px;
    font-family:var(--font-mono);
    font-size:12px;
    color:#64748b;
}
.terminal-body{
    padding:22px 20px;
    font-family:var(--font-mono);
    font-size:13.5px;
    line-height:1.85;
    min-height:230px;
}
.terminal-body .prompt{ color:#ef4444; }
.terminal-body .path{ color:#60a5fa; }
.terminal-line{ color:#94a3b8; white-space:pre-wrap; }
.terminal-line .ok{ color:#ef4444; }
.terminal-line .warn{ color:#fbbf24; }
.cursor{
    display:inline-block;
    width:7px;
    height:14px;
    background:var(--green);
    margin-left:2px;
    animation:caret 1s steps(1) infinite;
    vertical-align:-2px;
}
@keyframes caret{ 0%,50%{opacity:1;} 50.01%,100%{opacity:0;} }

/* ==========================================================================
   Section heading pattern
   ========================================================================== */
.section{ padding:56px 0; }
.section-head{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:16px;
    margin-bottom:28px;
    flex-wrap:wrap;
}
.section-eyebrow{
    font-family:var(--font-mono);
    font-size:12px;
    color:var(--green);
    text-transform:uppercase;
    letter-spacing:.08em;
    margin-bottom:8px;
    display:block;
}
.section-head h2{
    font-family:var(--font-display);
    font-size:clamp(22px,2.6vw,30px);
    font-weight:700;
    letter-spacing:-.01em;
}
.section-head .section-sub{ color:var(--muted); font-size:14px; max-width:480px; }
.section-link{
    font-size:13px;
    font-weight:600;
    color:var(--green);
    display:flex;
    align-items:center;
    gap:6px;
    white-space:nowrap;
}

/* ==========================================================================
   Dashboard grid / cards
   ========================================================================== */
.dashboard{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(270px,1fr));
    gap:18px;
}

.card{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    padding:22px;
    box-shadow:var(--shadow-card);
    transition:transform .2s ease, border-color .2s ease;
    position:relative;
    display:flex;
    flex-direction:column;
}
.card:hover{
    transform:translateY(-3px);
    border-color:#ef4444;
    box-shadow:0 0 0 1px rgba(239,68,68,.1), var(--shadow-card);
}
.card-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
    margin-bottom:14px;
}
.card-icon{
    width:38px;
    height:38px;
    border-radius:9px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
    background:var(--surface-2);
    border:1px solid var(--border);
    flex-shrink:0;
}
.card h3{
    font-family:var(--font-display);
    font-size:17px;
    font-weight:600;
    margin-bottom:8px;
}
.card p{ color:var(--muted); font-size:13.5px; margin-bottom:0; }
.card-meta{
    display:flex;
    align-items:center;
    justify-content:space-between;
    font-family:var(--font-mono);
    font-size:12px;
    color:var(--muted-2);
    margin-bottom:14px;
    padding-top:14px;
    border-top:1px solid var(--border-soft);
    margin-top:auto;
}
.card-cta{
    background:transparent;
    color:var(--text);
    border:1px solid var(--border);
    width:100%;
    padding:10px;
    border-radius:8px;
    font-size:13px;
    font-weight:600;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    transition:.15s ease;
}
.card-cta:hover{ background:var(--green); color:#06231a; border-color:var(--green); }

/* ==========================================================================
   Feed list (forum-style rows for interview Qs / jobs / blogs)
   ========================================================================== */
.feed{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    overflow:hidden;
}
.feed-row{
    display:flex;
    align-items:flex-start;
    gap:16px;
    padding:18px 20px;
    border-bottom:1px solid var(--border-soft);
    transition:background .15s ease;
}
.feed-row:last-child{ border-bottom:none; }
.feed-row:hover{ background:var(--surface-2); }
.feed-tag{
    font-family:var(--font-mono);
    font-size:11px;
    color:var(--muted-2);
    background:var(--surface-2);
    border:1px solid var(--border);
    padding:3px 8px;
    border-radius:6px;
    flex-shrink:0;
    margin-top:2px;
}
.feed-body h4{ font-size:14.5px; font-weight:600; margin-bottom:5px; }
.feed-body p{ font-size:13px; color:var(--muted); }
.feed-meta{
    margin-left:auto;
    text-align:right;
    font-family:var(--font-mono);
    font-size:11.5px;
    color:var(--muted-2);
    flex-shrink:0;
    white-space:nowrap;
}

/* ==========================================================================
   Form (login / register) — console-panel styling
   ========================================================================== */
.form-shell{
    min-height:calc(100vh - 100px);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:48px 20px;
}
.form-container{
    width:420px;
    max-width:100%;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow-card);
    overflow:hidden;
}
.form-header{
    background:var(--surface-2);
    border-bottom:1px solid var(--border);
    padding:14px 20px;
    display:flex;
    align-items:center;
    gap:8px;
}
.form-header .terminal-title{ margin-left:4px; }
.form-body{ padding:32px 28px; }
.form-body h2{
    font-family:var(--font-display);
    font-size:24px;
    font-weight:700;
    margin-bottom:6px;
}
.form-body .form-sub{ color:var(--muted); font-size:13.5px; margin-bottom:26px; }

.field{ margin-bottom:16px; }
.field label{
    display:block;
    font-family:var(--font-mono);
    font-size:11.5px;
    color:var(--muted-2);
    text-transform:uppercase;
    letter-spacing:.05em;
    margin-bottom:6px;
}
input, select{
    width:100%;
    padding:12px 14px;
    background:var(--surface-2);
    border:1px solid var(--border);
    border-radius:8px;
    color:var(--text);
    font-size:14px;
    font-family:var(--font-body);
    transition:border-color .15s ease, box-shadow .15s ease;
}
input::placeholder{ color:var(--muted-2); }
input:focus, select:focus{
    outline:none;
    border-color:var(--green);
    box-shadow:0 0 0 3px rgba(239,68,68,.1);
    background:var(--surface-3);
}
.field-error{
    font-family:var(--font-mono);
    font-size:11.5px;
    color:var(--red);
    margin-top:6px;
    display:none;
}
.field.has-error input{ border-color:var(--red); }
.field.has-error .field-error{ display:block; }

.pass-toggle-wrap{ position:relative; }
.pass-toggle{
    position:absolute;
    right:10px;
    top:50%;
    transform:translateY(-50%);
    background:none;
    border:none;
    color:var(--muted-2);
    font-size:12px;
    font-family:var(--font-mono);
    padding:4px 6px;
}
.pass-toggle:hover{ color:var(--text); }

button[type="submit"]{
    width:100%;
    padding:13px;
    background:var(--green);
    color:#06231a;
    border:none;
    border-radius:8px;
    font-weight:700;
    font-size:14px;
    margin-top:6px;
    transition:.15s ease;
}
button[type="submit"]:hover{ background:#2bbd8a; box-shadow:0 0 20px rgba(239,68,68,.25); }
button[type="submit"]:disabled{ opacity:.6; cursor:not-allowed; }

.form-footer-link{
    text-align:center;
    margin-top:20px;
    font-size:13px;
    color:var(--muted);
}
.form-footer-link a{ color:var(--green); font-weight:600; }

.form-toast{
    margin-top:16px;
    padding:10px 14px;
    border-radius:8px;
    font-family:var(--font-mono);
    font-size:12.5px;
    display:none;
    align-items:center;
    gap:8px;
}
.form-toast.show{ display:flex; }
.form-toast.ok{ background:var(--green-dim); color:var(--green); }
.form-toast.err{ background:rgba(248,113,113,.12); color:var(--red); }

/* ==========================================================================
   Footer — Zoho-style
   ========================================================================== */
footer{
    position:relative;
    border-top:1px solid var(--border-soft);
    background:#0a0e14;
    padding:0 0 24px;
    margin-top:40px;
}
/* multi-color accent bar across the very top of the footer */
footer::before{
    content:'';
    display:block;
    height:3px;
    width:100%;
    background:linear-gradient(90deg,#ef4444 0%,#f59e0b 20%,#10b981 40%,#3b82f6 60%,#8b5cf6 80%,#06b6d4 100%);
}
footer .container{ padding-top:44px; }
.footer-grid{
    display:grid;
    grid-template-columns:1.2fr .8fr .9fr .9fr 1fr .9fr .8fr 1fr;
    gap:0;
    margin-bottom:32px;
}
.footer-grid > div{
    padding:0 22px;
    border-left:1px solid var(--border-soft);
}
.footer-grid > div:first-child{
    padding-left:0;
    border-left:none;
}
.footer-brand p{ color:var(--muted); font-size:13px; margin-top:10px; max-width:260px; line-height:1.6; }
.footer-social{
    display:flex;
    align-items:center;
    gap:8px;
    margin-top:18px;
}
.footer-social a{
    display:flex;align-items:center;justify-content:center;
    width:32px;height:32px;border-radius:8px;
    background:rgba(255,255,255,.04);
    border:1px solid var(--border-soft);
    color:var(--muted);
    font-size:14px;
    transition:color .2s, border-color .2s, background .2s, transform .2s;
}
.footer-social a:hover{
    color:#fff;
    border-color:#ef4444;
    background:rgba(239,68,68,.12);
    transform:translateY(-2px);
}
.footer-col h5{
    font-family:var(--font-display,'Inter',sans-serif);
    font-size:12.5px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.08em;
    color:var(--text);
    margin-bottom:16px;
    position:relative;
}
.footer-col a{
    display:block;
    color:var(--muted);
    font-size:13.5px;
    margin-bottom:11px;
    transition:color .15s ease, transform .15s ease;
}
.footer-col a:hover{ color:var(--green); transform:translateX(2px); }
.footer-contact .contact-name{
    color:var(--text);
    font-size:13.5px;
    font-weight:600;
    margin-bottom:4px;
}
.footer-contact .contact-role{
    color:var(--muted-2);
    font-size:12px;
    font-family:var(--font-mono);
    margin-bottom:12px;
}
.footer-contact .contact-line{
    display:flex;
    align-items:center;
    gap:7px;
    color:var(--green);
    font-family:var(--font-mono);
    font-size:13px;
    font-weight:600;
}
.footer-contact .contact-line:hover{ color:#b91c1c; }
.footer-contact .admin-lock{
    color:var(--muted-2);
    font-size:13px;
    margin-top:10px;
    opacity:.5;
    width:fit-content;
}
.footer-contact .admin-lock:hover{ color:var(--muted); opacity:1; }
.footer-bottom{
    border-top:1px solid var(--border-soft);
    padding-top:20px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:10px;
    font-family:var(--font-mono);
    font-size:12px;
    color:var(--muted-2);
}
.footer-bottom-links{
    display:flex;
    align-items:center;
    gap:16px;
    flex-wrap:wrap;
}
.footer-bottom-links a{
    color:var(--muted-2);
    font-family:var(--font-mono);
    font-size:12px;
    transition:color .15s ease;
}
.footer-bottom-links a:hover{ color:var(--text); }
.footer-bottom-badge{
    display:inline-flex;
    align-items:center;
    gap:6px;
    color:var(--green);
}
.footer-bottom-badge::before{
    content:'';
    width:6px;height:6px;border-radius:50%;
    background:var(--green);
    box-shadow:0 0 8px var(--green);
}

/* ==========================================================================
   Module page header (Discussions, Interviews, Jobs, etc.)
   ========================================================================== */
.page-header{
    padding:40px 0 28px;
    border-bottom:1px solid var(--border-soft);
    background:var(--surface);
}
.page-header-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;
    flex-wrap:wrap;
    margin-bottom:18px;
}
.page-icon-badge{
    width:48px;
    height:48px;
    border-radius:12px;
    background:var(--surface-2);
    border:1px solid var(--border);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:22px;
    flex-shrink:0;
}
.page-title-row{ display:flex; align-items:flex-start; gap:14px; }
.page-header h1{
    font-family:var(--font-display);
    font-size:clamp(24px,3vw,32px);
    font-weight:700;
    letter-spacing:-.01em;
    margin-bottom:4px;
}
.page-header .page-sub{ color:var(--muted); font-size:14.5px; max-width:520px; }
.page-stats{ display:flex; gap:24px; flex-wrap:wrap; }
.page-stats .stat-num{ font-family:var(--font-mono); font-size:19px; font-weight:600; color:var(--text); }
.page-stats .stat-label{ font-size:11.5px; color:var(--muted-2); }

.filter-row{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}
.chip{
    font-family:var(--font-mono);
    font-size:12.5px;
    font-weight:500;
    color:var(--muted);
    background:var(--surface);
    border:1px solid var(--border);
    padding:7px 14px;
    border-radius:100px;
    transition:.15s ease;
    cursor:pointer;
}
.chip:hover{ border-color:var(--muted-2); color:var(--text); }
.chip.active{ background:var(--green-dim); color:var(--green); border-color:transparent; }

/* ==========================================================================
   Detail list rows (extends .feed for richer module content)
   ========================================================================== */
.feed-row-link{ display:flex; width:100%; gap:16px; align-items:flex-start; }
.feed-row .feed-tag.tag-green{ color:var(--green); border-color:var(--green-dim); background:var(--green-dim); }
.feed-row .feed-tag.tag-amber{ color:var(--amber); border-color:var(--amber-dim); background:var(--amber-dim); }
.feed-row .feed-tag.tag-blue{ color:var(--blue); border-color:rgba(96,165,250,.2); background:rgba(96,165,250,.1); }

.feed-row.feed-row-job{ align-items:center; }
.job-logo{
    width:42px; height:42px;
    border-radius:9px;
    background:var(--surface-2);
    border:1px solid var(--border);
    display:flex; align-items:center; justify-content:center;
    font-size:18px;
    flex-shrink:0;
}
.job-tags{ display:flex; gap:6px; margin-top:6px; flex-wrap:wrap; }
.job-tags span{
    font-family:var(--font-mono);
    font-size:11px;
    color:var(--muted-2);
    background:var(--surface-2);
    border:1px solid var(--border);
    padding:2px 8px;
    border-radius:5px;
}
.job-apply{
    flex-shrink:0;
    background:transparent;
    color:var(--text);
    border:1px solid var(--border);
    padding:8px 16px;
    border-radius:8px;
    font-size:13px;
    font-weight:600;
}
.job-apply:hover{ background:var(--green); color:#06231a; border-color:var(--green); }

/* blog card (image-less, editorial feel) */
.blog-card{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    padding:22px;
    box-shadow:var(--shadow-card);
    transition:transform .2s ease, border-color .2s ease;
    display:flex;
    flex-direction:column;
}
.blog-card:hover{ transform:translateY(-3px); border-color:#ef4444; box-shadow:0 0 0 1px rgba(239,68,68,.1), var(--shadow-card); }
.blog-card .blog-cat{
    font-family:var(--font-mono);
    font-size:11px;
    color:var(--green);
    text-transform:uppercase;
    letter-spacing:.05em;
    margin-bottom:10px;
}
.blog-card h3{ font-family:var(--font-display); font-size:17px; font-weight:600; margin-bottom:8px; }
.blog-card p{ color:var(--muted); font-size:13.5px; flex-grow:1; margin-bottom:14px; }
.blog-card .blog-meta{
    display:flex;
    align-items:center;
    justify-content:space-between;
    font-family:var(--font-mono);
    font-size:11.5px;
    color:var(--muted-2);
    padding-top:14px;
    border-top:1px solid var(--border-soft);
}

/* code-style guide card used on automation / api / performance pages */
.guide-card{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    padding:22px;
    box-shadow:var(--shadow-card);
    transition:transform .2s ease, border-color .2s ease;
}
.guide-card:hover{ transform:translateY(-3px); border-color:#ef4444; box-shadow:0 0 0 1px rgba(239,68,68,.1), var(--shadow-card); }
.guide-card .guide-level{
    display:inline-block;
    font-family:var(--font-mono);
    font-size:10.5px;
    text-transform:uppercase;
    letter-spacing:.05em;
    padding:3px 9px;
    border-radius:100px;
    margin-bottom:12px;
}
.level-beginner{ background:var(--green-dim); color:var(--green); }
.level-intermediate{ background:var(--amber-dim); color:var(--amber); }
.level-advanced{ background:rgba(248,113,113,.12); color:var(--red); }
.guide-card h3{ font-family:var(--font-display); font-size:16.5px; font-weight:600; margin-bottom:8px; }
.guide-card p{ color:var(--muted); font-size:13.5px; margin-bottom:14px; }
.guide-tools{ display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px; }
.guide-tools span{
    font-family:var(--font-mono);
    font-size:11px;
    color:var(--blue);
    background:rgba(96,165,250,.1);
    border:1px solid rgba(96,165,250,.2);
    padding:2px 8px;
    border-radius:5px;
}

/* ==========================================================================
   Dashboard — logged-in tester home (daily activity, jobs, concept quiz)
   ========================================================================== */
.dash-header{
    padding:36px 0 26px;
    border-bottom:1px solid var(--border-soft);
}
.dash-header-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    flex-wrap:wrap;
}
.dash-greet{ display:flex; align-items:center; gap:14px; }
.dash-avatar{
    width:48px; height:48px;
    border-radius:10px;
    background:var(--green-dim);
    color:var(--green);
    border:1px solid var(--border);
    display:flex; align-items:center; justify-content:center;
    font-family:var(--font-display);
    font-weight:700;
    font-size:18px;
    flex-shrink:0;
}
.dash-greet h1{
    font-family:var(--font-display);
    font-size:clamp(20px,2.6vw,26px);
    font-weight:700;
    letter-spacing:-.01em;
    margin-bottom:3px;
}
.dash-greet .dash-sub{ color:var(--muted); font-size:13.5px; font-family:var(--font-mono); }
.dash-streak{
    display:flex;
    align-items:center;
    gap:8px;
    background:var(--amber-dim);
    color:var(--amber);
    border:1px solid transparent;
    padding:8px 16px;
    border-radius:100px;
    font-family:var(--font-mono);
    font-size:13px;
    font-weight:600;
    white-space:nowrap;
}

/* Stat tiles row */
.dash-stats{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:14px;
    margin-top:24px;
}
.dash-stat{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:16px 18px;
    box-shadow:var(--shadow-card);
}
.dash-stat .dash-stat-top{
    display:flex; align-items:center; justify-content:space-between;
    margin-bottom:10px;
}
.dash-stat .dash-stat-ico{ font-size:16px; }
.dash-stat .stat-delta{
    font-family:var(--font-mono);
    font-size:11px;
    font-weight:600;
    padding:2px 7px;
    border-radius:100px;
}
.stat-delta.up{ background:var(--green-dim); color:var(--green); }
.stat-delta.flat{ background:var(--surface-2); color:var(--muted-2); }
.dash-stat .stat-big{
    font-family:var(--font-mono);
    font-size:26px;
    font-weight:600;
    color:var(--text);
    line-height:1;
}
.dash-stat .stat-name{ font-size:12.5px; color:var(--muted); margin-top:6px; }

/* Two-column dashboard layout */
.dash-grid{
    display:grid;
    grid-template-columns:1.3fr 1fr;
    gap:22px;
    align-items:start;
}
.dash-panel{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow-card);
    overflow:hidden;
}
.dash-panel-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:18px 20px;
    border-bottom:1px solid var(--border-soft);
}
.dash-panel-head h3{
    font-family:var(--font-display);
    font-size:15.5px;
    font-weight:700;
    display:flex; align-items:center; gap:8px;
}
.dash-panel-link{
    font-family:var(--font-mono);
    font-size:12px;
    color:var(--muted);
    transition:color .15s ease;
}
.dash-panel-link:hover{ color:var(--green); }

/* Activity timeline */
.activity-list{ padding:6px 20px 16px; }
.activity-row{
    display:flex;
    gap:14px;
    padding:14px 0;
    border-bottom:1px solid var(--border-soft);
}
.activity-row:last-child{ border-bottom:none; }
.activity-dot-col{ display:flex; flex-direction:column; align-items:center; flex-shrink:0; }
.activity-dot{
    width:8px; height:8px;
    border-radius:50%;
    background:var(--green);
    box-shadow:0 0 6px var(--green);
    margin-top:5px;
}
.activity-dot.amber{ background:var(--amber); box-shadow:0 0 6px var(--amber); }
.activity-dot.blue{ background:var(--blue); box-shadow:0 0 6px var(--blue); }
.activity-line{ width:1px; flex:1; background:var(--border-soft); margin-top:4px; }
.activity-body{ flex:1; }
.activity-body p{ font-size:13.5px; color:var(--text); }
.activity-body p strong{ font-weight:600; }
.activity-time{ font-family:var(--font-mono); font-size:11.5px; color:var(--muted-2); margin-top:3px; display:block; }

/* Job mini-cards reusing job-tags/job-logo language */
.job-mini-list{ padding:6px 20px 16px; display:flex; flex-direction:column; gap:12px; }
.job-mini{
    display:flex;
    gap:12px;
    align-items:center;
    padding:12px;
    border:1px solid var(--border-soft);
    border-radius:10px;
    transition:.15s ease;
}
.job-mini:hover{ background:var(--surface-2); border-color:var(--border); }
.job-mini-body{ flex:1; min-width:0; }
.job-mini-body h4{ font-size:13.5px; font-weight:600; margin-bottom:3px; }
.job-mini-body p{ font-size:12px; color:var(--muted); }
.job-mini-match{
    flex-shrink:0;
    font-family:var(--font-mono);
    font-size:11px;
    font-weight:700;
    color:var(--green);
    background:var(--green-dim);
    padding:3px 9px;
    border-radius:100px;
}

/* Concept-of-the-day flashcard quiz — the dashboard's signature element */
.concept-panel{ grid-column:1 / -1; }
.concept-wrap{
    padding:22px;
    display:grid;
    grid-template-columns:1fr 200px;
    gap:24px;
    align-items:center;
}
.flashcard-scene{ perspective:1400px; }
.flashcard{
    position:relative;
    height:230px;
    border-radius:var(--radius-lg);
    cursor:pointer;
    transition:transform .55s cubic-bezier(.4,.2,.2,1);
    transform-style:preserve-3d;
}
.flashcard.flipped{ transform:rotateY(180deg); }
.flashcard-face{
    position:absolute;
    inset:0;
    backface-visibility:hidden;
    border-radius:var(--radius-lg);
    border:1px solid var(--border);
    padding:24px;
    display:flex;
    flex-direction:column;
    justify-content:center;
}
.flashcard-front{
    background:
        radial-gradient(circle at 85% 0%, rgba(220,38,38,.07), transparent 55%),
        var(--surface-2);
}
.flashcard-back{
    background:
        radial-gradient(circle at 15% 100%, rgba(96,165,250,.08), transparent 55%),
        var(--surface-2);
    transform:rotateY(180deg);
}
.flashcard-eyebrow{
    font-family:var(--font-mono);
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.06em;
    color:var(--muted-2);
    margin-bottom:12px;
    display:flex;
    align-items:center;
    gap:8px;
}
.flashcard-q{
    font-family:var(--font-display);
    font-size:19px;
    font-weight:700;
    line-height:1.35;
}
.flashcard-a{ font-size:14px; color:var(--text); line-height:1.55; }
.flashcard-tap{
    position:absolute;
    bottom:16px; right:20px;
    font-family:var(--font-mono);
    font-size:11px;
    color:var(--muted-2);
}

.concept-controls{
    display:flex;
    flex-direction:column;
    gap:10px;
}
.concept-progress{
    font-family:var(--font-mono);
    font-size:12px;
    color:var(--muted);
    margin-bottom:4px;
}
.concept-btn{
    width:100%;
    padding:11px;
    border-radius:8px;
    font-size:13px;
    font-weight:600;
    border:1px solid var(--border);
    background:transparent;
    color:var(--text);
    transition:.15s ease;
}
.concept-btn:hover{ background:var(--surface-3); }
.concept-btn.know{ border-color:var(--green-dim); color:var(--green); }
.concept-btn.know:hover{ background:var(--green-dim); }
.concept-btn.practice{ border-color:var(--amber-dim); color:var(--amber); }
.concept-btn.practice:hover{ background:var(--amber-dim); }
.concept-btn.next{ background:var(--green); color:#06231a; border-color:var(--green); }
.concept-btn.next:hover{ background:#2bbd8a; }
.concept-stats-mini{
    display:flex;
    gap:10px;
    margin-top:4px;
}
.concept-stats-mini span{
    flex:1;
    text-align:center;
    font-family:var(--font-mono);
    font-size:11px;
    color:var(--muted-2);
    background:var(--surface);
    border:1px solid var(--border-soft);
    border-radius:7px;
    padding:6px 4px;
}
.concept-stats-mini b{ display:block; font-size:14px; color:var(--text); }

@media (max-width:600px){
    .page-header-top{ flex-direction:column; }
    .feed-row{ flex-wrap:wrap; }
    .feed-meta{ margin-left:0; text-align:left; }
    .dash-stats{ grid-template-columns:1fr 1fr; }
    .dash-header-top{ flex-direction:column; align-items:flex-start; }
}


@media (max-width:1300px){
    .footer-grid{ grid-template-columns:1.3fr 1fr 1fr 1fr; gap:24px 0; }
    .footer-grid > div{ border-left:none; padding:0; }
}

@media (max-width:980px){
    .hero .container{
        display:flex;
        flex-direction:column;
        gap:0;
    }
    /* Mobile order:
       1. hero-text  (eyebrow + h1 + lede + CTA buttons)
       2. terminal   (video — right after "Browse Interview Qs")
       3. hero-stats (numbers below video)
    */
    .hero-text  { order:1; margin-bottom:28px; }
    .terminal   { order:2; margin-bottom:28px; }
    .hero-stats { order:3; }
    .footer-grid{ grid-template-columns:1.3fr 1fr 1fr; gap:24px 0; }
    .footer-grid > div{ border-left:none; padding:0; }
    .dash-stats{ grid-template-columns:repeat(2,1fr); }
    .dash-grid{ grid-template-columns:1fr; }
    .concept-wrap{ grid-template-columns:1fr; }
}

@media (max-width:768px){
    .menu a{ padding:12px 14px; width:100%; }
    #navHomeLink{ padding:12px 14px; width:100%; }
    .navbar .container{ flex-wrap:wrap; position:relative; }
    .auth-buttons{ margin-left:auto; }
    .statusbar .container{ flex-wrap:wrap; row-gap:4px; gap:8px; }
    .statusbar .status-left{ gap:10px; row-gap:4px; }
    .statusbar{ font-size:11px; }
    .statusbar .status-item.hide-mobile{ display:none; }
    #clock{ flex:0 0 auto; }
    .hero{ padding:40px 0 36px; }
    .hero-stats{ gap:20px; }
    .section{ padding:40px 0; }
    .footer-grid{ grid-template-columns:1fr 1fr; gap:24px 0; }
    .footer-grid > div{ border-left:none; padding:0; }
}

@media (max-width:520px){
    .footer-grid{ grid-template-columns:1fr; gap:24px 0; }
    .footer-grid > div{ border-left:none; padding:0; }
    .hero-cta{ flex-direction:column; }
    .hero-cta a, .hero-cta button{ width:100%; justify-content:center; }
    .form-body{ padding:26px 20px; }
}

/* ============================================================
   NAVBAR USER WIDGET (logged-in state)
   ============================================================ */
.nav-user-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.nav-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--green);
    color: #ffffff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nav-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    max-width: 130px;
}
.nav-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-user-role {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.logout-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all .2s;
}
.logout-btn:hover {
    color: var(--red);
    border-color: var(--red);
    background: rgba(248,113,113,.08);
}

/* Mobile: hide user-info text, keep avatar + logout */
@media (max-width: 768px) {
    .nav-user-info { display: none; }
    .nav-user-wrap { gap: 8px; }
    .logout-btn span { display: none; }
}

/* ============================================================
   NAVBAR BELL — in-app notifications
   ============================================================ */
.dg-bell-wrap {
    position: relative;
    flex-shrink: 0;
}
.dg-bell-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    cursor: pointer;
    transition: border-color .15s, color .15s;
}
.dg-bell-btn:hover,
.dg-bell-btn.has-unread {
    color: var(--green);
    border-color: var(--green);
}
.dg-bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.dg-bell-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: -8px;
    width: 320px;
    max-height: 380px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .15s, transform .15s, visibility .15s;
    z-index: 200;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.dg-bell-wrap.open .dg-bell-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dg-bell-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-soft);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}
.dg-bell-header button {
    background: none;
    border: none;
    color: var(--green);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-body);
}
.dg-bell-header button:hover { text-decoration: underline; }
.dg-bell-list {
    overflow-y: auto;
    max-height: 320px;
}
.dg-bell-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}
.dg-bell-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    border-bottom: 1px solid var(--border-soft);
    transition: background .12s;
}
.dg-bell-item:hover { background: var(--surface-2); }
.dg-bell-item.unread { background: var(--green-dim); }
.dg-bell-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}
.dg-bell-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.dg-bell-label {
    font-size: 12.5px;
    color: var(--text);
    line-height: 1.4;
    word-break: break-word;
}
.dg-bell-time {
    font-size: 11px;
    color: var(--muted-2);
}
@media (max-width: 520px) {
    .dg-bell-dropdown {
        width: 280px;
        right: -40px;
    }
}

/* ==========================================================================
   MOBILE TOGGLE — ADVANCED REWRITE  (replaces basic open/close)
   ========================================================================== */

/* Animated hamburger icon morphs to X when open */
.menu-toggle{
    display:none;
    background:none;
    border:1px solid var(--border);
    border-radius:8px;
    width:42px;
    height:42px;
    align-items:center;
    justify-content:center;
    color:var(--text);
    cursor:pointer;
    transition:border-color .2s, background .2s;
    flex-shrink:0;
    z-index:302;
    position:relative;
}
.menu-toggle:hover{ border-color:var(--green); background:var(--green-dim); }
.menu-toggle[aria-expanded="true"]{ border-color:var(--green); background:var(--green-dim); }

/* Three-bar animated icon */
.menu-toggle .bar{
    position:absolute;
    left:50%;
    width:18px;
    height:2px;
    background:var(--text);
    border-radius:2px;
    transform-origin:center;
    transition:transform .3s cubic-bezier(.4,0,.2,1), opacity .25s, top .3s cubic-bezier(.4,0,.2,1);
}
.menu-toggle .bar1{ top:calc(50% - 6px); transform:translateX(-50%); }
.menu-toggle .bar2{ top:50%;             transform:translate(-50%,-50%); }
.menu-toggle .bar3{ top:calc(50% + 4px); transform:translateX(-50%); }

/* Morph to X */
.menu-toggle[aria-expanded="true"] .bar1{ top:50%; transform:translate(-50%,-50%) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bar2{ opacity:0; }
.menu-toggle[aria-expanded="true"] .bar3{ top:50%; transform:translate(-50%,-50%) rotate(-45deg); }

/* Click-catcher for outside-tap-to-close. Also dims the page behind
   the compact dropdown — without this, colorful content sitting right
   behind the menu (hero role cards, etc.) shows through around its
   edges and makes the dropdown look broken/glitchy. */
.nav-overlay{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(15,18,24,.45);
    z-index:199;
    transition:opacity .25s;
    opacity:0;
}
.nav-overlay.visible{ display:block; opacity:1; }

/* ==========================================================================
   MOBILE MENU — slide-down panel with stagger animation
   ========================================================================== */
@media (max-width:768px){
    .menu-toggle{ display:flex; }

    /* Mobile menu is position:fixed and lives inside .navbar in the DOM.
       backdrop-filter on an ancestor makes that ancestor the containing
       block for fixed-position descendants on many mobile browsers
       (notably iOS Safari), which silently breaks/hides the slide-down
       menu. Disabling it here (mobile only) fixes that. */
    .navbar{ backdrop-filter:none !important; -webkit-backdrop-filter:none !important; }

    /* Compact dropdown anchored under the hamburger button — NOT a
       full-page panel. Positioned relative to .navbar .container. */
    .navbar .container{ position:relative; }
    .menu{
        display:flex;
        flex-direction:column;
        align-items:stretch;
        position:absolute;
        top:calc(100% + 10px);
        right:0;
        left:auto;
        margin-left:0;
        width:min(280px, calc(100vw - 32px));
        background:var(--surface);
        border:1px solid var(--border);
        border-radius:14px;
        padding:10px;
        gap:2px;
        z-index:200;
        transform:translateY(-8px);
        opacity:0;
        visibility:hidden;
        pointer-events:none;
        transition:transform .22s cubic-bezier(.4,0,.2,1), opacity .2s ease;
        max-height:min(70vh, 520px);
        overflow-y:auto;
        box-shadow:0 16px 40px rgba(0,0,0,.35);
    }
    .menu.open{
        transform:translateY(0);
        opacity:1;
        visibility:visible;
        pointer-events:auto;
    }
    .menu li{
        opacity:0;
        transform:translateY(-8px);
        transition:opacity .25s ease, transform .25s ease;
    }
    .menu.open li{ opacity:1; transform:translateY(0); }
    /* Stagger each menu item */
    .menu.open li:nth-child(1){ transition-delay:.04s; }
    .menu.open li:nth-child(2){ transition-delay:.07s; }
    .menu.open li:nth-child(3){ transition-delay:.10s; }
    .menu.open li:nth-child(4){ transition-delay:.13s; }
    .menu.open li:nth-child(5){ transition-delay:.16s; }
    .menu.open li:nth-child(6){ transition-delay:.19s; }
    .menu.open li:nth-child(7){ transition-delay:.22s; }
    .menu.open li:nth-child(8){ transition-delay:.25s; }
    .menu.open li:nth-child(9){ transition-delay:.28s; }
    .menu.open li:nth-child(10){ transition-delay:.31s; }

    .menu a{ padding:13px 14px; width:100%; border-radius:10px; font-size:15px; }
    .menu .ico{ font-size:16px; }

    /* Mobile dropdown: flat inline, no absolute positioning */
    .menu li.has-dropdown > a{ padding:13px 14px; width:100%; border-radius:10px; font-size:15px; }
    .dropdown-menu{
        position:static;
        display:none;
        background:var(--surface-2);
        border:none; border-left:2px solid var(--green-dim);
        border-radius:0 0 8px 8px;
        box-shadow:none;
        padding:4px 0 4px 16px;
        margin:0 0 4px 0;
    }
    .menu li.has-dropdown.open .dropdown-menu{ display:flex; }
    .dropdown-menu a{ padding:10px 12px; font-size:14px; border-radius:6px; }

    .navbar{ position:sticky; top:0; z-index:301; }
    .navbar .container{ flex-wrap:nowrap; position:relative; gap:12px; }
    .auth-buttons{ margin-left:auto; }

    /* Guest-only links get a little breathing room + the Register
       link reads as a clear CTA button, not just another row */
    .menu li.guest-only:first-of-type{ margin-top:4px; }
    .menu li.guest-only + li:not(.guest-only){
        margin-top:10px; padding-top:10px; border-top:1px solid var(--border);
    }
    .menu li.guest-only a[href*="register"]{
        background:var(--green); color:#06231a; font-weight:700;
        justify-content:center;
    }
    .menu li.guest-only a[href*="register"]:hover{ background:var(--green); opacity:.9; }
}

/* ==========================================================================
   GLOBAL MOBILE RESPONSIVE IMPROVEMENTS
   ========================================================================== */
@media (max-width:768px){
    /* Page headers */
    .page-header-top{
        flex-direction:column;
        gap:16px;
        align-items:flex-start;
    }
    .page-title-row{ gap:12px; }
    .page-icon-badge{ width:44px; height:44px; font-size:20px; }
    h1{ font-size:clamp(22px, 5vw, 32px); }

    /* Cards & grid */
    .dashboard{ grid-template-columns:1fr !important; }
    .card{ padding:20px; }

    /* Feed / list */
    .feed-item{ padding:16px; }
    .feed-row{ flex-direction:column; gap:8px; }
    .feed-meta{ margin-left:0; }

    /* Filter row wraps */
    .filter-row{ flex-wrap:wrap; gap:6px; }
    .chip{ font-size:12px; padding:6px 12px; }

    /* Page stats row */
    .page-stats{ gap:16px; flex-wrap:wrap; }
    .stat-num{ font-size:22px; }

    /* Hero adjustments */
    .hero .container{ display:flex; flex-direction:column; gap:0; }
    .hero-text h1{ font-size:clamp(22px, 6vw, 34px); }
    .hero-cta{ flex-direction:column; gap:10px; }
    .hero-cta a, .hero-cta button{ width:100%; text-align:center; justify-content:center; }
    .hero-stats{ gap:16px; flex-wrap:wrap; }
    .terminal{ display:block; }

    /* Footer */
    .footer-grid{ grid-template-columns:1fr 1fr; gap:20px; }
    .footer-brand{ max-width:100%; }

    /* Section */
    .section{ padding:32px 0; }
    .section-head{ flex-direction:column; gap:12px; align-items:flex-start; }

    /* Form / auth on mobile */
    .form-shell{ padding:24px 16px; }
    .form-container{ width:100%; }
    .form-body{ padding:24px 18px 28px; }
    .field-row{ grid-template-columns:1fr !important; }

    /* Tables */
    .webtable-wrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; }

    /* Dashboard page */
    .dash-stats{ grid-template-columns:1fr 1fr; }
    .dash-grid{ grid-template-columns:1fr; }
    .dash-header-top{ flex-direction:column; align-items:flex-start; gap:10px; }
}

@media (max-width:480px){
    .footer-grid{ grid-template-columns:1fr; }
    .page-stats{ gap:12px; }
    .dash-stats{ grid-template-columns:1fr 1fr; }
    .container{ width:95%; }
    .feed-actions{ flex-wrap:wrap; gap:6px; }
}

/* ==========================================================================
   ADD CONTENT BUTTON (shown only when logged in — injected by navbar.js)
   ========================================================================== */
.add-content-btn{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:9px 16px;
    background:var(--green);
    color:#06231a;
    border-radius:8px;
    font-size:13px;
    font-weight:700;
    font-family:var(--font-display);
    letter-spacing:.01em;
    border:none;
    cursor:pointer;
    transition:.2s ease;
    text-decoration:none;
    flex-shrink:0;
    white-space:nowrap;
}
.add-content-btn:hover{
    background:#2bbd8a;
    box-shadow:0 0 16px rgba(239,68,68,.3);
    transform:translateY(-1px);
}
.add-content-btn svg{ flex-shrink:0; }

/* Modal overlay for Add Blog / Add Interview Q forms */
.modal-overlay{
    position:fixed; inset:0;
    background:rgba(0,0,0,.7);
    backdrop-filter:blur(4px);
    z-index:500;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    opacity:0;
    pointer-events:none;
    transition:opacity .25s;
}
.modal-overlay.open{ opacity:1; pointer-events:all; }
.modal-box{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    width:100%;
    max-width:540px;
    max-height:90dvh;
    overflow-y:auto;
    box-shadow:0 32px 80px rgba(0,0,0,.7);
    transform:translateY(20px) scale(.97);
    transition:transform .3s cubic-bezier(.4,0,.2,1);
}
.modal-overlay.open .modal-box{ transform:translateY(0) scale(1); }
.modal-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:18px 22px;
    border-bottom:1px solid var(--border-soft);
    background:var(--surface-2);
}
.modal-header h3{ font-family:var(--font-display); font-size:16px; font-weight:700; }
.modal-close{
    background:none; border:none;
    color:var(--muted); cursor:pointer;
    font-size:20px; line-height:1;
    padding:4px 8px; border-radius:6px;
    transition:.15s;
}
.modal-close:hover{ color:var(--text); background:var(--surface-3); }
.modal-body{ padding:24px 22px; display:flex; flex-direction:column; gap:16px; }
.modal-field{ display:flex; flex-direction:column; gap:6px; }
.modal-field label{ font-size:13px; font-weight:600; color:var(--muted); }
.modal-field input,
.modal-field textarea,
.modal-field select{
    background:var(--surface-2);
    border:1px solid var(--border);
    border-radius:8px;
    padding:10px 14px;
    color:var(--text);
    font-family:var(--font-body);
    font-size:14px;
    outline:none;
    transition:.15s;
    resize:vertical;
}
.modal-field input:focus,
.modal-field textarea:focus,
.modal-field select:focus{
    border-color:var(--green);
    background:var(--surface-3);
}
.modal-field textarea{ min-height:110px; }
.modal-actions{
    display:flex;
    gap:10px;
    padding:16px 22px 22px;
    justify-content:flex-end;
    border-top:1px solid var(--border-soft);
}
.modal-submit{
    padding:10px 22px;
    background:var(--green);
    color:#06231a;
    border:none; border-radius:8px;
    font-family:var(--font-display);
    font-size:14px; font-weight:700;
    cursor:pointer;
    transition:.2s;
}
.modal-submit:hover{ background:#2bbd8a; box-shadow:0 0 14px rgba(239,68,68,.3); }
.modal-cancel{
    padding:10px 18px;
    background:none;
    color:var(--muted);
    border:1px solid var(--border);
    border-radius:8px;
    font-size:14px;
    cursor:pointer;
    transition:.15s;
}
.modal-cancel:hover{ color:var(--text); border-color:var(--muted); }

/* Read-only "view full post" modal — blogs / interview Qs / jobs */
.read-meta{
    font-family:var(--font-mono);
    font-size:12px;
    color:var(--muted-2);
    display:flex;
    flex-wrap:wrap;
    gap:6px 14px;
}
.read-meta b{ color:var(--muted); font-weight:600; }
.read-label{
    font-size:11px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.04em;
    color:var(--muted-2);
    margin-bottom:4px;
}
.read-body{
    font-size:14px;
    color:var(--muted);
    line-height:1.7;
    white-space:pre-wrap;
    word-break:break-word;
    max-height:50vh;
    overflow-y:auto;
}
.read-tags{ display:flex; flex-wrap:wrap; gap:6px; }
.read-tags span{
    font-family:var(--font-mono);
    font-size:11px;
    color:var(--green);
    background:var(--green-dim);
    padding:3px 9px;
    border-radius:100px;
}
.read-clickable{ cursor:pointer; }

/* "View full post" modal (blogs / interview Qs / jobs) — opened via
   window.openReadModal(). Sized much larger than the compact Add/Edit
   form modal since it's meant for actually reading a full article. */
.modal-box-read{
    max-width:1100px;
    width:95vw;
    height:92dvh;
    max-height:92dvh;
    display:flex;
    flex-direction:column;
    overflow:hidden;
}
.modal-box-read .modal-header{ flex-shrink:0; }
.modal-box-read .modal-body{
    flex:1;
    overflow-y:auto;
    padding:32px 44px;
}
.modal-box-read .read-body{
    max-height:none;
    font-size:15.5px;
    line-height:1.8;
}
@media (max-width:768px){
    .modal-box.modal-box-read{ width:100vw; height:100dvh; max-height:100dvh; border-radius:0; }
    .modal-box-read .modal-body{ padding:20px 18px; }
}

@media(max-width:540px){
    .modal-box{ border-radius:var(--radius); }
    .modal-body{ padding:18px 16px; }
    .modal-header{ padding:14px 16px; }
    .modal-actions{ padding:12px 16px 18px; }
}
