/* =========================
   Root & reset
========================= */

:root {
    --bg: #f3f1ec;
    --panel: rgba(255,255,255,0.95);
    --text: #1f2933;
    --muted: #4b5563;
    --icon: #2f4f6f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Source Sans 3', system-ui, sans-serif;
    background: linear-gradient(180deg, #ebe7df, #f6f4ef);
    color: var(--text);
}

/* =========================
   Header
========================= */

header {
    position: relative; /* anchor nav overlay */
    background: linear-gradient(180deg, #ebe7df, #f6f4ef);
    padding: 2.5rem 1.5rem;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-photo {
    width: 120px;
    height: 160px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid rgba(0,0,0,0.15);
}

.header-text h1 {
    margin: 0;
    font-family: 'IM Fell DW Pica SC', serif;
    font-size: 2.6rem;
    font-weight: 400;
    letter-spacing: 0.2em;
}

.page-subtitle {
    margin-top: 0.5rem;
    font-family: 'IM Fell DW Pica', serif;
    font-size: 1.05rem;
    color: var(--muted);
}




/* =========================
   Navigation (burger only)
========================= */

.nav-wrapper {
    position: relative; /* anchor for dropdown */
}

.nav-toggle {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 1001;
}

/* overlay menu */
.site-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 260px;
    background: rgba(243, 241, 236, 0.97);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.15);
    transform: translateY(-15px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.nav-links {
    list-style: none;
    padding: 1.25rem 1.5rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-links a {
    font-family: 'IM Fell DW Pica', serif;
    font-size: 1.2rem;
    text-decoration: none;
    color: var(--text);
}

.nav-links a.active {
    border-bottom: 2px solid var(--icon);
}

@media (max-width: 700px) {

    .header-inner {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
        text-align: center;
    }

    .header-left {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .header-photo {
        width: 110px;
        height: 145px;
    }

    .header-text h1 {
        font-size: 2.2rem;
        letter-spacing: 0.15em;
    }

    .nav-wrapper {
        align-self: center;
    }
	
	.site-nav {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-15px);
    }

    .site-nav.open {
        transform: translateX(-50%) translateY(0);
    }
}

/* =========================
   Main content
========================= */

main {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem 1.5rem 2.5rem;
}

/* Cards grid */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--panel);
    border-radius: 14px;
    padding: 2rem 2rem 2.5rem;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 8px 26px rgba(0,0,0,0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.1);
}

.card h2 {
    font-family: 'IM Fell DW Pica', serif;
    font-size: 1.8rem;
    font-weight: 400;
}

.icon {
    font-size: 2rem;
    color: var(--icon);
}

/* =========================
   Page body text
========================= */

.page-body h2 {
    font-family: 'IM Fell DW Pica', serif;
    font-size: 1.8rem;
    font-weight: 400;
}

/* =========================
   Personal page list
========================= */

.profile-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    max-width: 700px;
}

.profile-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.profile-list i {
    font-size: 1.8rem;
    color: var(--icon);
    margin-top: 0.15rem;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.profile-list li > div {
    display: flex;
    flex-direction: column;
}

.profile-list a {
    font-family: 'IM Fell DW Pica', serif;
    font-size: 1.15rem;
    text-decoration: none;
    color: var(--text);
    position: relative;
    width: fit-content;
}

.profile-list a::after {
    content: '';
    display: block;
    height: 2px;
    background: var(--icon);
    width: 0;
    transition: width 0.25s ease;
}

.profile-list p {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.4;
}

.profile-list li:hover i {
    color: var(--icon);
}

.profile-list li:hover a::after {
    width: 100%;
}


/* =========================
   Academic lists
========================= */

.academic-section {
    margin-bottom: 3rem;
}

.academic-section h2 {
    font-family: 'IM Fell DW Pica', serif;
    font-weight: 400;
    margin-bottom: 1rem;
}

.academic-list {
    list-style: none;
    padding: 0;
}

.academic-list li {
    margin-bottom: 0.75rem;
}

.academic-list a {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text);
}

.academic-list i {
    color: var(--icon);
    font-size: 0.95rem;
}

@media (min-width: 900px) {

    .profile-list,
    .academic-list {
        margin-left: 3rem;
        max-width: 800px;
    }

}

/* =========================
   Footer
========================= */

footer {
    text-align: center;
    padding: 2rem 1rem 3rem;
    font-family: 'IM Fell DW Pica SC', serif;
    color: var(--muted);
}

footer a {
    text-decoration: none;
    color: var(--muted);
}
