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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f1f5f9;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.25rem; }

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    color: var(--gray-light);
    max-width: 600px;
    margin: 0 auto 60px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.5);
}

.btn-outline {
    border: 2px solid var(--gray);
    color: var(--light);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    box-shadow: var(--shadow);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--white);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

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

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

.nav-links .btn {
    color: var(--white);
}

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

.mobile-menu span {
    width: 25px;
    height: 2px;
    background: var(--light);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(14, 165, 233, 0.1) 0%, transparent 50%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    margin-bottom: 24px;
}

.hero-content p {
    color: var(--gray-light);
    font-size: 1.2rem;
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.code-block {
    background: var(--dark-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
}

.code-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 16px;
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }

.code-block pre {
    padding: 24px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-block .keyword { color: #c084fc; }
.code-block .variable { color: #60a5fa; }
.code-block .property { color: #4ade80; }
.code-block .string { color: #fbbf24; }

/* Services Section */
.services {
    padding: 120px 0;
    background: var(--dark-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--dark);
    padding: 32px;
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--white);
}

.service-card h3 {
    margin-bottom: 12px;
    color: var(--white);
}

.service-card p {
    color: var(--gray-light);
}

/* Tech Stack Section */
.tech-stack {
    padding: 120px 0;
}

.tech-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.tech-category {
    background: var(--dark-light);
    padding: 32px;
    border-radius: 16px;
}

.tech-category h3 {
    color: var(--primary-light);
    margin-bottom: 20px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.tech-badge {
    background: var(--dark);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--light);
    border: 1px solid var(--gray);
    transition: all 0.3s ease;
}

.tech-badge:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}

/* Portfolio Section */
.portfolio {
    padding: 120px 0;
    background: var(--dark-light);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.portfolio-card {
    background: var(--dark);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.portfolio-header {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.portfolio-header.convoe {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
}

.portfolio-header.lucky {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.portfolio-header.era {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

.portfolio-header.ppi {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.client-logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.portfolio-content {
    padding: 24px;
}

.portfolio-content h3 {
    color: var(--white);
    margin-bottom: 4px;
}

.portfolio-type {
    color: var(--primary-light);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.portfolio-content > p {
    color: var(--gray-light);
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.portfolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.portfolio-tech span {
    background: var(--dark-light);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--gray-light);
}

/* Contact Section */
.contact {
    padding: 120px 0;
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: 40px 0;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--light);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--primary-light);
}

.contact-link svg {
    color: var(--primary-light);
}

/* Footer */
.footer {
    background: var(--dark-light);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--gray);
}

.footer-brand p {
    color: var(--gray-light);
    margin-top: 10px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--gray-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    padding-top: 30px;
    text-align: center;
}

.footer-bottom p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content p {
        margin: 0 auto 32px;
    }

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

    .hero-visual {
        order: -1;
    }

    .code-block {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--dark);
        flex-direction: column;
        justify-content: center;
        gap: 40px;
        transition: right 0.3s ease;
    }

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

    .nav-links a {
        font-size: 1.5rem;
    }

    .mobile-menu {
        display: flex;
        z-index: 1001;
    }

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

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

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

    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

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