/* =======================================================
   TOKENS DE DISEÑO
   Paleta, medidas y efectos compartidos por todo el sitio.
   ======================================================= */
:root {
  color-scheme: dark;
  --bg: #10141c;
  --bg-soft: #151b24;
  --surface: #1b2330;
  --surface-2: #202a38;
  --border: #303b4d;
  --border-light: #41516a;
  --text: #f4f7fa;
  --muted: #9aa8bb;
  --accent: #58a6ff;
  --accent-soft: rgba(88, 166, 255, .13);
  --accent-2: #52c788;
  --purple: #d2a8ff;
  --orange: #ffa657;
  --coral: #ff7a63;
  --max-width: 1180px;
  --narrow: 760px;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1f5;
  --bg-soft: #e3e7ed;
  --surface: #fbfcfe;
  --surface-2: #f1f4f8;
  --border: #d2d9e3;
  --border-light: #b8c3d1;
  --text: #17202b;
  --muted: #596675;
  --accent: #256eb8;
  --accent-soft: rgba(37, 110, 184, .11);
  --accent-2: #21895b;
  --purple: #7856b8;
  --orange: #a65f16;
  --coral: #b84d3a;
  --shadow: 0 18px 55px rgba(31, 42, 56, .12);
}

/* =======================================================
   BASE Y UTILIDADES REUTILIZABLES
   Normalización mínima, tipografía, contenedores y accesibilidad.
   ======================================================= */
* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: hidden; scroll-behavior: smooth; }
body { max-width: 100%; margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.65; -webkit-font-smoothing: antialiased; transition: background .2s ease, color .2s ease; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.container { width: min(calc(100% - 40px), var(--max-width)); margin-inline: auto; }
.container-narrow { width: min(calc(100% - 40px), var(--narrow)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* =======================================================
   NAVEGACIÓN PRINCIPAL
   Cabecera fija, marca, enlaces activos y control del menú móvil.
   ======================================================= */
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(88,166,255,.28); background: linear-gradient(135deg, rgba(16,33,52,.96), rgba(17,42,45,.96) 48%, rgba(45,32,63,.96)); box-shadow: 0 12px 34px rgba(0,0,0,.18); backdrop-filter: blur(18px); }
.nav { min-height: 72px; display: flex; align-items: center; justify-content: flex-start; }
.brand { order: 1; margin-right: auto; display: inline-flex; align-items: center; gap: 11px; color: #ffffff; font-size: 1rem; font-weight: 720; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; display: inline-grid; place-items: center; flex: 0 0 auto; }
.brand-mark img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 5px 12px rgba(0,0,0,.28)); }
.nav-links { order: 2; display: flex; align-items: center; gap: 8px; color: rgba(244,247,250,.82); font-size: .84rem; }
.nav-links a { min-height: 36px; padding: 7px 11px; position: relative; display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent; border-radius: 99px; transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.nav-links a:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.12); color: #ffffff; box-shadow: 0 8px 22px rgba(0,0,0,.16); }
.nav-links a.active { border-color: rgba(255,255,255,.28); background: linear-gradient(135deg, rgba(88,166,255,.34), rgba(82,199,136,.25)); color: #ffffff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 8px 24px rgba(0,0,0,.14); }
.nav-links a.active::after { display: none; }
.nav-icon { width: 23px; height: 23px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: rgba(255,255,255,.78); box-shadow: 0 5px 12px rgba(0,0,0,.16); }
.nav-icon img { width: 15px; height: 15px; display: block; }
.menu-toggle { order: 4; display: none; width: 40px; height: 40px; margin-left: 10px; padding: 9px; border: 0; background: none; cursor: pointer; }
.menu-toggle > span:not(.sr-only) { display: block; width: 21px; height: 1px; margin: 5px 0; background: #ffffff; transition: .2s; }
.theme-toggle { order: 3; width: 52px; height: 32px; margin-left: 18px; padding: 4px; display: inline-grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--border-light); border-radius: 99px; background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--accent); }
.theme-toggle-track { position: relative; width: 38px; height: 22px; display: block; border-radius: 99px; background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--border); }
.theme-toggle-track::before, .theme-toggle-track::after { position: absolute; top: 50%; width: 7px; height: 7px; content: ""; border-radius: 50%; transform: translateY(-50%); }
.theme-toggle-track::before { left: 7px; background: #8fa1b5; box-shadow: 0 0 0 2px rgba(143,161,181,.14); }
.theme-toggle-track::after { right: 7px; background: var(--accent); box-shadow: 0 0 8px rgba(88,166,255,.65); }
.theme-toggle-thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; display: block; border-radius: 50%; background: var(--text); box-shadow: 0 3px 9px rgba(0,0,0,.25); transition: transform .2s ease, background .2s ease; }
:root[data-theme="light"] .theme-toggle-thumb { transform: translateX(16px); background: #ffffff; }

/* =======================================================
   HERO PRINCIPAL
   Presentación profesional y panel de actividad de la portada.
   ======================================================= */
.hero { min-height: 610px; padding-block: 78px 72px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr); align-items: center; gap: clamp(50px, 6vw, 82px); }
.eyebrow { margin: 0 0 18px; color: var(--accent); font: 700 .72rem/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; line-height: 1.12; letter-spacing: -.035em; }
.hero h1 { max-width: 760px; margin-bottom: 17px; font-size: clamp(3.2rem, 6vw, 5.2rem); font-weight: 720; }
.hero h1 span, .page-header h1 span { color: var(--muted); }
.hero-subtitle { max-width: 650px; margin: 0 0 14px; color: var(--text); font-size: clamp(1.25rem, 2.2vw, 1.55rem); line-height: 1.45; letter-spacing: -.015em; }
.lead { max-width: 680px; margin: 0; color: #aab4c0; font-size: clamp(1.05rem, 1.8vw, 1.22rem); line-height: 1.75; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 0 18px; border: 1px solid transparent; border-radius: 10px; font-size: .9rem; font-weight: 650; transition: transform .2s, background .2s, border-color .2s, box-shadow .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: #07111c; }
.button-primary:hover { background: #75b8ff; }
.button-ghost { border-color: var(--border-light); background: rgba(255,255,255,.015); }
.button-ghost:hover { border-color: #475362; background: var(--surface); }
.button-linux { border-color: rgba(88,166,255,.36); background: linear-gradient(135deg, #58a6ff, #82c5ff); box-shadow: 0 12px 30px rgba(88,166,255,.18); }
.button-projects { border-color: rgba(82,199,136,.36); background: linear-gradient(135deg, #52c788, #8ee6b2); box-shadow: 0 12px 30px rgba(82,199,136,.18); }
.button-industry { border-color: rgba(255,166,87,.4); background: linear-gradient(135deg, #ffa657, #ffc36f); box-shadow: 0 12px 30px rgba(255,166,87,.18); }
.button-cad { border-color: rgba(210,168,255,.42); background: linear-gradient(135deg, #d2a8ff, #9bc7ff); box-shadow: 0 12px 30px rgba(210,168,255,.18); }
.button-linux:hover { background: linear-gradient(135deg, #75b8ff, #9fd2ff); box-shadow: 0 16px 34px rgba(88,166,255,.25); }
.button-projects:hover { background: linear-gradient(135deg, #68d99d, #a5efc4); box-shadow: 0 16px 34px rgba(82,199,136,.25); }
.button-industry:hover { background: linear-gradient(135deg, #ffb36c, #ffd18a); box-shadow: 0 16px 34px rgba(255,166,87,.25); }
.button-cad:hover { background: linear-gradient(135deg, #ddb9ff, #add2ff); box-shadow: 0 16px 34px rgba(210,168,255,.25); }
.button-icon { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: rgba(255,255,255,.72); box-shadow: inset 0 0 0 1px rgba(7,17,28,.1), 0 5px 12px rgba(7,17,28,.12); }
.button-icon img { width: 18px; height: 18px; display: block; }
.button-paypal { background: #ffc439; color: #12204a; border-color: rgba(255,196,57,.55); box-shadow: 0 12px 30px rgba(255,196,57,.18); }
.button-paypal:hover { background: #ffd45f; box-shadow: 0 16px 34px rgba(255,196,57,.26); }
.button-paypal img { width: 82px; height: auto; display: block; flex: 0 0 auto; }
.hero-visual { position: relative; }
.hero-visual::before { position: absolute; content: ""; width: 330px; height: 330px; inset: -70px 0 auto 60px; border-radius: 50%; background: rgba(88,166,255,.14); filter: blur(90px); }
.hero-profile { max-width: 520px; margin-top: 30px; display: flex; align-items: center; gap: 13px; color: var(--muted); }
.hero-profile-mark { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--border-light); border-radius: 50%; background: var(--surface); color: var(--accent); font: 700 .68rem ui-monospace, monospace; letter-spacing: .05em; }
.hero-profile > span:last-child { display: flex; flex-direction: column; }
.hero-profile strong { color: #dce3e9; font-size: .82rem; font-weight: 650; }
.hero-profile small { margin-top: 1px; font-size: .7rem; line-height: 1.4; }
.hero-copy .actions { margin-top: 30px; }
.hero-workbench { position: relative; overflow: hidden; border: 1px solid var(--border-light); border-radius: 22px; background: rgba(18,24,32,.94); box-shadow: var(--shadow); }
.workbench-header { min-height: 47px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: var(--bg-soft); color: #7f8a97; font: 650 .64rem ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.workbench-status { display: inline-flex; align-items: center; gap: 7px; color: #83dca9; }
.workbench-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 9px var(--accent-2); }
.active-project { padding: 25px 24px; display: grid; grid-template-columns: 48px 1fr; gap: 17px; border-bottom: 1px solid var(--border); }
.active-project img { width: 48px; height: 48px; }
.active-project small { color: var(--accent); font: 650 .66rem ui-monospace, monospace; }
.active-project h2 { margin: 7px 0 8px; font-size: 1.25rem; letter-spacing: -.02em; }
.active-project p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.workbench-section { padding: 21px 24px; border-bottom: 1px solid var(--border); }
.workbench-section:last-child { border-bottom: 0; }
.workbench-label { display: block; margin-bottom: 13px; color: #738092; font: 650 .62rem ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.expertise-list { margin: 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.expertise-list li { display: flex; align-items: center; gap: 11px; color: #c8d0d8; font-size: .78rem; }
.expertise-list li span { color: #657182; font: .62rem ui-monospace, monospace; }
.workbench-stack > div { display: flex; flex-wrap: wrap; gap: 7px; }
.workbench-stack > div span { padding: 5px 9px; border: 1px solid var(--border); border-radius: 99px; background: rgba(255,255,255,.02); color: #aeb9c5; font: .65rem ui-monospace, monospace; }

/* =======================================================
   COMPONENTES REUTILIZABLES Y TARJETAS DE CATEGORÍA
   Ritmo de secciones, encabezados, botones y accesos temáticos.
   ======================================================= */
.section { padding-block: 72px; }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 40px; margin-bottom: 42px; }
.section-heading h2, .about h2, .principles h2 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3rem); }
.section-heading > p { max-width: 460px; justify-self: end; margin: 0; color: var(--muted); }
.section-link { justify-self: end; color: var(--accent); font-size: .85rem; font-weight: 650; }
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.category-card { min-height: 285px; padding: 27px; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: transform .25s, border-color .25s, background .25s; }
.category-card:hover { transform: translateY(-5px); border-color: #394653; background: var(--surface-2); }
.category-icon { width: 46px; height: 46px; margin-bottom: 40px; padding: 9px; display: grid; place-items: center; border: 1px solid rgba(88,166,255,.3); border-radius: 11px; background: rgba(88,166,255,.08); }
.category-icon img { width: 100%; height: 100%; display: block; }
.category-icon.icon-green { border-color: rgba(82,199,136,.3); background: rgba(82,199,136,.08); }
.category-icon.icon-purple { border-color: rgba(210,168,255,.3); background: rgba(210,168,255,.08); }
.category-icon.icon-orange { border-color: rgba(255,166,87,.3); background: rgba(255,166,87,.08); }
.category-card h3 { margin-bottom: 10px; font-size: 1.18rem; }
.category-card p { margin: 0 0 25px; color: var(--muted); font-size: .9rem; }
.card-link { width: fit-content; margin-top: auto; padding: 7px 11px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(88,166,255,.25); border-radius: 99px; background: rgba(88,166,255,.1); color: #dbeaff; font-size: .82rem; font-weight: 650; transition: border-color .2s, background .2s, color .2s, transform .2s; }
.card-link::before { width: 8px; height: 8px; content: ""; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 12px rgba(88,166,255,.55); }
.category-card:hover .card-link { transform: translateY(-1px); border-color: rgba(88,166,255,.45); background: rgba(88,166,255,.16); color: #ffffff; }

/* =======================================================
   PUBLICACIÓN DESTACADA
   Tarjeta editorial principal de la portada.
   ======================================================= */
.featured-post { overflow: hidden; display: grid; grid-template-columns: 1.35fr .65fr; border: 1px solid var(--border); border-radius: 24px; background: linear-gradient(135deg, var(--surface), #101720); }
.featured-content { padding: clamp(34px, 6vw, 68px); }
.featured-content h2, .featured-content h3 { max-width: 730px; margin: 25px 0 20px; font-size: clamp(1.75rem, 3vw, 2.55rem); }
.featured-content > p { max-width: 680px; color: var(--muted); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; color: #7f8a97; font-size: .75rem; }
.tag { padding: 5px 9px; border: 1px solid rgba(88,166,255,.32); border-radius: 99px; background: var(--accent-soft); color: var(--accent); font: 700 .65rem ui-monospace, monospace; letter-spacing: .07em; text-transform: uppercase; }
.text-link { width: fit-content; min-height: 42px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; border: 1px solid rgba(88,166,255,.3); border-radius: 99px; background: rgba(88,166,255,.1); color: #dbeaff; font-size: .9rem; font-weight: 650; transition: transform .2s, border-color .2s, background .2s, color .2s, box-shadow .2s; }
.text-link:hover { transform: translateY(-2px); border-color: rgba(88,166,255,.48); background: rgba(88,166,255,.16); color: #ffffff; box-shadow: 0 12px 28px rgba(0,0,0,.2); }
.text-link-article { border-color: rgba(88,166,255,.36); background: linear-gradient(135deg, rgba(88,166,255,.22), rgba(155,199,255,.14)); color: #eef7ff; }
.text-link-project { border-color: rgba(82,199,136,.34); background: linear-gradient(135deg, rgba(82,199,136,.22), rgba(142,230,178,.14)); color: #e8fff1; }
.text-link-github { border-color: rgba(210,168,255,.34); background: linear-gradient(135deg, rgba(36,43,56,.95), rgba(84,68,112,.88)); color: #f3eaff; }
.text-link-project:hover { border-color: rgba(82,199,136,.52); background: linear-gradient(135deg, rgba(82,199,136,.3), rgba(142,230,178,.2)); }
.text-link-github:hover { border-color: rgba(210,168,255,.54); background: linear-gradient(135deg, rgba(45,54,70,.98), rgba(100,80,136,.94)); }
.featured-code { min-height: 360px; padding: 40px; display: flex; flex-direction: column; justify-content: center; border-left: 1px solid var(--border); background: radial-gradient(circle at 70% 30%, rgba(88,166,255,.16), transparent 43%), #131923; font-family: ui-monospace, monospace; }
.feature-title { display: flex; align-items: center; gap: 12px; color: var(--accent); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.feature-title img { width: 34px; height: 34px; }
.featured-code > span { color: var(--accent); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.featured-code strong { margin: 28px 0 18px; font-size: 1.35rem; }
.featured-code small { color: var(--muted); }
.power-line { height: 6px; margin-bottom: 18px; overflow: hidden; border-radius: 99px; background: #26303a; }
.power-line i { display: block; width: 62%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* Ficha compacta de proyecto utilizada en la portada. */
.project-highlight { padding: clamp(28px, 5vw, 48px); display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: clamp(28px, 5vw, 54px); border: 1px solid var(--border); border-radius: 20px; background: linear-gradient(135deg, var(--surface), var(--bg-soft)); }
.project-highlight-icon { width: 120px; height: 120px; padding: 18px; border: 1px solid var(--border); border-radius: 24px; background: #131923; }
.project-highlight-icon img { width: 100%; height: 100%; display: block; }
.project-highlight h3 { margin: 14px 0 10px; font-size: clamp(1.6rem, 3vw, 2.25rem); }
.project-highlight p { max-width: 760px; margin: 0; color: var(--muted); }
.tech-list { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 7px; }
.tech-list span { padding: 5px 9px; border: 1px solid var(--border); border-radius: 99px; color: #aeb9c5; font: .67rem ui-monospace, monospace; }
.project-links { display: flex; flex-wrap: wrap; gap: 12px; }
.home-categories .category-card { min-height: 230px; }
.home-categories .category-icon { margin-bottom: 26px; }

/* =======================================================
   ACERCA DE
   Retrato profesional, experiencia, áreas de enfoque y perfiles.
   ======================================================= */
.about { position: relative; padding-block: 70px; border-top: 1px solid var(--border); scroll-margin-top: 72px; }
.about::before { position: absolute; z-index: -1; content: ""; width: 420px; height: 420px; top: 110px; left: 4%; border-radius: 50%; background: rgba(88,166,255,.07); filter: blur(110px); }
.about-heading { margin-bottom: 36px; display: grid; grid-template-columns: minmax(150px, .38fr) minmax(0, 1.62fr); align-items: start; gap: 32px; }
.about-heading .eyebrow { margin-top: 9px; }
.about-heading h2 { max-width: 680px; font-size: clamp(1.65rem, 2.5vw, 1.95rem); line-height: 1.16; }
.about-layout { padding: clamp(18px, 2.5vw, 30px); display: grid; grid-template-columns: minmax(280px, .78fr) minmax(0, 1.22fr); align-items: stretch; gap: clamp(34px, 5vw, 68px); border: 1px solid var(--border); border-radius: 28px; background: linear-gradient(135deg, rgba(27,35,48,.92), rgba(15,20,28,.72)); }
.about-portrait { position: relative; min-width: 0; margin: 0; padding: 28px 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; align-self: center; border: 1px solid var(--border); border-radius: 20px; background: radial-gradient(circle at 50% 28%, var(--accent-soft), transparent 58%), var(--bg-soft); text-align: center; }
.portrait-frame { position: relative; width: 100%; max-width: 260px; overflow: hidden; border-radius: 24px; user-select: none; }
.about-portrait img { position: relative; z-index: 1; width: 100%; max-width: 260px; height: 360px; max-height: 360px; display: block; object-fit: cover; object-position: center; overflow: hidden; border: 1px solid var(--border-light); border-radius: 24px; box-shadow: 0 18px 45px rgba(0,0,0,.3); }
.portrait-frame img { -webkit-user-drag: none; user-select: none; }
.photo-shield { position: absolute; z-index: 2; inset: 0; border-radius: inherit; background: transparent; -webkit-touch-callout: none; }
.about-portrait figcaption { position: relative; z-index: 1; margin-top: 28px; display: flex; align-items: center; flex-direction: column; }
.about-portrait figcaption strong { margin: 13px 0 3px; color: var(--text); font-size: 1.15rem; }
.about-portrait figcaption small { color: #aab5c2; font-size: .77rem; line-height: 1.45; }
.portrait-label { width: fit-content; padding: 6px 10px; border: 1px solid rgba(82,199,136,.28); border-radius: 99px; background: rgba(82,199,136,.1); color: #83dca9; font: 650 .65rem ui-monospace, monospace; letter-spacing: .05em; text-transform: uppercase; }
.portrait-label i { width: 6px; height: 6px; margin-right: 6px; display: inline-block; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }
.about-copy { padding: clamp(10px, 2vw, 24px) clamp(4px, 1vw, 12px) clamp(10px, 2vw, 24px) 0; display: flex; flex-direction: column; justify-content: center; color: #b0bac4; font-size: 1rem; }
.about-copy p:first-child { margin-top: 0; }
.about-copy strong { color: var(--text); }
.about-lead { color: var(--text); font-size: clamp(1.18rem, 2.3vw, 1.48rem); line-height: 1.55; letter-spacing: -.015em; }
.about-focus { margin: 30px 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; list-style: none; }
.about-focus li { min-width: 0; padding: 14px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.about-focus img { width: 30px; height: 30px; flex: 0 0 auto; }
.about-focus span { display: flex; flex-direction: column; }
.about-focus strong { font-size: .82rem; }
.about-focus small { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.about-note { margin-bottom: 0; padding: 16px 18px; border-left: 2px solid var(--accent); border-radius: 0 10px 10px 0; background: rgba(88,166,255,.055); }
.professional-links { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.profile-link { width: fit-content; padding: 12px 16px; display: flex; align-items: center; gap: 24px; border: 1px solid var(--border-light); border-radius: 10px; color: var(--text); font-size: .84rem; font-weight: 650; transition: border-color .2s, background .2s, transform .2s; }
.profile-link:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }

/* Página independiente de perfil profesional. */
.about-page { max-width: 1040px; margin-block: 48px 72px; padding: clamp(24px, 4vw, 46px); display: grid; grid-template-columns: 300px minmax(0, 1fr); align-items: start; gap: 32px clamp(38px, 6vw, 72px); border: 1px solid var(--border); border-radius: 26px; background: linear-gradient(135deg, rgba(27,35,48,.94), rgba(15,20,28,.78)); box-shadow: 0 22px 65px rgba(0,0,0,.2); }
.about-card-heading { grid-column: 1 / -1; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.about-card-heading h1 { margin-bottom: 12px; font-size: clamp(2rem, 3.6vw, 2.8rem); }
.profile-identity { margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(48,59,77,.7); }
.profile-identity h2 { margin-bottom: 6px; font-size: clamp(1.55rem, 2.6vw, 2rem); }
.profile-identity .profile-role { margin-bottom: 0; }
.about-page .about-portrait { height: 100%; padding: 20px 16px 16px; justify-content: flex-start; align-self: stretch; border-color: var(--border-light); background: radial-gradient(circle at 50% 18%, var(--accent-soft), transparent 56%), var(--bg-soft); }
.about-page .about-portrait img { height: 340px; }
.about-page .about-portrait figcaption { margin-top: 18px; }
.about-page .about-copy { height: 100%; padding: 0; justify-content: flex-start; align-self: stretch; }
.about-page .about-copy h2 { margin-bottom: 8px; font-size: clamp(1.8rem, 3vw, 2.3rem); }
.about-page .about-focus { margin: auto 0 0; padding-top: 24px; }
.profile-role { margin: 0 0 28px; color: var(--accent); font-size: .82rem; }
.social-links { width: 100%; margin-top: 20px; display: grid; gap: 9px; }
.social-link { min-height: 56px; padding: 9px 12px; display: grid; grid-template-columns: 23px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--border-light); border-radius: 11px; text-align: left; transition: transform .2s, border-color .2s, background .2s; }
.social-link:hover { transform: translateY(-2px); }
.social-link svg { width: 23px; height: 23px; fill: currentColor; }
.social-link > span:nth-child(2) { display: flex; flex-direction: column; }
.social-link strong { color: var(--text); font-size: .82rem; }
.social-link small { margin-top: 1px; color: var(--muted); font-size: .66rem; }
.social-linkedin { border-color: rgba(88,166,255,.42); background: var(--accent-soft); color: var(--accent); }
.social-linkedin:hover { border-color: var(--accent); background: rgba(88,166,255,.18); }
.social-github { background: var(--surface-2); color: var(--text); }
.social-github:hover { border-color: var(--border-light); background: var(--surface); }

/* =======================================================
   PIE DE PÁGINA
   Marca secundaria, navegación auxiliar y metadatos del sitio.
   ======================================================= */
.site-footer { margin-top: 60px; border-top: 1px solid var(--border); background: #0c1016; }
.footer-content { padding-block: 58px; display: flex; justify-content: space-between; align-items: flex-start; }
.footer-content p { margin: 14px 0 0; color: var(--muted); font-size: .85rem; }
.footer-content nav { max-width: 610px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px 28px; color: var(--muted); font-size: .85rem; }
.footer-content nav a:hover { color: var(--text); }
.footer-content nav .footer-active, .footer-content nav [aria-current="page"] { color: var(--text); }
.footer-bottom { padding-block: 21px; display: flex; justify-content: space-between; border-top: 1px solid var(--border); color: #697482; font-size: .75rem; }

/* =======================================================
   DONACIONES
   Página dedicada y acceso flotante para apoyar el proyecto.
   ======================================================= */
.donation-page { padding-block: 56px 90px; }
.donation-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); gap: clamp(28px, 5vw, 62px); align-items: stretch; }
.donation-hero { padding: clamp(30px, 5vw, 54px); display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--border); border-radius: 24px; background: linear-gradient(135deg, var(--surface), var(--bg-soft)); box-shadow: var(--shadow); }
.donation-mark { width: 68px; height: 68px; margin-bottom: 26px; padding: 13px; display: grid; place-items: center; border: 1px solid rgba(88,166,255,.34); border-radius: 18px; background: linear-gradient(135deg, rgba(88,166,255,.14), rgba(82,199,136,.1)); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.donation-mark img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 8px 14px rgba(0,0,0,.2)); }
.donation-hero h1 { margin-bottom: 16px; font-size: clamp(2.3rem, 5vw, 4.2rem); }
.donation-hero .lead { max-width: 620px; }
.donation-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.donation-card { position: relative; overflow: hidden; padding: clamp(26px, 5vw, 42px); display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid rgba(88,166,255,.32); border-radius: 22px; background: radial-gradient(circle at 50% 20%, rgba(88,166,255,.16), transparent 46%), var(--surface); text-align: center; }
.donation-card::before { position: absolute; top: 22px; right: 22px; width: 42px; height: 42px; content: ""; border: 1px solid rgba(82,199,136,.25); border-radius: 14px; background: url("../icons/donaciones.svg") center / 26px 26px no-repeat, rgba(82,199,136,.09); }
.donation-card > img:not(.paypal-card-brand) { width: min(100%, 220px); height: auto; padding: 16px; display: block; border: 1px solid var(--border); border-radius: 18px; background: #ffffff; image-rendering: pixelated; box-shadow: 0 18px 42px rgba(0,0,0,.24); }
.paypal-card-brand { width: 124px; height: auto; margin-bottom: 22px; display: block; }
.donation-card h2 { margin: 28px 0 10px; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.donation-card p { max-width: 420px; margin: 0; color: var(--muted); }
.donation-note { margin-top: 26px; padding: 18px 20px; border-left: 2px solid var(--accent); border-radius: 0 12px 12px 0; background: rgba(88,166,255,.08); color: var(--muted); font-size: .9rem; }
.donation-status { min-height: 58vh; display: grid; place-items: center; padding-block: 60px; }
.donation-status-card { width: min(100%, 720px); padding: clamp(30px, 6vw, 56px); border: 1px solid var(--border); border-radius: 24px; background: linear-gradient(135deg, var(--surface), var(--bg-soft)); text-align: center; box-shadow: var(--shadow); }
.donation-status-card .donation-mark { margin-inline: auto; }
.donation-status-card h1 { margin-bottom: 14px; font-size: clamp(2rem, 4vw, 3rem); }
.donation-status-card p { margin: 0 auto; max-width: 560px; color: var(--muted); }
.donation-status-card .actions { justify-content: center; }

.donation-widget { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 35; display: grid; justify-items: end; gap: 12px; pointer-events: none; }
.donation-float, .donation-panel { pointer-events: auto; }
.donation-float { min-height: 54px; padding: 0 17px 0 10px; display: inline-flex; align-items: center; gap: 10px; border: 1px solid rgba(88,166,255,.4); border-radius: 99px; background: linear-gradient(135deg, rgba(88,166,255,.96), rgba(82,199,136,.92)); color: #07111c; font-size: .88rem; font-weight: 750; box-shadow: 0 18px 42px rgba(0,0,0,.28); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.donation-float:hover { transform: translateY(-2px); box-shadow: 0 24px 54px rgba(0,0,0,.34); }
.donation-float-icon { width: 36px; height: 36px; padding: 6px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: rgba(255,255,255,.86); box-shadow: inset 0 0 0 1px rgba(7,17,28,.1), 0 8px 16px rgba(7,17,28,.18); }
.donation-float-icon img { width: 100%; height: 100%; display: block; }
.donation-panel { position: relative; width: min(calc(100vw - 30px), 380px); padding: 25px; border: 1px solid var(--border-light); border-radius: 18px; background: rgba(18,24,32,.98); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.38); transform-origin: right bottom; animation: donation-pop .18s ease-out; }
.donation-panel[hidden] { display: none; }
.donation-panel-icon { width: 48px; height: 48px; margin-bottom: 16px; padding: 9px; display: grid; place-items: center; border: 1px solid rgba(88,166,255,.32); border-radius: 15px; background: rgba(88,166,255,.1); }
.donation-panel-icon img { width: 100%; height: 100%; display: block; }
.donation-panel h2 { margin-bottom: 10px; font-size: 1.45rem; }
.donation-panel p:not(.eyebrow) { margin: 0 0 18px; color: #b6c0cb; font-size: .92rem; line-height: 1.58; }
.donation-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: var(--surface-2); color: var(--text); cursor: pointer; }
.donation-qr { margin: 18px 0 20px; display: grid; grid-template-columns: 104px 1fr; align-items: center; gap: 15px; text-align: left; }
.donation-qr img { width: 104px; height: 104px; padding: 9px; border: 1px solid var(--border); border-radius: 13px; background: #ffffff; image-rendering: pixelated; }
.donation-qr span { display: grid; gap: 8px; color: var(--muted); font-size: .82rem; }
.donation-qr .paypal-brand { width: 96px; height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; image-rendering: auto; }
.donation-panel-actions { display: grid; gap: 10px; }
.donation-panel-actions .button { width: 100%; }

@keyframes donation-pop {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* =======================================================
   ENCABEZADOS INTERNOS Y LISTADO DEL BLOG
   Jerarquía editorial compacta, filtros y tarjetas de artículos.
   ======================================================= */
.page-header { padding-block: 48px 22px; }
.page-header h1 { max-width: 780px; margin-bottom: 12px; font-size: clamp(2rem, 3.6vw, 2.8rem); line-height: 1.08; }
.page-header + .section { padding-top: 22px; }
.filter-list { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 38px; }
.filter-list a, .filter-list span { padding: 7px 14px; border: 1px solid var(--border); border-radius: 99px; color: var(--muted); font-size: .78rem; }
.filter-list a:first-child, .filter-list a:hover, .filter-list .active { border-color: var(--border-light); color: var(--text); background: var(--surface); }
.posts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.posts-grid-single { grid-template-columns: minmax(0, 820px); }
.post-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.post-card-image { height: 285px; display: block; overflow: hidden; border-bottom: 1px solid var(--border); background: #0d1218; }
.post-card-image img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top center; transition: transform .35s ease; }
.post-card-image:hover img { transform: scale(1.025); }
.post-card-visual { min-height: 285px; display: flex; align-items: center; justify-content: center; gap: 25px; background: radial-gradient(circle at 50% 30%, rgba(88,166,255,.16), transparent 42%), #131923; color: var(--accent); font: 700 3.3rem ui-monospace, monospace; }
.mini-toggle { width: 64px; height: 33px; padding: 4px; border: 1px solid rgba(82,199,136,.4); border-radius: 99px; background: rgba(82,199,136,.12); }
.mini-toggle i { display: block; width: 23px; height: 23px; margin-left: 29px; border-radius: 50%; background: var(--accent-2); }
.post-card-body { padding: 31px; }
.post-card h2 { max-width: 680px; margin: 18px 0 12px; font-size: clamp(1.4rem, 3vw, 2rem); }
.post-card h2 a:hover { color: var(--accent); }
.post-card-body > p { color: var(--muted); }
.post-card-action { margin-top: 8px; border-color: rgba(88,166,255,.36); background: linear-gradient(135deg, #58a6ff, #8fc9ff); color: #07111c; box-shadow: 0 12px 30px rgba(88,166,255,.18); }
.post-card-action:hover { border-color: rgba(88,166,255,.52); background: linear-gradient(135deg, #75b8ff, #a7d7ff); box-shadow: 0 16px 34px rgba(88,166,255,.25); }
.coming-soon { padding: 32px; display: flex; flex-direction: column; justify-content: flex-end; border: 1px dashed var(--border-light); border-radius: var(--radius); }
.coming-soon .category-icon { margin-bottom: auto; }
.coming-soon h2 { font-size: 1.3rem; }
.coming-soon p { margin-bottom: 0; color: var(--muted); font-size: .88rem; }
.anchor-target { position: absolute; }

.blog-list .posts-grid { width: 100%; grid-template-columns: minmax(0, 1000px); }
.blog-list .post-card { max-width: 1000px; display: grid; grid-template-columns: minmax(360px, 440px) minmax(0, 1fr); }
.blog-list .post-card-image { height: 100%; min-height: 285px; border-right: 1px solid var(--border); border-bottom: 0; box-shadow: inset -1px 0 rgba(255,255,255,.025); }
.blog-list .post-card-body { align-self: center; }

/* =======================================================
   ARTÍCULOS DEL BLOG
   Cabecera, contenido de lectura, figuras, notas y cierre editorial.
   ======================================================= */
.article-header { padding-block: 48px 22px; }
.back-link { display: inline-block; margin-bottom: 30px; color: var(--muted); font-size: .82rem; }
.back-link:hover { color: var(--text); }
.article-header h1 { max-width: 700px; margin: 15px 0 12px; font-size: clamp(2.1rem, 3.6vw, 3rem); line-height: 1.08; }
.article-header .lead { line-height: 1.6; }
.article-hero { margin-bottom: 10px; }
.article-hero img { width: 100%; height: auto; display: block; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); }
.article-hero.article-hero-compact { width: min(calc(100% - 40px), 360px); }
.article-hero.article-hero-compact img { width: min(100%, 266px); margin-inline: auto; }
.article-hero figcaption, .article-figure figcaption, .article-gallery figcaption { margin-top: 12px; color: #6f7a87; font-size: .73rem; text-align: center; }
.article-cover { position: relative; min-height: 440px; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 24px; background: radial-gradient(circle at 50% 50%, rgba(88,166,255,.14), transparent 30%), #131923; }
.cover-orbit { position: absolute; border: 1px solid rgba(88,166,255,.16); border-radius: 50%; }
.orbit-one { width: 600px; height: 600px; }
.orbit-two { width: 850px; height: 320px; transform: rotate(-18deg); }
.cover-panel { position: relative; width: min(300px, 80%); padding: 35px; display: flex; flex-direction: column; border: 1px solid var(--border-light); border-radius: 18px; background: rgba(18,24,32,.93); box-shadow: var(--shadow); }
.cover-panel small { color: var(--accent); font: .65rem ui-monospace, monospace; letter-spacing: .1em; }
.cover-panel strong { margin: 28px 0 17px; font-size: 1.55rem; }
.cover-panel > span { color: var(--muted); font-size: .72rem; }
.power-switch { width: 62px; height: 32px; margin-bottom: 20px; padding: 4px; border-radius: 99px; background: var(--accent-2); }
.power-switch i { display: block; width: 24px; height: 24px; margin-left: 30px; border-radius: 50%; background: #0a1711; }
.article-body { padding-block: 58px; color: #b5bec8; font-size: 1.04rem; }
.article-body p { margin: 0 0 25px; }
.article-body .article-intro { margin-bottom: 52px; color: var(--text); font-size: 1.3rem; line-height: 1.65; }
.article-body h2 { margin: 60px 0 22px; color: var(--text); font-size: 1.75rem; }
.article-body > h2:first-child { margin-top: 0; }
.article-body h3 { margin: 38px 0 16px; color: var(--text); font-size: 1.2rem; letter-spacing: -.015em; }
.article-body ul { margin: 0 0 30px; padding-left: 22px; }
.article-body li { margin: 12px 0; padding-left: 7px; }
.article-body li::marker { color: var(--accent); }
.article-body strong { color: #dce3e9; }
.article-body code { padding: .13em .38em; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: #c7d6e4; font: .86em ui-monospace, SFMono-Regular, Consolas, monospace; }
.code-block { max-width: 100%; margin: 20px 0 28px; padding: 20px 22px; overflow-x: auto; border: 1px solid var(--border); border-radius: 11px; background: #0b1017; color: #d5dee7; font: .84rem/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre; tab-size: 2; }
.code-block code { padding: 0; border: 0; background: none; color: inherit; font: inherit; }
.code-output { border-color: rgba(82,199,136,.25); color: #9fddb9; }
.article-figure { width: 100%; margin: 55px 0; }
.article-figure-wide { width: 100%; margin-inline: 0; transform: none; }
.article-figure img, .article-gallery img { width: 100%; height: auto; display: block; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); }
.article-figure-compact { width: min(100%, 260px); margin-inline: auto; }
.article-figure-compact img { width: min(100%, 190px); margin-inline: auto; }
.article-gallery { width: 100%; margin: 55px 0; display: grid; grid-template-columns: 1fr; gap: 30px; transform: none; }
.article-gallery figure { margin: 0; }
.article-note { margin: 45px 0; padding: 25px 28px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
.article-note span { color: var(--accent); font: 700 .67rem ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.article-note p { margin: 12px 0 0; color: #d3dae1; }
blockquote { margin: 50px 0; padding: 5px 0 5px 30px; border-left: 2px solid var(--accent); color: var(--text); font-size: 1.28rem; font-weight: 500; }
blockquote p { margin: 0 !important; }
.article-end { margin-top: 70px; padding-top: 28px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); color: var(--muted); font-size: .78rem; }

/* =======================================================
   SOFTWARE Y PRINCIPIOS DEL PROYECTO
   Ficha del producto, estado, funciones y criterios de desarrollo.
   ======================================================= */
.software-card { overflow: hidden; display: grid; grid-template-columns: .85fr 1.15fr; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); }
.software-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.project-contact + .software-list { padding-top: 22px; }
.software-list .software-card { grid-template-columns: 1fr; }
.software-list .software-visual { height: 240px; min-height: 0; border-right: 0; border-bottom: 1px solid var(--border); }
.software-list .app-icon { width: 112px; height: 112px; }
.software-list .visual-status { min-height: 20px; white-space: nowrap; }
.software-list .software-info { padding: clamp(28px, 4vw, 42px); align-self: start; }
.software-list .feature-list { grid-template-columns: 1fr; }
.software-visual { min-height: 390px; padding: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px; border-right: 1px solid var(--border); background: radial-gradient(circle, rgba(88,166,255,.16), transparent 45%), #131923; }
.app-icon { width: 130px; height: 130px; display: grid; place-items: center; filter: drop-shadow(0 25px 40px rgba(0,0,0,.34)); }
.app-icon img { width: 100%; height: 100%; display: block; }
.visual-status { color: var(--muted); font-size: .72rem; }
.visual-status i, .status-dot::before { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); }
.software-info { padding: clamp(32px, 5vw, 52px); align-self: center; }
.software-info h2 { margin: 20px 0 14px; font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.software-actions { margin-top: 0; }
.software-lead { max-width: 570px; color: #b5bec8; font-size: 1.1rem; }
.status-dot { color: var(--muted); }
.project-contact { margin-block: 14px 22px; padding: clamp(26px, 5vw, 42px); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; border: 1px solid rgba(88,166,255,.26); border-radius: 22px; background: linear-gradient(135deg, rgba(88,166,255,.14), rgba(82,199,136,.08)); box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.project-contact h2 { margin-bottom: 12px; font-size: clamp(1.55rem, 3vw, 2.25rem); }
.project-contact p:last-child { max-width: 680px; margin: 0; color: var(--muted); }
.project-contact-link { min-height: 52px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 11px; border: 1px solid rgba(88,166,255,.42); border-radius: 99px; background: linear-gradient(135deg, rgba(88,166,255,.25), rgba(37,110,184,.18)); color: #eaf5ff; font-size: .92rem; font-weight: 700; white-space: nowrap; transition: transform .2s, border-color .2s, background .2s, box-shadow .2s; }
.project-contact-link:hover { transform: translateY(-2px); border-color: rgba(88,166,255,.62); background: linear-gradient(135deg, rgba(88,166,255,.34), rgba(37,110,184,.26)); box-shadow: 0 16px 34px rgba(0,0,0,.22); }
.project-contact-link svg { width: 20px; height: 20px; fill: currentColor; }
.feature-list { margin: 32px 0 38px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 30px; list-style: none; color: var(--muted); font-size: .86rem; }
.feature-list li { display: flex; align-items: center; gap: 10px; }
.feature-list li img { width: 25px; height: 25px; flex: 0 0 auto; }
.principles { display: grid; grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr); align-items: stretch; gap: clamp(28px, 5vw, 64px); border-top: 1px solid var(--border); }
.principles-heading { padding: clamp(24px, 4vw, 34px); display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(135deg, rgba(88,166,255,.12), rgba(82,199,136,.07)); }
.principles-heading h2 { margin-bottom: 14px; }
.principles-heading p:last-child { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.65; }
.principle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.principle-grid article { min-height: 210px; padding: 24px; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(180deg, var(--surface), rgba(27,35,48,.72)); box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.principle-grid span { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(88,166,255,.32); border-radius: 12px; background: rgba(88,166,255,.1); color: var(--accent); font: 700 .72rem ui-monospace, monospace; }
.principle-grid h3 { min-height: 2.7em; margin: 26px 0 10px; display: flex; align-items: flex-end; font-size: 1.08rem; letter-spacing: -.02em; }
.principle-grid p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.65; }

/* TODO: convertir la ficha en una cuadrícula cuando se publiquen más proyectos. */

/* =======================================================
   PÁGINAS LEGALES Y DE SEGURIDAD
   Documentos informativos, tarjetas preventivas y reporte responsable.
   ======================================================= */
.legal-header { padding-bottom: 35px; }
.document-date { margin: 24px 0 0; color: #6f7a87; font-size: .76rem; }
.legal-layout { padding-bottom: 90px; }
.legal-layout section { padding: 38px 0; border-top: 1px solid var(--border); }
.legal-layout h2, .security-report h2 { margin-bottom: 18px; font-size: clamp(1.45rem, 3vw, 2rem); }
.legal-layout p, .security-card p, .security-report p { margin: 0 0 16px; color: #b0bac4; }
.legal-layout p:last-child, .security-card p:last-child { margin-bottom: 0; }
.legal-layout a, .security-card a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(88,166,255,.35); text-underline-offset: 4px; }
.legal-layout a:hover, .security-card a:hover { text-decoration-color: var(--accent); }
.security-grid { padding-bottom: 70px; display: grid; gap: 16px; }
.security-card { padding: 32px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.security-card .category-icon { margin-bottom: 25px; }
.security-card h2 { margin-bottom: 14px; font-size: 1.35rem; }
.security-report { margin-bottom: 90px; padding: clamp(30px, 6vw, 55px); border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(135deg, var(--surface), var(--bg-soft)); }
.security-report .button { margin-top: 17px; }

/* =======================================================
   ÁREAS TEMÁTICAS
   Hubs preparados para futuras publicaciones, videos y recursos.
   ======================================================= */
.topic-layout { display: grid; gap: 22px; }
.topic-hero { padding: clamp(28px, 5vw, 48px); display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: clamp(22px, 4vw, 38px); border: 1px solid var(--border); border-radius: 22px; background: linear-gradient(135deg, var(--surface), var(--bg-soft)); }
.topic-hero .category-icon { margin: 0; }
.topic-hero h2 { margin: 18px 0 12px; font-size: clamp(1.65rem, 3vw, 2.25rem); }
.topic-hero p { max-width: 780px; margin: 0; color: var(--muted); }
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.topic-grid article { min-height: 220px; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.topic-grid span { color: var(--accent); font: .7rem ui-monospace, monospace; }
.topic-grid h2 { margin: 28px 0 10px; font-size: 1.25rem; }
.topic-grid p { margin: 0; color: var(--muted); font-size: .9rem; }

/* =======================================================
   MICROINTERACCIONES PARA MOUSE
   Movimiento sutil y profundidad sin afectar dispositivos táctiles.
   ======================================================= */
.hero-workbench, .featured-post, .project-highlight, .post-card, .software-card, .security-card, .about-page { transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease; }
.about-focus li, .principle-grid article { transition: transform .22s ease, border-color .22s ease, background .22s ease; }
.article-figure img, .article-gallery img { transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease; }
.project-highlight-icon img, .app-icon img, .category-icon img { transition: transform .3s ease; }

@media (hover: hover) and (pointer: fine) {
  .hero-workbench:hover { transform: translateY(-5px); border-color: rgba(88,166,255,.6); box-shadow: 0 30px 90px rgba(0,0,0,.34); }
  .featured-post:hover, .project-highlight:hover, .post-card:hover, .software-card:hover, .security-card:hover { transform: translateY(-4px); border-color: rgba(88,166,255,.48); box-shadow: 0 22px 58px rgba(0,0,0,.24); }
  .about-page:hover { border-color: rgba(88,166,255,.42); box-shadow: 0 28px 78px rgba(0,0,0,.28); }
  .about-focus li:hover { transform: translateX(4px); border-color: var(--border-light); background: var(--bg-soft); }
  .principle-grid article:hover { transform: translateY(-3px); background: rgba(255,255,255,.018); }
  .article-figure img:hover, .article-gallery img:hover { transform: translateY(-3px) scale(1.008); border-color: var(--border-light); box-shadow: 0 18px 48px rgba(0,0,0,.24); }
  .project-highlight:hover .project-highlight-icon img, .software-card:hover .app-icon img { transform: scale(1.06) rotate(-2deg); }
  .category-card:hover .category-icon img { transform: scale(1.09); }
  .section-link:hover { color: #82c0ff; }
}

/* =======================================================
   RESPONSIVE: TABLET Y PANTALLAS MEDIANAS
   Reorganiza composiciones complejas antes del diseño móvil.
   ======================================================= */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 80px; gap: 70px; }
  .hero-copy { max-width: 700px; }
  .hero-visual { width: min(100%, 560px); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-post, .software-card { grid-template-columns: 1fr; }
  .featured-code { min-height: 280px; border-left: 0; border-top: 1px solid var(--border); }
  .posts-grid { grid-template-columns: 1fr; }
  .coming-soon { min-height: 270px; }
  .software-visual { min-height: 390px; border-right: 0; border-bottom: 1px solid var(--border); }
  .software-list { grid-template-columns: 1fr; }
  .software-list .software-visual { height: 220px; min-height: 0; }
  .project-contact { grid-template-columns: 1fr; }
  .project-contact-link { justify-self: start; }
  .principles { grid-template-columns: 1fr; gap: 24px; }
  .donation-layout { grid-template-columns: 1fr; }
  .about-heading { grid-template-columns: 1fr; gap: 10px; }
  .about-heading .eyebrow { margin-top: 0; }
  .about-layout { grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr); gap: 30px; }
  .about-portrait { padding-inline: 8px; }
  .about-focus { grid-template-columns: 1fr; }
  .article-header h1 { font-size: clamp(2rem, 5.5vw, 2.2rem); }
  .topic-grid { grid-template-columns: 1fr; }
}

/* Punto intermedio dedicado al retrato y contenido de Acerca de. */
@media (max-width: 760px) {
  .about-layout { grid-template-columns: 1fr; padding: 18px; }
  .about-portrait { padding-block: 28px 16px; }
  .about-portrait img { height: min(360px, 115vw); }
  .about-copy { padding: 10px 4px 6px; }
  .about-focus { grid-template-columns: 1fr 1fr; }
  .about-page { grid-template-columns: 1fr; gap: 28px; }
  .about-page .about-portrait { width: min(100%, 310px); justify-self: center; }
}

/* =======================================================
   RESPONSIVE: MÓVIL
   Menú desplegable, columnas simples y ajustes de lectura táctil.
   ======================================================= */
@media (max-width: 680px) {
  .container, .container-narrow { width: min(calc(100% - 30px), var(--max-width)); }
  .nav { min-height: 64px; }
  .menu-toggle { display: block; }
  .nav-links { position: absolute; top: 64px; left: 0; right: 0; padding: 14px 20px 22px; display: none; flex-direction: column; align-items: stretch; gap: 8px; border-bottom: 1px solid rgba(88,166,255,.24); background: linear-gradient(135deg, rgba(16,33,52,.98), rgba(17,42,45,.98) 48%, rgba(45,32,63,.98)); box-shadow: 0 18px 38px rgba(0,0,0,.24); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 13px; justify-content: flex-start; }
  .nav-links a.active::after { display: none; }
  .hero { padding-block: 72px; gap: 50px; }
  .hero h1 { font-size: 3rem; }
  .hero-visual { overflow: hidden; }
  .hero-visual::before { width: min(260px, 72vw); height: min(260px, 72vw); inset: -40px auto auto 24px; filter: blur(70px); }
  .hero-profile { align-items: flex-start; }
  .hero-workbench { border-radius: 16px; }
  .workbench-header { padding-inline: 15px; font-size: .57rem; }
  .active-project { padding: 22px 18px; grid-template-columns: 43px 1fr; gap: 14px; }
  .active-project img { width: 43px; height: 43px; }
  .workbench-section { padding: 19px 18px; }
  .project-highlight { grid-template-columns: 1fr; }
  .project-highlight-icon { width: 90px; height: 90px; padding: 14px; }
  .topic-hero { grid-template-columns: 1fr; }
  .section { padding-block: 65px; }
  .section-heading { grid-template-columns: 1fr; gap: 15px; }
  .section-heading > p { justify-self: start; }
  .category-grid { grid-template-columns: 1fr; }
  .category-card { min-height: 245px; }
  .featured-content, .featured-code { padding: 30px; }
  .about { padding-block: 52px; }
  .about-heading { margin-bottom: 28px; }
  .about-layout { gap: 28px; padding: 12px; border-radius: 20px; }
  .about-portrait { padding-block: 24px 14px; border-radius: 15px; }
  .about-focus { grid-template-columns: 1fr; }
  .professional-links { flex-direction: column; }
  .profile-link { width: 100%; justify-content: space-between; }
  .footer-content { gap: 40px; flex-direction: column; }
  .footer-content nav { justify-content: flex-start; gap: 16px 20px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 7px; }
  .page-header { padding-block: 48px 22px; }
  .page-header h1 { font-size: clamp(1.9rem, 8vw, 2.25rem); line-height: 1.08; }
  .page-header + .section { padding-top: 22px; }
  .post-card-visual { min-height: 220px; }
  .post-card-image { height: 220px; }
  .blog-list .post-card { grid-template-columns: 1fr; }
  .blog-list .post-card-image { height: 210px; min-height: 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .article-header { padding-block: 42px 20px; }
  .back-link { margin-bottom: 24px; }
  .article-header h1 { font-size: clamp(1.8rem, 8vw, 2rem); line-height: 1.1; }
  .article-cover { min-height: 350px; border-radius: 0; width: 100%; border-left: 0; border-right: 0; }
  .article-hero { width: min(calc(100% - 30px), var(--max-width)); }
  .article-hero img { border-radius: 15px; }
  .article-body { padding-block: 55px; }
  .article-body .article-intro { font-size: 1.15rem; }
  .article-end { align-items: flex-start; flex-direction: column; gap: 22px; }
  .feature-list { grid-template-columns: 1fr; }
  .principle-grid { grid-template-columns: 1fr; }
  .principle-grid article { min-height: 0; }
  .principle-grid h3 { min-height: 0; }
  .project-contact-link { width: 100%; white-space: normal; }
  .donation-page { padding-block: 42px 70px; }
  .donation-hero, .donation-card, .donation-status-card { border-radius: 18px; }
  .donation-actions .button { width: 100%; }
  .donation-widget { left: 15px; right: 15px; bottom: 15px; justify-items: end; }
  .donation-float { min-height: 50px; padding-right: 14px; }
  .donation-panel { width: 100%; max-width: 380px; justify-self: center; padding: 22px; transform-origin: center bottom; }
  .donation-qr { grid-template-columns: 88px 1fr; }
  .donation-qr img { width: 88px; height: 88px; }
}

/* =======================================================
   TEMA CLARO
   Fondo plomo claro y superficies suaves para lectura extendida.
   ======================================================= */
:root[data-theme="light"] .site-header { border-bottom-color: rgba(37,110,184,.25); background: linear-gradient(135deg, rgba(37,110,184,.95), rgba(33,137,91,.9) 48%, rgba(120,86,184,.92)); }
:root[data-theme="light"] .lead,
:root[data-theme="light"] .hero-subtitle,
:root[data-theme="light"] .featured-content > p,
:root[data-theme="light"] .project-highlight p,
:root[data-theme="light"] .post-card-body > p,
:root[data-theme="light"] .article-body,
:root[data-theme="light"] .software-lead,
:root[data-theme="light"] .legal-layout p,
:root[data-theme="light"] .security-card p,
:root[data-theme="light"] .security-report p { color: var(--muted); }
:root[data-theme="light"] .hero-workbench,
:root[data-theme="light"] .featured-post,
:root[data-theme="light"] .project-highlight,
:root[data-theme="light"] .software-card,
:root[data-theme="light"] .about-layout,
:root[data-theme="light"] .about-page,
:root[data-theme="light"] .security-report { background: linear-gradient(135deg, #fbfcfe, #eef2f7); }
:root[data-theme="light"] .workbench-header,
:root[data-theme="light"] .featured-code,
:root[data-theme="light"] .software-visual,
:root[data-theme="light"] .post-card-image,
:root[data-theme="light"] .article-cover { background: #e4e9f0; }
:root[data-theme="light"] .active-project,
:root[data-theme="light"] .workbench-section { border-color: var(--border); }
:root[data-theme="light"] .active-project p,
:root[data-theme="light"] .expertise-list li,
:root[data-theme="light"] .workbench-stack > div span,
:root[data-theme="light"] .tech-list span,
:root[data-theme="light"] .featured-code small,
:root[data-theme="light"] .visual-status,
:root[data-theme="light"] .status-dot { color: #5f6c7b; }
:root[data-theme="light"] .article-body .article-intro,
:root[data-theme="light"] blockquote,
:root[data-theme="light"] .article-note p,
:root[data-theme="light"] .article-body strong,
:root[data-theme="light"] .about-copy strong,
:root[data-theme="light"] .about-lead,
:root[data-theme="light"] .hero-profile strong { color: var(--text); }
:root[data-theme="light"] .article-body code { background: #e7ebf1; color: #263445; }
:root[data-theme="light"] .code-block { background: #202936; color: #eef3f9; }
:root[data-theme="light"] .code-output { border-color: rgba(33,137,91,.35); color: #bce8cf; }
:root[data-theme="light"] .article-note,
:root[data-theme="light"] .post-card,
:root[data-theme="light"] .category-card,
:root[data-theme="light"] .security-card { background: var(--surface); }
:root[data-theme="light"] .principles-heading,
:root[data-theme="light"] .principle-grid article { background: linear-gradient(135deg, #fbfcfe, #eef2f7); }
:root[data-theme="light"] .project-contact { background: linear-gradient(135deg, rgba(37,110,184,.1), rgba(33,137,91,.07)); }
:root[data-theme="light"] .donation-hero,
:root[data-theme="light"] .donation-status-card { background: linear-gradient(135deg, #fbfcfe, #eef2f7); }
:root[data-theme="light"] .donation-card { background: radial-gradient(circle at 50% 20%, rgba(37,110,184,.12), transparent 46%), var(--surface); }
:root[data-theme="light"] .donation-panel { background: rgba(251,252,254,.98); box-shadow: 0 26px 70px rgba(31,42,56,.22); }
:root[data-theme="light"] .donation-panel p:not(.eyebrow) { color: var(--muted); }
:root[data-theme="light"] .project-contact-link { border-color: rgba(37,110,184,.34); background: linear-gradient(135deg, rgba(37,110,184,.16), rgba(37,110,184,.08)); color: #1f66aa; }
:root[data-theme="light"] .card-link { border-color: rgba(37,110,184,.24); background: rgba(37,110,184,.09); color: #1f66aa; }
:root[data-theme="light"] .category-card:hover .card-link { border-color: rgba(37,110,184,.4); background: rgba(37,110,184,.14); color: #154d82; }
:root[data-theme="light"] .text-link-article { border-color: rgba(37,110,184,.28); background: linear-gradient(135deg, rgba(37,110,184,.14), rgba(37,110,184,.07)); color: #1f66aa; }
:root[data-theme="light"] .text-link-project { border-color: rgba(33,137,91,.28); background: linear-gradient(135deg, rgba(33,137,91,.14), rgba(33,137,91,.07)); color: #1f744f; }
:root[data-theme="light"] .text-link-github { border-color: rgba(120,86,184,.28); background: linear-gradient(135deg, rgba(120,86,184,.16), rgba(37,45,59,.08)); color: #5d4293; }
:root[data-theme="light"] .text-link:hover { color: #12304c; box-shadow: 0 12px 28px rgba(31,42,56,.12); }
:root[data-theme="light"] .about-page .about-portrait { background: radial-gradient(circle at 50% 18%, rgba(37,110,184,.12), transparent 56%), #f4f6fa; }
:root[data-theme="light"] .about-focus li { background: #f6f8fb; box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
:root[data-theme="light"] .about-focus img { padding: 4px; border-radius: 9px; background: rgba(37,110,184,.09); }
:root[data-theme="light"] .social-linkedin { background: rgba(37,110,184,.1); color: #1f66aa; }
:root[data-theme="light"] .social-github { background: #f6f8fb; color: #1f2935; }
:root[data-theme="light"] .site-footer { background: #dfe5ec; }
:root[data-theme="light"] .footer-bottom { color: #687586; }

/* =======================================================
   MOVIMIENTO Y ACCESIBILIDAD
   Respeta la preferencia del sistema y neutraliza transiciones.
   ======================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
