/* ========================================
   CSS Reset & Base Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ========================================
   Bouncing Bubble - Liquid Glass Effect
   ======================================== */

.bouncing-bubble {
    position: fixed;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 999;

    /* Base glass appearance */
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.2) 40%,
        rgba(255, 255, 255, 0.1) 100%);

    /* Backdrop filter - will be enhanced by SVG displacement map */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);

    /* Border and shadows for depth */
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 8px 32px rgba(99, 102, 241, 0.25),
        0 4px 16px rgba(139, 92, 246, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.2);

    /* Smooth animation */
    will-change: transform;
    overflow: hidden;
}

/* Light reflection spot */
.bouncing-bubble::before {
    content: '';
    position: absolute;
    top: 18%;
    left: 22%;
    width: 35%;
    height: 35%;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.5) 30%,
        transparent 60%);
    border-radius: 50%;
    filter: blur(3px);
}

/* Subtle color tint */
.bouncing-bubble::after {
    content: '';
    position: absolute;
    bottom: 15%;
    right: 20%;
    width: 25%;
    height: 25%;
    background: radial-gradient(circle,
        rgba(139, 92, 246, 0.3) 0%,
        rgba(99, 102, 241, 0.2) 40%,
        transparent 70%);
    border-radius: 50%;
    filter: blur(8px);
}

/* ========================================
   Navigation
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

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

.nav-menu a:hover::after {
    width: 100%;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 20px 60px;
    position: relative;
    overflow: hidden;
}

/* Hero Background Slideshow */
.hero-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    z-index: 0;
}

.hero-bg-layer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.75) 0%,
        rgba(139, 92, 246, 0.65) 50%,
        rgba(249, 250, 251, 0.85) 100%);
    z-index: 1;
}

.hero-bg-layer.active {
    opacity: 1;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--white);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.highlight {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--white);
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    border: 2px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.visual-circle {
    display: none;
}

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

/* ========================================
   Sections
   ======================================== */

section {
    padding: 100px 20px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

/* ========================================
   About Section
   ======================================== */

.about {
    background: var(--white);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    color: var(--text-light);
    text-align: center;
    line-height: 1.8;
}

/* ========================================
   Projects Section
   ======================================== */

.projects {
    background: var(--bg-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

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

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--secondary-color);
}

/* ========================================
   Contact Section
   ======================================== */

.contact {
    background: var(--white);
    text-align: center;
}

.contact-description {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 600;
    transition: var(--transition);
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
}

.contact-link:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--text-dark);
    color: var(--white);
    text-align: center;
    padding: 2rem;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-visual {
        margin-top: 2rem;
    }

    .visual-circle {
        width: 250px;
        height: 250px;
    }

    .hero-cta {
        justify-content: center;
    }

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

    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        gap: 0.5rem;
        font-size: 0.85rem;
    }

    .nav-brand {
        font-size: 1.25rem;
    }

    section {
        padding: 60px 20px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}
