/* Robotics-Themed Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* CSS Variables - Robotics Color System */
:root {
    /* Colors */
    --primary: #0097A7;
    --accent: #00D4FF;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --text-tertiary: #D2D2D7;
    --background: #F0F2F5;
    --background-secondary: #E8EAED;
    --border: rgba(0, 0, 0, 0.1);

    /* Typography - Enhanced Responsive System */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    --font-heading: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

    /* Base font sizes (fallback) */
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 32px;
    --font-size-4xl: 48px;
    --font-size-5xl: 64px;

    /* Fluid typography (overrides adaptive-layouts.css when both are used) */
    --text-xs: clamp(0.75rem, 1vw, 0.875rem);
    --text-sm: clamp(0.875rem, 1.2vw, 1rem);
    --text-base: clamp(1rem, 1.5vw, 1.125rem);
    --text-lg: clamp(1.575rem, 2vw, 2.025rem);
    --text-xl: clamp(1.725rem, 2.5vw, 2.625rem);
    --text-2xl: clamp(2.025rem, 3vw, 3.225rem);
    --text-3xl: clamp(1.875rem, 4vw, 3rem);
    --text-4xl: clamp(2.25rem, 5vw, 4rem);
    --text-5xl: clamp(3rem, 6vw, 5rem);

    /* Responsive Spacing */
    --spacing-xs: clamp(0.25rem, 0.5vw, 0.5rem);
    --spacing-sm: clamp(0.5rem, 1vw, 1rem);
    --spacing-md: clamp(1rem, 2vw, 1.5rem);
    --spacing-lg: clamp(1.5rem, 3vw, 2rem);
    --spacing-xl: clamp(2rem, 4vw, 3rem);
    --spacing-2xl: clamp(3rem, 5vw, 4rem);
    --spacing-3xl: clamp(4rem, 6vw, 6rem);

    /* Responsive Layout */
    --max-width: clamp(1200px, 90vw, 1400px);
    --header-height: 70px;
    --border-radius: clamp(6px, 0.8vw, 12px);
    --border-radius-sm: clamp(4px, 0.5vw, 8px);
    --border-radius-lg: clamp(12px, 1.2vw, 16px);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.16), 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(0, 151, 167, 0.15);

    /* Transitions */
    --transition: all 0.3s ease;
}

/* Dark Mode */
[data-theme="dark"] {
    --primary: #00B8D4;
    --accent: #00D4FF;
    --text-primary: #FFFFFF;
    --text-secondary: #98989D;
    --text-tertiary: #48484A;
    --background: #0A0A1A;
    --background-secondary: #12122A;
    --border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.2);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Heading font family */
h1, h2, h3, h4, h5, h6,
.section-title, .hero-title, .hero-greeting, .section-heading,
.degree-title, .logo, .nav-link, .nav-link-mobile, .tab-button {
    font-family: var(--font-heading);
}

/* Clickable elements cursor */
a, button, input[type="submit"], input[type="button"], .btn, .nav-link, .logo,
.theme-toggle-label, .social-link, .highlight-item, .tab-button, .menu-toggle,
[role="button"], .project-link, .achievement-item, .project-card-mini,
.view-project-btn, .view-patent-btn, .resume-tab, .carousel-arrow {
    cursor: pointer;
}

/* Header - Transparent to solid on scroll */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.header.scrolled {
    background: rgba(240, 242, 245, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .header.scrolled {
    background: rgba(10, 10, 26, 0.8);
}

/* Progress Indicator */
.progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.1s ease-out;
    border-radius: 0 2px 2px 0;
}

[data-theme="dark"] .progress-container {
    background: rgba(255, 255, 255, 0.05);
}

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

.logo {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.01em;
}

/* Desktop Navigation */
.nav-desktop {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 400;
    transition: var(--transition);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
}

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

/* Mobile Controls Container */
.mobile-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* Default: Hide desktop theme toggle, show mobile controls */
.desktop-theme-toggle {
    display: none;
}

.mobile-theme-toggle {
    display: block;
}

/* Desktop: Hide mobile controls, show desktop theme toggle */
@media (min-width: 1200px) {
    .mobile-controls {
        display: none;
    }

    .desktop-theme-toggle {
        display: block;
    }

    .mobile-theme-toggle {
        display: none;
    }
}

/* Floating Navigation Button */
.floating-nav-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 151, 167, 0.3);
    z-index: 1000;
    font-family: var(--font-family);
}

.floating-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 151, 167, 0.4);
    background: var(--primary);
}

.floating-nav-btn.near-footer {
    bottom: 80px;
}

.floating-nav-btn .nav-text {
    white-space: nowrap;
}

.floating-nav-btn svg {
    transition: all 0.3s ease;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: var(--spacing-xs);
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: var(--transition);
}

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

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

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

/* Mobile Navigation */
.nav-mobile {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    padding: var(--spacing-md);
    flex-direction: column;
    gap: var(--spacing-sm);
}

.nav-mobile.active {
    display: flex;
}

.nav-link-mobile {
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--text-base);
    font-weight: 400;
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-link-mobile:hover {
    background: var(--background-secondary);
}

/* Theme Toggle Switch */
.theme-toggle-wrapper {
    margin-left: var(--spacing-sm);
}

.theme-toggle-input {
    display: none;
}

.theme-toggle-label {
    display: block;
}

.toggle-track {
    width: 50px;
    height: 26px;
    background: linear-gradient(135deg, #87CEEB 0%, #FFD700 100%);
    border-radius: 13px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .toggle-track {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.toggle-thumb {
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.theme-toggle-input:checked + .theme-toggle-label .toggle-thumb {
    transform: translateX(24px);
    background: #2d3748;
}

.sun-icon {
    color: #FFA500;
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.moon-icon {
    color: #E2E8F0;
    position: absolute;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.5);
}

.theme-toggle-input:checked + .theme-toggle-label .sun-icon {
    opacity: 0;
    transform: scale(0.5);
}

.theme-toggle-input:checked + .theme-toggle-label .moon-icon {
    opacity: 1;
    transform: scale(1);
}

.toggle-track:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

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

/* Main Content */
.main-content {
    /* No padding needed for latch scrolling */
}

/* Section Base - Natural Content Flow */
.section {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: var(--header-height) var(--spacing-md) var(--spacing-md);
    box-sizing: border-box;
    position: relative;
}

.section .container {
    max-width: var(--max-width);
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: var(--spacing-md) 0;
    box-sizing: border-box;
}

/* Enable smooth latch scrolling */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

/* Custom scrollbar for better UX */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* Prevent text selection during scroll transitions */
.section.scrolling {
    user-select: none;
    pointer-events: none;
}

/* Smooth transitions for all elements during scroll */
.section * {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Hero Section */
.hero-section {
    text-align: center;
    background: linear-gradient(135deg, var(--background) 0%, var(--background-secondary) 100%);
    padding-top: clamp(8rem, 20vw, 12rem);
    overflow-x: visible; /* Allow natural image overflow on mobile */
    overflow-y: visible;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

.hero-section .container {
    justify-content: center;
    align-items: center;
    padding: var(--spacing-sm) 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    height: auto;
    min-height: 60vh;
}

/* Desktop Layout - Default */
.hero-desktop-layout {
    display: contents;
}

.hero-mobile-layout {
    display: none;
}

.hero-column {
    display: flex;
    flex-direction: column;
}

.main-content-column {
    text-align: left;
}

.hero-greeting {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: clamp(0.5rem, 2vw, 1rem);
}

.hero-title {
    font-size: clamp(1.2rem, 3.6vw, 2.4rem); /* Reduced by 25% */
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: clamp(0.5rem, 2vw, 1rem);
}

.hero-description {
    font-size: clamp(0.9rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: clamp(1rem, 3vw, 2rem);
}

.what-i-do-section {
    margin-top: calc(var(--spacing-lg) - 40px);
}

.section-heading {
    font-size: clamp(1rem, 2.5vw, 1.375rem);
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: clamp(0.75rem, 2vw, 1.25rem);
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 2vw, 1rem);
}

.section-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--text-secondary);
    opacity: 0.3;
}

/* Desktop carousel */
.desktop-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    cursor: grab;
}

.desktop-carousel:active {
    cursor: grabbing;
}

.desktop-carousel .expertise-carousel {
    display: flex;
    will-change: transform;
}

.desktop-carousel .expertise-slide {
    min-width: 60%;
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(0.5rem, 1.5vw, 1rem);
    padding: var(--spacing-md);
    background: var(--background-secondary);
    border-radius: var(--border-radius);
    margin-right: var(--spacing-md);
    transition: opacity 0.5s ease, transform 0.5s ease;
    border: 1px solid var(--border);
}

.desktop-carousel .carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.desktop-carousel .carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    opacity: 0.3;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.desktop-carousel .carousel-dot.active {
    opacity: 1;
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
}

/* Hide arrows on mobile */
@media (max-width: 1023px) {
    .carousel-arrow {
        display: none !important;
    }
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
}

.expertise-item {
    display: flex;
    flex-direction: column;
    gap: clamp(0.5rem, 1.5vw, 1rem);
    align-items: center;
    text-align: center;
}

.expertise-item {
    width: 95%;
}

.expertise-item:nth-child(1),
.expertise-item:nth-child(2) {
    width: 104.5%;
}

.expertise-icon {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    flex-shrink: 0;
}

.expertise-content h3 {
    font-size: clamp(0.9rem, 2.2vw, 1.125rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: clamp(0.25rem, 1vw, 0.5rem);
}

.expertise-content p {
    font-size: clamp(0.75rem, 1.8vw, 0.95rem);
    color: var(--text-secondary);
    line-height: 1.4;
}

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

.profile-photo {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

/* Section Titles */
.section-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Education Section */
.education-section .container {
    justify-content: flex-start;
    padding-top: var(--spacing-lg);
}

.education-cards-deck {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    max-width: 900px;
    margin: 0 auto;
    flex: 1;
    padding-right: var(--spacing-xs);
}

.education-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    transition: var(--transition);
    flex-shrink: 0;
}

.education-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.timeline-content-wrapper {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.timeline-content {
    flex: 1;
}

.timeline-degree {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.timeline-institution {
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--primary);
    margin-bottom: var(--spacing-xs);
}

.timeline-year {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.timeline-bullets {
    list-style: none;
}

.timeline-bullets li {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
    position: relative;
    padding-left: var(--spacing-sm);
}

.timeline-bullets li:before {
    content: '•';
    color: var(--primary);
    position: absolute;
    left: 0;
}

.timeline-image {
    width: 200px;
    height: 150px;
    border-radius: var(--border-radius);
    overflow: hidden;
    flex-shrink: 0;
}

.timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Experience Section */
.experience-section .container {
    justify-content: flex-start;
    padding-top: 2rem;
}

.experience-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    width: 100%;
}

.experience-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: var(--transition);
}

.experience-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.experience-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.company {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.period {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.experience-content ul {
    list-style: none;
}

.experience-content li {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.6;
}

.experience-content li:before {
    content: '✓';
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}


/* Projects Section */
.projects-section .container {
    justify-content: flex-start;
    padding-top: var(--spacing-lg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    flex: 1;
    align-content: start;
    padding-right: var(--spacing-xs);
}

.project-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    transition: var(--transition);
}

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

.project-content h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.project-date {
    font-size: var(--text-sm);
    color: var(--primary);
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
}

.project-description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--spacing-sm);
}

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

.project-link {
    color: var(--primary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: var(--transition);
}

.project-link:hover {
    text-decoration: underline;
}

/* Skills Section */
.skills-section .container {
    justify-content: flex-start;
    padding-top: var(--spacing-lg);
}

.skills-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    flex: 1;
    align-content: start;
    padding-right: var(--spacing-xs);
}

.skills-category h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.skills-list span {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: var(--background-secondary);
    color: var(--text-primary);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    font-size: var(--text-xs);
    font-weight: 500;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.skills-list span:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.skills-list img {
    width: 16px;
    height: 16px;
}

/* Achievements Section */
.achievements-section .container {
    justify-content: flex-start;
    padding-top: var(--spacing-lg);
}

.achievements-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 900px;
    margin: 0 auto;
    flex: 1;
    padding-right: var(--spacing-xs);
}

.achievement-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    transition: var(--transition);
}

.achievement-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.achievement-item:first-child {
    grid-template-columns: 1fr 300px;
    align-items: center;
}

.achievement-info h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.achievement-detail {
    font-size: var(--text-sm);
    color: var(--primary);
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
}

.achievement-description {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--spacing-lg);
}

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

.achievement-media {
    display: flex;
    justify-content: center;
    align-items: center;
}

.achievement-media img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

/* Resume Section */
.resume-section .container {
    justify-content: center;
    align-items: center;
}

.resume-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: stretch;
    width: 100%;
    max-width: 1000px;
}

.resume-card {
    background: var(--background-secondary);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--border);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.resume-card h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.resume-card p {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: 1.725;
    margin-bottom: var(--spacing-lg);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 50px;
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 151, 167, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 151, 167, 0.4);
}

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

.btn-secondary:hover {
    background: rgba(0, 151, 167, 0.08);
    border-color: var(--accent);
}

.resume-highlights h3 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

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

.highlight-item {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.highlight-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.highlight-number {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-xs);
}

.highlight-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

/* Contact Section */
.contact-section .container {
    justify-content: flex-start;
    padding-top: var(--spacing-lg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    flex: 1;
    align-content: start;
    padding-right: var(--spacing-xs);
}

.contact-info h3 {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.contact-info p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--spacing-lg);
}

.contact-details {
    margin-bottom: var(--spacing-lg);
}

.contact-item a {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.contact-item a:hover {
    background: var(--background-secondary);
}

.contact-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.contact-text h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.contact-text p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
}

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

.social-link {
    width: 40px;
    height: 40px;
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.social-link img {
    width: 20px;
    height: 20px;
}

/* Contact Form */
.contact-form {
    background: var(--background-secondary);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    background: var(--background);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: var(--text-sm);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 151, 167, 0.15);
}

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

/* Responsive Design for Latch Scrolling */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
    .section {
        padding: var(--header-height) var(--spacing-sm) var(--spacing-sm);
    }

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

    .photo-column {
        order: -1;
        margin-bottom: var(--spacing-md);
    }

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

    .expertise-item {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
    }

    .projects-grid,
    .experience-cards-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .skills-grid-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Tablets and Mobile */
@media (max-width: 1023px) {
    .nav-desktop {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    /* Show theme toggle and menu for tablet/mobile */
    .mobile-controls .theme-toggle-wrapper {
        display: block;
    }

    /* Hide floating elements on mobile/tablet */
    .floating-nav-btn {
        display: none;
    }

    .section {
        padding: calc(var(--header-height) + var(--spacing-sm)) var(--spacing-sm) var(--spacing-sm);
    }

    .section-title {
        font-size: var(--text-2xl);
        margin-bottom: var(--spacing-md);
    }

    /* Switch to mobile layout */
    .hero-desktop-layout {
        display: none;
    }

    .hero-mobile-layout {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 0 1.5rem; /* Increased horizontal padding for mobile */
        box-sizing: border-box;
        width: 100%;
        max-width: 100vw;
        overflow-x: visible; /* Allow image to overflow naturally */
    }

    .hero-content {
        display: block;
        max-height: none;
    }

    .hero-row-1 {
        display: grid;
        grid-template-columns: 1.5fr 1fr; /* Adjust column ratio for better balance */
        gap: 0.5rem; /* Reduce gap to prevent cramping */
        align-items: center; /* Center align for better visual balance */
        margin-bottom: var(--spacing-lg);
        padding: 0;
        width: 100%;
        box-sizing: border-box;
        overflow: visible; /* Allow image to overflow */
    }

    .hero-row-2 {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-md);
        padding: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .hero-mobile-content {
        text-align: left;
        position: relative;
        z-index: 2;
        background-color: rgba(0, 0, 0, 0.8);
        border-radius: var(--border-radius);
        padding: calc(var(--spacing-sm) * 0.9); /* Reduce padding for more space */
        transform: scale(0.98); /* Slightly less scaling */
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center; /* Center content vertically */
        min-height: 100%;
    }

    .hero-mobile-image {
        position: relative;
        z-index: 1;
    }

    .hero-greeting {
        font-size: calc(var(--text-xl) * 0.65); /* Slightly smaller greeting */
        margin-bottom: 0.25rem;
    }

    .hero-title {
        font-size: calc(var(--font-size-2xl) * 0.85); /* Further reduced for mobile */
        line-height: 1.15;
        margin-bottom: calc(var(--spacing-sm) * 0.75);
    }

    .hero-description {
        font-size: clamp(0.922rem, 2.56vw, 1.28rem);
        margin-bottom: 0;
    }

    /* Light mode: White text for hero title and description */
    [data-theme="light"] .hero-title,
    [data-theme="light"] .hero-description {
        color: rgba(255, 255, 255, 0.95);
    }

    .profile-photo {
        max-width: 200%; /* Reduced to prevent cramping */
        width: 200%;
        transform: translateX(-35%); /* Adjust positioning */
    }

    /* Mobile heading with custom divider */
    .mobile-heading {
        margin-left: 0.5rem; /* Reduce left margin to prevent cutoff */
        margin-right: 0.5rem; /* Add right margin for balance */
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .mobile-heading::after {
        content: '';
        flex: 1;
        height: 1px;
        background-color: var(--text-secondary);
        opacity: 0.3;
        margin-right: 0.5rem; /* Reduce right margin to prevent cutoff */
    }

    /* Expertise Carousel */
    .expertise-carousel-container {
        position: relative;
        overflow: hidden;
        width: 100%;
        margin: 0;
        cursor: grab;
        box-sizing: border-box;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .expertise-carousel-container:active {
        cursor: grabbing;
    }

    .expertise-carousel {
        display: flex;
        transition: transform 0.5s ease-in-out;
        will-change: transform;
    }

    .expertise-slide {
        min-width: 85%;
        flex: 0 0 85%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: calc(var(--spacing-sm) * 0.5);
        padding: var(--spacing-md);
        background: var(--background-secondary);
        border-radius: var(--border-radius);
        margin-right: var(--spacing-md);
        transition: opacity 0.5s ease, transform 0.5s ease;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .expertise-slide .expertise-icon {
        font-size: var(--text-xl);
        margin-bottom: var(--spacing-xs);
    }

    .expertise-slide .expertise-content h3 {
        font-size: var(--text-base);
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: var(--spacing-xs);
    }

    .expertise-slide .expertise-content p {
        font-size: calc(var(--text-sm) * 0.9);
        color: var(--text-secondary);
        line-height: 1.4;
    }

    /* Swipe Indicator */
    .swipe-indicator {
        text-align: center;
        margin-top: var(--spacing-sm);
        color: var(--text-secondary);
        font-size: var(--text-sm);
        opacity: 0.7;
    }

    /* Carousel dots indicator */
    .carousel-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 16px;
    }

    .carousel-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--text-secondary);
        opacity: 0.3;
        transition: all 0.3s ease;
        cursor: pointer;
    }

    .carousel-dot.active {
        opacity: 1;
        background: var(--primary);
        width: 24px;
        border-radius: 4px;
    }

    .timeline-content-wrapper {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .timeline-image {
        width: 100%;
        height: 150px;
    }

    .achievements-content .achievement-item:first-child,
    .resume-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .achievement-media {
        order: -1;
    }

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

    /* Mobile: Hide floating elements */
    .floating-nav-btn {
        display: none;
    }

    /* Mobile: Optimize resume card sizing */
    .resume-card {
        padding: var(--spacing-lg);
    }

    .resume-card h3 {
        font-size: var(--text-xl);
        margin-bottom: var(--spacing-sm);
    }

    .resume-card p {
        font-size: var(--text-base);
        line-height: 1.6;
        margin-bottom: var(--spacing-lg);
    }

    /* Mobile: Optimize highlight box sizing */
    .highlight-item {
        padding: calc(var(--spacing-lg) * 0.55) calc(var(--spacing-lg) * 0.55);
    }

    .highlight-number {
        font-size: calc(var(--text-3xl) * 0.9);
        margin-bottom: var(--spacing-xs);
    }

    .highlight-label {
        font-size: calc(var(--text-sm) * 0.9);
    }

    /* Mobile: Optimize button sizing */
    .resume-actions .btn {
        font-size: var(--text-base);
        padding: var(--spacing-md) var(--spacing-lg);
    }

    /* Mobile: Reduce contact section container width by 10% */
    .contact-section .container {
        width: 90%;
    }
}

/* Very narrow mobile devices (max-width: 480px) */
@media (max-width: 480px) {
    /* Add extra padding for very narrow screens - home section only */
    .hero-mobile-layout {
        padding: 0 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    /* Ensure the hero section container has proper padding */
    .hero-section .container {
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Allow natural overflow for image on hero section */
    .hero-section {
        overflow-x: visible;
        overflow-y: visible;
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
    }

    /* Adjust expertise carousel for very narrow screens */
    .expertise-carousel-container {
        width: 100%;
        box-sizing: border-box;
    }

    .expertise-slide {
        min-width: 85%; /* Increase slide width on very narrow screens */
        flex: 0 0 85%;
        padding: var(--spacing-sm);
        box-sizing: border-box;
    }

    /* Adjust mobile heading margins for very narrow screens */
    .mobile-heading {
        margin-left: 0;
        margin-right: 0;
        padding: 0 0.5rem;
        box-sizing: border-box;
        width: 100%;
    }

    /* Ensure hero mobile content fits properly */
    .hero-mobile-content {
        width: 100%;
        box-sizing: border-box;
        margin: 0;
        padding: var(--spacing-sm);
    }

    /* Fix profile photo positioning - allow natural overlap */
    .hero-mobile-image {
        position: relative;
        z-index: 1;
        /* Remove overflow hidden to allow natural overlap */
    }

    .hero-mobile-image .profile-photo {
        max-width: 180%; /* Further reduced for narrow screens */
        width: 180%;
        transform: translateX(-30%);
    }

    /* Adjust hero row for very narrow screens */
    .hero-row-1 {
        grid-template-columns: 1.8fr 1fr; /* More space for text on narrow screens */
        gap: 0.25rem; /* Minimal gap */
    }

    /* Smaller text for very narrow screens */
    .hero-mobile-content {
        padding: calc(var(--spacing-xs) * 1.5);
        transform: scale(1); /* No scaling on very narrow screens */
    }
}

/* Wide mobile and small tablet - show multiple slides if space allows */
@media (min-width: 600px) and (max-width: 767px) {
    .expertise-slide {
        min-width: 45%; /* Show 2 slides on wider mobile/small tablet */
        flex: 0 0 45%;
    }
}

/* Tablet specific styles */
@media (min-width: 768px) and (max-width: 1199px) {
    /* Hide desktop navigation, show mobile controls */
    .nav-desktop {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    /* Show theme toggle and menu for tablet */
    .mobile-controls .theme-toggle-wrapper {
        display: block;
    }

    /* Switch to tablet layout similar to mobile */
    .hero-desktop-layout {
        display: none;
    }

    .hero-mobile-layout {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .hero-content {
        display: block;
        max-height: none;
    }

    .hero-row-1 {
        display: grid;
        grid-template-columns: 3fr 2fr;
        gap: var(--spacing-lg);
        align-items: stretch;
        margin-bottom: var(--spacing-xl);
    }

    .hero-row-2 {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-lg);
    }

    .hero-mobile-content {
        text-align: left;
        position: relative;
        z-index: 2;
        background-color: rgba(0, 0, 0, 0.7);
        border-radius: var(--border-radius);
        padding: var(--spacing-lg);
        transform: scale(1);
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        min-height: 100%;
    }

    .hero-mobile-image {
        position: relative;
        z-index: 1;
    }

    .hero-greeting {
        font-size: calc(var(--text-lg) * 1.33);
    }

    .hero-title {
        font-size: calc(var(--font-size-3xl) * 1.328); /* Reduced by 25% (1.77 * 0.75) */
        line-height: 1.155;
        margin-bottom: var(--spacing-sm);
    }

    .hero-description {
        font-size: clamp(0.922rem, 2.56vw, 1.28rem);
        margin-bottom: 0;
    }

    /* Light mode: White text for hero title and description */
    [data-theme="light"] .hero-title,
    [data-theme="light"] .hero-description {
        color: rgba(255, 255, 255, 0.95);
    }

    .profile-photo {
        max-width: 180%;
        width: 180%;
        transform: translateX(-30%);
    }

    /* Tablet heading with custom divider */
    .mobile-heading {
        margin-left: var(--spacing-lg);
        display: flex;
        align-items: center;
        gap: 1.5rem;
        font-size: calc(var(--text-base) * 1.2);
    }

    .mobile-heading::after {
        content: '';
        flex: 1;
        height: 1px;
        background-color: var(--text-secondary);
        opacity: 0.3;
        margin-right: 30px;
    }

    /* Tablet Expertise Carousel - inherits from mobile */
    .expertise-slide {
        min-width: 40%; /* Show 2-3 slides on tablet screens */
        flex: 0 0 40%;
    }

    .expertise-slide .expertise-icon {
        font-size: var(--text-2xl);
        margin-bottom: var(--spacing-sm);
    }

    .expertise-slide .expertise-content h3 {
        font-size: var(--text-lg);
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: var(--spacing-sm);
    }

    .expertise-slide .expertise-content p {
        font-size: var(--text-sm);
        color: var(--text-secondary);
        line-height: 1.5;
    }

    /* Tablet Swipe Indicator */
    .swipe-indicator {
        text-align: center;
        margin-top: var(--spacing-md);
        color: var(--text-secondary);
        font-size: var(--text-sm);
        opacity: 0.8;
    }

    /* Tablet: Reduce contact section container width by 15% */
    .contact-section .container {
        width: 85%;
    }

    .projects-grid,
    .experience-cards-container,
    .skills-grid-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .education-cards-deck,
    .experience-cards-container,
    .projects-grid,
    .skills-grid-container,
    .achievements-content,
    .contact-content {
        gap: var(--spacing-sm);
    }

    /* Cards will use their own responsive padding */
}

/* Mobile Phones */
@media (max-width: 480px) {
    .section {
        padding: calc(var(--header-height) + var(--spacing-xs)) var(--spacing-xs) var(--spacing-xs);
    }

    .section-title {
        font-size: var(--text-xl);
        margin-bottom: var(--spacing-sm);
    }

    .hero-title {
        font-size: calc(var(--text-2xl) * 0.998); /* Reduced by 25% (1.331 * 0.75) */
        line-height: 1.155;
    }

    .hero-description {
        font-size: clamp(0.922rem, 2.56vw, 1.28rem);
    }

    .resume-actions {
        flex-direction: column;
        align-items: center;
    }

    .education-cards-deck,
    .experience-cards-container,
    .projects-grid,
    .skills-grid-container,
    .achievements-content,
    .contact-content {
        gap: var(--spacing-xs);
    }

    /* Cards will use their own responsive padding */

    .contact-form {
        padding: var(--spacing-md);
    }
}

/* Very Small Phones */
@media (max-width: 320px) {
    .hero-title {
        font-size: calc(var(--text-xl) * 0.998); /* Reduced by 25% (1.331 * 0.75) */
        line-height: 1.155;
    }

    .section-title {
        font-size: var(--text-lg);
    }

    .skills-list {
        gap: var(--spacing-xs);
    }

    .skills-list span {
        font-size: var(--text-xs);
        padding: 4px 8px;
    }
}


/* ===== ENHANCED DESKTOP INTERACTIONS ===== */

/* Navigation Enhancements */
@media (min-width: 1200px) {
    .nav-link {
        position: relative;
    }

    .nav-link:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0, 151, 167, 0.2);
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 50%;
        width: 0;
        height: 2px;
        background: var(--primary);
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }

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

    /* Logo Enhancement */
    .logo:hover {
        color: var(--primary);
        transform: scale(1.05);
    }

    /* Button Enhancements */
    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 151, 167, 0.3);
    }

    .btn-secondary:hover {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }

    /* Theme Toggle Enhancement */
    .theme-toggle:hover {
        transform: rotate(180deg) scale(1.1);
        box-shadow: 0 4px 12px rgba(0, 151, 167, 0.2);
    }

    /* Hero Section Enhancements */
    .hero-title:hover {
        color: var(--primary);
        transform: translateY(-2px);
    }

    .hero-stats .stat-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
        border-color: var(--primary);
    }

    .hero-stats .stat-item:hover .stat-number {
        color: var(--primary);
        transform: scale(1.1);
    }

    /* Social Links */
    .social-link:hover {
        transform: translateY(-3px) scale(1.1);
        box-shadow: 0 8px 24px rgba(0, 151, 167, 0.3);
    }

    /* Card Hover Effects */
    .highlight-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
        border-color: var(--primary);
    }

    .highlight-item:hover .highlight-icon {
        transform: scale(1.2) rotate(5deg);
        color: var(--primary);
    }

    /* Subtle hover effect for sections */
    .section:hover {
        background: linear-gradient(135deg, var(--background) 0%, rgba(0, 151, 167, 0.03) 100%);
    }

    /* Interactive Elements */
    .resume-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    }

    .resume-card:hover h3 {
        color: var(--primary);
    }

    /* Form Focus States */
    input:focus,
    textarea:focus {
        transform: scale(1.02);
        box-shadow: 0 0 0 4px rgba(0, 151, 167, 0.1);
    }
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .nav-link::after {
        transition: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #006d75;
        --text-primary: #000000;
        --text-secondary: #333333;
        --border: rgba(0, 0, 0, 0.3);
        --background-secondary: #f0f0f0;
    }
}

/* Focus Visible for Better Accessibility */
@supports selector(:focus-visible) {
    *:focus {
        outline: none;
    }

    *:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
        border-radius: var(--border-radius-sm);
    }
}

/* Section Divider */
.section-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: var(--spacing-xl) 0;
    width: 100%;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--container-padding);
    position: relative;
}

.section-divider::before,
.section-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--primary);
    opacity: 0.3;
}

.section-divider::before {
    margin-right: 1rem;
}

.section-divider::after {
    margin-left: 1rem;
}

/* Four-pointed star */
.section-divider span {
    font-size: 1.2em;
    color: var(--primary);
    background: var(--background);
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--background-secondary);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
}

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

.footer-copyright {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.footer-social {
    display: flex;
    gap: 1.25rem;
}

.footer-social a {
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

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

/* ===== PATENT HIGHLIGHT CARD ===== */
.patent-highlight {
    border-color: var(--accent) !important;
    background: linear-gradient(135deg, var(--background) 0%, rgba(0, 212, 255, 0.05) 100%) !important;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
    position: relative;
}

[data-theme="dark"] .patent-highlight {
    background: linear-gradient(135deg, var(--background-secondary) 0%, rgba(0, 212, 255, 0.08) 100%) !important;
}

.patent-download-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 50px;
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all 0.3s ease;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.patent-download-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 151, 167, 0.3);
}

/* ===== RESUME TAB SELECTOR ===== */
.resume-tabs-selector {
    display: flex;
    gap: 0;
    margin-bottom: var(--spacing-lg);
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--background-secondary);
}

.resume-tab {
    flex: 1;
    padding: 0.75rem 1.5rem;
    text-align: center;
    font-size: var(--text-sm);
    font-weight: 500;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    border: none;
    background: transparent;
}

.resume-tab.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
}

.resume-tab:not(.active):hover {
    background: rgba(0, 151, 167, 0.1);
    color: var(--text-primary);
}

.resume-tab-content {
    display: none;
    animation: slideIn 0.35s ease-in-out;
}

.resume-tab-content.active {
    display: block;
}

.resume-tab-content h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    font-family: var(--font-heading);
}

.resume-tab-content p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
}

/* ===== FLOATING LABEL INPUTS ===== */
.floating-label {
    position: relative;
    margin-bottom: var(--spacing-md);
}

.floating-label input,
.floating-label textarea {
    width: 100%;
    padding: 1.5rem 1rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    background: var(--background);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: var(--text-base);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.floating-label label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--text-base);
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.2s ease;
    font-weight: 400;
}

.floating-label textarea ~ label {
    top: 1.25rem;
    transform: none;
}

.floating-label input:focus ~ label,
.floating-label input:not(:placeholder-shown) ~ label,
.floating-label textarea:focus ~ label,
.floating-label textarea:not(:placeholder-shown) ~ label {
    top: 0.4rem;
    transform: none;
    font-size: var(--text-xs);
    color: var(--primary);
    font-weight: 500;
}

.floating-label input:focus,
.floating-label textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 151, 167, 0.12);
}

.floating-label textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===== CAROUSEL ARROWS ===== */
.expertise-carousel-container {
    position: relative;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    line-height: 1;
}

.carousel-prev { left: -20px; }
.carousel-next { right: -20px; }

.carousel-arrow:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

/* ===== EDUCATION TAB SLIDE TRANSITION ===== */
@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== ALTERNATING SECTION BACKGROUNDS ===== */
.education-section {
    background: linear-gradient(180deg, var(--background) 0%, var(--background-secondary) 100%);
}

.experience-section {
    background: linear-gradient(180deg, var(--background-secondary) 0%, var(--background) 100%);
}

.projects-section {
    background: linear-gradient(180deg, var(--background) 0%, var(--background-secondary) 100%);
}

.skills-section {
    background: linear-gradient(180deg, var(--background-secondary) 0%, var(--background) 100%);
}

.achievements-section {
    background: linear-gradient(180deg, var(--background) 0%, var(--background-secondary) 100%);
}

.resume-section {
    background: linear-gradient(180deg, var(--background-secondary) 0%, var(--background) 100%);
}

.contact-section {
    background: linear-gradient(180deg, var(--background) 0%, var(--background-secondary) 100%);
}

/* ===== MODAL GLASSMORPHISM ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-md);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(240, 242, 245, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

[data-theme="dark"] .modal-content {
    background: rgba(18, 18, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== WORK AUTHORIZATION BADGE ===== */
.work-auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(0, 151, 167, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: var(--text-xs);
    font-weight: 600;
    border: 1px solid rgba(0, 151, 167, 0.2);
    margin-bottom: var(--spacing-sm);
}

.work-auth-badge i {
    font-size: 0.75rem;
}
}