:root {
    --accent: #355f8a;            /* restrained, low-saturation blue — used sparingly */
    --accent-strong: #213f5e;
    --warn: #8a6d12;
    --warn-bg: rgba(224, 179, 65, 0.10);
    --warn-border: rgba(180, 140, 30, 0.35);

    --bg-deep: #ffffff;
    --bg-surface: #fafafa;
    --bg-surface-hover: #f3f3f1;
    --border: rgba(17, 24, 28, 0.10);
    --border-hover: rgba(17, 24, 28, 0.22);

    --text-primary: #16191d;
    --text-body: #36404a;
    --text-soft: #4b5560;
    --secondary: #5b646e;
    --text-dim: #8b929b;

    --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', 'Share Tech Mono', monospace;
    --radius: 10px;
    --maxw: 880px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-body);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 3rem 1.5rem 5rem;
    position: relative;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Backdrop kept neutral / flat */
.bg-ambient {
    display: none;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--accent-strong);
}

main {
    max-width: var(--maxw);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ── SITE HEADER ────────────────────────────────────────── */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding-bottom: 1.5rem;
    margin-bottom: 2.75rem;
    border-bottom: 1px solid var(--border);
}

.identity {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.identity-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.identity-text .name {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.identity-text .role {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.identity-text .role a {
    color: var(--text-soft);
}

.identity-text .role a:hover {
    color: var(--accent);
}

.site-nav {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.site-nav a {
    color: var(--text-soft);
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

/* ── LEDE / INTRO ───────────────────────────────────────── */
.lede {
    color: var(--text-soft);
}

.lede p {
    font-size: 1rem;
    line-height: 1.65;
}

.lede p + p {
    margin-top: 1rem;
}

.lede a {
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-hover);
    transition: border-color 0.15s ease, color 0.15s ease;
}

.lede a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ── SECTIONS ───────────────────────────────────────────── */
section {
    margin-bottom: 3.5rem;
    scroll-margin-top: 1.5rem;
}

h2 {
    font-family: var(--font-body);
    color: var(--text-dim);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--border);
}

/* ── CONTACT GRID ───────────────────────────────────────── */
dl.bio-list {
    display: grid;
    gap: 0.6rem;
}

dl.contact-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.bio-item {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.8rem 1.05rem;
    display: flex;
    flex-direction: column;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.bio-item:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-hover);
}

dt {
    color: var(--text-dim);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

dd {
    color: var(--text-primary);
    font-size: 0.92rem;
    word-break: break-word;
}

dd a {
    color: var(--accent);
}

dd a:hover {
    color: var(--accent-strong);
}

/* ── TALKS & PAPERS (timeline rows) ─────────────────────── */
dl.presentation-list {
    display: block;
    border-top: 1px solid var(--border);
}

dl.presentation-list .bio-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.5rem;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: 0.7rem 0.25rem;
    transition: background 0.15s ease;
}

dl.presentation-list .bio-item:hover {
    background: var(--bg-surface);
}

dl.presentation-list dt {
    font-family: var(--font-body);
    font-size: 0.98rem;
    color: var(--text-primary);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    flex: 1;
    margin-bottom: 0;
}

dl.presentation-list dt a {
    color: var(--text-primary);
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}

dl.presentation-list dt a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

dl.presentation-list dd {
    font-size: 0.82rem;
    color: var(--text-dim);
    text-align: right;
    flex-shrink: 0;
    min-width: 190px;
    word-break: normal;
}

dl.presentation-list dd a {
    color: var(--text-dim);
}

dl.presentation-list dd a:hover {
    color: var(--accent);
}

/* ── SCAM / IMPERSONATION NOTE (kept prominent) ─────────── */
.warning-text {
    color: var(--warn);
    border: 1px solid var(--warn-border);
    border-left: 3px solid var(--warn);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.75rem;
    font-size: 0.88rem;
    background: var(--warn-bg);
    line-height: 1.6;
}

.e-at::after {
    content: "@";
}

.e-dot::after {
    content: ".";
}

@media (max-width: 768px) {
    body {
        padding: 2rem 1.1rem 3.5rem;
    }

    .site-header {
        gap: 1rem;
    }

    .site-nav {
        gap: 1.25rem;
        width: 100%;
    }

    .lede {
        font-size: 1.05rem;
        margin-bottom: 2.5rem;
    }

    dl.presentation-list .bio-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
        padding: 0.7rem 0.25rem;
    }

    dl.presentation-list dd {
        text-align: left;
        min-width: 0;
        color: var(--secondary);
    }

    dl.presentation-list dd a {
        color: var(--secondary);
    }
}

/* ── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(17, 24, 28, 0.18);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(17, 24, 28, 0.30);
}

/* ── POSTS / SOCIAL (other pages) ───────────────────────── */
ul.posts {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

img.social-avatar {
    width: 48px;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 8px;
    float: left;
    margin: 0px 15px 15px 0px;
}

div.social-name {
    padding-top: 8px;
}

div.social-name a {
    text-decoration: none;
    font-weight: 600;
    color: var(--text-primary);
}

div.social-date {
    color: var(--text-dim);
    font-size: 0.85rem;
    float: right;
}

div.social-date a {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: normal;
}

div.social-date a:hover {
    color: var(--accent);
}

div.social-actions {
    text-align: right;
    font-size: 0.78rem;
    padding: 0.25rem;
}

div.social-actions a {
    color: var(--text-dim);
    text-decoration: none;
}

div.social-actions a:hover {
    color: var(--accent);
}

div.post.on-list {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin: 1.5rem auto;
    max-width: var(--maxw);
    overflow-wrap: break-word;
    background: var(--bg-deep);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

div.post.on-list:hover {
    border-color: var(--border-hover);
    box-shadow: 0 2px 16px rgba(17, 24, 28, 0.05);
}

.footer {
    font-size: 0.78rem;
    color: var(--text-dim);
    text-align: center;
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.pagination {
    text-align: center;
    margin-bottom: 4rem;
}

.pagination__buttons {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Fieldset for single posts */
fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin: 0 auto;
    max-width: var(--maxw);
    background: var(--bg-deep);
}

fieldset legend {
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    padding: 0 0.5rem;
    color: var(--text-dim);
}

fieldset legend a {
    color: var(--text-dim);
}

fieldset legend a:hover {
    color: var(--accent);
}

.post-meta {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.post-tags a {
    font-size: 0.82rem;
    color: var(--text-dim);
}

.post-tags a:hover {
    color: var(--accent);
}

.post-content {
    line-height: 1.8;
    color: var(--text-body);
}

.post-content h2 {
    margin-top: 2rem;
    display: block;
    color: var(--text-primary);
    font-family: var(--font-head);
    font-size: 1.25rem;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.post-content img {
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin: 1rem 0;
}

.post-content code {
    background: #f1f1ef;
    padding: 0.15em 0.4em;
    font-size: 0.85em;
    border-radius: 4px;
    color: var(--accent-strong);
    font-family: var(--font-mono);
}

.post-content pre {
    background: #f7f7f5;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

.post-content blockquote {
    border-left: 3px solid var(--border-hover);
    padding-left: 1rem;
    color: var(--secondary);
    margin: 1rem 0;
}

.nav {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    color: var(--text-dim);
}

.nav a {
    color: var(--text-dim);
}

.nav a:hover {
    color: var(--accent);
}

.read-more {
    font-size: 0.85rem;
    font-weight: 500;
}

.post-title a {
    color: var(--text-primary);
    transition: color 0.15s;
}

.post-title a:hover {
    color: var(--accent);
}
