:root {
    /* Colors */
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #ffffff;
    --bg-alt: #f8f9fa;
    --border-color: #e0e0e0;

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-secondary: Georgia, 'Times New Roman', serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
}

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

html {
    scroll-behavior: smooth;
    /* Fluid typography: scales from 14px on mobile to 16px on desktop */
    font-size: clamp(14px, 0.875rem + 0.5vw, 16px);
}

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

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

/* Fluid typography for headings */
h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 1.25rem + 1.5vw, 2rem); }
h3 { font-size: clamp(1.25rem, 1rem + 1vw, 1.5rem); }
h4 { font-size: clamp(1.1rem, 0.95rem + 0.5vw, 1.25rem); }

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

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

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

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

ul {
    list-style-position: inside;
}

/* ===================================
   Container & Layout
   =================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
}

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

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--primary-color);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: var(--spacing-sm) auto 0;
    border-radius: 2px;
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
    color: var(--text-light);
    font-size: clamp(0.95rem, 1vw + 0.5rem, 1.1rem);
}

/* ===================================
   Navigation
   =================================== */
#navbar {
    background-color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

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

.logo {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
}

.nav-link {
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 4px;
    transition: background-color var(--transition-fast);
    /* Minimum touch target for mobile */
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: var(--transition-medium);
    border-radius: 2px;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: white;
    padding: clamp(2rem, 5vw, 4rem) var(--spacing-md);
    position: relative;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 2vw + 0.5rem, 1.8rem);
    margin-bottom: var(--spacing-xs);
    color: var(--secondary-color);
    font-weight: 500;
}

.hero-affiliation {
    font-size: clamp(1rem, 1.5vw + 0.5rem, 1.3rem);
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
}

.hero-description {
    font-size: clamp(0.95rem, 1vw + 0.5rem, 1.1rem);
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: var(--spacing-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
    margin-top: var(--spacing-xs);
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 4px;
    font-weight: 500;
    transition: all var(--transition-medium);
    cursor: pointer;
    border: 2px solid transparent;
    /* Ensure minimum touch target size of 44px */
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

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

.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

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

/* ===================================
   About Section
   =================================== */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-lg);
    align-items: start;
}

.about-text {
    font-size: 1.05rem;
}

.lead {
    font-size: clamp(1.05rem, 1.5vw + 0.5rem, 1.25rem);
    color: var(--primary-color);
    font-weight: 500;
}

.philosophy {
    background-color: var(--bg-alt);
    padding: var(--spacing-md);
    border-left: 4px solid var(--secondary-color);
    margin-top: var(--spacing-md);
    border-radius: 4px;
}

.about-highlights {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
}

.highlight-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    border: 2px solid var(--border-color);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.highlight-card h3 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-xs);
}

.highlight-card p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===================================
   Teaching Section
   =================================== */
.teaching-grid {
    display: grid;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.course-category h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--border-color);
}

.course-card {
    background: white;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--secondary-color);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.course-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.course-card h4 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.course-card p {
    color: var(--text-light);
    margin: 0;
}

.teaching-approach {
    background: var(--bg-color);
    padding: var(--spacing-lg);
    border-radius: 8px;
    margin-top: var(--spacing-xl);
}

.teaching-approach h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

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

.approach-item {
    text-align: center;
    padding: var(--spacing-md);
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.approach-item h4 {
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
}

/* ===================================
   Research Section
   =================================== */
.research-areas {
    margin-bottom: var(--spacing-lg);
}

.research-areas h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.areas-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    justify-content: center;
}

.area-tag {
    background-color: var(--secondary-color);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.grants-section {
    margin-bottom: var(--spacing-lg);
}

.grants-section h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.grant-list {
    display: grid;
    gap: var(--spacing-md);
}

.grant-item {
    background: white;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--accent-color);
}

.grant-item h4 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.grant-item p {
    margin-bottom: var(--spacing-xs);
}

.grant-link {
    display: inline-block;
    margin-top: var(--spacing-xs);
    font-weight: 500;
}

.patents-section h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

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

.patent-card {
    background: var(--bg-alt);
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--accent-color);
}

.patent-card h4 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
}

/* ===================================
   Publications Section
   =================================== */
.publications-grid {
    display: grid;
    gap: var(--spacing-lg);
}

.pub-category h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--border-color);
}

.pub-item {
    background: white;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.pub-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.pub-item h4 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.pub-venue {
    color: var(--secondary-color);
    font-weight: 500;
    font-style: italic;
    margin-bottom: var(--spacing-xs);
}

.pub-description {
    color: var(--text-light);
    margin-bottom: var(--spacing-sm);
}

.pub-link {
    font-weight: 500;
    display: inline-block;
}

/* ===================================
   Projects Section
   =================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.project-card {
    background: white;
    border-radius: 8px;
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
    border: 2px solid var(--border-color);
}

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

.project-card.featured {
    border-color: var(--secondary-color);
    background: linear-gradient(to bottom, #f8f9fa 0%, white 100%);
}

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

.project-tag {
    background-color: var(--secondary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-year {
    color: var(--text-light);
    font-weight: 500;
}

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

.project-description {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

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

.project-tech span {
    background-color: var(--bg-alt);
    color: var(--text-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    text-align: center;
}

.stat {
    background: var(--bg-alt);
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-xs);
}

.stat p {
    margin: 0;
    color: var(--text-light);
}

/* ===================================
   Awards Section
   =================================== */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.award-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
    border: 2px solid var(--border-color);
}

.award-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.award-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

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

.award-org {
    color: var(--text-light);
    margin-bottom: var(--spacing-xs);
}

.award-year {
    color: var(--secondary-color);
    font-weight: 500;
    margin: 0;
}

.media-section h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

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

.media-item {
    background: white;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--secondary-color);
}

.media-item h4 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.media-item p {
    color: var(--text-light);
    margin: 0;
}

/* ===================================
   Contact Section
   =================================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    max-width: 900px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    gap: var(--spacing-md);
}

.contact-item h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
    font-size: 1.1rem;
}

.contact-item p {
    color: var(--text-light);
    margin: 0;
    line-height: 1.8;
}

.contact-item a {
    display: inline-block;
    margin-top: var(--spacing-xs);
}

.cta-box {
    background: var(--bg-alt);
    padding: var(--spacing-lg);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--secondary-color);
}

.cta-box h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

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

.cta-box li {
    color: var(--text-light);
    margin-bottom: var(--spacing-xs);
}

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

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

.footer-text p {
    margin-bottom: var(--spacing-xs);
}

.footer-tagline {
    font-style: italic;
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer-links a {
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid white;
    border-radius: 4px;
    transition: background-color var(--transition-fast);
}

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

/* ===================================
   Animations
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ===================================
   Responsive Design
   =================================== */

/* Large tablets and small desktops: 1024px and down */
@media (max-width: 1024px) {
    .container {
        padding: 0 clamp(1rem, 3vw, 2rem);
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .teaching-grid {
        gap: var(--spacing-md);
    }
}

/* Tablets: 768px and down */
@media (max-width: 768px) {
    /* Navigation - Mobile Menu */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: var(--primary-color);
        width: 100%;
        text-align: center;
        transition: left var(--transition-medium);
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-md) 0;
        gap: 0;
    }

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

    .nav-link {
        width: 100%;
        justify-content: center;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .hamburger {
        display: flex;
        /* Ensure hamburger is touch-friendly */
        min-width: 44px;
        min-height: 44px;
    }

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

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

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

    /* Hero Section - Reduce height on mobile */
    .hero {
        min-height: 85vh;
        padding: clamp(1.5rem, 4vw, 3rem) var(--spacing-md);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 300px;
    }

    .scroll-indicator {
        display: none; /* Hide on tablet/mobile to save space */
    }

    /* Layout - Single column for most grids */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .about-highlights {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

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

    .projects-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

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

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

    .teaching-grid {
        gap: var(--spacing-md);
    }

    /* Spacing adjustments */
    .section {
        padding: clamp(2rem, 5vw, 3rem) 0;
    }

    .section-title {
        margin-bottom: var(--spacing-md);
    }

    .section-intro {
        margin-bottom: var(--spacing-md);
        font-size: 1rem;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    /* Lead text */
    .lead {
        font-size: 1.1rem;
    }
}

/* Small tablets and large phones: 640px and down */
@media (max-width: 640px) {
    .container {
        max-width: 100%;
        padding: 0 var(--spacing-sm);
    }

    .hero {
        min-height: 100vh;
        justify-content: flex-start;
        padding-top: 80px;
    }

    .hero-content {
        max-width: 100%;
    }

    /* Single column for all highlight cards */
    .about-highlights {
        grid-template-columns: 1fr;
    }

    /* Ensure all cards are full width */
    .course-card,
    .project-card,
    .pub-item,
    .grant-item,
    .award-card {
        margin-bottom: var(--spacing-sm);
    }

    /* Stats in single column on small screens */
    .project-stats {
        grid-template-columns: 1fr;
    }

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

    /* Reduce section spacing */
    .section {
        padding: var(--spacing-lg) 0;
    }

    /* Area tags - stack more naturally */
    .areas-grid {
        justify-content: flex-start;
    }

    .area-tag {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    /* Approach grid */
    .approach-grid {
        grid-template-columns: 1fr;
    }

    /* Publications grid */
    .publications-grid {
        gap: var(--spacing-md);
    }
}

/* Small phones: 480px and down */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    /* Further reduce spacing */
    .section {
        padding: var(--spacing-md) 0;
    }

    /* Hero adjustments */
    .hero {
        padding-top: 60px;
    }

    .hero-buttons {
        gap: var(--spacing-xs);
    }

    /* Buttons - ensure they're still touch-friendly but more compact */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }

    /* Navigation */
    .nav-container {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .logo {
        font-size: 1.25rem;
    }

    /* Cards - more compact padding */
    .course-card,
    .project-card,
    .pub-item,
    .grant-item,
    .award-card,
    .highlight-card {
        padding: var(--spacing-sm);
    }

    /* Project tech tags - smaller */
    .project-tech span {
        font-size: 0.75rem;
        padding: 3px 8px;
    }

    /* Footer */
    .footer {
        padding: var(--spacing-md) 0;
    }

    .footer-tagline {
        font-size: 0.85rem;
    }

    /* Stats - slightly smaller */
    .stat h3 {
        font-size: 2rem;
    }

    .stat p {
        font-size: 0.85rem;
    }

    /* Award icons - smaller */
    .award-icon {
        font-size: 2.5rem;
    }

    /* CTA box */
    .cta-box {
        padding: var(--spacing-md);
    }
}

/* Very small phones: 360px and down */
@media (max-width: 360px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero-buttons {
        max-width: 100%;
    }

    .btn {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }

    /* Even more compact cards */
    .course-card,
    .project-card,
    .pub-item,
    .grant-item,
    .award-card {
        padding: 0.75rem;
    }

    /* Smaller stats */
    .stat h3 {
        font-size: 1.75rem;
    }
}

/* Landscape phones: Optimize for horizontal viewing */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: var(--spacing-md);
    }

    .hero-title {
        font-size: clamp(1.5rem, 3vw, 2rem);
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: clamp(1rem, 2vw, 1.25rem);
    }

    .hero-description {
        font-size: 0.9rem;
        margin-bottom: var(--spacing-sm);
    }

    .hero-buttons {
        flex-direction: row;
        gap: var(--spacing-sm);
        margin-top: var(--spacing-sm);
    }

    .scroll-indicator {
        display: none;
    }

    .section {
        padding: var(--spacing-md) 0;
    }

    .nav-container {
        padding: 0.5rem var(--spacing-md);
    }
}

/* ===================================
   Accessibility
   =================================== */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
.nav-link:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --secondary-color: #0066cc;
        --border-color: #000;
    }
}
