/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    --bg-dark: #020503;       
    --card-bg: rgba(10, 25, 15, 0.7);
    --primary: #00ff41;       /* Matrix Green */
    --secondary: #008f11;     /* Deep Emerald */
    --text-main: #ffffff;
    --text-dim: #a5b5a9;      
    --font-head: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at 10% 10%, #06200c 0%, #000 70%);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* =========================================
   2. NAVIGATION
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 8%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(2, 5, 3, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 255, 65, 0.1);
}

.logo { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; letter-spacing: 2px; }
.logo span { color: var(--primary); }

.nav-links { display: flex; gap: 3rem; }
.nav-links a { font-size: 1.1rem; transition: var(--transition); text-transform: uppercase; letter-spacing: 1px; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); text-shadow: 0 0 10px var(--primary); }

/* =========================================
   3. HERO SECTION (Home Page)
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 8% 60px 8%;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
    max-width: 1300px;
    width: 100%;
}

.profile-frame {
    position: relative;
    width: 320px;
    height: 320px;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--bg-dark);
    position: relative;
    z-index: 2;
}

.neon-ring {
    position: absolute;
    top: -12px; left: -12px; right: -12px; bottom: -12px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: 0 0 25px var(--primary), inset 0 0 15px var(--primary);
    animation: pulse 3s infinite ease-in-out;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.04); opacity: 1; }
}

.glitch-title { font-family: var(--font-head); font-size: 4.8rem; margin-bottom: 35px; line-height: 1; letter-spacing: -2px; }
.neon-text { color: var(--primary); text-shadow: 0 0 20px rgba(0, 255, 65, 0.5); }

.hero-description p {
    font-size: 1.3rem;
    line-height: 1.9;
    color: var(--text-dim);
    margin-bottom: 30px;
    max-width: 650px;
}

.hero-btns { display: flex; gap: 25px; }

/* =========================================
   4. ELEGANT ABOUT SECTION
   ========================================= */
.about-main-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

.bio-card {
    padding: 50px;
    border-radius: 20px;
    background: var(--card-bg);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 65, 0.1);
    backdrop-filter: blur(10px);
}

/* Scanning Line Animation */
.bio-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: scanLine 4s linear infinite;
}

@keyframes scanLine {
    0% { top: 0; }
    100% { top: 100%; }
}

.bio-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 25px; }
.bio-card h3 { font-family: var(--font-head); font-size: 1.8rem; margin-bottom: 25px; color: var(--primary); }
.bio-card p { font-size: 1.2rem; line-height: 1.8; color: var(--text-dim); margin-bottom: 20px; }

.education-tag {
    margin-top: 30px;
    padding: 15px;
    background: rgba(0, 255, 65, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--primary);
    font-family: var(--font-head);
    font-size: 0.9rem;
}

.skill-group { margin-bottom: 40px; }
.skill-group h4 { font-family: var(--font-head); letter-spacing: 2px; margin-bottom: 20px; color: var(--secondary); font-size: 0.9rem; text-transform: uppercase; }

.tags { display: flex; flex-wrap: wrap; gap: 12px; }
.tags span {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 255, 65, 0.2);
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: 0.3s;
}

.tags span:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary);
    transform: translateY(-3px);
}

/* =========================================
   5. CERTIFICATION VAULT
   ========================================= */
.cert-section { margin-top: 100px; padding-top: 50px; border-top: 1px solid rgba(0, 255, 65, 0.1); }
.cert-title { font-family: var(--font-head); text-align: center; margin-bottom: 50px; text-transform: uppercase; letter-spacing: 3px; }
.cert-title span { color: var(--primary); }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }

.cert-card {
    display: flex;
    align-items: center;
    padding: 25px;
    border-radius: 15px;
    gap: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative;
}

.cert-card:hover { background: rgba(0, 255, 65, 0.05); border-color: var(--primary); transform: scale(1.02); box-shadow: 0 0 20px rgba(0, 255, 65, 0.1); }
.cert-icon { font-size: 2rem; color: var(--primary); }
.cert-info h4 { font-family: var(--font-head); font-size: 1rem; color: #fff; margin-bottom: 5px; }
.cert-info p { font-size: 0.85rem; color: var(--text-dim); }
.cert-date { font-size: 0.75rem; color: var(--secondary); display: block; margin-top: 5px; }

.verify-btn {
    position: absolute; top: 15px; right: 15px;
    font-size: 0.7rem; color: var(--primary);
    text-transform: uppercase; font-weight: bold;
    opacity: 0.4; transition: 0.3s;
}

.cert-card:hover .verify-btn { opacity: 1; }
.status-verified { color: var(--secondary); opacity: 1; }

/* =========================================
   6. PORTFOLIO GRID
   ========================================= */
.section-padding { padding: 120px 8%; }
.container-header { text-align: center; margin-bottom: 80px; }
.section-title { font-family: var(--font-head); font-size: 3rem; text-transform: uppercase; border-left: 5px solid var(--primary); padding-left: 20px; }
.section-title span { color: var(--primary); text-shadow: 0 0 10px var(--primary); }

.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
.project-card { background: #08120a; border: 1px solid rgba(0, 255, 65, 0.1); border-radius: 15px; overflow: hidden; transition: var(--transition); }
.project-card:hover { transform: translateY(-10px); border-color: var(--primary); box-shadow: 0 10px 30px rgba(0, 255, 65, 0.2); }
.card-img { height: 230px; width: 100%; object-fit: cover; filter: grayscale(40%); transition: 0.4s; }
.project-card:hover .card-img { filter: grayscale(0%); }
.card-info { padding: 30px; }

/* =========================================
   7. BUTTONS
   ========================================= */
.btn { padding: 14px 35px; font-family: var(--font-head); font-weight: 700; text-transform: uppercase; transition: var(--transition); cursor: pointer; display: inline-block; }
.btn-primary { background: var(--primary); color: #000; clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%); }
.btn-primary:hover { box-shadow: 0 0 25px var(--primary); transform: translateY(-3px); }
.btn-secondary { border: 2px solid var(--secondary); color: var(--primary); }
.btn-secondary:hover { background: var(--secondary); color: #fff; box-shadow: 0 0 25px var(--secondary); transform: translateY(-3px); }
.btn-small { font-size: 0.8rem; padding: 10px 20px; border: 1px solid var(--primary); color: var(--primary); text-transform: uppercase; font-family: var(--font-head); transition: 0.3s; }
.btn-small:hover { background: var(--primary); color: #000; }

/* =========================================
   8. CONTACT & SOCIALS
   ========================================= */
/* =========================================
   CONTACT NODES DESIGN
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto 80px auto;
}

.contact-node {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 255, 65, 0.1);
    padding: 40px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 25px;
    transition: var(--transition);
    text-decoration: none;
}

.contact-node:hover:not(.no-link) {
    background: rgba(0, 255, 65, 0.05);
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.1);
}

.node-icon {
    font-size: 2.5rem;
    color: var(--primary);
    text-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

.node-info h3 {
    font-family: var(--font-head);
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: #fff;
}

.node-info p {
    color: var(--text-dim);
    font-size: 1rem;
    margin-bottom: 10px;
}

.node-action {
    font-family: var(--font-head);
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Social Terminal Styling */
.social-terminal {
    max-width: 1100px;
    margin: 0 auto;
    background: #050a06;
    border: 1px solid rgba(0, 255, 65, 0.2);
    padding: 30px;
    border-radius: 10px;
}

.terminal-meta {
    font-family: 'Courier New', monospace;
    color: var(--secondary);
    font-size: 0.8rem;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.1);
    padding-bottom: 10px;
}

.social-links-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.social-link-item {
    font-family: var(--font-head);
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    transition: 0.3s;
}

.social-link-item i {
    color: var(--primary);
}

.social-link-item:hover {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .contact-node { padding: 30px; }
    .social-links-row { gap: 20px; flex-direction: column; align-items: center; }
}
/* =========================================
   9. RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .navbar { padding: 1rem 5%; }
    .hero-container, .about-main-grid { flex-direction: column; grid-template-columns: 1fr; text-align: center; }
    .glitch-title { font-size: 2.8rem; }
    .hero-description p { margin: 0 auto 30px auto; font-size: 1.1rem; }
    .hero-btns { justify-content: center; flex-direction: column; gap: 15px; }
    .profile-frame { margin: 0 auto; width: 260px; height: 260px; }
    .bio-card { padding: 30px; }
    .cert-card { flex-direction: column; text-align: center; }
    .verify-btn { position: static; margin-top: 15px; opacity: 1; }
}
/* --- TERMINAL TRIGGER (Móvil) --- */
.terminal-trigger {
    display: none; /* Oculto en desktop */
    font-family: 'Courier New', monospace;
    background: #000;
    padding: 5px 12px;
    border: 1px solid var(--primary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.terminal-trigger .prompt {
    color: var(--primary);
}

.terminal-trigger .cursor {
    color: var(--text-main);
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* --- RESPONSIVE MENU (Mobile) --- */
@media (max-width: 900px) {
    .terminal-trigger {
        display: block; /* Aparece en móviles */
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%; /* Escondido por defecto */
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(2, 5, 3, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: 0.3s ease-in-out;
        border-top: 1px solid var(--primary);
    }

    /* Cuando el menú está abierto */
    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-family: var(--font-head);
        font-size: 1.5rem;
    }

    /* Estilo tipo 'Input' para los links en móvil */
    .nav-links li::before {
        content: "> ";
        color: var(--primary);
    }
}