:root {
  --ink: #111923;
  --graphite: #26303b;
  --muted: #606a73;
  --paper: #f3f0e7;
  --sheet: #fffdf7;
  --blue: #2764d8;
  --cyan: #76d3d0;
  --amber: #f2b84b;
  --error: #d6534d;
  --line: #c9c5bb;
  --grid: rgba(17, 25, 35, .055);
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 12px 12px 0 rgba(17, 25, 35, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  font-family: var(--sans);
  line-height: 1.65;
}
a { text-underline-offset: .2em; }
.skip { position: absolute; left: -999px; }
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  padding: .7rem 1rem;
  color: #fff;
  background: var(--ink);
}

.site-header {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
  background: rgba(243, 240, 231, .92);
}
.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--ink);
  font-family: var(--mono);
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: -.025em;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 2rem;
  border: 1px solid var(--ink);
  color: var(--cyan);
  background: var(--ink);
  font-size: .82rem;
  letter-spacing: -.14em;
}
.site-header nav { display: flex; gap: .25rem; }
.site-header nav a {
  padding: .45rem .75rem;
  border: 1px solid transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
}
.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--sheet);
}

main { max-width: 1240px; margin: 0 auto; padding: 0 2rem; }
.hero {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  border: 1px solid var(--ink);
  background: var(--sheet);
  box-shadow: var(--shadow);
}
.hero-copy {
  min-height: 510px;
  padding: clamp(3rem, 7vw, 6.5rem) clamp(2rem, 6vw, 5rem) 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--ink);
}
.eyebrow,
.category {
  margin: 0 0 1rem;
  color: var(--blue);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.eyebrow::before { content: "[ "; color: var(--error); }
.eyebrow::after { content: " ]"; color: var(--error); }
.hero h1 {
  max-width: 750px;
  margin: 0 0 1.6rem;
  font-size: clamp(3rem, 5.7vw, 5.7rem);
  font-weight: 790;
  letter-spacing: -.065em;
  line-height: .97;
}
.intro { max-width: 640px; margin: 0; color: var(--muted); font-size: 1.12rem; }
.diagnostic-board {
  position: relative;
  min-width: 0;
  padding: 2.2rem;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
  overflow: hidden;
  color: #f6f8fa;
  background: var(--graphite);
}
.monitor-label {
  display: flex;
  justify-content: space-between;
  color: #bfc9d2;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.monitor-label::after { content: "● en observación"; color: var(--cyan); }
.device-shot {
  min-height: 285px;
  margin: 0;
  border: 1px solid #697480;
  background: #0c1118;
}
.device-shot img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(.84) contrast(1.03); }
.error-note {
  width: min(92%, 430px);
  margin: -4.7rem 0 0 auto;
  position: relative;
  padding: 1.15rem 1.3rem;
  border: 1px solid var(--ink);
  border-left: 8px solid var(--error);
  color: var(--ink);
  background: #fff8dd;
  box-shadow: 7px 7px 0 rgba(0, 0, 0, .28);
}
.error-note span { display: block; margin-bottom: .35rem; color: var(--error); font-family: var(--mono); font-size: .69rem; font-weight: 850; letter-spacing: .08em; }
.error-note strong { display: block; font-size: 1.05rem; }
.error-note p { margin: .35rem 0 0; font-size: .9rem; line-height: 1.5; }
.protocol {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  background: #e8e4d9;
}
.protocol-step { min-height: 150px; padding: 1.6rem 1.8rem; border-right: 1px solid var(--ink); }
.protocol-step:last-child { border-right: 0; }
.protocol-step span { display: block; margin-bottom: 1rem; color: var(--error); font-family: var(--mono); font-size: .72rem; font-weight: 850; }
.protocol-step strong { display: block; margin-bottom: .35rem; font-size: 1.25rem; }
.protocol-step p { margin: 0; color: var(--muted); font-size: .93rem; }

.latest {
  padding: 7rem 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.5rem;
}
.section-heading {
  grid-column: 1 / -1;
  margin-bottom: 1rem;
  padding-bottom: 1.25rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
}
.section-heading h2 { margin: 0; font-size: clamp(2.3rem, 4vw, 4rem); letter-spacing: -.05em; line-height: 1; }
.section-heading > p { margin: 0; color: var(--muted); font-family: var(--mono); font-size: .73rem; text-transform: uppercase; }
.post-card {
  grid-column: span 4;
  display: grid;
  grid-template-rows: 250px 1fr;
  min-width: 0;
  border: 1px solid var(--ink);
  background: var(--sheet);
  box-shadow: 6px 6px 0 rgba(17, 25, 35, .09);
}
.post-card:nth-of-type(1),
.post-card:nth-of-type(6) { grid-column: span 7; grid-template-columns: 1.15fr .85fr; grid-template-rows: minmax(390px, auto); }
.post-card:nth-of-type(2),
.post-card:nth-of-type(7) { grid-column: span 5; }
.post-card:nth-of-type(4),
.post-card:nth-of-type(9) { grid-column: span 5; }
.post-card:nth-of-type(5),
.post-card:nth-of-type(10) { grid-column: span 7; grid-template-columns: .9fr 1.1fr; grid-template-rows: minmax(390px, auto); }
.image-link { display: block; min-height: 0; overflow: hidden; background: #d8d6ce; }
.image-link img,
.article-image img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .image-link img { transform: scale(1.025); }
.post-copy { padding: clamp(1.5rem, 3vw, 2.5rem); align-self: center; }
.post-copy h3 { margin: .65rem 0 1rem; font-size: clamp(1.55rem, 2.5vw, 2.35rem); letter-spacing: -.035em; line-height: 1.08; }
.post-copy h3 a { color: var(--ink); text-decoration: none; }
.post-copy > p { color: var(--muted); font-size: .96rem; }
.read-more { display: inline-block; margin-top: .9rem; color: var(--blue); font-family: var(--mono); font-size: .76rem; font-weight: 850; text-decoration: none; text-transform: uppercase; }
.read-more:hover { text-decoration: underline; }

footer {
  max-width: 1240px;
  margin: 0 auto 2rem;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  border: 1px solid var(--ink);
  color: var(--muted);
  background: var(--sheet);
  font-family: var(--mono);
  font-size: .78rem;
}
footer p { margin: 0; }
footer p:last-child { text-align: right; }
footer strong { color: var(--ink); }

.about-wrap { padding-top: 6rem; padding-bottom: 8rem; }
.about-wrap > h1 { max-width: 930px; margin: .4rem 0 4rem; font-size: clamp(4rem, 10vw, 9rem); letter-spacing: -.08em; line-height: .82; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); border: 1px solid var(--ink); background: var(--sheet); box-shadow: var(--shadow); }
.about-lead { margin: 0; padding: clamp(2.5rem, 6vw, 5rem); border-right: 1px solid var(--ink); font-size: clamp(2rem, 3.5vw, 3.25rem); font-weight: 720; letter-spacing: -.045em; line-height: 1.12; }
.about-body { padding: 2.5rem; align-self: end; color: var(--muted); font-size: 1.04rem; }
.about-body::before { content: "NOTA / 01"; display: block; margin-bottom: 1.3rem; color: var(--error); font-family: var(--mono); font-size: .7rem; font-weight: 850; letter-spacing: .1em; }

.article-wrap { max-width: 1120px; padding-top: 4rem; }
.article-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 245px;
  grid-template-areas: "title category" "title dek" "title byline";
  gap: 1rem 3.5rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  text-align: left;
}
.article-header .category { grid-area: category; align-self: end; }
.article-header h1 { grid-area: title; margin: 0; font-size: clamp(3.3rem, 6.5vw, 6.3rem); font-weight: 790; letter-spacing: -.07em; line-height: .93; }
.dek { grid-area: dek; margin: 0; color: var(--muted); font-size: 1.03rem; line-height: 1.55; }
.byline { grid-area: byline; display: grid; gap: .3rem; color: var(--muted); font-family: var(--mono); font-size: .69rem; text-transform: uppercase; }
.article-image { height: min(58vw, 650px); margin: 3rem 0 4rem 5rem; border: 1px solid var(--ink); background: #d8d6ce; box-shadow: var(--shadow); }
.prose { max-width: 740px; margin: 0 auto; font-family: Georgia, "Times New Roman", serif; font-size: 1.16rem; line-height: 1.82; }
.prose p { margin: 0 0 1.5rem; }
.prose h2 { margin: 3.5rem 0 1.25rem; padding: .8rem 0 .75rem 1rem; border-left: 5px solid var(--amber); border-bottom: 1px solid var(--line); color: var(--ink); font-family: var(--sans); font-size: 1.85rem; letter-spacing: -.03em; line-height: 1.18; }
.prose a { color: var(--blue); text-decoration-thickness: 2px; }
.prose li { margin: .5rem 0; }
.note { margin: 2.5rem -2.5rem; padding: 1.5rem 1.7rem; border: 1px solid var(--ink); border-left: 8px solid var(--cyan); background: #e6f5f1; font-family: var(--sans); }
.note p { margin: .35rem 0 0; }
.article-nav { max-width: 740px; margin: 5rem auto 8rem; padding-top: 1.5rem; display: flex; justify-content: space-between; gap: 1.5rem; border-top: 1px solid var(--ink); }
.article-nav a { color: var(--blue); font-family: var(--mono); font-size: .76rem; font-weight: 850; text-decoration: none; }

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { min-height: auto; border-right: 0; border-bottom: 1px solid var(--ink); }
  .diagnostic-board { min-height: 470px; }
  .post-card,
  .post-card:nth-of-type(n) { grid-column: span 6; grid-template-columns: 1fr; grid-template-rows: 240px 1fr; }
  .article-header { grid-template-columns: minmax(0, 1fr) 210px; gap: 1rem 2rem; }
}

@media (max-width: 680px) {
  .site-header { padding: 1rem; align-items: flex-start; }
  .brand { font-size: .78rem; }
  .brand-mark { width: 2.55rem; }
  .site-header nav { display: grid; gap: .15rem; }
  .site-header nav a { padding: .2rem .35rem; font-size: .66rem; }
  main { padding: 0 1rem; }
  .hero { margin-top: 1rem; box-shadow: 6px 6px 0 rgba(17, 25, 35, .11); }
  .hero-copy { padding: 3.2rem 1.35rem; }
  .hero h1 { font-size: clamp(2.9rem, 15vw, 4.3rem); }
  .diagnostic-board { min-height: 420px; padding: 1.1rem; }
  .device-shot { min-height: 240px; }
  .error-note { margin-top: -3.5rem; }
  .protocol { grid-template-columns: 1fr; }
  .protocol-step { min-height: auto; border-right: 0; border-bottom: 1px solid var(--ink); }
  .protocol-step:last-child { border-bottom: 0; }
  .latest { padding: 4.5rem 0; display: block; }
  .section-heading { margin-bottom: 1.25rem; align-items: flex-start; }
  .section-heading > p { display: none; }
  .post-card,
  .post-card:nth-of-type(n) { display: grid; grid-template-columns: 1fr; grid-template-rows: 225px 1fr; margin-bottom: 1.25rem; }
  .post-copy { padding: 1.5rem 1.25rem; }
  footer { margin: 0 1rem 1rem; padding: 1.4rem 1rem; grid-template-columns: 1fr; }
  footer p:last-child { text-align: left; }
  .about-wrap { padding-top: 4rem; padding-bottom: 5rem; }
  .about-wrap > h1 { font-size: clamp(3.8rem, 20vw, 6rem); }
  .about-grid { grid-template-columns: 1fr; box-shadow: 6px 6px 0 rgba(17, 25, 35, .11); }
  .about-lead { padding: 2rem 1.4rem; border-right: 0; border-bottom: 1px solid var(--ink); }
  .about-body { padding: 2rem 1.4rem; }
  .article-wrap { padding-top: 2.4rem; }
  .article-header { display: block; padding: 1.5rem 0 2rem; }
  .article-header h1 { margin: .8rem 0 1.25rem; font-size: clamp(3rem, 15vw, 4.6rem); }
  .dek { margin-bottom: 1.2rem; }
  .article-image { height: 68vw; margin: 2rem 0 3rem; box-shadow: 6px 6px 0 rgba(17, 25, 35, .11); }
  .prose { font-size: 1.08rem; }
  .prose h2 { font-size: 1.55rem; }
  .note { margin: 2rem 0; }
  .article-nav { display: block; margin-bottom: 5rem; }
  .article-nav a { display: block; margin-top: 1rem; }
}
