/*
Theme Name: Haruspex
Theme URI: https://haruspicy.co.uk
Description: For practitioners of the ancient art. Est. MCMXCVIII.
Version: 1.0
Author: Will Samuels
Text Domain: haruspex
*/

@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&family=IM+Fell+English+SC&display=swap');

/* ── Variables ──────────────────────────────────────────────────────────── */
:root {
    --bg:           #0b0404;
    --bg-mid:       #150808;
    --bg-panel:     #1c0c0c;
    --bg-raised:    #221212;

    --border-dk:    #3d1414;
    --border-md:    #5e2020;
    --border-hi:    #8a3333;

    --text:         #ddd0b5;
    --text-dim:     #9c8c6a;
    --text-bright:  #f2e8d0;
    --text-faint:   #6a5a44;

    --gold:         #c4872e;
    --gold-hi:      #e0a840;
    --gold-dim:     #7a5218;

    --red:          #8a1818;
    --red-hi:       #b02424;

    --link:         #c4872e;
    --link-vis:     #7a5218;
    --link-hover:   #e8b84a;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ───────────────────────────────────────────────────────────────── */
html { font-size: 16px; scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    line-height: 1.75;
    /* Fine noise texture */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

/* ── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: "IM Fell English SC", Georgia, serif;
    color: var(--text-bright);
    line-height: 1.25;
    font-weight: normal;
    letter-spacing: 0.025em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1.3em; }

a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-color: var(--gold-dim);
    text-underline-offset: 2px;
    transition: color 0.08s;
}
a:visited { color: var(--link-vis); }
a:hover   { color: var(--link-hover); text-decoration-color: var(--gold); }

strong { color: var(--text-bright); font-style: normal; }
em     { font-style: italic; color: var(--text); }

hr {
    border: none;
    border-top: 1px solid var(--border-md);
    margin: 2.5em 0;
    position: relative;
}
hr::after {
    content: '✦';
    position: absolute;
    top: -.65em;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-mid);
    padding: 0 .6em;
    color: var(--gold-dim);
    font-size: .7rem;
}

blockquote {
    border-left: 3px solid var(--border-hi);
    margin: 1.8em 0;
    padding: .5em 0 .5em 1.5em;
    color: var(--text-dim);
    font-style: italic;
}

code, pre {
    font-family: "Courier New", Courier, monospace;
    font-size: .875em;
}
pre {
    background: var(--bg-panel);
    border: 1px solid var(--border-dk);
    padding: 1em;
    overflow-x: auto;
    margin-bottom: 1.2em;
    color: var(--gold);
}
code {
    background: var(--bg-panel);
    padding: .1em .3em;
    color: var(--gold);
}

img, video { max-width: 100%; height: auto; display: block; }

ul, ol { padding-left: 1.5em; margin-bottom: 1.2em; }
li     { margin-bottom: .3em; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.site-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Site Header ────────────────────────────────────────────────────────── */
.site-header {
    background: var(--bg-mid);
    border-bottom: 1px solid var(--border-md);
    position: relative;
    overflow: hidden;
}

/* Striped rule — the classic 1998 touch */
.site-header::before {
    content: '';
    display: block;
    height: 5px;
    background: repeating-linear-gradient(
        90deg,
        var(--red)    0,
        var(--red)    18px,
        var(--red-hi) 18px,
        var(--red-hi) 24px,
        var(--border-dk) 24px,
        var(--border-dk) 30px
    );
}

.header-inner {
    padding: 28px 0 0;
    text-align: center;
}

.site-title {
    font-family: "IM Fell English SC", Georgia, serif;
    font-size: 3rem;
    letter-spacing: .1em;
    font-weight: normal;
    color: var(--text-bright);
    margin-bottom: .15em;
}
.site-title a {
    color: inherit;
    text-decoration: none;
}
.site-title a:hover { color: var(--gold-hi); }

.site-tagline {
    font-family: "Courier New", monospace;
    font-size: .7rem;
    letter-spacing: .35em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 24px;
}

/* ── Nav ─────────────────────────────────────────────────────────────────  */
.site-nav {
    border-top: 1px solid var(--border-dk);
    background: var(--bg-panel);
}

.site-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

/* pipe separators */
.site-nav li + li::before {
    content: '|';
    color: var(--border-hi);
    font-family: "Courier New", monospace;
    display: inline-block;
    padding: 0;
    line-height: 1;
    align-self: center;
}

.site-nav a {
    display: block;
    padding: 9px 14px;
    font-family: "Courier New", monospace;
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-decoration: none;
    transition: color .08s, background .08s;
}
.site-nav a:hover,
.site-nav .current-menu-item a,
.site-nav .current_page_item a {
    color: var(--gold-hi);
    background: var(--bg-raised);
}

/* ── Two-column content ─────────────────────────────────────────────────── */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 0;
    padding: 36px 0;
}

.main-col {
    padding-right: 44px;
    border-right: 1px solid var(--border-dk);
    min-width: 0;
}

/* ── Post card (index) ──────────────────────────────────────────────────── */
.post-card {
    padding-bottom: 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-dk);
}
.post-card:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* ── Post / Article ─────────────────────────────────────────────────────── */
.entry-title {
    color: var(--text-bright);
    margin-bottom: .2em;
}
.entry-title a {
    color: inherit;
    text-decoration: none;
}
.entry-title a:hover { color: var(--gold-hi); }

.entry-meta {
    font-family: "Courier New", monospace;
    font-size: .72rem;
    color: var(--text-faint);
    letter-spacing: .06em;
    display: flex;
    gap: 1.4em;
    flex-wrap: wrap;
    align-items: baseline;
    padding: 5px 0;
    border-top: 1px solid var(--border-dk);
    border-bottom: 1px solid var(--border-dk);
    margin: .5em 0 1.6em;
}
.entry-meta a { color: var(--text-dim); text-decoration: none; }
.entry-meta a:hover { color: var(--gold); }
.entry-meta .meta-item::before { content: '▸ '; color: var(--gold-dim); }

.entry-content { font-size: 1rem; }

.entry-content h2 {
    font-size: 1.3rem;
    margin: 2.2em 0 .7em;
    padding-bottom: .3em;
    border-bottom: 1px solid var(--border-dk);
    color: var(--gold);
}
.entry-content h3 {
    font-size: 1.1rem;
    margin: 1.6em 0 .5em;
    color: var(--text-bright);
}
.entry-content h4 {
    font-size: 1rem;
    margin: 1.2em 0 .4em;
    color: var(--text-dim);
    font-family: "Courier New", monospace;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.entry-content ul { list-style: none; padding-left: 0; }
.entry-content ul li::before { content: '▸  '; color: var(--gold-dim); }
.entry-content ol { padding-left: 1.5em; }

.entry-footer {
    margin-top: 1.8em;
    padding-top: .8em;
    border-top: 1px solid var(--border-dk);
    font-family: "Courier New", monospace;
    font-size: .72rem;
    color: var(--text-faint);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .5em;
}

.entry-tags a {
    display: inline-block;
    padding: 1px 7px;
    border: 1px solid var(--border-dk);
    color: var(--text-dim);
    text-decoration: none;
    font-size: .68rem;
    margin-right: 4px;
    transition: border-color .08s, color .08s;
}
.entry-tags a:hover { border-color: var(--gold-dim); color: var(--gold); }

/* ── Read more ──────────────────────────────────────────────────────────── */
.read-more {
    display: inline-block;
    font-family: "Courier New", monospace;
    font-size: .75rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid var(--gold-dim);
    transition: background .08s, color .08s;
}
.read-more::after { content: ' ▶'; }
.read-more:hover {
    background: var(--gold-dim);
    color: var(--text-bright);
    border-color: var(--gold);
}

/* ── Post navigation (single) ───────────────────────────────────────────── */
.post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid var(--border-dk);
    font-family: "Courier New", monospace;
    font-size: .75rem;
    gap: 1em;
}
.post-nav a { color: var(--text-dim); text-decoration: none; }
.post-nav a:hover { color: var(--gold-hi); }
.post-nav-prev::before { content: '◀ '; }
.post-nav-next::after  { content: ' ▶'; }

/* ── Pagination ─────────────────────────────────────────────────────────── */
.pagination {
    padding: 24px 0 0;
    font-family: "Courier New", monospace;
    font-size: .75rem;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.pagination .page-numbers {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid var(--border-md);
    color: var(--text-dim);
    text-decoration: none;
    transition: all .08s;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--border-md);
    color: var(--gold-hi);
    border-color: var(--border-hi);
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar-col {
    padding-left: 30px;
    padding-top: 4px;
}

.widget {
    margin-bottom: 32px;
}

.widget-title {
    font-family: "Courier New", monospace;
    font-size: .65rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--text-faint);
    padding-bottom: 7px;
    border-bottom: 1px solid var(--border-md);
    margin-bottom: 12px;
}
.widget-title::before { content: '▸ '; color: var(--red); }

.widget ul {
    list-style: none;
    padding: 0;
    font-size: .875rem;
}
.widget ul li {
    padding: 5px 0;
    border-bottom: 1px dotted var(--border-dk);
    font-family: Georgia, serif;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a {
    color: var(--text-dim);
    text-decoration: none;
}
.widget ul li a:hover { color: var(--link-hover); }

.widget p {
    font-size: .85rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: .8em;
}

/* Counter */
.widget-counter {
    border: 1px solid var(--border-md);
    background: var(--bg-panel);
    padding: 14px 12px;
    text-align: center;
}
.counter-digits {
    display: block;
    font-family: "Courier New", monospace;
    font-size: 1.6rem;
    letter-spacing: .25em;
    color: var(--gold);
    margin: 6px 0;
}
.counter-label {
    display: block;
    font-family: "Courier New", monospace;
    font-size: .62rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--text-faint);
}

/* ── Site Footer ────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-panel);
    border-top: 1px solid var(--border-md);
    position: relative;
    padding: 22px 0 28px;
    text-align: center;
    font-family: "Courier New", monospace;
    font-size: .68rem;
    color: var(--text-faint);
    letter-spacing: .1em;
}
.site-footer::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 5px;
    background: repeating-linear-gradient(
        90deg,
        var(--red)    0,
        var(--red)    18px,
        var(--red-hi) 18px,
        var(--red-hi) 24px,
        var(--border-dk) 24px,
        var(--border-dk) 30px
    );
}

.footer-lines {
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: center;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
}
.footer-nav a {
    color: var(--text-faint);
    text-decoration: none;
    padding: 0 10px;
    border-right: 1px solid var(--border-dk);
    font-size: .65rem;
}
.footer-nav a:last-child { border-right: none; }
.footer-nav a:hover { color: var(--gold); }

.footer-motto {
    color: var(--border-hi);
    letter-spacing: .2em;
    font-size: .65rem;
}

/* ── Search form ────────────────────────────────────────────────────────── */
.search-form {
    display: flex;
    gap: 0;
}
.search-form input[type="search"] {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border-md);
    border-right: none;
    color: var(--text);
    font-family: Georgia, serif;
    font-size: .85rem;
    padding: 6px 8px;
    outline: none;
}
.search-form input[type="search"]:focus { border-color: var(--border-hi); }
.search-form button {
    background: var(--bg-panel);
    border: 1px solid var(--border-md);
    color: var(--gold);
    font-family: "Courier New", monospace;
    font-size: .7rem;
    letter-spacing: .1em;
    padding: 6px 10px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all .08s;
}
.search-form button:hover { background: var(--border-md); color: var(--text-bright); }

/* ── Comments ───────────────────────────────────────────────────────────── */
.comments-section {
    margin-top: 44px;
    padding-top: 32px;
    border-top: 1px solid var(--border-md);
}

.comments-heading {
    font-family: "Courier New", monospace;
    font-size: .68rem;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 20px;
}
.comments-heading::before { content: '▸ '; color: var(--red); }

.comment {
    margin-bottom: 16px;
}

.comment-body {
    background: var(--bg-mid);
    border: 1px solid var(--border-dk);
    padding: 14px 16px;
}

.comment-meta-line {
    font-family: "Courier New", monospace;
    font-size: .7rem;
    color: var(--text-faint);
    margin-bottom: 8px;
}
.comment-author-name { color: var(--gold); }

.comment-text p { font-size: .9rem; margin-bottom: .6em; }
.comment-text p:last-child { margin-bottom: 0; }

.reply a {
    font-family: "Courier New", monospace;
    font-size: .68rem;
    color: var(--text-faint);
    text-decoration: none;
    padding: 2px 7px;
    border: 1px solid var(--border-dk);
    display: inline-block;
    margin-top: 6px;
    transition: all .08s;
}
.reply a:hover { color: var(--gold); border-color: var(--gold-dim); }

/* Comment form */
.comment-form-wrap { margin-top: 28px; }
.comment-form label {
    display: block;
    font-family: "Courier New", monospace;
    font-size: .65rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin: 14px 0 4px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: var(--bg-mid);
    border: 1px solid var(--border-dk);
    color: var(--text);
    font-family: Georgia, serif;
    font-size: .9rem;
    padding: 7px 9px;
    outline: none;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--border-hi); }
.comment-form textarea { min-height: 110px; resize: vertical; }
.comment-form input[type="submit"] {
    margin-top: 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border-hi);
    color: var(--gold);
    font-family: "Courier New", monospace;
    font-size: .75rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    padding: 8px 22px;
    cursor: pointer;
    transition: all .08s;
}
.comment-form input[type="submit"]:hover {
    background: var(--border-hi);
    color: var(--text-bright);
}

/* ── 404 ────────────────────────────────────────────────────────────────── */
.not-found-wrap {
    padding: 60px 0;
    text-align: center;
}
.not-found-code {
    font-family: "Courier New", monospace;
    font-size: 4rem;
    color: var(--border-hi);
    display: block;
    line-height: 1;
    margin-bottom: .3em;
}
.not-found-msg {
    color: var(--text-dim);
    font-style: italic;
    margin-bottom: 1.5em;
}

/* ── Page ───────────────────────────────────────────────────────────────── */
.page-title { font-size: 2.2rem; margin-bottom: .4em; }

/* ── Archive header ─────────────────────────────────────────────────────── */
.archive-header {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-md);
}
.archive-label {
    font-family: "Courier New", monospace;
    font-size: .65rem;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: .3em;
}
.archive-label::before { content: '▸ '; color: var(--red); }
.archive-title { font-size: 1.8rem; color: var(--gold); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    .main-col {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--border-dk);
        padding-bottom: 36px;
    }
    .sidebar-col {
        padding-left: 0;
        padding-top: 28px;
    }
    .site-title { font-size: 2.2rem; }
}

@media (max-width: 540px) {
    .site-title { font-size: 1.7rem; letter-spacing: .05em; }
    .entry-title { font-size: 1.4rem; }
    .entry-meta { gap: .8em; }
}
