@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap");

/* ==========================================================================
   blog.redteamshell.com — Flexoki theme layer
   Fonts are @imported above rather than <link>ed from a head partial:
   layouts/partials/extra-head.html is gitignored in this repo, so anything
   placed there never reaches the build.
   Loaded via params.customCSS, i.e. AFTER the hello-friend-ng stylesheet,
   so equal-specificity rules here win. Theme rules scoped as
   `[data-theme=dark] .x` are beaten with `html[data-theme=...] .x`.
   ========================================================================== */

/* --- tokens ------------------------------------------------------------- */

:root {
  --bg: #100f0f;
  --bg-2: #1c1b1a;
  --bg-3: #282726;
  --text: #cecdc3;
  --text-2: #878580;
  --muted: #85847f;
  --line: #403e3c;
  --hair: #282726;
  --accent: #de594c;
  --accent-ink: #100f0f;
  --green: #879a39;
  --blue: #4385be;
  --gold: #d0a215;
  --purple: #8b7ec8;
  --header-bg: rgba(16, 15, 15, 0.86);
  --card-surface: radial-gradient(62% 92% at 74% 32%, #0b0c0d 0%, #070708 48%, #040404 100%);
  --card-edge: linear-gradient(150deg, #403e3c 0%, #282726 45%, #141312 100%);
  --sel: rgba(222, 89, 76, 0.28);

  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --maxw: 75rem;
  --measure: 34em;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --radius: 10px;
  --radius-sm: 6px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fffcf0;
    --bg-2: #f2f0e5;
    --bg-3: #e6e4d9;
    --text: #100f0f;
    --text-2: #6f6e69;
    --muted: #6f6e69;
    --line: #dad8ce;
    --hair: #e6e4d9;
    --accent: #af3029;
    --accent-ink: #fffcf0;
    --green: #66800b;
    --blue: #205ea6;
    --gold: #ad8301;
    --purple: #5e409d;
    --header-bg: rgba(255, 252, 240, 0.86);
    --sel: rgba(175, 48, 41, 0.2);
  }
}

:root[data-theme="light"] {
  --bg: #fffcf0;
  --bg-2: #f2f0e5;
  --bg-3: #e6e4d9;
  --text: #100f0f;
  --text-2: #6f6e69;
  --muted: #6f6e69;
  --line: #dad8ce;
  --hair: #e6e4d9;
  --accent: #af3029;
  --accent-ink: #fffcf0;
  --green: #66800b;
  --blue: #205ea6;
  --gold: #ad8301;
  --purple: #5e409d;
  --header-bg: rgba(255, 252, 240, 0.86);
  --sel: rgba(175, 48, 41, 0.2);
}

:root[data-theme="dark"] {
  --bg: #100f0f;
  --bg-2: #1c1b1a;
  --bg-3: #282726;
  --text: #cecdc3;
  --text-2: #878580;
  --muted: #85847f;
  --line: #403e3c;
  --hair: #282726;
  --accent: #de594c;
  --accent-ink: #100f0f;
  --green: #879a39;
  --blue: #4385be;
  --gold: #d0a215;
  --purple: #8b7ec8;
  --header-bg: rgba(16, 15, 15, 0.86);
  --sel: rgba(222, 89, 76, 0.28);
}

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

html { letter-spacing: normal; }

html body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--f-text);
  font-size: 1.0625rem;
  line-height: 1.6;
}

::selection { background: var(--sel); }

html body a { color: inherit; text-decoration: none; }
html body a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
  border-radius: 2px;
}

.container {
  justify-content: flex-start;
  text-align: left;
  max-width: none;
  padding: 0;
  margin: 0;
}

.content { margin: 0; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  letter-spacing: -0.025em;
  color: var(--text);
}

/* --- header ------------------------------------------------------------- */

html body .header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair);
}

html body .header__inner {
  /* width:100% is REQUIRED: the theme sets `width:760px; max-width:100%`, and
     replacing its max-width here would otherwise leave 760px unclamped,
     overflowing every viewport narrower than that. */
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  min-height: 4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

html body .logo {
  font-family: var(--f-mono);
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

html body .logo__mark { color: var(--accent); margin-right: 0.35rem; }
html body .logo__cursor { background: var(--accent); }

html body .header__right { margin-left: auto; display: flex; align-items: center; gap: 1rem; }

html body .menu__inner { gap: clamp(1rem, 3vw, 2rem); }
html body .menu__inner li { margin: 0; text-transform: none; font-size: 0.9375rem; color: var(--text-2); }
html body .menu__inner li a { color: var(--text-2); }
html body .menu__inner li a:hover { color: var(--accent); }

html body .theme-toggle svg { color: var(--text-2); }

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

html body .footer {
  margin-top: 0;
  padding: 2.25rem 0;
  border-top: 1px solid var(--hair);
  background: transparent;
}

html body .footer__inner {
  /* see .header__inner — same 760px clamp applies */
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  text-align: left;
}

html body .footer__content {
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

html body .footer__content span { margin-right: 1.25rem; }
html body .footer__content a { color: var(--muted); }
html body .footer__content a:hover { color: var(--accent); }

/* ==========================================================================
   Homepage
   ========================================================================== */

.rts { width: 100%; position: relative; }

.rts-section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) var(--pad);
  border-top: 1px solid var(--hair);
  position: relative;
  z-index: 1;                       /* keep every section above .rts-scene */
}

.rts-section--first { border-top: 0; }

.rts-h2 {
  margin: 0 0 1.25rem;
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.1;
}

.rts-lede {
  margin: 0 0 2.5rem;
  max-width: var(--measure);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-2);
}

.rts-eyebrow {
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* hero background scene (static/js/scene.js)
   Sits as a direct child of main.rts rather than inside .rts-hero, so
   left/right:0 resolves against the full content width. Deliberately NOT
   `width: 100vw` — on a desktop with a classic scrollbar 100vw is wider
   than the content box and would reintroduce the horizontal scroll this
   stylesheet already had to fix once. */

.rts-scene {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: paint;
  /* dissolve the bottom edge instead of cutting the field off on a line */
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}

@supports (height: 100lvh) {
  .rts-scene { height: 100lvh; }
}

.rts-scene > canvas {
  display: block;
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}

.rts-scene.is-shown > canvas { opacity: 1; }

/* hero */

.rts-hero { padding-top: clamp(4rem, 11vw, 8.5rem); }
.rts-hero__eyebrow { margin: 0 0 1.75rem; }

.rts-hero__name {
  margin: 0 0 1.5rem;
  font-weight: 700;
  font-size: clamp(2.75rem, 9vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.rts-hero__lede {
  margin: 0 0 2.5rem;
  max-width: var(--measure);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
  color: var(--text-2);
}

.rts-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }

.rts-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.5rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: opacity 180ms var(--ease);
}

html body .rts-btn:hover { color: var(--accent-ink); opacity: 0.88; }

.rts-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  font-size: 0.9375rem;
}

.rts-link--quiet { color: var(--text); border-bottom: 1px solid var(--line); }
.rts-link--accent { color: var(--accent); }

/* disclosures */

.rts-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.rts-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.rts-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.5rem;
  background: var(--bg-2);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
}

.rts-card__flags { display: flex; align-items: center; gap: 0.6rem; }

.rts-flag {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rts-flag--green { color: var(--green); }
.rts-flag--gold { color: var(--gold); }

.rts-card__kind { font-family: var(--f-mono); font-size: 0.75rem; color: var(--muted); }

.rts-card__title {
  margin: 0;
  font-weight: 600;
  font-size: 1.1875rem;
  line-height: 1.3;
}

.rts-card__body { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); }

.rts-card__foot {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--hair);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rts-card__project { font-family: var(--f-mono); font-size: 0.8125rem; color: var(--text); }
.rts-card__meta { font-family: var(--f-mono); font-size: 0.75rem; color: var(--muted); }
.rts-card__note { font-size: 0.875rem; color: var(--muted); }

.rts-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--blue);
}

.rts-pending { margin: 1.75rem 0 0; font-family: var(--f-mono); font-size: 0.8125rem; color: var(--muted); }

/* recognition */

.rts-rec { display: flex; gap: 1.25rem; padding: 1.75rem; background: var(--bg-2); border: 1px solid var(--hair); border-radius: var(--radius); }

.rts-rec__icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rts-rec__icon--purple { color: var(--purple); }
.rts-rec__icon--gold { color: var(--gold); }

.rts-rec__title { margin: 0 0 0.5rem; font-weight: 600; font-size: 1.1875rem; }
.rts-rec__body { margin: 0 0 0.75rem; font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); }
.rts-rec__meta { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.rts-verify {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
  margin: 1.75rem 0 0;
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

.rts-verify__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--blue);
}

.rts-verify__link:hover { text-decoration: underline; }

/* the shared svg partial hardcodes 24x24 — size it down for a text row */
.rts-verify__link svg { width: 15px; height: 15px; flex-shrink: 0; }

.rts-verify__sep { color: var(--hair); }

/* writing */

.rts-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.rts-head .rts-h2 { margin: 0; }

.rts-posts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.rts-posts li { border-bottom: 1px solid var(--hair); margin: 0; }

.rts-posts a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.75rem;
  padding: 1.4rem 0;
}

.rts-posts__date {
  flex-shrink: 0;
  width: 6.5rem;
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

.rts-posts__title {
  flex: 999 1 22rem;
  min-width: 0;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1.1875rem;
  line-height: 1.35;
}

.rts-posts__time { flex-shrink: 0; font-family: var(--f-mono); font-size: 0.8125rem; color: var(--muted); }

/* about */

.rts-about { display: flex; flex-wrap: wrap; gap: clamp(2rem, 5vw, 4rem); }
.rts-about__copy { flex: 999 1 28rem; min-width: 0; }
.rts-about__copy p { margin: 0 0 1.25rem; max-width: var(--measure); font-size: 1.0625rem; line-height: 1.7; color: var(--text-2); }
.rts-about__aside { flex: 1 1 26rem; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }

/* ==========================================================================
   Contact card
   ========================================================================== */

.card3d {
  width: min(28rem, 100%);
  perspective: 1200px;
  filter: drop-shadow(0 26px 28px rgba(0, 0, 0, 0.36)) drop-shadow(0 6px 8px rgba(0, 0, 0, 0.22));
}

:root[data-theme="light"] .card3d,
:root:not([data-theme="dark"]) .card3d {
  filter: drop-shadow(0 26px 30px rgba(16, 15, 15, 0.22)) drop-shadow(0 5px 9px rgba(16, 15, 15, 0.16));
}

.card3d__tilt {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 160ms var(--ease);
}

.card3d__body { position: relative; aspect-ratio: 1.75; transform-style: preserve-3d; }

.card3d__slab {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: var(--card-edge);
  transform: translateZ(var(--z));
}

.card3d__face {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  transform-style: preserve-3d;
  transition: opacity 150ms ease;
}

.card3d__front { transform: translateZ(5px); opacity: 1; }
.card3d__back { transform: translateZ(4px); opacity: 0; pointer-events: none; }

.card3d[data-flipped="true"] .card3d__front { opacity: 0; pointer-events: none; }
.card3d[data-flipped="true"] .card3d__back { opacity: 1; pointer-events: auto; }

.card3d__surface {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--card-surface);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12), inset 1px 0 rgba(255, 255, 255, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.card3d__glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.35;
  transform: translateZ(0.5px);
  background:
    radial-gradient(38% 60% at var(--gx, 62%) var(--gy, 22%), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06) 46%, rgba(255, 255, 255, 0) 72%),
    linear-gradient(112deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.045) 48%, rgba(255, 255, 255, 0) 62%);
}

.card3d__photo {
  position: absolute;
  right: 0;
  bottom: 0;
  width: auto;
  height: 100%;
  aspect-ratio: 500 / 540;
  border-bottom-right-radius: 12px;
  transform: translateZ(14px) scale(0.988);
  transform-origin: 100% 100%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 20%);
  mask-image: linear-gradient(to right, transparent 0%, #000 20%);
  pointer-events: none;
}

.card3d__text {
  position: absolute;
  top: 11%;
  bottom: 11%;
  left: 7%;
  width: 56%;
  display: flex;
  flex-direction: column;
  color: #cecdc3;
  transform: translateZ(26px) scale(0.978);
  transform-origin: 0 0;
}

.card3d__site { margin: 0 0 auto; color: #878580; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.card3d__name { margin: 0 0 0.45rem; font-family: var(--f-display); font-weight: 700; font-size: clamp(1.375rem, 1.1rem + 1.1vw, 1.75rem); letter-spacing: -0.03em; line-height: 0.95; color: #cecdc3; }
.card3d__role { margin: 0; color: #878580; font-size: clamp(0.75rem, 0.7rem + 0.2vw, 0.875rem); line-height: 1.45; }
.card3d__place { margin: 0.75rem 0 0; font-family: var(--f-mono); color: #85847f; font-size: 0.75rem; }

.card3d__inner {
  position: absolute;
  inset: 11% 8%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
  color: #cecdc3;
  transform: translateZ(22px) scale(0.982);
}

.card3d__rule { display: block; height: 1px; margin: 0.6rem 0; background: linear-gradient(90deg, #de594c, #8b7ec8, #4385be); opacity: 0.85; }
.card3d__contact { margin: 0; color: #878580; font-family: var(--f-mono); font-size: 0.8125rem; line-height: 1.6; }
.card3d__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 0.75rem; }

html body .card3d__save {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 1.1rem;
  border: 1px solid #cecdc3;
  border-radius: 4px;
  background: #cecdc3;
  color: #050506;
  font-size: 0.9375rem;
  font-weight: 700;
}

html body .card3d__save:hover { background: transparent; color: #cecdc3; }

.card3d__social { display: flex; gap: 0.15rem; margin: 0; padding: 0; list-style: none; }
.card3d__social li { margin: 0; }
html body .card3d__social a { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; color: #878580; }
html body .card3d__social a:hover { color: #cecdc3; }

.card3d-flip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}

.card3d-flip:hover { color: var(--text); }

/* ==========================================================================
   Post + list pages
   ========================================================================== */

html body .post,
html body .posts {
  max-width: 50rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) var(--pad);
  text-align: left;
}

html body .post-title {
  margin: 0 0 1.5rem;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-align: left;
}

html body .post-title a { color: var(--text); }

html body .post-info {
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: left;
}

html body .post-info p { margin: 0.35rem 0; }
html body .post-info a { color: var(--muted); }
html body .post-info a:hover { color: var(--accent); }
html body .post-info svg { width: 15px; height: 15px; vertical-align: -2px; }

html body .post-content { font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.125rem); line-height: 1.75; }
html body .post-content > p,
html body .post-content > ul,
html body .post-content > ol,
html body .post-content > blockquote { max-width: var(--measure); }
html body .post-content h2 { margin: 2.75rem 0 1.25rem; font-size: clamp(1.5rem, 3.5vw, 2rem); line-height: 1.2; }
html body .post-content h3 { margin: 2rem 0 1rem; font-size: 1.3125rem; }
html body .post-content a { color: var(--blue); border-bottom: 1px solid transparent; }
html body .post-content a:hover { color: var(--accent); border-bottom-color: var(--accent); }
html body .post-content img { border-radius: var(--radius); border: 1px solid var(--hair); }
html body .post-content hr { border: none; border-top: 1px solid var(--hair); margin: 2.5rem 0; }

html body .post-content blockquote {
  margin: 0 0 1.5rem;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 2px solid var(--accent);
  border-right: 0;
  font-style: italic;
  color: var(--text-2);
}

html body .post-content blockquote p { margin: 0; }

/* The theme hangs a decorative “ glyph at left:-40px off every blockquote.
   We replaced that treatment with an accent rule, and the glyph escapes the
   layout box, so switch it off. */
html body blockquote:before { content: none; }

html body code {
  font-family: var(--f-mono);
  font-size: 0.875em;
  padding: 0.15em 0.4em;
  background: var(--bg-3);
  border-radius: 4px;
  color: var(--text);
}

html body pre {
  background: var(--bg-2);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  font-family: var(--f-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  overflow-x: auto;
}

html body pre code { background: none; padding: 0; font-size: inherit; }

html body #toc {
  margin-bottom: 3rem;
  padding: 1.5rem 1.75rem;
  background: var(--bg-2);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
}

html body .toc-title {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

html body #toc ul { list-style: none; padding-left: 0; margin: 0; }
html body #toc ul ul { padding-left: 1rem; }
html body #toc li { margin: 0.4rem 0; font-size: 0.9375rem; }
html body #toc a { color: var(--text-2); }
html body #toc a:hover { color: var(--accent); }

html body .tag a,
html body span.tag a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 0.7rem;
  margin: 0 0.3rem 0.3rem 0;
  background: var(--bg-2);
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: var(--text-2);
}

html body .tag a:hover { color: var(--accent); border-color: var(--accent); }

/* post list */

html body .posts h1 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.03em;
  margin-bottom: 2.5rem;
}

html body .post-year {
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 0.5rem;
}

html body .posts-list { list-style: none; padding: 0; }
html body .post-item { border-bottom: 1px solid var(--hair); }

html body .post-item-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
  padding: 1.1rem 0;
  border: 0;
}

html body .post-title,
html body .post-item .post-title { border: 0; }

html body .post-item .post-title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.35;
  margin: 0;
}

html body .post-day { font-family: var(--f-mono); font-size: 0.8125rem; color: var(--muted); }

/* ==========================================================================
   Responsive + motion
   ========================================================================== */

/* --- overflow containment -----------------------------------------------
   Long unbreakable strings (repo paths, URLs, email addresses) are the other
   way a narrow viewport gains a horizontal scrollbar. */

.rts-card__project,
.rts-card__meta,
.card3d__contact,
html body .post-content { overflow-wrap: anywhere; }

/* Theme sets `min-width:400px` on post tables, which beats its own
   max-width:100% below 400px. Clamp it and let wide tables scroll
   in their own box rather than widening the page. */
html body .post-content table { min-width: 0; max-width: 100%; }

/* Theme gives .post-cover a hard 860px width and -50px side margins. */
html body .post-cover { width: auto; max-width: 100%; }

@media (max-width: 900px) {
  .rts-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 684px) {
  .rts-grid-3,
  .rts-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .rts-posts__date { width: auto; }
  .rts-posts a { gap: 0.25rem 1rem; }
  .rts-posts__title { flex: 1 1 100%; }
  html body .footer__content span { display: inline-block; margin-bottom: 0.4rem; }

  /* keep the dropdown menu off the screen edge */
  html body .menu { right: var(--pad); }

  /* wide tables scroll inside the article instead of stretching the page */
  html body .post-content table { display: block; overflow-x: auto; }

  html body .post-content ul,
  html body .post-content ol { margin-left: 0; padding-left: 1.5rem; }

  html body .post-content blockquote { margin-left: 0; margin-right: 0; }

  .rts-card { padding: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card3d__tilt { transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
