:root {
    --max-width: 760px;
    --color-text: #222;
    --color-muted: #6b7280;
    --color-accent: #1d4e89;
    --color-border: #e5e7eb;
    --color-bg: #ffffff;
    --color-bg-soft: #f7f8fa;
    --color-tag-bg: #fff4e5;
    --color-tag-text: #b45309;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.65;
    margin: 0;
}

h1, h2, h3 {
    font-family: Georgia, 'Times New Roman', serif;
    color: #111;
    line-height: 1.3;
}

h1 { font-size: 2.1em; margin: 0 0 12px; }
h2 { font-size: 1.5em; margin: 0 0 16px; }
h3 { font-size: 1.15em; margin: 24px 0 4px; }

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

ul { padding-left: 1.2em; }
li { margin-bottom: 6px; }

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

/* Nav */
header.site-nav {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--color-border);
    z-index: 10;
}
header.site-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 16px;
    flex-wrap: wrap;
}
.site-name {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: bold;
    font-size: 1.1em;
    color: #111;
}
.site-name:hover { text-decoration: none; }
nav.nav-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
nav.nav-links a {
    color: var(--color-muted);
    font-size: 0.95em;
}
nav.nav-links a.active,
nav.nav-links a:hover {
    color: var(--color-accent);
}

/* Sections */
section {
    padding: 56px 0;
    border-top: 1px solid var(--color-border);
    scroll-margin-top: 64px;
}
section#home { border-top: none; padding-top: 48px; }

/* Hero */
.hero {
    display: flex;
    align-items: center;
    gap: 36px;
}
.hero img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.hero .tagline {
    color: var(--color-accent);
    font-weight: 600;
    margin: -6px 0 14px;
}
.hero-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    font-size: 0.9em;
    color: var(--color-text);
}
.btn:hover { border-color: var(--color-accent); color: var(--color-accent); text-decoration: none; }
.btn.primary { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.btn.primary:hover { opacity: 0.9; color: #fff; }

/* Publications */
.pub { margin-bottom: 26px; }
.pub-title { font-weight: 600; font-size: 1.05em; }
.pub-authors { margin: 2px 0; }
.pub-meta { color: var(--color-muted); font-style: italic; }
.pub-tag {
    display: inline-block;
    font-size: 0.75em;
    font-style: normal;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--color-tag-bg);
    color: var(--color-tag-text);
    margin-left: 8px;
    vertical-align: middle;
}
.pub-keywords { font-size: 0.85em; color: var(--color-muted); margin-top: 4px; }

/* Education */
.edu-entry { margin-bottom: 24px; }
.edu-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--color-muted);
    font-size: 0.95em;
}
.edu-row .dates { white-space: nowrap; }

/* Projects */
.project { margin-bottom: 28px; }
.project h3 { margin-top: 0; }
.project .meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--color-muted);
    font-size: 0.9em;
    margin-bottom: 6px;
}
details { margin-top: 8px; }
details summary {
    cursor: pointer;
    color: var(--color-accent);
    font-size: 0.9em;
}
details summary:hover { text-decoration: underline; }
details p { margin-top: 12px; }

/* Skills */
.skill-group { margin-bottom: 18px; }
.skill-group h3 { margin: 0 0 8px; font-size: 1em; font-family: inherit; color: var(--color-text); font-weight: 600; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.tag-list li { margin: 0; }
.tag {
    display: inline-block;
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.85em;
    color: #374151;
}

/* Contact */
.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.contact-icons { display: flex; gap: 16px; }
.contact-icons a { font-size: 1.6em; color: var(--color-muted); }
.contact-icons a:hover { color: var(--color-accent); }

.contact-form { display: flex; flex-direction: column; gap: 10px; max-width: 480px; margin-top: 20px; }
.contact-form label { font-size: 0.9em; color: var(--color-muted); }
.contact-form input, .contact-form textarea {
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font: inherit;
}
.contact-form button {
    align-self: flex-start;
    padding: 10px 22px;
    border: none;
    border-radius: 6px;
    background: var(--color-accent);
    color: #fff;
    font: inherit;
    cursor: pointer;
}
.contact-form button:hover { opacity: 0.9; }

footer {
    text-align: center;
    color: var(--color-muted);
    font-size: 0.85em;
    padding: 24px 0 40px;
}

@media (max-width: 600px) {
    .hero { flex-direction: column-reverse; text-align: center; }
    .hero img { width: 130px; height: 130px; }
    .edu-row, .project .meta { flex-direction: column; gap: 2px; }
    nav.nav-links { gap: 12px; row-gap: 6px; justify-content: flex-start; }
}
