/* ========== RESET Y BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: #050b14;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========== TIPOGRAFÍA ========== */
.gradient-text {
    background: linear-gradient(135deg, #00d4ff, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .section-header h2 {
        font-size: 3.5rem;
    }
}

/* ========== NAVBAR ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(5, 11, 20, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.logo span {
    color: #00d4ff;
}

.nav-links {
    display: none;
    gap: 2rem;
}

.nav-links a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #00d4ff;
}

.menu-btn {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 1.5rem;
    background: rgba(5, 11, 20, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    gap: 1rem;
}

.mobile-menu a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem;
    text-align: center;
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: #00d4ff;
}

.mobile-menu.hidden {
    display: none;
}

.mobile-menu:not(.hidden) {
    display: flex;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
    .menu-btn {
        display: none;
    }
    .mobile-menu {
        display: none !important;
    }
}

/* ========== HERO ========== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.4;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 1.5rem;
    max-width: 900px;
}

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content h1 span:last-child {
    color: #ffffff;
}

.hero-content p {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto 2rem;
}

@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 4.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-content h1 {
        font-size: 6rem;
    }
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* ========== BOTONES ========== */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #00d4ff, #a855f7);
    color: white;
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ========== SCROLL INDICATOR ========== */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    z-index: 1;
}

.scroll-mouse {
    width: 1.5rem;
    height: 2.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 9999px;
    display: flex;
    justify-content: center;
    padding-top: 0.5rem;
}

.scroll-dot {
    width: 0.25rem;
    height: 0.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 9999px;
    animation: pulse 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ========== PORTAFOLIO ========== */
.portfolio {
    background: linear-gradient(180deg, #050b14, #0a111f);
}

.portfolio-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.portfolio-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.portfolio-card:hover {
    transform: scale(1.02);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.1);
}

.card-image {
    height: 14rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-tags span {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #94a3b8;
}

/* ========== SERVICIOS ========== */
.services-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.service-card {
    padding: 1.5rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.service-card:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(168, 85, 247, 0.05));
    border-color: rgba(0, 212, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.service-card p {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* ========== STACK ========== */
.stack {
    background: linear-gradient(90deg, #050b14, #0a111f, #050b14);
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.tech-item {
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.tech-item:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.1);
}

/* ========== CONTACTO ========== */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.form-row {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: white;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #00d4ff;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #64748b;
}

.contact-form textarea {
    resize: vertical;
    margin: 1rem 0;
}

.form-feedback {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.form-feedback.success {
    color: #4ade80;
}

.form-feedback.error {
    color: #f87171;
}

/* ========== FOOTER ========== */
.footer {
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

/* ========== UTILIDADES ========== */
.hidden {
    display: none !important;
}