/* ================================
   CSS Custom Properties (Variables)
   ================================ */
:root {
    /* Colors */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #7c3aed; /* Professional purple accent */
    --highlight-color: #f59e0b; /* Warm amber for highlights */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --background: #ffffff;
    --background-alt: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ================================
   Utility Classes
   ================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    font-size: 2.5rem;
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4rem;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--highlight-color));
    border-radius: var(--radius-sm);
}

/* ================================
   Buttons
   ================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    gap: var(--spacing-xs);
}

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

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

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

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

/* ================================
   Navigation
   ================================ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all var(--transition-normal);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    padding: 0.5rem 0;
    position: relative;
    transition: color var(--transition-fast);
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-normal);
}

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

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

.bar {
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
}

/* ================================
   Hero Section
   ================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--background) 0%, var(--background-alt) 100%);
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    padding-bottom: var(--spacing-2xl);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%232563eb" stop-opacity="0.1"/><stop offset="100%" stop-color="%232563eb" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="300" fill="url(%23a)"/><circle cx="800" cy="800" r="400" fill="url(%23a)"/></svg>') no-repeat center;
    background-size: cover;
    opacity: 0.6;
    z-index: -1;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 4rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-weight: var(--font-weight-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    text-align: center;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.hero-social {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    position: relative;
    z-index: 5;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--background-alt);
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-light);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* ================================
   About Section
   ================================ */
.about {
    padding: var(--spacing-2xl) 0;
    background: var(--background-alt);
    position: relative;
    z-index: 10;
    margin-top: 0;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--spacing-2xl);
    align-items: start;
}

.about-photo {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.profile-photo {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-large);
    border: 4px solid var(--background);
    transition: transform var(--transition-normal);
}

.profile-photo:hover {
    transform: scale(1.02);
}

.about-text {
    text-align: left;
}

.about-text p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

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

.highlight {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-light);
    transition: transform var(--transition-normal);
}

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

.highlight i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.highlight h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.highlight p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* ================================
   Experience Section
   ================================ */
.experience {
    padding: var(--spacing-2xl) 0;
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
}

.timeline-item {
    position: relative;
    margin-bottom: var(--spacing-xl);
    padding-left: 5rem;
}

.timeline-marker {
    position: absolute;
    left: 1.25rem;
    top: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 3px solid var(--background);
    box-shadow: var(--shadow-medium);
}

.timeline-marker.research {
    background: var(--primary-color);
}

.timeline-marker.work {
    background: var(--accent-color);
}

.timeline-marker.teaching {
    background: var(--highlight-color);
}

.timeline-content {
    background: var(--background);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-light);
    transition: all var(--transition-normal);
}

.timeline-content:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

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

.timeline-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: var(--font-weight-medium);
    background: var(--background-alt);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
}

.timeline-content h4 {
    color: var(--primary-color);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
}

.timeline-content ul {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-md);
}

.timeline-content li {
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.tech {
    background: var(--background-alt);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
}

/* ================================
   Projects Section
   ================================ */
.projects {
    padding: var(--spacing-2xl) 0;
    background: var(--background-alt);
}

.projects-intro {
    max-width: 850px;
    margin: 0 auto var(--spacing-2xl);
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
}

.project-groups {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2xl);
}

.project-group-title {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.project-group-title::before {
    content: '';
    width: 2.5rem;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-sm);
}

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

.projects-grid-featured {
    margin-bottom: var(--spacing-lg);
}

.projects-grid-sub {
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.project-card {
    background: var(--background);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-light);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
}

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

.project-card.featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
}

.project-card.featured .project-description,
.project-card.featured h3 {
    color: white;
}

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

.project-header h3 {
    font-size: 1.5rem;
    margin: 0;
}

.project-links {
    display: flex;
    gap: var(--spacing-sm);
}

.project-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--background-alt);
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.project-card.featured .project-link {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.project-link:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.project-tech .tech {
    background: var(--background-alt);
    color: var(--text-secondary);
}

.project-card.featured .project-tech .tech {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.project-stats {
    display: flex;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: white;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ================================
   Skills Section
   ================================ */
.skills {
    padding: var(--spacing-2xl) 0;
}

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

.skill-category {
    background: var(--background);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-light);
    transition: transform var(--transition-normal);
}

.skill-category:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.skill-category i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.skill-tag {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    transition: transform var(--transition-fast);
}

.skill-tag:hover {
    transform: scale(1.05);
}

/* ================================
   Contact Section
   ================================ */
.contact {
    padding: var(--spacing-2xl) 0;
    background: var(--background-alt);
}

.contact-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--spacing-2xl) auto;
}

.contact-intro h3 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.contact-intro p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Contact Methods Styles */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.contact-card {
    background: var(--background);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    text-align: center;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

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

.contact-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.contact-card h4 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.contact-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.contact-card .btn {
    margin-top: auto;
    padding-top: var(--spacing-sm);
}

/* Consistent button styling for contact cards */
.contact-card:nth-child(1) .btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.contact-card:nth-child(2) .btn {
    background: linear-gradient(135deg, var(--accent-color), #6d28d9);
}

.contact-card:nth-child(3) .btn {
    background: linear-gradient(135deg, var(--secondary-color), #475569);
    color: white;
}

.contact-card:nth-child(3) .btn:hover {
    background: linear-gradient(135deg, #475569, #334155);
    color: white;
    transform: translateY(-2px);
}

.contact-footer {
    background: var(--background);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-light);
    text-align: center;
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--highlight-color)) 1;
    max-width: 700px;
    margin: 0 auto;
}

.direct-contact h4 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.25rem;
}

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

.direct-contact a {
    color: var(--primary-color);
    font-weight: var(--font-weight-medium);
}

.response-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    font-size: 0.95rem;
    color: var(--text-light);
    margin-top: var(--spacing-md);
}

.response-time i {
    color: var(--highlight-color);
}

/* ================================
   Footer
   ================================ */
.footer {
    background: var(--text-primary);
    color: var(--text-light);
    padding: var(--spacing-xl) 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-text p {
    margin: 0;
    font-size: 0.9rem;
}

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

.footer-links a {
    color: var(--text-light);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

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

/* ================================
   Back to Top Button
   ================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    box-shadow: var(--shadow-medium);
    transition: all var(--transition-normal);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 768px) {
    /* Typography adjustments */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .section-title { font-size: 2rem; }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 4rem;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: left var(--transition-normal);
        box-shadow: var(--shadow-medium);
        padding: var(--spacing-lg) 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    /* Hero section */
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    /* About section */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
    }
    
    .about-text {
        text-align: center;
    }
    
    .profile-photo {
        width: 200px;
        height: 200px;
    }
    
    .about-highlights {
        grid-template-columns: 1fr;
    }
    
    .highlight {
        text-align: left;
    }
    
    /* Timeline */
    .timeline::before {
        left: 1rem;
    }
    
    .timeline-item {
        padding-left: 3rem;
    }
    
    .timeline-marker {
        left: 0.25rem;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card.featured {
        grid-column: 1;
    }

    .project-group-title {
        justify-content: center;
        text-align: center;
    }

    .project-group-title::before {
        display: none;
    }
    
    .project-stats {
        justify-content: center;
    }
    
    /* Skills */
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .response-time {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    /* Further mobile optimizations */
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .social-links .social-link {
        flex: 1;
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
}

/* ================================
   Animations and Interactions
   ================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling for sections */
section {
    scroll-margin-top: 4rem;
    position: relative;
}

/* Ensure proper section separation */
section:not(.hero) {
    clear: both;
    position: relative;
    z-index: 10;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .back-to-top,
    .contact-form {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    section {
        break-inside: avoid;
        margin-bottom: 2rem;
    }
}

/* ================================
   Portfolio Section Styles
   ================================ */
.portfolio {
    background: var(--background);
    padding: var(--spacing-2xl) 0;
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.evidence-category {
    margin-bottom: 4rem;
    background: var(--background-alt);
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.evidence-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.evidence-title i {
    font-size: 1.5rem;
}

.evidence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.evidence-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.evidence-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-large);
}

.evidence-card h4 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.evidence-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Portfolio Images */
.portfolio-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1rem auto;
    display: block;
    box-shadow: var(--shadow-medium);
    transition: transform var(--transition-normal);
}

.portfolio-image:hover {
    transform: scale(1.02);
}

/* Portfolio Videos */
.portfolio-video {
    width: 100%;
    max-width: 600px;
    max-height: 400px;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1rem auto;
    display: block;
    box-shadow: var(--shadow-medium);
    background: #000;
    object-fit: contain;
}

.portfolio-video:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    margin: 1rem auto;
    background: #000;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.evidence-note {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.75rem;
}

/* Placeholder Styles */
.video-placeholder,
.image-placeholder {
    background: linear-gradient(135deg, var(--background-alt), var(--border-color));
    border: 2px dashed var(--primary-color);
    border-radius: var(--radius-md);
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 1rem;
}

.video-placeholder i,
.image-placeholder i {
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.placeholder-text {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.placeholder-instructions {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.6;
}

.placeholder-instructions strong {
    color: #856404;
    display: block;
    margin-bottom: 0.5rem;
}

.placeholder-instructions ul {
    margin-top: 0.5rem;
    margin-left: 1.5rem;
}

.placeholder-instructions li {
    margin-bottom: 0.3rem;
    color: #856404;
}

.written-sample {
    background: var(--background-alt);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-color);
    margin: 1rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.citation {
    background: var(--background-alt);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
    font-size: 0.9rem;
}

.citation strong {
    color: var(--text-primary);
}

.evidence-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-top: 1rem;
    transition: color var(--transition-fast);
}

.evidence-link:hover {
    color: var(--primary-dark);
}

.tech-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.tech-stack-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.tech-achievements {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.tech-achievements li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.tech-achievements li:last-child {
    border-bottom: none;
}

/* ================================
   Leadership Section Styles
   ================================ */
.leadership {
    background: var(--background-alt);
    padding: var(--spacing-2xl) 0;
}

.leadership-philosophy {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    margin-bottom: 3rem;
}

.leadership-philosophy h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.philosophy-content {
    line-height: 1.8;
    color: var(--text-primary);
}

.leadership-experiences h3 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.leadership-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    margin-bottom: 2rem;
    border-left: 5px solid var(--accent-color);
}

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

.leadership-header i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-top: 0.25rem;
}

.leadership-header h4 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.leadership-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

.reflection-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.reflection-section h5 {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.experience-synthesis {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    margin-bottom: 3rem;
}

.experience-synthesis h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.synthesis-content {
    line-height: 1.8;
    color: var(--text-primary);
}

.ethics-section {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-large);
}

.ethics-section h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.ethics-content {
    line-height: 1.8;
}

.ethics-content .placeholder-instructions {
    background: rgba(255, 255, 255, 0.2);
    border-left-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.ethics-content .placeholder-instructions strong {
    color: white;
}

.ethics-content .placeholder-instructions li {
    color: rgba(255, 255, 255, 0.9);
}

.ethics-content .placeholder-text {
    color: rgba(255, 255, 255, 0.9);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .evidence-grid {
        grid-template-columns: 1fr;
    }
    
    .leadership-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .leadership-header i {
        font-size: 1.5rem;
    }
}

/* ================================
   Credits Section Styles
   ================================ */
.credits-section {
    background: var(--background-alt);
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.credits-section h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
}

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

.credit-category {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-light);
}

.credit-category h4 {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.credit-category ul {
    list-style: none;
    padding: 0;
}

.credit-category li {
    padding: 0.5rem 0;
    color: var(--text-primary);
    line-height: 1.6;
    border-bottom: 1px solid var(--border-color);
}

.credit-category li:last-child {
    border-bottom: none;
}

.credit-category strong {
    color: var(--text-primary);
    font-weight: 600;
}

.collaborative-note {
    background: #e0f2fe;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    margin-top: 2rem;
}

.collaborative-note p {
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
}

.cxc-note {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .credits-grid {
        grid-template-columns: 1fr;
    }
}