/* ===== VARIABLES ===== */
:root {
    --primary-color: #2273ff;
    --secondary-color: #6cb8ff;
    --accent-color: #80ffdb;
    --dark-color: #10101a;
    --dark-light-color: #1a1a2e;
    --light-color: #ffffff;
    --gray-color: #f8f9fa;
    --text-color: #333333;
    --text-color-light: #999999;
    --border-color: #e0e0e0;
    --transition: all 0.3s ease;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.15);
    --container-width-lg: 80%;
    --container-width-md: 90%;
}

/* ===== DARK THEME ===== */
.dark-theme {
    --primary-color: #68b8ff;
    --secondary-color: #72b1ff;
    --accent-color: #80ffdb;
    --dark-color: #ffffff;
    --dark-light-color: #f5f5f5;
    --light-color: #10101a;
    --gray-color: #1a1a2e;
    --text-color: #f1f1f1;
    --text-color-light: #ccc;
    --border-color: #444444;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Form Error Styling */
.form-error {
    padding: 1rem;
    margin-top: 1rem;
    background: linear-gradient(90deg, rgba(255, 87, 87, 0.1), rgba(255, 59, 48, 0.1));
    border-left: 4px solid var(--primary-color);
    color: var(--text-color);
    border-radius: 5px;
}

.form-error p {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.form-error ul {
    margin: 0;
    padding-left: 1rem;
}

.form-error li {
    margin-bottom: 0.3rem;
    color: var(--text-color-light);
}

/* Lazy loading placeholder */
.lazy-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Ensure smooth transitions for lazy loaded images */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.lazy.loaded {
    opacity: 1;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
    transition: var(--transition);
}

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

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
}

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

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

img {
    display: block;
    width: 100%;
    object-fit: cover;
}

ul {
    list-style: none;
}

.container {
    width: var(--container-width-lg);
    margin: 0 auto;
    max-width: 1400px;
    padding: 0 1rem;
    box-sizing: border-box;
}

.highlight {
    color: var(--primary-color);
    font-weight: 700;
}

section {
    padding: 5rem 0;
    overflow: hidden;
    position: relative;
}

.section-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.underline {
    height: 3px;
    width: 80px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 0 auto;
    position: relative;
}

.underline::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-color);
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
    font-size: 1rem;
}

.primary-btn {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--light-color);
    box-shadow: var(--shadow);
}

.primary-btn:hover {
    background: linear-gradient(270deg, var(--primary-color), var(--secondary-color));
    color: var(--light-color);
    box-shadow: var(--shadow-dark);
    transform: translateY(-3px);
}

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

.secondary-btn:hover {
    background: var(--primary-color);
    color: var(--light-color);
    transform: translateY(-3px);
}

.small-btn {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-color);
    border-radius: 50%;
    transition: var(--transition);
    color: var(--text-color);
}

.social-icon:hover {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--light-color);
    transform: translateY(-5px);
}

.social-icons.large .social-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
}

/* ===== HEADER & NAVBAR ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 94, 255, 0);
}

header.scrolled {
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    padding: 0.5rem 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-dark);
}

.dark-theme header {
    background-color: rgba(16, 16, 26, 0);
    border-bottom: 1px solid rgba(94, 154, 206, 0);
}

.dark-theme header.scrolled {
    background-color: rgba(16, 16, 26, 0.95);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
}

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

.theme-switch {
    cursor: pointer;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    position: relative;
}

.theme-switch:hover {
    background-color: rgba(94, 96, 206, 0.1);
}

.theme-switch i {
    font-size: 1.2rem;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.theme-switch-rotating i {
    transform: rotate(180deg);
}

@keyframes themeRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dark-theme .theme-switch:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 5;
    width: 100%;
}

.tech-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(94, 96, 206, 0.1), rgba(105, 48, 195, 0.1));
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    border: 1px solid rgba(94, 96, 206, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.emoji {
    display: inline-block;
    animation: pulse 2s infinite;
}

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

.dynamic-text {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
    max-width: 450px;
    margin: 0 auto;
    width: 100%;
}

.hero-image img {
    position: relative;
    z-index: 5;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    box-shadow: var(--shadow-dark);
    animation: morph 8s ease-in-out infinite;
}

.blob-animation {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 110%;
    height: 110%;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 1;
    animation: morph 8s ease-in-out infinite 1s;
}

.tech-circles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.tech-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px dashed var(--accent-color);
    opacity: 0.5;
}

.tech-circle:nth-child(1) {
    width: 120%;
    height: 120%;
    top: -10%;
    left: -10%;
    animation: rotate 20s linear infinite;
}

.tech-circle:nth-child(2) {
    width: 140%;
    height: 140%;
    top: -20%;
    left: -20%;
    animation: rotate 25s linear infinite reverse;
}

.tech-circle:nth-child(3) {
    width: 160%;
    height: 160%;
    top: -30%;
    left: -30%;
    animation: rotate 30s linear infinite;
}

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

.hero-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    opacity: 0.1;
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    transform: rotate(45deg);
    animation: float 8s ease-in-out infinite;
}

.shape-2 {
    width: 150px;
    height: 150px;
    bottom: 15%;
    right: 10%;
    transform: rotate(20deg);
    animation: float 10s ease-in-out infinite 1s;
}

.shape-3 {
    width: 70px;
    height: 70px;
    bottom: 30%;
    left: 20%;
    transform: rotate(60deg);
    animation: float 7s ease-in-out infinite 0.5s;
}

@keyframes float {
    0% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(-20px) rotate(45deg); }
    100% { transform: translateY(0) rotate(45deg); }
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%;
    }
    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }
    75% {
        border-radius: 50% 50% 60% 40% / 40% 60% 40% 60%;
    }
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

/* ===== GLITCH ENTRANCE ANIMATIONS ===== */
.glitch-enter {
    animation: glitchEnter 0.8s forwards;
    opacity: 0;
}

.hero-content.glitch-enter .hero-text {
    opacity: 0;
    transform: translateY(20px);
    animation: textGlitchIn 1s forwards 0.5s;
}

.hero-content.glitch-enter .hero-image {
    opacity: 0;
    filter: brightness(0) invert(1);
    transform: scale(0.9);
    animation: imageGlitchIn 1.2s forwards 0.7s;
}

@keyframes glitchEnter {
    0% {
        opacity: 0;
        clip-path: inset(100% 0 0 0);
    }
    20% {
        clip-path: inset(33% 0 66% 0);
        opacity: 0.5;
    }
    40% {
        clip-path: inset(66% 0 33% 0);
        opacity: 0.7;
    }
    60% {
        clip-path: inset(33% 0 66% 0);
        opacity: 0.8;
    }
    80% {
        clip-path: inset(10% 0 90% 0);
        opacity: 0.9;
    }
    100% {
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
}

@keyframes textGlitchIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(10px);
    }
    10% {
        opacity: 0.3;
        transform: translateY(15px);
        filter: blur(5px);
    }
    30% {
        opacity: 0.5;
        transform: translateY(10px);
        filter: blur(0px);
    }
    50% {
        opacity: 0.7;
        transform: translateY(5px);
        filter: blur(3px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes imageGlitchIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
        filter: brightness(0) invert(1) blur(10px);
    }
    20% {
        opacity: 0.3;
        transform: scale(0.92);
        filter: brightness(0.2) invert(0.8) blur(5px);
    }
    40% {
        opacity: 0.5;
        transform: scale(0.95);
        filter: brightness(0.5) invert(0.5) blur(2px);
    }
    60% {
        opacity: 0.7;
        transform: scale(0.97);
        filter: brightness(0.7) invert(0.3) blur(1px);
    }
    80% {
        opacity: 0.9;
        transform: scale(0.99);
        filter: brightness(0.9) invert(0.1) blur(0.5px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(1) invert(0) blur(0);
    }
}

/* ===== ABOUT SECTION ===== */
.about {
    position: relative;
    overflow: hidden;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.about-image {
    position: relative;
    overflow: hidden;
}

.about-image img {
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    filter: brightness(0.9);
}

.about-image:hover img {
    box-shadow: var(--shadow-dark);
    transform: scale(1.02);
    filter: brightness(1);
}

.code-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 26, 0.85);
    padding: 1.5rem;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #f8f8f8;
}

.about-image:hover .code-overlay {
    transform: translateY(0);
}

.code-line {
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

.about-image:hover .code-line {
    opacity: 1;
    transform: translateX(0);
}

.about-image:hover .code-line:nth-child(1) { transition-delay: 0.1s; }
.about-image:hover .code-line:nth-child(2) { transition-delay: 0.2s; }
.about-image:hover .code-line:nth-child(3) { transition-delay: 0.3s; }
.about-image:hover .code-line:nth-child(4) { transition-delay: 0.4s; }
.about-image:hover .code-line:nth-child(5) { transition-delay: 0.5s; }
.about-image:hover .code-line:nth-child(6) { transition-delay: 0.6s; }

.code-line:nth-child(1), .code-line:nth-child(6) { color: #f8f8f8; }
.code-line:nth-child(2), .code-line:nth-child(3), .code-line:nth-child(4), .code-line:nth-child(5) { color: var(--accent-color); padding-left: 1rem; }

.about-text p {
    margin-bottom: 1.5rem;
}

.about-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
    background: linear-gradient(135deg, rgba(94, 96, 206, 0.05), rgba(105, 48, 195, 0.05));
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(94, 96, 206, 0.1);
}

.info-item span {
    font-weight: 600;
    color: var(--primary-color);
}

.info-item p {
    margin-bottom: 0;
}

.tech-dots {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-color);
    opacity: 0.3;
}

.dot1 {
    top: 20%;
    left: 10%;
    animation: pulse 3s infinite;
}

.dot2 {
    top: 70%;
    left: 20%;
    width: 15px;
    height: 15px;
    animation: pulse 4s infinite 0.5s;
}

.dot3 {
    top: 30%;
    right: 10%;
    width: 8px;
    height: 8px;
    animation: pulse 3.5s infinite 1s;
}

.dot4 {
    bottom: 20%;
    right: 15%;
    width: 12px;
    height: 12px;
    animation: pulse 4.5s infinite 0.7s;
}

.dot5 {
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    animation: pulse 3s infinite 1.5s;
}

/* ===== SKILLS SECTION ===== */
.skills {
    position: relative;
    border-radius: 25px;
    background: linear-gradient(135deg, rgba(94, 96, 206, 0.05), rgba(105, 48, 195, 0.05));
    border-top: 1px solid rgba(94, 96, 206, 0.1);
    border-bottom: 1px solid rgba(94, 96, 206, 0.1);
}

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

.skills-category h3 {
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.skills-category h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background-color: var(--light-color);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(94, 96, 206, 0.1);
    height: 100%;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(94, 96, 206, 0.03), transparent);
    transform: rotate(45deg);
    transition: all 0.8s ease;
}

.skill-card:hover::before {
    animation: shine 1.5s;
}

@keyframes shine {
    0% {
        left: -50%;
    }
    100% {
        left: 150%;
    }
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-dark);
    border-color: rgba(94, 96, 206, 0.3);
}

.skill-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skill-card h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: var(--gray-color);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    position: relative;
    transition: width 1.5s ease;
}

.progress::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
}

/* ===== PROJECTS SECTION ===== */
.projects {
    position: relative;
    overflow: hidden;
}

.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: var(--light-color);
    border: 1px solid rgba(94, 96, 206, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: all 0.5s ease;
    z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
    width: 100%;
}

.filter-btn.active, .filter-btn:hover {
    color: var(--light-color);
    border-color: transparent;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.project-card {
    background-color: var(--light-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(94, 96, 206, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Enhanced project card styles */
.project-card.featured-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 3;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.dark-theme .project-card.featured-card {
    background: rgba(16, 16, 26, 0.7);
    border: 1px solid rgba(94, 96, 206, 0.2);
}

.project-card.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    background-size: 200% 200%;
    z-index: 1;
    animation: shimmerEffect 3s infinite linear;
    pointer-events: none;
}

.dark-theme .project-card.featured-card::before {
    background: linear-gradient(45deg, transparent, rgba(94, 96, 206, 0.1), transparent);
}

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

.project-card.featured-card:hover {
    transform: translateY(-15px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.project-card.featured-card .project-img {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.project-card.featured-card .project-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.5));
    z-index: 1;
}

.project-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 5;
}

.project-badge span {
    padding: 0.3rem 0.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.project-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    color: var(--light-color);
    font-size: 1.2rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.project-card:hover .project-icon {
    transform: rotate(360deg);
}

.project-glass-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    pointer-events: none;
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}

.dark-theme .project-glass-effect {
    background: linear-gradient(135deg, rgba(94, 96, 206, 0.1), rgba(94, 96, 206, 0.05));
}

.project-card:hover .project-glass-effect {
    opacity: 1;
}

/* Particle effects for featured cards */
.project-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.project-particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background-color: var(--accent-color);
    border-radius: 50%;
    opacity: 0;
    animation: floatParticle 3s infinite ease-in-out;
}

.project-card.featured-card:hover .project-particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0.2s;
    opacity: 0.7;
}

.project-card.featured-card:hover .project-particle:nth-child(2) {
    top: 40%;
    left: 20%;
    animation-delay: 0.5s;
    opacity: 0.5;
}

.project-card.featured-card:hover .project-particle:nth-child(3) {
    top: 60%;
    left: 15%;
    animation-delay: 0.8s;
    opacity: 0.6;
}

.project-card.featured-card:hover .project-particle:nth-child(4) {
    top: 30%;
    left: 80%;
    animation-delay: 0.3s;
    opacity: 0.7;
}

.project-card.featured-card:hover .project-particle:nth-child(5) {
    top: 70%;
    left: 75%;
    animation-delay: 0.6s;
    opacity: 0.5;
}

@keyframes floatParticle {
    0% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.5);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-dark);
    border-color: rgba(94, 96, 206, 0.3);
}

.project-img {
    overflow: hidden;
    height: 200px;
    position: relative;
}

.project-img img {
    transition: var(--transition);
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.project-card:hover .project-img img {
    transform: scale(1.05);
    filter: brightness(0.7);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(16, 16, 26, 0.9), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.project-card:hover .tech-stack {
    transform: translateY(0);
}

.tech-stack span {
    padding: 0.3rem 0.8rem;
    background-color: rgba(128, 255, 219, 0.2);
    border: 1px solid rgba(128, 255, 219, 0.4);
    color: var(--accent-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.project-content p {
    margin-bottom: 1.5rem;
    color: var(--text-color-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.tech-circuit {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.05;
    pointer-events: none;
}

.tech-circuit svg {
    width: 100%;
    height: 100%;
    color: var(--primary-color);
}

.circuit-path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: dash 10s linear infinite;
}

.circuit-node {
    animation: pulse 3s infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: 0;
    }
}

/* ===== CONTACT SECTION ===== */
.contact {
    position: relative;
    overflow: hidden;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    position: relative;
    z-index: 2;
}

.contact-info {
    background: linear-gradient(135deg, rgba(94, 96, 206, 0.05), rgba(105, 48, 195, 0.05));
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(94, 96, 206, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 100%;
}

.contact-info h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.contact-info h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.contact-info p {
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.2rem;
    background-color: var(--light-color);
    border-radius: 10px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: rgba(94, 96, 206, 0.2);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-item h4 {
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.contact-form {
    background-color: var(--light-color);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(94, 96, 206, 0.1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    color: var(--light-color);
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

.contact-form h3 {
    margin-bottom: 0;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--light-color);
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(94, 96, 206, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.contact-form .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.contact-form .btn i {
    transition: transform 0.3s ease;
}

.contact-form .btn:hover i {
    transform: translateX(5px);
}

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

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--accent-color);
    opacity: 0.2;
}

.p1 {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 5%;
    animation: float 8s ease-in-out infinite;
}

.p2 {
    width: 60px;
    height: 60px;
    top: 70%;
    left: 10%;
    animation: float 10s ease-in-out infinite 1s;
}

.p3 {
    width: 40px;
    height: 40px;
    top: 40%;
    left: 30%;
    animation: float 7s ease-in-out infinite 0.5s;
}

.p4 {
    width: 100px;
    height: 100px;
    top: 20%;
    right: 10%;
    animation: float 9s ease-in-out infinite 1.5s;
}

.p5 {
    width: 50px;
    height: 50px;
    bottom: 20%;
    right: 20%;
    animation: float 6s ease-in-out infinite 0.2s;
}

.p6 {
    width: 30px;
    height: 30px;
    bottom: 40%;
    right: 40%;
    animation: float 8s ease-in-out infinite 2s;
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(135deg, rgba(94, 96, 206, 0.05), rgba(105, 48, 195, 0.05));
    padding: 3rem 0 2rem;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(94, 96, 206, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 2rem;
    align-items: flex-start;
    position: relative;
    z-index: 5;
}

.footer-logo h2 {
    font-size: 1.8rem;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.footer-logo p {
    color: var(--text-color-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-logo .quote {
    margin-top: 0.5rem;
    font-style: italic;
    position: relative;
    padding-left: 1rem;
    border-left: 2px solid var(--primary-color);
}

.footer-links h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    position: relative;
    padding-left: 1rem;
    transition: var(--transition);
    display: inline-block;
}

.back-to-top {
    position: relative;
}

.back-to-top a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    color: var(--light-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.back-to-top a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}

.back-to-top a:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-dark);
}

.back-to-top a:hover::before {
    opacity: 1;
}

.footer-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    color: var(--primary-color);
    line-height: 0;
}

.footer-circuit {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    color: var(--primary-color);
    opacity: 0.2;
}

.footer-circuit .circuit-path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: dash 10s linear infinite;
}

.footer-circuit .circuit-node {
    animation: pulse 3s infinite;
}

/* ===== RESPONSIVE DESIGN ===== */
@media screen and (max-width: 1200px) {
    .container {
        width: var(--container-width-md);
        padding: 0 2rem;
    }
    
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .skills-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .project-card {
        height: 100%;
    }
    
    .about-content {
        gap: 3rem;
    }
}

/* New intermediate breakpoint for better transition */
@media screen and (max-width: 1100px) {
    .hero-content {
        gap: 2rem;
    }
    
    .hero-image {
        max-width: 400px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .contact-content {
        gap: 2rem;
    }
}

@media screen and (max-width: 992px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .hero-content, 
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-image {
        order: -1;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .hero-text {
        text-align: center;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .hero-buttons, .social-icons {
        justify-content: center;
    }
    
    .about-image {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .about-text {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .skills-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 2rem;
    }
    
    .project-card.featured-card:hover {
        transform: translateY(-10px);
    }
    
    .project-header {
        flex-direction: column-reverse;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .project-icon {
        margin-bottom: 0.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-links ul {
        justify-content: center;
    }

    .back-to-top {
        bottom: 80px;
        right: 20px;
    }
}

@media screen and (max-width: 768px) {
    .container {
        width: 100%;
        padding: 0 1.5rem;
    }
    
    .hamburger {
        display: none;
    }
    
    .nav-links {
        display: none;
    }
    
    body {
        padding-bottom: 80px; /* Increased padding to account for taller mobile nav */
    }
    
    .mobile-nav {
        display: flex; /* Show only on mobile screens */
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 15px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 450px;
        background-color: rgba(255, 255, 255, 0.8);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        padding: 12px 10px;
        z-index: 999;
        border-radius: 20px;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.5);
        overflow: hidden;
    }
    
    /* Animated background for mobile nav */
    .mobile-nav::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: 
            radial-gradient(circle at top left, rgba(34, 115, 255, 0.03), transparent 50%),
            radial-gradient(circle at bottom right, rgba(128, 255, 219, 0.03), transparent 50%);
        z-index: -2;
        animation: rotateBg 20s linear infinite;
        opacity: 0.7;
    }
    
    /* Tech grid lines for mobile nav */
    .mobile-nav::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: 
            linear-gradient(90deg, transparent 98%, rgba(34, 115, 255, 0.1) 98%),
            linear-gradient(0deg, transparent 98%, rgba(34, 115, 255, 0.1) 98%);
        background-size: 20px 20px;
        opacity: 0.3;
        z-index: -1;
    }
    
    /* Glowing accent line on top of mobile nav */
    .mobile-nav .nav-accent {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 50px;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
        border-radius: 50%;
        opacity: 0.7;
        z-index: 0;
    }
    
    @keyframes rotateBg {
        0% {
            transform: rotate(0deg);
        }
        100% {
            transform: rotate(360deg);
        }
    }
    
    .dark-theme .mobile-nav {
        background-color: rgba(16, 16, 26, 0.8);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(94, 96, 206, 0.2);
    }
    
    .dark-theme .mobile-nav::before {
        background: 
            radial-gradient(circle at top left, rgba(34, 115, 255, 0.05), transparent 50%),
            radial-gradient(circle at bottom right, rgba(128, 255, 219, 0.05), transparent 50%);
    }
    
    .dark-theme .mobile-nav::after {
        background-image: 
            linear-gradient(90deg, transparent 98%, rgba(34, 115, 255, 0.15) 98%),
            linear-gradient(0deg, transparent 98%, rgba(34, 115, 255, 0.15) 98%);
    }
    
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 0.5rem;
        border-radius: 12px;
        transition: all 0.3s ease;
        width: 60px;
    }
    
    .mobile-nav-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(34, 115, 255, 0.05);
        border-radius: 12px;
        transform: scale(0.8);
        opacity: 0;
        transition: all 0.3s ease;
        z-index: -1;
    }
    
    .mobile-nav-item:hover::before,
    .mobile-nav-item.active::before {
        transform: scale(1);
        opacity: 1;
    }
    
    .mobile-nav-item i {
        font-size: 1.2rem;
        margin-bottom: 0.2rem;
        color: var(--text-color);
        transition: all 0.3s ease;
    }
    
    .mobile-nav-item span {
        font-size: 0.7rem;
        transition: all 0.3s ease;
    }
    
    .mobile-nav-item.active::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 50%;
        transform: translateX(-50%);
        width: 20px;
        height: 3px;
        background: var(--primary-color);
        border-radius: 10px;
        animation: pulseNav 2s infinite;
    }
    
    @keyframes pulseNav {
        0% {
            opacity: 0.6;
            width: 20px;
        }
        50% {
            opacity: 1;
            width: 30px;
        }
        100% {
            opacity: 0.6;
            width: 20px;
        }
    }
    
    .mobile-nav-item.active i,
    .mobile-nav-item:hover i {
        color: var(--primary-color);
        transform: translateY(-2px);
    }
    
    .mobile-nav-item:hover span {
        color: var(--primary-color);
    }
    
    .mobile-nav-item.active,
    .mobile-nav-item:hover {
        transform: translateY(-3px);
    }
    
    .mobile-nav-item.active span {
        color: var(--primary-color);
    }
    
    .back-to-top {
        bottom: 90px; /* Adjust back-to-top button to be above mobile nav */
    }
    
    .audio-toggle {
        bottom: 90px !important; /* Adjust audio toggle button to be above mobile nav */
        right: 20px !important;
    }
    
    .hero-image {
        max-width: 280px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .project-filters {
        flex-wrap: wrap;
    }
    
    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .section-heading {
        margin-bottom: 2.5rem;
    }
    
    .about-info {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .hero-text h1 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .dynamic-text {
        font-size: 1.3rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .hero-image {
        max-width: 220px;
    }
    
    .hero-image img {
        border-radius: 25% 65% 65% 25% / 25% 25% 65% 65%;
    }
    
    .blob-animation {
        top: -15px;
        right: -15px;
        width: 105%;
        height: 105%;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .skill-card {
        padding: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-card.featured-card .project-img {
        height: 180px;
    }
    
    .project-badge {
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .project-badge span {
        padding: 0.2rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .tech-stack span {
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
        margin-right: 0.3rem;
        margin-bottom: 0.3rem;
    }

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

    .footer-links ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .back-to-top {
        bottom: 80px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .social-icons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .social-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .about-text h3 {
        font-size: 1.3rem;
    }
    
    .about-text p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .contact-item {
        padding: 1rem;
    }
    
    .mobile-nav {
        width: 95%;
        padding: 10px 5px;
    }
    
    .mobile-nav-item {
        width: 50px;
    }
    
    .mobile-nav-item i {
        font-size: 1.1rem;
    }
    
    .mobile-nav-item span {
        font-size: 0.65rem;
    }
}

/* Extra small devices */
@media screen and (max-width: 375px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .dynamic-text {
        font-size: 1.1rem;
    }
    
    .hero-image {
        max-width: 180px;
    }
    
    .section-heading h2 {
        font-size: 1.5rem;
    }
    
    .project-content h3 {
        font-size: 1.2rem;
    }
    
    .project-content p {
        font-size: 0.9rem;
    }
    
    .mobile-nav {
        padding: 8px 5px;
    }
    
    .mobile-nav-item {
        width: 45px;
    }
    
    .mobile-nav-item i {
        font-size: 1rem;
    }
    
    .mobile-nav-item span {
        font-size: 0.6rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
}

/* ===== PRELOADER ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.7, 0, 0.3, 1);
}

.preloader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(0, 30, 60, 0.3) 1px, transparent 1px) 0 0 / 20px 20px,
        linear-gradient(0deg, rgba(0, 30, 60, 0.3) 1px, transparent 1px) 0 0 / 20px 20px;
    z-index: 1;
    animation: gridPulse 4s infinite alternate;
}

@keyframes gridPulse {
    0% {
        opacity: 0.2;
        background-size: 20px 20px;
    }
    50% {
        opacity: 0.3;
        background-size: 22px 22px;
    }
    100% {
        opacity: 0.2;
        background-size: 20px 20px;
    }
}

.preloader.hide {
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    animation: glitchExit 1s cubic-bezier(0.7, 0, 0.3, 1) forwards;
}

/* Glitch container and effects */
.glitch-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.glitch-noise {
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0,0,0, 0.15),
        rgba(0,0,0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    animation: noise 0.5s infinite;
    opacity: 0.15;
}

.glitch-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        rgba(0, 30, 60, 0.05) 1px,
        rgba(0, 30, 60, 0.05) 2px,
        transparent 3px
    );
    animation: scanlines 1s linear infinite;
    opacity: 0.3;
}

@keyframes noise {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(20px); }
}

@keyframes glitchExit {
    0% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        opacity: 1;
        transform: translateY(0);
    }
    10% {
        clip-path: polygon(0 15%, 100% 0, 100% 85%, 0 100%);
        opacity: 1;
        transform: translateY(0);
    }
    25% {
        clip-path: polygon(0 40%, 100% 30%, 100% 60%, 0 70%);
        opacity: 0.8;
    }
    50% {
        clip-path: polygon(0 45%, 100% 40%, 100% 55%, 0 65%);
        opacity: 0.6;
    }
    75% {
        clip-path: polygon(0 50%, 100% 48%, 100% 52%, 0 50%);
        opacity: 0.4;
    }
    100% {
        clip-path: polygon(0 50%, 100% 49%, 100% 51%, 0 50%);
        opacity: 0;
        transform: translateY(-100%);
    }
}

.loader {
    position: relative;
    width: 280px;
    height: 280px;
    z-index: 2;
}

/* Matrix rain effect */
.matrix-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.2;
}

.matrix-rain:before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: calc(100% + 20px);
    background-image: linear-gradient(0deg, transparent 0%, rgba(32, 194, 14, 0.2) 50%, transparent 100%);
    background-size: 100% 20px;
    animation: matrixRain 1s linear infinite;
}

@keyframes matrixRain {
    0% { transform: translateY(0); }
    100% { transform: translateY(20px); }
}

.tech-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(34, 115, 255, 0.2);
    animation: rotateGrid 25s linear infinite;
}

.tech-grid:before, .tech-grid:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    border: 1px dashed rgba(34, 115, 255, 0.3);
    border-radius: 50%;
}

.tech-grid:after {
    width: 70%;
    height: 70%;
    border: 1px solid rgba(34, 115, 255, 0.4);
}

@keyframes rotateGrid {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-circuit {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(34, 115, 255, 0.2);
    border-radius: 50%;
    animation: glitchCircuit 3s linear infinite;
}

.loader-circuit:nth-child(1) {
    border-top: 2px solid var(--primary-color);
    animation: rotate 2s linear infinite, glitchPulse 4s ease infinite;
}

.loader-circuit:nth-child(2) {
    width: 85%;
    height: 85%;
    top: 7.5%;
    left: 7.5%;
    border-right: 2px solid var(--secondary-color);
    animation: rotateReverse 1.5s linear infinite, glitchPulse 3s ease infinite 0.5s;
}

.loader-circuit:nth-child(3) {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-bottom: 2px solid var(--accent-color);
    animation: rotate 3s linear infinite, glitchPulse 5s ease infinite 1s;
}

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

@keyframes rotateReverse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

@keyframes glitchPulse {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(34, 115, 255, 0.1);
        border-width: 2px;
    }
    50% { 
        box-shadow: 0 0 30px rgba(34, 115, 255, 0.3);
        border-width: 3px;
    }
}

@keyframes glitchCircuit {
    0%, 100% { 
        border-radius: 50%; 
        transform: scale(1);
    }
    33% { 
        border-radius: 45% 55% 55% 45% / 46% 40% 60% 54%;
        transform: scale(1.02);
    }
    66% { 
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: scale(0.98);
    }
}

.glitch-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    white-space: nowrap;
}

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

.glitch-text:before {
    left: 2px;
    text-shadow: -1px 0 red;
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch-text:after {
    left: -2px;
    text-shadow: 2px 0 blue;
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(30% 0 68% 0);
    }
    20% {
        clip-path: inset(63% 0 1% 0);
    }
    40% {
        clip-path: inset(43% 0 1% 0);
    }
    60% {
        clip-path: inset(25% 0 58% 0);
    }
    80% {
        clip-path: inset(13% 0 75% 0);
    }
    100% {
        clip-path: inset(86% 0 5% 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(59% 0 43% 0);
    }
    20% {
        clip-path: inset(22% 0 73% 0);
    }
    40% {
        clip-path: inset(25% 0 18% 0);
    }
    60% {
        clip-path: inset(74% 0 26% 0);
    }
    80% {
        clip-path: inset(93% 0 3% 0);
    }
    100% {
        clip-path: inset(45% 0 46% 0);
    }
}

.blinker {
    animation: blink 1s infinite step-end;
}

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

/* Tech hexagons */
.tech-hexagons {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.hexagon {
    position: absolute;
    width: 40px;
    height: 23px;
    background-color: rgba(34, 115, 255, 0.1);
    border: 1px solid rgba(34, 115, 255, 0.3);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.hexagon:before,
.hexagon:after {
    content: "";
    position: absolute;
    width: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
}

.hexagon:before {
    bottom: 100%;
    border-bottom: 11.5px solid rgba(34, 115, 255, 0.1);
}

.hexagon:after {
    top: 100%;
    border-top: 11.5px solid rgba(34, 115, 255, 0.1);
}

.hexagon:nth-child(1) {
    top: 20%;
    left: 10%;
    transform: scale(0.7);
    animation: hexPulse 3s infinite alternate, hexFloat 15s infinite linear;
}

.hexagon:nth-child(2) {
    top: 70%;
    left: 80%;
    transform: scale(1.2);
    animation: hexPulse 4s infinite alternate-reverse, hexFloat 20s infinite linear reverse;
}

.hexagon:nth-child(3) {
    top: 40%;
    left: 85%;
    transform: scale(0.9);
    animation: hexPulse 5s infinite alternate, hexFloat 18s infinite linear;
}

@keyframes hexPulse {
    0% {
        opacity: 0.3;
        border-color: rgba(34, 115, 255, 0.2);
    }
    100% {
        opacity: 0.8;
        border-color: rgba(34, 115, 255, 0.5);
    }
}

@keyframes hexFloat {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(10px, -15px) rotate(90deg);
    }
    50% {
        transform: translate(15px, 10px) rotate(180deg);
    }
    75% {
        transform: translate(-10px, 15px) rotate(270deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

.blink-text {
    animation: blinkText 1.5s infinite;
}

@keyframes blinkText {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.3; }
}

.loader-progress {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(34, 115, 255, 0.1);
    overflow: hidden;
    border-radius: 4px;
}

.loader-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    animation: progress 2.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    position: relative;
}

.loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: shimmer 1.5s infinite;
}

.loader-percentage {
    position: absolute;
    bottom: -65px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Courier New', monospace;
    animation: percentagePulse 1s ease-in-out infinite alternate;
    text-shadow: 0 0 5px rgba(34, 115, 255, 0.5);
}

@keyframes percentagePulse {
    from { opacity: 0.7; }
    to { opacity: 1; transform: translateX(-50%) scale(1.05); }
}

.loader-stats {
    position: absolute;
    bottom: -130px;
    left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--text-color-light);
}

.stat {
    padding: 5px;
    border-left: 2px solid rgba(34, 115, 255, 0.3);
}

.stat .highlight {
    color: var(--accent-color);
    font-weight: bold;
    animation: statBlink 2s infinite alternate;
}

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

.loader-dots {
    position: absolute;
    width: 300%;
    height: 300%;
    top: -100%;
    left: -100%;
    pointer-events: none;
}

.loader-dot {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.3;
    animation: pulseOpacity 4s ease-in-out infinite, dotMove 15s linear infinite;
}

@keyframes pulseOpacity {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.5; }
}

@keyframes dotMove {
    0% { transform: translate(0, 0); }
    25% { transform: translate(20px, -15px); }
    50% { transform: translate(-10px, 25px); }
    75% { transform: translate(-15px, -20px); }
    100% { transform: translate(0, 0); }
}

@keyframes progress {
    0% { width: 0; }
    100% { width: 100%; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.skip-loader {
    position: absolute;
    bottom: -150px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 25px;
    border: 2px solid var(--primary-color);
    background: rgba(0, 0, 0, 0.2);
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 1;
    overflow: hidden;
    z-index: 10;
    box-shadow: 0 0 10px rgba(34, 115, 255, 0.3);
    animation: buttonPulse 2s infinite alternate;
    border-radius: 5px;
    clip-path: polygon(0 0, 100% 0, 95% 50%, 100% 100%, 0 100%, 5% 50%);
}

@keyframes buttonPulse {
    0% { box-shadow: 0 0 10px rgba(34, 115, 255, 0.3); transform: translateX(-50%) scale(1); }
    100% { box-shadow: 0 0 20px rgba(34, 115, 255, 0.6); transform: translateX(-50%) scale(1.05); }
}

.skip-loader:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.skip-loader:hover {
    color: var(--light-color);
    box-shadow: 0 0 15px rgba(34, 115, 255, 0.5);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.skip-loader:hover:before {
    transform: scaleX(1);
    transform-origin: left;
}

.skip-loader i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.skip-loader:hover i {
    transform: translateX(5px);
}

.instruction-text {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--text-color-light);
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    opacity: 0.7;
    animation: blinkOpacity 2s infinite;
}

@keyframes blinkOpacity {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.4; }
}

/* ===== PAGE TRANSITION ===== */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 25px;
    z-index: 9998;
    transform: translateY(100%);
    pointer-events: none;
}

.page-transition.active {
    animation: pageTransitionIn 0.5s ease forwards, pageTransitionOut 0.5s ease 0.5s forwards;
    pointer-events: all;
}

@keyframes pageTransitionIn {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes pageTransitionOut {
    from { transform: translateY(0); }
    to { transform: translateY(-100%); }
}

/* ===== RESPONSIVE DESIGN UPDATES ===== */
@media screen and (max-width: 768px) {
    .hamburger {
        display: none;
    }
    
    .nav-links {
        display: none;
    }
    
    body {
        padding-bottom: 80px; /* Increased padding to account for taller mobile nav */
    }
    
    .mobile-nav {
        display: flex; /* Show only on mobile screens */
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 15px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 450px;
        background-color: rgba(255, 255, 255, 0.8);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        padding: 12px 10px;
        z-index: 999;
        border-radius: 20px;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.5);
        overflow: hidden;
    }
    
    /* Animated background for mobile nav */
    .mobile-nav::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: 
            radial-gradient(circle at top left, rgba(34, 115, 255, 0.03), transparent 50%),
            radial-gradient(circle at bottom right, rgba(128, 255, 219, 0.03), transparent 50%);
        z-index: -2;
        animation: rotateBg 20s linear infinite;
        opacity: 0.7;
    }
    
    /* Tech grid lines for mobile nav */
    .mobile-nav::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: 
            linear-gradient(90deg, transparent 98%, rgba(34, 115, 255, 0.1) 98%),
            linear-gradient(0deg, transparent 98%, rgba(34, 115, 255, 0.1) 98%);
        background-size: 20px 20px;
        opacity: 0.3;
        z-index: -1;
    }
    
    /* Glowing accent line on top of mobile nav */
    .mobile-nav .nav-accent {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 50px;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
        border-radius: 50%;
        opacity: 0.7;
        z-index: 0;
    }
    
    @keyframes rotateBg {
        0% {
            transform: rotate(0deg);
        }
        100% {
            transform: rotate(360deg);
        }
    }
    
    .dark-theme .mobile-nav {
        background-color: rgba(16, 16, 26, 0.8);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(94, 96, 206, 0.2);
    }
    
    .dark-theme .mobile-nav::before {
        background: 
            radial-gradient(circle at top left, rgba(34, 115, 255, 0.05), transparent 50%),
            radial-gradient(circle at bottom right, rgba(128, 255, 219, 0.05), transparent 50%);
    }
    
    .dark-theme .mobile-nav::after {
        background-image: 
            linear-gradient(90deg, transparent 98%, rgba(34, 115, 255, 0.15) 98%),
            linear-gradient(0deg, transparent 98%, rgba(34, 115, 255, 0.15) 98%);
    }
    
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 0.5rem;
        border-radius: 12px;
        transition: all 0.3s ease;
        width: 60px;
    }
    
    .mobile-nav-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(34, 115, 255, 0.05);
        border-radius: 12px;
        transform: scale(0.8);
        opacity: 0;
        transition: all 0.3s ease;
        z-index: -1;
    }
    
    .mobile-nav-item:hover::before,
    .mobile-nav-item.active::before {
        transform: scale(1);
        opacity: 1;
    }
    
    .mobile-nav-item i {
        font-size: 1.2rem;
        margin-bottom: 0.2rem;
        color: var(--text-color);
        transition: all 0.3s ease;
    }
    
    .mobile-nav-item span {
        font-size: 0.7rem;
        transition: all 0.3s ease;
    }
    
    .mobile-nav-item.active::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 50%;
        transform: translateX(-50%);
        width: 20px;
        height: 3px;
        background: var(--primary-color);
        border-radius: 10px;
        animation: pulseNav 2s infinite;
    }
    
    @keyframes pulseNav {
        0% {
            opacity: 0.6;
            width: 20px;
        }
        50% {
            opacity: 1;
            width: 30px;
        }
        100% {
            opacity: 0.6;
            width: 20px;
        }
    }
    
    .mobile-nav-item.active i,
    .mobile-nav-item:hover i {
        color: var(--primary-color);
        transform: translateY(-2px);
    }
    
    .mobile-nav-item:hover span {
        color: var(--primary-color);
    }
    
    .mobile-nav-item.active,
    .mobile-nav-item:hover {
        transform: translateY(-3px);
    }
    
    .mobile-nav-item.active span {
        color: var(--primary-color);
    }
    
    .back-to-top {
        bottom: 90px; /* Adjust back-to-top button to be above mobile nav */
    }
    
    .audio-toggle {
        bottom: 90px !important; /* Adjust audio toggle button to be above mobile nav */
        right: 20px !important;
    }
    
    .hero-image {
        max-width: 300px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .project-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
}

.theme-switch::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-color);
    opacity: 0;
    transform: scale(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.theme-switch.system-theme::after {
    opacity: 1;
    transform: scale(1);
}

/* Add tooltip styles */
.theme-tooltip {
    position: fixed;
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    z-index: 9999;
    box-shadow: var(--shadow);
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-align: center;
    min-width: 120px;
    animation: tooltipPulse 2s infinite;
}

.theme-tooltip::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
}

.theme-tooltip.fade-out {
    opacity: 0;
}

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

.instruction-text {
    position: absolute;
    top: 58%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-color);
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    opacity: 0.8;
    animation: blinkOpacity 1.5s infinite alternate;
}

@keyframes blinkOpacity {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
} 

/* ===== ADDITIONAL RESPONSIVE FIXES ===== */
@media (hover: none) {
    .skill-card:hover,
    .project-card:hover,
    .contact-item:hover,
    .back-to-top a:hover {
        transform: none;
    }
    
    .mobile-nav-item:hover {
        transform: none;
    }
    
    .mobile-nav-item:hover i {
        transform: none;
    }
}

@media screen and (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.7rem;
    }
    
    .dynamic-text {
        font-size: 1.1rem;
    }
    
    .tech-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .contact-item {
        padding: 1rem;
    }
    
    .contact-item i {
        font-size: 1.3rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .section-heading h2 {
        font-size: 1.7rem;
    }
    
    .footer-logo h2 {
        font-size: 1.5rem;
    }
    
    .footer-links h3 {
        font-size: 1.2rem;
    }
    
    .skill-card {
        padding: 1.2rem;
    }
    
    .skill-icon {
        font-size: 1.8rem;
    }
    
    .project-content h3 {
        font-size: 1.1rem;
    }
    
    .project-content p {
        font-size: 0.9rem;
    }
}

/* Fix for Safari and iOS devices */
@supports (-webkit-touch-callout: none) {
    .hero, section {
        background-attachment: scroll;
    }
}

.mobile-nav {
    display: none; /* Hide by default on all screen sizes */
}

@media screen and (max-width: 768px) {
    .container {
        width: 100%;
        padding: 0 1.5rem;
    }
    
    .hamburger {
        display: none;
    }
    
    .nav-links {
        display: none;
    }
    
    body {
        padding-bottom: 80px; /* Increased padding to account for taller mobile nav */
    }
    
    .mobile-nav {
        display: flex; /* Show only on mobile screens */
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 15px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 450px;
        background-color: rgba(255, 255, 255, 0.8);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        padding: 12px 10px;
        z-index: 999;
        border-radius: 20px;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.5);
        overflow: hidden;
    }
}
