/* ===== CSS Variables ===== */
:root {
    /* Light Mode Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --border: #e5e7eb;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);

    /* Spacing */
    --container-max: 1100px;
    --section-padding: 4rem;
    --header-height: 70px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Transitions */
    --transition: 0.3s ease;
}

[data-theme="dark"] {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --text-primary: #f5f5f5;
    --text-secondary: #9ca3af;
    --accent: #60a5fa;
    --accent-hover: #3b82f6;
    --border: #2d2d2d;
    --card-bg: #1a1a1a;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition), color var(--transition);
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

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

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: background-color var(--transition), border-color var(--transition);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition);
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition);
}

.lang-toggle:hover {
    border-color: var(--accent);
}

.lang-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition);
}

.theme-toggle:hover {
    border-color: var(--accent);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    color: var(--text-primary);
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

/* Menu Toggle (Mobile) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: auto;
    display: flex;
    align-items: center;
    padding-top: calc(var(--header-height) + 3rem);
    padding-bottom: 3rem;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-text {
    flex: 1;
}

.hero-image {
    flex-shrink: 0;
}

.hero-image img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 4px solid var(--bg-card);
}

.hero-greeting {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.hero-name {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-radius: 20px;
    text-decoration: none;
    transition: all var(--transition);
    letter-spacing: 0.3px;
}

.hero-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    opacity: 0.9;
}

.hero-education {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.edu-secondary {
    color: var(--text-tertiary, #9ca3af);
}

.edu-link {
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px dashed var(--text-tertiary, #9ca3af);
    transition: all var(--transition);
}

.edu-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

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

/* Education Badge */
.edu-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .hero-image img {
        width: 200px;
        height: 200px;
    }

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

/* ===== About Inline (Inside Hero) ===== */
.about-inline {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.about-intro {
    flex: 1;
}

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

.education-line {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0;
}

.edu-secondary {
    color: var(--text-secondary);
}

.skills-inline {
    flex: 0 0 auto;
}

.skills-inline h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.skills-inline .skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 300px;
}

@media (max-width: 768px) {
    .about-inline {
        flex-direction: column;
        gap: 1.5rem;
    }

    .skills-inline .skill-tags {
        max-width: 100%;
    }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all var(--transition);
    cursor: pointer;
}

.btn svg {
    flex-shrink: 0;
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border: none;
}

.btn-primary:hover {
    opacity: 0.85;
}

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

.btn-secondary:hover {
    border-color: var(--text-primary);
}

/* ===== Sections ===== */
.section {
    padding: var(--section-padding) 0;
}

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

.section-title {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 3rem;
}

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

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.skills h3,
.education h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

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

.tag {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: all var(--transition);
}

[data-theme="dark"] .tag {
    background-color: var(--bg-primary);
}

.education-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.education-item {
    display: flex;
    gap: 1rem;
}

.education-item .year {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    min-width: 90px;
}

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

.education-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* About Social Icons */
.about-social {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.social-icon:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

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

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

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

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

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0;
    width: 12px;
    height: 12px;
    background-color: var(--accent);
    border-radius: 50%;
    transform: translateX(-5px);
}

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

.timeline-date {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    display: block;
    margin-bottom: 0.5rem;
}

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

.timeline-content h4 {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style: disc;
    padding-left: 1.25rem;
}

.timeline-content li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.exp-narrative {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.exp-contact {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    cursor: pointer;
    transition: opacity var(--transition);
}

.exp-contact:hover {
    opacity: 0.7;
}

.exp-links {
    margin-top: 0.75rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.exp-link {
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: opacity var(--transition);
}

.exp-link:hover {
    opacity: 0.7;
}

.talk-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

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

.project-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow);
}

.project-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

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

.project-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1rem;
    margin-top: auto;
}

.project-tags span {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    background-color: var(--card-bg);
    /* Fallback */
    background-color: rgba(128, 128, 128, 0.1);
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 4px;
    color: var(--text-secondary);
    font-weight: 500;
}

[data-theme='dark'] .project-tags span {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Featured Project */
.project-featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-secondary) 100%);
    border: 2px solid var(--accent);
    padding: 2rem;
}

.project-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-header .project-icon {
    margin-bottom: 0;
}

.project-title-block h3 {
    margin-bottom: 0.25rem;
}

.project-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    background: var(--accent);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.badge-personal {
    background: #6b7280;
}

.badge-team {
    background: #059669;
}

.badge-support {
    background: #f59e0b;
    text-transform: none;
}

.linkedin-icon {
    color: #0a66c2;
    margin-right: 0.25rem;
}

.journey-icon {
    margin-right: 0.25rem;
}

.project-desc-full {
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
}

/* Project Journey Timeline */
.project-journey {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.project-journey h4,
.project-media h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.journey-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.journey-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    transition: all var(--transition);
    min-width: 100px;
    text-align: center;
}

.journey-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.journey-date {
    font-size: 0.65rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.journey-title {
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Project Media */
.project-media {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.media-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.media-link {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition);
}

.media-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.project-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    transition: opacity var(--transition);
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.75rem;
}

/* Unified link button style for project cards */
.project-card .project-link,
.project-card .talk-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
    transition: all var(--transition);
    margin-top: 0;
}

.project-card .project-link:hover,
.project-card .talk-link:hover {
    background-color: rgba(59, 130, 246, 0.2);
    opacity: 1;
}

.project-card .talk-link svg,
.project-card .project-link svg {
    width: 14px;
    height: 14px;
}

.project-card.featured {
    border-color: var(--accent);
    border-width: 2px;
}

.project-link:hover {
    opacity: 0.7;
}

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

.publication-category h3 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.publication-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
}

.pub-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    background-color: var(--accent);
    color: white;
    border-radius: 4px;
    height: fit-content;
}

.pub-content h4 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

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

.pub-venue {
    font-size: 0.8rem;
    color: var(--accent);
    font-style: italic;
}

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

.media-card {
    display: block;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}

.media-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow);
    border-color: var(--accent);
}

.media-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    background-color: var(--bg-secondary);
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

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

.media-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Single card centered layout */
.media-grid.single-card {
    display: flex;
    justify-content: center;
}

.media-card.featured {
    max-width: 600px;
    text-align: center;
}

.media-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.media-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    text-decoration: none;
    transition: all var(--transition);
}

.media-btn:hover {
    background-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

/* ===== Life Grid ===== */
.life-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.life-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all var(--transition);
}

.life-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow);
}

.life-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

.life-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== Contact Section ===== */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all var(--transition);
}

.contact-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.contact-link svg {
    width: 18px;
    height: 18px;
}

/* ===== Teaching Section ===== */
.section-intro {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.teaching-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.teaching-category {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.category-icon {
    font-size: 1.5rem;
}

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

.category-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.teaching-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.teaching-item:last-child {
    border-bottom: none;
}

.teaching-topic {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.teaching-platforms {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
}

.teaching-partners {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.partner-logo {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
}

[data-theme="dark"] .partner-logo {
    background-color: var(--bg-primary);
}

/* Ambassador Card */
.ambassador-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
}

.ambassador-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all var(--transition);
}

.ambassador-card:hover {
    border-color: var(--accent);
    box-shadow: var(--card-shadow);
}

.ambassador-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ambassador-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    flex-shrink: 0;
}

[data-theme="dark"] .ambassador-logo {
    background-color: #1e1e1e;
}

.ambassador-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ambassador-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.ambassador-org {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.ambassador-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.ambassador-desc {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.ambassador-accordions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ambassador-accordion {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.ambassador-accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.6rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    background-color: rgba(59, 130, 246, 0.06);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.ambassador-accordion-toggle:hover {
    background-color: rgba(59, 130, 246, 0.12);
}

.accordion-chevron {
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.ambassador-accordion.open .accordion-chevron {
    transform: rotate(180deg);
}

.ambassador-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.ambassador-accordion.open .ambassador-accordion-content {
    max-height: 500px;
}

.accordion-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.85rem;
    font-size: 0.8rem;
    color: var(--text-primary);
    text-decoration: none;
    border-top: 1px solid var(--border);
    transition: background-color var(--transition);
}

.accordion-link:hover {
    background-color: rgba(59, 130, 246, 0.06);
}

.accordion-link svg {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.accordion-empty {
    display: block;
    padding: 0.55rem 0.85rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
    border-top: 1px solid var(--border);
}

/* ===== Publication Links ===== */
.pub-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
    transition: all var(--transition);
    text-decoration: none;
}

.pub-link:hover {
    background-color: rgba(59, 130, 246, 0.2);
}

/* ===== Invited Talks Section - Compact Grid ===== */
.talks-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.talk-item {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all var(--transition);
    min-height: auto;
}

.talk-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow);
    border-color: var(--accent);
}

.talk-meta {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.talk-year {
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    background: var(--accent);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.talk-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.talk-content h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.talk-subtitle {
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.talk-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.talk-desc:hover {
    color: var(--text-primary);
}

.talk-desc.expanded {
    -webkit-line-clamp: unset;
    display: block;
}

.talk-video-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #ff0000;
    background-color: rgba(255, 0, 0, 0.1);
    border-radius: 6px;
    transition: all var(--transition);
}

.talk-video-link:hover {
    background-color: rgba(255, 0, 0, 0.2);
}

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

.talk-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #0077b5;
    background-color: rgba(0, 119, 181, 0.1);
    border-radius: 4px;
    transition: all var(--transition);
}

.talk-link:hover {
    background-color: rgba(0, 119, 181, 0.2);
}

.talk-link svg {
    width: 14px;
    height: 14px;
}

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

.footer p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

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

    .nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }

    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav a {
        padding: 0.75rem 0;
    }

    .menu-toggle {
        display: flex;
    }

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

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

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

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

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

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

    .teaching-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .teaching-platforms {
        text-align: left;
    }

    .talk-item {
        padding: 1rem;
    }

    .talk-meta {
        width: 100%;
    }

    .talks-list {
        grid-template-columns: 1fr;
    }
}

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

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

    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}