/* ============================================================
   Import Fonts
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Merriweather:ital,wght@0,400;0,700;1,400&display=swap');

/* ============================================================
   CSS Variables
   ============================================================ */
:root {
    --primary:       #003049;   /* dark navy — main text, headings, nav brand */
    --primary-light: #669bbc;   /* steel blue — links, hover, accents */
    --highlight:     #780000;   /* deep red — highlight news, active nav */
    --accent:        #c1121f;   /* bright red — medals, dates, badges */
    --bg:            #fdf0d5;   /* warm cream — page background */
    --surface:       #fff8ec;   /* slightly lighter cream — cards */
    --border:        #e8d8b0;   /* warm tan — borders */
    --text:          #003049;   /* dark navy — body text */
    --text-muted:    #5a6e7a;   /* muted blue-grey — secondary text */
    --nav-bg:        #003049;   /* dark navy — header */
    --nav-border:    #002030;
    --nav-height:    62px;
    --max-width:     860px;
    --radius:        8px;
    --shadow:        0 1px 6px rgba(0,48,73,0.1);
    --transition:    0.18s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition);
}

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

.name-link {
    color: var(--highlight);
    text-decoration: none;
}

.name-link:hover {
    color: var(--highlight);
    text-decoration: underline;
}

/* ============================================================
   Navigation
   ============================================================ */
header {
    background: var(--nav-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--nav-border);
    box-shadow: none;
}

header nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-size: 1.08rem;
    font-weight: 700;
    color: #fdf0d5;
    letter-spacing: 0.01em;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2px;
}

nav ul li a {
    color: rgba(253,240,213,0.75);
    text-decoration: none;
    padding: 7px 15px;
    border-radius: 6px;
    font-size: 0.91rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}

nav ul li a:hover,
nav ul li a.active {
    background: none;
    color: #fdf0d5;
    text-decoration: none;
}

/* ============================================================
   Page Layout
   ============================================================ */
main {
    flex: 1;
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 24px 60px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ============================================================
   Section Card
   ============================================================ */
section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 34px;
    box-shadow: none;
}

/* ============================================================
   About Me — Hero Layout
   ============================================================ */
#about-me {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.about-avatar {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #003049 0%, #669bbc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    color: #fdf0d5;
    border: 3px solid var(--border);
    box-shadow: none;
}

.about-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.about-content { flex: 1; }

.about-content h1 {
    margin: 0 0 4px;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
}

.about-subtitle {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0 0 14px;
}

.about-content p {
    color: var(--text-muted);
    margin: 0 0 16px;
    font-size: 0.95rem;
}

.about-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.about-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.35rem;
    transition: color var(--transition), transform var(--transition);
    text-decoration: none;
}

.about-links a:hover {
    color: var(--primary-light);
    transform: translateY(-2px);
    text-decoration: none;
}

/* ============================================================
   Section Headings
   ============================================================ */
.section-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid var(--border);
}

.section-heading::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 1.1em;
    background: var(--primary-light);
    border-radius: 2px;
}

/* ============================================================
   News Items
   ============================================================ */
.news-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-item {
    font-size: 0.93rem;
    color: var(--text);
    line-height: 1.6;
}

.news-highlight {
    color: var(--highlight);
    font-weight: 500;
}

.news-highlight .news-date {
    color: var(--highlight);
}

.news-date {
    font-weight: 600;
    color: var(--text);
    min-width: 90px;
    flex-shrink: 0;
}

#news .section-heading {
    color: var(--primary);
}

#news .section-heading::before {
    background: var(--primary-light);
}

#research-interests .section-heading {
    color: var(--primary);
}

#research-interests .section-heading::before {
    background: var(--primary-light);
}

.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.interest-tag {
    background: #e8f0f5;
    color: var(--primary);
    border: 1px solid #669bbc;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.865rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}

.interest-tag:hover {
    background: var(--primary);
    color: #fdf0d5;
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* ============================================================
   Publications
   ============================================================ */
.pub-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pub-item {
    font-size: 0.93rem;
    color: var(--text);
    line-height: 1.6;
}

.pub-item a {
    color: var(--primary-light);
}

/* ============================================================
   Research Page
   ============================================================ */
.research-item p {
    color: var(--text);
    font-size: 0.94rem;
    margin: 0 0 12px;
    line-height: 1.75;
}

.research-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
    background: var(--primary);
    color: rgba(253,240,213,0.7);
    text-align: center;
    padding: 20px;
    font-size: 0.82rem;
    border-top: 1px solid var(--nav-border);
}

/* ============================================================
   Headings (fallback for pages not using classes)
   ============================================================ */
h1, h2, h3 { color: var(--text); line-height: 1.3; }
h1 { font-size: 1.6rem; margin: 0 0 16px; }
h2 { font-size: 1.15rem; margin: 0 0 16px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 620px) {
    #about-me { flex-direction: column; align-items: center; text-align: center; }
    .about-links { justify-content: center; }
    section { padding: 20px 16px; }
    nav ul li a { padding: 6px 10px; }
    .nav-brand { font-size: 0.95rem; }
}