/* Base reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #eeeeee;
    --color-surface: #ffffff;
    --color-text: #333333;
    --color-muted: #939393;
    --color-accent: #DE0606;
    --color-border: #eeeeee;
    --font-family: "Quattrocento Sans", Helvetica, Arial, sans-serif;
}

.theme-dark {
    --color-bg: #0f0f0f;
    --color-surface: #151515;
    --color-text: #eeeeee;
    --color-muted: #a0a0a0;
    --color-accent: #ff6a6a;
    --color-border: #2a2a2a;
}

html {
    font-size: 16px;
    line-height: 1.7;
}

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 300;
    line-height: 27px;
    min-height: 100vh;
}

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

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

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

.site {
    background: #fff;
    margin: 27px auto;
    max-width: 960px;
    padding: 40px 50px;
}

@media screen and (min-width: 75em) {
    .site {
        padding: 50px 60px;
    }
}

/* Header and navigation */
.site-header {
    border-bottom: 1px solid #ddd;
    margin: 0 0 30px;
    padding: 0 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

/* Two-column layout */
.site-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media screen and (min-width: 50em) {
    .site-content {
        grid-template-columns: 2fr 1fr;
    }
}

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

.sidebar {
    font-size: 13px;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-title {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 15px;
    color: var(--color-text);
}

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

.sidebar-list li {
    margin-bottom: 8px;
}

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

.sidebar-list a:hover {
    text-decoration: underline;
}

.social-sidebar .social-icons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.social-sidebar .social-icons a {
    color: var(--color-accent);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.site-branding {
    max-width: 60%;
}

.site-title {
    color: var(--color-text);
    display: inline-block;
    font-size: 1.75em;
    font-weight: 400;
    letter-spacing: 3px;
    line-height: 1;
    text-transform: uppercase;
}

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

.main-navigation {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.875em;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.nav-menu a {
    color: var(--color-muted);
    display: block;
    padding: 5px 0 5px 14px;
}

.nav-menu a.active,
.nav-menu a:hover {
    color: var(--color-accent);
}

.theme-toggle {
    border: 1px solid var(--color-border);
    background: transparent;
    border-radius: 999px;
    color: var(--color-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
    height: 36px;
    width: 36px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: var(--color-accent);
    color: var(--color-accent);
    outline: none;
}

.theme-toggle-icon {
    display: block;
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 400;
    letter-spacing: 1px;
    margin: 27px 0;
    text-transform: uppercase;
}

h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 20px; }
h4 { font-size: 16px; }
h5 { font-size: 16px; }
h6 { font-size: 13px; }

p {
    margin-bottom: 27px;
    font-size: 13px;
    line-height: 1.7em;
}

ul,
ol {
    margin: 0 0 27px 27px;
}

li > ul,
li > ol {
    margin-bottom: 0;
    margin-left: 24px;
}

strong {
    font-weight: 700;
}

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

/* Featured Image */
.featured-image {
    margin-bottom: 30px;
}

.image-placeholder {
    background: #ddd;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.image-caption {
    font-size: 12px;
    color: var(--color-muted);
    margin-top: 10px;
    margin-bottom: 0;
}

.section-title {
    font-size: 13px;
    margin-top: 0;
    margin-bottom: 15px;
    text-decoration: underline;
}

/* Hero */
.hero {
    padding: 0;
}

.hero-content {
    max-width: 100%;
}

.hero-subtitle {
    color: var(--color-muted);
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 27px;
}

.hero-description {
    font-size: 13px;
    line-height: 1.7em;
}

/* Page and article */
.page,
.article {
    padding: 0;
}

.page-header h1,
.article-header h1 {
    margin-top: 0;
}

.page-content,
.article-content {
    max-width: 100%;
}

.article-meta {
    color: var(--color-muted);
    font-size: 0.8125em;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Footer */
.site-footer {
    border-top: 3px solid var(--color-border);
    color: var(--color-muted);
    font-size: 0.8125em;
    letter-spacing: 1px;
    line-height: 2.09231em;
    margin: 24px 0 0;
    padding: 14px 0 0;
    text-align: center;
    text-transform: uppercase;
}

.footer-container {
    width: 100%;
}

.social-links {
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
}

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

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

@media screen and (max-width: 45em) {
    .site-branding {
        max-width: 100%;
    }

    .main-navigation {
        width: 100%;
        justify-content: space-between;
    }

    .nav-menu {
        width: calc(100% - 54px);
        gap: 8px 12px;
    }
}

@media screen and (min-width: 60em) {
    h1 { font-size: 36px; }
    h2 { font-size: 28px; }
    .hero-description,
    .hero-subtitle,
    p {
        font-size: 13px;
        line-height: 1.7em;
    }
}
