/*
Theme Name: Deep In Chaos
Theme URI: https://deepinchaos.com
Author: deepinchaos
Description: A custom theme for Deep In Chaos — darkroom palette, typographic density, fragmented navigation.
Version: 1.0
*/

/* ─── FONTS ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=IBM+Plex+Mono:wght@400;500&family=IM+Fell+English:ital@0;1&display=swap');

/* ─── VARIABLES ──────────────────────────────────────── */
:root {
    --void:       #0d0b08;
    --darkroom:   #1c170e;
    --aged:       #3a2e1c;
    --amber-mid:  #8a6a2e;
    --safelight:  #c49a3c;
    --exposure:   #e8d5a3;
    --overburn:   #f5edcc;
    --accent:     #b8341a;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body:    'IM Fell English', Georgia, serif;
    --font-mono:    'IBM Plex Mono', monospace;
}

/* ─── RESET ──────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ─── BASE ───────────────────────────────────────────── */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--void);
    color: var(--exposure);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.9;
    min-height: 100vh;
}

/* ─── TYPOGRAPHY ─────────────────────────────────────── */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    color: var(--overburn);
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 3vw, 2rem); }

p {
    margin-bottom: 1.5rem;
    color: var(--exposure);
}

a {
    color: var(--safelight);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--overburn);
}

em { font-style: italic; }

strong {
    font-weight: 700;
    color: var(--overburn);
}

/* ─── LAYOUT ─────────────────────────────────────────── */
.site-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

main {
    padding: 4rem 0;
}

/* ─── HEADER ─────────────────────────────────────────── */
.site-header {
    border-bottom: 1px solid var(--aged);
    padding: 1.5rem 0;
}

.site-header .site-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--overburn);
    letter-spacing: -0.02em;
}

.site-title a {
    color: var(--overburn);
}

.site-title a:hover {
    color: var(--safelight);
}

nav ul {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li a {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--amber-mid);
}

nav ul li a:hover {
    color: var(--safelight);
}
nav a {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--amber-mid);
}

nav a:hover {
    color: var(--safelight);
}

/* ─── FOOTER ─────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--aged);
    padding: 2rem 0;
    margin-top: 4rem;
}

.site-footer p {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--aged);
    margin: 0;
}

/* ─── POSTS ──────────────────────────────────────────── */
article {
    margin-bottom: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--aged);
}

article:last-child {
    border-bottom: none;
}

.post-meta {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--amber-mid);
    margin-bottom: 1rem;
}

.post-meta .accent {
    color: var(--accent);
}

/* ─── STAMP ──────────────────────────────────────────── */
.stamp {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border: 1px solid var(--aged);
    padding: 2px 8px;
    color: var(--amber-mid);
    display: inline-block;
}

/* ─── SELECTION ──────────────────────────────────────── */
::selection {
    background: var(--accent);
    color: var(--overburn);
}
/* ─── HOMEPAGE LOOP ──────────────────────────────────── */
article h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin: 0.75rem 0 1rem;
}

article h2 a {
    color: var(--overburn);
}

article h2 a:hover {
    color: var(--safelight);
}

.excerpt {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.9;
    color: var(--amber-mid);
    max-width: 680px;
}

.excerpt p { color: var(--amber-mid); }
/* ─── SINGLE POST ────────────────────────────────────── */
.single-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 4rem;
    align-items: start;
    padding: 4rem 0;
}

.single-post h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    margin: 0.75rem 0 2rem;
    color: var(--overburn);
}

.single-content {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 2;
    color: var(--exposure);
    max-width: 660px;
}

.single-content p {
    margin-bottom: 1.75rem;
}

.single-content h2 {
    font-size: 1.6rem;
    margin: 2.5rem 0 1rem;
}

.single-content h3 {
    font-size: 1.2rem;
    margin: 2rem 0 0.75rem;
}

/* ─── ASIDE ──────────────────────────────────────────── */
.single-aside {
    position: sticky;
    top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    border-left: 1px solid var(--aged);
    padding-left: 2rem;
}

.aside-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--aged);
    margin-bottom: 0.5rem;
}

.aside-value {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--amber-mid);
    margin: 0;
}

.aside-block {
    display: flex;
    flex-direction: column;
}

/* ─── MOBILE SINGLE ──────────────────────────────────── */
@media (max-width: 768px) {
    .single-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .single-aside {
        border-left: none;
        border-top: 1px solid var(--aged);
        padding-left: 0;
        padding-top: 2rem;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.5rem;
    }
}
/* ─── NAV FIX ────────────────────────────────────────── */
nav, nav ul, nav div {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 2rem !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    position: static !important;
    float: none !important;
}

nav ul li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

nav ul li a {
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
    color: #8a6a2e !important;
    text-decoration: none !important;
}

nav ul li a:hover {
    color: #c49a3c !important;
}

nav ul li::before,
nav ul li::marker {
    display: none !important;
    content: none !important;
}
/* ─── HEADER FIX ─────────────────────────────────────── */
.site-header {
    padding: 1.25rem 1rem;
}

.site-header .site-wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 1rem;
}

.site-title {
    flex-shrink: 0;
    font-size: 1rem;
    white-space: nowrap;
}

.site-header nav {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 0.3rem !important;
}

.site-header nav ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 0.3rem !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.site-header nav ul li {
    list-style: none !important;
}

.site-header nav ul li::marker {
    display: none !important;
    content: '' !important;
}

/* ─── DATE FIX ───────────────────────────────────────── */
.post-meta {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* ─── DESKTOP NAV ────────────────────────────────────── */
@media (min-width: 768px) {
    .site-header nav {
        flex-direction: row !important;
        align-items: center !important;
        gap: 2rem !important;
    }

    .site-header nav ul {
        flex-direction: row !important;
        gap: 2rem !important;
    }
}
/* ─── HEADER REWRITE ─────────────────────────────────── */
.header-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
}

.main-nav {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8a6a2e;
    text-decoration: none;
}

.main-nav a:hover {
    color: #c49a3c;
}
.header-inner {
    align-items: flex-start;
}

.site-title {
    margin-bottom: 0.4rem;
}
/* ─── PAGE TEMPLATE ──────────────────────────────────── */
.page-layout {
    padding: 4rem 0;
    max-width: 720px;
}

.page-content h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    margin: 0.75rem 0 2.5rem;
    color: var(--overburn);
}
/* ─── LORENZ ATTRACTOR ───────────────────────────────── */
.attractor-section {
    width: 100%;
    height: 420px;
    background: #0d0b08 !important;
    border-bottom: 1px solid var(--aged);
    overflow: hidden;
}

#lorenz {
    width: 100%;
    height: 100%;
    display: block;
}
/* ─── LOGO ───────────────────────────────────────────── */
.logo-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    text-decoration: none;
}

.logo-link canvas {
    width: 60px;
    height: 45px;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    color: #b8341a;
    letter-spacing: 0.04em;
    text-align: center;
}
/* ─── LOGO OVERRIDE ──────────────────────────────────── */
a.logo-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.15rem !important;
    text-decoration: none !important;
}

a.logo-link canvas {
    width: 55px !important;
    height: 42px !important;
    display: block !important;
}

a.logo-link span.logo-text {
    display: block !important;
    font-family: 'Playfair Display', serif !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    color: #b8341a !important;
    letter-spacing: 0.05em !important;
    text-align: center !important;
    line-height: 1 !important;
}
.logo-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
}

.logo-text-link {
    text-decoration: none;
}
/* ─── LOGO BLOCK FINAL ───────────────────────────────── */
.logo-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.logo-block canvas {
    width: 55px;
    height: 42px;
    display: block;
}

.logo-block a.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 0.65rem;
    font-weight: 700;
    color: #b8341a;
    text-decoration: none;
    text-align: center;
    letter-spacing: 0.05em;
}
.logo-block a { color: #b8341a !important; }
.logo-block a, .logo-block a:visited, .logo-block a:hover {
    color: #b8341a !important;
    font-family: 'Playfair Display', serif !important;
    font-size: 0.65rem !important;
}