:root {
        --gunmetal: #36393B;
        --icy-blue: #A5D8FF;
        --light-blue: #AFD0D6;
        --pale-slate: #BFB6BB;
        --rosy-taupe: #C49799;
}

* {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
}

html {
        scroll-behavior: smooth;
        min-height: 100%;
        font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        background: var(--gunmetal);
        color: var(--pale-slate);
}

body {
        min-height: 100vh;
        background: linear-gradient(180deg, #36393B 0%, #303335 100%);
}

img {
        max-width: 100%;
}

a {
        color: var(--icy-blue);
        text-decoration: none;
}

a:hover {
        color: var(--rosy-taupe);
}

main.page-shell {
        width: min(1200px, calc(100% - 48px));
        margin: 0 auto;
        padding: 48px 0 96px;
}

body[data-page="post"] {
        overflow: hidden;
}

body[data-page="post"] main.page-shell {
        height: calc(100vh - 64px);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
}

body[data-page="post"] .article-content {
        min-height: 100%;
}

header {
        position: sticky;
        top: 0;
        z-index: 1000;
        width: 100%;
        background: rgba(54, 57, 59, 0.92);
        border-bottom: 1px solid rgba(175, 208, 214, 0.16);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
}

main.page-shell {
        position: relative;
        z-index: 1;
}

.headerbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        max-width: 1200px;
        margin: 0 auto;
        padding: 18px 32px;
}

#headerbar-left {
        display: flex;
        align-items: center;
        gap: 28px;
}

header a {
        position: relative;
        color: var(--pale-slate);
        font-size: 15px;
        font-weight: 600;
        letter-spacing: 0.02em;
        text-decoration: none;
        transition: color 0.2s ease, background-color 0.2s ease;
}

header a:hover,
header a:focus,
header a:active {
        color: var(--icy-blue);
        background: transparent;
}

header a::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -6px;
        width: 0;
        height: 2px;
        background: var(--rosy-taupe);
        transition: width 0.2s ease;
}

header a:hover::after {
        width: 100%;
}

.hero {
        display: block;
        margin: 0 0 48px;
        padding: 40px 0 8px;
}

.hero-copy {
        padding: 32px 0 24px;
        max-width: 820px;
}

.eyebrow {
        display: inline-block;
        margin-bottom: 16px;
        color: var(--rosy-taupe);
        text-transform: uppercase;
        letter-spacing: 0.14em;
        font-size: 0.74rem;
        font-weight: 700;
}

.eyebrow.tiny {
        margin-bottom: 12px;
}

.hero-copy h1,
.content-panel h1,
.article-header h1,
.section-heading h2 {
        color: var(--icy-blue);
        line-height: 1.1;
}

.hero-copy h1 {
        font-size: clamp(2.2rem, 5vw, 4rem);
        letter-spacing: -0.05em;
        margin-bottom: 18px;
}

.hero-copy p,
.content-panel p,
.content-panel li,
.article-body p,
.article-body li,
.article-body blockquote,
.card p,
.featured-card p {
        color: var(--pale-slate);
}

.hero-copy p {
        font-size: 1.08rem;
        line-height: 1.7;
        max-width: 680px;
}

.hero-actions {
        display: flex;
        gap: 12px;
        margin-top: 28px;
}

.button-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px 20px;
        border-radius: 12px;
        font-weight: 700;
        background: var(--icy-blue);
        color: var(--gunmetal);
        box-shadow: 0 10px 24px rgba(165, 216, 255, 0.18);
        transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.2s ease;
}

.button-link:hover {
        background: var(--rosy-taupe);
        transform: translateY(-1px);
        color: var(--gunmetal);
        box-shadow: 0 14px 28px rgba(196, 151, 153, 0.22);
}

.content-section {
        margin-top: 36px;
}

.section-heading {
        margin-bottom: 20px;
}

.section-heading h2 {
        font-size: clamp(1.6rem, 2vw, 2.2rem);
}

.posts {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 32px;
        align-items: start;
}

.card,
.featured-card {
        position: relative;
        width: 100%;
        cursor: pointer;
        overflow: hidden;
        background: linear-gradient(145deg, #303335, #292c2e);
        border: 1px solid rgba(175, 208, 214, 0.10);
        border-radius: 18px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
        transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover,
.featured-card:hover {
        transform: translateY(-6px);
        border-color: rgba(196, 151, 153, 0.65);
        box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28), 0 0 24px rgba(196, 151, 153, 0.14);
}

.card {
        padding: 12px 12px 20px;
}

.card-body {
        padding: 12px 8px 0;
}

.card h1 {
        margin-bottom: 8px;
        color: var(--icy-blue);
        font-size: 1.35rem;
        line-height: 1.25;
        letter-spacing: -0.02em;
}

.card-img {
        width: 100%;
        height: 220px;
        display: block;
        object-fit: cover;
        border-radius: 12px;
        transition: transform 0.35s ease, filter 0.35s ease;
}

.card:hover .card-img,
.featured-card:hover .card-img {
        transform: scale(1.025);
        filter: brightness(1.04);
}

.featured-post {
        position: relative;
        min-height: 420px;
        border-radius: 24px;
        overflow: hidden;
        background: var(--gunmetal);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.featured-post .featured-card {
        min-height: 420px;
        display: block;
        border-radius: 24px;
        background: transparent;
        box-shadow: none;
        border: none;
}

.featured-post .card-img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
}

.featured-post .featured-card::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, rgba(54, 57, 59, 0.96) 0%, rgba(54, 57, 59, 0.82) 35%, rgba(54, 57, 59, 0.30) 70%, rgba(54, 57, 59, 0.05) 100%);
        pointer-events: none;
}

.featured-post .card-content {
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 55%;
        min-height: 420px;
        padding: 48px;
}

.featured-post h1 {
        margin: 0 0 16px;
        color: var(--icy-blue);
        font-size: clamp(2rem, 4vw, 3.5rem);
        line-height: 1.05;
        letter-spacing: -0.04em;
}

.featured-post p {
        max-width: 600px;
        font-size: 1.05rem;
        line-height: 1.6;
}

.article-page-shell {
        padding-top: 56px;
        padding-bottom: 64px;
}

.article-content {
        max-width: 760px;
        margin: 0 auto;
}

.article-header {
        margin-bottom: 24px;
}

.article-header h1 {
        margin-bottom: 16px;
        font-size: clamp(2.25rem, 5vw, 4rem);
        letter-spacing: -0.04em;
}

.article-header img {
        position: static;
        display: block;
        width: 100%;
        margin: 20px 0 18px;
        border-radius: 18px;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        object-fit: cover;
        z-index: auto;
}

.article-meta {
        color: var(--pale-slate);
        font-size: 0.92rem;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
        color: var(--icy-blue);
        margin: 1.5em 0 0.6em;
}

.article-body p {
        font-size: 1.05rem;
        line-height: 1.8;
        margin: 1.4em 0;
}

.article-body a {
        color: var(--icy-blue);
}

.article-body img {
        position: static;
        width: 100%;
        margin: 32px 0;
        border-radius: 14px;
        z-index: auto;
}

.article-body pre {
        margin: 24px 0;
        padding: 20px;
        overflow-x: auto;
        background: #292c2e;
        border: 1px solid rgba(175, 208, 214, 0.15);
        border-radius: 12px;
}

.article-body pre code {
        padding: 0;
        border: none;
        color: var(--light-blue);
        background: transparent;
}

.article-body p code {
        padding: 2px 6px;
        background: rgba(175, 208, 214, 0.10);
        color: var(--icy-blue);
        border-radius: 5px;
}

.article-body blockquote {
        margin: 28px 0;
        padding: 16px 20px;
        background: rgba(196, 151, 153, 0.08);
        border-left: 3px solid var(--rosy-taupe);
        border-radius: 0 8px 8px 0;
}

.empty-state {
        padding: 24px 0;
        color: var(--pale-slate);
}

.content-panel {
        max-width: 760px;
        margin: 0 auto;
        padding: 28px 0;
}

.content-panel h1,
.content-panel h2 {
        margin-bottom: 16px;
}

.content-panel p {
        margin: 1em 0;
        line-height: 1.8;
}

@media (max-width: 700px) {
        .headerbar {
                padding: 16px 20px;
        }

        #headerbar-left {
                gap: 16px;
        }

        header a {
                font-size: 14px;
        }

        main.page-shell {
                width: min(100% - 32px, 1200px);
                padding-top: 32px;
        }

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

        .featured-post .card-content {
                width: 100%;
                padding: 28px 22px;
        }

        .posts {
                grid-template-columns: 1fr;
                gap: 24px;
        }

        .card-img {
                height: 240px;
        }
}
