:root {
    /* Paleta de Colores "Tech Engineering" */
    --bg-main: #0b0f19;       
    --bg-secondary: #111827;  
    --primary: #3b82f6;       
    --primary-hover: #2563eb;
    --accent: #06b6d4;        
    --text-main: #f3f4f6;     
    --text-muted: #9ca3af;    
    --border: #1f2937;        
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Utilidades */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-gradient {
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* AUMENTADO: Padding para que las secciones no estén pegadas */
.section {
    padding: 100px 0; 
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 4rem;
    text-align: center;
    font-weight: 800;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-main);
    text-decoration: none;
}

.logo span { color: var(--primary); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.btn-contact {
    color: var(--primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: inline-block;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

/* Botones */
.btn-primary, .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: var(--font-main);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-outline {
    border: 1px solid var(--border);
    color: var(--text-main);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Code Block */
.code-block {
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.code-header {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #ef4444; }
.yellow { background: #f59e0b; }
.green { background: #10b981; }

pre {
    color: #e2e8f0;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
}

.keyword { color: #c084fc; }
.class-name { color: #facc15; }
.string { color: #4ade80; }
.number { color: #f472b6; }

/* Stack Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.icon-accent {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.tags {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags span {
    font-size: 0.75rem;
    background: rgba(255,255,255,0.05);
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--text-muted);
}

/* Proyecto Section */
.bg-darker { background: #080b12; }

.project-showcase {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 4rem; /* AUMENTADO: Espacio entre foto y texto */
    overflow: hidden; 
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.project-showcase:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.browser-header {
    background: #1e293b;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}

.browser-address {
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 4px 15px;
    border-radius: 4px;
    margin-left: 15px;
    font-family: monospace;
    width: 100%;
    max-width: 300px;
}

.project-showcase img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.project-showcase:hover img { opacity: 1; }

.project-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: start;
}

.features-list {
    list-style: none;
    margin: 2rem 0;
}

.features-list li {
    display: flex;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.features-list i {
    color: var(--accent);
    font-size: 1.5rem;
    margin-top: 2px;
}

.project-tech {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.tech-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.tech-item:last-child { border-bottom: none; }
.tech-label { color: var(--text-muted); }
.tech-value { color: var(--primary); font-weight: 600; }

/* === SECCIÓN DE CONTACTO Y FORMULARIO (NUEVO) === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.info-items {
    margin: 2rem 0;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.info-item i {
    color: var(--primary);
    font-size: 1.5rem;
}

.social-links-row {
    display: flex;
    gap: 15px;
}

.social-btn {
    width: 45px;
    height: 45px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* Estilos del Formulario */
.contact-form-wrapper {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.full-width {
    width: 100%;
}

/* Footer Simple */
footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    margin-top: 0; /* Ya no necesitamos margen grande porque hay padding en secciones */
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-grid, .project-layout {
        grid-template-columns: 1fr;
    }
    
    .hero {
        text-align: center;
        padding-top: 120px;
    }

    .hero-text h1 { font-size: 2.5rem; }
    
    .cta-group { justify-content: center; }

    .code-block { display: none; }
    
    .nav-links { display: none; }
}