/* 
   Enhanced Main Stylesheet for Justin Skowyra Portfolio
   Combining the best of both designs with added animations
   Version: 3.0
*/

/* ===== TABLE OF CONTENTS =====
   1. CSS Variables & Root
   2. Base & Reset Styles
   3. Layout & Global Components
   4. Header & Navigation
   5. Hero Section & Name Animation
   6. Particle Effects
   7. About Section
   8. Skills Section
   9. Work Section
   10. Contact Section
   11. Footer
   12. Animations
   13. Theme Styles
   14. Media Queries
   ============================= */

/* ===== 1. CSS Variables & Root ===== */
:root {
    /* Color Palette */
    --primary-red: #FF5252;
    --primary-red-hover: #FF7676;
    --primary-gradient: linear-gradient(135deg, #D12C2C, #FF6B6B);
    --secondary-gradient: linear-gradient(135deg, #4B5EAA, #C84B9E);
    --epic-gradient: linear-gradient(135deg, #8045DD, #A76FFF);
    --legendary-gradient: linear-gradient(135deg, #D12C2C, #FF3838);
    
    /* RGB version for rgba usage */
    --primary-red-rgb: 209, 44, 44;
    
    /* Dark Theme Colors (Default) */
    --black: #0A0A0A;
    --dark-gray: #1A1A1A;
    --mid-gray: #2A2A2A;
    --gray: #9E9E9E;
    --light-gray: #E0E0E0;
    --text-color: #FFFFFF;
    
    /* UI Elements */
    --background-grid: rgba(255, 255, 255, 0.08);
    --accent-glow-1: rgba(209, 44, 44, 0.1);
    --accent-glow-2: rgba(75, 94, 170, 0.1);
    --card-shadow: rgba(0, 0, 0, 0.4);
    --card-background: #2A2A2A;
    --header-bg: rgba(10, 10, 10, 0.95);
    --scrolled-header-bg: rgba(10, 10, 10, 0.98);
    --work-item-bg: #0A0A0A;
    --form-bg: #1A1A1A;
    --input-border: #4B5563;
    --footer-bg: #1A1A1A;
    --footer-text: #4B5563;
    --social-bg: #1A1A1A;
    --chevron-color: #D12C2C;
    --availability-bg: rgba(76, 175, 80, 0.1);
    --grid-opacity: 0.08;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    
    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-headings: 'Montserrat', sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-md: 16px;
    --font-size-lg: 20px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;
    --font-size-3xl: 42px;
    --font-size-4xl: 60px;
    
    /* Borders & Shadows */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-full: 50%;
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.3);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.6s ease;
    --easing-bounce: cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* Light Theme Variable Overrides */
:root[data-theme="light"] {
    --primary-red: #D12C2C;
    --primary-red-hover: #E53935;
    
    /* Light Theme Colors */
    --black: #FFFFFF;
    --dark-gray: #F5F5F5;
    --mid-gray: #EEEEEE;
    --gray: #757575;
    --light-gray: #212121;
    --text-color: #212121;
    
    /* UI Elements */
    --background-grid: rgba(0, 0, 0, 0.05);
    --accent-glow-1: rgba(209, 44, 44, 0.08);
    --accent-glow-2: rgba(75, 94, 170, 0.08);
    --card-shadow: rgba(0, 0, 0, 0.1);
    --card-background: #F5F5F5;
    --header-bg: rgba(255, 255, 255, 0.95);
    --scrolled-header-bg: rgba(255, 255, 255, 0.98);
    --work-item-bg: #FFFFFF;
    --form-bg: #F5F5F5;
    --input-border: #757575;
    --footer-bg: #F5F5F5;
    --footer-text: #424242; /* Improved contrast from original */
    --social-bg: #EEEEEE;
    --grid-opacity: 0.05;
}

/* ===== 2. Base & Reset Styles ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--black);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.fonts-loaded {
    font-family: var(--font-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul, ol {
    list-style: none;
}

button {
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    cursor: pointer;
}

input, textarea {
    font-family: inherit;
}

/* Improved focus styles for accessibility */
a:focus, button:focus, input:focus, textarea:focus, [tabindex]:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* Skip to content link for accessibility */
.skip-to-content {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-to-content:focus {
    left: 0;
    top: 0;
    width: auto;
    height: auto;
    z-index: 9999;
    padding: 1em;
    background: var(--black);
    outline: 3px solid var(--primary-red);
    text-align: center;
}

/* ===== 3. Layout & Global Components ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    padding: 0 var(--spacing-lg);
}

section {
    padding: var(--spacing-3xl) 0;
    position: relative;
    overflow: hidden;
}

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

.bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(10, 10, 10, 0.97) 0%, 
        rgba(20, 20, 20, 0.95) 50%, 
        rgba(10, 10, 10, 0.97) 100%);
    opacity: var(--gradient-opacity, 1);
}

:root[data-theme="light"] .bg-gradient {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.97) 0%, 
        rgba(245, 245, 245, 0.95) 50%, 
        rgba(255, 255, 255, 0.97) 100%);
}

.bg-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, var(--accent-glow-1) 0%, transparent 70%),
        radial-gradient(circle at 80% 70%, var(--accent-glow-2) 0%, transparent 70%);
}

.webgl-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
}

/* ===== 4. Header & Navigation ===== */
header {
    background-color: var(--header-bg);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: padding 0.3s ease, background-color 0.3s ease;
}

header.scrolled {
    padding: 12px 20px;
    background-color: var(--scrolled-header-bg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.logo {
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: var(--font-size-xl);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    transition: transform var(--transition-medium);
}

.logo:hover {
    transform: scale(1.1);
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 8px 0;
    transition: color var(--transition-medium);
}

nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

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

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

/* Theme Toggle */
.theme-toggle {
    position: relative;
    z-index: 999;
    width: 60px;
    height: 30px;
    background: var(--mid-gray);
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    margin-left: 20px;
}

.toggle-track {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    box-sizing: border-box;
}

.toggle-sun, .toggle-moon {
    font-size: 14px;
    color: var(--gray);
    transition: color 0.3s ease;
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: var(--primary-red);
    border-radius: 50%;
    transition: transform 0.3s var(--easing-bounce);
}

.theme-toggle.active .toggle-thumb {
    transform: translateX(30px);
}

[data-theme="light"] .toggle-sun {
    color: #FF9800;
}

[data-theme="dark"] .toggle-moon {
    color: #FFEB3B;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 101;
    margin-left: 20px; /* Add spacing between toggle and menu button */
}

.menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* Menu toggle active state */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile navigation - redesigned for compact display */
@media (max-width: 768px) {
    header nav ul {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 70px; /* Position below header instead of full height */
        right: 20px; /* Offset from the right edge */
        width: auto; /* Auto width based on content */
        min-width: 180px; /* Minimum width */
        height: auto; /* Auto height based on content */
        background-color: var(--black);
        padding: 15px;
        border-radius: var(--border-radius-md);
        z-index: 100;
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s ease, opacity 0.3s ease;
        align-items: stretch;
        text-align: center;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    header nav ul.active {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }
    
    /* Replace full-screen overlay with just a blur effect behind the menu */
    body::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        z-index: 99;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        pointer-events: none;
    }
    
    body.menu-open::after {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    nav ul li {
        margin: 0;
        width: 100%;
    }
    
    nav ul li a {
        display: block;
        padding: 12px 15px;
        width: 100%;
        font-size: 16px;
        border-radius: var(--border-radius-sm);
        transition: background-color 0.2s ease, color 0.2s ease;
    }
    
    nav ul li a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    /* Active menu item styling */
    nav ul li a.active {
        background: var(--primary-gradient);
        color: white;
    }
    
    .menu-toggle {
        display: flex;
        position: relative;
        z-index: 102;
    }
    
    /* Adjust spacing in header for mobile */
    header {
        padding: 15px 20px;
    }
    
    /* Fix theme toggle and menu toggle positioning */
    header nav {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    /* Contact section - fixed alignment */
    .contact-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-bottom: 30px;
        max-width: 100%;
        width: 100%;
        padding: 0 20px;
    }
    
    .contact-text {
        text-align: center;
        max-width: 400px;
        width: 100%;
    }
    
    .social-links {
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
        width: 100%;
    }
    
    /* Fix specific alignment for social icons */
    .contact-info .social-links {
        display: flex;
        justify-content: center;
        width: 100%;
        gap: 20px;
        margin: 0 auto 20px;
    }
    
    .social-link {
        /* Ensure icons are evenly spaced */
        margin: 0 10px;
    }
    
    /* Ensure the availability indicator is centered */
    .availability {
        justify-content: center;
        margin: 0 auto;
    }
    
    /* Form container styling */
    .contact-form-container {
        width: 100%;
        max-width: 400px;
        padding: 0 20px;
    }
    
    .contact-form {
        width: 100%;
    }
    
    .contact-form .form-group {
        text-align: left; /* Keep form labels left-aligned */
        width: 100%;
    }
    
    /* Center the submit button */
    .submit-btn {
        margin: 15px auto 0;
        display: flex;
        justify-content: center;
    }
    
    /* Keep section heading left-aligned while content is centered */
    .contact .section-heading {
        width: 100%;
        align-items: flex-start;
        text-align: left;
        margin-left: 20px;
    }
    
    /* Apply consistent padding to all sections on mobile */
    section {
        padding: var(--spacing-2xl) var(--spacing-md);
    }
}

/* ===== 5. Hero Section & Name Animation ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    animation: riseUp 1.875s ease-out 5.7s forwards;
}

@keyframes riseUp {
    from { transform: translateY(0); }
    to { transform: translateY(-10vh); }
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding: 0 20px;
    animation: fadeIn 1s ease forwards;
}

/* Name container with animation */
.name-container {
    position: relative;
    margin-bottom: 20px;
    padding: 10px 0;
    display: inline-flex;
    opacity: 0;
    animation: fadeIn 1s ease-in forwards 0.3s, nameContainerPulse 3s ease-in-out infinite alternate 1.5s;
}

@keyframes nameContainerPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.03); }
}

.name-letter {
    font-family: var(--font-headings);
    font-size: var(--font-size-4xl);
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--light-gray);
    position: relative;
    text-shadow: 0 0 5px rgba(var(--primary-red-rgb), 0.2);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.drift-up .letter-0 { animation: driftUp0 7.5s ease-in-out infinite alternate; }
.drift-up .letter-1 { animation: driftUp1 7.5s ease-in-out infinite alternate; }
.drift-up .letter-2 { animation: driftUp2 7.5s ease-in-out infinite alternate; }
.drift-up .letter-3 { animation: driftUp3 7.5s ease-in-out infinite alternate; }
.drift-up .letter-4 { animation: driftUp4 7.5s ease-in-out infinite alternate; }
.drift-up .letter-5 { animation: driftUp5 7.5s ease-in-out infinite alternate; }
.drift-up .letter-6 { animation: driftUp6 7.5s ease-in-out infinite alternate; }
.drift-up .letter-7 { animation: driftUp7 7.5s ease-in-out infinite alternate; }
.drift-up .letter-8 { animation: driftUp8 7.5s ease-in-out infinite alternate; }
.drift-up .letter-9 { animation: driftUp9 7.5s ease-in-out infinite alternate; }
.drift-up .letter-10 { animation: driftUp10 7.5s ease-in-out infinite alternate; }
.drift-up .letter-11 { animation: driftUp11 7.5s ease-in-out infinite alternate; }
.drift-up .letter-12 { animation: driftUp12 7.5s ease-in-out infinite alternate; }
.drift-up .letter-13 { animation: driftUp13 7.5s ease-in-out infinite alternate; }

@keyframes driftUp0 { 0% { transform: translateY(0); } 100% { transform: translateY(-8px); } }
@keyframes driftUp1 { 0% { transform: translateY(0); } 100% { transform: translateY(-6px); } }
@keyframes driftUp2 { 0% { transform: translateY(0); } 100% { transform: translateY(-9px); } }
@keyframes driftUp3 { 0% { transform: translateY(0); } 100% { transform: translateY(-7px); } }
@keyframes driftUp4 { 0% { transform: translateY(0); } 100% { transform: translateY(-5px); } }
@keyframes driftUp5 { 0% { transform: translateY(0); } 100% { transform: translateY(-8px); } }
@keyframes driftUp6 { 0% { transform: translateY(0); } 100% { transform: translateY(-4px); } }
@keyframes driftUp7 { 0% { transform: translateY(0); } 100% { transform: translateY(-9px); } }
@keyframes driftUp8 { 0% { transform: translateY(0); } 100% { transform: translateY(-6px); } }
@keyframes driftUp9 { 0% { transform: translateY(0); } 100% { transform: translateY(-8px); } }
@keyframes driftUp10 { 0% { transform: translateY(0); } 100% { transform: translateY(-7px); } }
@keyframes driftUp11 { 0% { transform: translateY(0); } 100% { transform: translateY(-5px); } }
@keyframes driftUp12 { 0% { transform: translateY(0); } 100% { transform: translateY(-9px); } }
@keyframes driftUp13 { 0% { transform: translateY(0); } 100% { transform: translateY(-7px); } }

.drift-apart .letter-0 { animation: driftApart0 7.5s ease-in-out infinite alternate; }
.drift-apart .letter-1 { animation: driftApart1 7.5s ease-in-out infinite alternate; }
.drift-apart .letter-2 { animation: driftApart2 7.5s ease-in-out infinite alternate; }
.drift-apart .letter-3 { animation: driftApart3 7.5s ease-in-out infinite alternate; }
.drift-apart .letter-4 { animation: driftApart4 7.5s ease-in-out infinite alternate; }
.drift-apart .letter-5 { animation: driftApart5 7.5s ease-in-out infinite alternate; }
.drift-apart .letter-6 { animation: driftApart6 7.5s ease-in-out infinite alternate; }
.drift-apart .letter-7 { animation: driftApart7 7.5s ease-in-out infinite alternate; }
.drift-apart .letter-8 { animation: driftApart8 7.5s ease-in-out infinite alternate; }
.drift-apart .letter-9 { animation: driftApart9 7.5s ease-in-out infinite alternate; }
.drift-apart .letter-10 { animation: driftApart10 7.5s ease-in-out infinite alternate; }
.drift-apart .letter-11 { animation: driftApart11 7.5s ease-in-out infinite alternate; }
.drift-apart .letter-12 { animation: driftApart12 7.5s ease-in-out infinite alternate; }
.drift-apart .letter-13 { animation: driftApart13 7.5s ease-in-out infinite alternate; }

@keyframes driftApart0 { 0% { transform: translateX(0); } 100% { transform: translateX(-12px); } }
@keyframes driftApart1 { 0% { transform: translateX(0); } 100% { transform: translateX(-10px); } }
@keyframes driftApart2 { 0% { transform: translateX(0); } 100% { transform: translateX(-8px); } }
@keyframes driftApart3 { 0% { transform: translateX(0); } 100% { transform: translateX(-6px); } }
@keyframes driftApart4 { 0% { transform: translateX(0); } 100% { transform: translateX(-4px); } }
@keyframes driftApart5 { 0% { transform: translateX(0); } 100% { transform: translateX(-2px); } }
@keyframes driftApart6 { 0% { transform: translateX(0); } 100% { transform: translateX(0px); } }
@keyframes driftApart7 { 0% { transform: translateX(0); } 100% { transform: translateX(2px); } }
@keyframes driftApart8 { 0% { transform: translateX(0); } 100% { transform: translateX(4px); } }
@keyframes driftApart9 { 0% { transform: translateX(0); } 100% { transform: translateX(6px); } }
@keyframes driftApart10 { 0% { transform: translateX(0); } 100% { transform: translateX(8px); } }
@keyframes driftApart11 { 0% { transform: translateX(0); } 100% { transform: translateX(10px); } }
@keyframes driftApart12 { 0% { transform: translateX(0); } 100% { transform: translateX(12px); } }
@keyframes driftApart13 { 0% { transform: translateX(0); } 100% { transform: translateX(12px); } }

.glitch-letter.red-glitch {
    animation: extraGlitchRed 0.375s ease-in-out !important;
}

.glitch-letter.gradient-glitch {
    animation: extraGlitchGradient 0.375s ease-in-out !important;
}

@keyframes extraGlitchRed {
    0% { transform: translate(0) scale(1); opacity: 1; color: var(--light-gray); text-shadow: none; }
    20% { transform: translate(5px, -5px) scale(1.15); opacity: 0.7; color: var(--primary-red); text-shadow: 0 0 8px rgba(var(--primary-red-rgb), 0.6); }
    40% { transform: translate(-4px, 4px) scale(0.9); opacity: 0.9; color: var(--light-gray); text-shadow: none; }
    60% { transform: translate(4px, -4px) scale(1.2); opacity: 0.6; color: var(--primary-red); text-shadow: 0 0 12px rgba(var(--primary-red-rgb), 0.7); }
    80% { transform: translate(-3px, 3px) scale(0.95); opacity: 0.8; color: var(--light-gray); text-shadow: none; }
    100% { transform: translate(0) scale(1); opacity: 1; color: var(--light-gray); text-shadow: none; }
}

@keyframes extraGlitchGradient {
    0% { transform: translate(0) scale(1) rotate(0deg); opacity: 1; color: var(--light-gray); text-shadow: none; }
    20% { transform: translate(5px, -5px) scale(1.15) rotate(3deg); opacity: 0.7; color: transparent; text-shadow: 0 0 8px #4B5EAA, 3px 3px 8px #C84B9E; }
    40% { transform: translate(-4px, 4px) scale(0.9) rotate(-2deg); opacity: 0.9; color: var(--light-gray); text-shadow: none; }
    60% { transform: translate(4px, -4px) scale(1.2) rotate(4deg); opacity: 0.6; color: transparent; text-shadow: 0 0 10px #4B5EAA, 3px 3px 10px #C84B9E; }
    80% { transform: translate(-3px, 3px) scale(0.95) rotate(-3deg); opacity: 0.8; color: var(--light-gray); text-shadow: none; }
    100% { transform: translate(0) scale(1) rotate(0deg); opacity: 1; color: var(--light-gray); text-shadow: none; }
}

.skills {
    font-size: 16px;
    letter-spacing: 1px;
    margin-bottom: 5px;
    color: var(--light-gray);
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 1.3s, skillsGlow 3s ease-in-out infinite alternate 2.5s;
}

@keyframes skillsGlow {
    0% { 
        color: var(--light-gray);
        text-shadow: 0 0 0 transparent;
        transform: scale(1);
    }
    100% { 
        color: #FFFFFF;
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
        transform: scale(1.03);
    }
}

@media (max-width: 768px) {
    .skills {
        font-size: 14px;
        letter-spacing: 0.5px;
    }
    
    .skills > span:not(.skill-item-text) {
        margin: 0 2px;
    }
}

/* Individual skills items for staggered animation */
.skill-item-text {
    opacity: 0;
    display: inline-block;
    animation: skillItemReveal 0.5s ease-in-out forwards;
}

.skills .skill-item-text:nth-child(1) { animation-delay: 1.3s; }
.skills .skill-item-text:nth-child(3) { animation-delay: 1.5s; }
.skills .skill-item-text:nth-child(5) { animation-delay: 1.7s; }
.skills .skill-item-text:nth-child(7) { animation-delay: 1.9s; }
.skills .skill-item-text:nth-child(9) { animation-delay: 2.1s; }
.skills .skill-item-text:nth-child(11) { animation-delay: 2.3s; }

/* Bullet points fade in slightly after their preceding skill */
.skills > span:not(.skill-item-text) {
    opacity: 0;
    animation: fadeIn 0.4s ease-in-out forwards;
}

.skills > span:nth-child(2) { animation-delay: 1.4s; }
.skills > span:nth-child(4) { animation-delay: 1.6s; }
.skills > span:nth-child(6) { animation-delay: 1.8s; }
.skills > span:nth-child(8) { animation-delay: 2.0s; }
.skills > span:nth-child(10) { animation-delay: 2.2s; }

.skills-more {
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: var(--light-gray);
    opacity: 0;
    animation: moreReveal 2s ease-in-out forwards 2.5s;
}

@keyframes moreReveal {
    0% { 
        opacity: 0;
        color: var(--light-gray);
        text-shadow: 0 0 0 transparent;
    }
    30% { 
        opacity: 1;
        color: var(--primary-red);
        text-shadow: 0 0 10px rgba(var(--primary-red-rgb), 0.3);
    }
    100% { 
        opacity: 1;
        color: var(--light-gray);
        text-shadow: none;
    }
}

@keyframes skillItemReveal {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    60% {
        color: #FFFFFF;
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        color: var(--light-gray);
    }
}

/* Subtitle container with animation */
.subtitle-container {
    position: relative;
    height: 50px; /* Reduced since we only have one subtitle now */
    margin-bottom: 30px;
    perspective: 800px;
}

.subtitle {
    font-size: 24px;
    background: var(--secondary-gradient); /* Epic purple gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    opacity: 0;
    position: absolute;
    width: 100%;
    text-align: center;
    animation: subtitleReveal 2s ease-out forwards 3.5s; /* Changed from 5s to 3.5s to start after "& more" finishes */
    transform-origin: center;
    text-shadow: 0 0 10px rgba(75, 94, 170, 0.3);
}

.subtitle-quote {
    font-size: 14px;
    color: var(--gray);
    font-style: italic;
    font-weight: 500;
    opacity: 0;
    position: absolute;
    width: 100%;
    text-align: center;
    top: 32px; /* Position below main subtitle */
    animation: quoteReveal 1.5s ease-in-out forwards 5.6s; /* Start just before screen rises */
}

@keyframes quoteReveal {
    0% {
        opacity: 0;
        transform: translateY(5px);
    }
    100% {
        opacity: 0.9;
        transform: translateY(0);
    }
}

@keyframes subtitleReveal {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.9) rotateX(10deg);
        filter: blur(4px);
    }
    40% {
        opacity: 0.4;
        transform: translateY(-10px) scale(0.95) rotateX(5deg);
        filter: blur(2px);
    }
    80% {
        opacity: 0.8;
        transform: translateY(2px) scale(1.02) rotateX(0deg);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: blur(0);
    }
}

.subtitle-legendary {
    font-size: 20px; /* Slightly smaller than main subtitle */
    background: var(--secondary-gradient); /* Same gradient as main subtitle */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    position: absolute;
    width: 100%;
    text-align: center;
    top: 40px; /* Position below the main subtitle */
    opacity: 0;
    transform-origin: center;
    animation: legendaryReveal 1.2s var(--easing-bounce) forwards 2.5s, legendaryPulse 3s ease-in-out infinite alternate 4s;
    text-shadow: 0 0 15px rgba(75, 94, 170, 0.4);
}

@keyframes legendaryReveal {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.7) rotateX(-30deg);
        filter: blur(8px);
    }
    60% {
        opacity: 0.8;
        transform: translateY(10px) scale(1.1) rotateX(5deg);
        filter: blur(0);
    }
    80% {
        opacity: 1;
        transform: translateY(-5px) scale(0.95) rotateX(0deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

@keyframes legendaryPulse {
    0% {
        transform: scale(1);
        text-shadow: 0 0 15px rgba(75, 94, 170, 0.4);
    }
    100% {
        transform: scale(1.05);
        text-shadow: 0 0 20px rgba(75, 94, 170, 0.7), 0 0 40px rgba(75, 94, 170, 0.3);
    }
}

/* Enhanced section heading animations */
.section-heading {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    animation: sectionHeadingReveal 1.2s var(--easing-bounce) forwards;
}

@keyframes sectionHeadingReveal {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    70% {
        opacity: 1;
        transform: translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 1s ease forwards 2s;
    opacity: 0;
}

.chevron-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chevron {
    width: 20px;
    height: 8px;
    opacity: 0;
    transform: scale(0.3);
    animation: pulse 2s ease-out infinite;
    animation-direction: alternate;
    will-change: transform, opacity;
}

.chevron:before,
.chevron:after {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    background: var(--chevron-color);
}

.chevron:before {
    left: 0;
    transform: skewY(30deg);
}

.chevron:after {
    right: 0;
    transform: skewY(-30deg);
}

.chevron:nth-child(1) {
    animation-delay: 0s;
}

.chevron:nth-child(2) {
    animation-delay: 0.2s;
    margin-top: -4px;
}

.chevron:nth-child(3) {
    animation-delay: 0.4s;
    margin-top: -4px;
}

/* ===== 6. Particle Effects ===== */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: drift 15s infinite ease-in-out;
    opacity: 0.5;
    will-change: transform, opacity;
}

@keyframes drift {
    0% { transform: translateY(0); opacity: 0; }
    50% { opacity: 0.6; }
    100% { transform: translateY(-120vh); opacity: 0; }
}

.particle.static:nth-child(1) { background: rgba(209, 44, 44, 0.5); }
.particle.static:nth-child(2) { background: rgba(200, 75, 158, 0.5); }
.particle.static:nth-child(3) { background: rgba(75, 94, 170, 0.5); }
.particle.static:nth-child(4) { background: rgba(209, 44, 44, 0.5); }
.particle.static:nth-child(5) { background: rgba(200, 75, 158, 0.5); }

/* ===== 7. About Section ===== */
.about {
    background-color: var(--black);
    color: var(--text-color);
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 40px;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-image {
    flex: 0 0 280px;
    margin-top: 20px;
    position: relative;
}

.about-image img {
    max-width: 100%;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 1s ease forwards 0.8s;
    opacity: 0;
}

.about-image img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.about-image::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary-red);
    border-radius: var(--border-radius-md);
    z-index: -1;
    animation: fadeIn 1s ease forwards 1s;
    opacity: 0;
}

/* Make the about section responsive */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        flex: 0 0 auto;
        width: 280px;
        margin: 0 auto;
    }
}

.section-heading {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.section-number {
    color: var(--primary-red);
    font-size: var(--font-size-sm);
    font-weight: 600;
    opacity: 0.8;
}

.section-heading h2 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    position: relative;
}

.section-heading h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-red);
    transition: width 0.6s ease;
}

.section-heading:hover h2::after {
    width: 100%;
}

.quote {
    font-size: 1.1rem;
    line-height: 1.8;
    font-style: italic;
    color: var(--text-secondary);
    position: relative;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-left: 3px solid var(--primary-red);
    padding-left: 1.5rem;
    max-width: 90%;
}

.quote-author {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
    font-style: normal;
    color: var(--text-primary);
}

.about-description {
    font-size: var(--font-size-md);
    margin-bottom: 30px;
    line-height: 1.5;
    max-width: 800px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards 0.4s;
}

/* Add more compact spacing for multiple paragraphs */
.about-description + .about-description {
    margin-top: -15px;
    margin-bottom: 25px;
}

/* Personal heading styling */
.personal-heading {
    font-size: var(--font-size-xl);
    margin-bottom: 15px;
    font-weight: 600;
    position: relative;
    display: inline-block;
    color: var(--primary-red);
    padding-left: 0;
    border-bottom: 2px solid var(--primary-red);
    padding-bottom: 5px;
    margin-top: 10px;
    text-transform: none;
    letter-spacing: 0.5px;
    animation: fadeUp 0.8s ease forwards 0.3s;
    opacity: 0;
    transform: translateY(15px);
}

.personal-heading::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-gradient);
    transform-origin: left;
    animation: scaleRight 0.5s ease-out forwards 0.8s;
    transform: scaleX(0);
}

@keyframes scaleRight {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* ===== 8. Skills Section ===== */
.skills-heading {
    font-size: var(--font-size-2xl);
    margin-bottom: 40px;
    text-align: center;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.6s;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.skills-heading.text-left {
    text-align: left;
    margin-left: 0;
    padding-left: 0;
}

.skills-heading:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
}

.skills-heading.text-left:after {
    left: 0;
    transform: none;
}

.skills-container {
    position: relative;
    margin-top: 60px;
}

.skills-container:before {
    content: '';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: var(--primary-red);
    opacity: 0.3;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Reduced minimum width to allow more cards per row */
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 60px;
}

.skill-item {
    background: var(--card-background);
    padding: 25px 20px;
    border-radius: var(--border-radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: auto;
    min-height: 310px;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: calc(0.1s * var(--item-index, 0));
    width: 100%;
    min-width: 220px; /* Increased minimum width */
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform, opacity;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .skill-item {
        min-height: 0; /* Remove fixed height on mobile */
        padding-bottom: 20px;
    }
}

.skill-item:hover {
    transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    z-index: 1;
    border-color: rgba(209, 44, 44, 0.2);
}

[data-theme="dark"] .skill-item:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; /* Changed from partial to full width */
    height: 2px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
    opacity: 0.7;
}

.skill-item:hover::before {
    transform: scaleX(1);
}

.skill-icon {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    font-size: 50px; /* Increased size for main icons */
    position: relative;
    padding: 15px;
    margin-top: 5px;
}

/* Increase PHP logo size by 20% */
.skill-item:nth-child(3) .skill-icon i {
    font-size: 60px; /* 20% larger than the default 50px */
    margin-top: -5px; /* Negative margin to prevent pushing down other elements */
    margin-bottom: -5px; /* Negative margin to maintain vertical spacing */
}

/* Remove background and shadow */
[data-theme="dark"] .skill-icon i:after,
[data-theme="light"] .skill-icon i:after {
    display: none;
}

.skill-item:hover .skill-icon i {
    transform: translateY(-3px) scale(1.05);
}

.skill-item:hover .skill-icon i:after {
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.skill-name {
    font-weight: 700;
    font-size: var(--font-size-md);
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
    color: var(--text-color);
    padding-bottom: 8px;
    text-transform: uppercase;
}

/* Remove the animated bar */
.skill-name:after {
    display: none;
}

/* Enhanced skill level bars */
.skill-level {
    width: 100%;
    height: 6px; /* Slightly taller */
    background: var(--dark-gray);
    opacity: 0.2;
    margin: 8px 0 15px;
    position: relative;
    border-radius: 8px; /* More rounded */
    overflow: hidden;
}

.skill-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary-gradient);
    display: block;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 1.2s cubic-bezier(0.17, 0.67, 0.83, 0.67); /* Improved animation curve */
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(209, 44, 44, 0.5); /* Add glow effect */
}

.skill-item.animate .skill-progress {
    transform: scaleX(1);
}

/* Add animated shimmer effect */
.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    animation: shimmer 2s infinite;
}

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

/* Framework container fixes */
.frameworks {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
    position: relative;
    padding: 15px 10px 0;
    box-sizing: border-box;
    overflow: visible; /* Allow items to overflow container */
    contain: none; /* Remove containment that might cause scrollbars */
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Keep the thin red line at the top */
.frameworks:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-red);
    opacity: 0.6;
    box-shadow: 0 0 5px rgba(var(--primary-red-rgb), 0.3);
}

/* Remove the middle line by overriding it */
.frameworks:after {
    display: none;
}

/* Framework items styling with scrollbar fixes */
.framework-item {
    flex: 0 0 auto;
    width: 60px;
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.75;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
    position: relative;
    isolation: isolate;
    will-change: transform, opacity;
    transform: translateZ(0);
    
    /* Remove any possible scroll behavior */
    overflow: visible !important;
    max-height: none !important;
    overflow-y: visible !important;
    overflow-x: visible !important;
    
    /* Disable iframe-like behaviors */
    contain: none !important;
    scroll-behavior: auto !important;
    scrollbar-width: none !important;
}

/* Hide scrollbars completely */
.framework-item::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Override any potential scrolling container styles */
.framework-item * {
    overflow: visible !important;
}

/* Force remove all red backgrounds */
.framework-item,
.framework-item:hover,
.skill-item:hover .framework-item {
    background-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* New subtle hover class with no red background */
.framework-subtle-hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Override the default hover to remove red background */
.framework-item:hover {
    transform: scale(1.05);
    opacity: 1;
}

/* Completely remove the red background from skill item hover */
.skill-item:hover .framework-item {
    animation: pulseIcon 2s ease-in-out infinite;
    background: transparent !important; /* Force no background */
}

/* Redefine animation to just scale without movement */
@keyframes pulseIcon {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Make framework items appear with a staggered delay */
.skill-item.animate .framework-item:nth-child(1) {
    animation: fadeUp 0.5s ease forwards 0.2s;
}

.skill-item.animate .framework-item:nth-child(2) {
    animation: fadeUp 0.5s ease forwards 0.3s;
}

.skill-item.animate .framework-item:nth-child(3) {
    animation: fadeUp 0.5s ease forwards 0.4s;
}

.framework-icon {
    font-size: 24px;
    margin-bottom: 8px;
    margin-top: 2px;
    transition: all 0.3s ease;
}

.framework-name {
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
    color: var(--text-color);
    transition: color 0.3s ease;
    line-height: 1.2;
    padding: 0 2px;
}

/* ===== 9. Work Section ===== */
.work {
    background-color: var(--dark-gray);
    position: relative;
    color: var(--text-color);
}

.work-heading {
    font-size: var(--font-size-xl);
    margin-bottom: 30px;
    text-align: center;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.2s;
}

.work-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.work-item {
    background: var(--work-item-bg);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.6s ease, box-shadow 0.6s ease;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: calc(0.1s * var(--item-index, 0));
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform, opacity;
    position: relative;
}

/* Add a subtle border glow on hover */
.work-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-gradient);
    padding: 2px;
    border-radius: var(--border-radius-md);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 1;
    pointer-events: none;
}

.work-item:hover::before {
    opacity: 1;
}

[data-theme="dark"] .work-item {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.work-item:hover {
    transform: translateY(-10px) rotateY(-2deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

[data-theme="dark"] .work-item:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.work-preview {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.work-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
    will-change: transform;
}

.work-item:hover .work-image {
    transform: scale(1.1);
}

/* Let's create a completely fresh work overlay section */
.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 100;
    transition: opacity 0.5s ease;
    padding: 30px;
    text-align: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 3;
}

.work-item:hover .work-overlay {
    opacity: 1;
}

.work-overlay h3 {
    font-size: var(--font-size-xl);
    margin-bottom: 15px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease, color 0.3s ease;
    transition-delay: 0.1s;
    color: white;
}

.work-overlay p {
    font-size: var(--font-size-md);
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.8);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease, color 0.3s ease;
    transition-delay: 0.2s;
}

.work-item:hover .work-overlay h3,
.work-item:hover .work-overlay p,
.work-item:hover .project-year {
    transform: translateY(0);
    opacity: 1;
}

/* Project year styling */
.project-year {
    position: absolute;
    bottom: 20px;
    left: 30px;
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.6);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
    transition-delay: 0.3s;
}

/* Work link styling */
.work-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--primary-gradient);
    color: white;
    font-size: var(--font-size-sm);
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(var(--primary-red-rgb), 0.3);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease, box-shadow 0.3s ease;
    transition-delay: 0.4s;
    z-index: 2;
}

.work-item:hover .work-link {
    transform: translateY(0);
    opacity: 1;
}

.work-link:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(var(--primary-red-rgb), 0.5);
}

.work-link i {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.work-link:hover i {
    transform: translateX(3px);
}

.button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.work-link:hover .button-overlay {
    transform: translateX(0);
}

/* Status circles for projects */
.status-circle {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.status-circle.completed {
    background: #4CAF50;
}

.status-circle.in-progress {
    background: #FF9800;
}

/* Quote carousel styles */
.quote-carousel {
    position: relative;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 800px;
}

.quotes-container {
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.quote {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateX(30px);
    transition: all 0.5s ease;
    z-index: 1;
    font-size: 1.1rem;
    line-height: 1.8;
    font-style: italic;
    color: var(--text-color);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-left: 3px solid var(--primary-red);
    padding-left: 1.5rem;
    max-width: 90%;
}

.quote-author {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
    font-style: normal;
    color: var(--text-color);
}

.quote.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    z-index: 2;
}

.quote.inactive {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-30px);
    z-index: 1;
}

.quote-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.quote-nav {
    background: transparent;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.quote-nav:hover {
    background: var(--primary-red);
    color: white;
}

/* Portfolio stats styling */
.portfolio-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

/* Gradient style for dark theme only */
.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(135deg, var(--primary-red), #FF6B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--primary-red); /* Fallback */
    display: inline-block;
}

/* Light theme - aggressive overrides to completely remove gradient */
[data-theme="light"] .stat-value {
    background: none !important;
    background-image: none !important;
    background-color: transparent !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: var(--primary-red) !important;
    color: var(--primary-red) !important;
}

.stat-label {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
}

/* ===== 13. Media Queries ===== */
@media (max-width: 1200px) {
    :root {
        --font-size-4xl: 50px;
        --font-size-3xl: 36px;
    }
}

@media (max-width: 992px) {
    :root {
        --font-size-4xl: 40px;
        --font-size-3xl: 32px;
        --font-size-2xl: 28px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .work-showcase {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-4xl: 36px;
        --font-size-3xl: 28px;
        --font-size-2xl: 24px;
        --font-size-xl: 20px;
        --font-size-lg: 18px;
    }
    
    header {
        padding: 15px 20px;
    }
    
    nav ul {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .work-showcase {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        flex-direction: column;
    }
    
    .contact-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-bottom: 30px;
        max-width: 100%;
        width: 100%;
        padding: 0 20px;
    }
    
    .contact-text {
        text-align: center;
        max-width: 400px;
        width: 100%;
    }
    
    .social-links {
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
        width: 100%;
    }
    
    /* Fix specific alignment for social icons */
    .contact-info .social-links {
        display: flex;
        justify-content: center;
        width: 100%;
        gap: 20px;
        margin: 0 auto 20px;
    }
    
    .social-link {
        /* Ensure icons are evenly spaced */
        margin: 0 10px;
    }
    
    /* Ensure the availability indicator is centered */
    .availability {
        justify-content: center;
        margin: 0 auto;
    }
    
    /* Form container styling */
    .contact-form-container {
        width: 100%;
        max-width: 400px;
        padding: 0 20px;
    }
    
    .contact-form {
        width: 100%;
    }
    
    .contact-form .form-group {
        text-align: left; /* Keep form labels left-aligned */
        width: 100%;
    }
    
    /* Center the submit button */
    .submit-btn {
        margin: 15px auto 0;
        display: flex;
        justify-content: center;
    }
    
    /* Keep section heading left-aligned while content is centered */
    .contact .section-heading {
        width: 100%;
        align-items: flex-start;
        text-align: left;
        margin-left: 20px;
    }
    
    /* Apply consistent padding to all sections on mobile */
    section {
        padding: var(--spacing-2xl) var(--spacing-md);
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-4xl: 30px;
        --font-size-3xl: 24px;
        --font-size-2xl: 20px;
    }
    
    .section-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .section-number {
        font-size: 12px;
    }
}

/* Essential animations */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 0.5; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(0.7); }
}

/* Section separators with parallax effect */
.section-separator {
    position: relative;
    height: 150px; /* Increased height for better visibility */
    overflow: hidden;
    margin: -50px 0; /* Adjusted margins */
    z-index: 1;
    box-shadow: 0 -10px 15px -5px rgba(0, 0, 0, 0.3), 0 10px 15px -5px rgba(0, 0, 0, 0.3);
}

/* Top shadow overlay for separator */
.section-separator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 25px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), transparent);
    z-index: 2;
}

/* Bottom shadow overlay for separator */
.section-separator::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.2), transparent);
    z-index: 2;
}

/* Light theme shadow adjustments */
[data-theme="light"] .section-separator {
    box-shadow: 0 -10px 15px -5px rgba(0, 0, 0, 0.1), 0 10px 15px -5px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .section-separator::before {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05), transparent);
}

[data-theme="light"] .section-separator::after {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.05), transparent);
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 300%; /* Larger than container for parallax movement */
    transform: translateY(-50%);
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.7) 0%, rgba(20, 20, 20, 0.7) 50%, rgba(10, 10, 10, 0.7) 100%);
    overflow: hidden;
    opacity: 0.9;
    z-index: -1;
    will-change: transform;
}

[data-theme="light"] .parallax-bg {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(245, 245, 245, 0.7) 50%, rgba(255, 255, 255, 0.7) 100%);
}

.parallax-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 300%;
    background: 
        radial-gradient(circle at 30% 50%, var(--accent-glow-1) 0%, transparent 60%),
        radial-gradient(circle at 70% 50%, var(--accent-glow-2) 0%, transparent 60%);
    opacity: 0.8;
    z-index: -1;
    transform: translateY(-60%);
    will-change: transform;
}

.parallax-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    /* Add styles to create the illusion of more particles with CSS */
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(var(--primary-red-rgb), 0.1) 0, transparent 5px),
        radial-gradient(circle at 70% 60%, rgba(var(--primary-red-rgb), 0.1) 0, transparent 5px),
        radial-gradient(circle at 40% 80%, rgba(var(--primary-red-rgb), 0.1) 0, transparent 5px),
        radial-gradient(circle at 60% 20%, rgba(var(--primary-red-rgb), 0.1) 0, transparent 5px);
}

.separator-particle {
    position: absolute;
    border-radius: 50%;
    width: 2px;
    height: 2px;
    background: rgba(209, 44, 44, 0.5);
    box-shadow: 0 0 4px 1px rgba(209, 44, 44, 0.5);
    animation: float 15s infinite ease-in-out;
    z-index: 1;
    pointer-events: none;
    opacity: 0.8;
    transform: translateZ(0);
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-20px) translateX(10px);
    }
    50% {
        transform: translateY(-35px) translateX(-5px);
    }
    75% {
        transform: translateY(-15px) translateX(-10px);
    }
    100% {
        transform: translateY(0) translateX(0);
    }
}

/* Create additional sets of particles with different animations */
.separator-particle::before,
.separator-particle::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(var(--primary-red-rgb), 0.6);
}

.separator-particle::before {
    left: -10px;
    top: -5px;
    animation: separatorDrift 8s infinite ease-in-out reverse;
}

.separator-particle::after {
    right: -10px;
    top: 8px;
    animation: separatorDrift 12s infinite ease-in-out 1s;
}

/* Add secondary particles with CSS only */
.section-separator .parallax-particles::before,
.section-separator .parallax-particles::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: 
        radial-gradient(circle at 15% 25%, rgba(var(--primary-red-rgb), 0.25) 0, rgba(var(--primary-red-rgb), 0) 3px),
        radial-gradient(circle at 85% 30%, rgba(var(--primary-red-rgb), 0.25) 0, rgba(var(--primary-red-rgb), 0) 3px),
        radial-gradient(circle at 65% 65%, rgba(var(--primary-red-rgb), 0.25) 0, rgba(var(--primary-red-rgb), 0) 3px),
        radial-gradient(circle at 35% 85%, rgba(var(--primary-red-rgb), 0.25) 0, rgba(var(--primary-red-rgb), 0) 3px),
        radial-gradient(circle at 25% 45%, rgba(var(--primary-red-rgb), 0.25) 0, rgba(var(--primary-red-rgb), 0) 3px),
        radial-gradient(circle at 75% 75%, rgba(var(--primary-red-rgb), 0.25) 0, rgba(var(--primary-red-rgb), 0) 3px);
    opacity: 0.7;
    animation: particlePulse 4s infinite alternate ease-in-out;
    pointer-events: none;
}

.section-separator .parallax-particles::after {
    background-image: 
        radial-gradient(circle at 55% 15%, rgba(75, 94, 170, 0.25) 0, rgba(75, 94, 170, 0) 3px),
        radial-gradient(circle at 25% 35%, rgba(75, 94, 170, 0.25) 0, rgba(75, 94, 170, 0) 3px),
        radial-gradient(circle at 75% 55%, rgba(75, 94, 170, 0.25) 0, rgba(75, 94, 170, 0) 3px),
        radial-gradient(circle at 35% 75%, rgba(75, 94, 170, 0.25) 0, rgba(75, 94, 170, 0) 3px),
        radial-gradient(circle at 65% 95%, rgba(75, 94, 170, 0.25) 0, rgba(75, 94, 170, 0) 3px);
    animation: particlePulse 5s infinite alternate-reverse ease-in-out;
}

@keyframes particlePulse {
    0% { opacity: 0.4; transform: translateY(0); }
    100% { opacity: 0.9; transform: translateY(-10px); }
}

@keyframes separatorDrift {
    0% { transform: translateY(100px); opacity: 0; }
    50% { opacity: 0.9; } /* Increased opacity */
    100% { transform: translateY(-100px); opacity: 0; }
}

/* Create extra particle variations */
.separator-particle:nth-child(3n+1) {
    animation-duration: 7s;
}

.separator-particle:nth-child(3n+2) {
    animation-duration: 9s;
}

.separator-particle:nth-child(3n) {
    animation-duration: 11s;
}

/* Target the specific sections to add separators before */
.about, .work, .contact {
    position: relative;
    z-index: 2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-separator {
        height: 100px;
        margin: -40px 0;
    }
}

/* Make sure section headings stay on top of separators */
.section-heading {
    position: relative;
    z-index: 5;
}
