/* Luchonet 2026 - estilo propio, sin frameworks */

:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef3f9;
  --text: #16202c;
  --muted: #5a6776;
  --line: #dde4ec;
  --accent: #1f6fb8;
  --accent-soft: #d9e9f8;
  --accent-text: #0f4f8a;
  --term-bg: #0f1722;
  --term-text: #cfe3f7;
  --term-prompt: #7cc4ff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 8px 24px rgba(16, 32, 48, .06);
  --maxw: 1100px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d131b;
    --surface: #151e29;
    --surface-2: #1b2633;
    --text: #e6edf5;
    --muted: #9aa8b8;
    --line: #263444;
    --accent: #6cb6f5;
    --accent-soft: #1b3550;
    --accent-text: #9fd0fb;
    --term-bg: #080d13;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}

.brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  white-space: nowrap;
}
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.site-nav a {
  color: var(--muted);
  font-size: .95rem;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
}
.site-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }

.lang-switch {
  font-family: var(--mono);
  font-size: .8rem;
  font-weight: 700;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
}
.lang-switch:hover { border-color: var(--accent); text-decoration: none; }

/* ---------- Hero ---------- */

.hero { padding: 72px 0 56px; }

.hero .wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-family: var(--mono);
  font-size: .85rem;
  color: var(--accent-text);
  background: var(--accent-soft);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 0 0 18px;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  margin: 0 0 18px;
}
.hero h1 em { font-style: normal; color: var(--accent); }

.hero .lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 28px; max-width: 34em; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #06121e; } }

.hero-card {
  position: relative;
  background: var(--term-bg);
  color: var(--term-text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-family: var(--mono);
  font-size: .85rem;
}
.hero-card .bar { display: flex; gap: 6px; padding: 12px 14px; background: rgba(255, 255, 255, .05); }
.hero-card .bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a4757; }
.hero-card .bar i:nth-child(1) { background: #ff5f57; }
.hero-card .bar i:nth-child(2) { background: #febc2e; }
.hero-card .bar i:nth-child(3) { background: #28c840; }
.hero-card .body { display: flex; gap: 18px; padding: 18px; align-items: flex-start; }
.hero-card img { width: 110px; border-radius: 10px; filter: grayscale(1) contrast(1.05); flex-shrink: 0; }
.hero-card pre { margin: 0; white-space: pre-wrap; line-height: 1.7; }
.hero-card .p { color: var(--term-prompt); }
.hero-card .dim { color: #7d8b9b; }
.cursor { display: inline-block; width: .6em; height: 1.1em; background: var(--term-prompt); vertical-align: text-bottom; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Secciones ---------- */

section { padding: 56px 0; scroll-margin-top: 64px; }
section.alt { background: var(--surface); border-block: 1px solid var(--line); }

.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -.02em; margin: 0 0 6px; }
.section-head p { color: var(--muted); margin: 0; }
.section-head .kicker { font-family: var(--mono); color: var(--accent); font-size: .85rem; margin-bottom: 6px; }

.about {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 40px;
  align-items: start;
}
.about .prose p { margin: 0 0 1em; }

.grid { display: grid; gap: 18px; }
.grid-areas { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid-ideas { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid-interests { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .15s ease, border-color .15s ease;
}
section.alt .card { background: var(--bg); }
a.card { color: inherit; display: block; }
a.card:hover, .card:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }

.area .thumb { aspect-ratio: 4 / 3; background: #fff; display: grid; place-items: center; overflow: hidden; }
.area .thumb img { width: 100%; height: 100%; object-fit: cover; }
.area .thumb.icon { background: var(--accent-soft); color: var(--accent); font-family: var(--mono); font-size: 2.4rem; font-weight: 700; }
.area h3 { font-size: 1.05rem; margin: 0; padding: 14px 16px 4px; }
.area p { font-size: .9rem; color: var(--muted); margin: 0; padding: 0 16px 16px; }

.idea { padding: 22px; position: relative; }
.idea .more { position: absolute; right: 18px; bottom: 14px; color: var(--muted); font-size: 1.2rem; }
a.idea:hover .more { color: var(--accent); }
.card.is-soon { opacity: .75; }
.card.is-soon:hover { transform: none; border-color: var(--line); }
.badge {
  font-family: var(--mono); font-size: .7rem; font-weight: 600; vertical-align: middle;
  color: var(--accent-text); background: var(--accent-soft);
  padding: 2px 8px; border-radius: 999px; margin-left: 6px; white-space: nowrap;
}
.idea .num { font-family: var(--mono); color: var(--accent); font-size: .85rem; }
.idea h3 { margin: 6px 0 8px; font-size: 1.15rem; }
.idea p { margin: 0; color: var(--muted); font-size: .95rem; }

a.card.interest { display: flex; gap: 16px; align-items: center; padding: 16px; }
.interest .ico {
  width: 64px; height: 64px; flex-shrink: 0;
  background: #fff; border-radius: 12px; border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden; padding: 6px;
}
.interest .ico img { max-height: 100%; width: auto; object-fit: contain; }
.interest h3 { margin: 0 0 2px; font-size: 1.05rem; }
.interest p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.interest .arrow { margin-left: auto; color: var(--muted); font-size: 1.2rem; }
a.interest:hover .arrow { color: var(--accent); }

/* ---------- Contacto ---------- */

.contact-banner { border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; box-shadow: var(--shadow); }
.contact-banner img { width: 100%; max-height: 260px; object-fit: cover; }

.social { display: flex; flex-wrap: wrap; gap: 12px; }
.social .btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Artículos (páginas de contenido) ---------- */

.article-hero { padding: 56px 0 24px; }
.article-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 12px; }
.article-hero h1 em { font-style: normal; color: var(--accent); }
.article-hero .lead { font-size: 1.15rem; color: var(--muted); margin: 0; max-width: 40em; }
.article-hero .byline { margin-top: 18px; color: var(--muted); font-size: .9rem; font-family: var(--mono); }

.breadcrumb { font-family: var(--mono); font-size: .85rem; color: var(--muted); margin: 0 0 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

.article { max-width: 760px; padding-bottom: 48px; }
.article h2 { font-size: 1.5rem; letter-spacing: -.01em; margin: 44px 0 12px; scroll-margin-top: 80px; }
.article h2 .tag { font-family: var(--mono); font-size: .8rem; color: var(--accent); display: block; margin-bottom: 4px; font-weight: 600; }
.article h3 { font-size: 1.15rem; margin: 28px 0 8px; }
.article p { margin: 0 0 1.05em; }
.article strong.hl, .article .hl { color: var(--accent-text); font-weight: 600; }

.article figure { margin: 24px 0; }
.article figure .frame { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: inline-block; max-width: 100%; }
.article figure img { border-radius: 8px; }
.article figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.article .float { float: right; width: 44%; max-width: 320px; margin: 4px 0 16px 24px; }
.article .float.sm { width: 30%; max-width: 200px; }
.article .clear { clear: both; }

.callout {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
  font-size: 1.05rem;
}
.defs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 20px 0; }
.defs .card { padding: 18px; }
.defs h3 { margin: 0 0 6px; font-size: 1rem; }
.defs h3 small { color: var(--muted); font-weight: 400; }
.defs p { margin: 0; font-size: .95rem; color: var(--muted); }

.quote { margin: 36px 0; padding: 24px; text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quote p { font-size: 1.2rem; font-style: italic; margin: 0 0 8px; }
.quote cite { font-size: .85rem; color: var(--muted); font-style: normal; }

.toc { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 8px; }
.toc a { font-family: var(--mono); font-size: .85rem; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); background: var(--surface); }
.toc a:hover { border-color: var(--accent); text-decoration: none; }

a.card.next-card, .next-card { display: flex; gap: 16px; align-items: center; padding: 18px; margin-top: 32px; }
.next-card img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: #fff; }
.next-card .k { font-family: var(--mono); font-size: .8rem; color: var(--accent); }
.next-card h3 { margin: 2px 0 0; font-size: 1.1rem; }
.next-card .arrow { margin-left: auto; color: var(--muted); font-size: 1.3rem; }
a.next-card:hover .arrow { color: var(--accent); }

@media (max-width: 640px) {
  .article .float, .article .float.sm { float: none; width: auto; max-width: 100%; margin: 16px 0; }
}

.article .lead-p { font-size: 1.12rem; color: var(--muted); }
.article ul.list, .article ol.steps { padding-left: 1.2em; margin: 0 0 1.2em; }
.article ul.list li, .article ol.steps li { margin: 0 0 .5em; }
.article ol.steps li::marker { color: var(--accent); font-family: var(--mono); font-weight: 700; }
.article figure img { max-width: 100%; height: auto; }
.article > figure picture img, .article > div figure img { border-radius: var(--radius); border: 1px solid var(--line); }

/* ---------- Blog (tarjetas de artículos) ---------- */

.grid-posts { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-soon { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-soon .idea h3 { margin-top: 10px; }
a.post-card { color: inherit; display: flex; flex-direction: column; }
.post-card { display: flex; flex-direction: column; }
.post-thumb { aspect-ratio: 16 / 9; background: #fff; overflow: hidden; border-bottom: 1px solid var(--line); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.post-meta { display: flex; gap: 12px; font-family: var(--mono); font-size: .78rem; color: var(--muted); margin-bottom: 6px; }
.post-body h3 { margin: 0 0 6px; font-size: 1.12rem; line-height: 1.3; }
.post-body p { margin: 0 0 12px; color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.post-body .more { margin-top: auto; color: var(--accent); font-weight: 600; font-size: .9rem; }

.profile-card { display: flex; gap: 18px; padding: 20px; align-items: center; }
.profile-card img { width: 96px; height: 120px; object-fit: cover; border-radius: 12px; filter: grayscale(1); flex-shrink: 0; }
.profile-card h3 { margin: 0 0 4px; }
.profile-card p { margin: 0 0 8px; color: var(--muted); font-size: .95rem; }
.profile-card .links { margin: 0; font-size: .9rem; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.post-nav .next-card { margin-top: 0; }
.post-nav .next-card .arrow { margin-left: 0; }
.post-nav .next-card:last-child:not(:first-child) { text-align: right; justify-content: flex-end; }
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } }

.site-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

/* ---------- Pie ---------- */

.site-footer { padding: 32px 0; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.site-footer code { font-family: var(--mono); }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero { padding: 40px 0 32px; }
  .hero .wrap, .about { grid-template-columns: 1fr; gap: 28px; }
  section { padding: 40px 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .site-header .wrap { flex-wrap: wrap; gap: 4px 12px; padding-top: 8px; }
  .site-nav { order: 3; width: 100%; margin-left: -12px; }
  .lang-switch { margin-left: auto; }
  .grid-interests { grid-template-columns: 1fr; }
  .hero-card img { width: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
  .card { transition: none; }
}

/* El código se muestra tal cual se escribe: sin ligaduras tipográficas (<= no se convierte en ≤, != en ≠, etc.) */
code, pre, kbd, samp, .brand, .eyebrow, .kicker, .breadcrumb, .post-meta, .hero-card {
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}
