@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,400;1,500;1,600&display=swap');

.container {
    max-width: 1200px; /* tamaño ideal */
    margin: 0 auto;    /* centra todo */
    padding: 0 2rem;   /* aire lateral */
}

.header {
    position: sticky;
    top: 0;
    z-index: 1500;
    background: var(--bg);
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(6px); /* efecto moderno */
    border-bottom: 1px solid rgba(0,0,0,0.1);
}
.dark-mode .header {
    background: #1a1a1a;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ============================
   PALETA DE COLORES
============================ */
:root {
    --bg: #ffffff;
    --text: #1A1A1A;
    --accent: #A23E3E;      /* color del buso */
    --accent-dark: #4A2E2E;
    --soft: #E8DCC8;        /* beige */
}

/* ============================
   MODO OSCURO
============================ */
.dark-mode {
    --bg: #1A1A1A;
    --text: #ffffff;
    --accent: #E8DCC8;
    --accent-dark: #A23E3E;
    --soft: #3A2A2A;
}

/* ============================
   GLOBAL
============================ */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background .3s, color .3s;
}

h1, h3 {
    margin: 0;
    
}

h2 {
    font-style: italic; /* ← cursiva */
   
}
.hero-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    margin-top: .8rem;
    color: var(--accent);
    font-weight: 600;
    font-style: italic;
}

    

/* ============================
   BOTÓN MODO OSCURO
============================ */
.dark-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem; /* ← ahora se ve siempre */
    padding: .6rem 1rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 2000;
}
.dark-toggle:hover {
    background: var(--accent-dark);
}
.dark-mode .skill-card {
    background: #2a2a2a; /* gris oscuro elegante */
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.dark-mode .skill-card span {
    color: white;
}
.btn-primary {
    background: var(--accent);
    color: white;
    padding: .9rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
}

.btn-primary:hover {
    background: var(--accent-dark);
}

.btn-secondary {
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: .9rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
}

.btn-secondary:hover {
    background: var(--accent);
    color: white;
}

/* MODO OSCURO */
.dark-mode .btn-secondary {
    border-color: var(--accent);
    color: var(--accent);
}

.dark-mode .btn-secondary:hover {
    background: var(--accent);
    color: white;
}

.dark-mode .btn-primary {
    background: var(--accent-dark);
    color: white;
}

.dark-mode .btn-primary:hover {
    background: var(--accent);
}
.dark-mode .hero-title,
.dark-mode .hero-name,
.dark-mode .hero-desc {
    color: white;
}



/* ============================
   HEADER
============================ */
.header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar a {
    margin-left: 1rem;
    text-decoration: none;
    color: var(--text);
    font-weight: bold;
}

/* ============================
   HERO CON FONDO DIVIDIDO
============================ */
.hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr; /* TEXTO | FOTO */
    gap: 2rem;
    padding: 4rem 3rem;
    align-items: center;
    position: relative;

    background: linear-gradient(
        to right,
        var(--soft) 0%,
        var(--soft) 78%,
        var(--bg) 78%,
        var(--bg) 100%
    );
}


/* LÍNEA VERTICAL */
.hero::before {
    content: "";
    position: absolute;
    left: 70%;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-dark);
    opacity: 0.25;
    z-index: 0;
}


/* TEXTO IZQUIERDA */
.hero-title {
    font-size: 2rem;
    font-weight: 500;
    color: var(--accent-dark);
    line-height: 1.2;
}

.hero-name {
    font-size: 1.9rem;
    margin-top: .8rem;
    color: var(--accent);
    font-weight: 600;
    font-style: italic; /* ← cursiva */
}

/* FOTO SIN MARCO NI FONDO */
.photo-card {
    padding: 0;
    background: transparent;
    box-shadow: none;
    width: 190px;
    height: 300px;
    margin: 0 auto; /* centrada y separada del texto */
    z-index: 2;
}
.photo-card img {
    width: 100%;
    height: 100%;
    object-position: top;
    object-fit: cover;
}

/* FOTO POR DELANTE DE LA LÍNEA */
.photo-card {
    position: relative; /* necesario para que z-index funcione */
    z-index: 3;         /* la foto queda al frente */
}

/* LÍNEA DETRÁS DE LA FOTO */
.hero::before {
    z-index: 1;         /* la línea queda detrás */
}


.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}



/* STACK */
.stack-title {
    text-align: center;
    margin-top: 4rem;
    letter-spacing: 1px;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: var(--accent-dark);
    font-weight: 700;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
}

.skill-card {
    background: white;
    padding: 1.3rem;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform .2s ease;
}

.skill-card:hover {
    transform: translateY(-6px);
}

.skill-card img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.skill-card span {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}
.hero-buttons {
    margin-top: 2.5rem; /* antes era 1.5rem */
    display: flex;
    gap: 1.2rem; /* separación real entre botones */
}


/* ============================
   SECCIONES GENERALES
============================ */
.section {
    padding: 4rem 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--accent-dark);
}

/* ============================
   SOBRE MÍ
============================ */
.about-card {
    max-width: 800px;
    margin: auto;
    padding: 2rem;
    background: var(--soft);
    border-radius: 12px;
}
.about-actions {
    margin-top: 2rem;
    text-align: center;
}

.about-actions .btn-primary {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ============================
   PROYECTOS
============================ */
/* ============================
   PROYECTOS — GRID MODERNO
============================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* CARD */
.project-card {
    background: var(--bg);
    padding: 2rem;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 260px; /* ← todas las tarjetas tendrán la misma altura */
    transition: transform .2s ease, box-shadow .2s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}

/* TITULO */
.project-card h3 {
    font-size: 1.3rem;
    color: var(--accent-dark);
    margin-bottom: .8rem;
}

/* DESCRIPCIÓN */
.project-card p {
    flex-grow: 1;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* BOTONES */
.project-buttons {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.project-buttons .btn-primary,
.project-buttons .btn-secondary {
    flex: 1; /* ← ambos botones del mismo tamaño */
    text-align: center;
}

/* MODO OSCURO */
.dark-mode .project-card {
    background: #2a2a2a;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.dark-mode .project-card h3 {
    color: var(--accent);
}

.dark-mode .project-card p {
    color: #eaeaea;
}


/* ============================
   FOOTER
============================ */
.footer {
    text-align: center;
    padding: 2rem;
    background: var(--soft);
    margin-top: 3rem;
}

.footer a {
    color: var(--accent-dark);
    font-weight: bold;
}


@media (max-width: 480px) {

    .hero {
        grid-template-columns: 1fr 1fr !important; /* sigue siendo TEXTO | FOTO */
        padding: 2rem 1rem !important;
        gap: 1rem !important;      
     }

    .hero::before {
        left: 87%;
    }

    .photo-card {
        width: 170px;
        height: 260px;
    }


    .photo-card img {
        width: 100%;
        height: 100%;
        object-position: top;
        object-fit: cover;
    }

    /* FOTO POR DELANTE DE LA LÍNEA */
    .photo-card {
        position: relative; /* necesario para que z-index funcione */
        z-index: 3;         /* la foto queda al frente */
    }

    /* LÍNEA DETRÁS DE LA FOTO */
    .hero::before {
        z-index: 1;         /* la línea queda detrás */
    }


    .hero-title {
        font-size: 1.4rem !important;
    }

    .hero-name {
        font-size: 1.1rem !important;
    }

    .hero-desc {
        font-size: 0.85rem !important;
    }

    .hero-buttons {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    #stack {
        margin-top: 2rem !important;
    }

}


/* Fondo general */
body.dashboard-terminal {
    background-color: #0a0a0a;
    color: #00ff9d;
    font-family: "Fira Code", monospace;
    padding: 20px;
}

/* Título con glow */
.dashboard-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: #00ff9d;
    text-shadow: 0 0 8px #00ff9d;
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid #00ff9d;
    width: 0;
    animation: typing 2.5s steps(40) forwards, blink 0.7s infinite;
}

/* Animación de escritura */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* Cursor parpadeando */
@keyframes blink {
    50% { border-color: transparent; }
}

/* Caja de estadísticas */
.stats-summary {
    background: #111;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #00ff9d33;
    box-shadow: 0 0 10px #00ff9d22;
}

/* Tabla estilo terminal */
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

.dashboard-table th {
    background-color: #0f0f0f;
    color: #00ff9d;
    padding: 10px;
    border-bottom: 2px solid #00ff9d55;
}

.dashboard-table td {
    padding: 10px;
    border-bottom: 1px solid #00ff9d22;
}

/* Filas alternadas */
.dashboard-table tr:nth-child(even) {
    background-color: #0d0d0d;
}

.dashboard-table tr:nth-child(odd) {
    background-color: #050505;
}

/* Hover tipo hacker */
.dashboard-table tr:hover {
    background-color: #00ff9d22;
    transition: 0.2s;
}
