/* ==========================================================================
   Academic Personal Website — inspired by minalee-research.github.io
   Color accent: #148EFF (blue)
   ========================================================================== */

:root {
    --color-accent: #148EFF;
}

::selection {
    background: rgba(20, 142, 255, 0.22);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: #333;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; display: block; }

.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ---------- Navigation ---------- */
.navbar {
    border-bottom: 1px solid #e8e8e8;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
}

.nav-brand {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #222;
    text-decoration: none;
}
.nav-brand:hover { text-decoration: none; color: var(--color-accent); }

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #555;
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* ---------- About / Profile Section ---------- */
.about-section { padding: 60px 0 40px; }

.profile-row {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

.profile-photo-col {
    flex-shrink: 0;
    width: 200px;
    text-align: center;
}

.profile-photo {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
}

.profile-meta {
    margin-top: 16px;
    font-size: 0.88rem;
    color: #666;
    text-align: left;
}

.meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
    margin-bottom: 2px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: flex-start;
}

.social-links a {
    color: #555;
    transition: color 0.2s;
}
.social-links a:hover { color: var(--color-accent); }

.profile-text-col { flex: 1; min-width: 0; }

h1 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 4px;
    line-height: 1.25;
}

.name-alt {
    font-weight: 400;
    font-size: 1.3rem;
    color: #666;
}

.title-line {
    font-size: 1rem;
    color: #555;
    margin-bottom: 2px;
    line-height: 1.5;
}

.bio {
    margin-top: 20px;
    margin-bottom: 24px;
}

.bio p {
    margin-bottom: 12px;
    font-size: 1rem;
    color: #444;
    line-height: 1.7;
}

.bio-typing {
    font-size: 0.95rem;
    color: #666;
    font-style: italic;
    margin: 0 0 20px;
    min-height: 1.6em;
    line-height: 1.6;
}

.typewriter {
    border-right: 2px solid var(--color-accent);
    padding-right: 2px;
    animation: typewriter-caret 0.9s step-end infinite;
}

.typewriter.is-done {
    animation: typewriter-caret 0.9s step-end infinite;
}

@keyframes typewriter-caret {
    50% { border-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
    .typewriter {
        border-right: none;
        animation: none;
    }
}

/* Three-column info strip */
.info-columns {
    display: flex;
    gap: 32px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.info-col { flex: 1; }

.info-col h4 {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    margin-bottom: 10px;
}

.info-col ul {
    list-style: none;
    padding: 0;
}

.info-col li {
    font-size: 0.92rem;
    color: #444;
    padding: 3px 0;
    line-height: 1.5;
}

.trajectory-list li {
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.traj-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.traj-org {
    display: block;
    font-weight: 600;
    color: #333;
    font-size: 0.92rem;
}

.traj-role {
    display: block;
    color: #777;
    font-size: 0.84rem;
    font-style: italic;
}

/* ---------- Section Headings ---------- */
.news-section h2,
.publications-section h2,
.research-section h2,
.page-header h1 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.accent-bar {
    display: inline-block;
    width: 4px;
    height: 28px;
    background: var(--color-accent);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ---------- News Section ---------- */
.news-section {
    padding: 40px 0 48px;
    border-top: 1px solid #eee;
}

.news-list {
    list-style: none;
    padding: 0;
}

.news-list li {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #f4f4f4;
    font-size: 0.95rem;
    line-height: 1.6;
}

.news-year {
    flex-shrink: 0;
    width: 44px;
    font-weight: 600;
    color: #888;
    font-size: 0.88rem;
}

.news-type {
    flex-shrink: 0;
    width: 72px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent);
}

.news-text {
    flex: 1;
    color: #444;
}

/* ---------- Selected Projects / Publications ---------- */
.publications-section {
    padding: 40px 0 56px;
    border-top: 1px solid #eee;
}

.pub-list {
    list-style: none;
    padding: 0;
}

.pub-item {
    padding: 16px 0;
    border-bottom: 1px solid #f4f4f4;
}

.pub-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    line-height: 1.45;
}

.pub-title a { color: #222; }
.pub-title a:hover { color: var(--color-accent); text-decoration: underline; }

.pub-authors {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 2px;
}

.pub-venue {
    font-size: 0.88rem;
    color: #999;
    font-style: italic;
    margin-bottom: 6px;
}

.pub-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pub-link-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    color: #555;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.pub-link-tag:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    text-decoration: none;
}

.see-all {
    margin-top: 24px;
    font-size: 0.95rem;
}

.see-all a { font-weight: 600; }

/* ---------- Research / Projects Page ---------- */
.page-header {
    padding: 48px 0 12px;
}

.page-header h1 { margin-bottom: 0; }

.page-intro {
    padding: 0 0 32px;
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
    max-width: 720px;
}

.research-section {
    padding: 0 0 56px;
}

.research-year-group { margin-bottom: 36px; }

.research-year {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 16px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.research-item {
    padding: 14px 0;
    border-bottom: 1px solid #f4f4f4;
}

.research-item:last-child { border-bottom: none; }

.research-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    line-height: 1.45;
    color: #222;
}

.research-meta {
    font-size: 0.88rem;
    color: #777;
    margin-bottom: 4px;
}

.research-venue {
    font-size: 0.88rem;
    color: #999;
    font-style: italic;
    margin-bottom: 6px;
}

.research-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.research-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 3px;
    background: #e6f3ff;
    color: var(--color-accent);
}

.research-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------- Contact Page ---------- */
.contact-section { padding: 48px 0 64px; }

.contact-section h2 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #222;
    margin-top: 36px;
    margin-bottom: 12px;
}

.contact-section h2:first-of-type { margin-top: 0; }

.contact-section p {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.7;
    margin-bottom: 10px;
}

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid #e8e8e8;
    padding: 28px 0;
    text-align: center;
}

.footer p {
    font-size: 0.82rem;
    color: #999;
}

.footer a { color: var(--color-accent); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .profile-row {
        flex-direction: column;
        gap: 28px;
        align-items: center;
        text-align: center;
    }

    .profile-photo-col {
        width: 160px;
    }

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

    .profile-meta { text-align: center; }
    .social-links { justify-content: center; }

    h1 { font-size: 1.8rem; }
    .name-alt { font-size: 1.1rem; }

    .info-columns {
        flex-direction: column;
        gap: 20px;
    }

    .news-list li {
        flex-wrap: wrap;
    }

    .news-year { width: auto; }
    .news-type { width: auto; }

    .nav-inner { height: auto; padding: 12px 24px; flex-direction: column; gap: 8px; }
    .nav-links { gap: 1rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    h1 { font-size: 1.5rem; }
    .news-list li { flex-direction: column; gap: 4px; }
}

/* ---------- Accessibility ---------- */
a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}
