:root {
    --color-bg: #111214;
    --color-surface: #1b1d21;
    --color-text: #f7f7f5;
    --color-muted: #b7bbc4;
    --color-accent: #e33127;
    --container-width: 1280px;
    --page-gutter: clamp(16px, 4vw, 40px);
    --section-space: clamp(56px, 7vw, 96px);
    --card-padding: clamp(20px, 2.4vw, 28px);
    --header-height: 76px;
    /* Display headings: formerly reached 68–72px on desktop. */
    --font-size-display: clamp(1.875rem, 2.9vw, 2.5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--color-bg); color: var(--color-text); font-family: Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
main { padding-top: var(--header-height); overflow: clip; }
.container { width: min(calc(100% - (var(--page-gutter) * 2)), var(--container-width)); margin: 0 auto; }

.site-header, .site-footer { background: var(--color-surface); }
.site-header { position: fixed; z-index: 80; top: 0; right: 0; left: 0; }
.site-header { border-bottom: 1px solid #363a42; }
.admin-bar .site-header { top: 32px; }
.site-header__inner { min-height: 76px; display: flex; align-items: center; gap: 24px; }
.site-logo { display: block; width: 230px; flex: 0 0 auto; }
.site-logo img { display: block; width: 100%; height: auto; }
.site-navigation { margin-left: auto; }
.site-navigation .menu { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.site-navigation a { display: block; padding: 10px 2px; color: var(--color-muted); font-weight: 700; transition: color .2s ease, box-shadow .2s ease; }
.site-navigation a:hover, .site-navigation .current-menu-item > a, .site-navigation .current_page_item > a { color: var(--color-text); box-shadow: inset 0 -2px 0 var(--color-accent); }
.menu-toggle, .menu-close { display: none; }

.site-footer { padding: 32px 0; border-top: 1px solid #363a42; color: var(--color-muted); }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--color-muted); text-decoration: underline; text-underline-offset: 4px; }
.site-footer a:hover { color: var(--color-text); }

.page-section { padding: var(--section-space) 0; }
.section-surface { background: var(--color-surface); }

.section-heading { max-width: 920px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-heading h1,
.section-heading h2 { margin: 0 0 18px; font-size: var(--font-size-display); line-height: 1; }
.section-heading p { color: var(--color-muted); font-size: clamp(1rem, 1.5vw, 1.1rem); line-height: 1.6; }
.section-heading > p:last-child { max-width: 760px; }

.eyebrow { color: var(--color-accent); font-weight: 700; letter-spacing: .08em; }
.button { display: inline-block; margin-top: 20px; padding: 16px 26px; background: var(--color-accent); font-weight: 700; transition: background .2s ease, transform .2s ease; }
.button:hover { background: #f03a30; transform: translateY(-2px); }
.text-link { display: inline-block; margin-top: 14px; color: var(--color-text); font-weight: 700; transition: color .2s ease; }
.text-link:hover { color: var(--color-accent); }
.content { max-width: 850px; }
.content > *:first-child { margin-top: 0; }
.content > *:last-child { margin-bottom: 0; }
.content p, .content li { line-height: 1.75; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }

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

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 40px;
    color: var(--color-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color .25s ease;
}

.back-link:hover { color: var(--color-accent); }

.post-tags { display: flex; flex-wrap: wrap; gap: 12px; }
.post-tags a {
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
    text-decoration: none;
    font-size: .9rem;
    transition: .25s ease;
}

.post-tags a:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

.card-tags { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.card-tag {
    padding: 6px 12px;
    border: 1px solid #363a42;
    color: var(--color-muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

/* Wide and 4K displays: wider layout, while text remains comfortably readable. */
@media (min-width: 1800px) {
    :root {
        --container-width: 1440px;
        --page-gutter: 48px;
        --section-space: clamp(72px, 5vw, 128px);
        --card-padding: 32px;
    }
}

@media (max-width: 910px) {
    :root { --header-height: 64px; }
    .admin-bar .site-header { top: 46px; }
    body.menu-open { overflow: hidden; }
    .site-header__inner { min-height: 64px; gap: 14px; padding: 12px 0; }
    .site-logo { width: 180px; }
    .menu-toggle { display: flex; width: 46px; height: 42px; margin-left: auto; padding: 10px; flex-direction: column; justify-content: space-between; border: 1px solid #41444b; background: transparent; cursor: pointer; }
    .menu-toggle span { display: block; width: 100%; height: 2px; background: var(--color-text); }
    .site-navigation { position: fixed; z-index: 100; top: 0; right: 0; width: min(86vw, 360px); height: 100dvh; margin: 0; padding: 92px 30px 30px; overflow-y: auto; background: #17191e; box-shadow: -20px 0 45px rgba(0, 0, 0, .35); transform: translateX(100%); transition: transform .28s ease; }
    .site-navigation.is-open { transform: translateX(0); }
    .site-navigation .menu { display: flex; flex-direction: column; gap: 6px; }
    .site-navigation a { padding: 15px 0; font-size: 1.2rem; }
    .menu-close { display: grid; position: absolute; top: 18px; right: 22px; width: 46px; height: 46px; place-items: center; border: 1px solid #41444b; background: transparent; color: var(--color-text); font-size: 2rem; line-height: 1; cursor: pointer; }
    .menu-backdrop { position: fixed; z-index: 70; inset: 0; background: rgba(0, 0, 0, .62); opacity: 0; pointer-events: none; transition: opacity .28s ease; }
    .menu-backdrop.is-visible { opacity: 1; pointer-events: auto; }
    .page-section { padding: var(--section-space) 0; }
    .section-heading { margin-bottom: 32px; }
    .section-heading h1,
    .section-heading h2 { font-size: clamp(1.75rem, 6vw, 2rem); }
    .eyebrow { font-size: .78rem; }
    .button { padding: 15px 22px; }
    .site-footer__inner { align-items: flex-start; flex-direction: column; }
    h1, h2, h3, h4, h5, h6 { overflow-wrap: anywhere; word-break: normal; }
    .back-link { margin-bottom: 24px; }
    .post-tags { gap: 8px; }
    .post-tags a { padding: 7px 14px; font-size: .85rem; }
}
