/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--s50);
    color: var(--s900);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============================================================
   TOKENS
   ============================================================ */
:root {
    --s50:  #0a0a0a;
    --s100: #171717;
    --s200: #262626;
    --s300: #404040;
    --s400: #737373;
    --s500: #a3a3a3;
    --s600: #d4d4d8;
    --s900: #f4f4f5;
    --s950: #ffffff;

    --beige-light:  #e5e1d4;
    --beige-main:   #d1cdbf;
    --beige-dark:   #b7b3a6;
    --beige-shadow: #a39f93;
    --accent-blue:   #3182ce;
    --accent-orange: #dd6b20;

    --max-w: 78rem;
    --nav-h: 4.5rem;
}

/* ============================================================
   BARRA DE PROGRESO (top)
   ============================================================ */
#progress-bar {
    position: fixed; top: 0; left: 0; z-index: 200;
    height: 2px; width: 0%;
    background: linear-gradient(90deg, var(--s400), var(--s600));
    transition: width .1s linear;
    pointer-events: none;
}

/* ============================================================
   PUNTOS DE SECCIÓN (lateral derecho)
   ============================================================ */
#section-dots {
    position: fixed; right: 1.75rem; top: 50%;
    transform: translateY(-50%); z-index: 90;
    display: flex; flex-direction: column; gap: .75rem;
}
.dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--s200); border: 1.5px solid var(--s200);
    display: flex; align-items: center; position: relative;
    transition: background .25s, border-color .25s, transform .25s;
    cursor: pointer;
}
.dot::after {
    content: attr(data-label);
    position: absolute; right: calc(100% + .75rem);
    font-size: .65rem; font-weight: 500; color: var(--s400);
    white-space: nowrap; opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
}
.dot:hover::after { opacity: 1; }
.dot.active {
    background: var(--s600); border-color: var(--s600);
    transform: scale(1.25);
}
@media (max-width: 768px) { #section-dots { display: none; } }

/* ============================================================
   NAV
   ============================================================ */
#navbar {
    position: fixed; top: 0; width: 100%; z-index: 100;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--s100);
}
.nav-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 0 2rem;
    height: var(--nav-h); display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
    font-size: .875rem; font-weight: 500;
    letter-spacing: -.02em;
}
.nav-links { display: flex; gap: 2.5rem; }
.nav-links a {
    font-size: .8125rem; font-weight: 400;
    color: var(--s500); letter-spacing: 0;
    transition: color .15s; position: relative;
    padding-bottom: 2px;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: -2px; left: 0;
    height: 1px; width: 0; background: var(--s900);
    transition: width .2s ease;
}
.nav-links a:hover { color: var(--s900); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--s900); }
@media (max-width: 640px) { .nav-links { display: none; } }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }

/* ============================================================
   SECTION LABEL (sin mayúsculas forzadas)
   ============================================================ */
.section-label {
    font-size: .75rem; font-weight: 500; color: var(--s400);
    letter-spacing: .06em; margin-bottom: .875rem;
    display: flex; align-items: center; gap: .5rem;
}
.section-label::before {
    content: ''; display: inline-block;
    width: 1.5rem; height: 1px; background: var(--s300);
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
    position: relative; min-height: 100vh;
    padding-top: var(--nav-h);
    padding-bottom: var(--nav-h); /* compensa el nav para que el centro visual sea correcto */
    display: flex;
    align-items: center;
}
.hero-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 0 2rem;
    width: 100%; display: grid;
    grid-template-columns: 1fr;
    gap: 3.5rem; align-items: center;
}
@media (min-width: 900px) {
    .hero-inner { grid-template-columns: 1fr 1.05fr; padding: 0 2rem; }
}

/* Texto */
.eyebrow {
    display: inline-block; font-size: .78rem; font-weight: 400;
    color: var(--s600); letter-spacing: .04em; margin-bottom: 1.25rem;
}
.hero-title {
    font-size: clamp(2.8rem, 6.5vw, 5.25rem);
    font-weight: 300; letter-spacing: -.05em; line-height: 1.0;
    margin-bottom: .6rem; color: var(--s950);
}
/* Apellido: gris cálido y legible */
.title-muted { color: var(--s600); }

.hero-role {
    font-size: .875rem; font-weight: 400; color: var(--s500);
    letter-spacing: .01em; margin-bottom: 1.25rem;
}
.hero-sub {
    font-size: 1rem; color: var(--s900); font-weight: 300;
    line-height: 1.8; margin-bottom: 1.75rem; max-width: 33rem;
}

/* Chips de info */
.hero-chips {
    display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem;
}
.chip {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .85rem; font-weight: 500; color: var(--s600);
    background: #f6f7f9; border: 1px solid #e8eaed;
    padding: .3rem .75rem; border-radius: 9999px;
}
.chip svg { color: #b0b8c4; flex-shrink: 0; }

/* CTA */
.hero-cta { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.btn-primary {
    display: inline-block; background: #6b7685; color: #fff;
    padding: .8rem 1.75rem; border-radius: 9999px;
    font-size: .875rem; font-weight: 500;
    transition: background .2s, transform .2s;
}
.btn-primary:hover { background: #57606d; transform: translateY(-1px); }
.btn-ghost {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .875rem; font-weight: 400; color: var(--s500); transition: color .15s;
}
.btn-ghost:hover { color: var(--s900); }
.arrow-icon { transition: transform .2s; }
.btn-ghost:hover .arrow-icon { transform: translateX(4px); }

/* Flecha de scroll */
.scroll-hint {
    position: absolute; bottom: 2rem; left: 50%;
    transform: translateX(-50%);
    color: var(--s300);
    animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(6px); }
}
@media (max-width: 640px) { .scroll-hint { display: none; } }

/* ============================================================
   COMPUTADORA 3D
   ============================================================ */
.computer-col {
    display: flex; justify-content: center; align-items: center;
    perspective: 2000px; position: relative; min-height: 500px;
}
.scene {
    transform-style: preserve-3d;
    transform: rotateY(-15deg) rotateX(5deg);
    transition: transform .4s ease-out;
}
.computer-unit {
    position: relative; width: 310px; height: 380px;
    transform-style: preserve-3d;
}
.face {
    position: absolute;
    background: var(--beige-main);
    border: 1px solid rgba(0,0,0,.05);
}
.front {
    width: 310px; height: 380px;
    transform: translateZ(88px);
    background: linear-gradient(135deg, var(--beige-light), var(--beige-main));
    box-shadow: inset 2px 2px 5px rgba(255,255,255,.8), inset -5px -5px 15px rgba(0,0,0,.1);
    display: flex; flex-direction: column; align-items: center; padding-top: 28px;
    position: absolute;
}
.back   { width:310px; height:380px; transform: translateZ(-88px) rotateY(180deg); background: var(--beige-dark); }
.left   { width:176px; height:380px; transform: rotateY(-90deg) translateZ(88px);  background: var(--beige-main); }
.right  { width:176px; height:380px; transform: rotateY(90deg) translateZ(222px);  background: var(--beige-dark); }
.top    { width:310px; height:176px; transform: rotateX(90deg) translateZ(88px);   background: var(--beige-light); }
.bottom { width:310px; height:176px; transform: rotateX(-90deg) translateZ(292px); background: var(--beige-shadow);
          box-shadow: 0 40px 70px rgba(0,0,0,.22); }

/* Pantalla CRT */
.screen-inset {
    width: 240px; height: 188px; background: #D1CEC7;
    border-radius: 13px;
    box-shadow: inset 2px 2px 8px rgba(0,0,0,.2), inset -2px -2px 8px rgba(255,255,255,.5);
    display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.crt {
    width: 220px; height: 170px; background: #222529;
    border-radius: 38% 38% 38% 38% / 10% 10% 10% 10%;
    position: relative; overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,0,0,1);
}
.crt::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(rgba(18,16,16,0) 50%, rgba(0,0,0,.25) 50%),
                linear-gradient(90deg, rgba(255,0,0,.06), rgba(0,255,0,.02), rgba(0,0,255,.06));
    background-size: 100% 2px, 3px 100%;
    z-index: 5; pointer-events: none; border-radius: 12px;
}
.crt-glow {
    position: absolute; inset: 8px; color: #fff;
    font-family: 'Courier New', monospace; font-size: 10px; z-index: 2;
}
.crt-ui { display: flex; height: 100%; }
.crt-sidebar {
    width: 28%; border-right: 1px solid rgba(255,255,255,.15);
    padding: 7px 5px; font-size: 7.5px; color: #aaa;
}
.icon-list div { margin-bottom: 5px; display: flex; align-items: center; gap: 3px; }
.icon-dot { width: 5px; height: 5px; border-radius: 50%; background: #555; flex-shrink: 0; }
.icon-dot.blue   { background: var(--accent-blue); }
.icon-dot.orange { background: var(--accent-orange); }
.crt-main { flex: 1; padding: 7px 6px; display: flex; flex-direction: column; }
.crt-label { font-size: 7px; color: rgba(255,255,255,.4); margin-bottom: 4px; }
.crt-window {
    background: #fff; color: #000; border-radius: 2px;
    padding: 4px; box-shadow: 2px 2px 0 rgba(0,0,0,.5); flex: 1;
}
.crt-window-header {
    border-bottom: 1px dotted #000; margin-bottom: 3px;
    font-weight: bold; font-size: 7px; display: flex; justify-content: space-between;
}
.typing-container { font-size: 7.5px; line-height: 1.4; color: #222; white-space: pre-wrap; }
.cursor {
    display: inline-block; width: 4px; height: 9px;
    background: #333; animation: blink 1s step-end infinite; vertical-align: middle;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

/* Detalles frontales */
.floppy-slot {
    width: 110px; height: 9px; background: #333;
    border-radius: 4px; box-shadow: inset 2px 2px 5px rgba(0,0,0,.5);
    margin-left: 70px;
}
.logo-badge {
    position: absolute; bottom: 22px; left: 22px;
    width: 14px; height: 20px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: linear-gradient(180deg,
        #63B548 0%,#63B548 16.6%, #F6C829 16.6%,#F6C829 33.3%,
        #E57D25 33.3%,#E57D25 50%, #D83335 50%,#D83335 66.6%,
        #9C4595 66.6%,#9C4595 83.3%, #468CCF 83.3%,#468CCF 100%);
}
.grill {
    position: absolute; bottom: 18px; right: 18px;
    display: grid; grid-template-columns: repeat(4,1fr);
    gap: 2px; width: 24px; height: 14px;
}
.vent { background: #333; border-radius: 1px; }

/* Teclado */
.keyboard-assembly {
    position: absolute; width: 310px; height: 115px;
    bottom: -96px; transform-style: preserve-3d; transform-origin: top center;
    --kb-angle: 66deg;
    transform: translateZ(144px) rotateX(var(--kb-angle));
    --kb-t: 14px;
}
.kb-base {
    position: absolute; width: 100%; height: 100%; background: var(--beige-main);
    box-shadow: inset 1px 1px 2px rgba(255,255,255,.5), inset -5px -5px 15px rgba(0,0,0,.1);
    transform: translateZ(calc(var(--kb-t)/2)); overflow: hidden;
}
.kb-front { position: absolute; left:0; bottom:0; width:100%; height:var(--kb-t); background: linear-gradient(180deg,#cdc9bb,#b5b1a3); transform-origin: bottom center; transform: translateZ(calc(var(--kb-t)/2)) rotateX(90deg); }
.kb-back  { position: absolute; left:0; top:0;    width:100%; height:var(--kb-t); background: linear-gradient(180deg,#e5e1d4,#c9c5b8); transform-origin: top center;    transform: translateZ(calc(var(--kb-t)/2)) rotateX(-90deg); }
.kb-left  { position: absolute; top:0; left:0;  width:var(--kb-t); height:100%; background: linear-gradient(180deg,#d1cdbf,#b7b3a6); transform-origin: left center;  transform: translateZ(calc(var(--kb-t)/2)) rotateY(90deg); }
.kb-right { position: absolute; top:0; right:0; width:var(--kb-t); height:100%; background: linear-gradient(180deg,#d1cdbf,#b7b3a6); transform-origin: right center; transform: translateZ(calc(var(--kb-t)/2)) rotateY(-90deg); }

.keys-grid {
    display: grid; grid-template-columns: repeat(12,1fr);
    gap: 3px; padding: 9px; transform: translateZ(5px); transform-style: preserve-3d;
}
.key {
    height: 20px; background: #ECE8DA; border-radius: 2px;
    box-shadow: 0 3px 0 var(--beige-dark), 0 5px 4px rgba(0,0,0,.15);
    transform: translateZ(1px);
}
.key.wide  { grid-column: span 2; }
.key.space { grid-column: span 6; }
@keyframes typeKey {
    0%,100% { transform: translateZ(1px) translateY(0); box-shadow: 0 3px 0 var(--beige-dark), 0 5px 4px rgba(0,0,0,.15); }
    50%      { transform: translateZ(-1px) translateY(3px); box-shadow: 0 1px 0 var(--beige-dark), 0 1px 2px rgba(0,0,0,.05); }
}
.key:nth-child(3n+1) { animation: typeKey 1.5s infinite .2s; }
.key:nth-child(7n)   { animation: typeKey 2.1s infinite .5s; }
.key:nth-child(2n+4) { animation: typeKey 1.8s infinite .9s; }
.key:nth-child(5n)   { animation: typeKey 2.5s infinite 1.2s; }
.key:nth-child(4n+2) { animation: typeKey 1.2s infinite 0s; }

/* ============================================================
   EDUCACIÓN
   ============================================================ */
#habilidades {
    padding: 5rem 2rem;
    background: rgba(23, 23, 23, 0.5);
    border-top: 1px solid var(--s100);
    border-bottom: 1px solid var(--s100);
}
/* Stack & Formación Layout */
.skills-layout {
    display: grid; grid-template-columns: 1fr; gap: 3rem;
}
@media (min-width: 768px) {
    .skills-layout { grid-template-columns: 5fr 7fr; gap: 4rem; }
}
.skills-left { display: flex; flex-direction: column; }
.edu-title {
    font-size: 1.6rem; font-weight: 300; color: var(--s950);
    letter-spacing: -.03em; line-height: 1.2; margin-bottom: .75rem;
}
.edu-sub { font-size: 1rem; font-weight: 400; color: var(--s500); line-height: 1.6; }
.edu-year { color: var(--s400); font-size: .8125rem; }
.edu-body {
    font-size: 1rem; font-weight: 300; color: var(--s500);
    line-height: 1.75;
}
.edu-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.etag {
    font-size: .75rem; font-weight: 400; color: var(--s500);
    background: var(--s100); padding: .25rem .75rem;
    border-radius: 6px; display: inline-block; transition: background .15s, color .15s;
}
.etag:hover { background: var(--s200); color: var(--s900); }

.skills-right { display: flex; flex-direction: column; }
.tech-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.tech-card {
    background: transparent;
}
.tech-card-title {
    font-size: .8125rem; font-weight: 500; color: var(--s900); margin-bottom: .75rem;
}
.tech-list { display: flex; flex-direction: column; gap: .25rem; }
.tech-list li {
    font-size: .875rem; font-weight: 300; color: var(--s500);
    padding: .5rem 0; border-bottom: 1px solid var(--s100);
    display: flex; justify-content: space-between; align-items: flex-start; flex-direction: column;
}
.tech-list li strong { font-weight: 400; color: var(--s900); }
.tech-list li:last-child { border-bottom: none; }
.lang-highlight-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--s200);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    position: relative;
    overflow: hidden;
}
.lang-highlight-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
    background: var(--s600);
}
.lang-title {
    font-size: 1.15rem; font-weight: 400; color: var(--s950);
    margin-bottom: .25rem; letter-spacing: -.01em;
}
.lang-desc {
    font-size: .85rem; font-weight: 300; color: var(--s500);
}
.skill-note { font-size: .7rem; color: var(--s300); }

.cert-link {
    display: inline-flex; align-items: center; gap: 0.2rem;
    font-size: 0.7rem; color: var(--s400); margin-top: 0.35rem;
    text-decoration: none; border-bottom: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.cert-link:hover { color: var(--s900); border-color: var(--s900); }

.comp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.comp-card { background: transparent; }
.comp-sub { font-size: .75rem; color: var(--s400); font-weight: 300; display: block; margin-top: .15rem; }

@media (max-width: 640px) {
    .tech-grid, .comp-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ============================================================
   PROYECTOS
   ============================================================ */
#proyectos { padding: 5rem 2rem; }
.project-block {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 2rem; padding: 2.5rem 0;
}
.project-info { max-width: 36rem; }
.project-meta-row {
    display: flex; align-items: center; gap: 1rem; margin-bottom: .75rem;
}
.project-year {
    font-size: .7rem; font-weight: 500; color: var(--s400); letter-spacing: .04em;
}
.project-type {
    font-size: .7rem; font-weight: 400; color: var(--s300);
}
.project-title {
    font-size: 1.6rem; font-weight: 300; color: var(--s950);
    letter-spacing: -.02em; margin-bottom: .875rem;
}
.project-desc {
    font-size: 1rem; font-weight: 300; color: var(--s500);
    line-height: 1.75; margin-bottom: .75rem;
}
.project-detail {
    font-size: 1rem; font-weight: 300; color: var(--s400);
    line-height: 1.7; margin-bottom: 1.25rem;
    padding-left: .875rem; border-left: 2px solid var(--s100);
}
.project-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
/* .tag styles unified with .etag */
.project-links { display: flex; gap: 1.5rem; }
.link-underline {
    display: inline-flex; align-items: center; gap: .375rem;
    font-size: .875rem; font-weight: 500; color: var(--s950);
    border-bottom: 1px solid transparent; padding-bottom: 2px;
    transition: border-color .15s;
}
.link-underline:hover { border-color: var(--s950); }
.link-underline svg { transition: transform .2s; }
.link-underline:hover svg { transform: translate(2px,-2px); }
.project-number {
    font-size: 5rem; font-weight: 300; color: var(--s100);
    letter-spacing: -.04em; line-height: 1; flex-shrink: 0;
    align-self: flex-end;
    font-family: 'EB Garamond', serif; font-style: italic;
    user-select: none;
}
.project-divider { height: 1px; background: var(--s100); }

/* Academic Projects */
.academic-projects-wrapper { margin-top: 4rem; }
.academic-grid {
    display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 1.5rem;
}
@media (min-width: 768px) {
    .academic-grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
}
.academic-card {
    background: rgba(23, 23, 23, 0.4); border: 1px solid var(--s100);
    border-radius: 12px; padding: 1.75rem;
    display: flex; flex-direction: column; transition: border-color .2s, background .2s;
}
.academic-card:hover { border-color: var(--s200); background: rgba(38, 38, 38, 0.3); }
.academic-title {
    font-size: 1.25rem; font-weight: 400; color: var(--s950);
    margin-bottom: .75rem; letter-spacing: -.01em;
}
.academic-desc {
    font-size: .9375rem; font-weight: 300; color: var(--s400); line-height: 1.6; margin-bottom: 1.5rem; flex: 1;
}
.mt-auto { margin-top: auto; }

/* ============================================================
   CONTACTO
   ============================================================ */
#contacto { padding: 5rem 2rem 4rem; border-top: 1px solid var(--s100); }
.contact-email {
    display: block;
    font-size: clamp(1.1rem, 3vw, 2.25rem);
    font-weight: 300; color: var(--s950);
    letter-spacing: -.02em; margin: 1.5rem 0 2rem;
    transition: color .2s; line-height: 1.1;
    word-break: break-all;
}
.contact-email:hover { color: var(--s500); }
.divider { height: 1px; background: var(--s100); margin-bottom: 2.5rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    display: flex; flex-direction: column; gap: 2rem; align-items: flex-start;
}
@media (min-width: 768px) {
    .site-footer { flex-direction: row; justify-content: space-between; align-items: center; }
}
.footer-label {
    font-size: .7rem; font-weight: 500; color: var(--s400);
    letter-spacing: .06em; margin-bottom: .625rem;
}
.footer-links { display: flex; gap: 1.75rem; }
.footer-links a { font-size: .875rem; font-weight: 500; color: var(--s900); transition: color .15s; }
.footer-links a:hover { color: var(--s500); }
.footer-right { text-align: right; }
.footer-year  { font-size: .7rem; font-weight: 500; color: var(--s400); letter-spacing: .05em; margin-bottom: .2rem; }
.footer-year  { font-size: .85rem; font-weight: 500; color: var(--s400); letter-spacing: .05em; margin-bottom: .2rem; }
.footer-note  { font-size: .85rem; font-weight: 300; color: var(--s300); }



/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */

/* Ocultar computadora 3D en pantallas chicas — es demasiado compleja para móvil */
@media (max-width: 899px) {
    .computer-col { display: none; }

    /* Hero: una sola columna, centrado */
    .hero-inner {
        grid-template-columns: 1fr;
        padding: 2.5rem 1.25rem;
        min-height: auto;
        text-align: left;
    }

    #hero { min-height: auto; padding-bottom: 3rem; }

    .hero-title {
        font-size: clamp(2.4rem, 11vw, 3.5rem);
        letter-spacing: -.04em;
    }

    .hero-sub { font-size: .9375rem; max-width: 100%; }

    .scroll-hint { display: none; }
}

/* Nav en móvil */
@media (max-width: 640px) {
    .nav-inner { padding: 0 1.25rem; }
    .nav-logo  { font-size: .8125rem; }
    #theme-toggle { padding: .4rem .5rem; }
}

/* Secciones — reducir padding en móvil */
@media (max-width: 768px) {
    #habilidades { padding: 3.5rem 1.25rem; }
    #proyectos   { padding: 3.5rem 1.25rem; }
    #contacto    { padding: 3.5rem 1.25rem 3rem; }

    .container   { padding: 0 1.25rem; }

    /* Educación: una columna */
    .edu-row { grid-template-columns: 1fr; gap: 1.25rem; margin-bottom: 2.5rem; }
    .edu-title { font-size: 1.35rem; }

    /* Stack: una columna en móvil muy chico */
    .skills-grid { gap: 2rem; }
    .skills-cols { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

    /* Proyectos: ocultar número grande, apilar vertical */
    .project-block {
        flex-direction: column;
        gap: 1rem;
        padding: 2rem 0;
    }
    .project-number { display: none; }
    .project-info   { max-width: 100%; }
    .project-title  { font-size: 1.35rem; }

    /* Contacto: email más chico */
    .contact-email { font-size: clamp(1rem, 5vw, 1.5rem); }

    /* Footer: apilar */
    .footer-right { text-align: left; }

    /* Section label */
    .section-label { margin-bottom: .625rem; }

    /* Reducir margen entre edu-tags */
    .edu-tags { gap: .375rem; }
}

/* Pantallas muy chicas (< 380px) */
@media (max-width: 380px) {
    .hero-title { font-size: 2.1rem; }
    .skills-cols { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; align-items: flex-start; gap: .875rem; }
}



/* UI/UX Improvements */
body, main, section, nav, .site-footer {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.hero-sub, .project-desc, .project-detail, .edu-body {
    line-height: 1.6;
}

a:focus-visible, button:focus-visible {
    outline: 2px solid var(--s900);
    outline-offset: 4px;
    border-radius: 4px;
}
