/* styles.css */

:root {
    --background: #f9f8f4;
    --text: #1a1a1a;
    --text-secondary: #555;
    --accent-b: #0010a0;
    --accent-g: #368768;
    --header-bg: rgba(207, 227, 247, 0.7);
    --about-bg: #9dd1ffea;
    --card-bg: rgba(255, 255, 255, 0.5);
    --border: rgba(0, 0, 0, 0.08);
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-strong: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] {
    --background: #0f1117;
    --text: #e4e4e7;
    --text-secondary: #a1a1aa;
    --accent-b: #6b8aff;
    --accent-g: #4ade80;
    --header-bg: rgba(15, 17, 23, 0.85);
    --about-bg: rgba(30, 40, 70, 0.9);
    --card-bg: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.08);
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-strong: rgba(0, 0, 0, 0.5);
}

/* ====== BASE ====== */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 10px;
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    transition: background 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4 {
    font-family: 'Space Grotesk', 'Helvetica Neue', sans-serif;
}

a {
    color: var(--accent-b);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-g);
}

/* ====== HEADER ====== */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 1px 8px var(--shadow);
    transition: background 0.3s ease;
}

nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

nav a {
    position: relative;
    margin: 0 12px;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 4px 0;
    transition: color 0.2s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-b);
    transition: width 0.3s ease;
    border-radius: 1px;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

nav a:hover {
    color: var(--accent-b);
}

nav a.active {
    color: var(--accent-b);
}

#theme-toggle {
    background: none;
    border: 2px solid var(--border);
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    margin-left: 12px;
    transition: all 0.2s ease;
}

#theme-toggle:hover {
    border-color: var(--accent-b);
    color: var(--accent-b);
    transform: scale(1.05);
}

/* ====== SECTIONS ====== */

.section {
    padding: 10px 20px;
    max-width: 900px;
    margin: auto;
}

/* ====== FADE IN ANIMATION ====== */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ====== ABOUT ====== */

#about {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    text-align: left;
    background: var(--about-bg);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 6px 20px var(--shadow-strong);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.about-image {
    text-align: center;
    margin: 30px;
}

.about-image img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 100px;
    box-shadow: 0 4px 16px var(--shadow-strong);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.about-image img:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 8px 28px var(--shadow-strong);
}

.about-image h1 {
    margin: 15px 0 5px;
}

.about-image p {
    margin: 0 0 10px;
    font-size: 0.9em;
    color: var(--text);
}

.social-icons a {
    margin: 0 8px;
    font-size: 20px;
    color: var(--text);
    transition: color 0.2s ease, transform 0.2s ease;
}

.social-icons a:hover {
    color: var(--accent-b);
    transform: translateY(-2px);
}

.description {
    flex: 1;
    min-width: 280px;
    margin: 20px;
    text-align: left;
}

.description p {
    line-height: 1.7;
    color: var(--text);
}

.hero-tagline {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--accent-b), var(--accent-g));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ====== TIMELINE ====== */

#experience {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#experience::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 25%;
    height: 65%;
    width: 2px;
    background: var(--accent-b);
    transition: background 0.3s ease;
}

.timeline-entry {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin: 40px 0 40px 60px;
    text-align: left;
    transition: transform 0.3s ease;
}

.timeline-entry:hover {
    transform: translateX(4px);
}

.timeline-entry::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 16px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-b);
    box-shadow: 0 4px 12px var(--shadow-strong);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-entry:hover::before {
    transform: scale(1.3);
    box-shadow: 0 0 12px var(--accent-b);
}

.timeline-entry img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-right: 30px;
    flex-shrink: 0;
    border-radius: 8px;
    background: white;
    padding: 4px;
    box-shadow: 0 2px 8px var(--shadow);
}

.timeline-entry h4 {
    margin: 0 0 5px;
}

.timeline-entry p {
    margin: 0;
    color: var(--text-secondary);
}

/* ====== PAPERS ====== */

#papers h3 {
    margin-top: 25px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0;
}

h3.text-muted {
    margin-top: 20px;
    margin-bottom: 0;
}

.paper-entry {
    padding: 12px 8px;
    border-bottom: 1px solid var(--border);
    margin-top: 0;
    margin-bottom: 0;
    border-radius: 6px;
    background: transparent;
    border-left: 3px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.paper-entry:hover {
    background: var(--card-bg);
    border-left-color: var(--accent-b);
}

.paper-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
    letter-spacing: -0.3px;
    margin-top: 0;
}

.paper-authors {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.paper-authors strong {
    color: var(--text);
    font-weight: 600;
}

.paper-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-style: italic;
}

.paper-links a {
    color: var(--accent-b);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.contrib-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    font-style: italic;
}

.award-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    font-style: normal;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    vertical-align: middle;
}

[data-theme="dark"] .award-badge {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.3);
}

/* ====== CONTACT ====== */

#contact {
    text-align: center;
}

.contact-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 16px 28px;
    border-radius: 12px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--shadow);
}

.email-link {
    text-decoration: none;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.email-link:hover {
    color: var(--accent-b);
}

.copy-email {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.copy-email:hover {
    color: var(--accent-b);
    border-color: var(--accent-b);
}

.copy-email.copied {
    color: var(--accent-g);
    border-color: var(--accent-g);
}

/* ====== FOOTER ====== */

footer {
    text-align: center;
    padding: 30px 20px;
    font-size: 0.85em;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

/* ====== RESPONSIVE ====== */

@media (max-width: 768px) {
    nav {
        gap: 4px;
    }

    nav a {
        margin: 0 6px;
        font-size: 0.85rem;
    }

    #about {
        padding: 24px 16px;
        flex-direction: column;
        text-align: center;
    }

    .description {
        text-align: center;
        min-width: unset;
    }

    .hero-tagline {
        font-size: 1.4rem;
    }

    .about-image {
        margin: 15px;
    }

    .about-image img {
        width: 150px;
        height: 150px;
    }

    #experience::before {
        left: 20px;
    }

    .timeline-entry {
        margin-left: 40px;
    }

    .timeline-entry::before {
        left: -20px;
        width: 12px;
        height: 12px;
    }

    .paper-entry {
        padding: 14px;
    }

    .contact-card {
        padding: 12px 20px;
    }
}
