/* ===== CSS Custom Properties ===== */
[data-theme="dark"] {
    --bg-primary: #0a0f1c;
    --bg-secondary: #111827;
    --bg-card: #1a2332;
    --bg-card-hover: #1f2b3d;
    --text-primary: #f0f4f8;
    --text-secondary: #b0bec5;
    --text-muted: #8899a6;
    --accent: #06b6d4;
    --accent-light: #22d3ee;
    --accent-dark: #0891b2;
    --accent-glow: rgba(6, 182, 212, 0.15);
    --accent-secondary: #8b5cf6;
    --gradient-primary: linear-gradient(135deg, #06b6d4, #8b5cf6);
    --gradient-subtle: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(139, 92, 246, 0.1));
    --border: rgba(148, 163, 184, 0.12);
    --border-hover: rgba(6, 182, 212, 0.3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px rgba(6, 182, 212, 0.15);
    --canvas-particle-opacity: 1;
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent: #0891b2;
    --accent-light: #06b6d4;
    --accent-dark: #0e7490;
    --accent-glow: rgba(8, 145, 178, 0.08);
    --accent-secondary: #7c3aed;
    --gradient-primary: linear-gradient(135deg, #0891b2, #7c3aed);
    --gradient-subtle: linear-gradient(135deg, rgba(8, 145, 178, 0.06), rgba(124, 58, 237, 0.06));
    --border: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(8, 145, 178, 0.3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 30px rgba(8, 145, 178, 0.08);
    --canvas-particle-opacity: 0.35;
}

:root {
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== Scroll Progress Bar ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--gradient-primary);
    z-index: 10001;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* ===== Cursor Glow ===== */
.cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.06) 0%, transparent 70%);
    transform: translate(-50%, -50%);
}

[data-theme="light"] .cursor-glow {
    background: radial-gradient(circle, rgba(8, 145, 178, 0.04) 0%, transparent 70%);
}

/* ===== Skip to Content (Accessibility) ===== */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 10000;
    padding: 12px 24px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-to-content:focus {
    top: 16px;
}

/* ===== Back to Top Button ===== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 999;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-md);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    color: var(--accent);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Animated Background ===== */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: var(--canvas-particle-opacity);
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all var(--transition-smooth);
}

.navbar.scrolled {
    background: rgba(10, 15, 28, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

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

.nav-logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
}

.nav-logo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateX(-50%);
    border-radius: 1px;
}

.nav-link {
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--accent-glow);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 60%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ===== Theme Toggle ===== */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

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

.theme-icon {
    width: 18px;
    height: 18px;
}

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

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 120px 24px 60px;
}

.hero-content {
    max-width: 1100px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.hero-greeting {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 12px;
    font-weight: 500;
    font-style: italic;
}

.hero-name {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title-wrapper {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    min-height: 1.5em;
}

.hero-title-static {
    color: var(--text-secondary);
}

.typed-text {
    color: var(--accent);
    font-weight: 500;
}

.typed-cursor {
    color: var(--accent);
    animation: blink 1s infinite;
}

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

.hero-description {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 480px;
    margin-bottom: 28px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
}

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

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.hero-social {
    display: flex;
    gap: 16px;
}

.hero-social a {
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

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

.hero-social svg {
    width: 22px;
    height: 22px;
}

/* Hero Image */
.hero-image {
    display: flex;
    justify-content: center;
}

.hero-image-wrapper {
    width: 300px;
    height: 380px;
    border-radius: 24px;
    overflow: hidden;
    border: 3px solid var(--border);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-image-wrapper:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(6, 182, 212, 0.25);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    transition: opacity var(--transition-smooth);
}

.profile-bw {
    position: absolute;
    top: 0;
    left: 0;
}

.profile-color {
    opacity: 0;
}

.hero-image-wrapper:hover .profile-bw {
    opacity: 0;
}

.hero-image-wrapper:hover .profile-color {
    opacity: 1;
}

/* Scroll Indicator */
.scroll-indicator {
    margin-top: 40px;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    animation: scrollBounce 2s infinite;
    opacity: 0.5;
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translate(0, 0); }
    50% { transform: rotate(45deg) translate(6px, 6px); }
}

/* Animations */
.animate-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.animate-in:nth-child(1) { animation-delay: 0.1s; }
.animate-in:nth-child(2) { animation-delay: 0.2s; }
.animate-in:nth-child(3) { animation-delay: 0.3s; }
.animate-in:nth-child(4) { animation-delay: 0.4s; }
.animate-in:nth-child(5) { animation-delay: 0.5s; }
.animate-in:nth-child(6) { animation-delay: 0.6s; }
.animate-in:nth-child(7) { animation-delay: 0.7s; }

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

/* ===== Sections ===== */
.section {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

.section:nth-child(even) {
    background: var(--bg-secondary);
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--gradient-primary);
    margin: 16px auto 40px;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    max-width: 750px;
    margin: -30px auto 50px;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
}

/* ===== About Section ===== */
.about-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    margin-top: 30px;
    margin-bottom: 10px;
}

.about-subtitle:first-of-type {
    margin-top: 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.download-badges {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.download-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.download-badge:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.download-badge svg {
    width: 16px;
    height: 16px;
}

.about-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.detail-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.detail-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-subtle);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.detail-icon svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.detail-card h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.detail-card p {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* ===== Floating Icons ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.detail-icon,
.beyond-icon,
.skill-icon {
    animation: float 4s ease-in-out infinite;
}

.detail-icon { animation-delay: 0s; }
.beyond-icon { animation-delay: 0.5s; }
.skill-icon { animation-delay: 1s; }

/* ===== 3D Tilt Cards ===== */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.tilt-card .tilt-inner {
    transition: transform 0.15s ease-out;
    transform-style: preserve-3d;
}

.tilt-card .tilt-shine {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.tilt-card:hover .tilt-shine {
    opacity: 1;
}

/* ===== Magnetic Button ===== */
.btn-magnetic {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow var(--transition-fast);
}

/* ===== Animated Timeline ===== */
.timeline::before {
    background: linear-gradient(to bottom, var(--accent) var(--timeline-progress, 0%), var(--border) var(--timeline-progress, 0%));
    transition: none;
}

.timeline-marker {
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-marker.active {
    background: var(--accent);
    transform: scale(1.3);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

/* ===== Staggered Reveals ===== */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.5s; }
.reveal-stagger > .reveal:nth-child(7) { transition-delay: 0.6s; }
.reveal-stagger > .reveal:nth-child(8) { transition-delay: 0.7s; }

/* ===== Text Scramble ===== */
.hero-name {
    cursor: default;
}

.hero-name .scramble-char {
    display: inline-block;
    transition: transform 0.1s ease;
}

/* ===== Section Parallax ===== */
.section-title {
    will-change: transform;
}

/* ===== Enhanced Skill Tags ===== */
.skill-tag {
    cursor: default;
    position: relative;
    overflow: hidden;
}

.skill-tag::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.skill-tag:hover::after {
    opacity: 0.1;
}

.skill-tag:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Timeline / Experience ===== */
.timeline {
    position: relative;
    padding-left: 40px;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

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

.timeline-marker {
    position: absolute;
    left: -47px;
    top: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--accent);
    z-index: 1;
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: all var(--transition-fast);
}

.timeline-content:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

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

.timeline-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    background: var(--gradient-subtle);
    color: var(--text-muted);
    white-space: nowrap;
}

.timeline-badge.current {
    background: var(--gradient-primary);
    color: #fff;
}

.timeline-org {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.timeline-sub {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ===== Education Section ===== */
.education-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.education-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    border-top: 3px solid transparent;
    border-image: var(--gradient-primary) 1;
    border-image-slice: 1 1 0 1;
    transition: all var(--transition-fast);
}

.education-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
    border-image: var(--gradient-primary) 1;
    border-image-slice: 1 1 0 1;
}

.education-year {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 8px;
}

.education-card h3 {
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.education-field {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.education-school {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.education-details p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 10px;
}

.education-details p:last-child {
    margin-bottom: 0;
}

/* ===== Teaching Section ===== */
.teaching-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.teaching-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: all var(--transition-fast);
}

.teaching-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.teaching-level {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-secondary);
    margin-bottom: 12px;
}

.teaching-card h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.teaching-role {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.teaching-card p:last-child {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.teaching-cta {
    text-align: center;
    margin-top: 40px;
}

/* ===== Publications Section ===== */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.publication-item {
    display: flex;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: all var(--transition-fast);
}

.publication-item:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.pub-type {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 14px;
    border-radius: var(--radius-sm);
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-secondary);
    white-space: nowrap;
    align-self: flex-start;
    height: fit-content;
}

.pub-content h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

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

.pub-venue {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 10px;
}

.pub-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.pub-links {
    display: flex;
    gap: 16px;
}

.pub-links a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.pub-links a:hover {
    color: var(--accent-light);
}

/* ===== Beyond the Lab Section ===== */
.beyond-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.beyond-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 35px;
    transition: all var(--transition-smooth);
}

.beyond-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.beyond-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-subtle);
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
}

.beyond-icon svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.beyond-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.beyond-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.beyond-link {
    display: inline-block;
    margin-top: 14px;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.beyond-link:hover {
    color: var(--accent-light);
}

/* ===== Skills Section ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    transition: all var(--transition-fast);
}

.skill-category:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.skill-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-subtle);
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
}

.skill-icon svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.skill-category h3 {
    font-size: 1.05rem;
    margin-bottom: 16px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    font-size: 0.8rem;
    padding: 5px 14px;
    border-radius: 20px;
    background: var(--gradient-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: all var(--transition-fast), transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    animation: tagFadeIn 0.4s forwards;
}

.skill-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

@keyframes tagFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skill-tag:nth-child(1) { animation-delay: 0.05s; }
.skill-tag:nth-child(2) { animation-delay: 0.1s; }
.skill-tag:nth-child(3) { animation-delay: 0.15s; }
.skill-tag:nth-child(4) { animation-delay: 0.2s; }
.skill-tag:nth-child(5) { animation-delay: 0.25s; }
.skill-tag:nth-child(6) { animation-delay: 0.3s; }
.skill-tag:nth-child(7) { animation-delay: 0.35s; }
.skill-tag:nth-child(8) { animation-delay: 0.4s; }

/* ===== Molecular Viewer Section ===== */
.molecule-wrapper {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
    align-items: start;
}

.molecule-viewer-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mol-viewer {
    width: 100%;
    height: 420px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: #0d1117;
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .mol-viewer {
    background: #f0f3f6;
}

.mol-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mol-controls-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mol-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mol-btn:hover {
    border-color: var(--border-hover);
    color: var(--accent);
}

.mol-btn.active {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
}

.mol-btn svg {
    width: 14px;
    height: 14px;
}

.mol-select {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
    flex: 1;
}

.mol-select:hover,
.mol-select:focus {
    border-color: var(--border-hover);
    color: var(--accent);
}

.molecule-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mol-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: all var(--transition-fast);
}

.mol-info-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.mol-info-card h3 {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.mol-pdb-id {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.mol-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.mol-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.mol-meta-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: var(--gradient-subtle);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.mol-meta-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.mol-meta-value {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mol-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Loading state */
.mol-viewer.loading::after {
    content: 'Loading structure...';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: var(--font-mono);
    background: inherit;
    z-index: 2;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* ===== Projects Section ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: all var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.project-icon {
    width: 40px;
    height: 40px;
    color: var(--accent);
}

.project-link {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

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

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

.project-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.project-card > p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.project-tags span {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--gradient-subtle);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* ===== Contact Section ===== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-text p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.7;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

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

.contact-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: border-color var(--transition-fast);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
}

.form-group label {
    position: absolute;
    left: 16px;
    top: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    pointer-events: none;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -8px;
    left: 12px;
    font-size: 0.75rem;
    background: var(--bg-secondary);
    padding: 0 6px;
    color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    align-self: flex-start;
}

.btn-submit svg {
    width: 16px;
    height: 16px;
}

/* ===== Footer ===== */
.footer {
    position: relative;
    z-index: 1;
    padding: 30px 0;
    border-top: 1px solid var(--border);
}

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

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

.footer-links {
    display: flex;
    gap: 24px;
}

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

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

/* ===== Light Theme Overrides ===== */
[data-theme="light"] .navbar.scrolled {
    background: rgba(248, 250, 252, 0.85);
}

[data-theme="light"] .timeline-marker {
    background: var(--bg-primary);
}

[data-theme="light"] .form-group input:focus + label,
[data-theme="light"] .form-group input:not(:placeholder-shown) + label,
[data-theme="light"] .form-group textarea:focus + label,
[data-theme="light"] .form-group textarea:not(:placeholder-shown) + label {
    background: var(--bg-primary);
}

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

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .molecule-wrapper {
        grid-template-columns: 1fr;
    }

    .mol-viewer {
        height: 360px;
    }
}

/* ===== Responsive: 768px ===== */
@media (max-width: 768px) {
    .publication-item {
        flex-direction: column;
        gap: 12px;
    }

    .pub-type {
        align-self: flex-start;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 0;
        border-left: 1px solid var(--border);
        transition: right var(--transition-smooth);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        font-size: 1rem;
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-image-wrapper {
        width: 240px;
        height: 300px;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

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

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

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

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

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

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

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

    .mol-viewer {
        height: 300px;
    }

    .mol-meta {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* ===== Responsive: 480px ===== */
@media (max-width: 480px) {
    .section {
        padding: 60px 0;
    }

    .hero {
        padding: 100px 16px 40px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .download-badges {
        flex-direction: column;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline-marker {
        left: -31px;
        width: 12px;
        height: 12px;
    }

    .timeline-content {
        padding: 20px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
    }
}
