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

/* Enhanced Background */
body {
    font-family: 'Exo 2', sans-serif;
    background:
        radial-gradient(ellipse at center, rgba(10, 10, 26, 0.9) 0%, rgba(5, 5, 15, 0.9) 70%, rgba(0, 0, 0, 0.9) 100%),
        linear-gradient(135deg, rgba(20, 20, 40, 0.8) 0%, rgba(10, 10, 30, 0.9) 100%);
    color: #e0e0ff;
    min-height: 100vh;
    min-height: 100dvh; /* Use dvh for better mobile viewport height */
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.5s ease;
    line-height: 1.6;
}

/* Enhanced body with smooth transitions */
body.page-loading {
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.page-loaded {
    opacity: 1;
}

/* Improved focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #00ffff;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Enhanced typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 600;
}

p {
    line-height: 1.7;
    font-weight: 400;
}

/* Improved image loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Enhanced button styles */
.btn-primary, .btn-secondary {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: none;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    user-select: none;
    touch-action: manipulation;
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.btn-primary:active, .btn-secondary:active {
    transform: translateY(0);
}

/* Enhanced card styles */
.feature-card, .work-card, .stat-card, .contact-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    background: rgba(20, 20, 40, 0.6);
}

.feature-card:hover, .work-card:hover, .stat-card:hover, .contact-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
    background: rgba(30, 30, 50, 0.7);
}

/* Enhanced link styles */
a {
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

a:hover {
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Improved form styles */
input, textarea, select {
    transition: all 0.3s ease;
    border-radius: 8px;
}

input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.3);
}

/* Enhanced scroll behavior */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Account for fixed navbar */
}

/* Adjust for mobile */
@media screen and (max-width: 768px) {
    html {
        scroll-padding-top: 70px; /* Adjust for mobile navbar */
    }
}

/* Loading animation for elements */
.loading-skeleton {
    background: linear-gradient(90deg, #1a1a3a 25%, #2a2a4a 50%, #1a1a3a 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Enhanced accessibility */
.screen-reader-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Improved contrast for better readability */
.high-contrast {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Enhanced grid layouts */
.grid-responsive {
    display: grid;
    gap: 2rem;
}

/* Responsive grid adjustments */
@media (min-width: 768px) {
    .grid-responsive {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Enhanced animation performance */
.animate-in {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

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

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

/* Advanced Visual Effects */
.glow-effect {
    position: relative;
}

.glow-effect::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00ffff, #8a2be2, #00ffff);
    border-radius: inherit;
    z-index: -1;
    animation: glow-pulse 3s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Hover glow effect */
.glow-hover:hover::before {
    opacity: 1;
    animation-play-state: running;
}

/* Shine effect */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(25deg);
    transition: all 0.6s;
}

.shine-effect:hover::after {
    left: 120%;
}

/* Gradient border effect */
.gradient-border {
    position: relative;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00ffff, #8a2be2, #00ffff);
    border-radius: 10px;
    z-index: -1;
}

/* Animated background */
.animated-bg {
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
}

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

/* Floating animation */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Pulse animation */
.pulsing {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

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

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(42px, 9999px, 44px, 0); }
    5% { clip: rect(12px, 9999px, 59px, 0); }
    10% { clip: rect(48px, 9999px, 29px, 0); }
    15% { clip: rect(42px, 9999px, 73px, 0); }
    20% { clip: rect(63px, 9999px, 27px, 0); }
    25% { clip: rect(34px, 9999px, 55px, 0); }
    30% { clip: rect(86px, 9999px, 73px, 0); }
    35% { clip: rect(20px, 9999px, 20px, 0); }
    40% { clip: rect(26px, 9999px, 60px, 0); }
    45% { clip: rect(25px, 9999px, 66px, 0); }
    50% { clip: rect(57px, 9999px, 98px, 0); }
    55% { clip: rect(5px, 9999px, 46px, 0); }
    60% { clip: rect(82px, 9999px, 31px, 0); }
    65% { clip: rect(54px, 9999px, 27px, 0); }
    70% { clip: rect(28px, 9999px, 99px, 0); }
    75% { clip: rect(45px, 9999px, 69px, 0); }
    80% { clip: rect(23px, 9999px, 85px, 0); }
    85% { clip: rect(1px, 9999px, 83px, 0); }
    90% { clip: rect(72px, 9999px, 11px, 0); }
    95% { clip: rect(60px, 9999px, 89px, 0); }
    100% { clip: rect(52px, 9999px, 74px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    5% { clip: rect(52px, 9999px, 74px, 0); }
    10% { clip: rect(79px, 9999px, 85px, 0); }
    15% { clip: rect(75px, 9999px, 5px, 0); }
    20% { clip: rect(67px, 9999px, 61px, 0); }
    25% { clip: rect(14px, 9999px, 79px, 0); }
    30% { clip: rect(1px, 9999px, 66px, 0); }
    35% { clip: rect(86px, 9999px, 30px, 0); }
    40% { clip: rect(23px, 9999px, 98px, 0); }
    45% { clip: rect(85px, 9999px, 72px, 0); }
    50% { clip: rect(71px, 9999px, 75px, 0); }
    55% { clip: rect(2px, 9999px, 48px, 0); }
    60% { clip: rect(30px, 9999px, 16px, 0); }
    65% { clip: rect(59px, 9999px, 50px, 0); }
    70% { clip: rect(41px, 9999px, 62px, 0); }
    75% { clip: rect(2px, 9999px, 82px, 0); }
    80% { clip: rect(47px, 9999px, 73px, 0); }
    85% { clip: rect(3px, 9999px, 27px, 0); }
    90% { clip: rect(26px, 9999px, 55px, 0); }
    95% { clip: rect(42px, 9999px, 97px, 0); }
    100% { clip: rect(38px, 9999px, 49px, 0); }
}

/* Scan line effect */
.scan-line {
    position: relative;
    overflow: hidden;
}

.scan-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 255, 255, 0.1) 50%, transparent 100%);
    animation: scan 4s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* Neon effect */
.neon-text {
    text-shadow:
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 15px #fff,
        0 0 20px #0ff,
        0 0 35px #0ff,
        0 0 40px #0ff;
}

.neon-border {
    box-shadow:
        0 0 5px #fff,
        inset 0 0 5px #fff,
        0 0 10px #0ff,
        inset 0 0 10px #0ff,
        0 0 15px #0ff,
        inset 0 0 15px #0ff;
}

/* Ripple effect */
.ripple-container {
    position: relative;
    overflow: hidden;
}

/* Parallax effect */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Enhanced card effects */
.enhanced-card {
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-style: preserve-3d;
}

.enhanced-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 25px 50px -12px rgba(0, 212, 255, 0.25);
}

/* Enhanced button effects */
.enhanced-btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.enhanced-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
    z-index: 1;
}

.enhanced-btn:hover::before {
    transform: translateX(100%);
}

.enhanced-btn span {
    position: relative;
    z-index: 2;
}

/* Professional Grid Pattern */
.grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
}

/* Terminal Location Panel */
.terminal-location {
    background: rgba(10, 10, 20, 0.8);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1.5rem;
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
    max-width: 250px;
}

.terminal-header {
    background: rgba(30, 30, 40, 0.9);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    cursor: move;
}

.terminal-dots {
    display: flex;
    gap: 0.4rem;
    margin-right: 0.8rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff5f56;
}

.dot:nth-child(2) {
    background: #ffbd2e;
}

.dot:nth-child(3) {
    background: #27c93f;
}

.terminal-title {
    font-family: 'Exo 2', monospace;
    font-size: 0.8rem;
    color: #a0a0d0;
    letter-spacing: 0.5px;
}

.terminal-body {
    padding: 0.8rem 1rem;
}

.location-content {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.location-icon {
    color: #00D4FF;
    font-size: 0.9rem;
}

.location-text {
    font-family: 'Exo 2', monospace;
    font-size: 0.8rem;
    color: #e0e0ff;
    letter-spacing: 0.5px;
}

/* Simplified Custom Cursor Styles */
.cursor {
    position: fixed;
    width: 12px;
    height: 12px;
    border: 1px solid #00D4FF;
    border-radius: 50%;
    background: transparent;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease, border-color 0.1s ease, box-shadow 0.1s ease;
    box-shadow: 0 0 3px rgba(0, 212, 255, 0.5);
}

/* Class to hide default cursor when custom cursor is active */
.hide-default-cursor {
    cursor: none !important;
}

/* Hide default cursor on desktop when custom cursor is active */
/* This will be managed by JavaScript */
/* .no-cursor {
    cursor: none !important;
} */

/* Keep hover effects */
.feature-card:hover, .work-card:hover, .stat-card:hover, .contact-card:hover, .btn-primary:hover, .btn-secondary:hover {
    transition: all 0.3s ease;
}

/* Enhanced background elements */
.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(0, 212, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

.background-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Enhanced card styles */
.feature-card, .work-card, .stat-card, .contact-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
    overflow: hidden;
}

.feature-card::after, .work-card::after, .stat-card::after, .contact-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.feature-card:hover::after, .work-card:hover::after, .stat-card:hover::after, .contact-card:hover::after {
    opacity: 1;
}

/* Enhanced button styles */
.btn-primary, .btn-secondary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before, .btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.btn-primary:hover::before, .btn-secondary:hover::before {
    left: 100%;
}

/* Enhanced navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background: rgba(10, 10, 30, 0.85);
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Add padding to body to account for fixed navbar */
body {
    padding-top: 80px; /* Height of navbar */
}

/* Navbar scrolled state */
.navbar.scrolled {
    background: rgba(10, 10, 30, 0.95);
    padding: 1rem 4rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Adjust for mobile */
@media screen and (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
        min-height: 60px;
    }

    body {
        padding-top: 60px;
    }

    .navbar.scrolled {
        padding: 0.8rem 1.5rem;
    }
}

.nav-logo-link {
    text-decoration: none;
    display: block;
    outline: none;
}

.nav-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #00ffff, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-logo:hover, .nav-logo:focus {
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.7);
    transform: scale(1.05);
    text-decoration: none;
}

.nav-logo-link:hover, .nav-logo-link:focus {
    text-decoration: none;
    outline: none;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: #a0a0d0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a.active {
    color: #00ffff;
}

.nav-links a:hover {
    color: #00ffff;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00ffff, #8a2be2);
    transition: width 0.3s ease;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #00ffff;
    margin: 3px 0;
    transition: 0.3s;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Common Section Styles */
.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, #ffffff, #00ffff, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.section-subtitle {
    font-size: 1.2rem;
    text-align: center;
    color: #a0a0d0;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Enhanced hero section */
.hero-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Specific mobile styles for hero visual */
@media screen and (max-width: 768px) {
    .hero-visual {
        width: 100%;
        align-items: center;
    }

    .terminal-location {
        align-self: center;
        margin: 1.5rem auto 0 auto;
    }
}

.developer-photo-container {
    position: relative;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #00D4FF;
    box-shadow: 
        0 0 25px rgba(0, 212, 255, 0.4),
        inset 0 0 20px rgba(0, 212, 255, 0.1);
    animation: float 8s ease-in-out infinite;
    margin-bottom: 1.5rem;
}

.hero-developer-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 2px solid #00D4FF;
    animation: pulse 3s infinite;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    z-index: -1;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    min-height: 100dvh; /* Use dvh for better mobile viewport height */
    display: flex;
    align-items: center;
    padding: 80px 4rem 4rem 4rem; /* Account for fixed navbar */
    position: relative;
    background: radial-gradient(ellipse at center, rgba(15, 15, 35, 0.9) 0%, rgba(5, 5, 15, 0.95) 100%);
}

/* Adjust for mobile */
@media screen and (max-width: 768px) {
    .hero {
        padding: 70px 1.5rem 2rem 1.5rem; /* Adjust for mobile navbar height */
    }
}

/* Other sections - add top padding to account for fixed navbar */
.about-section, .works-section, .contact-section, .stats-section, .social-section, .features {
    padding: 100px 4rem 4rem 4rem; /* Extra top padding to account for navbar */
}

/* Adjust for mobile */
@media screen and (max-width: 768px) {
    .about-section, .works-section, .contact-section, .stats-section, .social-section, .features {
        padding: 80px 1.5rem 3rem 1.5rem; /* Adjust for mobile */
    }
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 4rem;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, #ffffff, #00ffff, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #a0a0d0;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2.5rem;
    border-radius: 8px;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(45deg, #00ffff, #8a2be2);
    color: white;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.7);
}

.btn-secondary {
    background: transparent;
    color: #00ffff;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    transform: translateY(-3px);
}

.cpu-illustration {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cpu-core {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, #0a0a1a, #1a1a3a);
    border: 2px solid #00ffff;
    border-radius: 8px;
    position: relative;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    transform: rotateX(60deg) rotateZ(-45deg);
}

.circuit-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

.line {
    border: 1px solid #00ffff;
    opacity: 0.3;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.line.horizontal {
    grid-column: 1 / 4;
    grid-row: 2 / 3;
    align-self: center;
}

.line.vertical {
    grid-column: 2 / 3;
    grid-row: 1 / 4;
    justify-self: center;
}

.line.diagonal {
    grid-column: 1 / 4;
    grid-row: 1 / 4;
    align-self: stretch;
    justify-self: stretch;
    transform: rotate(45deg);
    width: 140%;
    height: 1px;
    margin: auto;
}

.line.diagonal.reverse {
    transform: rotate(-45deg);
}

.energy-pulse {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 2px solid #00ffff;
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Features Section */
.features {
    padding: 8rem 4rem;
    position: relative;
}

.feature-card {
    background: rgba(20, 20, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, #00ffff, #8a2be2, #008080, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.purple-glow::before {
    background: linear-gradient(90deg, transparent, #8a2be2, #da70d6, transparent);
}

.blue-glow::before {
    background: linear-gradient(90deg, transparent, #1e90ff, #00ffff, transparent);
}

.teal-glow::before {
    background: linear-gradient(90deg, transparent, #008080, #00ffff, transparent);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.purple-glow:hover {
    box-shadow: 0 20px 40px rgba(138, 43, 226, 0.3);
}

.blue-glow:hover {
    box-shadow: 0 20px 40px rgba(30, 144, 255, 0.3);
}

.teal-glow:hover {
    box-shadow: 0 20px 40px rgba(0, 128, 128, 0.3);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    height: 80px;
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.purple-glow .card-icon {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(218, 112, 214, 0.1));
    border: 1px solid rgba(138, 43, 226, 0.2);
}

.blue-glow .card-icon {
    background: linear-gradient(135deg, rgba(30, 144, 255, 0.1), rgba(0, 255, 255, 0.1));
    border: 1px solid rgba(30, 144, 255, 0.2);
}

.teal-glow .card-icon {
    background: linear-gradient(135deg, rgba(0, 128, 128, 0.1), rgba(0, 255, 255, 0.1));
    border: 1px solid rgba(0, 128, 128, 0.2);
}

.purple-glow .card-icon i {
    background: linear-gradient(45deg, #8a2be2, #da70d6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blue-glow .card-icon i {
    background: linear-gradient(45deg, #1e90ff, #00ffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.teal-glow .card-icon i {
    background: linear-gradient(45deg, #008080, #00ffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
    font-weight: 600;
    text-align: center;
}

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

.feature-card p {
    color: #a0a0d0;
    line-height: 1.7;
    font-size: 1rem;
    text-align: center;
}

/* About Section */
.about-section {
    padding: 8rem 4rem;
    position: relative;
}

.about-content {
    display: flex;
    gap: 4rem;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, #00ffff, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #a0a0d0;
    margin-bottom: 2rem;
}

.skills-terminal {
    background: rgba(10, 10, 20, 0.8);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 3rem;
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}

.terminal-header {
    background: rgba(30, 30, 40, 0.9);
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.terminal-dots {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f56;
}

.dot:nth-child(2) {
    background: #ffbd2e;
}

.dot:nth-child(3) {
    background: #27c93f;
}

.terminal-title {
    font-family: 'Exo 2', monospace;
    font-size: 0.9rem;
    color: #a0a0d0;
    letter-spacing: 0.5px;
}

.terminal-body {
    padding: 1.5rem;
}

.skill-panel {
    background: rgba(20, 20, 30, 0.6);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.skill-panel:last-child {
    margin-bottom: 0;
}

.panel-header {
    background: rgba(30, 30, 40, 0.8);
    padding: 0.8rem 1.2rem;
    font-size: 1.1rem;
    color: #00D4FF;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.panel-content {
    padding: 1.2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
}

.skill-item {
    background: rgba(30, 30, 50, 0.5);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    color: #e0e0ff;
    font-size: 0.95rem;
    text-align: center;
    border: 1px solid rgba(0, 212, 255, 0.1);
    transition: all 0.3s ease;
}

.skill-item:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.1);
}

.about-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.developer-avatar {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0a0a1a, #1a1a3a);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #00ffff;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    overflow: hidden;
}

.developer-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 2;
    position: relative;
}

.avatar-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 2px solid #00ffff;
    animation: pulse 3s infinite;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

.avatar-border {
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

/* Stats Section */
.stats-section {
    padding: 4rem 4rem;
    position: relative;
}

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

.stat-card {
    background: rgba(20, 20, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.2);
}

.stat-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(90deg, #00ffff, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: #a0a0d0;
}

/* Works Section */
.works-section {
    padding: 8rem 4rem;
    position: relative;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.work-card {
    background: rgba(20, 20, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.work-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.2);
}

.work-image {
    height: 200px;
    position: relative;
    background: linear-gradient(45deg, #0a0a1a, #1a1a3a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 3s infinite;
}

.work-content {
    padding: 2rem;
}

.work-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ffffff;
}

.work-description {
    color: #a0a0d0;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #00ffff;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: 'Exo 2', sans-serif;
}

.work-link {
    display: inline-block;
    color: #00ffff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.work-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #00ffff;
    transition: width 0.3s ease;
}

.work-link:hover::after {
    width: 100%;
}

/* Contact Section */
.contact-section {
    padding: 8rem 4rem;
    position: relative;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-card {
    background: rgba(20, 20, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #00ffff;
}

.contact-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.contact-card p {
    color: #a0a0d0;
    margin-bottom: 0.5rem;
}

.contact-form-container {
    background: rgba(20, 20, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
}

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

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(10, 10, 20, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e0e0ff;
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: #a0a0d0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.8rem;
    background: rgba(20, 20, 40, 0.8);
    padding: 0 0.5rem;
    color: #00ffff;
}

/* Social Links Section */
.social-section {
    padding: 4rem 4rem;
    position: relative;
}

.social-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(90deg, #00ffff, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: rgba(20, 20, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #00ffff;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
}

.social-link i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.social-link span {
    font-size: 0.9rem;
    color: #e0e0ff;
}

/* Footer */
.footer {
    padding: 3rem 4rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0a0d0;
}

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #00D4FF, #8a2be2);
    z-index: 1001;
    transition: width 0.3s ease;
}

/* Enhanced typography */
.text-gradient {
    background: linear-gradient(90deg, #00D4FF, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Floating elements animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.floating-element {
    animation: float 6s ease-in-out infinite;
}

/* Enhanced form styles */
.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(10, 10, 20, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e0e0ff;
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #00D4FF;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.form-input::placeholder {
    color: #a0a0d0;
    opacity: 0.6;
}

.form-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #00D4FF;
    z-index: 1;
}

/* Form message styles */
.form-message {
    margin-top: 1rem;
    padding: 0.8rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    display: none;
}

.form-message.success {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    color: #00ff00;
    display: block;
}

.form-message.error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff0000;
    display: block;
}

/* Enhanced hero section */
.cpu-illustration {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: float 8s ease-in-out infinite;
}

.energy-pulse {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 2px solid #00D4FF;
    border-radius: 50%;
    animation: pulse 2s infinite, rotate 10s linear infinite;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Enhanced grid layouts */
.works-grid, .skills-grid, .stats-grid {
    gap: 2.5rem;
}


/* Background Elements */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.floating-cube {
    position: absolute;
    width: 80px;
    height: 80px;
    transform-style: preserve-3d;
    animation: rotate 25s infinite linear;
    opacity: 0.05;
    filter: blur(1px);
}

.cube-1 {
    top: 15%;
    left: 5%;
    background: radial-gradient(circle, #00ffff, #0a0a1a);
}

.cube-2 {
    top: 70%;
    right: 8%;
    background: radial-gradient(circle, #8a2be2, #0a0a1a);
}

.cube-3 {
    bottom: 15%;
    left: 15%;
    background: radial-gradient(circle, #1e90ff, #0a0a1a);
}

@keyframes rotate {
    0% { transform: rotateX(0) rotateY(0) rotateZ(0); }
    100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

/* Mobile-First Responsive Design */
/* Extra small devices (phones, 600px and down) */
@media screen and (max-width: 600px) {
    .navbar {
        padding: 1rem 1.5rem;
        min-height: 60px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 30, 0.98);
        flex-direction: column;
        align-items: center;
        padding: 2rem 1rem;
        gap: 1.2rem;
        backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(0, 212, 255, 0.3);
        z-index: 999;
        transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        opacity: 0;
        transform: translateY(-20px);
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex !important;
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }

    .nav-links.collapsed {
        opacity: 0;
        transform: translateY(-20px);
        visibility: hidden;
        display: none !important;
    }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        padding: 8px;
        z-index: 1001;
        cursor: pointer;
        background: transparent;
        border: none;
        outline: none;
    }

    .nav-toggle span {
        display: block;
        width: 24px;
        height: 3px;
        background: #00D4FF;
        margin: 4px 0;
        transition: 0.3s;
        border-radius: 2px;
    }

    /* Ensure the toggle button is accessible on mobile */
    .nav-toggle:focus {
        outline: 2px solid #00D4FF;
        outline-offset: 2px;
        border-radius: 4px;
    }

    /* Ensure proper mobile menu behavior */
    @media screen and (max-width: 768px) {
        body.menu-open {
            overflow: hidden;
        }

        .nav-links::-webkit-scrollbar {
            width: 6px;
        }

        .nav-links::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.1);
        }

        .nav-links::-webkit-scrollbar-thumb {
            background: rgba(0, 212, 255, 0.5);
            border-radius: 3px;
        }

        .nav-links::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 212, 255, 0.8);
        }
    }

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

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

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

    .hero {
        padding: 0 1.5rem;
        padding-top: 7rem;
        min-height: 100vh;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding-top: 2rem;
        align-items: center;
    }

    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        padding: 0.9rem 1.5rem;
        font-size: 0.9rem;
    }

    .features,
    .about-section,
    .works-section,
    .contact-section,
    .stats-section,
    .social-section {
        padding: 3rem 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .about-content {
        flex-direction: column;
        gap: 2rem;
    }

    .about-visual {
        order: -1; /* Image comes first on mobile */
    }

    .developer-avatar {
        width: 220px;
        height: 220px;
    }

    .avatar-glow {
        width: 240px;
        height: 240px;
    }

    .avatar-border {
        width: 260px;
        height: 260px;
    }

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

    .works-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .work-card {
        margin-bottom: 1.5rem;
    }

    .work-image {
        height: 150px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .social-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .social-link {
        width: 70px;
        height: 70px;
        padding: 0.5rem;
    }

    .social-link i {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }

    .social-link span {
        font-size: 0.8rem;
    }

    .footer {
        padding: 2rem 1.5rem;
    }

    .skills-terminal {
        overflow-x: auto;
    }

    .skill-panel {
        min-width: 300px;
    }
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media screen and (min-width: 601px) and (max-width: 768px) {
    .navbar {
        padding: 1.2rem 2rem;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 30, 0.95);
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        gap: 1.5rem;
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(0, 255, 255, 0.1);
        z-index: 999;
    }

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

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .hero {
        padding: 0 2rem;
        padding-top: 7rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2.5rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .features,
    .about-section,
    .works-section,
    .contact-section,
    .stats-section,
    .social-section {
        padding: 3.5rem 2rem;
    }

    .about-content {
        flex-direction: column;
        gap: 3rem;
    }

    .works-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

/* Medium devices (landscape tablets, 769px and up) */
@media screen and (min-width: 769px) and (max-width: 992px) {
    .hero-content {
        gap: 3rem;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .about-content {
        flex-direction: column;
        gap: 3rem;
    }

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

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

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

/* Large devices (desktops, 993px and up) */
@media screen and (min-width: 993px) {
    .nav-links {
        display: flex;
    }

    .nav-toggle {
        display: none;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media screen and (min-width: 1200px) {
    .hero-content {
        gap: 4rem;
    }

    .about-content {
        flex-direction: row;
    }

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

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

/* Universal mobile improvements */
* {
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
    -webkit-touch-callout: none; /* Prevent callout to copy image, etc */
    -webkit-user-select: none; /* Prevent copy paste, to allow, change to text */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Ensure proper viewport sizing */
@viewport {
    width: device-width;
    zoom: 1.0;
}

/* Improve touch targets */
a, button, .social-link, .feature-card, .work-card, .stat-card, .contact-card {
    touch-action: manipulation; /* Optimize for touch */
}

/* Adjust for notches and rounded corners on mobile devices */
@supports (padding-top: env(safe-area-inset-top)) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* Additional mobile optimizations */
@media screen and (max-width: 768px) {
    /* Improve scrolling performance */
    body {
        -webkit-overflow-scrolling: touch; /* Enable momentum scrolling for iOS */
    }

    /* Prevent zoom on form focus on iOS */
    input[type="text"], input[type="email"], input[type="password"], textarea {
        font-size: 16px; /* Prevents automatic zoom on focus */
    }

    /* Better touch targets for buttons */
    .btn-primary, .btn-secondary {
        min-height: 48px; /* Minimum touch target size (44px minimum + buffer) */
        min-width: 120px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 1rem 1.8rem;
        font-size: 1rem;
    }

    /* Increase touch targets for navigation links */
    .nav-links a {
        padding: 0.8rem 1.2rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Increase touch targets for social links */
    .social-link {
        min-width: 80px;
        min-height: 80px;
        width: 80px;
        height: 80px;
    }

    /* Increase touch targets for cards */
    .feature-card, .work-card, .stat-card, .contact-card {
        min-height: 150px;
    }

    /* Adjust for mobile navigation */
    .navbar {
        min-height: 60px;
    }

    /* Ensure content fits properly on mobile screens */
    .container {
        width: 100%;
        box-sizing: border-box;
    }

    /* Better spacing on mobile */
    section {
        padding: 2.5rem 0;
    }

    /* Adjust hero section for mobile */
    .hero {
        padding: 2rem 1.5rem;
        min-height: 100vh;
    }

    .hero-content {
        gap: 2rem;
        padding-top: 1rem;
    }

    /* Adjust features section for mobile */
    .features {
        padding: 3rem 1.5rem 2rem;
    }

    .feature-card {
        margin-bottom: 1.5rem;
        padding: 1.8rem;
    }

    /* Adjust about section for mobile */
    .about-section {
        padding: 3rem 1.5rem;
    }

    /* Adjust works section for mobile */
    .works-section {
        padding: 3rem 1.5rem;
    }

    .works-grid {
        gap: 1.5rem;
    }

    /* Adjust contact section for mobile */
    .contact-section {
        padding: 3rem 1.5rem;
    }

    .contact-content {
        gap: 2rem;
    }

    /* Adjust stats section for mobile */
    .stats-section {
        padding: 2rem 1.5rem;
    }

    .stats-grid {
        gap: 1.2rem;
    }

    /* Adjust font sizes for better readability on mobile */
    .hero-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }

    .section-title {
        font-size: clamp(1.5rem, 5vw, 2.2rem);
    }

    /* Ensure images scale properly */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Better form layout on mobile */
    .form-group {
        width: 100%;
    }

    /* Adjust terminal location panel for mobile */
    .terminal-location {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        position: relative;
        left: 0;
        right: 0;
        margin-top: 1.5rem;
    }

    /* Adjust terminal location panel for mobile in hero section */
    .hero .terminal-location {
        position: relative;
        order: 2; /* Move below the image on mobile */
        margin: 1.5rem auto 0 auto;
        max-width: 100%;
    }

    /* Fix potential overflow issues */
    .hero, .about-section, .works-section, .contact-section {
        overflow-x: clip; /* Prevent horizontal scroll */
    }

    /* Ensure proper text wrapping */
    h1, h2, h3, p {
        word-break: break-word;
        hyphens: auto;
    }

    /* Fix potential issues with flexbox on older mobile browsers */
    .hero-content, .about-content, .contact-content {
        min-width: 0; /* Fix flexbox issues */
    }
}

/* General fixes for common issues */
.no-overflow {
    overflow: hidden;
}

.fix-transforms {
    will-change: auto;
    transform: translateZ(0); /* Hardware acceleration hint */
}

/* Prevent layout shift issues */
.img-placeholder {
    position: relative;
}
.img-placeholder::before {
    content: "";
    display: block;
    padding-bottom: 100%; /* Square aspect ratio, adjust as needed */
}

/* Fix for potential z-index stacking issues */
.modal-open {
    overflow: hidden;
}

/* Better focus indicators for accessibility */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid #00ffff;
    outline-offset: 2px;
}

/* Fix for text selection issues */
.selectable-text {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Fix for potential font loading issues */
.font-loaded {
    font-display: swap;
}

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

/* Better focus management for keyboard users */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Optimize animations for mobile devices */
@media screen and (max-width: 768px) {
    /* Reduce animation intensity on mobile */
    .animate-in {
        animation: fadeInUpMobile 0.4s ease forwards;
        opacity: 0;
        transform: translateY(20px);
    }

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

    /* Reduce floating animation intensity on mobile */
    .floating {
        animation: floatingMobile 4s ease-in-out infinite;
    }

    @keyframes floatingMobile {
        0% { transform: translateY(0px); }
        50% { transform: translateY(-5px); }
        100% { transform: translateY(0px); }
    }

    /* Reduce pulse animation intensity */
    .pulsing {
        animation: pulseMobile 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    }

    @keyframes pulseMobile {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.7; }
    }

    /* Reduce glitch animation intensity */
    .glitch::before {
        animation: glitch-anim-mobile 3s infinite linear alternate-reverse;
    }

    .glitch::after {
        animation: glitch-anim2-mobile 3s infinite linear alternate-reverse;
    }

    @keyframes glitch-anim-mobile {
        0% { clip: rect(42px, 9999px, 44px, 0); }
        5% { clip: rect(12px, 9999px, 59px, 0); }
        10% { clip: rect(48px, 9999px, 29px, 0); }
        15% { clip: rect(42px, 9999px, 73px, 0); }
        20% { clip: rect(63px, 9999px, 27px, 0); }
        25% { clip: rect(34px, 9999px, 55px, 0); }
        30% { clip: rect(86px, 9999px, 73px, 0); }
        35% { clip: rect(20px, 9999px, 20px, 0); }
        40% { clip: rect(26px, 9999px, 60px, 0); }
        45% { clip: rect(25px, 9999px, 66px, 0); }
        50% { clip: rect(57px, 9999px, 98px, 0); }
        55% { clip: rect(5px, 9999px, 46px, 0); }
        60% { clip: rect(82px, 9999px, 31px, 0); }
        65% { clip: rect(54px, 9999px, 27px, 0); }
        70% { clip: rect(28px, 9999px, 99px, 0); }
        75% { clip: rect(45px, 9999px, 69px, 0); }
        80% { clip: rect(23px, 9999px, 85px, 0); }
        85% { clip: rect(1px, 9999px, 83px, 0); }
        90% { clip: rect(72px, 9999px, 11px, 0); }
        95% { clip: rect(60px, 9999px, 89px, 0); }
        100% { clip: rect(52px, 9999px, 74px, 0); }
    }

    @keyframes glitch-anim2-mobile {
        0% { clip: rect(65px, 9999px, 100px, 0); }
        5% { clip: rect(52px, 9999px, 74px, 0); }
        10% { clip: rect(79px, 9999px, 85px, 0); }
        15% { clip: rect(75px, 9999px, 5px, 0); }
        20% { clip: rect(67px, 9999px, 61px, 0); }
        25% { clip: rect(14px, 9999px, 79px, 0); }
        30% { clip: rect(1px, 9999px, 66px, 0); }
        35% { clip: rect(86px, 9999px, 30px, 0); }
        40% { clip: rect(23px, 9999px, 98px, 0); }
        45% { clip: rect(85px, 9999px, 72px, 0); }
        50% { clip: rect(71px, 9999px, 75px, 0); }
        55% { clip: rect(2px, 9999px, 48px, 0); }
        60% { clip: rect(30px, 9999px, 16px, 0); }
        65% { clip: rect(59px, 9999px, 50px, 0); }
        70% { clip: rect(41px, 9999px, 62px, 0); }
        75% { clip: rect(2px, 9999px, 82px, 0); }
        80% { clip: rect(47px, 9999px, 73px, 0); }
        85% { clip: rect(3px, 9999px, 27px, 0); }
        90% { clip: rect(26px, 9999px, 55px, 0); }
        95% { clip: rect(42px, 9999px, 97px, 0); }
        100% { clip: rect(38px, 9999px, 49px, 0); }
    }

    /* Reduce scan line animation */
    .scan-line::after {
        animation: scan-mobile 3s linear infinite;
    }

    @keyframes scan-mobile {
        0% { transform: translateY(-100%); }
        100% { transform: translateY(100%); }
    }

    /* Reduce glow pulse animation */
    @keyframes glow-pulse-mobile {
        0% {
            opacity: 0.6;
            transform: scale(1);
        }
        100% {
            opacity: 0.8;
            transform: scale(1.02);
        }
    }
}
