:root {
    --page-bg: #26b6c7;
    --page-bg-deep: #129bae;
    --surface: #ffffff;
    --surface-soft: #f5f7f8;
    --surface-muted: #eef2f3;
    --ink: #2f3133;
    --muted: #7d8288;
    --line: #dfe5e8;
    --line-strong: #cfd6da;
    --accent: #12adc1;
    --accent-deep: #0f95a8;
    --nav-bg: #353332;
    --nav-ink: #f4f7f8;
    --footer-bg: #353332;
    --footer-ink: #d9dddf;
    --footer-muted: #b8bec2;
    --link: #0a93a6;
    --link-hover: #086f7d;
    --font-body: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-ui: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-head: "Trebuchet MS", "Segoe UI Semibold", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="dark"] {
    --page-bg: #0f1f25;
    --page-bg-deep: #0a151a;
    --surface: #13181b;
    --surface-soft: #182025;
    --surface-muted: #20292f;
    --ink: #edf1f3;
    --muted: #9ba8af;
    --line: #29353c;
    --line-strong: #33424b;
    --accent: #27c1d6;
    --accent-deep: #19a7bc;
    --nav-bg: #0f1214;
    --nav-ink: #edf1f3;
    --footer-bg: #0f1214;
    --footer-ink: #dce4e8;
    --footer-muted: #95a3aa;
    --link: #5fd2e2;
    --link-hover: #a4eff8;
}

* {
    box-sizing: border-box;
}

html {
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 26%),
        linear-gradient(180deg, var(--page-bg), var(--page-bg-deep));
}

body {
    margin: 0;
    color: var(--ink);
    background: transparent;
    font: 17px/1.68 var(--font-body);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color 160ms ease, opacity 160ms ease;
}

a:hover {
    color: var(--link-hover);
}

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

.shell {
    width: min(1460px, calc(100% - 22px));
    margin: 0 auto;
    background: var(--surface);
    min-height: 100vh;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 10px 24px;
    font-size: 0.86rem;
    color: var(--muted);
    border-top: 4px solid var(--accent);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.topbar-date {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.topbar-tools {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-label {
    white-space: nowrap;
}

.theme-toggle {
    border: 1px solid var(--line-strong);
    background: var(--surface-soft);
    color: var(--ink);
    padding: 8px 12px;
    font: 600 0.9rem/1.2 var(--font-ui);
    cursor: pointer;
}

.theme-toggle:hover {
    background: var(--surface-muted);
}

.site-header {
    padding: 24px 24px 18px;
    background: var(--surface);
}

.brand-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.brand-box a {
    color: var(--ink);
    font: 700 clamp(2rem, 4vw, 2.85rem)/1.02 var(--font-head);
    letter-spacing: 0;
    text-transform: uppercase;
}

.brand-box span {
    color: var(--muted);
    font-size: 0.95rem;
}

.main-nav {
    background: var(--nav-bg);
    border-bottom: 5px solid var(--accent);
}

.nav-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.nav-box a {
    color: var(--nav-ink);
    padding: 15px 22px;
    font-size: 1rem;
    font-weight: 500;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-box a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.breadcrumbs {
    padding: 16px 30px 10px;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumbs a {
    color: var(--muted);
}

.breadcrumbs a::after {
    content: "/";
    margin: 0 10px;
    color: #b8bec2;
}

.content {
    padding: 16px 30px 36px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 24px 28px;
    margin-bottom: 16px;
}

.hero {
    display: flex;
    align-items: center;
    min-height: 180px;
    background:
        linear-gradient(135deg, rgba(18, 173, 193, 0.14), rgba(18, 173, 193, 0.03)),
        var(--surface);
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    color: var(--accent-deep);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font: 700 0.8rem/1.2 var(--font-ui);
}

h1,
h2,
h3 {
    margin: 0 0 0.45em;
    color: var(--ink);
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: 0;
}

h1 {
    font-size: clamp(2.25rem, 4vw, 3.35rem);
}

h2 {
    font-size: clamp(1.7rem, 2.2vw, 2.45rem);
}

h3 {
    font-size: clamp(1.28rem, 1.5vw, 1.62rem);
}

p {
    margin: 0 0 1em;
}

.lead {
    font-size: 1.08rem;
    color: #5f666b;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(290px, 0.9fr);
    gap: 24px;
}

.primary-column,
.sidebar-column {
    min-width: 0;
}

.sidebar-card {
    border-bottom: 4px solid var(--accent);
}

.sidebar-links li {
    list-style: none;
    border-top: 1px solid var(--line);
}

.sidebar-links li:first-child {
    border-top: 0;
}

.sidebar-links a {
    display: block;
    padding: 10px 0;
}

.article-preview {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
}

.article-preview:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.article-thumb-link {
    display: block;
}

.article-thumb {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--surface-muted);
}

.article-body h2,
.article-body h3 {
    margin-bottom: 8px;
    line-height: 1.18;
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.9rem;
}

.featured-media {
    margin: -24px -28px 20px;
}

.featured-image {
    width: 100%;
    max-height: 560px;
    object-fit: cover;
}

.author-line {
    align-items: center;
}

.author-inline-photo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.author-header {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.author-profile-photo {
    width: 220px;
    height: 220px;
    object-fit: cover;
    background: var(--surface-muted);
    border-radius: 2px;
}

.author-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}

.author-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.author-card:first-child {
    border-top: 0;
    padding-top: 0;
}

.author-card-photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 2px;
    background: var(--surface-muted);
}

.author-role {
    color: var(--muted);
    font-size: 0.98rem;
}

.author-compact-list {
    display: grid;
    gap: 14px;
}

.author-compact {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.author-compact:first-child {
    padding-top: 0;
    border-top: 0;
}

.author-compact-photo {
    width: 74px;
    height: 74px;
    object-fit: cover;
    border-radius: 2px;
    background: var(--surface-muted);
}

.author-compact h3 {
    font-size: 1.08rem;
    margin-bottom: 4px;
}

.author-compact p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.plain-list {
    margin: 0;
    padding: 0;
}

.richtext img {
    height: auto;
}

.richtext p,
.richtext li {
    max-width: 75ch;
}

.richtext table {
    width: 100%;
    border-collapse: collapse;
}

.richtext td,
.richtext th {
    padding: 8px 10px;
    border: 1px solid var(--line-strong);
}

.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    color: var(--link);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    font-size: 0.92rem;
}

.site-footer {
    background: var(--footer-bg);
    color: var(--footer-ink);
    border-top: 6px solid var(--accent);
    margin-top: 10px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
    padding: 30px;
}

.footer-column h3 {
    color: #ffffff;
    font-size: 1.18rem;
    margin-bottom: 16px;
}

.footer-column p,
.footer-column a {
    color: var(--footer-muted);
}

.footer-column a {
    display: block;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-column a:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.footer-column a:hover {
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 30px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--footer-muted);
}

::selection {
    background: var(--accent);
    color: #ffffff;
}

@media (max-width: 980px) {
    .content-layout,
    .author-header,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .article-preview {
        grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
        gap: 16px;
    }

    .article-thumb {
        height: 180px;
    }

    .sidebar-column {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .sidebar-column .card {
        margin-bottom: 0;
    }
}

@media (max-width: 760px) {
    body {
        font-size: 16px;
    }

    .shell {
        width: 100%;
    }

    .topbar,
    .site-header,
    .content,
    .footer-grid,
    .footer-bottom,
    .breadcrumbs {
        padding-left: 16px;
        padding-right: 16px;
    }

    .topbar {
        display: none;
    }

    .site-header {
        padding-top: 18px;
        padding-bottom: 14px;
    }

    .brand-box a {
        font-size: 1.95rem;
    }

    .brand-box span {
        font-size: 0.92rem;
    }

    .main-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-bottom-width: 4px;
    }

    .nav-box {
        flex-wrap: nowrap;
        min-width: max-content;
    }

    .nav-box a {
        padding: 13px 15px;
        font-size: 0.96rem;
        white-space: nowrap;
    }

    .breadcrumbs {
        padding-top: 12px;
        padding-bottom: 8px;
        font-size: 0.88rem;
    }

    .card {
        padding: 16px;
    }

    .hero {
        min-height: 0;
    }

    .hero-copy {
        max-width: none;
    }

    .content-layout,
    .sidebar-column,
    .author-grid,
    .author-header,
    .footer-grid,
    .footer-bottom,
    .article-preview {
        grid-template-columns: 1fr;
    }

    .content-layout,
    .sidebar-column {
        gap: 16px;
    }

    .article-preview {
        gap: 14px;
    }

    .article-thumb {
        width: 100%;
        height: auto;
        max-height: 240px;
    }

    .featured-media {
        margin-left: -16px;
        margin-right: -16px;
        margin-top: -16px;
    }

    .featured-image {
        max-height: 260px;
    }

    .meta-line {
        gap: 10px;
        font-size: 0.84rem;
    }

    .author-card {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 14px;
    }

    .author-card-photo {
        width: 88px;
        height: 88px;
    }

    .author-profile-photo {
        width: 100%;
        max-width: 180px;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .author-compact {
        grid-template-columns: 60px minmax(0, 1fr);
        gap: 12px;
    }

    .author-compact-photo {
        width: 60px;
        height: 60px;
    }

    .footer-grid {
        gap: 24px;
        padding-top: 24px;
        padding-bottom: 20px;
    }

    .footer-bottom {
        padding-top: 14px;
        padding-bottom: 18px;
        font-size: 0.92rem;
    }
}

@media (max-width: 480px) {
    .content {
        padding-top: 12px;
        padding-bottom: 28px;
    }

    .brand-box a {
        font-size: 1.72rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.55rem;
    }

    h3 {
        font-size: 1.18rem;
    }

    .lead {
        font-size: 1rem;
    }

    .card {
        padding: 14px;
    }

    .nav-box a {
        padding: 12px 14px;
    }
}
