/* ===== CSS RESET & VARIABLES ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Neutral Palette */
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --accent: #6c5ce7;
    --accent-hover: #5b4cdb;
    --border: #dfe6e9;
    --shadow: rgba(0, 0, 0, 0.08);

    /* Timeline Colors */
    --paper-color: #e17055;
    --repo-color: #00b894;
    --timeline-line: #dfe6e9;

    /* Typography */
    --font-display: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Spacing */
    --nav-height: 60px;
    --max-width: 900px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    height: var(--nav-height);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

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

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 3rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.hero-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.profile-pic {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
    flex-shrink: 0;
}

.hero-text {
    text-align: left;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.research-interests {
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 1.25rem;
}

.hero-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-link {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.hero-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    width: 100%;
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

/* ===== TIMELINE ===== */
.timeline-section {
    margin-bottom: 3rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--timeline-line);
}

/* Year Markers */
.timeline-year {
    position: relative;
    margin: 1.5rem 0 1rem -2rem;
    padding-left: 2rem;
}

.year-marker {
    display: inline-block;
    background: var(--accent);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

/* Timeline Items */
.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 3px solid var(--repo-color);
}

.timeline-item.paper .timeline-marker {
    border-color: var(--paper-color);
}

.timeline-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    transition: box-shadow 0.2s ease;
}

.timeline-content:hover {
    box-shadow: 0 4px 12px var(--shadow);
}

.item-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.paper-badge {
    background: rgba(225, 112, 85, 0.15);
    color: var(--paper-color);
}

.repo-badge {
    background: rgba(0, 184, 148, 0.15);
    color: var(--repo-color);
}

.timeline-content h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.item-links {
    display: flex;
    gap: 1rem;
}

.item-links a {
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.item-links a:hover {
    color: var(--accent-hover);
}

/* Featured Items */
.timeline-item.featured .timeline-content {
    border-left: 3px solid var(--repo-color);
}

/* ===== HOBBY SECTION ===== */
.hobby-section {
    margin-top: 1rem;
}

.hobby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.hobby-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hobby-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.hobby-card h3 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.hobby-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero {
        padding: 2.5rem 1rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        text-align: center;
    }

    .hero-links {
        justify-content: center;
    }

    .profile-pic {
        width: 140px;
        height: 140px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .research-interests {
        font-size: 0.85rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .main-content {
        padding: 2rem 1rem;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item {
        padding-left: 1rem;
    }

    .timeline-year {
        margin-left: -1.5rem;
        padding-left: 1.5rem;
    }

    .timeline-marker {
        left: -1.5rem;
    }

    .hobby-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-logo {
        font-size: 1.1rem;
    }

    .nav-links a {
        font-size: 0.85rem;
    }

    .profile-pic {
        width: 120px;
        height: 120px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero-links {
        flex-direction: column;
        align-items: center;
    }

    .hobby-grid {
        grid-template-columns: 1fr;
    }
}