/* Enhanced Mobile-First Responsive Design */

/* Base styles optimized for mobile */
:root {
    /* Color Palette */
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-light: #a0aec0;
    --background: #ffffff;
    --background-alt: #f7fafc;
    --background-dark: #1a202c;
    --surface: #ffffff;
    --border: #e2e8f0;
    --success: #48bb78;
    --warning: #ed8936;
    --error: #f56565;
    
    /* Typography - Mobile optimized */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Responsive Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Fluid typography */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
    --text-3xl: clamp(2rem, 1.7rem + 1.5vw, 3rem);
    --text-4xl: clamp(2.5rem, 2rem + 2.5vw, 4rem);
    
    /* Breakpoints */
    --mobile-sm: 375px;
    --mobile: 640px;
    --tablet: 768px;
    --desktop: 1024px;
    --desktop-lg: 1280px;
    
    /* Enhanced Animations */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: clamp(60px, 15vw, 100px);
}

/* Core Body Styles */
body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    line-height: 1.6;
    background: var(--background);
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
}

/* Body state when menu is open */
body.menu-open {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
}

/* Enhanced Container with better mobile spacing */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 5vw, 2.5rem);
    box-sizing: border-box; /* Ensure padding is included in width */
    overflow-x: hidden; /* Prevent horizontal overflow */
}

/* Enhanced Mobile-First Navigation - macOS Tahoe Inspired */
.navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 1280px;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    height: 60px;
    border-radius: 20px;
    overflow: hidden;
}

.navbar.tahoe-glass {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(255, 255, 255, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(255, 255, 255, 0.8),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
    height: 56px;
    top: 10px;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 clamp(1rem, 4vw, 2rem);
    position: relative;
    z-index: 2;
}

.nav-logo {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.logo-glow {
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(
        circle at center,
        rgba(102, 126, 234, 0.6) 0%,
        rgba(118, 75, 162, 0.4) 30%,
        transparent 70%
    );
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0.8;
    z-index: -1;
    animation: pulse 3s infinite alternate;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.nav-logo .logo-text {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.nav-logo:hover .logo-text {
    transform: scale(1.05);
    text-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
}

.nav-logo:hover .logo-glow {
    animation-duration: 2s;
    filter: blur(10px);
}

.nav-menu {
    list-style: none;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    position: relative;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
}

@media (min-width: 769px) {
    .nav-menu {
        display: flex;
    }
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: var(--text-sm);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    padding: 0.5rem 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.nav-link-text {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.nav-link-hover {
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary-color) 50%, 
        transparent 100%);
    transform: translateX(-50%);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}

.nav-link:hover .nav-link-text,
.nav-link.active .nav-link-text {
    color: var(--primary-color);
    transform: translateY(-2px);
}

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

/* Simple hamburger button */
.hamburger {
    position: relative;
    display: none; /* Hide by default (for desktop) */
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    z-index: 2000;
    background: transparent;
    border: none;
    width: 24px;
    height: 24px;
}

@media (max-width: 767px) {
    .hamburger {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .hamburger .bar {
        width: 16px;
        height: 2px;
        margin: 2px 0;
        background-color: var(--primary-color);
        border-radius: 1px;
        transition: all 0.3s ease;
    }
    
    /* Simple transition for bar transformation */
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(4px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-4px) rotate(-45deg);
    }
}

/* Remove duplicate styling */

.hamburger .bar {
    width: 24px;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 5px);
    background: var(--primary-dark);
}

/* Mobile Menu Enhancement */
.nav-menu {
    position: fixed;
    top: 80px; /* Aligned with navbar */
    right: 16px;
    left: 16px;
    width: calc(100% - 32px);
    height: 0;
    max-height: calc(100vh - 96px);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: none; /* Start as hidden */
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    visibility: hidden;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(255, 255, 255, 0.8),
        inset 0 1px 1px rgba(255, 255, 255, 0.7);
    padding: 2rem 1.5rem;
    gap: 1rem;
    pointer-events: none; /* Ensure it doesn't capture clicks when hidden */
}

/* Improved mobile menu active state */
.nav-menu.active {
    display: flex;
    opacity: 1;
    visibility: visible;
    height: auto;
    pointer-events: auto; /* Enable clicks when visible */
    transform: translateY(0);
    padding: 40px 0;
    overflow-y: auto;
    z-index: 990;
}

.nav-menu .nav-item {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    width: 85%;
    text-align: center;
    margin-bottom: 12px; /* Increased spacing between items for better tap targets */
}

/* Mobile-specific nav item styling */
@media (max-width: 767px) {
    .nav-menu .nav-item {
        width: 90%;
        margin-bottom: 16px; /* Even more spacing on mobile */
    }
    
    .nav-menu .nav-link {
        padding: 16px; /* Larger padding for better tap target */
        border-radius: 18px; /* Slightly larger radius */
        font-size: 18px; /* Larger font size */
        font-weight: 600;
        letter-spacing: 0.5px;
    }
    
    .nav-menu.active {
        padding: 25px 0; /* More vertical padding */
    }
}

.nav-menu.active .nav-item {
    opacity: 1;
    transform: translateY(0);
}

.nav-menu.active .nav-item:nth-child(1) { transition-delay: 0.1s; }
.nav-menu.active .nav-item:nth-child(2) { transition-delay: 0.15s; }
.nav-menu.active .nav-item:nth-child(3) { transition-delay: 0.2s; }
.nav-menu.active .nav-item:nth-child(4) { transition-delay: 0.25s; }
.nav-menu.active .nav-item:nth-child(5) { transition-delay: 0.3s; }
.nav-menu.active .nav-item:nth-child(6) { transition-delay: 0.35s; }

.nav-menu .nav-link {
    font-size: clamp(1.1rem, 4vw, 1.3rem);
    font-weight: 600;
    padding: 1.25rem;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.07),
        inset 0 1px 1px rgba(255, 255, 255, 0.7);
    position: relative;
    overflow: hidden;
}

/* Enhanced tap feedback for mobile */
.nav-menu .nav-link:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.9);
}

.nav-menu .nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.15) 0%, 
        rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-menu .nav-link:hover::before {
    opacity: 1;
}

.nav-menu .nav-link:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 10px 30px rgba(102, 126, 234, 0.15),
        0 4px 10px rgba(0, 0, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

body.menu-open {
    overflow: hidden;
}

/* Desktop navigation styles */
@media (min-width: 769px) {
    .navbar {
        height: 64px;
    }
    
    .nav-menu {
        position: static;
        display: flex !important; /* Force display as flex */
        flex-direction: row;
        width: auto;
        height: auto;
        padding: 0;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        overflow: visible;
        max-height: none;
        pointer-events: auto; /* Ensure clicks are registered */
        z-index: auto;
    }
    
    .nav-menu .nav-item {
        opacity: 1;
        transform: none;
        width: auto;
        text-align: left;
        margin-bottom: 0;
    }
    
    .nav-menu .nav-link {
        font-size: var(--text-sm);
        font-weight: 500;
        padding: 0.5rem 0;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        box-shadow: none;
        pointer-events: auto; /* Ensure clicks are registered */
    }
    
    .nav-menu .nav-link::before {
        display: none;
    }
    
    .nav-menu .nav-link:hover {
        transform: none;
        box-shadow: none;
    }
    
    .hamburger {
        display: none !important; /* Ensure hamburger is hidden on desktop */
    }
}

/* Enhanced Mobile-First Hero Section */
.hero {
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0 0 clamp(40px, 8vh, 60px);
    isolation: isolate; /* Creates a stacking context */
    margin: 0;
}

@media (max-width: 767px) {
    .hero {
        min-height: auto;
        padding: 0 0 60px;
    }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    background: radial-gradient(circle at 10% 20%, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.9) 90%);
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-particles::before,
.floating-particles::after,
.floating-particles span {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.floating-particles::before {
    width: clamp(100px, 20vw, 200px);
    height: clamp(100px, 20vw, 200px);
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-particles::after {
    width: clamp(75px, 15vw, 150px);
    height: clamp(75px, 15vw, 150px);
    top: 60%;
    right: 15%;
    animation-delay: 3s;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: center;
    width: 100%;
    text-align: center;
    padding: 0 clamp(1rem, 3vw, 2rem);
    max-width: 1200px;
    margin: 0 auto;
}

/* Always show both text and image */
@media (max-width: 767px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
}

/* Always show both text and image */
@media (min-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
        text-align: left;
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .hero-text {
        padding-right: 2rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: flex-start;
        width: auto;
    }
    
    .btn {
        width: auto;
    }
}

/* Mobile - stack vertically but still show image */
@media (max-width: 767px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: clamp(2rem, 6vw, 3rem);
        text-align: center;
        padding: 0 clamp(0.5rem, 3vw, 1.5rem);
        margin-top: 20px;
    }
    
    .hero {
        min-height: auto;
        padding: 80px 0 40px;
        height: auto;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        margin-bottom: 1.5rem;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.75rem;
        max-width: 300px;
    }
    
    .hero-stats {
        margin-left: auto;
        margin-right: auto;
        max-width: 300px;
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        padding: clamp(0.75rem, 3vw, 1.5rem);
    }
    
    .title-line {
        padding: clamp(0.5rem, 2vw, 0.75rem);
        margin: 0.5rem 0;
        font-size: clamp(1.5rem, 6vw, 2.2rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 4vw, 1.2rem);
        margin-bottom: 0.75rem;
    }
    
    .hero-description {
        font-size: clamp(0.9rem, 3.5vw, 1rem);
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }
}

.hero-text {
    color: white;
    max-width: 100%;
}

.hero-title {
    font-size: var(--text-4xl);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
    letter-spacing: -0.02em;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), 0 0 40px rgba(118, 75, 162, 0.3);
    position: relative;
    text-align: center;
    border-radius: 20px;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.title-line {
    display: block;
    padding: clamp(0.75rem, 2vw, 1.25rem) clamp(1.5rem, 4vw, 2.5rem);
    margin: clamp(0.5rem, 1.5vw, 0.75rem) 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), inset 0 0 10px rgba(255, 255, 255, 0.05);
    opacity: 1;
}

.title-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

.title-line:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3), inset 0 0 15px rgba(255, 255, 255, 0.1);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.title-line:nth-child(1) { animation-delay: 0.2s; }
.title-line:nth-child(2) { animation-delay: 0.4s; }

.hero-subtitle {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
    opacity: 1;
}

.hero-description {
    font-size: var(--text-lg);
    margin-bottom: clamp(2rem, 4vw, 3rem);
    opacity: 1;
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

@media (min-width: 768px) {
    .hero-description {
        font-size: calc(var(--text-lg) + 0.125rem);
        line-height: 1.9;
    }
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: clamp(1rem, 4vw, 2rem);
    margin-bottom: clamp(2rem, 4vw, 3rem);
    opacity: 1;
}

.stat-item {
    text-align: center;
    padding: clamp(1rem, 3vw, 1.5rem);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-normal);
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-number {
    display: block;
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: var(--text-sm);
    opacity: 0.9;
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 3vw, 1.5rem);
    align-items: center;
    opacity: 1;
}

.btn {
    padding: clamp(0.875rem, 3vw, 1rem) clamp(1.5rem, 5vw, 2rem);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: var(--text-base);
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: clamp(200px, 40vw, 250px);
    justify-content: center;
    text-align: center;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), inset 0 0 5px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Enhanced Professional Profile - Always Visible */
.hero-visual {
    display: flex !important;
    justify-content: center;
    align-items: center;
    opacity: 1;
    margin-top: clamp(1rem, 3vw, 2rem);
    width: 100%;
    position: relative;
    z-index: 20;
    transform-style: preserve-3d;
}

/* Make sure image section is always visible on all screens */
@media (min-width: 768px) {
    .hero-visual {
        margin-top: 0;
        justify-content: flex-start;
    }
}

/* Mobile Improvements */
@media (max-width: 767px) {
    .hero-content {
        padding: 0 clamp(0.5rem, 2vw, 1.5rem);
        gap: clamp(1rem, 3vw, 2rem);
    }
    
    .hero-visual {
        margin-top: 0;
        margin-bottom: 1rem;
        order: -1;
    }
    
    .profile-image {
        width: clamp(150px, 40vw, 200px);
        height: clamp(150px, 40vw, 200px);
        margin: 0 auto;
    }
    
    .credential-ring {
        display: none;
    }
    
    .credential-ring.delayed {
        display: none;
    }
    
    .research-indicators {
        grid-template-columns: repeat(2, 1fr);
        gap: clamp(0.5rem, 2vw, 0.75rem);
        max-width: 280px;
        margin: 0 auto 1rem auto;
    }
    
    .professional-badges {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 280px;
        margin: 0 auto;
        gap: 0.5rem;
    }
    
    .research-field {
        padding: clamp(0.4rem, 2vw, 0.6rem);
    }
}

.professional-profile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 2rem);
    max-width: 100%;
    z-index: 15;
}

.profile-frame {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    transform-style: preserve-3d;
    isolation: isolate;
}

.profile-image {
    width: clamp(200px, 40vw, 280px);
    height: clamp(200px, 40vw, 280px);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(20px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 255, 255, 0.2);
    transition: all 0.6s var(--transition-slow);
    z-index: 25;
    transform: translateZ(0);
}

.profile-image:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

/* Ensuring profile image is visible on all devices */
.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: all 0.6s var(--transition-slow);
    filter: brightness(1.1) contrast(1.1);
    position: relative;
    z-index: 30;
    display: block !important;
    opacity: 1 !important;
    transform: translateZ(0);
    will-change: transform, filter;
}

.profile-photo:hover {
    filter: brightness(1.2) contrast(1.2);
    transform: scale(1.05);
}

.academic-placeholder {
    font-size: clamp(4rem, 12vw, 8rem);
    color: rgba(255, 255, 255, 0.9);
    transition: all var(--transition-normal);
}

.credential-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(240px, 45vw, 320px);
    height: clamp(240px, 45vw, 320px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: rgba(255, 255, 255, 0.6);
    z-index: 3;
}

.credential-ring.delayed {
    width: clamp(270px, 50vw, 360px);
    height: clamp(270px, 50vw, 360px);
    border-width: 1px;
    border-top-color: rgba(255, 255, 255, 0.4);
    z-index: 2;
}

.research-indicators {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1rem, 3vw, 1.5rem);
    width: 100%;
    max-width: 400px;
}

.research-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.5rem, 1vw, 0.75rem);
    padding: clamp(0.75rem, 3vw, 1rem);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s var(--transition-slow);
    opacity: 1;
}

.research-field.ai, .research-field.quantum, .research-field.data, .research-field.vision {
    animation-delay: 0s;
}

.research-field:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.field-icon {
    width: clamp(32px, 8vw, 40px);
    height: clamp(32px, 8vw, 40px);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.field-icon i {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: rgba(255, 255, 255, 0.9);
}

.field-label {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

.professional-badges {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.75rem, 2vw, 1rem);
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.badge {
    display: flex;
    align-items: center;
    gap: clamp(0.25rem, 1vw, 0.5rem);
    padding: clamp(0.5rem, 2vw, 0.7rem) clamp(0.75rem, 3vw, 1rem);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    transition: all var(--transition-normal);
    opacity: 1;
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
}

/* Added for better mobile handling of long badge text */
@media (max-width: 767px) {
    .badge {
        white-space: normal; /* Allow text to wrap on mobile */
        max-width: 100%;
    }
    
    .badge:last-child span {
        white-space: normal; /* Specifically for the Associate Dean badge */
    }
}

.badge.ibm, .badge.ieee, .badge.professor {
    animation-delay: 0s;
}

.badge:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.badge i {
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.scroll-indicator {
    position: absolute;
    bottom: clamp(1rem, 4vh, 2rem);
    left: 50%;
    transform: translateX(-50%);
}

.scroll-arrow {
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

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

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* About Section - Apple-inspired Design */
.about {
    background: #ffffff;
    overflow: hidden;
}

.about-hero {
    padding: 120px 0 80px;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.about-intro {
    max-width: 800px;
    margin: 0 auto;
}

.about-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    line-height: 1.1;
    color: #1d1d1f;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.about-lead {
    font-size: 1.5rem;
    font-weight: 400;
    color: #6e6e73;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.about-main {
    padding: 80px 0;
}

.about-story {
    max-width: 800px;
    margin: 0 auto;
}

.story-block {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.story-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.story-block h3 {
    font-size: 2rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.story-block p {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #515154;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.expertise-showcase {
    padding: 100px 0;
    background: #f5f5f7;
    position: relative;
}

.showcase-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4rem;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.expertise-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.8rem 2rem;
    text-align: center;
    border: 1px solid #e5e5e7;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 280px;
    justify-content: space-between;
    opacity: 0;
    transform: translateY(50px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.expertise-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.expertise-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.card-icon {
    margin-bottom: 1.2rem;
}

.icon-bg {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.4s ease;
}

.icon-bg.quantum {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
}

.icon-bg.data {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.icon-bg.vision {
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
}

.icon-bg i {
    font-size: 1.8rem;
    color: white;
}

.expertise-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.expertise-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: #6e6e73;
    font-weight: 400;
    flex-grow: 1; /* Allow paragraph to take available space */
}

.credentials-section {
    padding: 100px 0;
    background: #ffffff;
}

.credentials-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.credential-group h3 {
    font-size: 2rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

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

.membership-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f5f5f7;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.membership-item:hover {
    background: #e8f4fd;
    transform: translateX(5px);
}

.membership-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.membership-icon i {
    color: white;
    font-size: 1.2rem;
}

.membership-item span {
    font-size: 1.1rem;
    font-weight: 500;
    color: #1d1d1f;
}

.research-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.research-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: #ffffff;
    border: 2px solid #e5e5e7;
    border-radius: 12px;
    text-decoration: none;
    color: #1d1d1f;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.research-link::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 ease;
}

.research-link:hover::before {
    left: 100%;
}

.research-link:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.link-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f5f5f7, #e5e5e7);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.research-link:hover .link-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.research-link:hover .link-icon i {
    color: white;
}

.link-icon i {
    font-size: 1.1rem;
    color: #6e6e73;
    transition: color 0.3s ease;
}

.research-link span {
    font-size: 1.1rem;
    font-weight: 500;
    flex: 1;
}

.research-link > i:last-child {
    font-size: 0.9rem;
    color: #6e6e73;
    transition: all 0.3s ease;
}

.research-link:hover > i:last-child {
    color: #667eea;
    transform: translateX(5px);
}

/* Apple-style Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Intersection Observer Classes */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .about-hero {
        padding: 80px 0 60px;
    }
    
    .about-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .about-lead {
        font-size: 1.25rem;
    }
    
    .about-main {
        padding: 60px 0;
    }
    
    .story-block h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .story-block p {
        font-size: 1.1rem;
    }
    
    .expertise-showcase {
        padding: 80px 0;
    }
    
    .showcase-title {
        font-size: 2rem;
        margin-bottom: 3rem;
    }
    
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .expertise-card {
        padding: 2rem 1.5rem;
    }
    
    @media (max-width: 767px) {
        .expertise-grid {
            grid-template-columns: 1fr;
            gap: 1.5rem;
        }
    }
    
    .credentials-section {
        padding: 80px 0;
    }
    
    .credentials-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .credential-group h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

/* Experience Section */
.experience {
    padding: var(--space-3xl) 0;
}

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

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

.timeline-item {
    position: relative;
    margin-bottom: var(--space-xl);
    padding-left: 80px;
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--transition-slow);
}

.timeline-item.animate {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 10px;
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--background);
    box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-date {
    position: absolute;
    left: -120px;
    top: 8px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    white-space: nowrap;
}

.timeline-content {
    background: var(--surface);
    padding: var(--space-lg);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all var(--transition-normal);
}

.timeline-content:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.company {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.position {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--space-sm);
}

.description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-md);
    text-align: left;
}

@media (min-width: 768px) {
    .description {
        text-align: justify;
        hyphens: auto;
    }
}

.tags {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.tag {
    background: var(--background-alt);
    color: var(--text-secondary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border);
}

/* Projects Section */
.projects {
    padding: var(--space-3xl) 0;
    background: var(--background-alt);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.project-card {
    background: var(--surface);
    padding: var(--space-lg);
    border-radius: 20px;
    border: 1px solid var(--border);
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    transition: all var(--transition-normal);
    opacity: 0;
    transform: translateY(30px);
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

.project-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.project-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    font-size: 2rem;
    color: white;
}

.project-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.project-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
    flex-grow: 1; /* Allow the paragraph to take up available space */
}

.project-technologies {
    display: flex;
    gap: var(--space-xs);
    justify-content: center;
    flex-wrap: wrap; /* Allow technologies to wrap on narrow cards */
    margin-top: auto; /* Push to bottom of flexbox */
    flex-wrap: wrap;
}

.tech {
    background: var(--background-alt);
    color: var(--primary-color);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--primary-color);
}

/* Achievements Section */
.achievements {
    padding: var(--space-3xl) 0;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-3xl);
}

.achievement-category {
    background: var(--surface);
    padding: var(--space-xl);
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all var(--transition-normal);
}

.achievement-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.achievement-category h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--space-lg);
    text-align: center;
}

.achievement-items {
    display: grid;
    gap: var(--space-md);
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--background-alt);
    border-radius: 12px;
    transition: all var(--transition-normal);
}

.achievement-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.achievement-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    min-width: 80px;
}

.achievement-item:hover .achievement-number {
    color: white;
}

.achievement-text {
    font-weight: 600;
    color: var(--text-secondary);
}

.achievement-item:hover .achievement-text {
    color: white;
}

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

.metric-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: var(--space-xl);
    border-radius: 20px;
    text-align: center;
    transition: all var(--transition-normal);
}

.metric-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.metric-card i {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.9;
}

.metric-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.metric-card p {
    opacity: 0.9;
    line-height: 1.7;
}

/* Contact Section */
.contact {
    padding: var(--space-3xl) 0;
    background: var(--background-alt);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: var(--space-xs);
}

.contact-item h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.contact-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-links h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--primary-color);
}

.profile-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* Footer */
.footer {
    background: linear-gradient(to right, var(--background-darker), var(--background-dark), var(--background-darker));
    color: var(--text-light);
    padding: var(--space-xl) 0;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%);
}

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

.footer-left, .footer-right {
    flex: 1;
}

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

.footer-right {
    text-align: right;
}

.footer-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.footer-social {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    color: var(--accent-color);
}

/* Enhanced Animation Keyframes */
.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.particle-1 {
    width: 120px;
    height: 120px;
    top: 15%;
    left: 30%;
    animation: float 8s ease-in-out infinite;
    animation-delay: 1s;
}

.particle-2 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 20%;
    animation: float 10s ease-in-out infinite;
    animation-delay: 2.5s;
}

.particle-3 {
    width: 150px;
    height: 150px;
    top: 40%;
    right: 25%;
    animation: float 12s ease-in-out infinite;
    animation-delay: 0.5s;
}

.particle-4 {
    width: 100px;
    height: 100px;
    bottom: 30%;
    right: 10%;
    animation: float 9s ease-in-out infinite;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
        opacity: 0.7; 
    }
    50% { 
        transform: translateY(-30px) rotate(180deg); 
        opacity: 0.3; 
    }
}

/* macOS Tahoe-inspired Back to Top Button */
.back-to-top {
    --light-position: 30%;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(230, 230, 235, 0.15);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.2),
        0 5px 15px rgba(0, 0, 0, 0.1),
        0 2px 2px rgba(255, 255, 255, 0.4) inset,
        0 -1px 2px rgba(0, 0, 0, 0.1) inset,
        0 0 0 1px rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-decoration: none;
    z-index: 9999; /* Increased z-index to ensure visibility */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    isolation: isolate;
}

.back-to-top::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: radial-gradient(
        circle at var(--light-position) 30%, 
        rgba(255, 255, 255, 0.6) 0%, 
        rgba(255, 255, 255, 0.2) 30%, 
        transparent 70%
    );
    border-radius: 50%;
    z-index: -1;
    opacity: 0.8;
    transform: rotate(15deg);
    animation: shimmer 12s infinite linear;
}

.back-to-top::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(
            135deg, 
            rgba(255, 255, 255, 0.5) 0%, 
            rgba(255, 255, 255, 0.1) 50%, 
            rgba(255, 255, 255, 0.05) 100%
        ),
        radial-gradient(
            circle at 70% 70%,
            rgba(0, 0, 0, 0.05) 0%,
            transparent 60%
        );
    border-radius: 50%;
    z-index: -1;
}

@keyframes shimmer {
    0% {
        transform: translate(-10%, -10%) rotate(0deg);
        opacity: 0.5;
    }
    25% {
        opacity: 0.7;
    }
    50% {
        transform: translate(10%, 10%) rotate(180deg);
        opacity: 0.5;
    }
    75% {
        opacity: 0.7;
    }
    100% {
        transform: translate(-10%, -10%) rotate(360deg);
        opacity: 0.5;
    }
}

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

.back-to-top i {
    font-size: 1.5rem;
    color: rgba(102, 126, 234, 1);
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Remove duplicate visible class */

.back-to-top:hover {
    background: rgba(230, 230, 235, 0.25);
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.25),
        0 8px 20px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(255, 255, 255, 0.5) inset,
        0 -1px 2px rgba(0, 0, 0, 0.1) inset,
        0 0 0 1.5px rgba(255, 255, 255, 0.4);
    transform: translateY(-5px) scale(1.05);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
}

.back-to-top:hover::before {
    animation-duration: 6s;
    opacity: 0.9;
}

.back-to-top:hover i {
    transform: translateY(-3px) scale(1.1);
    color: rgba(102, 126, 234, 1);
    filter: drop-shadow(0 3px 5px rgba(102, 126, 234, 0.5));
}

.back-to-top:active {
    transform: translateY(0) scale(0.95);
    background: rgba(230, 230, 235, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.15),
        0 2px 5px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.2) inset;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.15s ease;
}

.back-to-top:active i {
    transform: scale(0.9);
    transition: all 0.1s ease;
}

/* Mobile Navigation Menu */
.mobile-nav-menu {
    position: fixed;
    top: 76px;
    left: 10px;
    right: 10px;
    width: calc(100% - 20px);
    max-height: calc(100vh - 86px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    z-index: 990;
    display: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    padding: 20px;
}

.mobile-nav-menu.active {
    display: block;
}

.mobile-nav-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px; /* Increased gap between items */
}

.mobile-nav-item {
    width: 90%;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-menu.active .mobile-nav-item {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav-menu.active .mobile-nav-item:nth-child(1) { transition-delay: 0.05s; }
.mobile-nav-menu.active .mobile-nav-item:nth-child(2) { transition-delay: 0.1s; }
.mobile-nav-menu.active .mobile-nav-item:nth-child(3) { transition-delay: 0.15s; }
.mobile-nav-menu.active .mobile-nav-item:nth-child(4) { transition-delay: 0.2s; }
.mobile-nav-menu.active .mobile-nav-item:nth-child(5) { transition-delay: 0.25s; }
.mobile-nav-menu.active .mobile-nav-item:nth-child(6) { transition-delay: 0.3s; }

.mobile-nav-link {
    display: block;
    padding: 20px; /* Increased padding for even better touch target */
    font-size: 1.25rem; /* Slightly larger font */
    font-weight: 600;
    color: var(--text-primary); /* Updated to use primary text color variable */
    text-decoration: none;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.8); /* More visible background */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.07),
        inset 0 1px 1px rgba(255, 255, 255, 0.7);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 16px; /* Add spacing between links */
    text-align: center;
    cursor: pointer; /* Make sure cursor shows pointer */
}

/* Enhanced tap feedback for mobile */
.mobile-nav-link:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.9);
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::before,
.mobile-nav-link:focus::before {
    width: 100%;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    background: rgba(102, 126, 234, 0.15);
    transform: translateY(-4px);
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

@media (min-width: 768px) {
    .mobile-nav-menu {
        display: none !important;
    }
}

/* Mobile Navigation Media Queries */
@media (max-width: 767px) {
    .navbar {
        top: 10px;
        width: calc(100% - 20px);
        left: 50%;
        transform: translateX(-50%) !important; /* Force this transform on mobile */
        height: 56px;
        border-radius: 16px;
    }
    
    .navbar.scrolled {
        top: 6px;
    }
    
    .nav-container {
        padding: 0 0.75rem;
    }
    
    /* Improve hamburger visibility */
    .hamburger {
        padding: 5px;
        width: 30px;
        height: 30px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.8);
    }
    
    .hamburger .bar {
        width: 20px;
        height: 2px;
        margin: 2px auto;
    }
    
    /* Hide desktop nav items on mobile */
    .nav-menu {
        display: none;
    }
}

/* Additional fixes for very small mobile screens */
@media (max-width: 375px) {
    .navbar {
        width: calc(100% - 16px);
        height: 52px;
    }
    
    .mobile-nav-menu {
        top: 72px;
        width: calc(100% - 16px);
        left: 8px;
        right: 8px;
    }
    
    .hamburger {
        width: 40px;
        height: 40px;
        padding: 8px;
    }
    
    .hamburger .bar {
        width: 20px;
    }
    
    .mobile-nav-link {
        font-size: 1rem;
        padding: 12px;
    }
}

/* Media query for tablets */
@media (min-width: 768px) and (max-width: 1023px) {
    .navbar {
        top: 12px;
        width: calc(100% - 24px);
        height: 60px;
    }
    
    .navbar.scrolled {
        top: 8px;
    }
}

/* Fix for small screens */
@media (max-width: 359px) {
    .navbar {
        top: 8px;
        width: calc(100% - 16px);
        height: 52px;
    }
    
    .navbar.scrolled {
        top: 4px;
    }
    
    .hamburger {
        padding: 8px;
    }
    
    .hamburger .bar {
        width: 20px;
    }
}

/* Enhanced mobile navigation for better touch targets */
@media (max-width: 767px) {
    .nav-menu .nav-link {
        padding: 16px;
        font-size: 18px;
    }
    
    .hamburger {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Mobile Menu Additional Enhancements */
.nav-menu.active .nav-item {
    position: relative;
}

.nav-menu.active .nav-item::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    left: -16px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.nav-menu.active .nav-item:hover::before {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

/* Additional dynamic hover effects */
.nav-link:hover .nav-link-text {
    transform: translateY(-2px) scale(1.02);
    text-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.logo-text {
    position: relative;
}

.logo-text::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}

.nav-logo:hover .logo-text::after {
    width: 100%;
    opacity: 1;
}

@keyframes professionalRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

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

@keyframes badgeAppear {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Comprehensive Responsive Design */

/* Large Desktop */
@media (min-width: 1280px) {
    .nav-menu {
        display: flex;
    }
    
    .hamburger {
        display: none;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: flex-start;
    }
}

/* Desktop */
@media (min-width: 1024px) and (max-width: 1279px) {
    .nav-menu {
        display: flex;
    }
    
    .hamburger {
        display: none;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .nav-menu {
        display: none;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .research-indicators {
        grid-template-columns: repeat(2, 1fr);
        max-width: 350px;
    }
    
    .professional-badges {
        max-width: 400px;
    }
    
    .credentials-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* Mobile Large */
@media (min-width: 640px) and (max-width: 767px) {
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .research-indicators {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .btn {
        min-width: 200px;
    }
}

/* Mobile Standard */
@media (max-width: 639px) {
    .hero-content {
        margin-top: 60px;
    }
    
    .hero {
        padding-top: 40px;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .stat-item {
        padding: clamp(0.5rem, 2vw, 1rem);
    }
    
    .stat-number {
        font-size: clamp(1.25rem, 4vw, 1.75rem);
    }
    
    .stat-label {
        font-size: clamp(0.7rem, 2.5vw, 0.9rem);
    }
    
    .research-indicators {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .professional-badges {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
        gap: 0.5rem;
        margin: 0 auto;
    }
    
    .badge {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    .hero-buttons {
        width: 100%;
        max-width: 100%;
    }
    
    .btn {
        width: 100%;
        min-width: auto;
        padding: clamp(0.75rem, 2.5vw, 1rem) clamp(1rem, 4vw, 1.5rem);
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
    }
    
    .timeline-date {
        position: static;
        margin-bottom: var(--space-sm);
        font-size: var(--text-sm);
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item {
        padding-left: 40px;
    }
    
    .timeline-item::before {
        left: 9px;
    }
    
    /* Grid layouts for smaller screens handled by more specific media queries */
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .impact-metrics {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .credentials-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .timeline {
        padding-left: var(--space-md);
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
}

/* Extra Small Mobile */
@media (max-width: 359px) {
    .hero-title {
        font-size: 1.5rem;
        padding: 0.5rem;
    }
    
    .title-line {
        padding: 0.4rem 0.6rem;
        margin: 0.3rem 0;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-description {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .profile-image {
        width: 130px;
        height: 130px;
    }
    
    .research-indicators {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
        max-width: 240px;
    }
    
    .research-field {
        padding: 0.4rem;
    }
    
    .field-icon {
        width: 24px;
        height: 24px;
    }
    
    .field-label {
        font-size: 0.7rem;
    }
    
    .badge {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .stat-item {
        padding: 0.4rem;
    }
    
    .stat-number {
        font-size: 1rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .hero {
        padding: 70px 0 30px;
    }
    
    .hero-content {
        gap: 0.75rem;
    }
    
    .navbar {
        height: 56px;
    }
    
    .nav-menu {
        top: 56px;
        height: calc(100vh - 56px);
    }
    
    .nav-menu .nav-link {
        font-size: 1rem;
        padding: 0.75rem;
    }
}

/* Mobile Small */
@media (max-width: 375px) {
    :root {
        --space-xs: 0.25rem;
        --space-sm: 0.5rem;
        --space-md: 0.75rem;
        --space-lg: 1rem;
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
        --space-3xl: 3rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 100px 0 40px;
    }
    
    .profile-image {
        width: 180px;
        height: 180px;
    }
    
    .academic-placeholder {
        font-size: 3.5rem;
    }
    
    .credential-ring {
        display: none;
    }
    
    .credential-ring.delayed {
        display: none;
    }
    
    .research-indicators {
        gap: 0.5rem;
    }
    
    .research-field {
        padding: 0.5rem;
    }
    
    .field-icon {
        width: 24px;
        height: 24px;
    }
    
    .field-icon i {
        font-size: 0.75rem;
    }
    
    .badge {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .about-main,
    .expertise-showcase,
    .credentials-section {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .title-line {
        padding: 0.5rem 0.75rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .profile-image,
    .expertise-card,
    .research-field,
    .badge {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .credential-ring {
        animation: none;
    }
    
    .floating-particles::before,
    .floating-particles::after {
        animation: none;
    }
    
    .scroll-indicator {
        animation: none;
    }
}

/* Additional mobile optimizations */
@media (max-width: 767px) {
    /* Fix stacking order for hero elements */
    .hero-content {
        display: flex;
        flex-direction: column;
    }
    
    .hero-visual {
        order: -1;
        margin-bottom: 1rem;
    }
    
    /* Ensure profile image is properly sized and centered */
    .profile-image {
        width: clamp(150px, 40vw, 200px);
        height: clamp(150px, 40vw, 200px);
        margin: 0 auto;
    }
    
    /* Disable rotation animations that cause mobile issues */
    .credential-ring, 
    .credential-ring.delayed {
        display: none;
    }
    
    /* Center and stack buttons */
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0;
        max-width: 280px;
    }
    
    /* Make research indicators more compact */
    .research-indicators {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        max-width: 280px;
        margin: 0 auto 1rem auto;
    }
    
    /* Adjust professional badges layout */
    .professional-badges {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 280px;
        margin: 0 auto;
        gap: 0.5rem;
    }
    
    .badge {
        white-space: nowrap;
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
    }
    
    /* Adjust container padding */
    .container {
        padding: 0 1rem;
    }
    
    /* Make navbar more visible */
    .navbar {
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    /* Improve other section layouts */
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Ensure content sections have proper spacing */
    section {
        padding: 3rem 0;
    }
    
    /* Fix small display issues */
    .profile-photo {
        border: 2px solid rgba(255, 255, 255, 0.5);
    }
    
    /* Fix smaller screen layouts */
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .stat-item {
        padding: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
}

/* Enhanced Touch Targets for Mobile */
@media (max-width: 1023px) {
    .nav-link,
    .btn,
    .research-link,
    .profile-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .research-field,
    .expertise-card {
        min-height: 120px;
    }
    
    .badge {
        min-height: 40px;
    }
}

/* Landscape Mobile Orientation */
@media (max-width: 1023px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: clamp(60px, 10vh, 80px) 0 clamp(20px, 4vh, 40px);
    }
    
    .hero-content {
        gap: clamp(1.5rem, 4vh, 2rem);
    }
    
    .profile-image {
        width: clamp(150px, 25vh, 200px);
        height: clamp(150px, 25vh, 200px);
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .research-indicators {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Scroll-triggered animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Loading animation for stats */
.stat-number {
    transition: all 0.5s ease-out;
}

/* Hover effects for interactive elements */
.nav-link,
.btn,
.profile-link,
.project-card,
.achievement-item {
    cursor: pointer;
}

/* Enhanced button styles with ripple effect */
.btn,
.cta-button,
.btn-primary,
.btn-secondary {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform, box-shadow;
}

.btn:active,
.cta-button:active,
.btn-primary:active,
.btn-secondary:active {
    transform: translateY(1px) scale(0.98);
}

/* Touch feedback */
.touch-active {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    transform: scale(0);
    animation: ripple-animation 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes ripple-animation {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Enhanced focus states for accessibility */
.btn:focus-visible,
.cta-button:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

/* Performance optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* GPU acceleration for smooth animations */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Responsive Styles for Footer and Back-to-top */
@media (max-width: 992px) {
    .footer-content {
        gap: var(--space-sm);
    }
    
    .footer-social a {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 767px) {
    .footer {
        padding: var(--space-lg) 0;
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .footer-left, .footer-right {
        text-align: center;
        width: 100%;
    }
    
    .footer-social {
        margin: var(--space-sm) 0;
    }
    
    .back-to-top {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .back-to-top i {
        font-size: 1.3rem;
    }
    
    .back-to-top:hover {
        transform: translateY(-3px) scale(1.03);
    }
}

@media (max-width: 480px) {
    .footer p {
        font-size: 0.9rem;
    }
    
    .footer-social a {
        width: 32px;
        height: 32px;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
    }
    
    .back-to-top i {
        font-size: 1.1rem;
    }
}

/* =============================
   OVERFLOW FIX FOR ALL SECTIONS
   ============================= */
section {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 3rem clamp(1rem, 5vw, 2rem);
}

/* Make sure images don't overflow their containers */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Make sure all content elements stay within bounds */
.container, .section-content, .row, .col, .card, .project-card, 
.experience-item, .achievement-card, .contact-form {
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ============================================
   ENHANCED TEXT STYLING FOR BETTER READABILITY
   ============================================ */

/* Base paragraph styling */
p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: var(--text-base);
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Description text across the site */
.description, 
p:not(.hero-subtitle):not(.hero-description):not(.section-subtitle):not(.about-lead) {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: var(--text-base);
    margin-bottom: 1.5rem;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Hero section text improvements */
.hero-description {
    font-size: var(--text-lg);
    margin-bottom: clamp(2rem, 4vw, 3rem);
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* About section text */
.about-lead {
    font-size: calc(var(--text-lg) + 0.1rem);
    line-height: 1.8;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

/* Section text */
.section-subtitle {
    text-align: center;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

/* Media queries for desktop */
@media (min-width: 768px) {
    /* Better paragraph styling on desktop */
    p {
        font-size: calc(var(--text-base) + 0.05rem);
        line-height: 1.9;
    }
    
    .description, 
    p:not(.hero-subtitle):not(.hero-description):not(.section-subtitle):not(.about-lead) {
        text-align: justify;
        hyphens: auto;
        font-size: calc(var(--text-base) + 0.05rem);
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Hero section refinements */
    .hero-description {
        font-size: calc(var(--text-lg) + 0.125rem);
        line-height: 1.9;
        max-width: 750px;
    }
    
    /* About section refinements */
    .about-lead {
        font-size: calc(var(--text-lg) + 0.2rem);
        line-height: 1.9;
        max-width: 800px;
    }
    
    /* Section text refinements */
    .section-subtitle {
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
        font-size: calc(var(--text-lg) + 0.1rem);
    }
}

/* Specific styling for experience items */
.experience-item .description {
    margin-top: 0.75rem;
}

/* Project descriptions */
.project-card p {
    margin-bottom: 1.25rem;
}

/* Achievement card text */
.achievement-card p {
    margin-top: 0.75rem;
}

/* Contact section text */
.contact-info p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* ===================================
   MOBILE OVERFLOW FIXES & ADJUSTMENTS
   =================================== */
@media (max-width: 767px) {
    /* Ensure proper text display on mobile */
    p, .description, li, td, th, blockquote, .hero-description {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        font-size: var(--text-base);
        text-align: left;
    }
    
    /* Ensure proper container padding on mobile */
    .container, section {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    /* Better spacing in mobile view */
    section {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
    
    /* Adjust card layouts for mobile */
    .card, .project-card, .experience-item, .achievement-card {
        margin-left: 0;
        margin-right: 0;
        padding: 1.25rem;
        width: 100%;
        max-width: 100%;
    }
}

/* ========================================
   NAVBAR LAYOUT STABILIZATION (LONG BRAND)
   ======================================== */
.navbar .nav-container {
    gap: 0.9rem;
}

.navbar .nav-logo {
    flex: 1 1 auto;
    min-width: 0;
}

.navbar .nav-logo .logo-text {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar .nav-menu {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 1280px) {
    .navbar .nav-logo .logo-text {
        font-size: clamp(1rem, 1.9vw, 1.35rem);
    }

    .navbar .nav-menu {
        gap: clamp(0.75rem, 1.6vw, 1.2rem);
    }
}

@media (max-width: 1080px) {
    .navbar .nav-menu {
        display: none !important;
    }

    .navbar .hamburger {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .mobile-nav-menu {
        display: none !important;
    }

    .mobile-nav-menu.active {
        display: block !important;
    }
}

@media (min-width: 1081px) {
    .navbar {
        width: calc(100% - 32px);
        max-width: 1280px;
    }

    .navbar .nav-container {
        justify-content: space-between;
        gap: clamp(1rem, 2.2vw, 2.2rem);
    }

    .navbar .nav-logo {
        flex: 1 1 auto;
        max-width: 62%;
    }

    .navbar .nav-menu {
        margin-left: auto;
        justify-content: flex-end;
    }

    .navbar .hamburger {
        display: none !important;
    }

    .mobile-nav-menu {
        display: none !important;
    }
}