:root {
    --blue: #0789e8;
    --blue-dark: #056fbf;
    --ink: #171a1f;
    --muted: #667085;
    --line: #e7eaf0;
    --paper: #ffffff;
    --wash: #f6f7f9;
    --shell: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--wash);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .16em; }
.shell { width: min(calc(100% - 32px), var(--shell)); margin-inline: auto; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 1000; background: #fff; padding: 10px 14px; }
.skip-link:focus { top: 12px; }

.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-row { min-height: 68px; display: flex; align-items: center; gap: 32px; }
.brand { color: var(--blue); font-size: 29px; font-weight: 850; letter-spacing: -.045em; text-decoration: none; white-space: nowrap; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; gap: 26px; list-style: none; padding: 0; margin: 0; }
.primary-nav a { font-size: 15px; font-weight: 700; text-decoration: none; }
.primary-nav a:hover, .primary-nav a:focus-visible { color: var(--blue); }
.nav-toggle, .nav-button { display: none; }

.site-main { padding-block: 34px 52px; }
.page-header h1 { margin: 0 0 24px; font-size: clamp(28px, 4vw, 38px); line-height: 1.1; letter-spacing: -.035em; }
.story-list { background: var(--paper); border-radius: 12px; overflow: hidden; }
.story-card { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 26px; padding: 22px; border-bottom: 1px solid var(--line); }
.story-card:last-child { border-bottom: 0; }
.card-image { align-self: start; aspect-ratio: 26 / 17; overflow: hidden; border-radius: 9px; background: #e9edf2; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-category, .article-category { color: var(--blue-dark); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
.card-category a, .article-category a { color: inherit; text-decoration: none; }
.card-title { margin: 5px 0 7px; font-size: clamp(21px, 2.6vw, 28px); line-height: 1.18; letter-spacing: -.025em; }
.card-title a { text-decoration: none; }
.card-title a:hover { color: var(--blue-dark); }
.card-meta, .article-meta { color: var(--muted); font-size: 14px; }
.card-excerpt { color: #3f4652; margin-top: 8px; }
.card-excerpt p { margin: 0; }

.navigation.pagination { margin-top: 28px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.page-numbers { min-width: 42px; min-height: 42px; display: inline-grid; place-items: center; padding: 8px 12px; background: #fff; border-radius: 7px; text-decoration: none; }
.page-numbers.current { background: var(--blue); color: #fff; }

.article-shell { width: min(calc(100% - 32px), 820px); padding-block: 38px 64px; }
.article { background: var(--paper); border-radius: 12px; padding: clamp(22px, 5vw, 54px); }
.article-header { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 28px; }
.article-header h1 { margin: 7px 0 13px; font-size: clamp(32px, 5.3vw, 52px); line-height: 1.08; letter-spacing: -.045em; text-wrap: balance; }
.article-content { font-family: Georgia, "Times New Roman", serif; font-size: clamp(19px, 2.3vw, 21px); line-height: 1.75; }
.article-content > :first-child { margin-top: 0; }
.article-content h2, .article-content h3 { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.2; letter-spacing: -.025em; margin-top: 1.7em; }
.article-content a { color: var(--blue-dark); }
.article-content img { border-radius: 9px; }
.article-content iframe { max-width: 100%; }
.article-content table { display: block; max-width: 100%; overflow-x: auto; }
.post-views { margin-top: 30px; color: var(--muted); font-size: 14px; }
.post-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 700; }
.post-navigation > div:last-child { text-align: right; }
.post-navigation a { text-decoration: none; }

.site-footer { background: #11151a; color: #d9dee6; padding: 30px 0; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-row p { margin: 0; }
.footer-row ul { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.footer-row a { text-decoration: none; }
.empty-state { padding-block: 90px; text-align: center; }
.button { display: inline-block; background: var(--blue); color: #fff; padding: 12px 20px; border-radius: 8px; text-decoration: none; font-weight: 800; }

@media (max-width: 820px) {
    .header-row { min-height: 62px; }
    .brand { font-size: 25px; }
    .nav-button { margin-left: auto; width: 44px; height: 44px; display: grid; align-content: center; gap: 5px; cursor: pointer; padding: 10px; }
    .nav-button span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
    .primary-nav { display: none; position: absolute; z-index: 50; left: 0; right: 0; top: 62px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 14px 30px rgba(20, 30, 45, .09); }
    .primary-nav ul { display: block; width: min(calc(100% - 32px), var(--shell)); margin-inline: auto; padding: 8px 0 14px; }
    .primary-nav a { display: block; min-height: 46px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
    .nav-toggle:checked ~ .primary-nav { display: block; }
    .story-card { grid-template-columns: 210px minmax(0, 1fr); gap: 20px; }
}

@media (max-width: 620px) {
    body { font-size: 16px; }
    .shell, .article-shell { width: min(calc(100% - 20px), var(--shell)); }
    .site-main { padding-block: 18px 36px; }
    .page-header h1 { margin-bottom: 15px; }
    .story-list { border-radius: 9px; }
    .story-card { grid-template-columns: 42% minmax(0, 1fr); gap: 13px; padding: 13px; align-items: start; }
    .card-title { font-size: clamp(17px, 4.6vw, 21px); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
    .card-excerpt { display: none; }
    .card-meta { font-size: 12px; }
    .article-shell { padding-block: 10px 34px; }
    .article { border-radius: 8px; padding: 22px 17px 30px; }
    .article-header { padding-bottom: 18px; margin-bottom: 22px; }
    .article-header h1 { font-size: clamp(30px, 9vw, 40px); }
    .article-content { font-size: 19px; line-height: 1.7; }
    .post-navigation { grid-template-columns: 1fr; }
    .post-navigation > div:last-child { text-align: left; }
    .footer-row { display: block; text-align: center; }
    .footer-row ul { justify-content: center; flex-wrap: wrap; margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
