/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg:        #f5f7fa;
    --bg-card:   #ffffff;
    --bg-card2:  #eef1f7;
    --border:    rgba(0,0,0,0.08);
    --accent:    #2563eb;
    --accent2:   #3b82f6;
    --accent-bg: rgba(37,99,235,0.07);
    --text:      #111827;
    --text-muted:#4b5563;
    --text-dim:  #9ca3af;
    --link:      #2563eb;
    --radius:    14px;
    --radius-sm: 8px;
    --font:      'Inter', system-ui, sans-serif;
    --font-head: 'Space Grotesk', system-ui, sans-serif;
    --nav-h:     64px;
    --transition: 0.22s ease;
    --shadow:    0 1px 3px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 24px rgba(0,0,0,0.1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== LINKS ===== */
a {
    color: var(--link);
    text-decoration: none;
    transition: color var(--transition), opacity var(--transition);
}
a:hover { color: #1d4ed8; }

/* ===== HEADER / NAV ===== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background var(--transition), box-shadow var(--transition);
}

#header.scrolled {
    background: rgba(245,247,250,0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    height: var(--nav-h);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent);
    user-select: none;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

nav a {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

nav a:hover, nav a.active {
    color: var(--text);
    background: rgba(0,0,0,0.05);
}

.nav-cta {
    color: var(--accent) !important;
    border: 1px solid rgba(37,99,235,0.3);
    margin-left: 0.5rem;
}
.nav-cta:hover {
    background: var(--accent-bg) !important;
    border-color: var(--accent);
    color: #1d4ed8 !important;
}

/* ===== MAIN CONTAINER ===== */
.container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: calc(var(--nav-h) + 4rem) 2rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

/* ===== SECTION LABELS & TITLES ===== */
.section-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.6rem;
}

.section-title {
    font-family: var(--font-head);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2.5rem;
    line-height: 1.2;
}

/* ===== ABOUT ===== */
.about-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 4rem;
    align-items: start;
}

/* Profile Card */
.profile-card {
    position: sticky;
    top: calc(var(--nav-h) + 2rem);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow);
}

.profile-img-wrap {
    width: 130px;
    height: 130px;
    margin-bottom: 0.5rem;
}

.profile-img-wrap img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg);
    box-shadow: 0 0 0 3px var(--accent2), var(--shadow);
    display: block;
}

.profile-name {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.profile-role {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-bg);
    border: 1px solid rgba(37,99,235,0.2);
    padding: 0.2rem 0.75rem;
    border-radius: 99px;
}

.profile-email {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
}

.profile-email i { color: var(--accent); }

.social-icons {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.social-icons a:hover {
    background: var(--accent-bg);
    border-color: var(--accent2);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.15);
}

/* Full-width paragraphs below the grid */
.about-full {
    margin-top: 1.75rem;
}

.about-full p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 0.97rem;
    line-height: 1.85;
}

.about-full p strong {
    color: var(--text);
    font-weight: 600;
}

.about-full p a {
    border-bottom: 1px solid rgba(37,99,235,0.25);
    transition: border-color var(--transition), color var(--transition);
}
.about-full p a:hover {
    border-color: var(--accent);
}

/* About Body */
.about-body {
    padding-top: 0.25rem;
}

.about-body p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 0.97rem;
    line-height: 1.85;
}

.about-body p strong {
    color: var(--text);
    font-weight: 600;
}

.about-body p a {
    border-bottom: 1px solid rgba(37,99,235,0.25);
    transition: border-color var(--transition), color var(--transition);
}
.about-body p a:hover {
    border-color: var(--accent);
}

/* ===== RESEARCH TAGS ===== */
.tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 99px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--transition);
    cursor: default;
    box-shadow: var(--shadow);
}

.tag i {
    color: var(--accent);
    font-size: 0.8rem;
}

.tag:hover {
    border-color: rgba(37,99,235,0.4);
    background: var(--accent-bg);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.1);
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 12px;
    bottom: 12px;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    opacity: 0.25;
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 0.5rem 0;
}

.timeline-dot {
    flex-shrink: 0;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    margin-top: 0.85rem;
    transition: border-color var(--transition), background var(--transition);
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow);
}

.timeline-dot.accent {
    background: rgba(37,99,235,0.1);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(37,99,235,0.25);
}

.timeline-item:hover .timeline-dot {
    border-color: var(--accent2);
    background: var(--accent-bg);
}

.timeline-card {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    box-shadow: var(--shadow);
}

.timeline-item:hover .timeline-card {
    border-color: rgba(37,99,235,0.25);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.timeline-degree {
    font-family: var(--font-head);
    font-size: 0.97rem;
    font-weight: 600;
    color: var(--text);
}

.timeline-date {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-weight: 500;
    white-space: nowrap;
}

.timeline-org {
    font-size: 0.84rem;
    color: var(--accent);
    font-weight: 500;
    width: fit-content;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition);
}
.timeline-org:hover {
    border-color: var(--accent);
}

/* Current badge */
.badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.15rem 0.6rem;
    border-radius: 99px;
    margin-left: 0.5rem;
}
.badge-current {
    background: rgba(16,185,129,0.1);
    color: #059669;
    border: 1px solid rgba(16,185,129,0.3);
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-dim);
    font-size: 0.82rem;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .profile-card {
        position: static;
    }

    .container {
        padding-top: calc(var(--nav-h) + 2rem);
        gap: 4rem;
    }
}

@media (max-width: 600px) {
    .nav-inner {
        padding: 0 1rem;
    }

    nav ul {
        gap: 0;
    }

    nav a {
        font-size: 0.78rem;
        padding: 0.35rem 0.55rem;
    }

    .nav-logo { display: none; }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .timeline::before { display: none; }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .timeline-date { color: var(--text-muted); }
}
