/* ======================================================
   JAMES MCWILLIAMS v3 - Dark Contemporary
   Fonts: Syne (headings) + IBM Plex Sans (body)
   Palette: near-black / off-white / electric lime
   ====================================================== */

:root {
    --bg:           #0C0C0C;
    --bg-1:         #141414;
    --bg-2:         #1A1A1A;
    --bg-3:         #222222;
    --text:         #EDEAE3;
    --text-muted:   rgba(237,234,227,0.42);
    --text-faint:   rgba(237,234,227,0.18);
    --lime:         #C8F135;
    --lime-dark:    #A8D020;
    --border:       rgba(237,234,227,0.08);
    --border-mid:   rgba(237,234,227,0.14);

    --font-head: 'Syne', system-ui, sans-serif;
    --font-body: 'IBM Plex Sans', system-ui, sans-serif;

    --container: 1160px;
    --pad:       clamp(20px, 5vw, 56px);
    --ease:      cubic-bezier(0.4, 0, 0.2, 1);
}

/* -------------------------------------------------------
   Reset
------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    font-family: var(--font-body);
    font-size: clamp(15px, 1.55vw, 17px);
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea { font-family: inherit; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding-left: var(--pad);
    padding-right: var(--pad);
}

/* -------------------------------------------------------
   HEADER
------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    height: 64px;
    gap: 32px;
}
.site-logo {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text);
    text-transform: uppercase;
    flex-shrink: 0;
    transition: color 0.2s;
}
.site-logo:hover { color: var(--lime); }

.main-nav { flex: 1; }
.nav-menu {
    display: flex;
    gap: 2px;
    list-style: none;
    justify-content: center;
}
.nav-menu a {
    display: block;
    padding: 6px 14px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    transition: color 0.2s;
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a { color: var(--text); }
.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--bg-2);
    border: 1px solid var(--border-mid);
    z-index: 10;
}
.nav-menu li { position: relative; }
.nav-menu li:hover > .sub-menu { display: block; }
.nav-menu .sub-menu a { padding: 10px 16px; font-size: 0.82rem; }
.nav-menu .sub-menu a:hover { color: var(--lime); }

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.search-btn, .burger {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
.search-btn:hover, .burger:hover { color: var(--text); background: var(--bg-2); }
.burger { flex-direction: column; gap: 5px; display: none; padding: 8px; }
.burger span { display: block; width: 18px; height: 1.5px; background: currentColor; transition: all 0.2s var(--ease); }
.burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.search-drawer {
    border-top: 1px solid var(--border);
    background: var(--bg-1);
    padding: 14px 0;
}
.search-drawer-form {
    display: flex;
    align-items: center;
    gap: 12px;
}
.search-drawer-form input[type="search"] {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-mid);
    padding: 6px 0;
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    outline: none;
    letter-spacing: -0.01em;
}
.search-drawer-form input::placeholder { color: var(--text-faint); }
#searchClose { color: var(--text-muted); padding: 4px; transition: color 0.2s; }
#searchClose:hover { color: var(--lime); }

.mobile-nav {
    background: var(--bg-1);
    border-top: 1px solid var(--border);
    padding: 12px 0 20px;
}
.mobile-nav-list li { border-bottom: 1px solid var(--border); }
.mobile-nav-list a {
    display: block;
    padding: 13px 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.2s, padding-left 0.2s;
}
.mobile-nav-list a:hover { color: var(--lime); padding-left: 8px; }

/* -------------------------------------------------------
   TAG PILLS
------------------------------------------------------- */
.tag-pill {
    display: inline-block;
    padding: 3px 11px;
    border: 1px solid var(--lime);
    color: var(--lime);
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 2px;
    transition: background 0.2s, color 0.2s;
    line-height: 1.6;
}
.tag-pill:hover { background: var(--lime); color: var(--bg); }
.tag-pill--sm { font-size: 0.62rem; padding: 2px 8px; }

/* -------------------------------------------------------
   FEATURED BLOCK
------------------------------------------------------- */
.featured-block {
    padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 5vw, 72px);
    border-bottom: 1px solid var(--border);
}
.featured-block-inner {
    display: flex;
    gap: clamp(32px, 4vw, 64px);
    align-items: center;
}
.featured-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.featured-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}
.featured-label {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.featured-title {
    font-family: var(--font-head);
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 22px;
    overflow-wrap: break-word;
    max-width: 100%;
}
.featured-title a { transition: color 0.2s; }
.featured-title a:hover { color: var(--lime); }
.featured-excerpt {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 28px;
    max-width: 100%;
    overflow-wrap: break-word;
}
.featured-foot {
    display: flex;
    align-items: center;
    gap: 24px;
}
.featured-foot time {
    font-size: 0.8rem;
    color: var(--text-faint);
    font-family: var(--font-body);
}
.read-link {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lime);
    transition: letter-spacing 0.2s;
}
.read-link:hover { letter-spacing: 0.14em; }

.featured-image {
    flex-shrink: 0;
    width: 380px;
    border: 2px solid var(--lime);
    border-radius: 6px;
    padding: 5px;
    background: var(--bg);
}
.featured-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
    filter: grayscale(20%);
    border-radius: 3px;
    display: block;
}
.featured-block-inner:hover .featured-img { transform: scale(1.03); filter: grayscale(0); }

/* -------------------------------------------------------
   HOME BODY
------------------------------------------------------- */
.home-body { padding: clamp(40px, 5vw, 72px) 0 clamp(60px, 8vw, 100px); }

.home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: clamp(40px, 5vw, 72px);
    align-items: start;
}

/* Column headings */
.col-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}
.col-heading span:first-child {
    font-family: var(--font-head);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    flex-shrink: 0;
}
.col-heading-line {
    flex: 1;
    height: 1px;
    background: var(--border-mid);
    display: block !important;
}

/* Post stack (numbered list) */
.post-stack { display: flex; flex-direction: column; }

.post-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 0 20px;
    align-items: start;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
.post-item:first-child { border-top: 1px solid var(--border); }
.post-item:hover { background: var(--bg-1); margin: 0 -20px; padding-left: 20px; padding-right: 20px; }

.post-item-num {
    font-family: var(--font-head);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-faint);
    line-height: 1;
    padding-top: 4px;
    transition: color 0.2s;
    letter-spacing: -0.03em;
}
.post-item:hover .post-item-num { color: var(--lime); }

.post-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.post-item-meta time {
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: var(--text-faint);
}
.post-item-title {
    font-family: var(--font-head);
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-bottom: 6px;
    overflow-wrap: break-word;
    word-break: break-word;
}
.post-item-title a { transition: color 0.2s; }
.post-item-title a:hover { color: var(--lime); }
.post-item-body {
    min-width: 0;
    overflow: hidden;
}
.post-item-excerpt {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-item-thumb {
    width: 88px;
    flex-shrink: 0;
}
.post-thumb-img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    filter: grayscale(30%);
    transition: filter 0.3s;
}
.post-item:hover .post-thumb-img { filter: grayscale(0); }

.all-link-wrap { padding-top: 28px; }
.all-link {
    font-family: var(--font-head);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lime);
    transition: letter-spacing 0.2s;
}
.all-link:hover { letter-spacing: 0.16em; }

/* -------------------------------------------------------
   ASIDE
------------------------------------------------------- */
.home-aside {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}
.aside-block {
    padding-bottom: 36px;
    border-bottom: 1px solid var(--border);
}
.aside-block:last-child { border-bottom: none; padding-bottom: 0; }

.aside-bio {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.72;
    margin-bottom: 12px;
}
.aside-link {
    font-family: var(--font-head);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lime);
    transition: letter-spacing 0.2s;
}
.aside-link:hover { letter-spacing: 0.16em; }

.aside-cats { display: flex; flex-direction: column; gap: 1px; }
.aside-cats li { }
.aside-cats a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    transition: color 0.2s;
}
.aside-cats a:hover { color: var(--lime); }
.aside-cat-count {
    font-family: var(--font-head);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-faint);
    background: var(--bg-2);
    padding: 2px 8px;
    border-radius: 2px;
}

.aside-block--nl { background: var(--bg-1); padding: 20px; border: 1px solid var(--border-mid); border-radius: 4px; }
.aside-nl-label {
    font-family: var(--font-head);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--lime);
    margin-bottom: 8px;
}
.aside-nl-text { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.6; }
.aside-nl-form { display: flex; flex-direction: column; gap: 8px; }
.aside-nl-form input {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--border-mid);
    padding: 9px 12px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.88rem;
    outline: none;
    border-radius: 2px;
    transition: border-color 0.2s;
}
.aside-nl-form input:focus { border-color: var(--lime); }
.aside-nl-form input::placeholder { color: var(--text-faint); }
.aside-nl-form button {
    background: var(--lime);
    color: var(--bg);
    padding: 9px;
    font-family: var(--font-head);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s;
}
.aside-nl-form button:hover { background: var(--lime-dark); }
.aside-nl-msg { font-size: 0.78rem; color: var(--text-muted); min-height: 1.2em; }

.aside-post { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.aside-post:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.aside-post-title {
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.aside-post-title a { transition: color 0.2s; }
.aside-post-title a:hover { color: var(--lime); }
.aside-post-date { font-size: 0.72rem; color: var(--text-faint); }

/* -------------------------------------------------------
   ARCHIVE / INDEX
------------------------------------------------------- */
.archive-main { }
.archive-banner {
    padding: clamp(56px, 8vw, 110px) 0 clamp(32px, 4vw, 52px);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.archive-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--lime);
}
.archive-kicker {
    display: block;
    font-family: var(--font-head);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--lime);
    margin-bottom: 12px;
}
.archive-heading {
    font-family: var(--font-head);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--text);
}
.archive-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 14px;
    max-width: 500px;
    line-height: 1.65;
}

.archive-body {
    padding-top: clamp(36px, 4vw, 56px);
    padding-bottom: clamp(56px, 7vw, 96px);
}
.archive-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: clamp(40px, 5vw, 72px);
    align-items: start;
}

/* Reuse post-item styles in archives */
.archive-posts .post-item {
    grid-template-columns: 44px minmax(0, 1fr) auto;
}

/* Pagination */
.pagination-wrap { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.pagination-wrap .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination-wrap .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    font-family: var(--font-head);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 2px;
    transition: all 0.2s;
}
.pagination-wrap .page-numbers:hover { color: var(--text); border-color: var(--border-mid); }
.pagination-wrap .page-numbers.current { background: var(--lime); color: var(--bg); border-color: var(--lime); }

.no-posts { color: var(--text-muted); font-style: italic; padding: 32px 0; }
.no-results-wrap { padding: 40px 0; }

/* -------------------------------------------------------
   SINGLE POST
------------------------------------------------------- */
.single-main { }

.essay-header {
    padding: clamp(64px, 9vw, 120px) 0 clamp(32px, 4vw, 52px);
    border-bottom: 1px solid var(--border);
    position: relative;
}
.essay-header::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0; right: 0;
    height: 3px;
    background: var(--lime);
}
.essay-header-inner { max-width: 780px; }
.essay-cat-link {
    display: inline-block;
    margin-bottom: 20px;
}
.essay-title {
    font-family: var(--font-head);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-bottom: 28px;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}
.essay-byline {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #EDEAE3;
    flex-wrap: wrap;
}
.essay-author { color: #EDEAE3; font-weight: 500; }
.essay-byline-author { color: #EDEAE3; font-weight: 500; }
.essay-byline-date { color: #EDEAE3; }
.essay-read-time { color: #EDEAE3; }
.essay-byline-sep { color: var(--lime); font-size: 1rem; }

.essay-hero-image { }
.essay-hero-img {
    width: 100%;
    height: clamp(280px, 45vw, 560px);
    object-fit: cover;
    filter: grayscale(15%);
    border-radius: 4px;
}
.essay-hero-caption {
    font-size: 0.75rem;
    color: var(--text-faint);
    text-align: center;
    padding: 10px 0;
}

.essay-body { padding: clamp(48px, 6vw, 80px) 0 clamp(60px, 8vw, 100px); }

.essay-content {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.7vw, 1.06rem);
    line-height: 1.9;
    color: var(--text);
    overflow-wrap: break-word;
}
/* Constrain everything inside — including Gutenberg block outputs */
.essay-content > *,
.essay-content p,
.essay-content div,
.essay-content [class*="wp-block"] { max-width: 100% !important; overflow-wrap: break-word; }
.essay-content p { margin-bottom: 1.5em; }
.essay-content h2 {
    font-family: var(--font-head);
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 2.4em 0 0.8em;
}
.essay-content h3 {
    font-family: var(--font-head);
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 2em 0 0.6em;
}
.essay-content a { color: var(--lime); border-bottom: 1px solid rgba(200,241,53,0.3); padding-bottom: 1px; transition: all 0.2s; }
.essay-content a:hover { color: var(--text); border-bottom-color: var(--text-muted); }
.essay-content blockquote {
    margin: 2em 0;
    padding: 20px 24px;
    border-left: 3px solid var(--lime);
    background: var(--bg-1);
    color: var(--text-muted);
    font-style: italic;
    font-size: 1.06em;
}
.essay-content blockquote p { margin-bottom: 0.4em; }
.essay-content ul, .essay-content ol { margin: 1.2em 0 1.5em 1.4em; list-style: revert; }
.essay-content li { margin-bottom: 0.5em; color: var(--text-muted); }
.essay-content img { margin: 2em 0; filter: grayscale(10%); border-radius: 4px; }
.essay-content figure { margin: 2.5em 0; }
.essay-content figcaption { font-size: 0.78rem; color: var(--text-faint); text-align: center; margin-top: 8px; }
.essay-content hr { border: none; border-top: 1px solid var(--border-mid); margin: 2.5em auto; width: 80px; }
.essay-content code { background: var(--bg-2); color: var(--lime); padding: 2px 6px; font-size: 0.87em; border-radius: 2px; }
.essay-content pre { background: var(--bg-1); border: 1px solid var(--border); padding: 20px 24px; overflow-x: auto; margin: 1.5em 0; border-radius: 4px; }
.essay-content strong { color: var(--text); font-weight: 600; }
.essay-content em { color: var(--text-muted); }

/* Tags */
.essay-tags {
    max-width: 680px;
    margin: 48px auto 0;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.essay-tag {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--border-mid);
    padding: 4px 12px;
    border-radius: 2px;
    transition: all 0.2s;
}
.essay-tag:hover { border-color: var(--lime); color: var(--lime); }

/* Post nav */
.essay-nav {
    max-width: 680px;
    margin: 40px auto 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
}
.essay-nav-item {
    background: var(--bg-1);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background 0.2s;
}
.essay-nav-item:hover { background: var(--bg-2); }
.essay-nav-next { text-align: right; }
.essay-nav-dir {
    font-family: var(--font-head);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--lime);
}
.essay-nav-title {
    font-family: var(--font-head);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    transition: color 0.2s;
    display: block;
    letter-spacing: -0.01em;
}
.essay-nav-item:hover .essay-nav-title { color: var(--lime); }

/* Related */
.related-essays {
    padding: clamp(36px, 5vw, 60px) 0;
    border-top: 1px solid var(--border);
    background: var(--bg-1);
}
.related-heading {
    font-family: var(--font-head);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.related-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
}
.related-item {
    background: var(--bg);
    padding: 22px;
    transition: background 0.2s;
}
.related-item:hover { background: var(--bg-2); }
.related-title {
    font-family: var(--font-head);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}
.related-title a { transition: color 0.2s; }
.related-title a:hover { color: var(--lime); }
.related-date { font-size: 0.72rem; color: var(--text-faint); }

/* -------------------------------------------------------
   PAGE
------------------------------------------------------- */
.page-main { }
.entry-content {
    max-width: 680px;
    margin: 0 auto;
    padding: clamp(48px, 6vw, 80px) 0 clamp(60px, 8vw, 100px);
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.6vw, 1.06rem);
    line-height: 1.9;
    color: var(--text);
}
.entry-content p { margin-bottom: 1.5em; }
.entry-content h2 { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; margin: 2.2em 0 0.8em; }
.entry-content h3 { font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; margin: 1.8em 0 0.6em; }
.entry-content a { color: var(--lime); border-bottom: 1px solid rgba(200,241,53,0.3); transition: all 0.2s; }
.entry-content a:hover { color: var(--text); }
.entry-content blockquote { border-left: 3px solid var(--lime); padding: 16px 22px; background: var(--bg-1); margin: 2em 0; color: var(--text-muted); font-style: italic; }
.entry-content ul, .entry-content ol { margin: 1.2em 0 1.5em 1.4em; list-style: revert; }
.entry-content li { margin-bottom: 0.5em; color: var(--text-muted); }

/* -------------------------------------------------------
   SEARCH INLINE
------------------------------------------------------- */
.inline-search-form { display: flex; gap: 0; border: 1px solid var(--border-mid); max-width: 380px; margin-top: 20px; }
.inline-search-form input { flex: 1; border: none; padding: 10px 14px; font-family: var(--font-body); font-size: 0.9rem; outline: none; background: var(--bg-1); color: var(--text); }
.inline-search-form button { padding: 10px 18px; background: var(--lime); color: var(--bg); font-family: var(--font-head); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; transition: background 0.2s; }
.inline-search-form button:hover { background: var(--lime-dark); }

/* -------------------------------------------------------
   404
------------------------------------------------------- */
.error-main { min-height: 70vh; display: flex; align-items: center; padding: 60px 0; }
.error-inner { max-width: 520px; }
.error-num {
    font-family: var(--font-head);
    font-size: clamp(6rem, 16vw, 12rem);
    font-weight: 800;
    color: var(--bg-3);
    line-height: 0.9;
    display: block;
    margin-bottom: 20px;
    letter-spacing: -0.05em;
}
.error-title { font-family: var(--font-head); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; }
.error-desc { color: var(--text-muted); font-size: 0.97rem; margin-bottom: 28px; }
.error-home {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lime);
    transition: letter-spacing 0.2s;
}
.error-home:hover { letter-spacing: 0.16em; }

/* -------------------------------------------------------
   COMMENTS
------------------------------------------------------- */
.comments-area {
    max-width: 680px;
    margin: 56px auto 0;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}
.comments-heading { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 32px; }
.comment-list { display: flex; flex-direction: column; margin-bottom: 48px; }
.comment-item { border-bottom: 1px solid var(--border); }
.comment-inner { display: flex; gap: 16px; padding: 22px 0; }
.comment-avatar { width: 44px; height: 44px; border-radius: 2px; flex-shrink: 0; object-fit: cover; filter: grayscale(30%); }
.comment-body { flex: 1; }
.comment-meta { display: flex; gap: 12px; align-items: baseline; margin-bottom: 10px; flex-wrap: wrap; }
.comment-name { font-family: var(--font-head); font-size: 0.85rem; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.comment-date { font-size: 0.72rem; color: var(--text-faint); }
.comment-text p { font-size: 0.92rem; line-height: 1.75; color: var(--text-muted); margin-bottom: 0.5em; }
.comment-reply { margin-top: 8px; }
.comment-reply .comment-reply-link { font-family: var(--font-head); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lime); transition: letter-spacing 0.2s; }
.comment-reply-link:hover { letter-spacing: 0.15em; }
.comment-pending { font-size: 0.82rem; color: var(--text-faint); font-style: italic; }
.comments-closed { font-style: italic; color: var(--text-faint); font-size: 0.9rem; margin: 24px 0; }

.comment-respond { margin-top: 48px; }
.comment-respond .comment-reply-title { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 28px; }
#commentform { display: flex; flex-direction: column; gap: 16px; }
.cform-row { display: flex; flex-direction: column; gap: 6px; }
.cform-row label { font-family: var(--font-head); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.req { color: var(--lime); }
#commentform input[type="text"],
#commentform input[type="email"],
#commentform textarea {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-1);
    border: 1px solid var(--border-mid);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    border-radius: 2px;
    transition: border-color 0.2s;
    resize: vertical;
}
#commentform input:focus, #commentform textarea:focus { border-color: var(--lime); }
.submit-btn {
    align-self: flex-start;
    padding: 11px 28px;
    background: var(--lime);
    color: var(--bg);
    font-family: var(--font-head);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s;
}
.submit-btn:hover { background: var(--lime-dark); }

/* -------------------------------------------------------
   FOOTER
------------------------------------------------------- */
.site-footer {
    background: var(--bg-1);
    border-top: 1px solid var(--border);
}

.footer-nl {
    padding: clamp(40px, 5vw, 64px) 0;
    border-bottom: 1px solid var(--border);
}
.footer-nl-inner {
    display: flex;
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
    flex-wrap: wrap;
}
.footer-nl-label {
    font-family: var(--font-head);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--lime);
    display: block;
    margin-bottom: 8px;
}
.footer-nl-heading {
    font-family: var(--font-head);
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 700;
    color: var(--text);
    max-width: 320px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}
.footer-nl-form { flex: 1; min-width: 260px; max-width: 420px; }
.footer-nl-row { display: flex; border: 1px solid var(--border-mid); }
.footer-nl-form input[type="email"] { flex: 1; background: none; border: none; padding: 11px 14px; color: var(--text); font-family: var(--font-body); font-size: 0.9rem; outline: none; min-width: 0; }
.footer-nl-form input::placeholder { color: var(--text-faint); }
.footer-nl-form button[type="submit"] {
    padding: 11px 20px;
    background: var(--lime);
    color: var(--bg);
    font-family: var(--font-head);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    border: none;
}
.footer-nl-form button:hover { background: var(--lime-dark); }
.footer-nl-msg { font-size: 0.78rem; color: var(--text-muted); margin-top: 8px; min-height: 1.2em; }

.footer-body { padding: clamp(36px, 5vw, 56px) 0; border-bottom: 1px solid var(--border); }
.footer-cols { display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: clamp(28px, 4vw, 56px); }
.footer-brand-name {
    font-family: var(--font-head);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 10px;
}
.footer-brand-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; max-width: 260px; }
.footer-col-heading { font-family: var(--font-head); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-faint); display: block; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { font-size: 0.85rem; color: var(--text-muted); transition: color 0.2s; }
.footer-nav a:hover { color: var(--lime); }
.widget-title { font-family: var(--font-head); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-faint); display: block; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.widget ul { display: flex; flex-direction: column; gap: 8px; }
.widget ul a { font-size: 0.85rem; color: var(--text-muted); transition: color 0.2s; }
.widget ul a:hover { color: var(--lime); }

.footer-bar { padding: 16px 0; }
.footer-bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-copy { font-size: 0.75rem; color: var(--text-faint); }
.footer-top { font-family: var(--font-head); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); transition: color 0.2s; }
.footer-top:hover { color: var(--lime); }

/* -------------------------------------------------------
   SIDEBAR (archive pages)
------------------------------------------------------- */
.archive-sidebar { position: sticky; top: 80px; }

/* -------------------------------------------------------
   SUPPLEMENT — class aliases for template compatibility
------------------------------------------------------- */

/* Archive banner aliases */
.archive-banner-label { display: block; font-family: var(--font-head); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--lime); margin-bottom: 12px; }
.archive-banner-title { font-family: var(--font-head); font-size: clamp(2rem, 5vw, 4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--text); }
.archive-banner-desc { font-size: 0.95rem; color: var(--text-muted); margin-top: 14px; max-width: 500px; line-height: 1.65; }
.archive-posts { padding-top: clamp(36px, 4vw, 56px); padding-bottom: clamp(56px, 7vw, 96px); }

/* Pagination (WordPress default output wrapper) */
.pagination { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; font-family: var(--font-head); font-size: 0.8rem; font-weight: 600; color: var(--text-muted); border: 1px solid var(--border); border-radius: 2px; transition: all 0.2s; }
.pagination .page-numbers:hover { color: var(--text); border-color: var(--border-mid); }
.pagination .page-numbers.current { background: var(--lime); color: var(--bg); border-color: var(--lime); }

/* Footer layout */
.footer-inner { display: grid; grid-template-columns: 1fr 1.2fr 0.8fr; gap: clamp(32px, 5vw, 64px); padding: clamp(40px, 6vw, 72px) 0; }
.footer-brand .footer-logo { font-family: var(--font-head); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); display: inline-block; margin-bottom: 10px; transition: color 0.2s; }
.footer-brand .footer-logo:hover { color: var(--lime); }
.footer-tagline { font-size: 0.85rem; color: var(--text-muted); line-height: 1.65; max-width: 220px; }
.footer-nl .footer-nl-label { font-family: var(--font-head); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--lime); display: block; margin-bottom: 8px; }
.footer-nl .footer-nl-text { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.6; }
.footer-nl .footer-nl-form { display: flex; flex-direction: column; gap: 0; }
.footer-nl .footer-nl-row { display: flex; border: 1px solid var(--border-mid); }
.footer-nl .footer-nl-form input[type="email"] { flex: 1; background: none; border: none; padding: 11px 14px; color: var(--text); font-family: var(--font-body); font-size: 0.9rem; outline: none; min-width: 0; }
.footer-nl .footer-nl-form input::placeholder { color: var(--text-faint); }
.footer-nl .footer-nl-form button[type="submit"] { padding: 11px 20px; background: var(--lime); color: var(--bg); font-family: var(--font-head); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; transition: background 0.2s; white-space: nowrap; border: none; }
.footer-nl .footer-nl-form button:hover { background: var(--lime-dark); }
.footer-nl-msg { font-size: 0.78rem; color: var(--text-muted); margin-top: 8px; }
.footer-nav-list { display: flex; flex-direction: column; gap: 8px; list-style: none; }
.footer-nav-list li a { font-size: 0.85rem; color: var(--text-muted); transition: color 0.2s; }
.footer-nav-list li a:hover { color: var(--lime); }
.footer-base { border-top: 1px solid var(--border); padding: 16px 0; }
.footer-copy { font-size: 0.75rem; color: var(--text-faint); }

/* 404 */
.error-404-wrap { min-height: 70vh; display: flex; align-items: center; padding: 60px 0; }
.error-404-inner { max-width: 520px; }
.error-404-code { font-family: var(--font-head); font-size: clamp(6rem, 16vw, 12rem); font-weight: 800; color: var(--bg-3); line-height: 0.9; display: block; margin-bottom: 20px; letter-spacing: -0.05em; }
.error-404-title { font-family: var(--font-head); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; }
.error-404-text { color: var(--text-muted); font-size: 0.97rem; margin-bottom: 28px; }
.btn-primary { display: inline-block; font-family: var(--font-head); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lime); margin-top: 16px; transition: letter-spacing 0.2s; }
.btn-primary:hover { letter-spacing: 0.16em; }

/* Single post nav — aliases */
.essay-nav-prev, .essay-nav-next { background: var(--bg-1); padding: 22px; display: flex; flex-direction: column; gap: 8px; transition: background 0.2s; }
.essay-nav-prev:hover, .essay-nav-next:hover { background: var(--bg-2); }
.essay-nav-label { font-family: var(--font-head); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); }
.essay-byline-author { color: var(--text-muted); font-weight: 500; }
.essay-byline-date, .essay-read-time { }
.essay-footer { }

/* Related essays — card layout */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); margin-top: 24px; }
.related-card { background: var(--bg); padding: 22px; transition: background 0.2s; display: flex; flex-direction: column; }
.related-card:hover { background: var(--bg-2); }
.related-card-img { margin-bottom: 16px; overflow: hidden; }
.related-img { width: 100%; height: 160px; object-fit: cover; filter: grayscale(20%); transition: filter 0.3s, transform 0.4s; }
.related-card:hover .related-img { filter: grayscale(0); transform: scale(1.03); }
.related-card-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.related-card-title { font-family: var(--font-head); font-size: 0.92rem; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; }
.related-card-title a { transition: color 0.2s; }
.related-card-title a:hover { color: var(--lime); }
.related-card-date { font-size: 0.72rem; color: var(--text-faint); margin-top: auto; }

/* Comments supplement */
.comments-title { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 32px; }
.comment-nav { display: flex; justify-content: space-between; padding: 16px 0; border-top: 1px solid var(--border); margin-bottom: 16px; }
.comment-nav-prev a, .comment-nav-next a { font-family: var(--font-head); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lime); transition: letter-spacing 0.2s; }
.comment-nav-prev a:hover, .comment-nav-next a:hover { letter-spacing: 0.15em; }
.comment-form-author, .comment-form-email, .comment-form-comment { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.comment-form-author label, .comment-form-email label, .comment-form-comment label { font-family: var(--font-head); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.comment-submit { align-self: flex-start; padding: 11px 28px; background: var(--lime); color: var(--bg); font-family: var(--font-head); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; border-radius: 2px; cursor: pointer; transition: background 0.2s; border: none; }
.comment-submit:hover { background: var(--lime-dark); }

/* Scroll reveal */
.post-item, .archive-item, .aside-post, .featured-block { opacity: 0; transform: translateY(18px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.post-item.is-visible, .archive-item.is-visible, .aside-post.is-visible, .featured-block.is-visible { opacity: 1; transform: none; }

/* Responsive supplements */
@media (max-width: 960px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
    .footer-inner { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }
    .essay-nav { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------
   RESPONSIVE
------------------------------------------------------- */
@media (max-width: 960px) {
    .featured-block-inner { flex-direction: column; }
    .featured-text { overflow: visible; }
    .featured-image { order: -1; width: 100%; }
    .featured-img { aspect-ratio: 16 / 7; height: auto; }
    .home-layout { grid-template-columns: 1fr; }
    .home-aside { position: static; }
    .archive-layout { grid-template-columns: 1fr; }
    .archive-sidebar { position: static; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
    .related-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
    .main-nav { display: none; }
    .burger { display: flex; }
    .post-item { grid-template-columns: 36px 1fr; }
    .post-item-thumb { display: none; }
    .essay-nav { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr; }
    .footer-nl-inner { flex-direction: column; }
    .footer-nl-form { width: 100%; max-width: 100%; }
    .related-list { grid-template-columns: 1fr; }
    .footer-bar-inner { flex-direction: column; text-align: center; }
}
