/* =============================================================
   PABLO PÉREZ GARCÍA — PORTFOLIO
   Blue Team · Analista SOC · Forense Digital
   styles.css — v3.0
   ============================================================= */

/* ── RESET ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── VARIABLES ── */
:root {
    --bg:          #070d0b;
    --bg-card:     #0c1510;
    --bg-card-2:   #111a14;

    --border:      rgba(0, 230, 118, 0.10);
    --border-md:   rgba(0, 230, 118, 0.22);

    --green:       #00e676;
    --green-glow:  rgba(0, 230, 118, 0.11);
    --blue:        #40c4ff;
    --amber:       #ffd740;
    --red:         #ff5252;

    --text:        #b2d4ba;
    --text-dim:    #5c7a64;
    --text-bright: #e0f2e9;

    --mono: 'JetBrains Mono', 'Courier New', monospace;
    --sans: 'Outfit', system-ui, sans-serif;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

/* CRT scanlines overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9000;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0, 230, 118, 0.012) 3px,
        rgba(0, 230, 118, 0.012) 4px
    );
}

/* Background grid */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(0, 230, 118, 0.024) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 230, 118, 0.024) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* ── ANIMATIONS ── */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 6px var(--green); }
    50%       { box-shadow: 0 0 14px var(--green); }
}

/* ── NAVIGATION (Escritorio) ── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 500;
    background: rgba(7, 13, 11, 0.90);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 54px;
}

.nav-logo {
    font-family: var(--mono);
    font-size: .82rem;
    color: var(--green);
    text-decoration: none;
}
.nav-logo span { color: var(--text-dim); }

.nav-links {
    display: flex;
    gap: 1.75rem;
    list-style: none;
}
.nav-links a {
    font-family: var(--mono);
    font-size: .76rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: color .2s;
}
.nav-links a:hover { color: var(--green); }

.menu-btn { display: none; } /* Oculto en escritorio */

/* ── LAYOUT ── */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

section { padding: 5.5rem 0; }

.divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-md), transparent);
}

.section-label {
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--green);
    letter-spacing: .14em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .5rem;
}
.section-label::before { content: '>'; color: var(--text-dim); }

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: -.02em;
    margin-bottom: 2.5rem;
}

/* ── BUTTONS ── */
.btn-p {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.5rem;
    background: var(--green);
    color: var(--bg);
    font-family: var(--mono);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s;
    border: none;
    cursor: pointer;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.btn-p:hover        { background: #69f0ae; box-shadow: 0 0 24px rgba(0, 230, 118, .35); transform: translateY(-1px); }
.btn-p:disabled     { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-s {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.4rem;
    background: transparent;
    color: var(--green);
    font-family: var(--mono);
    font-size: .82rem;
    text-decoration: none;
    border: 1px solid var(--border-md);
    transition: all .2s;
}
.btn-s:hover { background: var(--green-glow); border-color: var(--green); }

/* ── HERO ── */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 54px;
}

.hero-content { max-width: 680px; }

.hero-prompt {
    font-family: var(--mono);
    font-size: .82rem;
    color: var(--text-dim);
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    min-height: 1.5rem;
}

.cur {
    display: inline-block;
    width: 8px;
    height: 1.1em;
    background: var(--green);
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

.hero-name {
    font-size: clamp(2.8rem, 7vw, 5rem);
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1.05;
    letter-spacing: -.035em;
    margin-bottom: .6rem;
}
.hero-name em { color: var(--green); font-style: normal; }

.hero-role {
    font-family: var(--mono);
    font-size: clamp(.82rem, 1.8vw, 1rem);
    color: var(--blue);
    margin-bottom: 1.6rem;
}

.hero-desc {
    font-size: 1.02rem;
    color: var(--text-dim);
    max-width: 540px;
    line-height: 1.85;
    margin-bottom: 2.5rem;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-available {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-top: 3rem;
    font-family: var(--mono);
    font-size: .75rem;
    color: var(--text-dim);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
    animation: pulse 2s ease-in-out infinite;
}

/* ── TERMINAL BOX ── */
.terminal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.terminal-bar {
    background: #0a1610;
    border-bottom: 1px solid var(--border);
    padding: .55rem 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--text-dim);
}

.t-dots { display: flex; gap: .35rem; }
.tdot   { width: 10px; height: 10px; border-radius: 50%; }
.td-r   { background: #ff5f56; }
.td-y   { background: #febc2e; }
.td-g   { background: #28c840; }

.terminal-body {
    padding: 1.5rem 1.75rem;
    font-family: var(--mono);
    font-size: .84rem;
    line-height: 2;
}

.tp { color: var(--green); }
.tc { color: var(--text-bright); }
.th { color: var(--blue); }
.tk { color: var(--amber); font-weight: 600; }

.to {
    color: var(--text);
    font-family: var(--sans);
    font-size: .94rem;
    line-height: 1.8;
    margin: .4rem 0 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border);
}

/* ── SKILLS ── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 1.4rem;
    transition: all .3s;
}
.skill-card:hover {
    border-color: var(--border-md);
    background: var(--bg-card-2);
    box-shadow: 0 0 24px var(--green-glow);
}

.sc-head {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: 1rem;
}

.sc-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-glow);
    border: 1px solid var(--border-md);
    border-radius: 3px;
    font-size: .95rem;
}

.skill-card h3 {
    font-family: var(--mono);
    font-size: .82rem;
    color: var(--text-bright);
}

.sl { list-style: none; }
.sl li {
    font-size: .85rem;
    color: var(--text-dim);
    padding: .28rem 0;
    border-bottom: 1px solid rgba(0, 230, 118, .04);
    display: flex;
    align-items: flex-start;
    gap: .4rem;
}
.sl li::before {
    content: '▸';
    color: var(--green);
    font-size: .65rem;
    margin-top: .3rem;
    flex-shrink: 0;
}

/* ── PROJECTS ── */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.proj-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
    transition: border-color .3s, box-shadow .3s;
}
.proj-card:hover         { border-color: var(--border-md); }
.proj-card.featured      { border-color: rgba(0, 230, 118, .2); }
.proj-card.featured:hover { box-shadow: 0 0 32px var(--green-glow); }

.proj-header {
    padding: 1.4rem 1.75rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    user-select: none;
}

.proj-head-left { flex: 1; }

.badges {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    margin-bottom: .45rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: .15rem .55rem;
    font-family: var(--mono);
    font-size: .65rem;
    border-radius: 2px;
}
.bg { background: rgba(0, 230, 118, .1); color: var(--green); border: 1px solid rgba(0, 230, 118, .18); }
.bb { background: rgba(64, 196, 255, .1); color: var(--blue);  border: 1px solid rgba(64, 196, 255, .18); }
.ba { background: rgba(255, 215, 64, .1); color: var(--amber); border: 1px solid rgba(255, 215, 64, .18); }

.proj-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: .2rem;
}

.proj-date {
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--text-dim);
}

.proj-toggle {
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--green);
    flex-shrink: 0;
    white-space: nowrap;
}

.proj-body {
    padding: 0 1.75rem 1.5rem;
    border-top: 1px solid var(--border);
    display: none;
}
.proj-body.open { display: block; }

.proj-body p {
    color: var(--text-dim);
    font-size: .92rem;
    margin: 1rem 0;
    line-height: 1.8;
}

.proj-body h4 {
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 1.2rem 0 .5rem;
}

.proj-body ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.proj-body ul li {
    font-size: .88rem;
    color: var(--text-dim);
    padding-left: 1rem;
    position: relative;
}
.proj-body ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--green);
    font-size: .65rem;
    top: .3rem;
}
.proj-body ul li strong { color: var(--text); }

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .75rem;
}

.tag {
    padding: .18rem .55rem;
    font-family: var(--mono);
    font-size: .7rem;
    color: var(--text-dim);
    background: rgba(200, 230, 201, .04);
    border: 1px solid rgba(200, 230, 201, .08);
    border-radius: 2px;
}

.proj-links {
    display: flex;
    gap: .7rem;
    flex-wrap: wrap;
    margin-top: 1.2rem;
}

.proj-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem 1rem;
    font-family: var(--mono);
    font-size: .76rem;
    color: var(--green);
    text-decoration: none;
    border: 1px solid var(--border-md);
    transition: all .2s;
}
.proj-link:hover { background: var(--green-glow); border-color: var(--green); }

/* ── LEARNING PATH ── */
.lp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.2rem;
}

.lp-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 1.4rem;
    transition: border-color .3s;
}
.lp-card:hover { border-color: var(--border-md); }

.lp-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .3rem;
}

.lp-title {
    font-size: .92rem;
    font-weight: 600;
    color: var(--text-bright);
}

.lp-org {
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--text-dim);
    margin-bottom: .9rem;
}

.lp-status {
    font-family: var(--mono);
    font-size: .66rem;
    padding: .12rem .45rem;
    border-radius: 2px;
    white-space: nowrap;
    flex-shrink: 0;
}
.s-done   { background: rgba(64,  196, 255, .1); color: var(--blue);   border: 1px solid rgba(64,  196, 255, .2); }
.s-active { background: rgba(0,   230, 118, .1); color: var(--green);  border: 1px solid rgba(0,   230, 118, .2); }
.s-next   { background: rgba(255, 215,  64, .1); color: var(--amber);  border: 1px solid rgba(255, 215,  64, .2); }

.bar {
    height: 3px;
    background: rgba(200, 230, 201, .07);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: .35rem;
}

.fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1.2s cubic-bezier(.22, 1, .36, 1);
}
.f-g { background: linear-gradient(90deg, var(--green), #69f0ae); }
.f-b { background: linear-gradient(90deg, var(--blue),  #80d8ff); }
.f-a { background: linear-gradient(90deg, var(--amber),  #ffe57f); }

.bar-label {
    font-family: var(--mono);
    font-size: .68rem;
    color: var(--text-dim);
}

/* ── EXPERIENCE TIMELINE ── */
.timeline {
    position: relative;
    padding-left: 2rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--green), transparent);
}

.tl-item {
    position: relative;
    margin-bottom: 2.5rem;
}
.tl-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: .4rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--green);
    box-shadow: 0 0 7px var(--green);
}
.tl-item.dim::before {
    border-color: var(--text-dim);
    box-shadow: none;
}

.tl-period { font-family: var(--mono); font-size: .72rem; color: var(--text-dim); margin-bottom: .25rem; }
.tl-role   { font-size: .98rem; font-weight: 600; color: var(--text-bright); margin-bottom: .15rem; }
.tl-co     { font-family: var(--mono); font-size: .8rem; color: var(--green); margin-bottom: .65rem; }
.tl-desc   { font-size: .88rem; color: var(--text-dim); line-height: 1.75; }
.tl-tags   { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .65rem; }

/* ── CERTIFICATIONS ── */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1rem;
}

.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 1.1rem 1.4rem;
    display: flex;
    align-items: center;
    gap: .9rem;
    text-decoration: none;
    transition: all .25s;
}
.cert-card:hover {
    border-color: var(--border-md);
    background: var(--bg-card-2);
    transform: translateX(4px);
}

.cert-ico {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-glow);
    border: 1px solid var(--border-md);
    border-radius: 3px;
    font-size: 1rem;
    flex-shrink: 0;
}

.cert-info  { flex: 1; }
.cert-name  { font-size: .86rem; font-weight: 600; color: var(--text-bright); margin-bottom: .12rem; }
.cert-org   { font-family: var(--mono); font-size: .7rem; color: var(--text-dim); }
.cert-arr   { font-family: var(--mono); font-size: .78rem; color: var(--green); }

/* ── CONTACT ── */
#contacto {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info p {
    color: var(--text-dim);
    font-size: .94rem;
    line-height: 1.85;
    margin-top: 1rem;
}
.contact-info strong { color: var(--green); }

.contact-direct {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-top: 1.75rem;
}

.cl {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1rem;
    font-family: var(--mono);
    font-size: .78rem;
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--border);
    transition: all .2s;
    width: fit-content;
}
.cl:hover { border-color: var(--green); color: var(--green); background: var(--green-glow); }

/* ── CONTACT FORM ── */
.contact-form-wrap {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 2rem;
}

.form-title {
    font-family: var(--mono);
    font-size: .78rem;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group { margin-bottom: 1.2rem; }

.form-group label {
    display: block;
    font-family: var(--mono);
    font-size: .7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: .45rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: rgba(0, 230, 118, .04);
    border: 1px solid var(--border);
    color: var(--text-bright);
    font-family: var(--sans);
    font-size: .9rem;
    padding: .62rem .9rem;
    border-radius: 2px;
    transition: border-color .2s, background .2s;
    outline: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--green);
    background: rgba(0, 230, 118, .06);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-dim);
    opacity: .6;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.form-group select option {
    background: #0c1510;
    color: var(--text-bright);
}

#form-feedback {
    margin-top: .85rem;
    font-family: var(--mono);
    font-size: .78rem;
    min-height: 1.4rem;
}
.fb-ok  { color: var(--green); }
.fb-err { color: var(--red); }

/* ── FOOTER ── */
footer {
    padding: 2rem;
    text-align: center;
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.footer-sub {
    margin-top: .3rem;
    font-size: .65rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    /* Nav compacto en móvil: ocultamos el menú de anclas y la hamburguesa,
       pero MANTENEMOS visibles el selector de idioma y el botón de portada */
    .nav-links   { display: none; }
    .menu-btn    { display: none; }
    .nav-inner   { height: 50px; }
    .lang-switch { margin-left: auto !important; }
    .nav-home    { margin-left: .6rem !important; }

    /* Aire para que el hero no quede pegado a la barra fija */
    #hero { 
        padding-top: 4rem; 
        min-height: 100vh;
    }

    footer { 
        padding-bottom: 2rem; 
    }

    section          { padding: 3.5rem 0; }
    .hero-ctas       { flex-direction: column; align-items: flex-start; }
    .contact-grid    { grid-template-columns: 1fr; gap: 2.5rem; }
    .form-row        { grid-template-columns: 1fr; }
    .proj-header     { flex-direction: column; gap: .4rem; }
    .terminal-body   { font-size: .78rem; padding: 1rem 1.1rem; }
}


/* ── LANG SWITCH (selector de idioma) ── */
.lang-switch { display:flex; align-items:center; gap:.4rem; font-family:var(--mono); font-size:.76rem; }
.lang-btn { background:none; border:none; cursor:pointer; color:var(--text-dim); font-family:var(--mono); font-size:.76rem; transition:color .2s; padding:0; }
.lang-btn:hover { color:var(--text-bright); }
.lang-btn.active { color:var(--green); font-weight:700; }
.lang-sep { color:var(--text-dim); opacity:.5; }
