:root {
    --fg: #1a1a1a;
    --fg-muted: #555;
    --bg: #fdfcfa;
    --accent: #1a1a1a;
    --rule: #e5e2dc;
    --max: 640px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    padding: 0;
    font-family: ui-serif, Georgia, "Charter", "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--fg);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

main {
    max-width: var(--max);
    margin: 0 auto;
    padding: 4rem 1.5rem 3rem;
}

header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--rule);
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 0.3rem;
    letter-spacing: -0.01em;
}

.tagline {
    margin: 0;
    color: var(--fg-muted);
    font-size: 1rem;
}

h2 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-muted);
    margin: 2.5rem 0 0.75rem;
}

section.bio p,
section.teaching > p {
    margin: 0 0 1rem;
}

article.role,
article.course {
    margin: 1.5rem 0 0;
}

article.role h3,
article.course h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 0.2rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--fg);
}

article.role .meta {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: var(--fg-muted);
    font-style: italic;
}

article.role p,
article.course p {
    margin: 0;
}

section.links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

section.links li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--rule);
}

section.links li:last-child { border-bottom: none; }

a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover { text-decoration-thickness: 2px; }

footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
    color: var(--fg-muted);
    font-size: 0.9rem;
}

footer p { margin: 0; }

@media (max-width: 500px) {
    main { padding: 2.5rem 1.25rem 2rem; }
    h1 { font-size: 1.6rem; }
    body { font-size: 17px; }
}

@media print {
    body { background: #fff; font-size: 11pt; }
    main { max-width: none; padding: 0; }
    a { color: #000; text-decoration: none; }
    a[href^="http"]::after,
    a[href^="mailto"]::after { content: " (" attr(href) ")"; color: #555; font-size: 9pt; }
    a[href^="/"]::after { content: none; }
}
