/* ============================================
   DESIGN TOKENS — change these to reskin the site
   ============================================ */
:root {
  /* Color */
  --bg: #0b0b0b;
  --bg-alt: #141412;
  --bg-raised: #1a1a17;
  --text: #ededE6;
  --text-dim: #8a8a82;
  --text-faint: #504f49;
  --border: #262622;
  --border-strong: #3a3a34;
  --accent: #ffb000;
  --accent-dim: #8c6100;
  --accent-bg: rgba(255, 176, 0, 0.08);

  /* Type */
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Layout */
  --nav-h: 64px;
  --max-w: 1200px;
  --gap: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

img, video {
  max-width: 100%;
  display: block;
}

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

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

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(11, 11, 11, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 0.5px solid var(--border);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav-brand span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links a {
  color: var(--text-dim);
  position: relative;
  padding: 4px 0;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 0.5px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.18s ease;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a {
    padding: 14px 32px;
    width: 100%;
    border-bottom: 0.5px solid var(--border);
  }
  .nav-toggle {
    display: block;
  }
}

/* ============================================
   TIMECODE — signature element
   ============================================ */
.timecode {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.timecode::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: 1px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

h1 { font-size: clamp(40px, 7vw, 88px); }
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: 20px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

p.lead {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 52ch;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 110px 0 90px;
  border-bottom: 0.5px solid var(--border);
}

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

.hero h1 {
  font-size: clamp(32px, 4.5vw, 56px);
  white-space: nowrap;
}

.hero-portrait-col {
  max-width: 420px;
  margin: 0 32px 0 auto;
}

.hero-portrait {
  aspect-ratio: 4/5;
  border: 0.5px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.hero-portrait-caption {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tech-badges {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}

.tech-badge {
  width: 26px;
  height: 26px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tech-badge img.invert {
  filter: invert(1);
}

@media (max-width: 880px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
  .hero-portrait-col {
    max-width: 280px;
    margin: 0 auto;
    order: -1;
  }

  .hero-portrait-caption {
    text-align: center;
  }
}

.hero-frame {
  margin-top: 40px;
  aspect-ratio: 16/8;
  background: linear-gradient(135deg, var(--bg-raised), var(--bg-alt));
  border: 0.5px solid var(--border);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.hero-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 0.5px, transparent 0.5px),
    linear-gradient(90deg, var(--border) 0.5px, transparent 0.5px);
  background-size: 48px 48px;
  opacity: 0.35;
}

.hero-frame-label {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.inline-link {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.inline-link:hover {
  color: var(--accent);
}

.grid .hero-frame {
  margin-top: 0;
  border: none;
  border-radius: 0;
}

/* ============================================
   SECTIONS
   ============================================ */
section {
  padding: 80px 0;
}

section.bordered {
  border-bottom: 0.5px solid var(--border);
}

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

/* ============================================
   GRID / CARDS
   ============================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2px;
  background: var(--border);
  border: 0.5px solid var(--border);
}

.card {
  background: var(--bg);
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card-media {
  aspect-ratio: 4/3;
  background: var(--bg-raised);
  position: relative;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.card-media iframe {
  width: 100%;
  height: 100%;
  border: 0;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.card-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 0.5px, transparent 0.5px),
    linear-gradient(90deg, var(--border) 0.5px, transparent 0.5px);
  background-size: 24px 24px;
  opacity: 0.25;
  transition: opacity 0.2s ease;
}

.card:hover .card-media::before {
  opacity: 0.5;
}

.card-media .play {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 1px solid var(--text-dim);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 2px;
  transition: all 0.15s ease;
}

.card:hover .card-media .play {
  border-color: var(--accent);
  color: var(--accent);
}

.card-body {
  padding: 18px 20px 22px;
}

.card-tc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 4px;
}

.card-tags {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ============================================
   FILTER PILLS
   ============================================ */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filter-group-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.filter-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 7px 14px;
  border: 0.5px solid var(--border-strong);
  border-radius: 2px;
  color: var(--text-dim);
  background: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.filter-pill.active {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-bg);
}

/* ============================================
   BUTTON
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 20px;
  border: 1px solid var(--text);
  border-radius: 2px;
  transition: all 0.15s ease;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.btn.primary:hover {
  background: transparent;
  color: var(--accent);
}

/* ============================================
   BLOG
   ============================================ */
.post-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 0.5px solid var(--border);
  transition: opacity 0.15s ease;
}

.post-row:hover {
  opacity: 0.7;
}

.post-row .timecode {
  font-size: 11px;
}

.post-thumb {
  aspect-ratio: 16/10;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-raised);
  border: 0.5px solid var(--border);
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-thumb.empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-thumb.empty span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
}

.post-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  margin-top: 8px;
}

.post-desc {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 6px;
}

.post-tags {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  white-space: nowrap;
  text-transform: uppercase;
  display: block;
  margin-top: 10px;
}

@media (max-width: 640px) {
  .post-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  transition: opacity 0.15s ease;
}

.featured:hover {
  opacity: 0.85;
}

.featured-media {
  aspect-ratio: 16/10;
  border-radius: 4px;
  overflow: hidden;
  border: 0.5px solid var(--border);
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 500;
  margin-top: 14px;
  line-height: 1.25;
}

.featured-desc {
  margin-top: 14px;
  color: var(--text-dim);
  line-height: 1.6;
}

.featured-body .post-tags {
  display: block;
  margin-top: 16px;
}

.featured-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 20px;
}

@media (max-width: 700px) {
  .featured {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   RESUME
   ============================================ */
.resume-block {
  margin-bottom: 48px;
}

.resume-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-top: 0.5px solid var(--border);
}

.resume-item:last-child {
  border-bottom: 0.5px solid var(--border);
}

.resume-role {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
}

.resume-org {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 2px;
}

.resume-desc {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 8px;
  max-width: 60ch;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  border: 0.5px solid var(--border-strong);
  padding: 5px 10px;
  border-radius: 2px;
}

@media (max-width: 640px) {
  .resume-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* ============================================
   ARTICLE / BLOG POST
   ============================================ */
.article-header {
  padding: 64px 0 40px;
  border-bottom: 0.5px solid var(--border);
}

.article-header h1 {
  font-size: clamp(30px, 4.5vw, 48px);
  margin-top: 16px;
  max-width: 18ch;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 20px;
  margin-top: 32px;
  padding: 24px;
  border: 0.5px solid var(--border);
  background: var(--bg-alt);
}

.meta-item label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.meta-item span {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text);
}

.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 32px 100px;
}

.article h2 {
  font-size: 24px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 0.5px solid var(--border);
}

.article h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.article h3 {
  font-size: 17px;
  margin-top: 36px;
  color: var(--accent);
}

.article p {
  color: var(--text-dim);
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.8;
}

.article p strong,
.article li strong {
  color: var(--text);
  font-weight: 500;
}

.article ul, .article ol {
  margin-top: 16px;
  padding-left: 22px;
}

.article li {
  color: var(--text-dim);
  margin-bottom: 10px;
  line-height: 1.7;
}

.article hr {
  border: none;
  border-top: 0.5px solid var(--border);
  margin: 48px 0;
}

.tldr-box {
  border: 0.5px solid var(--border-strong);
  background: var(--accent-bg);
  padding: 24px 28px;
  margin-top: 24px;
}

.tldr-box p.eyebrow {
  margin-bottom: 4px;
}

.tldr-box ul {
  margin-top: 12px;
  padding-left: 20px;
}

.tldr-box li {
  color: var(--text);
  font-size: 15px;
}

.article blockquote {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 24px;
  margin-top: 28px;
  font-family: var(--font-display);
  font-size: 19px;
  font-style: italic;
  color: var(--text);
}

.article code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 2px 6px;
  border-radius: 3px;
}

.article pre {
  background: var(--bg-alt);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  padding: 20px 24px;
  margin-top: 20px;
  overflow-x: auto;
}

.article pre code {
  background: none;
  padding: 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.7;
}

.article figure {
  margin-top: 20px;
}

.article figure img {
  display: block;
  width: 100%;
  border: 0.5px solid var(--border);
  border-radius: 4px;
}

.article figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 8px;
  text-align: center;
}

.img-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.img-row figure {
  margin-top: 0;
}

.carousel {
  position: relative;
  aspect-ratio: 4/3;
  margin-top: 20px;
  border: 0.5px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-raised);
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}

.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(11, 11, 11, 0.6);
  border: 0.5px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 2;
}

.carousel-btn:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 2;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(237, 237, 230, 0.35);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.carousel-dot:hover {
  background: rgba(237, 237, 230, 0.6);
}

.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

.carousel-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 8px;
  text-align: center;
}

.video-wrap {
  aspect-ratio: 16/9;
  border: 0.5px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 24px;
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.credit-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 0.5px solid var(--border);
  font-size: 14px;
}

.credit-item:last-child {
  border-bottom: 0.5px solid var(--border);
}

.credit-name {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text);
}

.credit-role {
  color: var(--text-dim);
}

.qa-block {
  border-left: 2px solid var(--accent-dim);
  padding: 4px 0 4px 20px;
  margin-top: 28px;
}

.qa-block .q {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 8px;
  line-height: 1.5;
}

.qa-block .a {
  color: var(--text-dim);
  font-size: 15px;
  margin: 0;
  line-height: 1.7;
}

.video-embed {
  aspect-ratio: 16/9;
  background: var(--bg-raised);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  position: relative;
  overflow: hidden;
}

.video-embed::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 0.5px, transparent 0.5px),
    linear-gradient(90deg, var(--border) 0.5px, transparent 0.5px);
  background-size: 40px 40px;
  opacity: 0.3;
}

.video-embed span {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

@media (max-width: 640px) {
  .credit-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ============================================
   ARTICLE TOC — sticky sidebar + mobile popup
   ============================================ */
.article-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 720px);
  justify-content: center;
  gap: 56px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 72px 32px 100px;
  align-items: start;
}

.article-layout .article {
  padding: 0;
  margin: 0;
  max-width: none;
}

.toc {
  position: sticky;
  top: calc(var(--nav-h) + 40px);
}

.toc-label {
  margin-bottom: 16px;
}

.toc-list {
  display: flex;
  flex-direction: column;
}

.toc-list a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  padding: 7px 0 7px 14px;
  border-left: 1px solid var(--border);
  line-height: 1.4;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc-list a:hover {
  color: var(--text);
}

.toc-list a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}

.toc-mobile-btn,
.toc-mobile-panel {
  display: none;
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 56px 20px 80px;
  }

  .toc {
    display: none;
  }

  .toc-mobile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 90;
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 18px;
    background: var(--bg-raised);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--text);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  .toc-mobile-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .toc-mobile-panel {
    position: fixed;
    right: 20px;
    left: 20px;
    bottom: 76px;
    max-height: 55vh;
    overflow-y: auto;
    background: var(--bg-alt);
    border: 0.5px solid var(--border-strong);
    border-radius: 4px;
    padding: 16px 20px;
    z-index: 89;
  }

  .toc-mobile-panel.open {
    display: block;
  }

  .toc-mobile-panel .toc-list a {
    border-left: none;
    padding-left: 0;
    border-bottom: 0.5px solid var(--border);
  }

  .toc-mobile-panel .toc-list a:last-child {
    border-bottom: none;
  }
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  border-top: 0.5px solid var(--border);
  padding: 40px 0;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

footer .foot-links {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

footer .foot-links a:hover {
  color: var(--accent);
}

footer .copyright {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}

.footer-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  opacity: 0.75;
  margin-top: 4px;
  text-align: center;
}

/* ============================================
   PERSONALITY — glitch heading, hover micro-interactions
   ============================================ */
.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
}

.glitch::before {
  color: #ff2952;
  animation: glitch-1 3.5s infinite linear alternate-reverse;
}

.glitch::after {
  color: #00e5ff;
  animation: glitch-2 3.5s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
  0%   { clip-path: inset(10% 0 82% 0); transform: translate(-2px, 0); }
  20%  { clip-path: inset(50% 0 42% 0); transform: translate(2px, 0); }
  40%  { clip-path: inset(20% 0 72% 0); transform: translate(-1px, 0); }
  60%  { clip-path: inset(75% 0 10% 0); transform: translate(2px, 0); }
  80%  { clip-path: inset(5% 0 88% 0); transform: translate(-2px, 0); }
  100% { clip-path: inset(40% 0 52% 0); transform: translate(1px, 0); }
}

@keyframes glitch-2 {
  0%   { clip-path: inset(70% 0 22% 0); transform: translate(2px, 0); }
  20%  { clip-path: inset(8% 0 84% 0); transform: translate(-2px, 0); }
  40%  { clip-path: inset(30% 0 62% 0); transform: translate(1px, 0); }
  60%  { clip-path: inset(60% 0 32% 0); transform: translate(-2px, 0); }
  80%  { clip-path: inset(15% 0 78% 0); transform: translate(2px, 0); }
  100% { clip-path: inset(45% 0 47% 0); transform: translate(-1px, 0); }
}

/* nav logo — quick glitch flicker on hover */
.nav-brand {
  position: relative;
  transition: color 0.1s ease;
}

.nav-brand:hover {
  animation: nav-glitch 0.3s steps(2, end) 1;
}

@keyframes nav-glitch {
  0%   { text-shadow: none; transform: translate(0, 0); }
  25%  { text-shadow: -2px 0 #ff2952, 2px 0 #00e5ff; transform: translate(-1px, 0); }
  50%  { text-shadow: 2px 0 #ff2952, -2px 0 #00e5ff; transform: translate(1px, 0); }
  75%  { text-shadow: -1px 0 #ff2952, 1px 0 #00e5ff; transform: translate(-1px, 0); }
  100% { text-shadow: none; transform: translate(0, 0); }
}

/* blog list rows — timecode flicker on hover */
.post-row:hover .timecode {
  animation: tc-flicker 0.6s steps(6, end) 1;
}

@keyframes tc-flicker {
  0%, 100% { opacity: 1; }
  10% { opacity: 0.3; }
  20% { opacity: 1; }
  35% { opacity: 0.4; }
  45% { opacity: 1; }
  60% { opacity: 0.5; }
  70% { opacity: 1; }
}

/* Konami code — fake render-complete takeover */
.konami-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 11, 0.96);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: konami-fade-in 0.2s ease;
}

@keyframes konami-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.konami-box {
  width: min(560px, 90vw);
  font-family: var(--font-mono);
  cursor: default;
}

.konami-header {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
  border-bottom: 0.5px solid var(--border);
  padding-bottom: 12px;
}

.konami-log {
  height: 220px;
  overflow-y: auto;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.9;
}

.konami-log p:last-child {
  color: var(--text);
}

.konami-progress {
  margin-top: 20px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.konami-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.2s ease;
}

.konami-hint {
  margin-top: 20px;
  font-size: 11px;
  color: var(--text-faint);
  text-align: center;
}

.konami-result {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 0.5px solid var(--border);
  text-align: center;
  animation: konami-fade-in 0.4s ease;
}

.konami-result-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text);
}

.konami-result-sub {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

/* buttons — bracket flourish on hover */
.btn::before,
.btn::after {
  content: "";
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn::before {
  content: "›";
  order: -1;
  transform: translateX(4px);
}

.btn::after {
  content: "‹";
  transform: translateX(-4px);
}

.btn:hover::before,
.btn:hover::after {
  opacity: 1;
  transform: translateX(0);
}
