/* ===== MOBILE PERFORMANCE OPTIMIZATIONS ===== */

/* Improve scrolling performance on mobile */
* {
    -webkit-overflow-scrolling: touch;
}

/* Prevent zoom on input focus (iOS) */
input,
select,
textarea {
    font-size: 16px;
}

/* Improve tap targets for accessibility */
a,
button,
[role="button"] {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Prevent text selection on UI elements */
.header,
.cta-button,
.hamburger,
.mobile-nav-close {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Optimize images for mobile */
img {
    max-width: 100%;
    height: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Base styles for dark mode */
html,
body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: #000000;
    color: #e2e8f0;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    max-width: 100vw;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Prevent horizontal scroll */
.container {
    max-width: 100%;
    overflow-x: hidden;
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Fix any potential overflow issues */
section {
    overflow-x: hidden;
}

/* ===== PRELOADER STYLES ===== */
#preloader {
    background-color: #000000;
}

#greeting-text {
    font-family: 'Inter', sans-serif;
    text-shadow:
        0 0 30px rgba(255, 255, 255, 0.3),
        0 0 60px rgba(255, 255, 255, 0.1),
        0 0 100px rgba(255, 255, 255, 0.05);
    letter-spacing: -0.02em;
    will-change: transform, opacity;
    font-weight: 900;
    background: linear-gradient(45deg, #ffffff, #f0f0f0, #ffffff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
}

/* Shimmer effect for text */
@keyframes shimmer {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Glitch effect for morphing */
.glitch-effect {
    position: relative;
}

.glitch-effect::before,
.glitch-effect::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.glitch-effect::before {
    animation: glitch-1 0.3s infinite;
    color: #ff0000;
    z-index: -1;
}

.glitch-effect::after {
    animation: glitch-2 0.3s infinite;
    color: #00ffff;
    z-index: -2;
}

@keyframes glitch-1 {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

@keyframes glitch-2 {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(2px, -2px);
    }

    40% {
        transform: translate(2px, 2px);
    }

    60% {
        transform: translate(-2px, -2px);
    }

    80% {
        transform: translate(-2px, 2px);
    }

    100% {
        transform: translate(0);
    }
}

/* Bouncing dots animation */
@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-bounce {
    animation: bounce 1.4s infinite ease-in-out both;
}

/* Jump animation keyframes */
@keyframes jumpIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.3);
    }

    50% {
        opacity: 1;
        transform: translateY(-20px) scale(1.2);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes jumpOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-30px) scale(0.8);
    }
}

/* Animation classes for JavaScript control */
.jump-in {
    animation: jumpIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.jump-out {
    animation: jumpOut 0.2s ease-in forwards;
}

/* Main content spacing */
main {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.container {
    max-width: 1200px;
}

/* Section spacing improvements */
section {
    margin-bottom: 4rem;
}

section:last-child {
    margin-bottom: 0;
}

.header {
    background-color: #0A0A0BCC;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    padding: 1rem 0;
    width: 100%;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    max-width: 100vw;
    box-sizing: border-box;
    overflow: hidden;
    min-height: 80px;
    display: flex;
    align-items: center;
}

.header .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header nav a {
    display: flex;
    align-items: center;
    height: 40px;
}

.header #theme-toggle {
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
}

.header #theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.light-mode .header #theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.header #theme-toggle:active {
    transform: scale(0.95);
}

.project-item,
.footer-cta,
.footer {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.text-primary {
    color: #e2e8f0;
}

.text-secondary {
    color: #a1a1aa;
}

.bg-main {
    background-color: #000000;
}

.bg-card {
    background-color: #111111;
}

.border-color {
    border-color: #27272a;
}

.cta-button {
    background-color: #1f2937;
    border: 1px solid #374151;
    color: #f9fafb;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.cta-button:hover {
    background: linear-gradient(135deg, #374151, #4b5563);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.3),
        0 0 25px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:active {
    transform: translateY(-1px) scale(1.01);
    transition: transform 0.1s ease;
}

.footer-link {
    color: #a1a1aa;
}

.footer-link:hover {
    color: #ffffff;
}

/* Light mode styles */
body.light-mode {
    background-color: #f1f5f9;
    color: #0f172a;
}

.light-mode .text-primary {
    color: #0f172a;
}

.light-mode .text-secondary {
    color: #475569;
}

.light-mode .bg-main {
    background-color: #f1f5f9;
}

.light-mode .bg-card {
    background-color: #ffffff;
}

.light-mode .border-color {
    border-color: #e2e8f0;
}

.light-mode .header {
    background-color: rgba(241, 245, 249, 0.8);
    border-bottom-color: #e2e8f0;
}

.light-mode .marquee-item {
    background-color: #e2e8f0;
    color: #334155;
}

.light-mode .marquee-item:hover {
    background-color: #cbd5e1;
    color: #1e293b;
    border-color: #cbd5e1;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05), inset 0 0 10px rgba(0, 0, 0, 0.02);
}

.light-mode .project-item {
    border-color: #e2e8f0;
}

.light-mode .experience-item img {
    background-color: #e2e8f0;
}

.light-mode .cta-button {
    background-color: #e2e8f0;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.light-mode .cta-button::before {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
}

.light-mode .cta-button:hover {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    border-color: rgba(0, 0, 0, 0.2);
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.15),
        0 0 25px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    color: #0f172a;
}

.light-mode .footer-link {
    color: #475569;
}

.light-mode .footer-link:hover {
    color: #1e293b;
}

.light-mode .gradient-text {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: initial;
    color: #2563eb;
}

.gradient-text {
    background: linear-gradient(to right, #6ee7b7, #3b82f6, #9333ea);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Marquee styles */
.marquee-container {
    overflow-x: hidden;
    position: relative;
    width: 100%;
    cursor: grab;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0;
}

.marquee-container::-webkit-scrollbar {
    display: none;
}

.marquee-container:active {
    cursor: grabbing;
}

.marquee-container.manual-scroll {
    overflow-x: auto;
}

.marquee-container:not(.manual-scroll) .marquee {
    animation-play-state: running !important;
}

.marquee {
    display: flex;
    animation: marquee-animation 30s linear infinite;
    width: max-content;
    transition: animation-play-state 0.3s ease, transform 0.1s linear;
    will-change: transform;
    align-items: center;
    animation-play-state: running;
    transform: translateX(0);
}

.marquee-content {
    display: flex;
    align-items: center;
}

.marquee:hover {
    animation-play-state: paused;
}

.marquee-item {
    flex-shrink: 0;
    padding: 0.75rem 1.5rem;
    margin: 5px 0.75rem;
    background-color: #171717;
    border-radius: 9999px;
    color: #a1a1aa;
    font-size: 1rem;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    user-select: none;
    position: relative;
    z-index: 1;
}

.marquee-item:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1), inset 0 0 10px rgba(255, 255, 255, 0.05);
    transform: translateY(-2px) scale(1.03);
    z-index: 10;
}

.marquee-container:hover .marquee {
    animation-play-state: paused;
}

@keyframes marquee-animation {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Ensure animation is applied properly */
.marquee {
    animation: marquee-animation 30s linear infinite !important;
}

/* 
Profile Image Styles */
.profile-image-container {
    position: relative;
    display: inline-block;
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.profile-image:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Light mode profile image */
.light-mode .profile-image {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.light-mode .profile-image:hover {
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* ===== NAVIGATION UNDERLINE HOVER EFFECTS ===== */

/* Navigation links with animated underlines */
.header nav a {
    position: relative;
    display: inline-block;
    padding-bottom: 4px;
    overflow: hidden;
}

.header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6ee7b7, #3b82f6, #9333ea);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
}

.header nav a:hover::after {
    width: 100%;
}

.header nav a:hover {
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* Light mode navigation underlines */
.light-mode .header nav a::after {
    background: linear-gradient(90deg, #059669, #2563eb, #7c3aed);
}

.light-mode .header nav a:hover {
    color: #0f172a !important;
}

/* Mobile navigation underlines */
.mobile-nav-links a {
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
    overflow: hidden;
}

.mobile-nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6ee7b7, #3b82f6, #9333ea);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
    transform: translateX(-50%);
}

.mobile-nav-links a:hover::after {
    width: 80%;
}

.light-mode .mobile-nav-links a::after {
    background: linear-gradient(90deg, #059669, #2563eb, #7c3aed);
}

/* ===== PROJECT HOVER EFFECTS & TOOLTIPS ===== */

/* Project item wrapper for positioning */
.project-item-wrapper {
    position: relative;
    overflow: visible;
}

/* Enhanced project item hover effects */
.project-item {
    position: relative;
    border-radius: 12px;
    transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    padding: 1.5rem 1rem;
    cursor: default;
}

.project-item:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow:
        0 15px 30px rgba(255, 255, 255, 0.08),
        0 0 20px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 255, 255, 0.02) 50%,
            rgba(255, 255, 255, 0.05) 100%);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Light mode project hover */
.light-mode .project-item:hover {
    box-shadow:
        0 15px 30px rgba(0, 0, 0, 0.06),
        0 0 20px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.8) 0%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0.8) 100%);
    border-color: rgba(0, 0, 0, 0.08);
}

/* Project tooltip styles */
.project-tooltip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateY(-50%) translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    pointer-events: none;
}

.project-item-wrapper:hover .project-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(-50%) translateX(-60%);
}

.tooltip-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tooltip-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    white-space: nowrap;
    min-width: 120px;
    justify-content: center;
}

.tooltip-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
}

.live-btn:hover {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    color: #ffffff;
}

.github-btn:hover {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    border-color: #6b7280;
    color: #ffffff;
}

/* Light mode tooltips */
.light-mode .tooltip-btn {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1f2937;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.light-mode .tooltip-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.light-mode .live-btn:hover {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
}

.light-mode .github-btn:hover {
    background: linear-gradient(135deg, #374151, #1f2937);
    color: #ffffff;
}

/* Mobile responsive tooltips */
@media (max-width: 768px) {
    .project-tooltip {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        margin-top: 16px;
        display: flex;
        justify-content: center;
    }

    .project-item-wrapper:hover .project-tooltip {
        transform: none;
    }

    .tooltip-buttons {
        flex-direction: row;
        gap: 12px;
    }

    .tooltip-btn {
        min-width: 100px;
        font-size: 13px;
        padding: 8px 12px;
    }

    .project-item:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

/* Responsive profile image */
@media (max-width: 768px) {
    .profile-image {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 480px) {
    .profile-image {
        width: 200px;
        height: 200px;
    }
}

/* Her
o heading specific font */
.hero-heading {
    font-family: 'Inter', sans-serif;
}

/* =
==== RESPONSIVE DESIGN OPTIMIZATIONS ===== */

/* Mobile First Approach - Base styles for mobile */
@media (max-width: 480px) {

    /* Container adjustments */
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    /* Header responsive */
    .header {
        padding: 1.5rem 0;
    }

    .header .container {
        flex-wrap: wrap;
        gap: 1rem;
        padding-left: 2rem;
        padding-right: 2rem;
    }

    /* Mobile main content spacing */
    main {
        padding-top: 0.5rem;
        padding-bottom: 2rem;
    }

    section {
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    /* Reduce hero section top spacing on mobile */
    section:first-child {
        padding-top: 1rem !important;
    }

    /* Reduce gaps between sections on mobile */
    section + section {
        margin-top: 1.5rem;
    }

    /* Specific mobile spacing adjustments */
    /* Reduce space after download resume button */
    section:first-child {
        padding-bottom: 1rem !important;
        margin-bottom: 1rem !important;
    }

    /* Reduce space around marquee section */
    section.py-16 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
        margin-bottom: 1rem !important;
    }

    /* Reduce space around about section */
    section#about {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    /* Reduce space around education section */
    section#education-experience {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    /* Reduce space around projects section */
    section#projects {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    /* Add divider lines after each project on mobile */
    .project-item-wrapper:not(:last-child) {
        position: relative;
        margin-bottom: 2rem;
        padding-bottom: 1rem;
    }

    .project-item-wrapper:not(:last-child)::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: rgba(226, 232, 240, 0.8);
        border-radius: 2px;
    }

    .light-mode .project-item-wrapper:not(:last-child)::after {
        background: rgba(0, 0, 0, 0.6);
    }

    /* Reduce space around footer */
    footer#contact {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Projects page specific mobile adjustments */
    /* Reduce spacing between navbar and Projects Catalogue title */
    main.py-32 {
        padding-top: 1.5rem !important;
    }

    .header h1 {
        font-size: 1rem;
    }

    /* Better text spacing on mobile */
    p {
        margin-bottom: 1rem;
        line-height: 1.6;
        padding: 0 0.5rem;
    }

    /* Specific spacing for hero section paragraph */
    .hero-text p {
        margin-bottom: 1.5rem !important;
    }

    /* Hero section mobile - Change layout order */
    .hero-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .hero-image {
        order: 1 !important;
        margin-bottom: 1rem !important;
    }

    .hero-text {
        order: 2 !important;
        text-align: center !important;
        padding: 0 1rem !important;
    }

    .hero-heading {
        font-size: 2.5rem !important;
        line-height: 1.2;
        margin-bottom: 1.5rem;
        text-align: center !important;
    }

    /* Profile image mobile */
    .profile-image {
        width: 200px !important;
        height: 200px !important;
        margin: 0 auto !important;
    }

    .profile-image-container {
        display: flex !important;
        justify-content: center !important;
    }

    /* Additional mobile hero layout enforcement */
    @media (max-width: 480px) {
        section .hero-container {
            display: flex !important;
            flex-direction: column !important;
        }
        
        section .hero-image {
            order: 1 !important;
        }
        
        section .hero-text {
            order: 2 !important;
        }
    }

    /* Marquee mobile */
    .marquee-item {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        margin: 3px 0.5rem;
    }

    /* Project items mobile */
    .project-item {
        padding: 1.5rem 1rem !important;
        text-align: center;
        margin: 0 0.5rem;
        position: relative;
    }

    .project-item h4 {
        font-size: 2rem !important;
        margin-bottom: 1rem;
    }

    /* Experience items mobile */
    .experience-item {
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 1rem !important;
        text-align: left !important;
        padding: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    .experience-item img {
        width: 3rem !important;
        height: 3rem !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
    }

    .experience-item .flex-grow {
        flex: 1 !important;
        margin-left: 1rem !important;
    }

    .experience-item .flex-grow p,
    .experience-item .flex-grow h4 {
        margin: 0 !important;
        padding: 0 !important;
        text-align: left !important;
    }

    .experience-item .flex-grow p:first-child {
        margin-bottom: 0.25rem !important;
        font-size: 0.875rem !important;
    }

    .experience-item .flex-grow h4 {
        margin-bottom: 0.25rem !important;
        font-size: 1.125rem !important;
        line-height: 1.3 !important;
        font-weight: 600 !important;
    }

    .experience-item .flex-grow p:last-child {
        margin-bottom: 0 !important;
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
    }

    /* Specific fix for education section alignment */
    #education-experience .experience-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        text-align: left !important;
        gap: 1rem !important;
    }

    #education-experience .experience-item .flex-shrink-0 img {
        width: 3rem !important;
        height: 3rem !important;
        margin: 0 !important;
    }

    #education-experience .experience-item .flex-grow {
        flex: 1 !important;
        text-align: left !important;
    }

    #education-experience .experience-item .flex-grow * {
        text-align: left !important;
    }

    /* CTA buttons mobile */
    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
        width: 100%;
        justify-content: center;
        margin: 1rem 0;
    }

    .cta-button:hover {
        transform: translateY(-2px) scale(1.01);
    }

    /* Footer mobile */
    .footer-cta h3 {
        font-size: 2rem !important;
    }

    /* Navigation mobile */
    .header nav {
        display: none;
    }
}

/* Tablet styles */
@media (min-width: 481px) and (max-width: 768px) {

    /* Hero section tablet */
    .hero-heading {
        font-size: 3.5rem !important;
    }

    /* Profile image tablet */
    .profile-image {
        width: 220px !important;
        height: 220px !important;
    }

    /* Project items tablet */
    .project-item h4 {
        font-size: 2.5rem !important;
    }

    /* Marquee tablet */
    .marquee-item {
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }
}

/* Large tablet/small desktop */
@media (min-width: 769px) and (max-width: 1024px) {

    /* Hero section */
    .hero-heading {
        font-size: 4rem !important;
    }

    /* Profile image */
    .profile-image {
        width: 260px !important;
        height: 260px !important;
    }

    /* Container max width */
    .max-w-6xl {
        max-width: 60rem;
    }
}

/* Desktop optimizations */
@media (min-width: 1025px) {

    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
    }

    /* Enhanced hover effects for desktop - handled by main project styles */

    .marquee-item:hover {
        transform: translateY(-2px) scale(1.03);
    }

    /* Better spacing for large screens */
    .container {
        max-width: 1200px;
    }
}

/* Ultra-wide screens */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    .hero-heading {
        font-size: 5rem !important;
    }

    .profile-image {
        width: 350px !important;
        height: 350px !important;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .profile-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-heading {
        font-size: 2.25rem !important;
    }

    .profile-image {
        width: 150px !important;
        height: 150px !important;
    }

    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {

    /* Larger touch targets */
    .cta-button {
        min-height: 48px;
        padding: 1rem 2rem;
    }

    .cta-button:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .light-mode .cta-button:hover {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .marquee-item {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }

    /* Remove hover effects on touch devices */
    .project-item:hover {
        transform: none;
        background: inherit;
        box-shadow: none;
        border-color: inherit;
    }

    .project-tooltip {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        position: static;
        transform: none;
        margin-top: 16px;
        display: flex;
        justify-content: center;
    }

    .marquee-item:hover {
        transform: none;
        color: inherit;
        border-color: transparent;
        box-shadow: none;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .marquee {
        animation: marquee-animation 60s linear infinite;
    }
}

/* Print styles */
@media print {

    .header,
    .marquee-container,
    .cta-button,
    .footer-cta {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .profile-image {
        width: 200px;
        height: 200px;
    }
}

/* 
===== HAMBURGER MENU STYLES ===== */

/* Hamburger button */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    background: none;
    border: none;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #e2e8f0;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.light-mode .hamburger span {
    background-color: #0f172a;
}

/* Hamburger animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

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

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

/* Mobile navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.light-mode .mobile-nav {
    background-color: rgba(241, 245, 249, 0.95);
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
    display: flex;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.mobile-nav-links a {
    color: #e2e8f0;
    font-size: 1.5rem;
    font-weight: 500;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    min-width: 200px;
    text-align: center;
    border: 1px solid transparent;
}

.light-mode .mobile-nav-links a {
    color: #0f172a;
}

.mobile-nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.light-mode .mobile-nav-links a:hover {
    background-color: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Show hamburger on mobile */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .mobile-nav {
        display: none;
    }

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

    /* Hide desktop navigation */
    .header nav {
        display: none !important;
    }
}

