/* =========================================
   Variables & Reset
   ========================================= */
:root {
    --bg-color: #fdfaf6;
    /* Official "Warm Paper" background */
    --text-color: #333;
    /* Soft black */
    --accent-color: #c94c4c;
    /* Muted Red */
    --link-color: #555;
    --border-color: #eee;

    --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-heading: 'Georgia', 'Times New Roman', Times, serif;
    --font-mono: 'Courier Prime', 'Courier New', monospace;

    --container-width: 1200px;
    --sidebar-width: 250px;
    --header-height: 80px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    color: var(--link-color);
    transition: color 0.2s;

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

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    /* Slightly rounded corners as requested */
}

.featured-images {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* =========================================
   Typography
   ========================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: normal;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #111;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem;
}

/* =========================================
   Layout
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* 3-Column Layout */
.layout {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
    min-height: 80vh;

    @media (max-width: 1000px) {
        flex-direction: column;
    }
}

.site-sidebar {
    width: 200px;
    /* Reduced from 250px globally */
    flex-shrink: 0;
    font-size: 0.9rem;
    padding-top: 7rem;
    /* Push sidebars down visually */

    @media (max-width: 1000px) {
        padding-top: 0;
    }

    &.sidebar-left {
        /* Left Sidebar specific styles */
        text-align: right;
        /* padding-top removed as it's now global, unless we want it even lower? Let's stick to global first */
        border-right: 1px solid transparent;
    }

    img.profile-pic {
        border-radius: 50%;
        width: 120px;
        margin-left: auto;
        margin-bottom: 1rem;
    }

    .widget {
        margin-bottom: 2rem;

        h3 {
            font-size: 1rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-top: 0;
            color: #888;
        }
    }
}

.main-content {
    flex-grow: 1;
    max-width: 640px;
}

/* =========================================
   Components
   ========================================= */

/* Header */
.site-header {
    padding: 2rem 0;
    text-align: center;
    border-bottom: 0;
    /*1px solid var(--border-color);*/
    margin-bottom: 2rem;

    .site-title a {
        font-family: var(--font-heading);
        font-size: 2.5rem;
        color: #000;

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

    .site-nav {
        margin-top: 1rem;

        ul {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            justify-content: center;
            gap: 2rem;
        }

        a {
            text-transform: uppercase;
            letter-spacing: 1px;
            font-size: 0.85rem;
            font-weight: bold;
        }
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    color: #888;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;

    .site-nav {
        margin-top: 1rem;

        ul {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            justify-content: center;
            gap: 2rem;
        }

        a {
            text-transform: uppercase;
            letter-spacing: 1px;
            font-size: 0.85rem;
            font-weight: bold;
        }
    }
}

/* Blog Feed */
.blog-mini {
    .post-meta {
        font-weight: 200;
    }

    .post-meta::after {
        content: " - ";
    }

    .post-title {
        font-weight: 500;
        font-size: 1rem;
    }

    .post-title::after {
        content: " - ";
    }

    .post-author {
        font-weight: 200;
    }
}

/* Blog Posts */
.blog-post,
.page-content {
    font-size: 1.1rem;

    p {
        margin-bottom: 1.5rem;
    }

    blockquote {
        font-family: var(--font-heading);
        font-style: italic;
        padding-left: 1.5rem;
        border-left: 3px solid var(--accent-color);
        color: #555;
        margin: 2rem 0;
    }
}

/* Navigation Links (Next/Prev) */
.nav-link {
    margin-bottom: 2rem;

    .nav-label {
        display: block;
        font-size: 0.75rem;
        text-transform: uppercase;
        color: #999;
        margin-bottom: 0.2rem;
    }

    .nav-title {
        font-family: var(--font-heading);
        font-size: 1.1rem;
        display: block;
        line-height: 1.3;
    }
}

/* Screenplays */
.screenplay-item {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px dashed #ccc;

    &:last-child {
        border-bottom: none;
    }
}

.screenplay-logline {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: #555;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.download-btn {
    display: inline-block;
    background: #fff;
    border: 1px solid #333;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: var(--font-mono);
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;

    &:hover {
        background: #333;
        color: #fff;
    }
}

/* Mobile Tweaks */
@media (max-width: 600px) {
    .site-header .site-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .site-sidebar.sidebar-left {
        text-align: center;
        padding-top: 0;

        img.profile-pic {
            margin: 0 auto 1rem auto;
        }
    }
}