:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-dark: #111827;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-3d: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --perspective: 1000px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 4px 20px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.1em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    z-index: -2;
    perspective: 1200px;
    overflow: hidden;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    z-index: 0;
}

/* 3D floating shapes in hero */
.hero-3d-shapes {
    position: absolute;
    inset: 0;
    z-index: -1;
    perspective: 1200px;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(2px);
    animation: float3d 20s ease-in-out infinite;
    transform-style: preserve-3d;
}

.shape-1 { width: 80px; height: 80px; top: 15%; left: 10%; animation-delay: 0s; animation-duration: 18s; transform: rotateY(0deg) rotateX(15deg); }
.shape-2 { width: 120px; height: 120px; top: 60%; right: 15%; animation-delay: -3s; animation-duration: 22s; transform: rotateY(25deg) rotateX(-10deg); }
.shape-3 { width: 60px; height: 60px; bottom: 25%; left: 25%; animation-delay: -6s; animation-duration: 16s; transform: rotateY(-20deg) rotateX(5deg); }
.shape-4 { width: 100px; height: 100px; top: 25%; right: 30%; animation-delay: -9s; animation-duration: 24s; transform: rotateY(10deg) rotateX(-15deg); }
.shape-5 { width: 70px; height: 70px; bottom: 40%; right: 8%; animation-delay: -12s; animation-duration: 19s; transform: rotateY(-15deg); }
.shape-6 { width: 90px; height: 90px; top: 70%; left: 15%; animation-delay: -5s; animation-duration: 21s; transform: rotateY(30deg) rotateX(10deg); }

@keyframes float3d {
    0%, 100% { transform: translateZ(0) rotateY(0deg) rotateX(0deg) translateY(0) scale(1); opacity: 0.6; }
    33% { transform: translateZ(40px) rotateY(120deg) rotateX(8deg) translateY(-12px) scale(1.05); opacity: 0.9; }
    66% { transform: translateZ(-15px) rotateY(240deg) rotateX(-8deg) translateY(8px) scale(0.98); opacity: 0.7; }
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    transform-style: preserve-3d;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateZ(20px);
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transform-style: preserve-3d;
    position: relative;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 0 #e0e7ff, 0 8px 20px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px) translateZ(8px);
    box-shadow: 0 6px 0 #e0e7ff, 0 12px 28px rgba(99, 102, 241, 0.35);
}

.btn-primary:active {
    transform: translateY(2px) translateZ(-4px);
    box-shadow: 0 2px 0 #e0e7ff, 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1), 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px) translateZ(8px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.1), 0 12px 28px rgba(0, 0, 0, 0.2);
}

.btn-secondary:active {
    transform: translateY(2px) translateZ(-4px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid white;
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: white;
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0%, 100% {
        opacity: 1;
        top: 8px;
    }
    50% {
        opacity: 0;
        top: 20px;
    }
}

/* Section Styles - clear spacing to prevent overlap */
section {
    padding: 5rem 0 6rem;
    position: relative;
    isolation: isolate;
}

/* Canva-style wave dividers between sections */
.section-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    line-height: 0;
    overflow: hidden;
    pointer-events: none;
}

.section-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 2px);
    height: 80px;
    left: 50%;
    transform: translateX(-50%);
}

.section-wave--hero svg {
    height: 100px;
}

/* Extra spacing so 3D card lift doesn't overlap next section */
.projects-grid {
    margin-bottom: 1rem;
}

.projects .container,
.about .container {
    overflow: visible;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    perspective: 800px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
    transform: translateZ(0);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* About Section - clean Canva-style block */
.about {
    background: var(--bg-primary);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    text-align: center;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

.feature-item {
    text-align: center;
    padding: 2rem;
    border-radius: 1.25rem;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease;
    transform-style: preserve-3d;
    background: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.feature-item:hover {
    transform: translateY(-8px) rotateX(5deg) translateZ(10px);
    box-shadow: 0 16px 32px -8px rgba(99, 102, 241, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-item p {
    color: var(--text-secondary);
}

/* Projects Section - Canva-style subtle dot pattern */
.projects {
    background: var(--bg-secondary);
    background-image: radial-gradient(circle at 1px 1px, rgba(99, 102, 241, 0.08) 1px, transparent 0);
    background-size: 32px 32px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    perspective: 1200px;
}

.project-card {
    background: white;
    padding: 2.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 10px 20px -5px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease, border-color 0.3s ease;
    border: 2px solid transparent;
    transform-style: preserve-3d;
    position: relative;
}

.project-card:hover {
    transform: translateY(-12px) translateZ(20px) rotateX(2deg);
    box-shadow: 0 20px 40px -15px rgba(99, 102, 241, 0.25), 0 0 0 1px rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
}

.project-card.featured {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    box-shadow: 0 8px 24px -8px rgba(99, 102, 241, 0.2), 0 0 0 1px rgba(99, 102, 241, 0.08);
}

.project-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.project-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Tech Stack Section */
.tech-stack {
    background: var(--bg-primary);
}

.tech-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
}

.tech-category {
    text-align: center;
}

.tech-category-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.tech-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tech-item {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), background 0.3s ease, color 0.3s ease;
    transform-style: preserve-3d;
}

.tech-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(8px) translateZ(6px) rotateY(2deg);
}

/* Contact Section */
.contact {
    background: var(--bg-secondary);
    padding-bottom: 4rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
}

.contact-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-item p {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.contact-form-wrapper {
    background: white;
    padding: 2.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 10px 40px -15px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.contact-form-wrapper:hover {
    transform: translateZ(8px);
    box-shadow: 0 20px 50px -20px rgba(99, 102, 241, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand .logo-text {
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand .logo-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

.footer-tagline {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .container {
        padding: 0 1.5rem;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        text-align: center;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .tech-content {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    section {
        padding: 3rem 0 4rem;
    }

    .section-wave svg {
        height: 60px;
    }

    .section-wave--hero svg {
        height: 72px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .project-card {
        padding: 1.5rem;
    }
}

/* Reduced motion - tone down 3D for accessibility */
@media (prefers-reduced-motion: reduce) {
    .shape { animation: none; opacity: 0.5; }
    .project-card:hover { transform: translateY(-8px); }
    .feature-item:hover { transform: translateY(-8px); }
    .tech-item:hover { transform: translateX(8px); }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

