/* Typography inspired by https://kuntalg97.github.io/phd-defense/.
 * One independent layer, loaded last, so the font experiment is reversible.
 * Fraunces: headings; IBM Plex Sans: reading/UI; IBM Plex Mono: small details.
 */
:root {
    --font-reading: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-detail: 'IBM Plex Mono', 'Consolas', monospace;
}

body,
button,
input,
select,
textarea {
    font-family: var(--font-reading);
}

body {
    font-size: 1.08rem;
    line-height: 1.7;
}

.profile-info h1,
.page-section h2,
.page-section h3,
.page-section .entry-title,
.erdos-modal-content h3,
.bibtex-modal-content h3 {
    font-family: var(--font-heading);
    font-optical-sizing: auto;
    font-weight: 500;
    letter-spacing: -0.018em;
}

.profile-info h1 {
    font-size: 2.2rem;
    line-height: 1.14;
}

.orbit-name-trigger {
    font-family: inherit;
}

.page-section h2 {
    font-size: 2.15rem;
    font-weight: 400;
    line-height: 1.2;
}

.page-section h3 {
    font-size: 1.45rem;
    line-height: 1.35;
}

.page-section p,
.page-section li {
    font-size: 1.1rem;
    line-height: 1.75;
    letter-spacing: normal;
}

.entry-title,
.page-section .entry-title {
    font-size: 1.3rem;
    line-height: 1.45;
    letter-spacing: -0.01em;
}

.entry-desc,
.page-section .entry-desc {
    font-size: 1.02rem;
    line-height: 1.65;
}

.contact-details,
.contact-details p {
    font-size: 0.96rem;
    line-height: 1.65;
}

.nav-link,
.sidebar .nav-menu .nav-link {
    font-family: var(--font-reading);
    font-size: 1.14rem;
    font-weight: 500;
    letter-spacing: 0.005em;
}

.abstract-toggle,
.bibtex-toggle,
.arxiv-tab,
.human-checkbox-label,
.cv-download-link,
.erdos-btn {
    font-size: 0.85rem;
    font-weight: 500;
}

.entry-meta,
.page-section .entry-meta,
.teaching-table th,
.teaching-table td::before,
.teaching-term,
#page-teaching .teaching-current-role,
#page-teaching .teaching-current-term,
#page-ai-math .ai-math-date,
#page-ai-math .ai-math-control-label {
    font-family: var(--font-detail);
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.015em;
    font-variant-numeric: tabular-nums;
}

.teaching-table th,
.teaching-table td::before,
#page-teaching .teaching-current-role,
#page-ai-math .ai-math-control-label {
    font-weight: 500;
    letter-spacing: 0.045em;
}

.teaching-table td {
    font-size: 1rem;
    line-height: 1.6;
}

.teaching-table td.teaching-term {
    font-size: 0.82rem;
}

.bibtex-code,
.node-label {
    font-family: var(--font-detail);
}

.copyright {
    font-family: var(--font-reading);
    font-size: 0.8rem;
}

#page-ai-math .ai-math-resource h3,
#page-ai-math .ai-math-blogs h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 500;
}

#page-ai-math .ai-math-blog-list li {
    font-size: 1.07rem;
}

#page-ai-math .ai-math-metadata {
    font-size: 0.98rem;
}

@media (max-width: 900px) {
    .profile-info h1 {
        font-size: 1.95rem;
    }

    .page-section h2 {
        font-size: 1.85rem;
    }

    .page-section h3 {
        font-size: 1.3rem;
    }

    .page-section p,
    .page-section li {
        font-size: 1.06rem;
        line-height: 1.7;
    }

    .entry-title,
    .page-section .entry-title,
    #page-ai-math .ai-math-resource h3,
    #page-ai-math .ai-math-blogs h3 {
        font-size: 1.2rem;
    }

    .nav-link,
    .sidebar .nav-menu .nav-link {
        font-size: 1.02rem;
    }
}

@media (max-width: 480px) {
    .profile-info h1 {
        font-size: 1.8rem;
    }

    .page-section h2 {
        font-size: 1.7rem;
    }

    .entry-meta,
    .page-section .entry-meta {
        font-size: 0.8rem;
    }
}
