:root {
    --bg: #0a0c0f;
    --bg-2: #10151b;
    --panel: #141a21;
    --panel-2: #18212a;
    --line: rgba(255,255,255,0.11);
    --text: #f3f5f7;
    --muted: #a9b2bd;
    --soft: #778391;
    --orange: #ff8a18;
    --orange-2: #ffb347;
    --lime: #c8f24a;
    --teal: #35d6c1;
    --red: #ff5364;
    --shadow: 0 20px 70px rgba(0,0,0,0.36);
    --inner: min(1120px, calc(100vw - 40px));
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at 12% 0%, rgba(255,138,24,0.16), transparent 26rem),
        linear-gradient(180deg, #0a0c0f 0%, #0d1117 48%, #090b0e 100%);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.nav-open {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration-color: rgba(255,255,255,0.28);
    text-underline-offset: 0.22em;
}

a:hover {
    color: var(--orange-2);
}

button,
input,
textarea {
    font: inherit;
}

.inner {
    width: var(--inner);
    margin: 0 auto;
}

.skip-link {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 999;
    transform: translateY(-140%);
    padding: 10px 14px;
    background: var(--text);
    color: var(--bg);
    border-radius: 6px;
    font-weight: 700;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255,255,255,0.09);
    background: rgba(10,12,15,0.86);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    min-height: 72px;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
}

.brand-mark {
    display: block;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    object-fit: contain;
}

.brand-text {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.brand-text strong {
    color: var(--text);
    font-size: 17px;
    line-height: 1.15;
    letter-spacing: 0;
}

.brand-text span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.site-nav {
    justify-self: end;
}

.nav-menu .nav,
.footer-nav .nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.nav-menu a,
.footer-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 10px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}

.nav-menu a:hover,
.footer-nav a:hover,
.nav-current a {
    color: var(--text);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: var(--text);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
    border-radius: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.button,
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 8px;
    border: 1px solid var(--line);
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
.icon-button:hover {
    transform: translateY(-1px);
}

.button {
    padding: 0 17px;
    color: var(--text);
}

.button-small {
    min-height: 38px;
    padding: 0 13px;
    font-size: 13px;
}

.button-primary {
    border-color: rgba(255,138,24,0.7);
    background: var(--orange);
    color: #130b03;
}

.button-primary:hover {
    color: #130b03;
    background: var(--orange-2);
}

.button-secondary {
    background: rgba(255,255,255,0.06);
    color: var(--text);
}

.icon-button {
    width: 42px;
    height: 42px;
    padding: 0;
    background: rgba(255,255,255,0.05);
    color: var(--text);
}

.icon-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.09);
    background: #0a0d11;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(360px, 0.78fr) minmax(560px, 1fr);
    align-items: center;
    gap: 46px;
    padding: 34px 0;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--lime);
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 560px;
    margin: 0;
    color: var(--text);
    font-size: 48px;
    line-height: 1.02;
    font-weight: 800;
}

.hero-lede {
    max-width: 560px;
    margin: 16px 0 0;
    color: #d7dde4;
    font-size: 19px;
    line-height: 1.48;
}

.hero-screen {
    margin: 0;
}

.hero-screen img {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    background: #111821;
    box-shadow: 0 28px 90px rgba(0,0,0,0.38);
}

.seo-intro,
.learning-areas,
.faq-section {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: #0b0f14;
}

.seo-intro-inner,
.faq-inner {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 46px;
    padding: 42px 0;
}

.seo-intro h2,
.faq-inner h2 {
    margin: 0;
    font-size: 34px;
    line-height: 1.12;
}

.seo-copy {
    display: grid;
    gap: 14px;
    max-width: 860px;
}

.seo-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.58;
}

.learning-areas {
    padding: 42px 0 50px;
}

.area-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid rgba(255,255,255,0.08);
    border-left: 1px solid rgba(255,255,255,0.08);
}

.area-grid article {
    min-width: 0;
    padding: 22px;
    border-right: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.area-grid span {
    color: var(--orange-2);
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.area-grid h3 {
    margin: 10px 0 8px;
    color: var(--text);
    font-size: 22px;
    line-height: 1.2;
}

.area-grid p,
.faq-list p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-list details {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.035);
}

.faq-list summary {
    cursor: pointer;
    padding: 15px 16px;
    color: var(--text);
    font-size: 17px;
    font-weight: 800;
}

.faq-list p {
    padding: 0 16px 16px;
}

.feed-section {
    padding: 36px 0 78px;
}

.section-header,
.archive-header {
    margin-bottom: 26px;
}

.section-header h1,
.section-header h2,
.archive-header h1 {
    margin: 0;
    font-size: 36px;
    line-height: 1.12;
}

.archive-header {
    padding: 68px 0 8px;
}

.archive-header p {
    max-width: 680px;
    color: var(--muted);
    font-size: 18px;
}

.author-archive img {
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
    border-radius: 8px;
    object-fit: cover;
}

.post-feed {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.09);
}

.post-card {
    min-width: 0;
    border-bottom: 1px solid rgba(255,255,255,0.09);
    background: transparent;
}

.post-card-link {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: center;
    gap: 22px;
    min-height: 100%;
    padding: 18px 0;
    color: inherit;
    text-decoration: none;
}

.post-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: var(--panel-2);
}

.post-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 240ms ease;
}

.post-card:hover .post-card-media img {
    transform: scale(1.03);
}

.post-card-body {
    display: grid;
    gap: 9px;
    padding: 0;
}

.post-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--soft);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.post-card-meta span {
    color: var(--teal);
}

.post-card h2 {
    margin: 0;
    color: var(--text);
    font-size: 24px;
    line-height: 1.25;
}

.post-card p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.read-more {
    color: var(--orange-2);
    font-size: 14px;
    font-weight: 800;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 36px;
    color: var(--muted);
}

.empty-state,
.error-page {
    max-width: 680px;
    padding: 26px 0 48px;
}

.empty-state h2,
.error-page h1 {
    margin: 0 0 10px;
    font-size: 30px;
    line-height: 1.15;
}

.empty-state p,
.error-page p {
    color: var(--muted);
}

.article-header {
    width: min(1040px, calc(100vw - 40px));
    margin: 0 auto;
    padding: 72px 0 28px;
}

.article-kicker,
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--soft);
    font-size: 13px;
    font-weight: 750;
    text-transform: uppercase;
}

.article-kicker a,
.article-meta a {
    color: var(--teal);
    text-decoration: none;
}

.article-header h1 {
    max-width: 920px;
    margin: 18px 0 0;
    color: var(--text);
    font-size: 58px;
    line-height: 1.05;
    font-weight: 800;
}

.article-excerpt {
    max-width: 760px;
    margin: 20px 0 0;
    color: #d6dde4;
    font-size: 20px;
    line-height: 1.55;
}

.article-meta {
    margin-top: 22px;
}

.article-feature {
    margin: 34px 0 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-2);
    box-shadow: var(--shadow);
}

.article-feature img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.article-feature figcaption,
.kg-card figcaption {
    padding: 10px 14px;
    color: var(--soft);
    font-size: 13px;
    text-align: center;
}

.article-shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 760px);
    justify-content: center;
    gap: 44px;
    padding: 36px 0 58px;
}

.article-shell.no-toc {
    display: block;
    width: min(840px, calc(100vw - 40px));
}

.article-toc {
    position: sticky;
    top: 98px;
    align-self: start;
    max-height: calc(100vh - 122px);
    overflow: auto;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(20,26,33,0.76);
}

.article-toc:empty {
    display: none;
}

.toc-title {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.toc-list {
    display: grid;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.toc-list a {
    display: block;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    text-decoration: none;
}

.toc-list a:hover {
    color: var(--orange-2);
}

.gh-content {
    min-width: 0;
    color: #e7ebef;
    font-size: 18px;
    line-height: 1.78;
}

.gh-content > *:first-child {
    margin-top: 0;
}

.gh-content h2,
.gh-content h3,
.gh-content h4 {
    color: var(--text);
    line-height: 1.18;
}

.gh-content h2 {
    margin: 52px 0 14px;
    font-size: 32px;
}

.gh-content h3 {
    margin: 34px 0 10px;
    font-size: 23px;
}

.gh-content p {
    margin: 0 0 20px;
}

.gh-content a {
    color: var(--orange-2);
    text-decoration-thickness: 1px;
}

.gh-content ul,
.gh-content ol {
    padding-left: 24px;
    margin: 0 0 24px;
}

.gh-content li + li {
    margin-top: 7px;
}

.gh-content blockquote {
    margin: 32px 0;
    padding: 18px 20px;
    border-left: 4px solid var(--orange);
    border-radius: 0 8px 8px 0;
    background: rgba(255,138,24,0.08);
    color: #f5ede2;
}

.gh-content code {
    padding: 0.16em 0.34em;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 5px;
    background: rgba(255,255,255,0.07);
    color: var(--lime);
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.88em;
}

.gh-content pre {
    overflow-x: auto;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #080b0f;
}

.gh-content pre code {
    padding: 0;
    border: 0;
    background: transparent;
}

.gh-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    margin: 28px 0;
    border-collapse: collapse;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(20,26,33,0.86);
}

.gh-content th,
.gh-content td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.09);
    text-align: left;
    vertical-align: top;
    min-width: 130px;
}

.gh-content th {
    color: var(--lime);
    font-size: 13px;
    text-transform: uppercase;
}

.gh-content .kg-card {
    margin: 34px 0;
}

.gh-content .kg-image,
.gh-content .kg-gallery-image img {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-2);
}

.gh-content .kg-callout-card {
    border-radius: 8px;
}

.gh-content .kg-toggle-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(20,26,33,0.86);
    box-shadow: none;
}

.gh-content .kg-toggle-heading-text {
    font-size: 18px;
}

.article-footer {
    padding-bottom: 80px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.tag-row a {
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.tag-row a:hover {
    color: var(--text);
    border-color: rgba(255,138,24,0.55);
}

.author-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: center;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(20,26,33,0.82);
}

.author-box img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
}

.author-box h2,
.author-box p {
    margin: 0;
}

.author-box p:last-child {
    color: var(--muted);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #07090c;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: start;
    padding: 38px 0;
}

.footer-brand {
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
}

.site-footer p {
    max-width: 460px;
    margin: 8px 0 0;
    color: var(--muted);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.footer-nav .nav {
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 980px) {
    .header-inner {
        grid-template-columns: auto auto auto;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        display: none;
        padding: 18px 20px 24px;
        border-bottom: 1px solid var(--line);
        background: rgba(10,12,15,0.98);
    }

    body.nav-open .nav-menu {
        display: block;
    }

    .nav-menu .nav {
        display: grid;
        gap: 4px;
    }

    .nav-menu a {
        min-height: 46px;
        padding: 0;
        font-size: 18px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-screen {
        max-width: 720px;
    }

    .seo-intro-inner,
    .faq-inner {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .seo-intro h2,
    .faq-inner h2 {
        max-width: 520px;
    }

    .area-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .article-shell {
        display: block;
        width: min(760px, calc(100vw - 40px));
    }

    .article-toc {
        position: relative;
        top: auto;
        margin-bottom: 28px;
    }
}

@media (max-width: 700px) {
    :root {
        --inner: min(100vw - 28px, 1120px);
    }

    .header-inner {
        min-height: 64px;
        gap: 10px;
    }

    .brand-text span {
        display: none;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .header-actions .button {
        display: none;
    }

    .nav-menu {
        top: 64px;
    }

    .hero-inner {
        gap: 16px;
        padding: 26px 0 22px;
    }

    .hero h1 {
        font-size: 31px;
        line-height: 1.05;
    }

    .hero-lede {
        margin-top: 12px;
        font-size: 16px;
    }

    .hero-screen img {
        height: 168px;
    }

    .article-excerpt {
        font-size: 17px;
    }

    .seo-intro-inner,
    .faq-inner {
        padding: 18px 0;
    }

    .seo-intro h2,
    .faq-inner h2 {
        font-size: 22px;
    }

    .seo-copy p {
        font-size: 16px;
    }

    .learning-areas {
        padding: 34px 0 42px;
    }

    .area-grid {
        grid-template-columns: 1fr;
    }

    .area-grid article {
        padding: 18px;
    }

    .area-grid h3 {
        font-size: 20px;
    }

    .feed-section {
        padding: 38px 0 62px;
    }

    .post-feed {
        gap: 0;
    }

    .post-card-link {
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 14px;
        padding: 14px 0;
    }

    .post-card h2 {
        font-size: 18px;
    }

    .post-card p,
    .read-more {
        display: none;
    }

    .section-header h1,
    .section-header h2,
    .archive-header h1 {
        font-size: 30px;
    }

    .article-header {
        width: var(--inner);
        padding-top: 52px;
    }

    .article-header h1 {
        font-size: 39px;
    }

    .article-shell {
        width: var(--inner);
        padding-top: 24px;
    }

    .gh-content {
        font-size: 17px;
    }

    .gh-content h2 {
        font-size: 27px;
    }

    .author-box,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-nav,
    .footer-nav .nav {
        justify-content: flex-start;
    }
}

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