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

:root {
    /* Color Palette - Sophisticated with 4D Go inspiration */
    --primary-color: #2D3748;
    --secondary-color: #4A90E2;
    --accent-color: #667EEA;
    --accent-secondary: #F093FB;
    --text-primary: #1A202C;
    --text-secondary: #4A5568;
    --text-light: #718096;
    --background-primary: #FFFFFF;
    --background-secondary: #F7FAFC;
    --background-overlay: rgba(255, 255, 255, 0.95);
    --border-color: #E2E8F0;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-heavy: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* 4D Go inspired geometric colors */
    --dimension-1: #667EEA;
    --dimension-2: #F093FB;
    --dimension-3: #53F3C4;
    --dimension-4: #F8C291;
    
    /* Typography */
    --font-primary: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-academic: 'Public Sans', Georgia, serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Responsive breakpoints */
    --mobile: 768px;
    --tablet: 1024px;
    --desktop: 1200px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--background-primary);
}

/* Background Animation Integration */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}

.background-animation iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-family: var(--font-academic);
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, var(--dimension-1), var(--dimension-2));
    border-radius: 2px;
}

h3 {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

/* Container */
.container {
    max-width: var(--desktop);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--background-overlay);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: var(--desktop);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-academic);
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: var(--spacing-xs) 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--dimension-1), var(--dimension-2));
    transition: width 0.3s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

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

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Main Content */
.main-content {
    padding-top: 70px;
}

/* Page System */
.page {
    display: none;
    min-height: calc(100vh - 70px);
}

.page.active {
    display: block;
}

/* Page Header */
.page-header {
    text-align: center;
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.05), 
        rgba(240, 147, 251, 0.05));
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23667EEA' fill-opacity='0.05'%3E%3Cpath d='M30 30l15-15v30l-15-15zm-15 0l15 15v-30l-15 15z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.page-header > * {
    position: relative;
    z-index: 1;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: var(--spacing-lg);
}

/* Hero Section */
.hero-section {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.03), 
        rgba(240, 147, 251, 0.03));
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--spacing-2xl);
    align-items: center;
    width: 100%;
}

.hero-text {
    max-width: 600px;
}

.title-main {
    display: block;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    font-family: var(--font-academic);
}

.title-sub {
    display: block;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: var(--spacing-lg);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    max-width: 550px;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* Image Container with 4D Go styling */
.hero-image .image-container {
    position: relative;
    width: 280px;
    height: 280px;
}

.headshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    position: relative;
    z-index: 2;
}

.image-overlay {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 25px;
    background: linear-gradient(135deg, 
        var(--dimension-1), 
        var(--dimension-2),
        var(--dimension-3), 
        var(--dimension-4));
    z-index: 1;
    opacity: 0.7;
    transform: rotate(2deg);
    transition: transform 0.3s ease;
}

.hero-image:hover .image-overlay {
    transform: rotate(4deg) scale(1.02);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--dimension-1), var(--dimension-2));
    color: white;
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

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

.btn-secondary:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

/* About Section */
.about-section {
    padding: var(--spacing-2xl) 0;
    background: var(--background-secondary);
}

.about-content h2 {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.7;
}

.about-text p {
    margin-bottom: var(--spacing-md);
}

/* Research Page Styles */
.research-content {
    padding: var(--spacing-lg) 0;
}

.focus-areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.focus-card {
    background: var(--background-primary);
    padding: var(--spacing-lg);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
}

.focus-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--dimension-1), var(--dimension-2));
    border-radius: 12px 12px 0 0;
}

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

.focus-card h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.methodology-section {
    margin: var(--spacing-2xl) 0;
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.05), 
        rgba(240, 147, 251, 0.05));
    border-radius: 16px;
}

.methodology-list {
    list-style: none;
    margin: var(--spacing-lg) 0;
}

.methodology-list li {
    padding: var(--spacing-sm) 0;
    padding-left: var(--spacing-lg);
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.methodology-list li:last-child {
    border-bottom: none;
}

.methodology-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--dimension-1), var(--dimension-2));
    border-radius: 50%;
}

/* CV Page Styles */
.cv-actions {
    margin-top: var(--spacing-lg);
}

.cv-content {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-lg) 0;
}

.cv-section {
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-xl);
    background: var(--background-primary);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.cv-section::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, 
        var(--dimension-1), 
        var(--dimension-2), 
        var(--dimension-3));
    border-radius: 23px;
    z-index: -1;
    opacity: 0.8;
}

.cv-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), 0 8px 15px rgba(0, 0, 0, 0.08);
}

.cv-item {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: 
        rgba(255, 255, 255, 0.9),
        linear-gradient(135deg, 
            rgba(102, 126, 234, 0.08), 
            rgba(240, 147, 251, 0.08));
    border-radius: 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.cv-item:hover {
    transform: translateY(-3px);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
    background: 
        rgba(255, 255, 255, 0.95),
        linear-gradient(135deg, 
            rgba(102, 126, 234, 0.12), 
            rgba(240, 147, 251, 0.12));
}

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

.cv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-xs);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.cv-date {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.cv-institution {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: var(--spacing-xs);
}

.research-interests {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-sm);
    list-style: none;
}

.research-interests li {
    padding: var(--spacing-md) var(--spacing-lg);
    background: 
        rgba(255, 255, 255, 0.9),
        linear-gradient(135deg, 
            rgba(102, 126, 234, 0.2), 
            rgba(240, 147, 251, 0.2));
    border-radius: 20px;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid rgba(102, 126, 234, 0.4);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
    text-align: center;
}

.research-interests li:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.25);
    background: 
        rgba(255, 255, 255, 0.95),
        linear-gradient(135deg, 
            rgba(102, 126, 234, 0.3), 
            rgba(240, 147, 251, 0.3));
    border-color: rgba(102, 126, 234, 0.6);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.skill-category {
    padding: var(--spacing-lg);
    background: 
        rgba(255, 255, 255, 0.9),
        linear-gradient(135deg, 
            rgba(102, 126, 234, 0.08), 
            rgba(240, 147, 251, 0.08));
    border-radius: 20px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-4px);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.15);
    background: 
        rgba(255, 255, 255, 0.95),
        linear-gradient(135deg, 
            rgba(102, 126, 234, 0.12), 
            rgba(240, 147, 251, 0.12));
}

.skill-category h3 {
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--text-primary);
    position: relative;
    border-radius: 16px;
    transition: all 0.3s ease;
    margin-bottom: var(--spacing-sm);
    background: 
        rgba(255, 255, 255, 0.9),
        linear-gradient(135deg, 
            rgba(102, 126, 234, 0.12), 
            rgba(240, 147, 251, 0.12));
    border: 2px solid rgba(102, 126, 234, 0.25);
    font-weight: 600;
    font-size: 1.05rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.skill-category li:hover {
    background: 
        rgba(255, 255, 255, 0.95),
        linear-gradient(135deg, 
            rgba(102, 126, 234, 0.2), 
            rgba(240, 147, 251, 0.2));
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.4);
}


/* Teaching Page Styles */
.teaching-philosophy {
    margin-bottom: var(--spacing-2xl);
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.teaching-philosophy p {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
}

.interest-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.interest-card {
    background: var(--background-primary);
    padding: var(--spacing-lg);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.interest-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--dimension-1), var(--dimension-2), var(--dimension-3));
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.interest-card:hover::after {
    opacity: 0.7;
}

.approach-list {
    list-style: none;
    max-width: 900px;
    margin: 0 auto;
}

.approach-list li {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--background-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

/* Footer */
.main-footer {
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
    margin-top: var(--spacing-2xl);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--spacing-xl);
    align-items: start;
}

.contact-info h3 {
    color: white;
    margin-bottom: var(--spacing-sm);
}

.contact-info p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-xs);
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 6px;
}

.footer-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.footer-bottom {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background-overlay);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: var(--spacing-lg);
        border-bottom: 1px solid var(--border-color);
        gap: var(--spacing-md);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-lg);
    }
    
    .hero-image {
        justify-self: center;
    }
    
    .hero-image .image-container {
        width: 220px;
        height: 220px;
    }
    
    .focus-areas,
    .interest-cards {
        grid-template-columns: 1fr;
    }
    
    .cv-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        max-width: 250px;
    }
}