/*
Theme Name:  Síntese Exogenética (SX Theme)
Theme URI:   https://casteloweb.com
Author:      Prof. Luiz Guilherme Farias Castelo
Author URI:  https://casteloweb.com
Description: Tema oficial da Síntese Exogenética. Estética espacial, escura, com ouro e azul profundo. Fiel ao Tratado SX v3.0.
Version:     1.0.0
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sx-theme
Tags:        dark, one-column, two-columns, custom-colors, custom-menu, featured-images, full-width-template
*/

/* ═══════════════════════════════════════
   RESET & ROOT
═══════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Core palette */
    --bg:          #06060f;
    --bg2:         #0a0a18;
    --bg3:         rgba(10, 10, 24, 0.82);
    --bg-card:     rgba(12, 12, 26, 0.88);
    --gold:        #c9a84c;
    --gold2:       #e8c97a;
    --gold3:       rgba(201, 168, 76, 0.13);
    --gold-border: rgba(201, 168, 76, 0.25);
    --blue:        #3b6fd4;
    --blue2:       #2251b8;
    --blue-dim:    rgba(59, 111, 212, 0.12);
    --text:        #dde3ef;
    --text2:       #b8c0d8;
    --muted:       #8a93aa;
    --faint:       rgba(221, 227, 239, 0.05);
    --border:      rgba(201, 168, 76, 0.2);
    --border2:     rgba(221, 227, 239, 0.08);
    --radius:      14px;
    --radius-sm:   8px;

    /* Typography */
    --serif:  'Playfair Display', Georgia, 'Times New Roman', serif;
    --sans:   'DM Sans', system-ui, -apple-system, sans-serif;
    --mono:   'JetBrains Mono', 'Courier New', monospace;

    /* Spacing */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  1.5rem;
    --space-lg:  2.5rem;
    --space-xl:  4rem;
    --space-2xl: 6rem;

    /* Max widths */
    --max-content: 1280px;
    --max-prose:   800px;
    --max-wide:    1600px;
}

/* Light theme overrides */
html.light-theme {
    --bg:      #f0f0f7;
    --bg2:     #e4e4f0;
    --bg3:     rgba(240, 240, 247, 0.9);
    --bg-card: rgba(255, 255, 255, 0.92);
    --text:    #12121e;
    --text2:   #2a2a42;
    --muted:   #3d3d5c;
    --faint:   rgba(0, 0, 0, 0.04);
    --border2: rgba(0, 0, 0, 0.1);
    --gold3:   rgba(201, 168, 76, 0.12);
}

html { scroll-behavior: smooth; font-size: 17px; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-weight: 400;
    line-height: 1.78;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Starfield canvas (injected by JS) */
#sx-starfield {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ═══════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--serif);
    line-height: 1.2;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
}

h1 { font-size: clamp(2.2rem, 5.5vw, 4.5rem); font-weight: 900; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.7rem); }
h4 { font-size: 1.1rem; font-family: var(--mono); font-weight: 700; letter-spacing: .04em; }
h5 { font-size: 1rem; font-family: var(--mono); }
h6 { font-size: .9rem; font-family: var(--mono); color: var(--gold); }

p {
    color: var(--text2);
    line-height: 1.9;
    margin-bottom: 1.2rem;
    font-size: 1rem;
}

strong { color: var(--text); font-weight: 600; }
em     { color: var(--gold2); font-style: italic; font-size: 1.05em; }
a      { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold2); }

blockquote {
    border-left: 4px solid var(--gold);
    padding: 1.4rem 2rem;
    background: var(--gold3);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 2rem 0;
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--text);
    line-height: 1.75;
}
blockquote cite {
    display: block;
    font-size: .82rem;
    font-family: var(--sans);
    font-style: normal;
    color: var(--gold);
    margin-top: .8rem;
    font-weight: 600;
}

code {
    font-family: var(--mono);
    font-size: .88em;
    background: rgba(0,0,0,.3);
    color: var(--gold2);
    padding: .15em .5em;
    border-radius: 5px;
    border: 1px solid var(--border2);
}

pre {
    background: rgba(0,0,0,.45);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}
pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: .9rem;
}

ul, ol { color: var(--text2); padding-left: 1.5rem; margin-bottom: 1.2rem; }
li { margin-bottom: .4rem; line-height: 1.75; }

hr {
    border: none;
    height: 1px;
    background: var(--border2);
    margin: 2.5rem 0;
}

img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }

table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .9rem; }
table thead { background: var(--gold3); border-bottom: 2px solid var(--border); }
table thead th {
    padding: .85rem 1rem;
    text-align: left;
    font-family: var(--mono);
    font-size: .75rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
}
table tbody tr { border-bottom: 1px solid var(--border2); transition: background .2s; }
table tbody tr:hover { background: var(--faint); }
table tbody td { padding: .8rem 1rem; color: var(--muted); vertical-align: top; }
table tbody td:first-child { font-family: var(--mono); color: var(--gold2); }

::selection { background: var(--gold); color: #000; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* ═══════════════════════════════════════
   LAYOUT
═══════════════════════════════════════ */
.container {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: 0 clamp(1.2rem, 5vw, 3.5rem);
}

.container-wide {
    max-width: var(--max-wide);
    margin: 0 auto;
    padding: 0 clamp(1.2rem, 5vw, 3.5rem);
}

.container-prose {
    max-width: var(--max-prose);
    margin: 0 auto;
    padding: 0 clamp(1.2rem, 4vw, 2.5rem);
}

.site-wrapper {
    position: relative;
    z-index: 1;
}

.section { padding: clamp(4rem, 10vw, 8rem) 0; position: relative; }
.section-sm { padding: clamp(2.5rem, 6vw, 4.5rem) 0; position: relative; }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 1000px) {
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════
   GLASS CARDS
═══════════════════════════════════════ */
.glass {
    background: var(--bg-card);
    border: 1px solid var(--border2);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: var(--radius);
    transition: border-color .3s, box-shadow .3s;
}
.glass:hover {
    border-color: var(--border);
    box-shadow: 0 0 50px rgba(201, 168, 76, .07);
}
.glass-gold  { border-color: var(--border) !important; }
.glass-blue  { border-color: rgba(59, 111, 212, .3) !important; background: rgba(59,111,212,.06) !important; }

.card { padding: 2rem; }
.card-lg { padding: 2.8rem; }
.card-sm { padding: 1.25rem; }

/* ═══════════════════════════════════════
   BADGES
═══════════════════════════════════════ */
.badge {
    display: inline-block;
    padding: .28rem .9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--gold);
    background: var(--gold3);
    letter-spacing: .07em;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
}
.badge-blue {
    border-color: rgba(59, 111, 212, .3);
    color: #7ca4e8;
    background: rgba(59, 111, 212, .08);
}
.badge-sm { font-size: .65rem; padding: .2rem .7rem; }

/* ═══════════════════════════════════════
   DIVIDER
═══════════════════════════════════════ */
.divider {
    width: 56px;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
    margin: 1.1rem 0 2rem;
}
.divider-center { margin-left: auto; margin-right: auto; }
.divider-blue { background: var(--blue); }

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .88rem 2.2rem;
    border-radius: 999px;
    font-family: var(--sans);
    font-weight: 600;
    font-size: .94rem;
    cursor: pointer;
    transition: all .25s;
    border: none;
    text-decoration: none;
    line-height: 1;
}
.btn-gold {
    background: var(--gold);
    color: #000;
}
.btn-gold:hover {
    background: var(--gold2);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(201, 168, 76, .35);
    color: #000;
}
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--gold);
    color: var(--gold);
}
.btn-outline:hover {
    background: var(--gold3);
    transform: translateY(-2px);
    color: var(--gold2);
}
.btn-blue {
    background: var(--blue);
    color: #fff;
}
.btn-blue:hover {
    background: var(--blue2);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(59, 111, 212, .35);
    color: #fff;
}
.btn-sm { padding: .6rem 1.4rem; font-size: .84rem; }
.btn-lg { padding: 1rem 2.8rem; font-size: 1rem; }

/* ═══════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════ */
#site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(6, 6, 15, .9);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-bottom: 1px solid var(--border2);
    transition: background .3s;
}

html.light-theme #site-header {
    background: rgba(240, 240, 247, .92);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    max-width: var(--max-wide);
    margin: 0 auto;
    padding: 0 clamp(1.2rem, 5vw, 3rem);
}

.nav-logo {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--gold);
    letter-spacing: .04em;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
}
.nav-logo sup {
    font-size: .55rem;
    color: var(--muted);
    vertical-align: super;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}
.nav-menu a {
    font-size: .84rem;
    font-weight: 500;
    color: var(--muted);
    transition: color .2s;
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a {
    color: var(--gold);
}

/* Dropdown */
.nav-menu .menu-item-has-children { position: relative; }
.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: calc(100% + .8rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    list-style: none;
    padding: .5rem;
    box-shadow: 0 16px 48px rgba(0,0,0,.4);
}
.nav-menu .menu-item-has-children:hover .sub-menu { display: block; }
.nav-menu .sub-menu li a {
    display: block;
    padding: .55rem 1rem;
    border-radius: 8px;
    font-size: .82rem;
}
.nav-menu .sub-menu li a:hover { background: var(--faint); }

.nav-controls {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.nav-icon-btn {
    background: none;
    border: 1px solid var(--border2);
    border-radius: 8px;
    color: var(--muted);
    cursor: pointer;
    padding: .4rem .75rem;
    font-size: .8rem;
    font-family: var(--mono);
    transition: all .2s;
    line-height: 1;
}
.nav-icon-btn:hover { border-color: var(--gold); color: var(--gold); }

#hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    background: none;
    border: none;
}
#hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--muted);
    border-radius: 2px;
    transition: all .3s;
}

@media (max-width: 960px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        background: rgba(6, 6, 15, .97);
        padding: 1.5rem 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border2);
        z-index: 999;
        align-items: flex-start;
    }
    .nav-menu.open { display: flex; }
    #hamburger { display: flex; }
}

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
.hero {
    min-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 9rem 1.5rem 5rem;
    position: relative;
    overflow: hidden;
}

.hero-bg-gradient {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 75% 55% at 50% -5%, rgba(59,111,212,.2) 0%, transparent 65%),
        radial-gradient(ellipse 45% 40% at 80% 85%, rgba(201,168,76,.07) 0%, transparent 55%),
        radial-gradient(ellipse 35% 35% at 15% 75%, rgba(59,111,212,.06) 0%, transparent 55%);
    pointer-events: none;
}

.hero-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: .035;
    background-image:
        linear-gradient(var(--border2) 1px, transparent 1px),
        linear-gradient(90deg, var(--border2) 1px, transparent 1px);
    background-size: 72px 72px;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-eyebrow {
    font-family: var(--mono);
    font-size: .76rem;
    letter-spacing: .28em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
}
.hero-eyebrow::before,
.hero-eyebrow::after {
    content: '';
    display: inline-block;
    width: 44px;
    height: 1px;
    background: var(--gold);
    opacity: .5;
}

.hero h1 { margin-bottom: 1.4rem; }
.hero h1 em { font-style: italic; display: block; color: var(--gold); }

.hero-lead {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    color: var(--muted);
    max-width: 660px;
    margin: 0 auto 1rem;
    line-height: 1.75;
}

.hero-quote {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(.95rem, 1.8vw, 1.1rem);
    color: var(--muted);
    margin: 0 auto 2.8rem;
    opacity: .8;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    padding-top: 2rem;
    border-top: 1px solid var(--border2);
}

.stat-num { font-family: var(--mono); font-size: 1.5rem; color: var(--gold); font-weight: 700; display: block; }
.stat-lbl { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

/* ═══════════════════════════════════════
   SECTION HEADERS
═══════════════════════════════════════ */
.section-header { margin-bottom: 3.5rem; }
.section-header h2 { margin-bottom: .7rem; }
.section-header p  { max-width: 600px; font-size: 1rem; }
.section-header.center { text-align: center; }
.section-header.center .divider { margin-left: auto; margin-right: auto; }
.section-header.center p { margin-left: auto; margin-right: auto; }

/* ═══════════════════════════════════════
   CONTENT CARDS (Pillar / Feature)
═══════════════════════════════════════ */
.feature-card {
    padding: 2rem 1.8rem;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    transition: transform .3s, box-shadow .3s;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 52px rgba(0,0,0,.35);
}
.feature-icon {
    font-size: 2.4rem;
    margin-bottom: 1.1rem;
    line-height: 1;
}
.feature-card h3 { font-size: 1.1rem; color: var(--text); margin-bottom: .7rem; }
.feature-card p  { font-size: .9rem; color: var(--muted); flex-grow: 1; }
.feature-link {
    font-family: var(--mono);
    font-size: .76rem;
    color: var(--gold);
    margin-top: 1.1rem;
    opacity: .7;
    transition: opacity .2s;
    cursor: pointer;
    display: inline-block;
}
.feature-link:hover { opacity: 1; color: var(--gold2); }

/* ═══════════════════════════════════════
   EQUATION BLOCKS
═══════════════════════════════════════ */
.eq-block {
    background: rgba(0,0,0,.5);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    text-align: center;
}
.eq-block .eq-name {
    font-family: var(--mono);
    font-size: .7rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: .7rem;
}
.eq-block .eq-desc {
    font-size: .84rem;
    color: var(--muted);
    margin-top: .9rem;
    font-style: italic;
    line-height: 1.65;
}

/* AMI highlight box */
.ami-box {
    background: #fff;
    color: #000;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
}
.ami-num {
    font-family: var(--mono);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    color: #000;
    line-height: 1.1;
}
.ami-unit { font-size: clamp(1.5rem, 4vw, 2.8rem); color: #2563eb; }
.ami-sub  {
    font-size: .76rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 700;
    margin-top: .7rem;
    font-family: var(--mono);
    text-align: center;
}

/* ═══════════════════════════════════════
   POSTS / BLOG
═══════════════════════════════════════ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.post-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .3s, box-shadow .3s;
}
.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 56px rgba(0,0,0,.35);
}

.post-card .post-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: var(--bg2);
}

.post-card .post-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--bg2), rgba(59,111,212,.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--muted);
    opacity: .5;
}

.post-card .post-body { padding: 1.8rem; flex-grow: 1; display: flex; flex-direction: column; }
.post-card .post-meta {
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--muted);
    margin-bottom: .8rem;
    letter-spacing: .06em;
}
.post-card .post-meta .cat {
    color: var(--gold);
    margin-right: .5rem;
}
.post-card h3 {
    font-size: 1.15rem;
    margin-bottom: .7rem;
}
.post-card h3 a { color: var(--text); transition: color .2s; }
.post-card h3 a:hover { color: var(--gold); }
.post-card p { font-size: .9rem; flex-grow: 1; }
.post-card .read-more {
    font-family: var(--mono);
    font-size: .76rem;
    color: var(--gold);
    margin-top: 1rem;
    display: inline-block;
    opacity: .75;
    transition: opacity .2s;
}
.post-card .read-more:hover { opacity: 1; }

/* Single post */
.post-header { padding: 3rem 0 2rem; text-align: center; }
.post-header .post-meta { margin-bottom: 1rem; }
.post-title { font-size: clamp(2rem, 4.5vw, 3.5rem); margin-bottom: 1rem; }

.post-content {
    max-width: var(--max-prose);
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.post-content p     { font-size: 1.05rem; line-height: 1.95; color: var(--text2); }
.post-content h2,
.post-content h3    { margin-top: 2.5rem; }
.post-content img   { display: block; margin: 2rem auto; border-radius: var(--radius); }

.post-featured-image {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 3rem;
}

/* ═══════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════ */
.content-sidebar-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2.5rem;
    align-items: start;
}
@media (max-width: 960px) {
    .content-sidebar-wrap { grid-template-columns: 1fr; }
}

.sidebar .widget {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: var(--radius);
}
.sidebar .widget-title {
    font-family: var(--mono);
    font-size: .78rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--border);
}
.sidebar ul { list-style: none; padding: 0; }
.sidebar ul li { padding: .4rem 0; border-bottom: 1px solid var(--border2); font-size: .9rem; }
.sidebar ul li:last-child { border-bottom: none; }
.sidebar ul li a { color: var(--muted); transition: color .2s; }
.sidebar ul li a:hover { color: var(--gold); }

/* ═══════════════════════════════════════
   PAGINATION
═══════════════════════════════════════ */
.pagination {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    font-family: var(--mono);
    font-size: .88rem;
    border: 1px solid var(--border2);
    color: var(--muted);
    transition: all .2s;
    background: var(--bg-card);
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

/* ═══════════════════════════════════════
   COMMENTS
═══════════════════════════════════════ */
.comments-area {
    max-width: var(--max-prose);
    margin: 3rem auto 0;
    padding: 0 clamp(1rem, 4vw, 2.5rem);
}
.comments-title {
    font-family: var(--mono);
    font-size: .82rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 2rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--border);
}

.comment-list { list-style: none; padding: 0; }
.comment {
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border2);
}
.comment .comment-author { font-family: var(--mono); font-size: .8rem; color: var(--gold); margin-bottom: .4rem; }
.comment .comment-date   { font-size: .74rem; color: var(--muted); margin-bottom: 1rem; }
.comment .comment-content p { font-size: .92rem; }

.comment-form input,
.comment-form textarea {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border2);
    border-radius: var(--radius-sm);
    padding: .75rem 1rem;
    color: var(--text);
    font-family: var(--sans);
    font-size: .92rem;
    margin-bottom: 1rem;
    outline: none;
    transition: border-color .2s;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--gold); }
.comment-form textarea { min-height: 140px; resize: vertical; }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
#site-footer {
    border-top: 1px solid var(--border2);
    padding: 3.5rem 0;
    text-align: center;
    position: relative;
    z-index: 1;
}
.footer-logo {
    font-family: var(--mono);
    font-size: 1.15rem;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 1rem;
}
#site-footer p {
    font-size: .8rem;
    color: var(--muted);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.75;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.2rem 0;
    flex-wrap: wrap;
}
.footer-links a { font-size: .8rem; color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: var(--gold); }

/* ═══════════════════════════════════════
   404 / SEARCH / ARCHIVE
═══════════════════════════════════════ */
.error-404-wrap {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem;
}
.error-code {
    font-family: var(--mono);
    font-size: clamp(5rem, 16vw, 12rem);
    color: var(--gold);
    opacity: .15;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.search-form {
    display: flex;
    gap: .5rem;
    max-width: 480px;
    margin: 2rem auto 0;
}
.search-field {
    flex-grow: 1;
    background: var(--bg-card);
    border: 1px solid var(--border2);
    border-radius: 999px;
    padding: .7rem 1.4rem;
    color: var(--text);
    font-family: var(--sans);
    font-size: .92rem;
    outline: none;
    transition: border-color .2s;
}
.search-field:focus { border-color: var(--gold); }
.search-submit { border-radius: 999px !important; }

/* ═══════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
═══════════════════════════════════════ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .75s ease, transform .75s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* ═══════════════════════════════════════
   UTILITIES
═══════════════════════════════════════ */
.text-gold   { color: var(--gold); }
.text-gold2  { color: var(--gold2); }
.text-blue   { color: var(--blue); }
.text-muted  { color: var(--muted); }
.text-center { text-align: center; }
.text-justify{ text-align: justify; }
.font-mono   { font-family: var(--mono); }
.font-serif  { font-family: var(--serif); }

.mt-1 { margin-top: .5rem; }  .mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }   .mt-8 { margin-top: 4rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }  .mb-6 { margin-bottom: 3rem; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* SX custom list */
ul.sx-list { list-style: none; padding-left: 0; }
ul.sx-list li {
    padding: .5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--muted);
    font-size: .94rem;
}
ul.sx-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: .8rem;
    top: .6rem;
}
ul.sx-list li strong { color: var(--text); }

/* WordPress core alignment */
.alignleft  { float: left; margin: 0 2rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 2rem; }
.aligncenter { display: block; margin: 1.5rem auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .8rem; color: var(--muted); text-align: center; margin-top: .4rem; }

/* Gutenberg blocks */
.wp-block-separator { border: none; height: 1px; background: var(--border2); margin: 2rem 0; }
.wp-block-quote { border-left: 4px solid var(--gold); padding: 1.4rem 2rem; background: var(--gold3); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; }
.wp-block-code { background: rgba(0,0,0,.4); border: 1px solid var(--border2); border-radius: var(--radius); padding: 1.5rem; font-family: var(--mono); }

/* Responsive */
@media (max-width: 768px) {
    html { font-size: 16px; }
    .hero { padding: 8rem 1.2rem 4rem; }
    .hero-stats { gap: 1.8rem; }
}
