html {
    scroll-behavior: smooth;
}

section {
    scroll-margin-top: 120px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0f172a;
    color: #fff;
    font-family: 'Poppins', sans-serif;
}

.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(20,20,20,0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    transition: 0.4s;
    z-index: 999;
}

.nav-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-nav {
    padding: 10px 22px;
    border-radius: 10px;
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6, #0ea5e9);
    background-size: 200% 200%;
    transition: 0.4s;
    position: relative;
    overflow: visible;
}

.btn-nav::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,0.4),
        transparent
    );
    transition: 0.6s;
}

.btn-nav:hover::before {
    left: 100%;
}

.btn-nav:active {
    transform: scale(0.96);
}

.navbar.scrolled {
    background: rgba(20,20,20,0.6);
    backdrop-filter: blur(16px);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    position: relative;
    text-decoration: none;
    color: #fff;
}

.nav-links a::after {
    content: "";
    width: 0;
    height: 2px;
    background: #3b82f6;
    position: absolute;
    bottom: -4px;
    left: 0;
    transition: 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    width: 34px;
    height: 28px;
    display: none;
    cursor: pointer;
    position: relative;
}

.menu-toggle span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: 0.25s ease;
}

.menu-toggle span:nth-child(1) {top: 2px; }
.menu-toggle span:nth-child(2) {top: 12px; }
.menu-toggle span:nth-child(3) {top: 22px; }

.menu-toggle.open span:nth-child(1) {
    top: 12px;
    transform: rotate(45deg); 
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0; 
}

.menu-toggle.open span:nth-child(3) {
    top: 12px;
    transform: rotate(-45deg); 
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.hero {
    min-height: 100vh;
    height: auto;
    display: flex;
    align-items: center;
    padding-top: 140px;
}

.hero .container {
    display: grid;
    grid-template-columns: 0.85fr 1fr;
    max-width: 1500px;
    width: 100%;
    align-items: center;
}

.hero-text {
    max-width: 600px;
}

.hero-text h1 {
    font-size: 48px;
    line-height: 1.2;
}

.hero-text p {
    margin: 20px 0;
    color: #94a3b8;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6, #0ea5e9);
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    transition: 0.3s;
}

.btn:hover {
    transform: scale(1.05);
}

.code-panel {
    background: #0b1220;
    border-radius: 18px;
    overflow: hidden;
    justify-self: end;
    margin-right: 10px;
    max-width: 700px;
    width: 100%;
    border: 1px solid rgba(59,130,246,0.15);;
    box-shadow: 
    0 40px 100px rgba(0,0,0,0.7),
    0 0 40px rgba(37,99,235,0.15);
    transform: perspective(1000px) rotateY(-6deg);
    transition: 0.4s ease;
}

.code-panel:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #111827;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.file-name {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

.dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #facc15; }
.dot-green { background: #22c55e; }

.code-content {
    margin: 0;
    white-space: pre;
    tab-size: 2;
    padding-left: 0;
    padding: 20px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    background: #0b1220;
    color: #e2e8f0;
    overflow-x: auto;
}

.blue { color: #60a5fa; }
.green { color: #34d399; }
.pink { color: #f472b6; }
.white { color: #e2e8f0; }
.gray { color: rgba(255,255,255,0.45); }

.services {
    padding: 100px 0;
    text-align: center;
}

.services h2 {
    font-size: 36px;
    margin-bottom: 60px;
}

.cards {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.card {
    background: #020617;
    padding: 30px;
    border-radius: 12px;
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-10px);
}

.card h3 {
    margin-bottom: 15px;
}

.benefits {
    padding: 100px 0;
    background: #020617;
    text-align: center;
}

.benefits h2 {
    font-size: 36px;
    margin-bottom: 60px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.benefit {
    background: #111827;
    padding: 30px;
    border-radius: 12px;
    transition: 0.3s;
}

.benefit:hover {
    transform: translateY(-10px);
}

.portfolio {
    padding: 100px 0;
    text-align: center;
}

.portfolio h2 {
    font-size: 36px;
    margin-bottom: 60px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project {
    background: #020617;
    padding: 20px;
    border-radius: 12px;
    transition: 0.3s;
}

.project img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

.project:hover {
    transform: scale(1.03);
}

.about {
    padding: 100px 0;
}

.about-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.about-text {
    max-width: 600px;
}

.about-text p {
    margin: 20px 0;
    color: #94a3b8;
}

.about-image img {
    max-width: 400px;
    border-radius: 12px;
}

.cta {
    padding: 100px 0;
    text-align: center;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6, #0ea5e9);
}

.cta h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.cta p {
    margin-bottom: 30px;
}

.btn-cta {
    display: inline-block;
    background: #111827;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    transition: 0.3s;
}

.btn-cta:hover {
    transform: scale(1.05);
}

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 32px;
    padding: 15px 18px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    z-index: 999;
    transition: 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.contact-page {
    padding-top: 140px;
}

.contact {
    padding: 100px 0;
    text-align: center;
}

.contact-form {
    margin: 40px auto 0;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-form input,
.contact-form textarea {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: #fff;
    outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255,255,255,0.55);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.alert {
    max-width: 600px;
    margin: 20px auto 0;
    padding: 14px 16px;
    border-radius: 12px;
    text-align: left;
    font-weight: 500;
}

.alert-success {
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.25);
}

.alert-error {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.25);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.error-message {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #ef4444;
    opacity: 0;
    transition: 0.2s;
}

.form-group.error input,
.form-group.error textarea {
    border: 1px solid #ef4444;
}

.form-group.error .error-message {
    opacity: 1;
}

/* MOBILE */

@media (max-width: 768px) {

    .menu-toggle {
        display: block;
    }

    .navbar {
        z-index: 1200;
    }

    .nav-links {
        position: fixed;
        top: 100px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 340px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 18px;
        padding: 24px 20px;
        border-radius: 18px;
        background: linear-gradient(180deg, #1f2937, #111827);
        box-shadow: 0 25px 80px rgba(0,0,0,0.6);
        opacity: 0;
        pointer-events: none;
        transition: 0.25s ease;
        z-index: 1300;
    }

    .nav-links.active {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        pointer-events: auto;
    }

    .nav-links a {
        display: inline-block;
        width: 100%;
        padding: 10px 12px;
        border-radius: 12px;
        color: #fff;
        text-decoration: none;
    }

    .nav-links a:hover {
        background: #1f2937;
        transform: translateY(-2px);
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .btn-nav {
        width: 100%;
        text-align: center;
        padding: 12px 18px;
        border-radius: 12px;
    }

    .menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        opacity: 0;
        pointer-events: none;
        transition: 0.25s;
        z-index: 1100;
    }

    .menu-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    body.menu-open {
        overflow: hidden;
    }

    .hero .container {
        display: flex;
        flex-direction: column;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 32px;
    }

    .code-panel {
        display: none;
    }

    .cards {
        flex-direction: column;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-image {
        max-width: 100%;
    }

}