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

:root {
    --ink: #14213d;
    --text: #243045;
    --muted: #5d687b;
    --paper: #fffdf8;
    --wash: #f4f1e8;
    --line: #d9d2c3;
    --accent: #8f2d2d;
    --accent-dark: #6f1f1f;
    --green: #2f6f5e;
    --white: #ffffff;
    --shadow: 0 18px 38px rgba(20, 33, 61, 0.09);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--paper);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
    overflow-x: hidden;
}

a {
    color: inherit;
}

.container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 253, 248, 0.95);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.site-header nav {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-brand {
    color: var(--ink);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.18rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

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

.nav-icons svg {
    width: 20px;
    height: 20px;
}
.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    flex-wrap: wrap;
}

.nav-links a {
    border-radius: 6px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1;
    padding: 10px 12px;
    text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--accent);
    outline: none;
}

.nav-links a[aria-current="page"] {
    background: var(--wash);
    color: var(--accent);
}

.hero {
    border-bottom: 1px solid var(--line);
    padding: 96px 0 76px;
}

.hero-grid {
    align-items: center;
    display: grid;
    gap: 56px;
    grid-template-columns: minmax(0, 1fr) 380px;
}

.eyebrow {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 12px;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    color: var(--ink);
    font-family: "Source Serif 4", Georgia, serif;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.12;
}

h1 {
    font-size: clamp(3rem, 7vw, 5.8rem);
    margin-bottom: 20px;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 18px;
}

h3 {
    font-size: 1.22rem;
}

.lead {
    color: var(--ink);
    font-size: clamp(1.22rem, 2vw, 1.55rem);
    font-weight: 600;
    line-height: 1.45;
    max-width: 760px;
}

.hero-summary {
    color: var(--muted);
    font-size: 1.04rem;
    margin-top: 20px;
    max-width: 740px;
}

.page-hero {
    border-bottom: 1px solid var(--line);
    padding: 86px 0 58px;
}

.page-hero h1 {
    margin-bottom: 18px;
}

.page-hero .lead {
    max-width: 880px;
}

.profile-panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 24px;
    text-align: center;
}

.profile-photo {
    width: 100%;
    max-width: 280px;   /* control size here */
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 24px; 
}
.profile-facts {
    display: grid;
    gap: 14px;
}

.profile-facts div {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 4px;
    padding-top: 12px;
}

.profile-facts dt {
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.profile-facts dd {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
}

.section {
    padding: 82px 0;
    scroll-margin-top: 96px;
}

.section.muted {
    background: var(--wash);
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
}

.two-column {
    display: grid;
    gap: 54px;
    grid-template-columns: 280px minmax(0, 1fr);
}

.section-heading {
    align-self: start;
    position: sticky;
    top: 104px;
}

.section-heading h2 {
    margin-bottom: 0;
}

.content-stack {
    display: grid;
    gap: 24px;
}

.section-lead {
    color: var(--text);
    font-size: 1.13rem;
    font-weight: 500;
    max-width: 780px;
}

.interest-grid,
.skills-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.interest-grid article,
.skills-grid article,
.overview-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
}

.interest-grid p,
.skills-grid p,
.overview-card p {
    color: var(--muted);
    margin-top: 8px;
}

.overview-card a {
    color: var(--accent);
    display: inline-flex;
    font-size: 0.92rem;
    font-weight: 700;
    margin-top: 18px;
    text-decoration: none;
}

.overview-card a:hover,
.overview-card a:focus-visible {
    color: var(--accent-dark);
    text-decoration: underline;
    outline: none;
}

.entry,
.project {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.entry p,
.project p {
    color: var(--muted);
    margin-top: 8px;
}

.entry {
    padding: 24px;
}

.entry-header {
    align-items: start;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.entry-header p {
    color: var(--green);
    font-size: 0.96rem;
    font-weight: 700;
    margin-top: 4px;
}

.entry-header span,
.project-meta {
    color: var(--muted);
    flex: 0 0 auto;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: right;
}

.detail-list {
    display: grid;
    gap: 9px;
    list-style: none;
    margin-top: 14px;
}

.detail-list li {
    color: var(--muted);
    padding-left: 18px;
    position: relative;
}

.detail-list li::before {
    background: var(--accent);
    border-radius: 50%;
    content: "";
    height: 5px;
    left: 0;
    position: absolute;
    top: 0.68em;
    width: 5px;
}

.coursework {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-list span {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 8px 11px;
}

.tag-list a {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 8px 11px;
    text-decoration: none;
}

.tag-list a:hover,
.tag-list a:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    outline: none;
}

.tag-list.compact span {
    background: var(--wash);
    font-size: 0.8rem;
    padding: 7px 10px;
}

.timeline,
.project-list {
    display: grid;
    gap: 18px;
}

.project {
    display: grid;
    gap: 24px;
    grid-template-columns: 118px minmax(0, 1fr);
    padding: 24px;
}

.project h3 {
    margin-bottom: 8px;
}

.project-links {
    margin-top: 14px;
}

.project-links a {
    color: var(--accent);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.project-links a:hover,
.project-links a:focus-visible {
    color: var(--accent-dark);
    text-decoration: underline;
    outline: none;
}

.profile-facts dd a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.profile-facts dd a:hover,
.profile-facts dd a:focus-visible {
    color: var(--accent-dark);
    text-decoration: underline;
    outline: none;
}

.currently-list {
    margin-top: 0;
}

.theme {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
}

.theme + .theme {
    margin-top: 4px;
}

.theme-label {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.theme h3 {
    font-size: 1.55rem;
    margin-bottom: 14px;
}

.theme > p {
    color: var(--text);
    margin-top: 0;
    margin-bottom: 14px;
}

.theme-project {
    background: var(--wash);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    margin-top: 22px;
    padding: 20px 22px;
}

.theme-project h4 {
    color: var(--ink);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.12rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.theme-project p {
    color: var(--text);
    margin-top: 10px;
}

.theme-meta {
    color: var(--muted) !important;
    font-size: 0.88rem;
    font-weight: 600;
    margin-top: 0 !important;
    margin-bottom: 10px;
}

.theme-aside {
    color: var(--muted) !important;
    font-size: 0.92rem;
    font-style: italic;
}

.theme-links a {
    color: var(--accent);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.theme-links a:hover,
.theme-links a:focus-visible {
    color: var(--accent-dark);
    text-decoration: underline;
    outline: none;
}

.pub-group + .pub-group {
    margin-top: 28px;
}

.pub-group h3 {
    border-bottom: 1px solid var(--line);
    color: var(--accent);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
    padding-bottom: 8px;
    text-transform: uppercase;
}

.pub-list {
    display: grid;
    gap: 18px;
    list-style: none;
    padding: 0;
}

.pub-list li {
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    padding: 16px 18px;
}

.pub-authors {
    color: var(--text);
    font-size: 0.96rem;
    margin: 0 0 4px;
}

.pub-title {
    color: var(--ink);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.08rem;
    font-weight: 600;
    margin: 0 0 6px;
}

.pub-venue {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
}

.cv-embed {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    min-height: 720px;
    width: 100%;
}

.site-footer {
    background: #0f182c;
    color: rgba(255, 255, 255, 0.72);
    padding: 22px 0;
}

.site-footer .container {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.site-footer p {
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.footer-links a {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
    outline: none;
}

@media (max-width: 900px) {
    .site-header {
        position: static;
    }

    .site-header nav {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 14px 0;
    }

    .nav-links {
        justify-content: flex-start;
    }

    .section {
        scroll-margin-top: 16px;
    }

    .hero {
        padding: 58px 0 60px;
    }

    .page-hero {
        padding: 58px 0 48px;
    }

    .hero-grid {
        gap: 40px;
        grid-template-columns: 1fr;
    }

    .two-column,
    .contact-grid {
        gap: 32px;
        grid-template-columns: 1fr;
    }

    .profile-panel {
        margin: 0 auto;
        max-width: 420px;
    }

    .section-heading {
        position: static;
    }

    .theme {
        padding: 24px;
    }

    .theme-project {
        padding: 18px 20px;
    }

    .interest-grid,
    .skills-grid,
    .overview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .container {
        width: min(100% - 32px, 1120px);
    }

    .site-header nav {
        gap: 6px;
        padding: 10px 0;
    }

    .nav-brand {
        font-size: 1.05rem;
    }

    .nav-links {
        gap: 2px;
        width: 100%;
    }

    .nav-links a {
        font-size: 0.84rem;
        padding: 8px 8px;
    }

    h1 {
        font-size: clamp(2.4rem, 9vw, 3.6rem);
        margin-bottom: 14px;
    }

    h2 {
        font-size: clamp(1.7rem, 6vw, 2.4rem);
        margin-bottom: 14px;
    }

    .lead {
        font-size: 1.12rem;
    }

    .hero-summary {
        font-size: 0.98rem;
        margin-top: 16px;
    }

    .hero {
        padding: 40px 0 48px;
    }

    .page-hero {
        padding: 40px 0 42px;
    }

    .section {
        padding: 48px 0;
    }

    .section-lead {
        font-size: 1.02rem;
    }

    .project {
        gap: 14px;
        grid-template-columns: 1fr;
    }

    .project-meta {
        font-size: 0.8rem;
    }

    .entry-header {
        flex-direction: column;
        gap: 8px;
    }

    .entry-header span,
    .project-meta {
        text-align: left;
    }

    .entry,
    .project,
    .coursework,
    .interest-grid article,
    .skills-grid article {
        padding: 18px;
    }

    .theme {
        padding: 20px;
    }

    .theme h3 {
        font-size: 1.32rem;
    }

    .theme-project {
        margin-top: 18px;
        padding: 16px 18px;
    }

    .theme-project h4 {
        font-size: 1.04rem;
    }

    .pub-list li {
        padding: 14px 16px;
    }

    .pub-title {
        font-size: 1rem;
    }

    .cv-embed {
        min-height: 520px;
    }

    .profile-panel {
        padding: 16px;
    }

    .profile-photo {
        height: 200px;
        width: 200px;
    }

    .profile-facts {
        gap: 12px;
    }

    .site-footer .container {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 420px) {
    .container {
        width: min(100% - 24px, 1120px);
    }

    h1 {
        font-size: clamp(2.1rem, 10vw, 2.8rem);
    }

    .lead {
        font-size: 1.04rem;
    }

    .nav-links a {
        font-size: 0.8rem;
        padding: 7px 6px;
    }

    .theme,
    .pub-list li,
    .entry,
    .project,
    .coursework {
        border-radius: 6px;
    }

    .theme-project {
        padding: 14px 16px;
    }

    .tag-list span,
    .tag-list.compact span {
        font-size: 0.76rem;
        padding: 6px 9px;
    }

}
