/* RESET */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Fira Code", "Consolas", "Courier New", monospace;
    background:
        radial-gradient(circle at top, rgba(80, 200, 120, 0.08) 0, transparent 55%),
        radial-gradient(circle at bottom, rgba(80, 120, 200, 0.08) 0, #050816 60%);
    color: #d9f5dd;
    min-height: 100vh;
}

/* BARRA SUPERIOR */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(5, 8, 22, 0.97);
    border-bottom: 1px solid #1f3b3b;
    backdrop-filter: blur(8px);
}

.logo {
    font-size: 0.9rem;
    color: #00ff9c;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.nav-links a {
    font-size: 0.85rem;
    text-decoration: none;
    color: #c9f7d1;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.nav-links a:hover {
    color: #ffffff;
    border-color: #00ff9c;
}

/* HERO */
.hero {
    max-width: 1100px;
    margin: 32px auto 16px auto;
    padding: 0 16px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(260px, 1.1fr);
    gap: 16px;
}

.terminal-window {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #1f3b3b;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.7);
}

/* CABECERA TERMINAL */
.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0b1015;
    padding: 8px 12px;
    border-bottom: 1px solid #1f3b3b;
}

.window-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f57;
}

.dot.yellow {
    background: #febc2e;
}

.dot.green {
    background: #28c840;
}

.window-title {
    font-size: 0.8rem;
    color: #8fa3b8;
}

/* CUERPO TERMINAL HERO */
.terminal-body {
    background: #050816;
    padding: 18px 20px 18px 20px;
    position: relative;
    overflow: hidden;
}

/* ligero efecto de líneas */
.terminal-body::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 100% 3px;
    opacity: 0.18;
    pointer-events: none;
}

.line {
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 6px;
}

.comment {
    color: #5c9cff;
}

.prompt {
    color: #00ff9c;
    margin-right: 4px;
}

.key {
    color: #fddb92;
}

.value {
    color: #c9f7d1;
}

/* TYPEWRITER */
#typewriter {
    color: #e8ffe8;
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 1rem;
    background: #00ff9c;
    margin-left: 2px;
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* HERO INFO */
.hero-info {
    position: relative;
    z-index: 1;
    margin-top: 10px;
}

.hero-name h1 {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.role {
    font-size: 0.9rem;
    color: #9ee7b3;
}

.location {
    font-size: 0.8rem;
    color: #8fa3b8;
}

/* STATUS CARDS */
.status-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.status-card {
    background: rgba(8, 15, 35, 0.95);
    border-radius: 8px;
    border: 1px solid #1f3b3b;
    padding: 8px 10px;
    font-size: 0.8rem;
}

.status-label {
    display: block;
    color: #d9f5dd;
}

.status-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #505a7b;
    font-size: 0.7rem;
    color: #b8c3e0;
}

.status-badge.online {
    border-color: #00ff9c;
    color: #00ff9c;
}

.status-badge.in-progress {
    border-color: #fff200;
    color: #fff200;
}

.status-meta {
    display: block;
    margin-top: 4px;
    color: #8fa3b8;
    font-size: 0.75rem;
}

/* BOTONES HERO */
.hero-buttons {
    position: relative;
    z-index: 1;
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.btn-cv {
    background: #050816;
    border-color: #00ff9c;
    color: #c9f7d1;
}

.btn-linkedin {
    background: #0a66c2;
    border-color: #0a66c2;
    color: #ffffff;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.7);
}

/* MÉTRICAS */
.metrics {
    position: relative;
    z-index: 1;
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.metric {
    background: rgba(8, 15, 35, 0.95);
    border-radius: 6px;
    border: 1px solid #1f3b3b;
    padding: 6px 10px;
    font-size: 0.8rem;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.metric-label {
    color: #8fa3b8;
    font-size: 0.75rem;
}

.metric-value {
    font-size: 0.95rem;
    font-weight: bold;
    color: #e8ffe8;
}

.metric-sub {
    font-size: 0.75rem;
    color: #8fa3b8;
}

/* PROFILE CARD CON FOTO */
.profile-card {
    border-radius: 12px;
    padding: 16px;
    background: rgba(5, 8, 22, 0.96);
    border: 1px solid #1f3b3b;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.avatar-wrapper {
    display: flex;
    justify-content: center;
}

.avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #00ff9c;
    box-shadow: 0 0 18px rgba(0, 255, 156, 0.35);
}

.profile-text {
    font-size: 0.9rem;
    color: #d9f5dd;
}

.profile-text .small {
    font-size: 0.8rem;
    color: #9bb0c8;
    margin-top: 6px;
}

/* SECCIONES GENERALES */
.section {
    max-width: 1100px;
    margin: 16px auto;
    padding: 8px 16px 24px 16px;
}

.section-title {
    font-size: 1.1rem;
    color: #9ee7b3;
    margin-bottom: 14px;
}

/* CARDS TIPO TERMINAL */
.card {
    border-radius: 10px;
    padding: 14px 16px;
}

.terminal-card {
    background: rgba(5, 8, 22, 0.95);
    border: 1px solid #1f3b3b;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.5);
    font-size: 0.9rem;
}

/* GRID LAYOUTS */
.grid-2 {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-3 {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* LISTAS */
.list {
    list-style: none;
    margin-top: 6px;
}

.list li {
    margin-bottom: 4px;
    position: relative;
    padding-left: 14px;
}

.list li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: #00ff9c;
    font-size: 0.75rem;
}

/* EXPERIENCIA */
.exp-role {
    font-size: 0.9rem;
    color: #9ee7b3;
    margin-bottom: 2px;
}

.exp-time {
    font-size: 0.8rem;
    color: #8fa3b8;
    margin-bottom: 6px;
}

/* PROYECTOS */
.projects-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.project-card h3 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.tagline {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #9ee7b3;
    opacity: 0.85;
}

/* Contenedor para alinear título y estado */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

/* Quitamos el margen inferior del h3 original porque ahora lo controla el header */
.project-card .project-header h3 {
    margin-bottom: 0;
}

/* Estilo base de la etiqueta */
.project-status {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    /* Evita que el texto se parta */
}

/* Variantes de color (usando tu paleta existente) */
.status-finished {
    color: #00ff9c;
    /* Verde neón */
    border-color: #00ff9c;
    background: rgba(0, 255, 156, 0.1);
}

.status-progress {
    color: #fff200;
    /* Amarillo */
    border-color: #fff200;
    background: rgba(255, 242, 0, 0.1);
}

.status-stopped {
    color: #ff5f57;
    /* Rojo apagado */
    border-color: #ff5f57;
    background: rgba(255, 95, 87, 0.1);
}

/* CONTACTO */
.contact-card {
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.contact-card.encrypted {
    cursor: pointer;
}

.contact-card.encrypted:hover {
    box-shadow: 0 0 25px rgba(0, 255, 156, 0.2);
}

.contact-content {
    transition: filter 0.5s ease, opacity 0.5s ease;
}

.contact-card.encrypted .contact-content {
    filter: blur(6px);
    opacity: 0.4;
    user-select: none;
    pointer-events: none;
}

.decrypt-overlay {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.contact-card.encrypted .decrypt-overlay {
    display: flex;
}

.decrypt-msg {
    background: rgba(5, 8, 22, 0.9);
    border: 1px solid #00ff9c;
    color: #00ff9c;
    padding: 12px 24px;
    font-family: "Fira Code", monospace;
    font-size: 0.9rem;
    letter-spacing: 1px;
    box-shadow: 0 0 20px rgba(0, 255, 156, 0.3);
    animation: blink-border 1.5s infinite alternate;
}

@keyframes blink-border {
    0% {
        border-color: #00ff9c;
        box-shadow: 0 0 20px rgba(0, 255, 156, 0.3);
    }

    100% {
        border-color: #fff200;
        box-shadow: 0 0 10px rgba(255, 242, 0, 0.3);
    }
}

/* FOOTER */
.footer {
    text-align: center;
    padding: 16px;
    font-size: 0.8rem;
    color: #8fa3b8;
    border-top: 1px solid #1f3b3b;
    margin-top: 12px;
}

/* RESPONSIVE */
@media (max-width: 840px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .hero {
        margin-top: 20px;
    }
}