/* CSS Variables for easy theme management */
:root {
    --bg: #0a0a0a;
    --primary: #ffffff;
    --secondary: #666666;
    --accent: #00ff88;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
}

/* Light theme overrides */
[data-theme="light"] {
    --bg: #ffffff;
    --primary: #1a1a1a;
    --secondary: #666666;
    --accent: #00ff88;
    --card-bg: rgba(0, 0, 0, 0.05);
    --border: rgba(0, 0, 0, 0.1);
}

/* Hide stars in light mode for clean look */
[data-theme="light"] .stars {
    display: none;
}

[data-theme="light"] .star {
    display: none;
}

/* Smooth scrolling and font optimization */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    scroll-padding-top: 80px; /* Account for fixed nav */
    /* Better scroll performance */
    -webkit-overflow-scrolling: touch;
}

/* iOS specific optimizations */
@supports (-webkit-touch-callout: none) {
    body {
        /* Prevent zoom on double tap for iOS */
        touch-action: manipulation;
    }
}

/* Better scroll performance */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Optimize all images */
img {
    content-visibility: auto;
    contain: layout style paint;
}

/* Optimize text rendering */
p, span, div {
    contain: layout style;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--primary);
    line-height: 1.6;
    overflow-x: hidden;
    /* Prevent horizontal scroll bounce on iOS */
    overscroll-behavior-x: none;
    /* Better scroll performance on iOS */
    -webkit-overflow-scrolling: touch;
    /* Prevent pull-to-refresh on mobile */
    overscroll-behavior-y: contain;
    /* GPU acceleration for smoother scrolling */
    transform: translateZ(0);
}

/* ===========================================
   ENTRANCE ANIMATIONS - GPU Accelerated
   =========================================== */

/* Hero Section Entrance */
.hero-section {
    animation: heroEntrance 0.8s ease-out;
}

.hero-title {
    animation: fadeInDown 0.6s ease-out 0.2s both;
    will-change: transform, opacity;
    transform: translateZ(0);
}

.hero-subtitle {
    animation: fadeInUp 0.6s ease-out 0.4s both;
    will-change: transform, opacity;
    transform: translateZ(0);
}

/* Staggered card animations */
.info-card {
    animation: slideInUp 0.6s ease-out both;
    will-change: transform, opacity;
}

.info-card:nth-child(1) { animation-delay: 0.1s; }
.info-card:nth-child(2) { animation-delay: 0.2s; }
.info-card:nth-child(3) { animation-delay: 0.3s; }
.info-card:nth-child(4) { animation-delay: 0.4s; }

/* Section headers */
h1, h2 {
    animation: fadeInUp 0.8s ease-out both;
    will-change: transform, opacity;
}

h3 {
    animation: fadeInLeft 0.6s ease-out both;
    will-change: transform, opacity;
}

/* Project cards staggered */
.project-content {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.project-images-grid > * {
    animation: scaleIn 0.6s ease-out both;
}

.project-images-grid > *:nth-child(1) { animation-delay: 0.1s; }
.project-images-grid > *:nth-child(2) { animation-delay: 0.2s; }
.project-images-grid > *:nth-child(3) { animation-delay: 0.3s; }
.project-images-grid > *:nth-child(4) { animation-delay: 0.4s; }

/* Skills staggered */
.skill-item {
    animation: slideInRight 0.6s ease-out both;
}

.skill-item:nth-child(1) { animation-delay: 0.1s; }
.skill-item:nth-child(2) { animation-delay: 0.2s; }
.skill-item:nth-child(3) { animation-delay: 0.3s; }
.skill-item:nth-child(4) { animation-delay: 0.4s; }
.skill-item:nth-child(5) { animation-delay: 0.5s; }
.skill-item:nth-child(6) { animation-delay: 0.6s; }
.skill-item:nth-child(7) { animation-delay: 0.7s; }

/* Text paragraphs */
p {
    animation: fadeIn 0.8s ease-out both;
}

/* About content */
.about-text > p {
    animation: fadeInLeft 0.6s ease-out both;
}

.about-text > p:nth-child(1) { animation-delay: 0.1s; }
.about-text > p:nth-child(2) { animation-delay: 0.2s; }
.about-text > p:nth-child(3) { animation-delay: 0.3s; }
.about-text > p:nth-child(4) { animation-delay: 0.4s; }
.about-text > p:nth-child(5) { animation-delay: 0.5s; }

/* Profile image */
.about-image {
    animation: zoomIn 0.6s ease-out both;
    will-change: transform, opacity;
}

/* ===========================================
   KEYFRAMES - All GPU Optimized
   =========================================== */

@keyframes heroEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Page containment - already defined above */

/* Stars background for dark theme - GPU accelerated */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    contain: strict; /* CSS containment for performance */
    transform: translateZ(0);
}

.star {
    position: absolute;
    background: var(--primary);
    border-radius: 50%;
    will-change: opacity;
    transform: translateZ(0); /* GPU acceleration */
    contain: layout style paint; /* CSS containment for performance */
    animation: gentle-twinkle 4s ease-in-out infinite;
}

@keyframes gentle-twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.mouse-trail {
    position: fixed;
    pointer-events: none;
    z-index: 1000;
    will-change: transform, opacity;
    transform: translateZ(0);
}

.sparkle-core {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    animation: sparkleFade 0.6s ease-out forwards;
    box-shadow: 0 0 6px var(--accent);
}

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

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    padding: 12px 0;
    transform: translateZ(0); /* GPU acceleration */
    /* Prevent nav from affecting scroll */
    pointer-events: none;
}

nav > * {
    pointer-events: auto;
}

nav.hover-visible {
    background: rgba(0, 0, 0, 0.4);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary);
}

.logo {
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: #000;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    transition: all 0.3s ease;
    animation: logoGlow 2s ease-in-out infinite alternate;
    font-family: 'Arial', 'Helvetica', sans-serif;
    font-style: normal;
}

.logo::before {
    content: 'L';
}

.nav-brand-text {
    font-size: 1.1rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
    transition: all 0.3s ease;
}

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

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

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

nav a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: opacity 0.2s ease;
}

nav a:not(.nav-cta):hover {
    opacity: 0.6;
}

.nav-cta {
    padding: 10px 24px;
    background: var(--accent);
    color: var(--bg);
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.nav-cta:hover::before {
    width: 300px;
    height: 300px;
}

.nav-cta:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 255, 136, 0.4);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 20px;
}

.theme-toggle:hover {
    background: var(--card-bg);
    border-color: var(--accent);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

main {
    position: relative;
    z-index: 10;
    padding-top: 80px;
    min-height: 100vh;
    /* Optimization for main content */
    contain: layout style;
    transform: translateZ(0);
}

section {
    padding: 80px 0;
    /* Prevent scrolling issues */
    min-height: 1px;
    /* Optimization */
    content-visibility: auto;
    contain-intrinsic-size: auto 400px;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--primary);
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary);
}

p {
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

.hero-section {
    text-align: center;
    padding: 120px 0 80px 0;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--secondary);
    margin-bottom: 40px;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 60px;
    contain: layout style;
}

@media (min-width: 768px) {
    .about-content {
        display: grid;
        grid-template-columns: 1fr 400px;
        gap: 60px;
        align-items: start;
    }
    
    .about-text {
        padding-right: 0;
    }
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.profile-img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: opacity 0.3s ease;
    cursor: pointer;
    image-rendering: -webkit-optimize-contrast;
    /* Lazy loading optimization */
    content-visibility: auto;
    contain: layout style paint;
}

.profile-img:hover {
    opacity: 0.8;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
    content-visibility: auto;
    contain: layout style;
}

.info-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    transform: translateZ(0); /* GPU acceleration */
    contain: layout style; /* CSS containment for performance */
    position: relative;
    overflow: hidden;
}

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

.info-card:hover::before {
    left: 100%;
}


.info-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px) scale(1.02) translateZ(0);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2);
}

.info-card h3 {
    color: var(--accent);
    margin-bottom: 10px;
}

.info-card p {
    color: var(--primary);
    margin: 0;
    font-size: 1rem;
}

/* Skills section styling */
.skills-section, .languages-section {
    margin-top: 60px;
}

.skills-section h2, .languages-section h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 40px;
    color: var(--primary);
    text-align: center;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
    content-visibility: auto;
    contain: layout style;
}

.skill-item {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    will-change: transform;
    transform: translateZ(0); /* GPU acceleration */
    contain: layout style; /* CSS containment for performance */
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-item:hover {
    border-color: var(--accent);
    transform: translateY(-3px) translateZ(0);
    box-shadow: 0 10px 25px rgba(0, 255, 136, 0.12);
}

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

.skill-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), rgba(0, 255, 136, 0.8), var(--accent));
    background-size: 200% 100%;
    border-radius: 4px;
    width: 0%;
    transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: gradientShift 3s ease-in-out infinite;
    will-change: width;
    transform: translateZ(0); /* GPU acceleration */
    contain: strict; /* CSS containment for performance */
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2.5s infinite;
}

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

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

@media (max-width: 768px) {
    .skills-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .skill-item {
        padding: 20px;
    }
}

.project-header {
    text-align: center;
    margin-bottom: 60px;
}

.project-status {
    margin-top: 20px;
}

.status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.in-progress {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.status-badge.completed {
    background: linear-gradient(135deg, var(--accent), #00d4aa);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
    }
}

.project-section {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid var(--border);
}

.project-section .project-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary);
}

.project-section .project-subtitle {
    font-size: 1.2rem;
    color: var(--secondary);
    margin-bottom: 0;
}

.project-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary);
}

.project-subtitle {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 0;
}

.featured-project {
    margin-top: 40px;
}

.project-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    contain: layout style;
    /* Remove opacity animation for cleaner scroll */
}

/* Use content-visibility for off-screen content */
.project-section:not(:first-child) {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
    min-height: 200px; /* Prevent layout shift */
}

/* Lazy loading sections - already defined above in section rule */

/* Optimize containers */
.about-content,
.contact-content,
.project-content,
.info-grid {
    content-visibility: auto;
    contain: layout style;
}

.project-info h3 {
    color: var(--accent);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.project-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

.project-link {
    display: inline-block;
    margin-top: 30px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid currentColor;
    transition: opacity 0.3s ease;
}

.project-link:hover {
    opacity: 0.7;
}

.project-image-wrapper {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    will-change: transform;
    transform: translateZ(0); /* GPU acceleration */
    contain: layout style paint; /* CSS containment for performance */
}

.project-image-wrapper:hover {
    border-color: var(--accent);
    transform: translateY(-8px) scale(1.02) translateZ(0);
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.15);
}

.project-img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
    content-visibility: auto;
    contain: layout style paint;
}

.project-image-wrapper:hover .project-img {
    opacity: 0.8;
}

.project-images {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.project-images-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.project-images-grid .profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-features {
    margin-bottom: 30px;
}

.project-features h4 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.project-features ul {
    list-style: none;
    padding: 0;
}

.project-features li {
    color: var(--secondary);
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.project-features li::before {
    content: "→";
    color: var(--accent);
    position: absolute;
    left: 0;
}

.tech-stack {
    margin-bottom: 30px;
}

.tech-stack h4 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    background: var(--card-bg);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    transition: border-color 0.3s ease;
}

.tech-tag:hover {
    border-color: var(--accent);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    contain: layout style;
}

.contact-info h3 {
    color: var(--accent);
    margin-bottom: 20px;
}

.contact-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: transform 0.2s ease, border-color 0.2s ease;
    transform: translateZ(0);
    contain: layout style;
}

.contact-method:hover {
    border-color: var(--accent);
    transform: translateY(-2px) translateZ(0);
}

.contact-method a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.contact-method a:hover {
    color: var(--accent);
}

.contact-form {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 25px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

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

.submit-btn {
    background: var(--accent);
    color: var(--bg);
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    position: relative;
    overflow: hidden;
}

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

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 255, 136, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 60px 0 20px 0;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

footer .logo {
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: #000;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    transition: all 0.3s ease;
    animation: logoGlow 2s ease-in-out infinite alternate;
    font-family: 'Arial', 'Helvetica', sans-serif;
}

footer .logo::before {
    content: 'L';
}

@keyframes logoGlow {
    0% { box-shadow: 0 0 5px var(--accent); }
    100% { box-shadow: 0 0 20px var(--accent), 0 0 30px var(--accent); }
}

/* Gradient animation for hero title */
.hero-title {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--primary) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 3s ease infinite, fadeInDown 0.6s ease-out 0.2s both;
}

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

.footer-brand-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
}

.footer-links {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.footer-links a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-social {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Coming Soon Section */
.coming-soon-section {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid var(--border);
}

.coming-soon-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.coming-soon-content h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary);
}

.coming-soon-subtitle {
    font-size: 1.2rem;
    color: var(--secondary);
    margin-bottom: 50px;
}

.collaboration-card {
    background: var(--card-bg);
    padding: 50px 40px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.collaboration-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.collaboration-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 255, 136, 0.15);
}

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

.collaboration-card h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary);
    position: relative;
    z-index: 1;
}

.collaboration-card p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--secondary);
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.collaboration-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.feature-item:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    transform: translateY(-2px);
}

.feature-item span {
    font-weight: 500;
    color: var(--primary);
    text-align: center;
}

.collaboration-cta {
    text-align: center;
}

.collaboration-btn {
    display: inline-block;
    padding: 18px 40px;
    background: var(--accent);
    color: var(--bg);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.collaboration-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.collaboration-btn:hover::before {
    width: 400px;
    height: 400px;
}

.collaboration-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 255, 136, 0.5);
    background: #00e677;
}

@media (max-width: 768px) {
    .collaboration-card {
        padding: 40px 25px;
    }
    
    .collaboration-features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .coming-soon-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-brand {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-links a {
        width: 100%;
        padding: 10px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .footer-links a:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: var(--accent);
    color: var(--bg);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
    will-change: transform;
}

.back-to-top.visible {
    display: flex;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.5);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.image-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    animation: zoomIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--primary);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.modal-close:hover {
    opacity: 0.6;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-container {
        padding: 0 20px;
        position: relative;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 40px 20px;
        gap: 30px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 100;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 15px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
        display: block;
    }
    
    .nav-cta {
        background: var(--accent) !important;
        color: var(--bg) !important;
        text-align: center !important;
        width: 100%;
        display: block !important;
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        padding: 15px;
    }

    .container {
        padding: 0 20px;
    }

    h1 {
        font-size: 2.5rem;
    }

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

    .project-title {
        font-size: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .project-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .info-grid {
        grid-template-columns: 1fr;
    }

    .project-images-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 30px 20px;
    }
}
