/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #ffffff;
    --color-surface: #ffffff;
    --color-text: #000000;
    --color-text-muted: #333333;
    --color-accent: #e63946;
    --color-accent-hover: #d62828;
    --color-accent-secondary: #ffb703;
    --color-border: #000000;
    --color-code-bg: #f8f9fa;
    --color-shadow: rgba(0, 0, 0, 0.15);
    --color-highlight: #ffb703;
    --color-category-bg: #023047;

    --font-sans: 'Arial Black', 'Arial', 'Helvetica Neue', sans-serif;
    --font-body: 'Arial', 'Helvetica', sans-serif;
    --font-mono: 'Courier New', 'Courier', monospace;

    --container-width: 960px;
    --spacing-unit: 1rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #f5f5f5;
        --color-surface: #ffffff;
        --color-text: #000000;
        --color-text-muted: #333333;
        --color-accent: #e63946;
        --color-accent-hover: #d62828;
        --color-accent-secondary: #ffb703;
        --color-border: #000000;
        --color-code-bg: #f8f9fa;
        --color-shadow: rgba(0, 0, 0, 0.15);
    }
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 2);
}

/* Header */
.site-header {
    padding: calc(var(--spacing-unit) * 2) 0;
    background: var(--color-accent);
    margin-bottom: 0;
    border-bottom: 6px solid var(--color-highlight);
}

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

.site-title {
    font-family: var(--font-sans);
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: calc(var(--spacing-unit) * 0.5);
    letter-spacing: -0.02em;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.3);
}

.site-tagline {
    font-size: 1rem;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--color-category-bg);
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 2px solid #ffffff;
}

/* Intro Section */
.intro {
    margin-bottom: calc(var(--spacing-unit) * 3);
    background: var(--color-highlight);
    padding: calc(var(--spacing-unit) * 2) 0;
    border-top: 4px solid var(--color-border);
    border-bottom: 4px solid var(--color-border);
}

.intro-content {
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

.intro-content h2 {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    margin-bottom: calc(var(--spacing-unit) * 1);
    font-weight: 900;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.intro-content p {
    margin-bottom: calc(var(--spacing-unit) * 1);
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.6;
}

.intro-content p:last-child {
    margin-bottom: 0;
}

.intro-content a {
    color: var(--color-accent);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid var(--color-accent);
}

.intro-content a:hover {
    background: var(--color-accent);
    color: #ffffff;
}

/* Posts Section */
.posts {
    margin-bottom: calc(var(--spacing-unit) * 4);
    background: #f5f5f5;
    padding: calc(var(--spacing-unit) * 3) 0;
}

.section-title {
    font-family: var(--font-sans);
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    background: var(--color-accent);
    color: #ffffff;
    padding: 0.75rem 2rem;
    display: inline-block;
    border: 4px solid var(--color-border);
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.3);
}

/* Post Card */
.post-card {
    background: var(--color-surface);
    padding: calc(var(--spacing-unit) * 2);
    border-radius: 0;
    border: 4px solid var(--color-border);
    margin-bottom: calc(var(--spacing-unit) * 2.5);
    transition: all 0.2s ease;
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
    position: relative;
}

.post-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.3);
}

.post-card::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid var(--color-highlight);
    pointer-events: none;
}

.post-meta {
    display: flex;
    gap: calc(var(--spacing-unit) * 0.5);
    align-items: center;
    margin-bottom: calc(var(--spacing-unit) * 1);
    font-size: 0.75rem;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.post-meta time {
    background: var(--color-category-bg);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border: 2px solid var(--color-border);
}

.post-category {
    background: var(--color-highlight);
    color: var(--color-text);
    padding: 0.25rem 0.75rem;
    border: 2px solid var(--color-border);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

.post-title {
    font-family: var(--font-sans);
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: calc(var(--spacing-unit) * 1);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.post-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: var(--color-accent);
    text-decoration: underline;
    text-decoration-thickness: 3px;
}

.post-excerpt {
    color: var(--color-text);
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    line-height: 1.6;
    font-size: 0.95rem;
}

.post-tags {
    display: flex;
    gap: calc(var(--spacing-unit) * 0.5);
    flex-wrap: wrap;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.tag {
    font-size: 0.7rem;
    color: var(--color-text);
    background: #ffffff;
    border: 2px solid var(--color-border);
    padding: 0.3rem 0.7rem;
    border-radius: 0;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.15s ease;
}

.tag:hover {
    background: var(--color-accent);
    color: #ffffff;
    transform: translateY(-2px);
}

.read-more {
    color: #ffffff;
    background: var(--color-accent);
    text-decoration: none;
    font-weight: 900;
    font-size: 0.85rem;
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border: 3px solid var(--color-border);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.3);
}

.read-more:hover {
    background: var(--color-accent-hover);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.4);
}

/* Newsletter Section */
.newsletter {
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-code-bg) 100%);
    padding: calc(var(--spacing-unit) * 4);
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 24px var(--color-shadow);
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 6);
}

.newsletter-content h2 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    margin-bottom: calc(var(--spacing-unit) * 1.25);
    font-weight: 600;
}

.newsletter-content > p {
    color: var(--color-text-muted);
    margin-bottom: calc(var(--spacing-unit) * 2);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    display: flex;
    gap: calc(var(--spacing-unit) * 0.75);
    max-width: 500px;
    margin: 0 auto calc(var(--spacing-unit) * 1);
}

.newsletter-form input {
    flex: 1;
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--color-text);
    font-family: var(--font-sans);
    transition: all 0.2s ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(193, 125, 82, 0.1);
}

.newsletter-form button {
    padding: 0.85rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(193, 125, 82, 0.3);
}

.newsletter-note {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Footer */
.site-footer {
    border-top: 6px solid var(--color-border);
    background: var(--color-category-bg);
    color: #ffffff;
    padding: calc(var(--spacing-unit) * 3) 0;
    margin-top: 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 2);
}

.footer-content p {
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    display: flex;
    gap: calc(var(--spacing-unit) * 1.5);
}

.footer-links a {
    color: var(--color-highlight);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--color-highlight);
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .site-title {
        font-size: 2.5rem;
    }

    .site-tagline {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }

    .section-title {
        font-size: 1.5rem;
        padding: 0.6rem 1.5rem;
    }

    .intro-content {
        padding: 0;
    }

    .post-card {
        padding: calc(var(--spacing-unit) * 1.5);
    }

    .post-title {
        font-size: 1.3rem;
    }

    .newsletter {
        padding: calc(var(--spacing-unit) * 2);
    }

    .newsletter-form {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: calc(var(--spacing-unit) * 1);
    }

    .post-meta {
        flex-wrap: wrap;
    }
}

/* Article Page Styles */
article.post-content {
    background: var(--color-surface);
    padding: calc(var(--spacing-unit) * 3);
    border-radius: 0;
    border: 4px solid var(--color-border);
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.2);
    margin-bottom: calc(var(--spacing-unit) * 3);
}

article.post-content h1 {
    font-family: var(--font-sans);
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: calc(var(--spacing-unit) * 1);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: var(--color-accent);
}

article.post-content h2 {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    margin-top: calc(var(--spacing-unit) * 3);
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    font-weight: 900;
    text-transform: uppercase;
    background: var(--color-highlight);
    padding: 0.5rem 1rem;
    border-left: 6px solid var(--color-accent);
}

article.post-content h3 {
    font-family: var(--font-sans);
    font-size: 1.3rem;
    margin-top: calc(var(--spacing-unit) * 2.5);
    margin-bottom: calc(var(--spacing-unit) * 1);
    font-weight: 900;
    text-transform: uppercase;
}

article.post-content p {
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

article.post-content code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--color-code-bg);
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

article.post-content pre {
    background: var(--color-code-bg);
    padding: calc(var(--spacing-unit) * 1.5);
    border-radius: 0;
    overflow-x: auto;
    margin-bottom: calc(var(--spacing-unit) * 2);
    border: 3px solid var(--color-border);
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15);
}

article.post-content pre code {
    background: none;
    padding: 0;
}

article.post-content ul,
article.post-content ol {
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    padding-left: calc(var(--spacing-unit) * 2);
}

article.post-content li {
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}

article.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

article.post-content th,
article.post-content td {
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    text-align: left;
}

article.post-content th {
    background: var(--color-code-bg);
    font-weight: 600;
}

article.post-content blockquote {
    border-left: 4px solid var(--color-accent);
    padding-left: calc(var(--spacing-unit) * 1.5);
    margin: calc(var(--spacing-unit) * 2) 0;
    color: var(--color-text-muted);
    font-style: italic;
}

article.post-content a {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

article.post-content a:hover {
    border-bottom-color: var(--color-accent);
}

.back-link {
    display: inline-block;
    margin-bottom: calc(var(--spacing-unit) * 2);
    margin-top: calc(var(--spacing-unit) * 2);
    color: #ffffff;
    background: var(--color-category-bg);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem;
    border: 3px solid var(--color-border);
    transition: all 0.2s ease;
}

.back-link:hover {
    background: var(--color-accent);
    transform: translateX(-4px);
}

/* About Page / Magazine Styles */
.about-hero {
    background: var(--color-accent);
    padding: calc(var(--spacing-unit) * 4) 0;
    border-bottom: 6px solid var(--color-border);
    margin-bottom: calc(var(--spacing-unit) * 3);
    position: relative;
}

.about-hero::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--color-highlight);
}

.about-hero h1 {
    font-family: var(--font-sans);
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: calc(var(--spacing-unit) * 1);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.3);
}

.about-hero .tagline {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--color-highlight);
    margin-bottom: calc(var(--spacing-unit) * 2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.about-hero .intro-text {
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 900px;
    color: #ffffff;
    font-weight: 400;
}

.about-hero .intro-text a {
    color: var(--color-highlight);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid var(--color-highlight);
}

.about-hero .intro-text a:hover {
    background: var(--color-highlight);
    color: var(--color-text);
}

/* Bento Grid Layout */
.bento-container {
    margin-bottom: calc(var(--spacing-unit) * 5);
}

.bento-section-title {
    font-family: var(--font-sans);
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--color-accent);
    margin-top: calc(var(--spacing-unit) * 4);
    margin-bottom: calc(var(--spacing-unit) * 2);
    padding-bottom: calc(var(--spacing-unit) * 1);
    border-bottom: 5px solid var(--color-border);
    grid-column: 1 / -1;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: calc(var(--spacing-unit) * 1.5);
    margin-bottom: calc(var(--spacing-unit) * 4);
}

.bento-card {
    background: var(--color-surface);
    border: 5px solid var(--color-border);
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.bento-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.4);
}

/* Bento Grid Sizes - Intentional Asymmetry */
.bento-hero {
    grid-column: span 8;
}

.bento-large {
    grid-column: span 6;
}

.bento-medium {
    grid-column: span 4;
}

.bento-small {
    grid-column: span 3;
}

.bento-tall {
    grid-row: span 2;
}

.bento-wide {
    grid-column: span 12;
}

.bento-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    object-position: center;
    border-bottom: 5px solid var(--color-border);
    display: block;
}

.bento-hero .bento-image {
    height: 180px;
}

.bento-large .bento-image {
    height: 150px;
}

.bento-medium .bento-image {
    height: 120px;
}

.bento-tall .bento-image {
    height: 200px;
}

.bento-content {
    padding: calc(var(--spacing-unit) * 2);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.bento-meta {
    display: flex;
    gap: calc(var(--spacing-unit) * 0.75);
    align-items: center;
    margin-bottom: calc(var(--spacing-unit) * 1);
    flex-wrap: wrap;
}

.year-badge {
    background: var(--color-accent);
    color: #ffffff;
    padding: 0.4rem 0.9rem;
    border: 3px solid var(--color-border);
    font-weight: 900;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-sans);
}

.category-tag {
    background: var(--color-highlight);
    color: var(--color-text);
    padding: 0.3rem 0.7rem;
    border: 2px solid var(--color-border);
    font-weight: 700;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bento-card h3 {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--color-text);
    margin: 0 0 calc(var(--spacing-unit) * 1) 0;
    line-height: 1.1;
}

.bento-hero h3 {
    font-size: 2.2rem;
}

.bento-large h3 {
    font-size: 1.7rem;
}

.bento-card p {
    color: var(--color-text);
    line-height: 1.6;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    font-size: 0.95rem;
    flex-grow: 1;
}

.bento-hero p {
    font-size: 1.05rem;
}

.press-source {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 900;
    color: #ffffff;
    background: var(--color-category-bg);
    padding: 0.7rem 1.3rem;
    border: 3px solid var(--color-border);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.15s ease;
    align-self: flex-start;
}

.press-source:hover {
    background: var(--color-accent);
    transform: translateY(-2px);
}

.press-source::after {
    content: '→';
    font-size: 1.3em;
}

/* Responsive Bento */
@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .bento-hero {
        grid-column: span 6;
    }

    .bento-large {
        grid-column: span 6;
    }

    .bento-medium {
        grid-column: span 3;
    }
}

@media (max-width: 768px) {
    .about-hero h1 {
        font-size: 2.5rem;
    }

    .about-hero .tagline {
        font-size: 1.1rem;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 1.5);
    }

    .bento-hero,
    .bento-large,
    .bento-medium,
    .bento-small {
        grid-column: span 1;
    }

    .bento-tall {
        grid-row: span 1;
    }

    .bento-image,
    .bento-hero .bento-image,
    .bento-large .bento-image,
    .bento-medium .bento-image,
    .bento-tall .bento-image {
        height: 140px;
    }

    .bento-card h3,
    .bento-hero h3,
    .bento-large h3 {
        font-size: 1.3rem;
    }

    .bento-card p,
    .bento-hero p {
        font-size: 0.9rem;
    }
}
