@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&family=Michroma&display=swap');

:root {
    --bg: #f4f2ec;
    --bg2: #ece9dd;
    --ink: #16150f;
    --mut: #55534a;
    --mut2: #77756a;
    --faint: #9a988d;
    --rule: #d8d5c6;
    --stripe1: #eceade;
    --accent: #e33d26;
    --on-accent: #fff;
    --font-display: 'Michroma', sans-serif;
    --font-subhead: 'Chakra Petch', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --font-body: 'IBM Plex Sans', sans-serif;
    --page-max: 1760px;
    --rail-w: 280px;
    --pad-x: clamp(20px, 4vw, 56px);
    --stripes: repeating-linear-gradient(45deg, var(--stripe1), var(--stripe1) 8px, var(--bg) 8px, var(--bg) 16px);
    color-scheme: light;
}

[data-theme='dark'] {
    --bg: #14130f;
    --bg2: #1d1c16;
    --ink: #e9e6d9;
    --mut: #a6a396;
    --mut2: #8b887b;
    --faint: #6d6b60;
    --rule: #35342b;
    --stripe1: #191813;
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    [data-theme='auto'] {
        --bg: #14130f;
        --bg2: #1d1c16;
        --ink: #e9e6d9;
        --mut: #a6a396;
        --mut2: #8b887b;
        --faint: #6d6b60;
        --rule: #35342b;
        --stripe1: #191813;
        color-scheme: dark;
    }
}

@keyframes fw-slidein {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); scroll-behavior: smooth; }
body {
    margin: 0 auto;
    min-height: 100vh;
    max-width: var(--page-max);
    background: var(--bg);
    border-inline: 1px solid var(--ink);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
}

::selection { background: var(--accent); color: var(--on-accent); }
a { color: inherit; text-decoration-color: currentColor; text-underline-offset: .22em; }
a:hover { opacity: .82; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
img, video, iframe { max-width: 100%; }
img { height: auto; }

.fw-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    min-height: 58px;
    align-items: stretch;
    border-bottom: 2px solid var(--ink);
    background: var(--bg);
}
.fw-header-mark {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-right: 1px solid var(--ink);
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: .08em;
    text-decoration: none;
}
.fw-header-label {
    display: flex;
    flex: 1;
    align-items: center;
    min-width: 180px;
    padding: 0 20px;
    color: var(--mut);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .15em;
}
.fw-header-nav { display: flex; align-items: stretch; }
#sidebar-toggle { display: none; }
.fw-header-nav a, .fw-header-nav button {
    display: flex;
    align-items: center;
    border: 0;
    border-left: 1px solid var(--ink);
    border-radius: 0;
    padding: 12px 20px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-decoration: none;
}
.fw-header-nav a:hover, .fw-header-nav button:hover {
    background: var(--ink);
    color: var(--bg);
    opacity: 1;
}

.site-frame { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); }
#sidebar {
    min-height: calc(100vh - 58px);
    border-right: 1px solid var(--ink);
    background: var(--bg);
}
.sidebar-heading, .section-heading {
    display: grid;
    grid-template-columns: 58px 1fr;
    align-items: center;
    min-height: 58px;
    border-bottom: 1px solid var(--ink);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .15em;
}
.sidebar-close { display: none; }
.sidebar-number, .section-number {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--ink);
    color: var(--accent);
}
.sidebar-heading > span:last-child, .section-heading > span:last-child { padding: 0 16px; }
#sidebar h2, .search_box > label {
    display: block;
    margin: 0;
    padding: 16px 18px 9px;
    color: var(--mut2);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .14em;
}
.search_box { margin: 0; border-bottom: 1px solid var(--ink); }
.search-control { display: flex; padding: 0 18px 18px; }
.search-control input {
    min-width: 0;
    flex: 1;
    margin: 0;
    border-right: 0;
}
.search-control button { width: 44px; padding: 0; }
ul.navigation {
    margin: 0;
    padding: 0;
    border-block: 1px solid var(--rule);
    list-style: none;
}
ul.navigation li + li { border-top: 1px solid var(--rule); }
ul.navigation a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 18px;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.45;
    text-decoration: none;
}
ul.navigation a:hover { background: var(--ink); color: var(--bg); opacity: 1; }
.sidebar-status {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    padding: 14px 18px;
    border-block: 1px dashed var(--ink);
    color: var(--mut);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: .12em;
}
.sidebar-status span:first-child { color: var(--accent); }

.content-column { min-width: 0; }
#main { min-height: 62vh; counter-reset: posts; }
.blog-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    min-height: clamp(310px, 48vw, 560px);
    border-bottom: 2px solid var(--ink);
    animation: fw-slidein .4s ease both;
}
.blog-intro-copy {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(38px, 7vw, 90px) var(--pad-x);
}
.fw-eyebrow {
    margin-bottom: 24px;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .2em;
}
.blog-intro h1 {
    max-width: 900px;
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(32px, 5.5vw, 72px);
    font-weight: 400;
    letter-spacing: -.025em;
    line-height: 1.08;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.blog-intro p {
    max-width: 680px;
    margin: 24px 0 0;
    color: var(--mut);
    font-size: clamp(16px, 2vw, 19px);
}
.blog-intro-status {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border-left: 1px solid var(--ink);
    background: var(--stripes);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .14em;
}
.blog-intro-status span:first-child {
    width: fit-content;
    padding: 5px 8px;
    background: var(--accent);
    color: var(--on-accent);
}
.section-heading { grid-template-columns: 72px 1fr; min-height: 72px; border-bottom: 2px solid var(--ink); }

article.post, article.page, article.discourse, article.commentary, .standalone, #main > details {
    position: relative;
    margin: 0;
    padding: clamp(24px, 4vw, 52px) var(--pad-x);
    border-bottom: 1px solid var(--ink);
    background: var(--bg);
    animation: fw-slidein .35s ease both;
}
article.post { counter-increment: posts; }
article.post::before {
    content: 'ENTRY ' counter(posts, decimal-leading-zero) ' / PUBLIC';
    display: block;
    margin-bottom: 16px;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .18em;
}
article.post:hover { background: var(--bg2); }
article > header { margin-bottom: 20px; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); overflow-wrap: anywhere; }
h2.post_title, article.page > h2, .standalone > h2, h2.archive {
    margin: 0 0 24px;
    font-family: var(--font-subhead);
    font-size: clamp(25px, 3vw, 40px);
    font-weight: 600;
    line-height: 1.08;
}
h2.post_title a, article.page > h2 a { text-decoration: none; }
h2.post_title a:hover, article.page > h2 a:hover { color: var(--accent); opacity: 1; }
h3 { font-family: var(--font-subhead); font-size: 21px; }
h3.article_label {
    margin: 0;
    padding: 18px var(--pad-x);
    border-bottom: 1px solid var(--ink);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .14em;
}
article > section, article.page > section { max-width: 800px; }
article > section.body, article > section.description, article.page > section {
    font-size: 17px;
    line-height: 1.72;
}
p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }
section a { color: var(--ink); text-decoration: underline; }
section a:hover { color: var(--accent); opacity: 1; }
strong { font-weight: 600; }
blockquote {
    margin: 1.5em 0;
    padding: 18px 22px;
    border: 1px dashed var(--ink);
    color: var(--mut);
    font-size: 1.08em;
}
blockquote > :last-child { margin-bottom: 0; }
pre, code { font-family: var(--font-mono); }
code { padding: .12em .35em; background: var(--bg2); font-size: .88em; }
pre {
    overflow-x: auto;
    margin: 1.5em 0;
    padding: 20px;
    border: 1px solid var(--ink);
    background: var(--bg2);
    font-size: 13px;
    line-height: 1.65;
}
pre code { padding: 0; background: transparent; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
table { width: 100%; margin: 1.5em 0; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 13px; border: 1px solid var(--ink); text-align: left; }
th { background: var(--ink); color: var(--bg); font-family: var(--font-mono); font-weight: 500; }
figure { margin: 1.5em 0; }
figcaption {
    padding: 10px 14px;
    border: 1px solid var(--ink);
    border-top: 0;
    color: var(--mut);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .1em;
}
section.photo { max-width: 100%; margin-block: 24px; border: 1px solid var(--ink); background: var(--stripes); }
section.photo img { display: block; width: 100%; }
video, audio { width: 100%; }

article > footer { clear: both; margin-top: 32px; }
.metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 10px;
    padding-top: 14px;
    border-top: 1px solid var(--rule);
    color: var(--mut);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.metadata a { text-decoration: none; }
.metadata a:hover { color: var(--accent); }
.tags { margin-bottom: 14px; font-family: var(--font-mono); font-size: 11px; }
.tags a, .tag_cloud a {
    display: inline-block;
    margin: 3px 2px 3px 0;
    padding: 4px 9px;
    border: 1px solid var(--ink);
    font-size: 11px;
    text-decoration: none;
}
.tags a:hover, .tag_cloud a:hover { background: var(--ink); color: var(--bg); opacity: 1; }

.empty-log {
    min-height: 300px;
    padding: 32px var(--pad-x);
    border-bottom: 1px solid var(--ink);
    background: var(--stripes);
    font-family: var(--font-mono);
}
.empty-log span { display: block; color: var(--accent); font-size: 10px; letter-spacing: .18em; }
.empty-log strong { display: block; margin-top: 14px; font-family: var(--font-subhead); font-size: 24px; }
.ribbon {
    margin: 0;
    padding: 14px var(--pad-x);
    border-bottom: 1px solid var(--ink);
    background: var(--ink);
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .1em;
    text-align: center;
}
.ribbon.flash { background: var(--accent); color: var(--on-accent); }
.ribbon a { color: inherit; }

.traversal { display: flex; border-bottom: 1px solid var(--ink); }
.traversal a {
    flex: 1;
    padding: 14px 18px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-align: center;
    text-decoration: none;
}
.traversal a:hover { background: var(--ink); color: var(--bg); opacity: 1; }
.comments_pagination { display: flex; }
.comments_pagination a { border-right: 1px solid var(--ink); }

form, fieldset { margin: 0; padding: 0; border: 0; }
label {
    display: block;
    margin: 18px 0 6px;
    color: var(--mut);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
input, select, textarea {
    display: block;
    width: 100%;
    max-width: 520px;
    margin: 0;
    padding: 11px 14px;
    border: 1px solid var(--ink);
    border-radius: 0;
    background: var(--bg);
    color: var(--ink);
    font: 14px var(--font-mono);
}
textarea { max-width: 760px; min-height: 180px; resize: vertical; }
input::placeholder { color: var(--mut2); opacity: 1; }
button, .doaction a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 20px;
    border: 1px solid var(--ink);
    border-radius: 0;
    background: var(--bg);
    color: var(--ink);
    cursor: pointer;
    font: 11px var(--font-mono);
    letter-spacing: .08em;
    text-decoration: none;
    text-transform: uppercase;
}
button:hover, .doaction a:hover { background: var(--ink); color: var(--bg); opacity: 1; }
.doaction { display: flex; flex-wrap: wrap; margin-top: 22px; }
.doaction > * + * { border-left: 0; }
.doaction button[type='submit'] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.doaction button[type='submit']:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.standalone { max-width: none; }
.user_controls form, .user_login form, .lost_password form, .reset_password form, .user_register form { max-width: 520px; }

details { border-bottom: 1px solid var(--ink); }
details > summary {
    padding: 16px var(--pad-x);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .08em;
    list-style: none;
}
details > summary::before { content: '+ '; color: var(--accent); }
details[open] > summary::before { content: '− '; }
details > article { border-top: 1px solid var(--ink); }

ul.archive { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 0; padding: 0; list-style: none; }
ul.archive > li { margin: -1px 0 0 -1px; }
article.post.archive { height: 230px; padding: 22px; border: 1px solid var(--ink); overflow: hidden; }
article.post.archive::before { content: 'ARCHIVE RECORD'; }
article.post.archive:hover { background: var(--ink); color: var(--bg); }
article.post.archive h3 { margin: 0 0 10px; }
.archive_post_link { position: absolute; inset: 0; color: transparent; }
.archive_post_link:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

ol.comments, ol.pingbacks { margin: 0; padding: 0; list-style: none; }
ol.comments > li, ol.pingbacks > li { padding: 24px var(--pad-x); border-bottom: 1px solid var(--rule); }
.commentary, .discourse { padding: 0 !important; }
.commentary article { margin: 0; }
.comment_form { background: var(--bg2); }
.article_label { background: var(--stripes); }

.fw-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px var(--pad-x);
    border-top: 2px solid var(--ink);
    color: var(--mut);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .1em;
}
.fw-footer-end { color: var(--accent); }

@media (max-width: 980px) {
    .fw-header { flex-wrap: wrap; }
    .fw-header-label { display: none; }
    .fw-header-nav { flex: 1; justify-content: flex-end; }
    .fw-header-nav > a { display: none; }
    .fw-header-nav a, .fw-header-nav button { flex: 0 0 auto; justify-content: center; padding: 10px 16px; }
    #sidebar-toggle { display: flex; }
    .site-frame { grid-template-columns: 1fr; }
    #sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 80;
        width: min(86vw, 340px);
        min-height: 100vh;
        overflow-y: auto;
        border-right: 2px solid var(--ink);
        border-bottom: 0;
        box-shadow: none;
        transform: translateX(-102%);
        visibility: hidden;
        transition: transform .24s ease, visibility 0s linear .24s;
    }
    .sidebar-open { overflow: hidden; }
    .sidebar-open #sidebar {
        transform: translateX(0);
        visibility: visible;
        transition: transform .24s ease;
    }
    .sidebar-heading { grid-template-columns: 58px 1fr 50px; }
    .sidebar-close {
        display: flex;
        align-self: stretch;
        min-height: 58px;
        padding: 0;
        border: 0;
        border-left: 1px solid var(--ink);
        font-size: 20px;
    }
    #sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 70;
        display: block;
        width: 100%;
        height: 100%;
        min-height: 0;
        padding: 0;
        border: 0;
        background: rgb(20 19 15 / 58%);
        cursor: default;
    }
    #sidebar-backdrop[hidden] { display: none; }
    .search_box > label { padding-top: 16px; }
    .blog-intro { min-height: 430px; }
}

@media (max-width: 640px) {
    body { border-inline: 0; }
    .fw-header { position: static; }
    .fw-header-mark { min-width: 64px; justify-content: center; }
    .fw-header-nav a, .fw-header-nav button { font-size: 10px; }
    .blog-intro { grid-template-columns: 1fr; min-height: 390px; }
    .blog-intro-status { min-height: 80px; border-top: 1px solid var(--ink); border-left: 0; flex-direction: row; align-items: center; }
    .blog-intro h1 { font-size: clamp(30px, 11vw, 48px); }
    .section-heading { grid-template-columns: 58px 1fr; min-height: 58px; }
    article.post, article.page, article.discourse, article.commentary, .standalone, #main > details { padding: 28px 20px; }
    article > section.body, article > section.description, article.page > section { font-size: 16px; }
    .fw-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
    .fw-header, #sidebar, .fw-footer, .traversal, .doaction { display: none !important; }
    body { max-width: none; border: 0; }
    .site-frame { display: block; }
    article.post, article.page { break-inside: avoid; }
}
