/* ========================================
   Design Tokens
   ======================================== */
:root {
    /* Colors – Deep dark academic palette */
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;

    --text-primary: #e8e8ed;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b80;

    --accent: #7c6aef;
    --accent-light: #9d8cf5;
    --accent-glow: rgba(124, 106, 239, 0.15);
    --accent-gradient: linear-gradient(135deg, #7c6aef 0%, #5b8def 100%);

    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --section-padding: 6rem 0;
    --container-max: 1080px;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color 0.3s var(--ease);
}

a:hover {
    color: #fff;
}

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

/* ========================================
   Navbar
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.4s var(--ease);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.7rem 0;
}

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

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary) !important;
    letter-spacing: -0.02em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.3s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

/* ========================================
   Hero
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(124, 106, 239, 0.2), transparent 70%);
    top: -10%;
    right: -10%;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(91, 141, 239, 0.15), transparent 70%);
    bottom: 10%;
    left: -5%;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(124, 106, 239, 0.1), transparent 70%);
    top: 40%;
    right: 20%;
}

.hero-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.hero-greeting {
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent-light);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease) 0.2s forwards;
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease) 0.4s forwards;
}

.hero-tagline {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease) 0.6s forwards;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 560px;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease) 0.8s forwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease) 1s forwards;
}

.hero-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease) 1.2s forwards;
}

.badge {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(124, 106, 239, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 106, 239, 0.35);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
    color: #fff;
}

/* ========================================
   Section Styles
   ======================================== */
.section {
    padding: var(--section-padding);
}

.section-alt {
    background: var(--bg-secondary);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* ========================================
   About Section
   ======================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.02rem;
}

.about-text strong {
    color: var(--text-primary);
}

.about-text em {
    color: var(--accent-light);
    font-style: italic;
}

.detail-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s var(--ease);
}

.detail-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.detail-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: 10px;
}

.detail-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.detail-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.detail-info a {
    font-size: 0.85rem;
}

/* ========================================
   Publications
   ======================================== */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.pub-card {
    padding: 1.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}

.pub-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.pub-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.pub-card:hover::before {
    opacity: 1;
}

.pub-venue {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-light);
    background: var(--accent-glow);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    letter-spacing: 0.03em;
}

.pub-venue-preprint {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    font-style: italic;
}

.pub-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

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

.pub-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-light);
}

.pub-link:hover {
    color: #fff;
}

/* ========================================
   Timeline
   ======================================== */
.timeline {
    position: relative;
    padding-left: 2.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2.5rem;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--accent);
    z-index: 1;
    transition: all 0.3s var(--ease);
}

.section-alt .timeline-marker {
    background: var(--bg-secondary);
}

.timeline-item:hover .timeline-marker {
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s var(--ease);
}

.timeline-content:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.timeline-org {
    font-size: 0.9rem;
    color: var(--accent-light);
    font-weight: 500;
    margin-bottom: 0.6rem;
}

.timeline-content p:last-child {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

/* ========================================
   Grants & Awards
   ======================================== */
.awards-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.award-card {
    display: flex;
    gap: 1.25rem;
    padding: 1.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}

.award-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #f5c842 0%, #ef8e3b 100%);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.award-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.award-card:hover::before {
    opacity: 1;
}

.award-icon {
    font-size: 2rem;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 200, 66, 0.08);
    border-radius: 12px;
}

.award-content {
    flex: 1;
}

.award-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.award-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
}

.award-date {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.award-content > p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.award-content strong {
    color: var(--text-primary);
}

/* ========================================
   Technical Skills
   ======================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
    transition: all 0.3s var(--ease);
}

.skill-category:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.skill-category-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.skill-icon {
    font-size: 1.3rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s var(--ease);
}

.skill-tag:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--accent-glow);
}

.skill-tag-accent {
    color: var(--accent-light);
    background: var(--accent-glow);
    border-color: rgba(124, 106, 239, 0.2);
}

.skill-tag-accent:hover {
    border-color: var(--accent);
    color: #fff;
}

/* ========================================
   Teaching
   ======================================== */
.teaching-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.teaching-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
    transition: all 0.3s var(--ease);
}

.teaching-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.teaching-institution {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.teaching-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.teaching-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

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

.teaching-role strong {
    color: var(--text-primary);
}

.teaching-date {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ========================================
   Activities
   ======================================== */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.activity-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
    transition: all 0.3s var(--ease);
}

.activity-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.activity-emoji {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.activity-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.activity-org {
    font-size: 0.82rem;
    color: var(--accent-light);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.activity-card > p:last-of-type {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.activity-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-light);
}

.activity-link:hover {
    color: #fff;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    background: var(--bg-primary);
}

.footer-content {
    text-align: center;
}

.footer-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.footer-email a {
    font-size: 0.9rem;
    color: var(--accent-light);
}

.footer-links {
    margin-top: 0.6rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.88rem;
}

.footer-links a {
    color: var(--accent-light);
    font-weight: 500;
}

.footer-sep {
    color: var(--text-muted);
}

.footer-location {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal elements */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(17, 17, 24, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        gap: 1.5rem;
        padding: 2rem;
        transition: right 0.4s var(--ease);
        border-left: 1px solid var(--border);
    }

    .nav-links.open {
        right: 0;
    }

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

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

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

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

    .hero-name {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .award-card {
        flex-direction: column;
    }

    .award-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
        width: 100%;
    }
}
