/* ── Variables ── */
:root {
    --bg:          #0d0b0b;
    --bg-subtle:   #141010;
    --border:      #261e1e;
    --text:        #cdc6c4;
    --text-muted:  #7a6a68;
    --text-dim:    #4a3a38;
    --heading:     #ede8e7;
    --accent:      #9b2335;
    --accent-dim:  #3d0e16;
    --accent-warm: #c4553a;
    --code-bg:     #180f0f;

    --font-sans:  'IBM Plex Sans', sans-serif;
    --font-mono:  'IBM Plex Mono', monospace;
    --font-serif: 'IBM Plex Serif', serif;

    --max-w:      1100px;
    --max-w-text: 740px;
    --nav-h:      60px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}
img   { max-width: 100%; display: block; }
a     { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    background: rgba(13, 11, 11, 0.93);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}
.site-logo {
    font-family: var(--font-mono);
    font-size: .92rem;
    font-weight: 500;
    color: var(--heading);
    letter-spacing: -.02em;
    text-decoration: none;
    flex-shrink: 0;
}
.site-logo:hover { color: var(--accent); text-decoration: none; }
.logo-mark { color: var(--accent); margin-right: .15em; }

.nav-links {
    display: flex;
    align-items: stretch;
    gap: 0;
    position: relative;
    height: 100%;
}
.nav-indicator {
    position: absolute;
    bottom: 0;
    height: 2px;
    width: 0;
    background: var(--accent);
    border-radius: 2px 2px 0 0;
    opacity: 0;
    pointer-events: none;
    transition: transform .25s cubic-bezier(.4,0,.2,1),
                width    .25s cubic-bezier(.4,0,.2,1),
                opacity  .18s;
}
.nav-link {
    font-family: var(--font-mono);
    font-size: .78rem;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: lowercase;
    letter-spacing: .05em;
    padding: 0 .9rem;
    height: 100%;
    display: flex;
    align-items: center;
    transition: color .18s;
    white-space: nowrap;
}
.nav-link:hover  { color: var(--heading); text-decoration: none; }
.nav-link.active { color: var(--accent); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}
.nav-toggle span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--text-muted);
    border-radius: 2px;
    transition: transform .22s ease, opacity .18s, width .18s;
    transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Hero ── */
.reports-hero {
    padding: 5rem 2rem 4rem;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.reports-hero::before {
    content: '';
    position: absolute;
    top: -100px; right: -60px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(155,35,53,.09) 0%, transparent 70%);
    pointer-events: none;
}
.hero-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}
.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: .76rem;
    color: var(--accent);
    letter-spacing: .12em;
    text-transform: lowercase;
    margin-bottom: 1rem;
}
.reports-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 300;
    color: var(--heading);
    line-height: 1.2;
    letter-spacing: -.02em;
    margin-bottom: 1rem;
}
.hero-sub {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 560px;
    line-height: 1.8;
}

/* ── Report index grid ── */
.reports-index { padding: 3rem 2rem 5rem; }
.reports-inner  { max-width: var(--max-w); margin: 0 auto; }

.report-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.report-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: border-color .2s, background .2s;
    background: var(--bg-subtle);
}
.report-card:hover {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 4%, var(--bg-subtle));
    text-decoration: none;
    color: var(--text);
}

/* Thumbnail */
.report-card-img {
    width: 100%;
    aspect-ratio: 16/7;
    overflow: hidden;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.report-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.report-card:hover .report-card-img img { transform: scale(1.03); }
.report-card-img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}
.placeholder-glyph {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--accent-dim);
    opacity: .6;
}

/* Card body */
.report-card-body {
    padding: 1.5rem 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex: 1;
}

/* Date stamp */
.report-datestamp {
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
}

.report-card-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 300;
    color: var(--heading);
    line-height: 1.3;
    letter-spacing: -.01em;
}
.report-card-excerpt {
    font-size: .875rem;
    color: var(--text-muted);
    line-height: 1.65;
    flex: 1;
}
.report-read-more {
    font-family: var(--font-mono);
    font-size: .76rem;
    color: var(--accent);
    letter-spacing: .04em;
    margin-top: .25rem;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.page-link {
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--accent);
}
.page-info {
    font-family: var(--font-mono);
    font-size: .75rem;
    color: var(--text-dim);
}

/* ── Full report page ── */
.report-page { display: flex; flex-direction: column; }

.report-header {
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
    padding: 4rem 2rem 3rem;
}
.report-header-inner {
    max-width: var(--max-w-text);
    margin: 0 auto;
}
.report-datestamp--large {
    font-size: .8rem;
    letter-spacing: .16em;
    margin-bottom: 1.25rem;
}
.report-header h1 {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 300;
    color: var(--heading);
    line-height: 1.2;
    letter-spacing: -.02em;
    margin-bottom: 1rem;
}
.report-meta {
    font-family: var(--font-mono);
    font-size: .74rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.meta-sep { color: var(--border); }
.report-tag {
    background: var(--accent-dim);
    color: var(--accent);
    padding: .1em .5em;
    border-radius: 2px;
    font-size: .7rem;
}

.report-cover {
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    background: var(--bg);
}
.report-cover img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 0 0 3px 3px;
}

/* ── Report body (article content) ── */
.report-body-wrap {
    padding: 3.5rem 2rem 4rem;
}
.report-body {
    max-width: var(--max-w-text);
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text);
}

/* Headings */
.report-body h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--heading);
    margin: 2.5rem 0 .75rem;
    letter-spacing: -.01em;
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--border);
}
.report-body h3 {
    font-family: var(--font-mono);
    font-size: .82rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 2rem 0 .6rem;
}
.report-body h4 {
    font-family: var(--font-sans);
    font-size: .95rem;
    font-weight: 600;
    color: var(--heading);
    margin: 1.5rem 0 .4rem;
}

/* Body text */
.report-body p { margin-bottom: 1.25rem; }
.report-body a { color: var(--accent); }
.report-body a:hover { text-decoration: underline; }

/* Lists */
.report-body ul,
.report-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}
.report-body li { margin-bottom: .35rem; line-height: 1.7; }
.report-body li::marker { color: var(--accent); }

/* Nested lists */
.report-body ul ul,
.report-body ol ol,
.report-body ul ol,
.report-body ol ul {
    margin-top: .3rem;
    margin-bottom: .3rem;
}

/* Code */
.report-body code {
    font-family: var(--font-mono);
    font-size: .85em;
    background: var(--code-bg);
    color: var(--accent-warm);
    padding: .15em .4em;
    border-radius: 2px;
}
.report-body pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 3px;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    line-height: 1.6;
}
.report-body pre code {
    background: none;
    padding: 0;
    color: var(--text);
    font-size: .875rem;
}

/* Blockquote */
.report-body blockquote {
    border-left: 3px solid var(--accent);
    margin: 1.5rem 0;
    padding: .75rem 1.25rem;
    color: var(--text-muted);
    font-style: italic;
    background: var(--bg-subtle);
    border-radius: 0 3px 3px 0;
}

/* Tables */
.report-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: .9rem;
}
.report-body th,
.report-body td {
    text-align: left;
    padding: .6rem 1rem;
    border-bottom: 1px solid var(--border);
}
.report-body th {
    font-family: var(--font-mono);
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    background: var(--bg-subtle);
}
.report-body tr:hover td { background: var(--bg-subtle); }

/* Images in body */
.report-body img {
    border-radius: 3px;
    margin: 1.5rem 0;
    max-width: 100%;
    border: 1px solid var(--border);
}

/* ── Report footer nav ── */
.report-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-subtle);
    padding: 2rem;
}
.report-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.report-nav-link {
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--text-muted);
}
.report-nav-link:hover { color: var(--accent); text-decoration: none; }
.report-nav-link--right { margin-left: auto; }
.back-link {
    font-family: var(--font-mono);
    font-size: .78rem;
    color: var(--text-dim);
}
.back-link:hover { color: var(--accent); text-decoration: none; }

/* ── Archive page ── */
.archive-page {
    padding: 4rem 2rem 6rem;
}
.archive-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 300;
    color: var(--heading);
    margin-bottom: 2.5rem;
    letter-spacing: -.02em;
}
.archive-list { list-style: none; }
.archive-item {
    display: flex;
    gap: 2rem;
    align-items: baseline;
    padding: .8rem 0;
    border-bottom: 1px solid var(--border);
}
.archive-item:first-child { border-top: 1px solid var(--border); }
.archive-item time {
    font-family: var(--font-mono);
    font-size: .75rem;
    color: var(--accent);
    white-space: nowrap;
    letter-spacing: .06em;
    text-transform: uppercase;
    min-width: 110px;
}
.archive-item a { color: var(--heading); font-size: .95rem; }
.archive-item a:hover { color: var(--accent); text-decoration: none; }

/* ── Site footer ── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 3rem 2rem 2rem;
    background: var(--bg-subtle);
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-title {
    font-family: var(--font-mono);
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--heading);
    display: block;
    margin-bottom: .6rem;
}
.footer-col p  { font-size: .88rem; color: var(--text-muted); line-height: 1.7; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .35rem; }
.footer-col ul a { font-size: .88rem; color: var(--text-muted); }
.footer-col ul a:hover { color: var(--accent); }
.footer-bottom {
    max-width: var(--max-w);
    margin: 0 auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--text-dim);
}
.footer-bottom a { color: var(--text-dim); }
.footer-bottom a:hover { color: var(--accent); text-decoration: none; }

.no-posts {
    font-family: var(--font-mono);
    font-size: .85rem;
    color: var(--text-dim);
    padding: 4rem 0;
    text-align: center;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .report-grid   { grid-template-columns: 1fr; }
    .footer-inner  { grid-template-columns: 1fr; }
    .archive-item  { flex-direction: column; gap: .2rem; }

    /* Mobile nav */
    .nav-toggle { display: flex; }
    .nav-links {
        position: absolute;
        top: var(--nav-h);
        left: 0; right: 0;
        height: auto;
        flex-direction: column;
        background: rgba(13, 11, 11, 0.97);
        border-bottom: 1px solid var(--border);
        backdrop-filter: blur(12px);
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        transition: max-height .32s cubic-bezier(.4,0,.2,1),
                    opacity    .24s ease;
        pointer-events: none;
    }
    .nav-links.open {
        max-height: 320px;
        opacity: 1;
        pointer-events: auto;
    }
    .nav-indicator { display: none; }
    .nav-link {
        height: auto;
        padding: .8rem 2rem;
        border-bottom: 1px solid var(--border);
        font-size: .85rem;
    }
    .nav-link:last-child { border-bottom: none; }
}
