/* ===== CSS Variables ===== */
:root {
    --primary: #0a0a0a;
    --secondary: #1a1a1a;
    --accent: #4f46e5;
    --accent-light: #6366f1;
    --text: #fafafa;
    --text-muted: #a3a3a3;
    --bg: #0a0a0a;
    --bg-secondary: #111111;
    --border: rgba(255, 255, 255, 0.1);
    --gradient-1: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --gradient-2: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --transition: 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: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: white;
}

/* ===== Custom Cursor ===== */
.cursor, .cursor-follower {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
}

.cursor {
    width: 8px;
    height: 8px;
    background: white;
    transform: translate(-50%, -50%);
    transition: transform 0.1s var(--transition);
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: transform 0.3s var(--transition), width 0.3s, height 0.3s;
}

body:hover .cursor-follower {
    opacity: 1;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.2;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-light);
    margin-bottom: 1rem;
    position: relative;
    padding-left: 3rem;
}

.section-tag::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 2rem;
    height: 1px;
    background: var(--accent);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 2rem;
}

/* ===== Layout ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all 0.3s var(--transition);
}

.header.scrolled {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.3s var(--transition);
}

.logo:hover::after {
    transform: scaleX(1);
}

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

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s var(--transition);
}

.nav-links a::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    color: var(--text);
    clip-path: inset(100% 0 0 0);
    transition: clip-path 0.3s var(--transition);
}

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

.nav-links a:hover::after {
    clip-path: inset(0 0 0 0);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s var(--transition);
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #7c3aed;
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #06b6d4;
    top: 50%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(-30px, 30px) scale(0.95); }
    75% { transform: translate(-50px, -30px) scale(1.05); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-light);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 1.5rem;
}

.hero-title .line {
    display: block;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 2.5rem;
}

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    opacity: 0;
    transition: opacity 0.3s var(--transition);
}

.btn-primary span, .btn-primary i {
    position: relative;
    z-index: 1;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.4);
}

.btn-primary i {
    transition: transform 0.3s var(--transition);
}

.btn-primary:hover i {
    transform: translateX(4px);
}

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

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}

/* ===== Hero Image ===== */
.hero-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 4/5;
    border-radius: 20px;
    overflow: hidden;
    margin-left: auto;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--transition);
}

.image-wrapper:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.5), transparent);
}

.credentials-float {
    position: absolute;
    bottom: -20px;
    left: -20px;
    display: flex;
    gap: 0.5rem;
    background: var(--bg-secondary);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    background: var(--gradient-1);
    border-radius: 6px;
    color: white;
}

/* ===== Scroll Indicator ===== */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.scroll-indicator span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: var(--border);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: var(--accent);
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

/* ===== Stats Section ===== */
.stats-section {
    padding: 6rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    text-align: center;
}

.stat-item {
    position: relative;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline;
}

.stat-suffix {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--accent-light);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ===== About Section ===== */
.about-section {
    padding: 8rem 0;
}

.section-header {
    margin-bottom: 4rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.about-text .lead {
    font-size: 1.25rem;
    color: var(--text);
}

.about-qualifications {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.qual-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s var(--transition);
}

.qual-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.1);
}

.qual-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-1);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.qual-icon i {
    font-size: 1.25rem;
    color: white;
}

.qual-card h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.qual-card ul {
    list-style: none;
}

.qual-card li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.qual-card li:last-child {
    border-bottom: none;
}

.qual-card li strong {
    color: var(--text);
}

.qual-card li span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ===== Research Section ===== */
.research-section {
    padding: 8rem 0;
    background: var(--bg-secondary);
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.research-card {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    overflow: hidden;
    transition: all 0.4s var(--transition);
}

.research-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
}

.card-number {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-light);
    opacity: 0.5;
}

.card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 16px;
    margin-bottom: 1.5rem;
    transition: all 0.3s var(--transition);
}

.research-card:hover .card-icon {
    background: var(--gradient-1);
}

.card-icon i {
    font-size: 1.5rem;
    color: var(--accent-light);
    transition: color 0.3s var(--transition);
}

.research-card:hover .card-icon i {
    color: white;
}

.research-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.research-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.card-hover-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.3s var(--transition);
}

.research-card:hover .card-hover-bg {
    transform: scaleX(1);
}

/* ===== Projects Section ===== */
.projects-section {
    padding: 8rem 0;
}

.projects-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    left: 100px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.project-item {
    display: flex;
    gap: 3rem;
    margin-bottom: 2rem;
    position: relative;
}

.project-year {
    width: 100px;
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--accent-light);
    padding-top: 1.5rem;
    text-align: right;
    position: relative;
}

.project-year::after {
    content: '';
    position: absolute;
    right: -1.65rem;
    top: 1.75rem;
    width: 12px;
    height: 12px;
    background: var(--bg);
    border: 2px solid var(--accent);
    border-radius: 50%;
    z-index: 1;
}

.project-content {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s var(--transition);
}

.project-item:hover .project-content {
    border-color: var(--accent);
    transform: translateX(8px);
}

.project-content h4 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.project-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.project-funding {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--accent-light);
}

.project-funding i {
    font-size: 0.75rem;
}

/* ===== Publications Section ===== */
.publications-section {
    padding: 8rem 0;
    background: var(--bg-secondary);
}

.publications-list {
    max-width: 1000px;
    margin: 0 auto;
}

.publication-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s var(--transition);
    cursor: pointer;
}

.publication-item:hover {
    background: rgba(255, 255, 255, 0.02);
    padding-left: 3rem;
}

.pub-year {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-light);
    width: 80px;
    flex-shrink: 0;
}

.pub-content {
    flex: 1;
}

.pub-content h4 {
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: color 0.3s var(--transition);
}

.publication-item:hover .pub-content h4 {
    color: var(--accent-light);
}

.pub-authors {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.pub-journal {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pub-journal i {
    color: var(--accent-light);
}

.pub-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all 0.3s var(--transition);
    flex-shrink: 0;
}

.publication-item:hover .pub-arrow {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
    transform: translateX(4px);
}

/* ===== Contact Section ===== */
.contact-section {
    padding: 8rem 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-info .section-title {
    margin-bottom: 1.5rem;
}

.contact-info > p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item i {
    color: var(--accent-light);
    margin-top: 0.25rem;
}

.contact-item a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s var(--transition);
}

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

.contact-item span {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

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

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s var(--transition);
    position: relative;
}

.social-link:hover {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
    transform: translateY(-4px);
}

.social-link::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--transition);
}

.social-link:hover::before {
    opacity: 1;
    visibility: visible;
}

.contact-visual .visual-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.visual-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
}

.visual-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.visual-card > .card-content > p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.research-topics {
    list-style: none;
}

.research-topics li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.research-topics li:last-child {
    border-bottom: none;
}

.research-topics li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

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

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s var(--transition);
}

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

/* ===== Animations ===== */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--transition), transform 0.8s var(--transition);
}

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

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        order: -1;
    }

    .image-wrapper {
        max-width: 350px;
        margin: 0 auto;
    }

    .credentials-float {
        left: 50%;
        transform: translateX(-50%);
    }

    .hero-desc {
        margin: 0 auto 2.5rem;
    }

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

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

    .about-content,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        padding-top: 6rem;
    }

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

    .stat-number {
        font-size: 3rem;
    }

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

    .timeline-line {
        left: 20px;
    }

    .project-item {
        flex-direction: column;
        gap: 1rem;
        padding-left: 50px;
    }

    .project-year {
        text-align: left;
        padding-top: 0;
    }

    .project-year::after {
        left: -38px;
        right: auto;
        top: 0.25rem;
    }

    .publication-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .pub-arrow {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .cursor, .cursor-follower {
        display: none;
    }
}

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

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

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

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

    .credentials-float {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        justify-content: center;
        margin-top: 1.5rem;
    }
}
