* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #000;
    --white: #fff;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

#langToggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 100;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

#langToggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

#hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#blackHoleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: opacity 0.8s ease;
    z-index: 1;
}

@media (max-width: 768px) {
    #blackHoleCanvas {
        pointer-events: none;
        touch-action: none;
    }
}

#blackHoleCanvas.fade-out {
    opacity: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    animation: fadeInUp 1s ease;
    pointer-events: none;
}

.profile-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
    margin-left: auto;
    margin-right: auto;
}

.hero-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    color: var(--gray-400);
    font-weight: 400;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    padding: 8rem 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
}

#about {
    background: var(--black);
}

.about-text {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--gray-300);
    max-width: 800px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.project-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-tag.academic {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.project-tag.personal {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

.project-tag.featured {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(245, 158, 11, 0.2));
    color: #fbbf24;
    font-weight: 600;
    letter-spacing: 0.08em;
}

/* ── Featured Project Card (Shrew) ─────────────────────────────── */
.project-card.featured {
    grid-column: 1 / -1;
    position: relative;
    background: rgba(251, 191, 36, 0.04);
    border: 1px solid rgba(251, 191, 36, 0.25);
    box-shadow:
        0 0 20px rgba(251, 191, 36, 0.08),
        0 0 60px rgba(251, 191, 36, 0.04);
    animation: featuredGlow 3s ease-in-out infinite;
}

.project-card.featured:hover {
    background: rgba(251, 191, 36, 0.07);
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow:
        0 0 30px rgba(251, 191, 36, 0.15),
        0 0 80px rgba(251, 191, 36, 0.06);
}

@keyframes featuredGlow {

    0%,
    100% {
        box-shadow:
            0 0 20px rgba(251, 191, 36, 0.08),
            0 0 60px rgba(251, 191, 36, 0.04);
    }

    50% {
        box-shadow:
            0 0 30px rgba(251, 191, 36, 0.14),
            0 0 80px rgba(251, 191, 36, 0.07);
    }
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.project-card p {
    color: var(--gray-400);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    padding: 0.25rem 0.625rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 0.8125rem;
    color: var(--gray-400);
}

.project-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.project-link:hover {
    color: var(--gray-400);
}

.project-link svg {
    width: 16px;
    height: 16px;
}

.loading {
    text-align: center;
    color: var(--gray-500);
    padding: 3rem 0;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.research-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.research-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.research-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.research-card p {
    color: var(--gray-400);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.research-meta {
    color: var(--gray-500);
    font-size: 0.875rem;
    font-style: italic;
}

.research-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.research-link:hover {
    gap: 0.75rem;
    color: var(--gray-400);
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-marker {
    position: absolute;
    left: -2.5rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--white);
    border-radius: 50%;
    border: 2px solid var(--black);
}

.timeline-content {
    padding-left: 2rem;
}

.timeline-year {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--black);
    background: var(--gray-300);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.timeline-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--gray-400);
}

footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 0;
    margin-top: 4rem;
}

/* ── Technical Skills ──────────────────────────────────────────── */
#skills {
    background: var(--black);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.skill-category {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2rem;
}

.skill-category-title {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-400);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.skill-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--gray-300);
    transition: all 0.2s ease;
}

.skill-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.skill-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--gray-400);
}

.skill-item:hover .skill-icon {
    color: var(--white);
}

.skill-note {
    font-size: 0.6875rem;
    color: var(--gray-500);
    font-style: italic;
    margin-left: -0.15rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--white);
}

.cvlac-link {
    font-weight: 500;
    font-size: 1.125rem;
}

.footer-text {
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }

    .container {
        padding: 0 1.25rem;
    }

    #langToggle {
        top: 1rem;
        right: 1rem;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .profile-img {
        width: 60px;
        height: 60px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.875rem;
    }

    .projects-grid,
    .research-grid {
        grid-template-columns: 1fr;
    }

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

    .skill-items {
        gap: 0.4rem;
    }

    .skill-item {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .skill-icon {
        width: 14px;
        height: 14px;
    }

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

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-content {
        padding-left: 1.5rem;
    }

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

    .research-card {
        padding: 1.25rem;
    }

    .footer-links {
        gap: 1.25rem;
    }
}