/* ============================================================
   RelevantSec (relevantsec.com)
   Monochrome design system. Black canvas, white ink.
   ============================================================ */

:root {
  --bg: #050505;
  --bg-elev: #0c0c0c;
  --bg-elev-2: #111111;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ededed;
  --text-soft: #c9c9c9;
  --muted: #9a9a9a;
  --dim: #666666;
  --white: #ffffff;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --wrap: 1160px;
  --wrap-narrow: 760px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 72px;
}

/* ----------------------------------------------------------- base */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--white); color: var(--bg); }

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

a { color: inherit; }

.mono { font-family: var(--font-mono); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}
.wrap-narrow { max-width: var(--wrap-narrow); }

/* page fade-in */
body.preload main, body.preload .footer { opacity: 0; }
body.loaded main, body.loaded .footer {
  opacity: 1;
  transition: opacity 0.6s ease;
}

/* film-grain overlay: the thing that makes flat black feel like material */
.noise {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------------- reveal */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.9s var(--ease) var(--d, 0ms),
    transform 0.9s var(--ease) var(--d, 0ms);
  will-change: opacity, transform;
}
[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* ----------------------------------------------------------- nav */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(5, 5, 5, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav-inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-mark {
  width: 30px;
  height: 30px;
  transition: transform 0.5s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(180deg); }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.13rem;
  letter-spacing: 0.01em;
  color: var(--white);
}
.brand-thin { font-weight: 300; color: var(--muted); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-link {
  position: relative;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 450;
  color: var(--muted);
  transition: color 0.25s ease;
  padding: 6px 0;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.nav-link:hover { color: var(--white); }
.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-rss { display: inline-flex; align-items: center; }
.nav-rss::after { display: none; }

/* EN / ES language toggle */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.lang-opt {
  color: var(--dim);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s ease;
}
.lang-opt:hover { color: var(--text); }
.lang-opt.active { color: var(--white); font-weight: 600; }
.lang-sep { color: var(--line-strong); }
.lang-switch-mobile {
  justify-content: center;
  margin-top: 30px;
  gap: 14px;
  font-size: 1rem;
}

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: 0;
  cursor: pointer;
  z-index: 210;
}
.nav-burger span {
  display: block;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.35s var(--ease), opacity 0.3s;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4.25px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4.25px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 5, 5, 0.96);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 10px 30px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.25s;
  transition-delay: calc(var(--i, 0) * 70ms);
}
.mobile-menu.open a { opacity: 1; transform: none; }
.mobile-menu a:hover { color: var(--dim); }

/* ----------------------------------------------------------- hero */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 76px 76px;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 40%, black 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 75% at 50% 40%, black 30%, transparent 75%);
}

.hero-glow {
  position: absolute;
  width: 900px;
  height: 900px;
  left: 50%;
  top: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 0%, transparent 60%);
  animation: glow-drift 16s ease-in-out infinite alternate;
}
@keyframes glow-drift {
  from { transform: translate(-70%, 0) scale(1); }
  to   { transform: translate(-30%, 12%) scale(1.15); }
}

.hero-watermark {
  position: absolute;
  right: -8%;
  bottom: -14%;
  width: min(56vw, 720px);
  opacity: 0.035;
  transform: rotate(-8deg);
}

.hero-inner { position: relative; z-index: 1; padding-top: var(--nav-h); }

.hero-eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  min-height: 1.4em;
  margin: 0 0 26px;
}
.typed-cursor {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  margin-left: 3px;
  background: var(--white);
  vertical-align: text-bottom;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-title {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.7rem, 7.2vw, 5.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--white);
}
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title .line {
  opacity: 0;
  transform: translateY(40px);
  animation: rise 1s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes rise {
  to { opacity: 1; transform: none; }
}

.hero-title .outline {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--white);
  transition: color 0.6s ease;
}
.hero-title .outline:hover { color: var(--white); }

.hero-sub {
  max-width: 560px;
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 40px;
  opacity: 0;
  animation: rise 1s var(--ease) forwards;
  animation-delay: var(--d, 380ms);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  opacity: 0;
  animation: rise 1s var(--ease) forwards;
  animation-delay: var(--d, 520ms);
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  width: 1px;
  height: 60px;
  overflow: hidden;
  opacity: 0.6;
}
.hero-scroll span {
  display: block;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--white));
  animation: scroll-hint 2.2s var(--ease) infinite;
}
@keyframes scroll-hint {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

/* ----------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid var(--white);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s var(--ease), box-shadow 0.3s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-solid {
  background: var(--white);
  color: var(--bg);
}
.btn-solid:hover { box-shadow: 0 8px 32px rgba(255, 255, 255, 0.18); }

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--white); }

.btn-lg { padding: 16px 34px; font-size: 1.05rem; }

.btn svg { transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

/* ----------------------------------------------------------- marquee */

.marquee {
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding: 14px 0;
  background: var(--bg-elev);
}
.marquee-track {
  display: flex;
  gap: 28px;
  width: max-content;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
  animation: marquee 36s linear infinite;
}
.marquee-track span { display: inline-block; }
.m-sep { color: var(--line-strong); }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ----------------------------------------------------------- sections */

.section { padding: 110px 0; position: relative; }
.section-alt {
  background: var(--bg-elev);
  border-block: 1px solid var(--line);
}

.kicker {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--dim);
  margin: 0 0 14px;
}

.section-head { margin-bottom: 56px; }
.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  letter-spacing: -0.02em;
  color: var(--white);
  line-height: 1.15;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.25s, border-color 0.25s;
}
.link-more:hover { color: var(--white); border-color: var(--white); }
.link-more svg { transition: transform 0.3s var(--ease); }
.link-more:hover svg { transform: translateX(4px); }

.empty-note { color: var(--dim); }

/* ----------------------------------------------------------- focus grid */

.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.focus-card {
  background: var(--bg);
  padding: 38px 30px;
  transition: background 0.35s ease;
  position: relative;
  overflow: hidden;
}
.focus-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.05), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.focus-card:hover::before { opacity: 1; }
.focus-card:hover { background: var(--bg-elev); }

.focus-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
.focus-icon { color: var(--white); }
.focus-num {
  font-size: 0.78rem;
  color: var(--dim);
  letter-spacing: 0.1em;
}
.focus-card h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--white);
}
.focus-card p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ----------------------------------------------------------- post cards */

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px 28px;
  background: var(--bg);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: transform 0.4s var(--ease), border-color 0.35s ease, box-shadow 0.4s ease;
}
.post-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--dim);
  letter-spacing: 0.04em;
}
.dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--dim);
}

.post-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--white);
}
.post-card-desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.post-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}
.post-card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--white);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s ease, transform 0.35s var(--ease);
  white-space: nowrap;
}
.post-card:hover .post-card-arrow { opacity: 1; transform: none; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 100px;
  text-decoration: none;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
a.tag:hover { color: var(--bg); background: var(--white); border-color: var(--white); }

/* ----------------------------------------------------------- about */

.about-grid {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: clamp(40px, 7vw, 90px);
  align-items: center;
}

.about-frame {
  position: relative;
  border: 1px solid var(--line-strong);
  padding: 0;
}
.about-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  transform: translate(16px, 16px);
  pointer-events: none;
  transition: transform 0.5s var(--ease);
}
.about-media:hover .about-frame::after { transform: translate(8px, 8px); }
.about-frame img {
  display: block;
  width: 100%;
  filter: grayscale(1);
}

.about-body .section-title { margin-bottom: 24px; }
.about-body p {
  color: var(--muted);
  margin: 0 0 18px;
  max-width: 56ch;
}
.about-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  font-size: 0.85rem;
  color: var(--text-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ----------------------------------------------------------- contact */

.contact {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 80% at 50% 110%, rgba(255, 255, 255, 0.06), transparent 70%),
    var(--bg);
}
.contact-inner { text-align: center; }
.contact-title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  letter-spacing: -0.02em;
  color: var(--white);
  line-height: 1.25;
}
.contact-sub {
  color: var(--muted);
  margin: 0 auto 40px;
  max-width: 46ch;
}

/* ----------------------------------------------------------- footer */

.footer {
  border-top: 1px solid var(--line);
  padding: 60px 0 34px;
  background: var(--bg);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.footer-wordmark { width: 180px; opacity: 0.92; }
.footer-tag {
  color: var(--dim);
  font-size: 0.78rem;
  margin: 14px 0 0;
  letter-spacing: 0.04em;
}
.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.25s;
}
.footer-links a:hover { color: var(--white); }
.footer-legal {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.8rem;
}
.footer-domain { letter-spacing: 0.08em; }

/* ----------------------------------------------------------- page head */

.page-head {
  padding: calc(var(--nav-h) + 90px) 0 50px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 55% 90% at 50% -30%, rgba(255, 255, 255, 0.05), transparent 70%),
    var(--bg);
}
.page-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  letter-spacing: -0.02em;
  color: var(--white);
  line-height: 1.05;
}
.page-sub { color: var(--muted); margin: 0; }
.page-404 { border-bottom: 0; min-height: calc(100svh - var(--nav-h)); display: flex; align-items: center; padding-bottom: 120px; }
.page-404 .page-sub code { color: var(--text-soft); }

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}
.tag-filter-item.active {
  color: var(--bg);
  background: var(--white);
  border-color: var(--white);
}
.tag-count { opacity: 0.55; margin-left: 2px; }

/* ----------------------------------------------------------- post rows */

.section-list { padding: 40px 0 110px; }

.post-row {
  display: grid;
  grid-template-columns: 132px 1fr 40px;
  gap: 26px;
  align-items: center;
  padding: 30px 6px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background 0.3s ease, padding-left 0.35s var(--ease);
}
.post-row:hover {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.025), transparent);
  padding-left: 16px;
}

/* per-post thumbnail (custom image or branded fallback tile) */
.post-row-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg-elev);
}
.post-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* show the whole image, don't crop wide banners */
  object-position: center;
  display: block;
  filter: grayscale(1) contrast(1.02);
  transition: transform 0.4s var(--ease), filter 0.3s ease;
}
.post-row:hover .post-row-thumb img { transform: scale(1.05); }
.post-row:hover .post-row-thumb:not(.post-row-thumb-fallback) img { filter: grayscale(0); }
.post-row-thumb-fallback {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(var(--a, 135deg), rgba(255, 255, 255, 0.035) 0 6px, transparent 6px 13px),
    linear-gradient(var(--a, 135deg), var(--bg-elev-2), var(--bg));
}
.post-row-thumb-fallback img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  opacity: 0.85;
  filter: none;
}
.post-row:hover .post-row-thumb-fallback img { transform: none; }

.post-row-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
  transition: color 0.25s;
}
.post-row-desc {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 0.93rem;
  max-width: 68ch;
}
.post-row-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--dim);
  margin-bottom: 11px;
}
.post-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.post-row-arrow {
  color: var(--dim);
  transition: color 0.25s, transform 0.35s var(--ease);
}
.post-row:hover .post-row-arrow {
  color: var(--white);
  transform: translateX(6px);
}

/* ----------------------------------------------------------- post page */

.post-head {
  padding: calc(var(--nav-h) + 80px) 0 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 56px;
  background:
    radial-gradient(ellipse 55% 90% at 50% -30%, rgba(255, 255, 255, 0.05), transparent 70%),
    var(--bg);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--dim);
  text-decoration: none;
  margin-bottom: 34px;
  transition: color 0.25s;
}
.back-link:hover { color: var(--white); }
.back-link svg { transition: transform 0.3s var(--ease); }
.back-link:hover svg { transform: translateX(-4px); }

/* small, faded accent banner at the top of an article (from post `image`) */
.post-banner {
  position: relative;
  height: clamp(104px, 17vw, 150px);
  margin: 2px 0 28px;
  overflow: hidden;
  border-radius: 6px;
}
.post-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: saturate(0.85);
  opacity: 0.6; /* faded — a hint of color, not a hero */
}
/* melt the edges into the page so it reads as a subtle accent */
.post-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(5, 5, 5, 0.35), rgba(5, 5, 5, 0) 45%, var(--bg)),
    linear-gradient(to right, var(--bg), rgba(5, 5, 5, 0) 12% 88%, var(--bg));
  pointer-events: none;
}

/* notice shown when a post is served in a different language than the UI */
.post-langnote {
  margin: 0 0 26px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--muted);
  border-radius: 2px;
  background: var(--bg-elev);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

/* branded strip marking a page as first-party RelevantSec research */
.research-banner {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 13px;
  max-width: 100%;
  padding: 10px 18px 10px 13px;
  margin: 0 0 26px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--white);
  border-radius: 2px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.022) 0 5px, transparent 5px 11px),
    var(--bg-elev);
}
.research-banner-mark {
  flex: none;
  opacity: 0.92;
}
.research-banner-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.research-banner-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
}
.research-banner-sub {
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  color: var(--dim);
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .research-banner {
    display: flex;
    padding-inline: 12px 14px;
  }
}

.post-title {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--white);
}
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin-bottom: 18px;
}

/* ----------------------------------------------------------- prose */

.prose {
  font-size: 1.04rem;
  line-height: 1.8;
  color: var(--text-soft);
}
.prose > *:first-child { margin-top: 0; }

.prose h2, .prose h3, .prose h4 {
  font-family: var(--font-display);
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 2.4em 0 0.7em;
  position: relative;
}
.prose h2 { font-size: 1.7rem; font-weight: 600; }
.prose h3 { font-size: 1.32rem; font-weight: 600; }
.prose h4 { font-size: 1.1rem; font-weight: 600; }

.h-anchor {
  margin-left: 10px;
  color: var(--dim);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.25s;
  font-weight: 400;
}
.prose h2:hover .h-anchor,
.prose h3:hover .h-anchor,
.prose h4:hover .h-anchor { opacity: 1; }
.h-anchor:hover { color: var(--white); }

/* ---------------------------------------------- floating table of contents */
.toc {
  position: fixed;
  top: calc(var(--nav-h) + 58px);
  left: calc(50% + var(--wrap-narrow) / 2 + 20px);
  width: 184px;
  max-height: calc(100vh - var(--nav-h) - 120px);
  overflow-y: auto;
  z-index: 15;
  display: none; /* shown only where there's gutter room (see media query) */
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.toc-head {
  margin: 0 0 12px;
  padding-left: 15px;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}
.toc-link {
  display: block;
  padding: 6px 8px 6px 15px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.83rem;
  line-height: 1.35;
  transition: color 0.2s, border-color 0.2s;
}
.toc-h3 .toc-link {
  padding-left: 29px;
  font-size: 0.79rem;
  color: var(--dim);
}
.toc-link:hover { color: var(--text); }
.toc-link.active {
  color: var(--white);
  border-left-color: var(--white);
}
.toc-h3 .toc-link.active { color: var(--text); }

@media (min-width: 1200px) {
  .page-post .toc { display: block; }
}

.prose p { margin: 0 0 1.4em; }

.prose a {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.25s;
}
.prose a:hover { text-decoration-color: var(--white); }

.prose strong { color: var(--white); font-weight: 600; }

.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--dim); }

.prose blockquote {
  margin: 2em 0;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--white);
  color: var(--muted);
  font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 3em 0;
}

.prose code:not(.hljs) {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  padding: 0.15em 0.45em;
  border-radius: 5px;
  color: var(--text);
  white-space: nowrap;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
}
.prose th, .prose td {
  border: 1px solid var(--line);
  padding: 10px 16px;
  text-align: left;
}
.prose th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--white);
  background: var(--bg-elev);
  white-space: nowrap;
}
.prose tr:hover td { background: rgba(255, 255, 255, 0.015); }

/* figures / images in posts */
.post-figure {
  margin: 2.4em 0;
}
.post-figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.post-figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--dim);
  margin-top: 12px;
  text-align: center;
}

/* ----------------------------------------------------------- code blocks */

.code-block {
  margin: 2.2em 0;
  border: 1px solid var(--line);
  background: #090909;
  overflow: hidden;
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.code-lang {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.code-copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 10px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.code-copy:hover { color: var(--white); border-color: var(--line-strong); }
.code-copy.copied { color: var(--bg); background: var(--white); border-color: var(--white); }

.code-block pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
}
.code-block code.hljs {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  background: transparent;
  padding: 0;
  display: block;
}

/* --------------------------------------------------------------
   Syntax theme.
   Restrained color on near-black, tuned to sit beside the
   monochrome brand without shouting. Weight/slant still help.
   -------------------------------------------------------------- */
.hljs { color: #d6d6d6; }
.hljs-comment, .hljs-quote { color: #6b7489; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-doctag { color: #bb9af7; font-weight: 600; }
.hljs-type, .hljs-built_in { color: #2ac3de; }
.hljs-string, .hljs-meta .hljs-string, .hljs-regexp { color: #9ece6a; }
.hljs-number, .hljs-symbol, .hljs-bullet, .hljs-link { color: #ff9e64; }
.hljs-title, .hljs-title.function_, .hljs-title.class_,
.hljs-function .hljs-title, .hljs-name { color: #7aa2f7; font-weight: 500; }
.hljs-attr, .hljs-attribute, .hljs-variable, .hljs-template-variable,
.hljs-selector-attr, .hljs-selector-class, .hljs-selector-id { color: #e0af68; }
.hljs-params { color: #d6d6d6; }
.hljs-meta, .hljs-section { color: #7dcfff; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }
.hljs-addition { color: #9ece6a; background: rgba(158, 206, 106, 0.12); }
.hljs-deletion { color: #f7768e; background: rgba(247, 118, 142, 0.10); }

/* ----------------------------------------------------------- post footer */

.post-foot { margin: 80px 0 100px; }

.post-foot-rule {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 48px;
  opacity: 0.55;
}
.post-foot-rule::before, .post-foot-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color 0.3s, background 0.3s;
}
.post-nav-item:hover { border-color: var(--line-strong); background: var(--bg-elev); }
.post-nav-empty { border: 0; pointer-events: none; }
.post-nav-next { text-align: right; align-items: flex-end; }
.post-nav-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--dim);
}
.post-nav-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--white);
  line-height: 1.35;
}

/* ----------------------------------------------------------- 404 glitch */

.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
}
.glitch::before { animation: glitch-a 3.2s steps(2) infinite; }
.glitch::after { animation: glitch-b 2.7s steps(2) infinite; }
@keyframes glitch-a {
  0%, 92%, 100% { transform: none; clip-path: inset(0 0 0 0); }
  94% { transform: translate(-6px, 2px); clip-path: inset(15% 0 55% 0); }
  97% { transform: translate(5px, -2px); clip-path: inset(60% 0 10% 0); }
}
@keyframes glitch-b {
  0%, 90%, 100% { transform: none; clip-path: inset(0 0 0 0); }
  93% { transform: translate(6px, -1px); clip-path: inset(40% 0 35% 0); }
  96% { transform: translate(-5px, 1px); clip-path: inset(5% 0 75% 0); }
}

/* ----------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 340px; }
  .post-row { grid-template-columns: 84px 1fr; gap: 18px; align-items: start; }
  .post-row-arrow { display: none; }
  .post-row-thumb { margin-top: 4px; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .section { padding: 80px 0; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-next { text-align: left; align-items: flex-start; }
  .hero-watermark { right: -30%; opacity: 0.03; }
  .footer-inner { flex-direction: column; }
}

/* ----------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
  .hero-title .line, .hero-sub, .hero-cta { opacity: 1; transform: none; }
  .typed-cursor { display: none; }
}
