/* ---- Design tokens ---- */
:root {
    --color-bg: #fafaf8;
    --color-text: #1c1c1a;
    --color-text-muted: #59564f;
    --color-accent: #b1490f;
    --color-border: #dedad0;

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-serif: Georgia, "Times New Roman", serif;

    --container-width: 720px;
}

/* ---- Reset ---- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 17px;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--color-accent);
    text-decoration: underline;
    text-decoration-color: #b1490f66;
    text-underline-offset: 2px;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Header / nav ---- */
.site-header {
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-top: 22px;
    padding-bottom: 22px;
}

.brand {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.site-nav {
    display: flex;
    gap: 24px;
}

.site-nav a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

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

/* ---- Main content ---- */
main.container {
    padding-top: 56px;
    padding-bottom: 88px;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text);
}

h1 {
    font-size: 2.1rem;
    margin: 0 0 10px;
}

h3 {
    font-weight: 400;
    font-family: var(--font-sans);
    color: var(--color-text-muted);
    font-size: 1.05rem;
    margin: 0 0 8px;
    max-width: 52ch;
}

p {
    color: var(--color-text-muted);
    margin: 0 0 20px;
    max-width: 60ch;
}

hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 40px 0;
}

/* ---- Hero (home page) ---- */
.hero {
    padding: 8px 0 0;
}

.hero .eyebrow {
    display: block;
    color: var(--color-accent);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

/* ---- About page layout ---- */
.about-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    margin-bottom: 32px;
}

.about-photo img {
    width: 128px;
    height: 128px;
    object-fit: cover;
    border-radius: 50%;
}

.about-body h1 {
    margin-bottom: 6px;
}

.about-body .subtitle {
    color: var(--color-text-muted);
    margin: 0;
}

.about-text p {
    max-width: 62ch;
}

@media (max-width: 560px) {
    .about-layout {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* ---- Resume page ---- */
.resume-header {
    margin-bottom: 8px;
    text-align: center;
}

.resume-contact {
    font-size: 0.95rem;
    margin: 0 auto;
    text-align: center;
}

.resume-contact .sep {
    color: var(--color-border);
    margin: 0 4px;
}

.resume-section {
    margin-top: 40px;
}

.resume-section > h2 {
    font-size: 1.3rem;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 20px;
}

.skill-group {
    margin-bottom: 18px;
}

.skill-group h3 {
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    max-width: none;
    margin-bottom: 6px;
}

.skill-group p {
    max-width: none;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.job {
    margin-bottom: 28px;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}

.job-header h3 {
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--color-text);
    font-size: 1.1rem;
    max-width: none;
    margin: 0;
}

.job-dates {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.job-meta {
    font-style: italic;
    font-size: 0.95rem;
    margin: 2px 0 12px;
    max-width: none;
}

.bullets {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.bullets li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    max-width: none;
    color: var(--color-text-muted);
}

.bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
}

.bullets li strong {
    color: var(--color-text);
}

.pub-list li {
    margin-bottom: 14px;
}

.pub-note {
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 4px;
}

/* ---- Footer ---- */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 24px 0;
}

.site-footer p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ---- Projects ---- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.project-card {
    text-decoration: none;
    color: inherit;
}

.project-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.project-card h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

/* ---- CV page: numbered lists (publications, presentations) ---- */
.cv-list {
    list-style: decimal;
    padding-left: 22px;
    margin: 0;
}

.cv-list li {
    margin-bottom: 14px;
    max-width: none;
    color: var(--color-text-muted);
}

.cv-list li::marker {
    color: var(--color-accent);
    font-weight: 600;
}

/* ---- CV page: year-prefixed entries (fellowships, mentoring, teaching, service) ---- */
.year-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.year-list li {
    display: flex;
    gap: 16px;
    margin-bottom: 10px;
    max-width: none;
    color: var(--color-text-muted);
}

.year-list .year {
    flex: 0 0 90px;
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.year-list .entry-title {
    color: var(--color-text);
    font-weight: 600;
    display: block;
}

.year-list .entry-meta {
    font-size: 0.9rem;
    font-style: italic;
    display: block;
}

.sub-bullets {
    list-style: none;
    margin: 8px 0 0 20px;
    padding: 0;
}

.sub-bullets li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 6px;
    max-width: none;
}

.sub-bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-text-muted);
}
