@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;800&display=swap');

:root {
    --bg: #121212;
    --text: #e0e0e0;
    --text-muted: #aaa;
    --border: #333;
    --card-bg: #1e1e1e;
    --accent: #4a9eff;
    --kicker: #ff8c69;
    --header-bg: #181818;
    --header-border: #222;
}

[data-theme="light"] {
    --bg: #f7f7f4;
    --text: #171717;
    --text-muted: #444;
    --border: #cfcfc7;
    --card-bg: #fff;
    --accent: #0f5fb5;
    --kicker: #7a2f12;
    --header-bg: #fff;
    --header-border: #d8d8d0;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.55;
    transition: background 0.3s, color 0.3s;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
}

.masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 18px;
}

.brand {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--text);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}

.nav {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.nav a:hover, .story-card a:hover, .article a:hover {
    color: var(--accent);
}

.search-link {
    border: 1px solid var(--text);
    padding: 7px 14px;
    border-radius: 999px;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: transform 0.2s;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: var(--border);
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 18px 48px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
    gap: 40px;
    align-items: center;
    padding: 60px 0 40px;
    border-bottom: 3px double var(--text);
}

.hero h1 {
    font-size: clamp(48px, 9vw, 96px);
    line-height: .9;
    margin: 12px 0;
    letter-spacing: -0.02em;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
}

.hero p {
    max-width: 720px;
    color: var(--text-muted);
    font-size: 22px;
}

.kicker, .source {
    color: var(--kicker);
    text-transform: uppercase;
    font: 700 12px/1.2 'Inter', sans-serif;
    letter-spacing: .08em;
}

.primary {
    display: inline-flex;
    width: max-content;
    margin-top: 22px;
    padding: 12px 20px;
    border: 1px solid var(--text);
    border-radius: 4px;
    color: var(--bg);
    background: var(--text);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    transition: opacity 0.2s;
}

.primary:hover {
    opacity: 0.9;
}

.latest {
    padding: 28px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.latest h2 {
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1;
    margin: 12px 0;
}

.section-title {
    font: 800 14px/1 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: .08em;
    border-bottom: 1px solid var(--text);
    padding-bottom: 10px;
    margin: 40px 0 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}

.story-card {
    min-height: 240px;
    padding: 24px;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.story-card:hover {
    background: var(--bg);
}

.story-card h3 {
    font-size: 22px;
    line-height: 1.2;
    margin: 10px 0;
}

.story-card a {
    text-decoration: none;
    color: var(--text);
}

.story-card p {
    color: var(--text-muted);
    font-size: 15px;
}

.newsletter-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 60px 20px;
    margin: 60px 0;
    text-align: center;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.newsletter-section h3 {
    font-size: 36px;
    margin-top: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    justify-content: center;
    max-width: 540px;
    margin: 30px auto 0;
}

.newsletter-form input {
    flex: 1;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
}

.newsletter-form button {
    padding: 16px 32px;
    background: var(--text);
    color: var(--bg);
    border: 1px solid var(--text);
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.contact-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 30px;
    margin: 30px 0;
    border-radius: 12px;
}

.footer {
    border-top: 1px solid var(--border);
    margin-top: 40px;
    padding: 32px 0;
    color: var(--text-muted);
    font: 14px 'Inter', sans-serif;
}

.footer a {
    color: var(--text);
    margin-right: 20px;
    text-decoration: none;
    font-weight: 700;
}

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

@media (max-width: 860px) {
    .masthead { align-items: flex-start; flex-direction: column; }
    .brand { font-size: 24px; }
    .hero { grid-template-columns: 1fr; padding-top: 40px; }
    .grid { grid-template-columns: 1fr; }
    .story-card { min-height: 0; }
    .newsletter-form { flex-direction: column; }
}
