:root {
    color-scheme: dark;
    --bg: #050505;
    --surface: #0d0d0d;
    --card: #151515;
    --card-strong: #1c1c1c;
    --text: #ffffff;
    --muted: #a8a8a8;
    --soft: #d8e0ea;
    --border: #2a2a2a;
    --brand: #0096ff;
    --brand-strong: #39adff;
    --radius: 8px;
    --shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-width: 320px;
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(0, 150, 255, 0.08) 0, rgba(0, 150, 255, 0) 420px),
        linear-gradient(180deg, #000000 0%, var(--bg) 100%);
}

a {
    color: var(--brand-strong);
    text-underline-offset: 3px;
}

a:hover { color: #78c9ff; }

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 0 0 var(--radius) 0;
    background: var(--brand);
    color: #00131f;
    font-weight: 800;
}

.skip-link:focus { left: 0; }

.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 44px;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    position: relative;
    z-index: 50;
}

.site-nav .brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #e6edf8;
    font-weight: 700;
    font-size: 1.02rem;
    text-decoration: none;
}

.site-nav .brand img {
    display: block;
    border-radius: 7px;
}

.site-nav .menu {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.site-nav .nav-item {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid rgba(94, 163, 255, 0.26);
    border-radius: 999px;
    background: rgba(20, 31, 52, 0.72);
    color: #5ea3ff;
    font-size: 0.92rem;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    list-style: none;
}

.site-nav .nav-item:hover,
.site-nav .nav-item[aria-current="page"] {
    color: #fff;
    background: #5ea3ff;
}

.site-nav summary.nav-item { list-style: none; }
.site-nav summary.nav-item::-webkit-details-marker { display: none; }

.site-nav summary.nav-item::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-left: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
}

.site-nav .nav-group { position: relative; }

.site-nav .nav-group[open] > summary.nav-item::after {
    transform: rotate(-135deg) translateY(1px);
}

.site-nav .nav-drop {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 250px;
    max-height: min(70vh, 480px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: #0f1728;
    border: 1px solid #2b3a57;
    border-radius: 12px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
    z-index: 60;
}

.site-nav .nav-drop a {
    padding: 9px 12px;
    border-radius: 8px;
    color: #e6edf8;
    font-size: 0.92rem;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav .nav-drop a:hover {
    background: rgba(94, 163, 255, 0.16);
    color: #fff;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 360px);
    gap: clamp(22px, 4vw, 44px);
    align-items: center;
    min-height: 390px;
    padding: clamp(24px, 5vw, 46px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(0, 150, 255, 0.16) 0%, rgba(0, 150, 255, 0) 52%),
        linear-gradient(180deg, rgba(21, 21, 21, 0.96) 0%, rgba(10, 10, 10, 0.96) 100%);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--brand-strong);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font-size: clamp(2.3rem, 6vw, 4.55rem);
    line-height: 0.98;
}

h2 {
    margin: 0 0 14px;
    font-size: clamp(1.45rem, 3vw, 2.25rem);
    line-height: 1.1;
}

h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    line-height: 1.24;
}

p { color: var(--soft); }

.hero-lede {
    max-width: 690px;
    margin: 18px 0 0;
    color: #dce6f4;
    font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-media {
    margin: 0;
    justify-self: center;
    width: min(100%, 250px);
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    background: #050505;
    box-shadow: 0 34px 72px rgba(0, 0, 0, 0.46);
}

.hero-media img {
    display: block;
    width: 100%;
    aspect-ratio: 1242 / 2688;
    object-fit: cover;
    object-position: top;
    border-radius: 20px;
}

.section {
    margin-top: 18px;
    padding: clamp(20px, 4vw, 34px);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: var(--radius);
    background: rgba(13, 13, 13, 0.92);
}

.blog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.blog-toolbar p { margin: 0; }

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-button,
.read-link,
.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: var(--radius);
    background: rgba(20, 20, 20, 0.72);
    color: #e8e8e8;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

.filter-button { padding: 8px 12px; }
.read-link,
.back-link { padding: 8px 14px; }

.filter-button[aria-pressed="true"],
.filter-button:hover,
.read-link:hover,
.back-link:hover {
    border-color: rgba(0, 150, 255, 0.56);
    background: rgba(0, 150, 255, 0.18);
    color: #fff;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.post-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    background: var(--card);
    overflow: hidden;
}

.post-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.post-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.83rem;
}

.post-card p { margin: 0 0 14px; }

.post-card .read-link {
    align-self: flex-start;
    margin-top: auto;
}

.article-shell {
    display: grid;
    grid-template-columns: minmax(0, 740px) minmax(230px, 1fr);
    gap: 20px;
    align-items: start;
}

.article {
    min-width: 0;
    padding: clamp(22px, 4vw, 38px);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: var(--radius);
    background: rgba(13, 13, 13, 0.94);
}

.article-header img {
    display: block;
    width: 100%;
    max-height: 430px;
    margin: 20px 0 0;
    object-fit: cover;
    object-position: top;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: var(--radius);
}

.article-content h2 {
    margin: 30px 0 10px;
    font-size: clamp(1.3rem, 2.1vw, 1.65rem);
    line-height: 1.22;
    letter-spacing: -0.01em;
}

.article-content h3 {
    margin: 24px 0 8px;
    color: var(--text);
    font-size: 1.12rem;
}

.article-content p {
    margin: 0 0 16px;
    font-size: 1.05rem;
}
.article-content ul,
.article-content ol { color: var(--soft); }
.article-content li { margin: 7px 0; }

.table-scroll {
    width: 100%;
    max-width: 100%;
    margin: 18px 0 24px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.article-content table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    color: var(--soft);
    background: var(--surface);
}

.article-content th,
.article-content td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.article-content th {
    color: var(--text);
    background: var(--card-strong);
    font-size: 0.9rem;
}

.article-content tbody tr:last-child td { border-bottom: 0; }

.article-cta,
.side-panel {
    border: 1px solid rgba(0, 150, 255, 0.24);
    border-radius: var(--radius);
    background: rgba(0, 150, 255, 0.08);
}

.article-cta {
    margin-top: 28px;
    padding: 18px;
}

.cta-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
}

.side-panel {
    position: sticky;
    top: 18px;
    padding: 18px;
}

.side-panel h2 {
    font-size: 1.05rem;
}

.related-list {
    display: grid;
    gap: 10px;
    margin: 12px 0 0;
}

.related-list a {
    color: #e6edf8;
    text-decoration: none;
}

.related-list a:hover { color: #fff; }

.footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--muted);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--soft);
    text-decoration: none;
}

.footer-links a:hover { color: #fff; }

@media (max-width: 900px) {
    .hero,
    .article-shell {
        grid-template-columns: 1fr;
    }

    .hero-media {
        justify-self: start;
        width: min(100%, 210px);
    }

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

    .side-panel { position: static; }
}

@media (max-width: 720px) {
    .site-nav { gap: 10px; }
    .site-nav .menu { width: 100%; }
    .site-nav .nav-group { position: static; }
    .site-nav .nav-drop {
        position: static;
        min-width: 0;
        width: 100%;
        margin-top: 4px;
        box-shadow: none;
        background: rgba(94, 163, 255, 0.06);
        border-color: rgba(94, 163, 255, 0.18);
    }

    .blog-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

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