/* Variables de diseño y modo oscuro */
:root{
    --bg: #ffffff;
    --card: #f6f7fb;
    --text: #111827;
    --muted: #6b7280;
    --accent: #2563eb;
    --accent-2: #7c3aed;
    --radius: 12px;
    --glass: rgba(255,255,255,0.6);
}

[data-theme="dark"]{
    --bg: #0b0f1a;
    --card: #0f1724;
    --text: #e6eef8;
    --muted: #9aa4b2;
    --accent: #60a5fa;
    --accent-2: #9f7aea;
    --glass: rgba(255,255,255,0.04);
}

/* Reset y tipografía base */
*{
    box-sizing:border-box
}
html{
    font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;scroll-behavior:smooth
}
body{
    margin:0;background:var(--bg);color:var(--text);line-height:1.6
}

/* Contenedor principal */
.wrap{
    max-width:1000px;
    margin:0 auto;
    padding:0 1rem
}

/* Enlace para saltar al contenido */

.skip{
    position:absolute;
    left:-999px;
    top:8px;
    background:var(--accent);
    color:#fff;
    padding:.5rem .75rem;
    border-radius:6px
}

.skip:focus{left:8px}

/* Encabezado (Header) */
.site-header{
    backdrop-filter: blur(6px);
    position:sticky;
    top:0;
    z-index:40;
    background:color-mix(in oklab,var(--bg),transparent 10%);
    border-bottom:1px solid rgba(0,0,0,0.04)
}
.site-header .wrap{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:1rem 0
}

.brand{
    display:flex;
    align-items:center;
    gap:.9rem
}
.avatar{
    width:56px;
    height:56px;
    border-radius:12px;
    object-fit:cover;
    border:2px solid rgba(0,0,0,0.06)
}

.name{font-weight:700}

.role{
    color:var(--muted);
    font-size:.9rem
}

/* Navegación (Nav) */
.nav{
    display:flex;
    align-items:center;
    gap:1rem
}
.nav-links{
    display:flex;
    gap:.75rem;
    list-style:none;
    margin:0;
    padding:0
}
.nav-links a{
    color:var(--muted);
    text-decoration:none;
    padding:.45rem .6rem;
    border-radius:8px
}
.nav-links a:hover{
    background:var(--card);
    color:var(--text)
}

.menu-btn{
    display:none;
    background:none;
    border:none;
    font-size:1.2rem;
    cursor:pointer
}
.theme-btn{
    background:none;
    border:none;
    font-size:1.1rem;
    cursor:pointer
}

/* Sección principal (Hero) */
.hero{padding:3.25rem 0}

.hero-inner{
    display:grid;
    grid-template-columns:1fr 320px;
    gap:2rem;
    align-items:center
}
.hero-text h1{
    font-size:clamp(1.6rem,3.6vw,2.6rem);
    margin:0
}

.hero-text span{color:var(--accent)}

.hero-img img{
    width:100%;
    height:auto;
    border-radius:14px;
    box-shadow:0 10px 30px rgba(2,6,23,0.12)
}

/* Botones de llamada a la acción (CTA) */
.cta-row{
    margin-top:2.5rem;
    display:flex;
    gap:.75rem
}
.btn{
    background:linear-gradient(135deg,var(--accent),var(--accent-2));
    color:#fff;
    padding:.6rem .9rem;
    border-radius:10px;
    text-decoration:none;
    display:inline-block;
    box-shadow:0 6px 18px rgba(37,99,235,0.15);
    transition:transform .18s ease,box-shadow .18s ease
}
.btn:hover{
    transform:translateY(-3px);
    box-shadow:0 18px 40px rgba(37,99,235,0.12)
}
.btn.ghost{
    background:transparent;
    color:var(--accent);
    border:1px solid rgba(37,99,235,0.12)
}

/* Secciones generales (Proyectos, Habilidades, etc.) */
.section{
    padding:2.25rem 0;
    border-top:1px solid rgba(0,0,0,0.03)
}
.muted{
    color:var(--muted);
    margin-top:-0.25rem
}

.projects{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:1rem;
    margin-top:1rem
}
.card{
    background:var(--card);
    padding:1rem;
    border-radius:12px;
    box-shadow:0 8px 24px rgba(2,6,23,0.06);
    transition:transform .18s ease,box-shadow .18s ease
}
.card:hover{
    transform:translateY(-6px);
    box-shadow:0 28px 60px rgba(2,6,23,0.08)
}
.card h3{
    margin:0 0 .5rem
}
.link{
    color:var(--accent);
    text-decoration:none;
    font-weight:600
}

.skills{
    display:flex;
    flex-wrap:wrap;
    gap:.5rem;
    padding:0;
    list-style:none;
    margin:0
}
.skills li{
    background:linear-gradient(180deg,rgba(171, 186, 228, 0.945),rgb(82, 114, 182));
    padding:.45rem .7rem;
    border-radius:999px;
    font-size:.95rem;
    color:var(--card);
    border:1px solid rgba(0,0,0,0.03)
}

/* Footer (Pie de página) */
.site-footer{
    padding:1.25rem 0;
    margin-top:2rem;
    border-top:1px solid rgba(0,0,0,0.03)
}

.site-footer small{color:var(--muted)}

/* Animaciones de entrada */
.reveal{
    opacity:0;
    transform:translateY(10px);
    transition:opacity .6s ease,transform .6s ease
}

.reveal.visible{opacity:1;transform:none}

/* Footer */
.site-footer {
    background-color: #434040;
    color: #f0f0f0;
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.9rem;
}

.site-footer .wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.site-footer small {
    font-weight: 300;
    color: #ffffff;
}

/* Redes sociales */
.site-footer .social {
    display: flex;
    gap: 1.5rem;
}

.site-footer .social a {
    color: #f0f0f0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.site-footer .social a:hover,
.site-footer .social a:focus {
  color: #4fc3f7; /* Azul claro al pasar el mouse */
}

/* Responsive */
@media (min-width: 600px) {
    .site-footer .wrap {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* responsive */
@media (max-width:900px){
    .hero-inner{grid-template-columns:1fr;gap:1.25rem}
    .hero-img{order:-1}
    .avatar{width:48px;height:48px}
}
@media (max-width:640px){
    .nav-links{display:none;position:absolute;right:1rem;top:70px;background:var(--bg);padding:1rem;border-radius:8px;box-shadow:0 10px 30px rgba(2,6,23,0.08)}
    .nav-links.show{display:flex;flex-direction:column;gap:.5rem}
    .menu-btn{display:block}
}
