/*
Theme Name: Brettfullmer Retro
Theme URI: https://brettfullmer.com/
Author: Brett Fullmer
Description: 1960s satirical-print theme matching brettfullmer.com — aged paper, ink borders, slab display type, CRT code blocks.
Version: 1.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: brettfullmer-retro
*/

@font-face {
    font-family: "Alfa Slab One";
    src: url("https://brettfullmer.com/fonts/AlfaSlabOne-Regular.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Oswald";
    src: url("https://brettfullmer.com/fonts/Oswald.ttf") format("truetype");
    font-weight: 200 700;
    font-display: swap;
}

:root {
    --paper: #f2e8d2;
    --paper-2: #eaddbd;
    --card: #f8f0dc;
    --ink: #191410;
    --ink-soft: #4a3f33;
    --muted: #7a6b58;
    --faint: #99896f;
    --red: #c9342a;
    --mustard: #e0a92e;
    --mustard-soft: #f3d789;
    --teal: #2f7f74;
    --dark: #201a14;
    --phosphor: #ffb648;
    --slab: "Alfa Slab One", "Rockwell", serif;
    --cond: "Oswald", "Arial Narrow", sans-serif;
    --serif: Georgia, "Times New Roman", serif;
    --mono: "Courier New", Courier, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--paper);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.28 0 0 0 0 0.18 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
    color: var(--ink);
    font-family: var(--serif);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--mustard-soft); }

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* ---------- Masthead ---------- */
.masthead {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--paper);
    border-bottom: 3px solid var(--ink);
    box-shadow: 0 3px 0 rgba(25, 20, 16, 0.12);
}

.nav { display: flex; justify-content: space-between; align-items: center; height: 66px; }

.nav-name { font-family: var(--slab); font-size: 19px; color: var(--ink); }

.nav-name:hover { color: var(--red); text-decoration: none; }

.nav-name .rocket { width: 24px; height: 24px; margin-right: 9px; vertical-align: -6px; transition: transform 0.2s; }

.nav-name:hover .rocket { transform: translateY(-2px) rotate(-8deg); }

.nav-links { display: flex; gap: 24px; align-items: center; }

.nav-links a {
    color: var(--ink-soft);
    font-family: var(--cond);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.nav-links a:hover { color: var(--red); text-decoration: none; }

.nav-cta {
    font-family: var(--cond);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: var(--red);
    color: var(--paper) !important;
    border: 2px solid var(--ink);
    padding: 8px 18px;
    border-radius: 6px;
    box-shadow: 3px 3px 0 var(--ink);
    transition: transform 0.15s, box-shadow 0.15s;
}

.nav-cta:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); text-decoration: none; }

/* ---------- Blog banner ---------- */
.blog-head { text-align: center; padding: 64px 0 56px; }

.blog-head .eyebrow {
    display: inline-block;
    font-family: var(--cond);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--mustard);
    border: 2px solid var(--ink);
    padding: 5px 14px;
    border-radius: 4px;
    box-shadow: 3px 3px 0 var(--ink);
    transform: rotate(-1deg);
    margin-bottom: 20px;
}

.site-title { font-family: var(--slab); font-size: 46px; font-weight: 400; line-height: 1.1; }

.site-title a { color: var(--ink); }

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

.site-desc { font-family: var(--cond); font-size: 15px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-top: 10px; }

main { padding-bottom: 80px; }

/* ---------- Post cards (index) ---------- */
.post-card {
    background: var(--card);
    border: 3px solid var(--ink);
    border-radius: 10px;
    box-shadow: 5px 5px 0 var(--ink);
    padding: 30px 34px;
    margin-bottom: 34px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:nth-child(odd) { transform: rotate(-0.4deg); }
.post-card:nth-child(even) { transform: rotate(0.35deg); }

.post-card:hover { transform: rotate(0deg) translate(-2px, -2px); box-shadow: 8px 8px 0 var(--red); }

.post-card h2 { font-family: var(--slab); font-size: 26px; font-weight: 400; line-height: 1.25; margin-bottom: 8px; }

.post-card h2 a { color: var(--ink); }

.post-card h2 a:hover { color: var(--red); text-decoration: none; }

.post-meta {
    font-family: var(--cond);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.post-meta a { color: var(--teal); }

.post-card .excerpt { color: var(--ink-soft); font-size: 15.5px; }

.read-more {
    display: inline-block;
    margin-top: 16px;
    font-family: var(--cond);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--paper);
    background: var(--ink);
    border: 2px solid var(--ink);
    padding: 7px 16px;
    border-radius: 6px;
    box-shadow: 3px 3px 0 rgba(25, 20, 16, 0.3);
    transition: transform 0.15s, background 0.15s;
}

.read-more:hover { background: var(--red); transform: translate(-1px, -1px); text-decoration: none; }

/* ---------- Single post / page ---------- */
.post-article {
    background: var(--card);
    border: 3px solid var(--ink);
    border-radius: 10px;
    box-shadow: 6px 6px 0 var(--ink);
    padding: 44px 48px;
}

.post-article > h1 { font-family: var(--slab); font-size: 36px; font-weight: 400; line-height: 1.15; margin-bottom: 10px; }

.post-body { font-size: 16.5px; color: var(--ink-soft); margin-top: 24px; }

.post-body p, .post-body ul, .post-body ol, .post-body figure { margin-bottom: 18px; }

.post-body ul, .post-body ol { padding-left: 26px; }

.post-body h2, .post-body h3 {
    font-family: var(--slab);
    font-weight: 400;
    color: var(--ink);
    line-height: 1.2;
    margin: 34px 0 12px;
}

.post-body h2 { font-size: 26px; }
.post-body h3 { font-size: 20px; }

.post-body strong { color: var(--ink); }

.post-body img { max-width: 100%; height: auto; display: block; border: 3px solid var(--ink); border-radius: 8px; box-shadow: none; filter: drop-shadow(5px 5px 0 var(--ink)); }

.post-body blockquote {
    font-family: var(--slab);
    font-size: 19px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--paper);
    border: 3px solid var(--ink);
    border-radius: 14px;
    box-shadow: 5px 5px 0 var(--ink);
    padding: 22px 28px;
    margin: 26px 0;
}

.post-body code {
    font-family: var(--mono);
    font-size: 0.92em;
    background: var(--paper-2);
    border: 1px solid var(--muted);
    border-radius: 4px;
    padding: 1px 6px;
}

.post-body pre {
    background: var(--dark);
    color: var(--phosphor);
    border: 3px solid var(--ink);
    border-radius: 10px;
    box-shadow: 5px 5px 0 var(--ink);
    padding: 20px 24px;
    overflow-x: auto;
    margin: 26px 0;
    line-height: 1.8;
}

.post-body pre code { background: none; border: none; padding: 0; color: inherit; }

/* ---------- Pagination & post nav ---------- */
.navigation, .post-nav { margin-top: 40px; font-family: var(--cond); text-transform: uppercase; letter-spacing: 1.5px; font-size: 14px; }

.post-nav { display: flex; justify-content: space-between; gap: 20px; }

.navigation .nav-links { display: flex; gap: 12px; justify-content: center; }

.navigation a, .navigation .current, .post-nav a {
    display: inline-block;
    background: var(--card);
    border: 2px solid var(--ink);
    border-radius: 6px;
    box-shadow: 3px 3px 0 var(--ink);
    padding: 7px 14px;
    color: var(--ink);
}

.navigation .current { background: var(--mustard); }

.navigation a:hover, .post-nav a:hover { background: var(--mustard); text-decoration: none; transform: translate(-1px, -1px); }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); border-top: 3px solid var(--ink); padding: 26px 0; text-align: center; }

.site-footer p { font-family: var(--mono); font-size: 12.5px; color: #a08d6e; }

.site-footer .ok { color: #8fc46a; }

.site-footer a { color: #cdb896; }

/* ---------- WP alignment helpers ---------- */
.alignleft { float: left; margin: 0 20px 12px 0; }
.alignright { float: right; margin: 0 0 12px 20px; }
.aligncenter { display: block; margin: 0 auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--faint); font-style: italic; text-align: center; margin-top: 8px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 700px) {
    .site-title { font-size: 32px; }
    .post-article { padding: 30px 24px; }
    .post-article > h1 { font-size: 27px; }
}

/* ---------- Masthead mobile nav (hamburger) ---------- */
.masthead .nav { position: relative; }

.masthead .nav-mobile-actions { display: none; align-items: center; gap: 12px; }

.masthead .nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.masthead .nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.masthead .nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.masthead .nav-toggle.open span:nth-child(2) { opacity: 0; }
.masthead .nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 680px) {
    .masthead .nav-mobile-actions { display: flex; }
    .masthead .nav-toggle { display: flex; }
    .masthead .nav-cta-mobile { padding: 7px 14px; }

    .masthead .nav-links .nav-cta { display: none; }

    .masthead .nav-links {
        position: absolute;
        top: 66px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--paper);
        border-bottom: 3px solid var(--ink);
        box-shadow: 0 3px 0 rgba(25, 20, 16, 0.12);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.25s ease, opacity 0.2s ease;
    }

    .masthead .nav-links.open {
        max-height: 400px;
        opacity: 1;
        pointer-events: auto;
    }

    .masthead .nav-links a {
        padding: 16px 24px;
        border-bottom: 1px solid rgba(25, 20, 16, 0.1);
        display: block;
    }
}

/* ---------- Comments ---------- */
#comments { margin-top: 40px; }

.comments-title,
.comment-reply-title {
    font-family: var(--slab);
    font-weight: 400;
    font-size: 24px;
    margin-bottom: 20px;
}

.comment-reply-title small a {
    font-family: var(--cond);
    font-size: 12.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--red);
    margin-left: 12px;
}

.comment-respond {
    background: var(--card);
    border: 3px solid var(--ink);
    border-radius: 10px;
    box-shadow: 5px 5px 0 var(--ink);
    padding: 30px 34px;
}

.comment-notes,
.logged-in-as {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 20px;
}

.comment-notes .required,
.comment-form label .required {
    color: var(--red);
}

.comment-form p { margin-bottom: 18px; }

.comment-form label {
    display: block;
    font-family: var(--cond);
    font-size: 12.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--ink);
    margin-bottom: 7px;
}

.comment-form input[type="text"],
.comment-form textarea {
    width: 100%;
    font-family: var(--serif);
    font-size: 15px;
    color: var(--ink);
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 6px;
    padding: 11px 14px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.comment-form textarea { resize: vertical; min-height: 140px; }

.comment-form input[type="text"]:focus,
.comment-form textarea:focus {
    outline: none;
    box-shadow: 3px 3px 0 var(--ink);
    transform: translate(-1px, -1px);
}

.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.comment-form-cookies-consent input {
    width: 17px;
    height: 17px;
    margin-top: 3px;
    accent-color: var(--red);
    flex-shrink: 0;
}

.comment-form-cookies-consent label {
    display: inline;
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    color: var(--ink-soft);
}

.form-submit { margin-bottom: 0; }

.form-submit input#submit {
    font-family: var(--cond);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: var(--red);
    color: var(--paper);
    border: 2px solid var(--ink);
    padding: 11px 26px;
    border-radius: 6px;
    box-shadow: 3px 3px 0 var(--ink);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.form-submit input#submit:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--ink);
}

/* Existing comment threads, if/when comments get posted */
.comment-list {
    list-style: none;
    margin: 0 0 32px;
}

.comment-list .comment-body {
    background: var(--card);
    border: 2px solid var(--ink);
    border-radius: 10px;
    box-shadow: 4px 4px 0 var(--ink);
    padding: 22px 26px;
    margin-bottom: 20px;
}

.comment-author .fn {
    font-family: var(--slab);
    font-weight: 400;
    font-style: normal;
    color: var(--ink);
}

.comment-metadata {
    font-family: var(--cond);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin: 4px 0 12px;
}

.comment-metadata a { color: var(--muted); }

.comment-content p { color: var(--ink-soft); margin-bottom: 10px; }

@media (max-width: 680px) {
    .comment-respond { padding: 26px 22px; }
}

.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--ink);
    vertical-align: middle;
    margin-right: 8px;
    object-fit: cover;
}
