/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0b1020;
    --secondary-color: #6ae4ff;
    --accent-color: #a78bfa;
    --text-color: #0f172a;
    --muted-text: rgba(15, 23, 42, 0.72);
    --light-bg: #f6f7fb;
    --white: #ffffff;
    --border-color: rgba(15, 23, 42, 0.10);
    --shadow: 0 10px 30px rgba(2, 6, 23, 0.10);
    --shadow-lg: 0 25px 60px rgba(2, 6, 23, 0.18);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: "Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-color);
    background:
        radial-gradient(900px 500px at 10% 5%, rgba(167, 139, 250, 0.18), transparent 60%),
        radial-gradient(900px 500px at 90% 10%, rgba(106, 228, 255, 0.16), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #fbfbfe 35%, #f6f7fb 100%);
    background-size: 100% 100%, 100% 100%, 100% 100%;
    animation: gentleShift 30s ease-in-out infinite;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.005em;
}

@keyframes gentleShift {
    0%, 100% { background-position: 0% 0%, 100% 0%, 0% 0%; }
    33% { background-position: 8% 4%, 92% 6%, 0% 0%; }
    66% { background-position: -4% 6%, 104% 4%, 0% 0%; }
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.9rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(2, 6, 23, 0.25);
}

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

.nav-brand {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.nav-menu a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.25s ease, background-color 0.25s ease;
    font-weight: 550;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
}

.nav-menu a:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.15);
}

/* Hero Section */
.hero {
    padding: 4.5rem 0 3rem 0;
    text-align: center;
    color: var(--primary-color);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 18% 45%, rgba(255, 255, 255, 0.08) 0%, transparent 52%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.06) 0%, transparent 55%),
        radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.05) 0%, transparent 55%);
    animation: shimmer 18s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero .container {
    position: relative;
    z-index: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); font-weight: 600; }

.hero h1 {
    margin-bottom: 1rem;
    text-shadow: 0 20px 60px rgba(0, 0, 0, 0.30);
}

.subtitle {
    font-size: clamp(1.05rem, 1.3vw, 1.25rem);
    margin-bottom: 1rem;
    opacity: 0.92;
    font-weight: 450;
    letter-spacing: 0.01em;
}

.hero-description {
    font-size: 1.05rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.88;
    font-weight: 380;
    letter-spacing: 0.03em;
}

/* Sections */
.section {
    padding: 3.5rem 0;
}

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

.section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 2.2vw, 2.35rem);
    margin-bottom: 1.75rem;
    color: rgba(11, 16, 32, 0.96);
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
    padding-bottom: 0.6rem;
}

.section h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 86px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
}

.section-intro {
    font-size: 1.08rem;
    color: var(--muted-text);
    margin-bottom: 3rem;
    max-width: 800px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.split {
    display: flex;
    gap: 2.25rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.split-media {
    flex: 0 0 240px;
}

.split-media-wide {
    flex-basis: 320px;
}

.split-body {
    flex: 1;
    min-width: 300px;
}

.portrait,
.card-image {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.card-image {
    border-radius: var(--radius-lg);
}

.about-wrap {
    max-width: 860px;
}

.portrait-float {
    float: left;
    width: min(280px, 42vw);
    margin: 0.25rem 1.6rem 1rem 0;
}

.about-wrap::after {
    content: "";
    display: block;
    clear: both;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
    text-wrap: pretty;
}

/* Project Cards */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(2, 6, 23, 0.08);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(2, 6, 23, 0.14), 0 0 0 1px rgba(106, 228, 255, 0.2);
    background: rgba(255, 255, 255, 0.95);
}

.project-card h3 {
    color: rgba(11, 16, 32, 0.96);
    font-size: 1.55rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.project-meta {
    color: rgba(15, 23, 42, 0.62);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.project-card p {
    line-height: 1.8;
    color: var(--muted-text);
    text-wrap: pretty;
}

.project-tags {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: linear-gradient(135deg, rgba(106, 228, 255, 0.18) 0%, rgba(167, 139, 250, 0.16) 100%);
    color: rgba(11, 16, 32, 0.92);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 600;
    border: 1px solid rgba(15, 23, 42, 0.10);
}

/* Publications */
.publication {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(2, 6, 23, 0.08);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.publication:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(2, 6, 23, 0.14), 0 0 0 1px rgba(106, 228, 255, 0.2);
    background: rgba(255, 255, 255, 0.95);
}

.publication h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.pub-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #444;
}

.pub-venue {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.pub-abstract {
    line-height: 1.7;
    text-align: justify;
    margin-bottom: 1rem;
    color: #555;
}

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

.btn-small {
    padding: 0.55rem 1rem;
    background: linear-gradient(135deg, rgba(11, 16, 32, 0.92), rgba(15, 23, 42, 0.92));
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    border-radius: 999px;
    font-size: 0.9rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    font-weight: 650;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 35px rgba(2, 6, 23, 0.22);
    background: linear-gradient(135deg, rgba(11, 16, 32, 0.98), rgba(167, 139, 250, 0.55));
}

/* Visualizations */
.viz-card {
    background: var(--white);
    padding: 2rem;
    margin-bottom: 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.viz-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.viz-card > div {
    margin-bottom: 1rem;
}

.viz-caption {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
    text-align: justify;
    font-style: italic;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Contact Section */
.contact-content {
    max-width: 700px;
}

.contact-content p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-content a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.contact-content a:hover {
    text-decoration: underline;
}

.social-links {
    margin-top: 2rem;
    font-size: 1.1rem;
}

.social-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

footer p {
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .section h2 {
        font-size: 2rem;
    }
    
    .project-card,
    .publication {
        padding: 1.5rem;
    }
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.video-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(2, 6, 23, 0.08);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(2, 6, 23, 0.14), 0 0 0 1px rgba(106, 228, 255, 0.2);
    background: rgba(255, 255, 255, 0.95);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px 8px 0 0;
}

.video-card h4 {
    padding: 0 1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.video-card .project-meta {
    padding: 0 1rem 1rem 1rem;
    margin: 0;
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Collapsible Sections */
.collapsible-btn {
    width: 100%;
    background: linear-gradient(135deg, rgba(11, 16, 32, 0.96), rgba(15, 23, 42, 0.92));
    color: rgba(255, 255, 255, 0.92);
    padding: 1rem 1.4rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.collapsible-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.24);
    background: linear-gradient(135deg, rgba(11, 16, 32, 0.98), rgba(167, 139, 250, 0.55));
}

.collapsible-btn .toggle-icon {
    font-size: 1.8rem;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.collapsible-btn:not(.active) .toggle-icon {
    transform: rotate(0deg);
}

.collapsible-content {
    display: none;
    overflow: hidden;
}

.section-subhead {
    color: rgba(11, 16, 32, 0.96);
    font-size: 1.35rem;
    font-weight: 750;
    letter-spacing: -0.01em;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.section-gap {
    margin-top: 1.5rem;
}

.section-gap-lg {
    margin-top: 2rem;
}

.center-cta {
    margin-top: 1.75rem;
    display: flex;
    justify-content: center;
}

.btn-large {
    padding: 0.7rem 1.35rem;
    font-size: 1rem;
}

.media-links {
    margin-top: 1rem;
}

.video-title {
    padding: 0 1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: rgba(11, 16, 32, 0.96);
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.embedded-map {
    height: 600px;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(2, 6, 23, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.viz-caption-top {
    margin-top: 1rem;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* CV Styles */
.cv-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.cv-section:last-child {
    border-bottom: none;
}

.cv-heading {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--secondary-color);
    display: inline-block;
}

.cv-item {
    margin-bottom: 1.5rem;
}

.cv-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.cv-item-header strong {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.cv-date {
    color: #666;
    font-size: 0.95rem;
    font-style: italic;
}

.cv-list {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.cv-list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .cv-item-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cv-date {
        margin-top: 0.25rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white !important;
        animation: none !important;
        color: #000;
        font-size: 11pt;
        line-height: 1.4;
    }
    
    .navbar {
        display: none !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .section {
        padding: 0 !important;
        page-break-inside: avoid;
    }
    
    h1 {
        font-size: 24pt !important;
        color: #000 !important;
        margin-bottom: 8pt !important;
    }
    
    h2.cv-heading {
        font-size: 14pt !important;
        color: #000 !important;
        border-bottom: 2pt solid #000 !important;
        margin-top: 16pt !important;
        margin-bottom: 8pt !important;
        page-break-after: avoid;
    }
    
    h3 {
        font-size: 12pt !important;
        color: #000 !important;
        margin-top: 12pt !important;
        margin-bottom: 6pt !important;
        page-break-after: avoid;
    }
    
    .cv-section {
        background: white !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin-bottom: 12pt !important;
    }
    
    .cv-item {
        page-break-inside: avoid;
        margin-bottom: 8pt !important;
        padding: 0 !important;
        background: white !important;
    }
    
    .cv-item-header {
        page-break-inside: avoid;
        page-break-after: avoid;
    }
    
    p {
        orphans: 3;
        widows: 3;
    }
    
    a {
        color: #000 !important;
        text-decoration: none !important;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
    }
    
    button, .btn-small {
        display: none !important;
    }
    
    div[style*="background-color"] {
        background: white !important;
        border-left: 3pt solid #ccc !important;
        padding: 8pt !important;
    }
    
    @page {
        margin: 0.75in;
        size: letter;
    }
}
