/*
Theme Name: The Nerdy Humourist
Theme URI: https://example.com/nerdy-humourist
Author: Antigravity
Author URI: https://example.com
Description: A custom WordPress theme for The Nerdy Humourist, cloning the layout of The New York Times.
Version: 1.0.0
Text Domain: nerdy-humourist
*/

:root {
    /* Colors */
    --color-black: #000000;
    --color-white: #ffffff;
    --color-gray-border: #e2e2e2;
    --color-gray-text: #5a5a5a;
    --color-gray-light: #f7f7f7;
    --color-red-live: #c00;
    --color-blue-link: #326891;

    /* Typography */
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
    --font-gothic: 'UnifrakturMaguntia', cursive;
    /* Fallback/Choice for Logo if text-based */

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Container */
    --container-width: 1200px;
}

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

body {
    font-family: var(--font-sans);
    color: var(--color-black);
    line-height: 1.5;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: underline;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Base Utility Classes */
.hidden {
    display: none;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

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

.uppercase {
    text-transform: uppercase;
}

.bold {
    font-weight: bold;
}

.justify-center {
    justify-content: center;
}

/* -------------------------------------------------------------------------- */
/*	Header
/* -------------------------------------------------------------------------- */

.header-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    font-size: 13px;
    font-weight: 700;
}

.header-left button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    margin-right: 10px;
}

.header-date {
    text-align: left;
    /* Actually on left in NYT, but center in mockup? Wait, check screenshot. Screenshot 1: Date is TOP LEFT under search? No, Date is below search bar. Wait, let's look closer at Screenshot 1.
    Top row: Search (Left), Date (Left-ish), "The New York Times" (Center), S&P 500 (Right), Subscribe buttons (Right).
    Actually, let's refine:
    Top Left: Hamburger, Search Icon.
    To the right of that: Date "Friday, January 30, 2026".
    Top Right: Subscribe, Log In.
    Center: "The New York Times" is huge below that top bar.
    */
}

.header-date {
    flex-grow: 1;
    /* Push to left */
    margin-left: 15px;
    font-weight: 700;
    font-size: 11px;
    line-height: 1.4;
}

.header-date .todays-paper-link {
    font-weight: 400;
    text-decoration: underline;
    cursor: pointer;
}

.header-right .btn-subscribe {
    background-color: #567b95;
    color: white;
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 10px;
    text-transform: uppercase;
}

.header-right .btn-login {
    background-color: #567b95;
    color: white;
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
}


/* Site Branding */
.site-branding {
    text-align: center;
    padding: var(--spacing-sm) 0;
    position: relative;
}

.site-title {
    font-family: var(--font-gothic);
    font-size: 64px;
    margin: 0;
    font-weight: 400;
    letter-spacing: -1px;
}

.site-title a {
    text-decoration: none;
    color: var(--color-black);
}

.stock-ticker {
    position: absolute;
    right: var(--spacing-md);
    bottom: var(--spacing-md);
    font-family: var(--font-sans);
    font-size: 12px;
}

.stock-ticker .down {
    color: #d0021b;
}


/* Main Navigation */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    border-top: 1px solid var(--color-gray-border);
    border-bottom: 1px solid var(--color-gray-border);
    padding: 10px 0;
}

.main-navigation li {
    margin: 0 10px;
}

.main-navigation a {
    font-size: 12px;
    font-weight: 400;
    /* Actually quite thin */
    color: #333;
}


/* Live Bar */
.live-bar {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
}

.live-badge {
    color: var(--color-red-live);
    font-weight: 700;
    margin-right: 10px;
    text-transform: uppercase;
    font-size: 11px;
}

.live-item {
    margin-right: 20px;
    font-weight: 700;
}

.live-item .time-ago {
    font-weight: 400;
    color: #888;
    margin-left: 5px;
    font-size: 11px;
}

.header-separator.double {
    border-top: 1px solid black;
    /* Double line effect usually achieved with border-top and border-bottom on a small spacer, or one HR style */
    border: none;
    border-top: 1px solid #000;
    border-bottom: 3px solid #000;
    /* The thick line below nav */
    height: 4px;
    /* Space between lines */
    margin: 0 0 20px 0;
}

.header-separator {
    margin: 0;
    border: 0;
    border-top: 1px solid var(--color-gray-border);
}

/* -------------------------------------------------------------------------- */
/*	Footer
/* -------------------------------------------------------------------------- */

.site-footer {
    padding: 20px 0;
    border-top: 1px solid #000;
    /* Actually double line above footer */
    font-family: var(--font-sans);
    font-size: 13px;
    margin-top: 40px;
}

.footer-separator.double {
    border: none;
    border-top: 1px solid #e2e2e2;
    border-bottom: 1px solid #e2e2e2;
    /* NYT footer usually has just simple lines */
    margin-bottom: 20px;
}

.site-title-footer {
    font-family: var(--font-gothic);
    font-size: 24px;
    margin-bottom: 20px;
}

.footer-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.footer-heading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

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

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #333;
    font-size: 13px;
}

.footer-links.account-links li {
    margin-bottom: 12px;
}

.footer-links.account-links a strong {
    font-size: 15px;
}

.site-info {
    margin-top: 40px;
    border-top: 1px solid #e2e2e2;
    padding-top: 20px;
    color: #888;
    font-size: 11px;
}

.footer-bottom-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}


/* -------------------------------------------------------------------------- */
/*	Homepage Layout
/* -------------------------------------------------------------------------- */

.site-main {
    padding-bottom: 60px;
}

/* Hero Grid */
.home-hero {
    margin-top: 20px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    /* 25% 50% 25% approx */
    gap: 30px;
    border-bottom: 1px solid var(--color-gray-border);
    padding-bottom: 20px;
}

/* Left Col */
.hero-col-left {
    padding-right: 15px;
    border-right: 1px solid var(--color-gray-border);
}

.lead-headline {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 10px;
    font-style: italic;
    /* NYT often uses italic serif for lead */
}

.lead-headline a {
    text-decoration: none;
    color: var(--color-black);
}

.lead-excerpt,
.lead-excerpt p {
    font-family: var(--font-sans);
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 10px;
}

.read-more {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 20px;
}

.story-divider {
    border: 0;
    border-top: 1px solid var(--color-gray-border);
    margin: 20px 0;
}

.secondary-headline {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
}

.secondary-lead-item p {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.read-time {
    font-size: 10px;
    color: #999;
    font-weight: 700;
    text-transform: uppercase;
}

/* Center Col */
.hero-col-center {
    padding: 0 10px;
}

.lead-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.caption-text {
    font-family: var(--font-sans);
    font-size: 10px;
    color: #888;
    margin-top: 5px;
    text-align: right;
}

/* Right Col */
.hero-col-right {
    padding-left: 15px;
    border-left: 1px solid var(--color-gray-border);
}

.sidebar-story {
    margin-bottom: 20px;
}

.sidebar-image img {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.sidebar-headline {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.sidebar-excerpt p {
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
}


/* News Grid Section */
.section-divider {
    border: 0;
    border-top: 1px solid #000;
    margin: 30px auto 10px;
    height: 1px;
}

.section-label {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.grid-4-col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.grid-col {
    border-right: 1px solid var(--color-gray-border);
    padding-right: 15px;
}

.grid-col:last-child {
    border-right: none;
}

.cat-label {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.grid-story img {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.grid-headline {
    font-size: 15px;
    line-height: 1.3;
    margin-bottom: 10px;
}

.grid-headline-small {
    font-size: 13px;
    line-height: 1.3;
    padding-top: 10px;
    border-top: 1px solid var(--color-gray-light);
}

/* Opinion Section */
.opinion-section {
    margin-top: 30px;
}

.grid-5-col {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* Actually NYT opinion usually row */
    gap: 20px;
}

.opinion-item {
    padding-right: 20px;
    border-right: 1px solid var(--color-gray-border);
}

.opinion-item:last-child {
    border-right: none;
}

.author-name {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 700;
    color: #666;
    margin-bottom: 5px;
}

.opinion-headline {
    font-size: 16px;
    font-style: italic;
    /* Often italic for opinion */
    margin-bottom: 15px;
}

.circle-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}


/* -------------------------------------------------------------------------- */
/*	Single Post Layout
/* -------------------------------------------------------------------------- */

.single-post-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* Content | Sidebar */
    gap: 40px;
    margin-top: 40px;
}

.single-article-content {
    max-width: 700px;
    /* Optimal reading width */
}

.entry-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    font-style: italic;
}

.entry-meta {
    font-family: var(--font-sans);
    font-size: 13px;
    color: #666;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--color-gray-border);
    padding-bottom: 20px;
}

.entry-meta .byline {
    font-weight: 700;
    margin-right: 15px;
    color: #000;
}

.entry-thumbnail {
    margin-bottom: 30px;
}

.entry-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.entry-thumbnail .caption {
    font-family: var(--font-sans);
    font-size: 12px;
    color: #888;
    margin-top: 8px;
    text-align: right;
}

.entry-content {
    font-family: 'Georgia', serif;
    /* Or fallback to sans if preferred, but NYT uses Georgia-like for body */
    font-size: 18px;
    line-height: 1.6;
    color: #333;
}

.entry-content p {
    margin-bottom: 20px;
}

/* Sidebar */
.widget-area {
    padding-left: 20px;
    border-left: 1px solid var(--color-gray-border);
}

.widget-title {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    border-bottom: 1px solid #000;
    padding-bottom: 5px;
    display: inline-block;
}

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

.trending-list li {
    margin-bottom: 15px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
}