/* ==========================================================================
   ashoklamichhane.com.np — site stylesheet
   One stylesheet for every page. Tokens first, then layout, then components.
   ========================================================================== */

:root {
    --bg: #f7f8fb;
    --surface: #ffffff;
    --surface-2: #f0f3f9;
    --border: #e2e7f0;
    --text: #14192b;
    --text-2: #4a5470;
    --text-3: #6f7890;
    --brand: #1f4fd1;
    --brand-strong: #163ba3;
    --brand-soft: #e7eeff;
    --accent: #0f9d8a;
    --accent-soft: #e2f6f2;
    --warn: #b45309;
    --warn-soft: #fff4e5;
    --danger: #c0352b;
    --danger-soft: #fdecea;
    --ok: #15803d;
    --ok-soft: #e7f6ec;
    --code-bg: #0f1424;
    --code-text: #e5e9f5;
    --shadow-sm: 0 1px 2px rgba(20, 25, 43, .06), 0 1px 3px rgba(20, 25, 43, .06);
    --shadow-md: 0 6px 24px rgba(20, 25, 43, .08);
    --shadow-lg: 0 18px 48px rgba(20, 25, 43, .12);
    --radius: 14px;
    --radius-sm: 9px;
    --maxw: 1180px;
    --readw: 760px;
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0b0f1a;
        --surface: #121829;
        --surface-2: #192035;
        --border: #263051;
        --text: #e8ecf6;
        --text-2: #b3bdd6;
        --text-3: #8892ad;
        --brand: #7aa2ff;
        --brand-strong: #a3bfff;
        --brand-soft: #1a2546;
        --accent: #3fd0bb;
        --accent-soft: #11302d;
        --warn: #f5b454;
        --warn-soft: #2e2413;
        --danger: #ff8a80;
        --danger-soft: #34191a;
        --ok: #6ee39a;
        --ok-soft: #13301f;
        --code-bg: #070a12;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow-md: 0 6px 24px rgba(0, 0, 0, .35);
        --shadow-lg: 0 18px 48px rgba(0, 0, 0, .45);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #0b0f1a;
    --surface: #121829;
    --surface-2: #192035;
    --border: #263051;
    --text: #e8ecf6;
    --text-2: #b3bdd6;
    --text-3: #8892ad;
    --brand: #7aa2ff;
    --brand-strong: #a3bfff;
    --brand-soft: #1a2546;
    --accent: #3fd0bb;
    --accent-soft: #11302d;
    --warn: #f5b454;
    --warn-soft: #2e2413;
    --danger: #ff8a80;
    --danger-soft: #34191a;
    --ok: #6ee39a;
    --ok-soft: #13301f;
    --code-bg: #070a12;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, .45);
    color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text); line-height: 1.25; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 200; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

/* ---------- header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
    display: grid; place-items: center; color: #fff; font-size: .95rem; letter-spacing: .02em;
    background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
}
:root[data-theme="dark"] .brand-mark { color: #0b0f1a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-mark { color: #0b0f1a; } }
.brand small { display: block; font-family: var(--font-sans); font-weight: 500; font-size: .72rem; color: var(--text-3); letter-spacing: .02em; }

.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
    display: block; padding: 8px 13px; border-radius: 8px;
    color: var(--text-2); font-weight: 550; font-size: .94rem;
}
.main-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.main-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
    width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text-2); display: grid; place-items: center;
    cursor: pointer; font-size: 1rem;
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand); }
.theme-toggle .fa-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .fa-sun { display: inline-block; }
:root[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
.nav-toggle { display: none; }

@media (max-width: 960px) {
    .nav-toggle { display: grid; }
    .main-nav {
        position: fixed; inset: 68px 0 auto 0; background: var(--surface);
        border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
        display: none; max-height: calc(100vh - 68px); overflow-y: auto;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; padding: 12px 16px 20px; gap: 2px; }
    .main-nav a { padding: 12px 14px; font-size: 1rem; }
}

/* ---------- buttons, chips ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 20px; border-radius: 10px; font-weight: 650; font-size: .95rem;
    border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    font-family: inherit; line-height: 1.2;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-strong); box-shadow: var(--shadow-md); }
:root[data-theme="dark"] .btn-primary { color: #0b0f1a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #0b0f1a; } }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 8px 14px; font-size: .88rem; }

.chip, .badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
    font-size: .78rem; font-weight: 650; background: var(--brand-soft); color: var(--brand); letter-spacing: .01em;
    white-space: nowrap;
}
.badge-free, .badge-open-source { background: var(--ok-soft); color: var(--ok); }
.badge-paid { background: var(--warn-soft); color: var(--warn); }
.badge-freemium { background: var(--brand-soft); color: var(--brand); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: 10px; }

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.section-sm { padding: 56px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head p { color: var(--text-2); max-width: 640px; margin: 0; }
.section-head h2 { margin-bottom: 8px; }
@media (max-width: 600px) { .section { padding: 56px 0; } }

/* ---------- hero (home) ---------- */
.hero { padding: 28px 0 56px; position: relative; overflow: hidden; }
.hero::before {
    content: ""; position: absolute; inset: -40% -20% auto auto; width: 720px; height: 720px; border-radius: 50%;
    background: radial-gradient(closest-side, var(--brand-soft), transparent); z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 16px; }
.hero h1 .hl { background: linear-gradient(90deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.15rem; color: var(--text-2); max-width: 600px; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-family: var(--font-head); font-size: 1.5rem; color: var(--text); }
.hero-stats div span { font-size: .86rem; color: var(--text-3); }
.hero-photo { position: relative; justify-self: center; max-width: 380px; width: 100%; }
.hero-photo img { border-radius: 24px; box-shadow: var(--shadow-lg); aspect-ratio: 1 / 1; object-fit: cover; width: 100%; background: var(--surface-2); }
.hero-photo .floating-card {
    position: absolute; left: -24px; bottom: 28px; background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow-md); font-size: .86rem; display: flex; gap: 10px; align-items: center;
}
.floating-card i { color: var(--accent); font-size: 1.2rem; }
.floating-card strong { display: block; color: var(--text); }
.floating-card span { color: var(--text-3); }
@media (max-width: 880px) {
    .hero { padding: 20px 0 40px; }
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-photo { order: -1; max-width: 260px; }
    .hero-photo .floating-card { left: 50%; transform: translateX(-50%); bottom: -20px; white-space: nowrap; }
}

/* ---------- page hero (inner pages) ---------- */
.page-hero { padding: 56px 0 40px; background: var(--surface); border-bottom: 1px solid var(--border); }
.page-hero h1 { max-width: 880px; }
.page-hero .lead { font-size: 1.12rem; color: var(--text-2); max-width: 760px; margin: 0; }
.breadcrumbs { font-size: .85rem; color: var(--text-3); margin-bottom: 18px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--border); }
.breadcrumbs a { color: var(--text-3); }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--text-3); font-size: .9rem; margin-top: 18px; align-items: center; }
.post-meta i { margin-right: 6px; color: var(--brand); }
.post-meta .author-mini { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-weight: 600; }
.post-meta .author-mini img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

/* ---------- cards & grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px; box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card-link:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: .95rem; }
.card-icon {
    width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand); font-size: 1.25rem; margin-bottom: 16px;
}
.card-icon.teal { background: var(--accent-soft); color: var(--accent); }

/* post cards */
.post-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; height: 100%; }
.post-card a.cover { display: block; aspect-ratio: 16 / 9; position: relative; overflow: hidden; background: var(--surface-2); }
.post-card .cover-art {
    position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px;
    color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; line-height: 1.3;
}
.post-card .cover-art i { font-size: 2rem; opacity: .9; margin-bottom: auto; }
.post-card .body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 1.12rem; margin: 12px 0 8px; }
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--brand); text-decoration: none; }
.post-card p { flex: 1; margin-bottom: 16px; }
.post-card .meta { display: flex; gap: 14px; font-size: .82rem; color: var(--text-3); }
.cover-1 { background: linear-gradient(135deg, #1f4fd1, #6b3fd1); }
.cover-2 { background: linear-gradient(135deg, #0f9d8a, #1f6fd1); }
.cover-3 { background: linear-gradient(135deg, #c2410c, #be185d); }
.cover-4 { background: linear-gradient(135deg, #334155, #1f4fd1); }
.cover-5 { background: linear-gradient(135deg, #7c3aed, #db2777); }
.cover-6 { background: linear-gradient(135deg, #047857, #0e7490); }

/* blog filters */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter-bar button {
    border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px;
    padding: 8px 16px; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
}
.filter-bar button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
:root[data-theme="dark"] .filter-bar button[aria-pressed="true"] { color: #0b0f1a; }

/* ---------- article layout ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; padding-top: 48px; padding-bottom: 72px; align-items: start; }
.article-aside { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 1020px) {
    .article-layout { grid-template-columns: minmax(0, 1fr); }
    .article-aside { position: static; order: -1; }
    .article-aside .aside-extra { display: none; }
}
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.toc h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); margin-bottom: 12px; }
.toc ol { margin: 0; padding-left: 18px; font-size: .9rem; }
.toc li { margin: 6px 0; color: var(--text-3); }
.toc a { color: var(--text-2); }
.toc a:hover { color: var(--brand); }
@media (max-width: 1020px) { .toc details summary { cursor: pointer; } }

.prose { max-width: var(--readw); font-size: 1.06rem; line-height: 1.78; color: var(--text); }
.prose > * + * { margin-top: 0; }
.prose h2 { margin: 2em 0 .6em; padding-top: .2em; scroll-margin-top: 90px; font-size: 1.6rem; }
.prose h2 i, .prose h3 i { color: var(--brand); margin-right: 8px; font-size: .85em; }
.prose h3 { margin: 1.6em 0 .5em; scroll-margin-top: 90px; font-size: 1.22rem; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.15em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .4em 0; }
.prose li::marker { color: var(--brand); }
.prose strong { color: var(--text); font-weight: 700; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand) 40%, transparent); text-underline-offset: 3px; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--brand); color: var(--text-2); font-style: italic; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }
.prose img { border-radius: var(--radius-sm); border: 1px solid var(--border); margin: 1.5em 0; }
.prose figure { margin: 1.8em 0; }
.prose figcaption { font-size: .86rem; color: var(--text-3); text-align: center; margin-top: 8px; }
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--surface-2); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border); }
.prose pre, .prompt-snippet {
    background: var(--code-bg); color: var(--code-text); border-radius: var(--radius-sm); padding: 18px 20px;
    overflow-x: auto; font-family: var(--font-mono); font-size: .86rem; line-height: 1.65; margin: 1.4em 0; white-space: pre;
}
.prompt-snippet { white-space: pre-wrap; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }

.table-responsive { width: 100%; overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.prose table, .comparison-table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--surface); }
.prose th, .prose td, .comparison-table th, .comparison-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th, .comparison-table th { background: var(--surface-2); font-weight: 700; color: var(--text); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }

.callout, .note {
    margin: 1.8em 0; padding: 18px 20px; border-radius: var(--radius-sm); background: var(--brand-soft);
    border-left: 4px solid var(--brand); font-size: .98rem;
}
.callout p:last-child, .note p:last-child { margin-bottom: 0; }
.callout-title, .note-title { font-family: var(--font-head); font-weight: 750; margin-bottom: 6px; color: var(--text); display: flex; gap: 8px; align-items: center; }
.callout-title i, .note-title i { color: var(--brand); }
.note.tip { background: var(--accent-soft); border-color: var(--accent); }
.note.tip .note-title i { color: var(--accent); }
.note.warn { background: var(--warn-soft); border-color: var(--warn); }
.note.warn .note-title i { color: var(--warn); }

.key-takeaways { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; margin: 0 0 2em; }
.key-takeaways h2 { font-size: 1.05rem; margin: 0 0 10px; padding: 0; }
.key-takeaways ul { margin: 0; }

/* prompt cards (prompt guide) */
.prompt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 1.4em 0 2em; }
@media (max-width: 760px) { .prompt-grid { grid-template-columns: 1fr; } }
.prompt-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; min-width: 0; }
.prompt-card.bad-prompt { border-top: 4px solid var(--danger); }
.prompt-card.good-prompt { border-top: 4px solid var(--ok); }
.prompt-card-header { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.prompt-title { font-weight: 700; font-family: var(--font-head); }
.prompt-tag { font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.tag-bad { background: var(--danger-soft); color: var(--danger); }
.tag-good { background: var(--ok-soft); color: var(--ok); }
.prompt-notes { font-size: .9rem; color: var(--text-2); }
.prompt-card .prompt-snippet { font-size: .8rem; margin: .8em 0; }

/* author box + related */
.author-box { display: flex; gap: 20px; align-items: flex-start; padding: 24px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); margin: 48px 0 0; max-width: var(--readw); }
.author-box img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box h3 { margin-bottom: 4px; font-size: 1.05rem; }
.author-box p { color: var(--text-2); font-size: .94rem; margin-bottom: 10px; }
.author-box .links { display: flex; gap: 14px; font-size: .9rem; flex-wrap: wrap; }
@media (max-width: 540px) { .author-box { flex-direction: column; } }
.share-row { display: flex; gap: 10px; align-items: center; margin-top: 28px; flex-wrap: wrap; font-size: .9rem; color: var(--text-3); max-width: var(--readw); }
.share-row a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); color: var(--text-2); background: var(--surface); }
.share-row a:hover { color: var(--brand); border-color: var(--brand); text-decoration: none; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; max-width: var(--readw); }
.post-nav a { display: block; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-weight: 650; font-size: .95rem; }
.post-nav a span { display: block; font-size: .78rem; color: var(--text-3); font-weight: 500; margin-bottom: 4px; }
.post-nav a:hover { border-color: var(--brand); text-decoration: none; }
.post-nav .next { text-align: right; }
@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } .post-nav .next { text-align: left; } }
.updated-note { font-size: .86rem; color: var(--text-3); margin-top: 32px; max-width: var(--readw); border-top: 1px solid var(--border); padding-top: 16px; }

/* ---------- timeline ---------- */
.timeline { position: relative; padding-left: 28px; border-left: 2px solid var(--border); margin-left: 6px; }
.timeline-item { position: relative; padding: 0 0 32px 12px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: ""; position: absolute; left: -36px; top: 6px; width: 14px; height: 14px; border-radius: 50%;
    background: var(--surface); border: 3px solid var(--brand);
}
.timeline-item .when { font-size: .82rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; }
.timeline-item h3 { margin: 4px 0 2px; font-size: 1.1rem; }
.timeline-item .where { color: var(--text-3); font-size: .92rem; margin-bottom: 8px; }
.timeline-item ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: .95rem; }

/* skills */
.skill-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.skill-group h3 { font-size: 1rem; margin-bottom: 12px; display: flex; gap: 10px; align-items: center; }
.skill-group h3 i { color: var(--brand); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { padding: 5px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: .85rem; color: var(--text-2); }

/* ---------- projects ---------- */
.project-card { display: grid; grid-template-columns: 300px 1fr; gap: 0; padding: 0; overflow: hidden; }
.project-card .shot { background: var(--surface-2); display: grid; place-items: center; border-right: 1px solid var(--border); min-height: 220px; }
.project-card .shot img { width: 100%; height: 100%; object-fit: cover; }
.project-card .shot.contain img { object-fit: contain; padding: 24px; max-height: 260px; }
.project-card .info { padding: 26px 28px; }
.project-card .info h3 { font-size: 1.25rem; }
.project-card .facts { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .86rem; color: var(--text-3); margin: 6px 0 14px; }
.project-card .facts i { color: var(--brand); margin-right: 5px; }
.project-card .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.project-card details { margin-top: 10px; font-size: .95rem; color: var(--text-2); }
.project-card summary { cursor: pointer; font-weight: 650; color: var(--brand); }
.project-gallery { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.project-gallery a img { width: 120px; height: 76px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
@media (max-width: 820px) { .project-card { grid-template-columns: 1fr; } .project-card .shot { border-right: 0; border-bottom: 1px solid var(--border); max-height: 260px; } }

/* ---------- videos ---------- */
.video-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-frame.vertical { aspect-ratio: 9 / 16; max-height: 640px; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-facade { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; background: #000; display: block; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .2s; }
.yt-facade:hover img { opacity: 1; }
.yt-facade .play {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 68px; height: 48px; border-radius: 12px;
    background: rgba(220, 30, 30, .92); color: #fff; display: grid; place-items: center; font-size: 1.3rem; box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}
.video-card .body { padding: 18px 20px 20px; }
.video-card h3 { font-size: 1rem; margin-bottom: 6px; }
.video-card p { font-size: .9rem; color: var(--text-2); margin-bottom: 0; }
.platform-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 700; margin-bottom: 8px; }
.platform-tag.yt { color: #e02424; }
.platform-tag.tt { color: var(--text); }
.platform-tag.fb { color: #1877f2; }
.tiktok-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.tiktok-embed-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.tiktok-embed-wrap iframe { width: 100%; height: 740px; border: 0; display: block; }
.fb-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; justify-content: center; overflow: hidden; }
.fb-wrap iframe { border: 0; max-width: 100%; }
.channel-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
@media (max-width: 820px) { .channel-cards { grid-template-columns: 1fr; } }
.channel-card { display: flex; gap: 16px; align-items: center; }
.channel-card .ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 1.4rem; flex-shrink: 0; }
.ico.yt { background: #e02424; } .ico.tt { background: #111; } .ico.fb { background: #1877f2; }
.ico.ig { background: linear-gradient(45deg, #f58529, #dd2a7b 50%, #8134af); } .ico.hp { background: #d62828; }
.channel-card h3 { margin: 0; font-size: 1.02rem; }
.channel-card p { margin: 0; font-size: .88rem; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.contact-list { display: flex; flex-direction: column; gap: 14px; }
.contact-line { display: flex; gap: 14px; align-items: center; }
.contact-line .card-icon { margin: 0; width: 44px; height: 44px; }
.contact-line > div > span { display: block; font-size: .8rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.contact-line a, .contact-line strong { color: var(--text); font-weight: 650; word-break: break-word; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field textarea, .field select {
    font: inherit; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field textarea { min-height: 150px; resize: vertical; }
.form-note { font-size: .84rem; color: var(--text-3); }

/* ---------- CTA band ---------- */
.cta-band {
    border-radius: 20px; padding: 44px; color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
    background: linear-gradient(120deg, #1a3fae 0%, #1f4fd1 45%, #0f9d8a 100%);
}
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: rgba(255, 255, 255, .86); margin: 0; max-width: 620px; }
.cta-band .btn { background: #fff; color: #1a3fae; }
@media (max-width: 600px) { .cta-band { padding: 28px 22px; } }

/* newsletter-ish subscribe strip */
.subscribe { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer { background: #0b1020; color: #c5cce0; margin-top: 0; font-size: .94rem; }
.site-footer a { color: #c5cce0; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr 1fr; gap: 36px; padding: 64px 0 40px; }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand .brand small { color: #8e98b6; }
.footer-brand p { color: #9aa3bf; font-size: .92rem; max-width: 320px; }
.footer-col h3 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px; font-family: var(--font-sans); font-weight: 700; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { display: inline-block; line-height: 1.45; }
.footer-social { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.footer-social a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #161d33; border: 1px solid #222b47; }
.footer-social a:hover { background: #1f4fd1; border-color: #1f4fd1; text-decoration: none; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; color: #9aa3bf; }
.footer-contact i { color: #7aa2ff; margin-top: 4px; width: 16px; }
.footer-disclosure { border-top: 1px solid #1c2440; padding: 20px 0; font-size: .84rem; color: #8e98b6; }
.footer-bottom { border-top: 1px solid #1c2440; padding: 22px 0 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .86rem; color: #8e98b6; }
.footer-bottom nav { display: flex; gap: 18px; flex-wrap: wrap; }
@media (max-width: 1080px) { .footer-top { grid-template-columns: 1fr 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 640px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 400px) { .footer-top { grid-template-columns: 1fr; } }

.back-to-top {
    position: fixed; left: 20px; bottom: 20px; z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s;
    box-shadow: var(--shadow-md);
}
.back-to-top.show { opacity: 1; pointer-events: auto; }

/* cookie consent */
.consent {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300; max-width: 560px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: 18px 20px; font-size: .9rem; color: var(--text-2);
}
.consent p { margin: 0 0 12px; }
.consent .row { display: flex; gap: 10px; flex-wrap: wrap; }

/* misc */
.muted { color: var(--text-3); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 12px; }
.mt-2 { margin-top: 24px; }
.mt-3 { margin-top: 40px; }
.stack > * + * { margin-top: 16px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.about-photo img { border-radius: 20px; box-shadow: var(--shadow-md); width: 100%; max-width: 420px; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; }
.not-found { text-align: center; padding: 120px 0; }
.not-found .code { font-family: var(--font-head); font-size: 6rem; font-weight: 800; color: var(--brand); line-height: 1; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* chatbot launcher: icon-only on small screens so it never covers content */
@media (max-width: 600px) {
    #chatbot-container #chat-toggle { min-width: 0; padding: 8px; gap: 0; border-radius: 14px; }
    #chatbot-container #chat-toggle .chat-toggle-info,
    #chatbot-container #chat-toggle .chat-toggle-hover { display: none; }
}

/* channel grid on the Videos page: icon above text so five cards fit one row */
.channel-cards .channel-card { flex-direction: column; align-items: flex-start; gap: 12px; }
@media (max-width: 820px) { .channel-cards .channel-card { flex-direction: row; align-items: center; } }

/* first heading in a prose block never adds extra space above it */
.prose > :first-child { margin-top: 0; }
/* shorter, denser text for profile sections (About > My story) */
.prose-compact { font-size: .98rem; line-height: 1.7; }
.prose-compact h2 { font-size: 1.35rem; margin: 1.4em 0 .5em; }
.prose-compact p { margin-bottom: .9em; }
/* "Go to full channel" row under video grids */
.channel-cta { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: center; margin-top: 28px; text-align: center; }
.tiktok-grid .tiktok-embed-wrap iframe { height: 720px; }

/* ---------- responsive hardening (phones down to 320px, tablets, large screens) ---------- */
.brand { min-width: 0; }
.brand > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.contact-line > div, .channel-card > div { min-width: 0; }
.contact-line a, .contact-line strong, .footer-contact a { overflow-wrap: anywhere; }
#feed-url { min-width: 0 !important; }
.copy-btn { min-height: 34px; padding: 6px 12px !important; }
@media (hover: none), (max-width: 600px) {
    .btn-sm { min-height: 40px; }
}
@media (max-width: 400px) {
    .container { padding: 0 14px; }
    .header-inner { gap: 10px; height: 60px; }
    .brand { gap: 9px; font-size: .98rem; }
    .brand small { display: none; }
    .brand-mark { width: 34px; height: 34px; font-size: .85rem; }
    .icon-btn { width: 38px; height: 38px; }
    .header-actions { gap: 6px; }
    .main-nav { inset: 60px 0 auto 0; max-height: calc(100vh - 60px); }
    .card { padding: 20px; }
    .hero-cta .btn { flex: 1 1 100%; }
    .cta-band .btn, .subscribe .btn { width: 100%; }
    h1 { font-size: 1.85rem; }
}
/* tablets: keep two-column layouts readable */
@media (min-width: 881px) and (max-width: 1100px) {
    .hero-grid { gap: 36px; grid-template-columns: 1.2fr .8fr; }
    .footer-top { gap: 28px; }
}
/* large screens: slightly wider container */
@media (min-width: 1600px) {
    :root { --maxw: 1280px; }
}
/* single-column grids must be allowed to shrink below their content width */
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }

/* icons in contact rows keep their size */
.contact-line .card-icon { flex-shrink: 0; }
/* hero photo: smaller on tablets/phones so the heading is visible on the first screen */
@media (max-width: 880px) {
    .hero-grid { gap: 28px; }
    .hero-photo { max-width: 220px; }
    .hero-photo img { border-radius: 20px; }
    .hero-photo .floating-card { bottom: -16px; padding: 8px 12px; font-size: .8rem; }
}
@media (max-width: 480px) {
    .hero-photo { max-width: 170px; }
    .hero-photo .floating-card { bottom: -14px; }
    .hero .lead { font-size: 1.02rem; }
    .eyebrow { font-size: .72rem; letter-spacing: .09em; }
}
