:root {
    --bg: #f6f5f2;
    --surface: #ffffff;
    --text: #1c1c1e;
    --text-muted: #6b7280;
    --border: #e8e6e1;
    --accent: #0d9488;
    --accent-hover: #0f766e;
    --accent-soft: #ccfbf1;
    --highlight: #f97316;
    --shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    --radius: 16px;
    --radius-sm: 10px;
    --font-sans: "DM Sans", system-ui, sans-serif;
    --font-serif: "Newsreader", Georgia, serif;
    --max-width: 1180px;
    --header-height: 72px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(13, 148, 136, 0.08), transparent 28%),
        radial-gradient(circle at bottom left, rgba(249, 115, 22, 0.06), transparent 24%),
        var(--bg);
    min-height: 100vh;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 0.75rem;
}

h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.35rem;
}

h3 {
    font-size: 1.15rem;
}

p {
    margin: 0 0 1rem;
}

.container {
    width: min(100% - 2rem, var(--max-width));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    background: rgba(246, 245, 242, 0.88);
    border-bottom: 1px solid rgba(232, 230, 225, 0.9);
}

.header-inner {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

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

.nav-toggle {
    display: none;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    font: inherit;
    cursor: pointer;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.site-nav a {
    color: var(--text);
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
}

.site-nav a:hover,
.site-nav a.is-active {
    background: var(--accent-soft);
    color: var(--accent-hover);
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

.search-form input {
    width: 180px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    font: inherit;
}

.search-form button {
    border: none;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.search-form button:hover {
    background: var(--accent-hover);
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2rem;
    padding: 2.5rem 0 4rem;
}

.main-column {
    min-width: 0;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.panel-title {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.hero {
    margin-bottom: 2rem;
}

.hero-kicker {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--highlight);
    margin-bottom: 0.75rem;
}

.hero p {
    color: var(--text-muted);
    max-width: 42rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.featured-card {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.featured-card img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 12px;
}

.featured-card a {
    color: var(--text);
    font-weight: 600;
}

.featured-card a:hover {
    color: var(--accent);
}

.featured-card .meta {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.article-card {
    display: grid;
    grid-template-columns: minmax(180px, 280px) 1fr;
    gap: 1.25rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
}

.article-card-media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.article-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card-body h2 {
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    margin-bottom: 0.5rem;
}

.article-card-body h2 a {
    color: var(--text);
}

.article-card-body h2 a:hover {
    color: var(--accent);
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}

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

.meta a:hover {
    color: var(--accent);
}

.excerpt {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
    font-size: 0.92rem;
}

.btn-link::after {
    content: "→";
    transition: transform 0.15s ease;
}

.btn-link:hover::after {
    transform: translateX(3px);
}

.pager {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 2rem;
}

.pager a,
.pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
}

.pager a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pager .active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.article-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: var(--shadow);
}

.article-content img {
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.article-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--accent);
    background: var(--accent-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tagcloud a {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    color: var(--text);
}

.sidebar-list span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.mini-card {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 0.75rem;
    align-items: start;
    margin-bottom: 0.85rem;
}

.mini-card:last-child {
    margin-bottom: 0;
}

.mini-card img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
}

.mini-card a {
    color: var(--text);
    font-weight: 600;
    line-height: 1.35;
}

.mini-card .meta {
    margin: 0;
    font-size: 0.78rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.related-card {
    text-align: center;
}

.related-card img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 0.75rem;
}

.related-card h5 {
    font-family: var(--font-sans);
    font-size: 0.95rem;
}

.search-box {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.search-box input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.75rem 1rem;
    font: inherit;
    background: var(--surface);
}

.search-box button {
    border: none;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    padding: 0.75rem 1.25rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 1rem;
}

.embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--radius-sm);
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    background: #fee2e2;
    color: #991b1b;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: #111827;
    color: rgba(255, 255, 255, 0.82);
    padding: 2.5rem 0;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.82);
}

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

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.footer-grid h5 {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.92rem;
}

@media (max-width: 960px) {
    .layout {
        grid-template-columns: 1fr;
    }

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

    .article-card {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 760px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: calc(var(--header-height) - 8px);
        left: 1rem;
        right: 1rem;
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: flex;
    }

    .search-form {
        margin: 0;
        width: 100%;
    }

    .search-form input {
        width: 100%;
    }

    .header-inner {
        position: relative;
        flex-wrap: wrap;
    }
}
