/* Reset & Core Variables */
:root {
    --bg-color: #ffffff;
    --text-main: #111111;
    --text-muted: #666666;
    --accent-color: #000000;
    --border-color: #eaeaea;
    --font-sans: 'Inter', sans-serif;
    --radius-md: 12px;
    --radius-lg: 24px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- Background Layering System --- */

/* Layer 1: Gradient (Deepest) */
.bg-gradient {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(circle at 50% 0%, #e7edf5 0%, #fcfdff 80%);
    z-index: 0;
    pointer-events: none;
}

/* Layer 2: Shapes (Middle) */
.bg-shape {
    position: fixed;
    z-index: 1;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.8;
    mix-blend-mode: multiply;
    will-change: transform;
    animation: morph 24s ease-in-out infinite alternate;
}

.shape-1 {
    top: 5%;
    left: 5%;
    width: 520px; 
    height: 520px;
    background: linear-gradient(135deg, #c7d2fe 0%, #e0e7ff 100%);
}

.shape-2 {
    top: 25%;
    right: -5%;
    width: 620px;
    height: 680px;
    background: linear-gradient(135deg, #bbf7d0 0%, #86efac 100%);
    animation-duration: 28s;
}

.shape-3 {
    bottom: -5%;
    left: 20%;
    width: 480px;
    height: 520px;
    background: linear-gradient(135deg, #f5d0fe 0%, #f0abfc 100%);
    animation-duration: 20s;
}

@keyframes morph {
    0% { border-radius: 40% 60% 55% 45% / 50% 35% 65% 40%; }
    100% { border-radius: 60% 40% 30% 70% / 30% 60% 40% 60%; }
}

/* Layer 3: Noise (Top of BG) */
.bg-noise {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48ZmlsdGVyIGlkPSJnoiPjxmZVR1cmJ1bGVuY2UgdHlwZT0iZnJhY3RhbE5vaXNlIiBiYXNlRnJlcXVlbmN5PSIwLjY1IiBudW1PY3RhdmVzPSIzIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI2cpIiBvcGFjaXR5PSIwLjAzIi8+PC9zdmc+');
    opacity: 0.25;
    z-index: 2;
    pointer-events: none;
}

/* Layer 4: Content (Highest) */
.navbar, .hero, section, footer {
    position: relative;
    z-index: 10;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 30px 40px;
    z-index: 100; /* Always on top */
    background: #000000;
    backdrop-filter: blur(12px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.navbar.hidden { transform: translateY(-100%); }

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

.logo {
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-item {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    transition: color 0.2s;
}

.nav-item:hover { color: #ffffff; }

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 10%;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 24px;
}

.hero-title {
    font-size: 90px;
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -3px;
    margin-bottom: 20px;
    color: var(--text-main);
}
.hero-title .line { display: block; }

.hero-tagline {
    font-size: 28px;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 22px;
    color: var(--text-muted);
    max-width: 540px;
    font-weight: 300;
    line-height: 1.6;
    letter-spacing: -0.3px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 10%;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-visual {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 15;
}

.organic-circle {
    width: 600px; height: 600px;
    background: radial-gradient(circle at 30% 30%, #e2e8f0, #cbd5e1); /* Slightly darker for visibility */
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: morph 15s ease-in-out infinite alternate;
    filter: blur(60px);
    opacity: 0.5;
}

.virus-float {
    position: absolute;
    right: 5%;
    top: -100%;
    transform: translateY(0);
    width: 700px;
    height: auto;
    opacity: 0;
    animation: floatInFromTop 1s ease-out forwards;
    animation-delay: 0.3s;
    z-index: 20;
    mix-blend-mode: normal;
    filter: none;
}

@keyframes floatInFromTop {
    0% {
        top: -100%;
        opacity: 0;
    }
    100% {
        top: 15%;
        opacity: 1;
    }
}

/* Sections Generic */
section {
    padding: 160px 0;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.section-header {
    margin-bottom: 80px;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
}
.section-header h2 {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.3px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Bio */
.bio-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 100px;
    align-items: start;
}
.lead {
    font-size: 36px;
    font-weight: 400;
    letter-spacing: -1px;
    line-height: 1.4;
    margin-bottom: 80px;
    color: var(--text-main);
}
.highlight {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.3s;
}
.highlight:hover {
    color: #818cf8;
}

.timeline {
    border-left: 1px solid var(--border-color);
    padding-left: 40px;
}
.t-item {
    display: flex;
    gap: 60px;
    margin-bottom: 40px;
    align-items: baseline;
}
.t-item .year {
    font-weight: 600;
    color: var(--text-main);
    font-size: 14px;
}
.t-item .role { font-weight: 400; font-size: 18px; color: var(--text-main); }
.t-item .place { display: block; font-size: 14px; color: var(--text-muted); margin-top: 4px; }

.img-frame {
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}
.img-frame img {
    width: 100%;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.5s, transform 0.7s ease;
}
.img-frame:hover img { filter: grayscale(0%); transform: scale(1.03); }

/* Projects */
.section-projects { 
    background: rgba(255,255,255,0.4); 
    backdrop-filter: blur(10px); /* Glass effect on section to smooth out shapes behind it */
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.project-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    align-items: center;
    padding: 60px 40px;
    border-radius: var(--radius-lg);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid transparent;
}
.project-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #fff;
    z-index: -1;
    opacity: 0;
    transform: scale(0.98);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.project-item:hover .project-bg {
    opacity: 1;
    transform: scale(1);
}

.p-cat {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.project-item h3 {
    font-size: 48px;
    font-weight: 500;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
    color: var(--text-main);
}
.project-item p {
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.6;
    font-size: 18px;
    max-width: 420px;
}
.btn-link {
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid var(--text-main);
    padding-bottom: 4px;
    display: inline-block;
    color: var(--text-main);
}

.p-image {
    position: relative;
    overflow: hidden;
    height: 500px;
    background: #f0f0f0;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.p-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}
.project-item:hover .p-image img {
    transform: scale(1.03);
}

/* Publications */
.pub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 40px;
}

.pub-card {
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
    transition: all 0.3s;
    position: relative;
}
.pub-card:hover {
    border-color: var(--text-main);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    background: #fff;
}

.pub-card .year {
    font-size: 12px;
    color: var(--text-muted);
}
.pub-card h4 {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.5px;
    margin-top: 16px;
    color: var(--text-main);
}
.pub-card .journal {
    font-size: 14px;
    margin-top: auto;
    color: var(--text-muted);
}
.pub-card .arrow {
    position: absolute;
    top: 30px; right: 30px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}
.pub-card:hover .arrow { opacity: 1; transform: translateX(5px); }

/* Footer */
footer {
    padding: 120px 0 60px;
    background: rgba(249,249,249,0.8);
    color: var(--text-main);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 120px;
}
.footer-main h2 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 30px;
    text-transform: uppercase;
}
.email-link {
    font-size: 48px;
    font-weight: 500;
    letter-spacing: -1.5px;
    color: var(--text-main);
    transition: color 0.3s;
}
.email-link:hover { opacity: 0.6; }

.footer-links {
    display: flex;
    gap: 40px;
    font-size: 14px;
}
.footer-links a { color: var(--text-main); opacity: 0.6; transition: opacity 0.2s; }
.footer-links a:hover { opacity: 1; }
.disabled { opacity: 0.3; cursor: default; }

.footer-bottom {
    border-top: 1px solid #eaeaea;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

/* Animations & Utility */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}
.reveal-text.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

.reveal-up {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-left .p-info,
.reveal-left .p-image {
    opacity: 0;
    transform: translateX(-80px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.is-visible .p-info {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.1s;
}

.reveal-left.is-visible .p-image {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.2s;
}

.reveal-right {
    opacity: 0;
    transform: translateX(100px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right .p-info,
.reveal-right .p-image {
    opacity: 0;
    transform: translateX(80px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.is-visible .p-info {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.1s;
}

.reveal-right.is-visible .p-image {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.2s;
}

/* Mobile */
@media (max-width: 768px) {
    .hero-title { font-size: 48px; }
    .bio-grid { grid-template-columns: 1fr; gap: 60px; }
    .project-item { grid-template-columns: 1fr; gap: 40px; padding: 30px 20px; }
    .p-image { order: -1; height: 300px; }
    .footer-content { flex-direction: column; gap: 60px; }
    .email-link { font-size: 28px; }
    .bg-shape { opacity: 0.5; }
    .virus-float { display: none; }
}
