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

:root {
    --bg:        #f9f9f7;
    --bg2:       #f1f1ef;
    --ink:       #18181a;
    --ink2:      #3c3c40;
    --gold:      #3a6b9e;
    --gold-lt:   #5b8fc2;
    --border:    rgba(24,24,26,0.10);
    --sidebar-w: 256px;
    --serif:     'EB Garamond', Georgia, serif;
    --mono:      'DM Mono', 'Courier New', monospace;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 18px;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── SIDEBAR ──────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink2);
    display: flex;
    flex-direction: column;
    padding: 48px 28px 40px;
    position: fixed;
    top: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.35s ease;
}

.sidebar-photo {
    width: 180px;
    height: 180px;
    border-radius: 4px;
    object-fit: cover;
    margin-bottom: 20px;
    display: block;
}

.sidebar-name {
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.3;
    margin-bottom: 5px;
}

.sidebar-title {
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 300;
    color: var(--ink2);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 28px;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 40px;
}

.sidebar-links a {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--ink2);
    text-decoration: none;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.sidebar-links a:hover { color: var(--gold-lt); }

.sidebar-links a svg {
    width: 13px; height: 13px; flex-shrink: 0;
    fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
}

/* NAV */
nav { margin-top: auto; }

nav a {
    display: block;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink2);
    text-decoration: none;
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.07);
    transition: color 0.2s, padding-left 0.2s;
    cursor: pointer;
}

nav a:last-child { border-bottom: 1px solid rgba(255,255,255,0.07); }

nav a:hover { color: var(--gold-lt); padding-left: 6px; }

nav a.active {
    color: var(--gold);
    padding-left: 6px;
}

/* BURGER */
.burger {
    display: none;
    position: fixed;
    top: 16px; left: 16px;
    z-index: 200;
    width: 40px; height: 40px;
    background: var(--ink);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px;
}

.burger span {
    display: block;
    width: 20px; height: 1.5px;
    background: var(--bg);
    transition: 0.3s;
}

.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); }

/* ── MAIN ─────────────────────────────────── */
.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 60px 68px 80px;
    max-width: 820px;
}

/* ── SECTIONS ─────────────────────────────── */
.section {
    display: none;
    animation: fadeUp 0.45s ease both;
}

.section.active { display: block; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── TYPOGRAPHY ───────────────────────────── */
.page-label {
    font-family: var(--mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 14px;
    display: block;
}

h1.page-heading {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin-bottom: 28px;
    color: var(--ink);
}

h2.section-heading {
    font-size: 1rem;
    font-weight: 500;
    /* font-style: italic; */
    color: var(--ink2);
    margin: 44px 0 16px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--border);
}

h2.section-heading:first-of-type { margin-top: 0; }

p { margin-bottom: 1em; color: var(--ink2); }
p:last-child { margin-bottom: 0; }

/* ── ABOUT INTERESTS ──────────────────────── */
.interests-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 32px;
}

.interest-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    border-radius: 2px;
    padding: 22px 20px;
}

.interest-card-title {
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 14px;
}

.interest-card ul {
    list-style: none;
    padding: 0;
}

.interest-card ul li {
    font-size: 0.9rem;
    color: var(--ink2);
    line-height: 1.5;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.interest-card ul li:last-child { border-bottom: none; }

.interest-card ul li::before {
    content: '';
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
}

.hobbies-row {
    margin-top: 28px;
    font-size: 0.92rem;
    color: var(--ink2);
    font-style: italic;
    line-height: 1.6;
}

/* ── PUB LIST ─────────────────────────────── */
.pub-list { list-style: none; padding: 0; }

.pub-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pub-item:last-child { border-bottom: none; }

.pub-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.4;
}

.pub-meta {
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 300;
    color: var(--ink2);
    letter-spacing: 0.03em;
}

.pub-links { display: flex; gap: 10px; margin-top: 4px; }

.pub-link {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
    border: 1px solid rgba(58,107,158,0.4);
    padding: 2px 7px;
    border-radius: 2px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pub-link:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}

/* ── TEACHING LIST ────────────────────────── */
.teaching-list { list-style: none; padding: 0; }

.teaching-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.teaching-item:last-child { border-bottom: none; }

.teaching-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--ink);
}

.teaching-meta {
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 300;
    color: var(--ink2);
}

.teaching-link {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
    margin-top: 2px;
    display: inline-block;
}

.teaching-link:hover { text-decoration: underline; }

/* ── SOFTWARE CARDS ───────────────────────── */
.software-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.sw-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-left: 3px solid transparent;
    border-radius: 2px;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-left-color 0.2s, box-shadow 0.2s;
}

.sw-card:hover {
    border-left-color: var(--gold);
    box-shadow: 0 2px 12px rgba(58,107,158,0.08);
}

.sw-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
}

.sw-card-desc {
    font-size: 0.87rem;
    color: var(--ink2);
    line-height: 1.55;
    flex: 1;
}

.sw-card-year {
    font-family: var(--mono);
    font-size: 0.63rem;
    font-weight: 300;
    color: var(--ink2);
    letter-spacing: 0.05em;
}

.sw-card-link {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.sw-card-link:hover { text-decoration: underline; }

/* ── FOOTER LINE ──────────────────────────── */
.page-foot {
    margin-top: 56px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    font-family: var(--mono);
    font-size: 0.6rem;
    color: var(--ink2);
    letter-spacing: 0.05em;
    opacity: 0.7;
}

/* ── OVERLAY ──────────────────────────────── */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 90;
}

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 900px) {
    .interests-grid,
    .software-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .sidebar {
    transform: translateX(-100%);
    width: 260px;
    }

    .sidebar.open { transform: translateX(0); }

    .main {
    margin-left: 0;
    padding: 72px 28px 60px;
    }

    .burger { display: flex; }
    .overlay.open { display: block; }
}
