/* 1. VARIABLES UNIFICADAS - Estética Industrial/Futurista */
:root {
    --primary: #bc13fe;
    /* Morado Eléctrico */
    --secondary: #00f2ff;
    /* Cian Neon */
    --bg-deep: #050505;
    --bg-surface: rgba(20, 20, 20, 0.8);
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --text-high: #ffffff;
    --text-low: #888888;
    --font-header: 'Syncopate', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
}

/* 2. CONFIGURACIÓN BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-deep);
}

body {
    font-family: var(--font-body);
    color: var(--text-high);
    overflow-x: hidden;
    background: radial-gradient(circle at 50% 50%, #150824 0%, #050505 100%);
}

/* Textura de grano para look cinematográfico */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.05;
    pointer-events: none;
    z-index: 9999;
}

/* 3. NAVEGACIÓN UNIFICADA */
.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 8%;
    background: rgba(5, 5, 5, 0.5);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.logo {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 3px;
}

.logo .dust {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-low);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--secondary);
    text-shadow: 0 0 10px var(--secondary);
}

.btn-cta {
    border: 1px solid var(--primary);
    padding: 10px 20px;
    border-radius: 2px;
    color: var(--primary) !important;
}

/* 4. HERO SECTION - PROFUNDIDAD Z */
header {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    perspective: 2000px;
}

.hero-content {
    transform-style: preserve-3d;
    z-index: 2;
    padding: 8vw;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    text-align: center;
}

.hero-actions {
    margin-top: 30px;
    display: flex;
    gap: 20px;
    justify-content: center;
    font-size: 2vw;
}

h1 {
    font-family: var(--font-header);
    font-size: clamp(2.5rem, 10vw, 5rem);
    line-height: 1;
    margin: 20px 0;
}

.highlight {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(188, 19, 254, 0.3));
}

.tag-tech {
    font-size: 0.7rem;
    letter-spacing: 4px;
    color: var(--secondary);
    border-left: 3px solid var(--secondary);
    padding-left: 10px;
}

/* Orbes flotantes de fondo */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 1;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(188, 19, 254, 0.15);
    top: 10%;
    left: 10%;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(0, 242, 255, 0.1);
    bottom: 10%;
    right: 10%;
}

/* 5. GRID 3D UNIFICADO */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10vh 5%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

.section-title {
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.counter {
    font-family: var(--font-header);
    font-size: 0.8rem;
    color: var(--primary);
}

.grid-3d {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.tarjeta-3d {
    perspective: 1000px;
    height: 450px;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

.card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    backface-visibility: hidden;
    overflow: hidden;
}

.img-wrapper {
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transform: translateZ(20px);
}

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

.card-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 4px;
    letter-spacing: 1px;
}

.card-body {
    padding: 20px 5px;
    transform: translateZ(40px);
}

.card-body h3 {
    font-family: var(--font-header);
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--secondary);
}

.card-body p {
    font-size: 0.9rem;
    color: var(--text-low);
}

/* 6. TECH STACK UNIFICADO */
.skills-unified {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.skill-group h4 {
    font-family: var(--font-header);
    margin-bottom: 25px;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.skill-bar {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 12px 20px;
    margin-bottom: 15px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.skill-bar span {
    font-weight: 700;
    font-size: 0.8rem;
}

/* 7. TERMINAL DE CONTACTO */
.contact-terminal {
    background: #000;
    border: 1px solid var(--primary);
    border-radius: 8px;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(188, 19, 254, 0.2);
}

.terminal-header {
    background: #1a1a1a;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #333;
}

.terminal-title {
    font-family: monospace;
    font-size: 0.7rem;
    color: #666;
    margin-left: 10px;
}

.terminal-body {
    padding: 40px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

input,
textarea {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid #222;
    padding: 15px;
    color: var(--secondary);
    font-family: monospace;
    margin-bottom: 20px;
}

.btn-send {
    background: transparent;
    border: 1px solid var(--secondary);
    color: var(--secondary);
    padding: 15px 30px;
    cursor: pointer;
    font-family: var(--font-header);
    font-size: 0.8rem;
    transition: 0.3s;
}

.btn-send:hover {
    background: var(--secondary);
    color: #000;
    box-shadow: 0 0 20px var(--secondary);
}

/* 8. ANIMACIONES Y RESPONSIVE */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s ease-out;
}

@media (max-width: 768px) {

    .nav-links,
    .orb {
        display: none;
    }

    .skills-unified {
        grid-template-columns: 1fr;
    }

    .input-row {
        grid-template-columns: 1fr;
    }

    header {
        text-align: center;
    }
}

.contenedor2 {
    width: 90vw;
    height: auto;
    display: flex;
    gap: 3vh;
    flex-direction: column;
    justify-content: Justify;
    align-items: center;
    border: 1px solid var(--border);
    padding: 5%;
    font-size: 2vw;
    border-radius: 12px;
    background: linear-gradient(45deg, rgba(188, 19, 254, 0.1), rgba(0, 242, 255, 0.05));
}

@media screen and (max-width: 600px) {
    .contenedor2 {
        font-size: 5vw;
    }
}