@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --bg-color: #020617;
    --card-bg: rgba(15, 23, 42, 0.6);
    --border-color: rgba(56, 189, 248, 0.2);
    --primary-blue: #38bdf8;
    --secondary-blue: #0ea5e9;
    --cyan-accent: #22d3ee;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --glass-blur: blur(12px);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Custom cursor implementation in JS */
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Glow Effect */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(14, 165, 233, 0.15) 0%,
            transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Custom Cursor */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--cyan-accent);
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease-out;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-blue);
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 100px 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: var(--glass-blur);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-blue);
    text-decoration: none;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.95rem;
}

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
}

.mobile-menu-toggle .bar {
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    text-align: center;
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--text-main), var(--primary-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.8rem 1.6rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--bg-color);
}

.btn-primary:hover {
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--primary-blue);
}

.btn-google {
    background: #000;
    color: #fff;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition);
}

.btn-google:hover {
    border-color: var(--primary-blue);
    background: #111;
    transform: translateY(-2px);
}

.btn-google .play-icon {
    width: 24px;
    height: auto;
}

.btn-google .play-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}

.btn-google .top-text {
    font-size: 0.7rem;
    text-transform: uppercase;
}

.btn-google .main-text {
    font-size: 1.1rem;
    font-weight: 700;
}

.project-actions {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    /* Flex space between buttons */
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    margin-top: 2rem;
}

/* Projects Grid */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-blue);
    border-radius: 2px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    /* Wider cards */
    gap: 2.5rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: var(--glass-blur);
    transition: var(--transition);
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-blue);
    background: rgba(15, 23, 42, 0.8);
}

.project-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #1e293b;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

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

.project-card h3 {
    margin-bottom: 0.5rem;
}

.project-tag {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary-blue);
    border-radius: 20px;
    font-size: 0.75rem;
    margin-bottom: 1rem;
}

/* Contact Section */
.contact-container {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-container h2 {
    margin-bottom: 1rem;
}

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

.social-link {
    color: var(--text-dim);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--primary-blue);
    transform: scale(1.2);
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(2, 6, 23, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        border-left: 1px solid var(--border-color);
        display: flex;
        /* Override display: none if it was there */
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-nav-active .mobile-menu-toggle .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

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

    .mobile-nav-active .mobile-menu-toggle .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero h1 {
        font-size: clamp(2.5rem, 8vw, 4rem);
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

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

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

    .contact-container {
        padding: 2rem;
    }

    .project-actions {
        gap: 0.5rem;
    }

    .project-actions .btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .btn-google {
        padding: 0.4rem 0.8rem;
        gap: 0.5rem;
    }

    .btn-google .main-text {
        font-size: 0.9rem;
    }

    .btn-google .top-text {
        font-size: 0.6rem;
    }

    /* Disable custom cursor on touch devices */
    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }

    * {
        cursor: auto !important;
    }
}