/* ── SELF-HOSTED FONTS ───────────────────────────────── */
@font-face {
  font-family: 'Pixel Operator';
  src: url('/fonts/PixelOperator/PixelOperator.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Pixel Operator';
  src: url('/fonts/PixelOperator/PixelOperator-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* Heavy Bold — thick block pixels, for display headings */
@font-face {
  font-family: 'Pixel Operator';
  src: url('/fonts/PixelOperator/PixelOperatorHB.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter/InterVariable.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter/InterVariable-Italic.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Fira Code';
  src: url('/fonts/FiraCode/FiraCode-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fira Code';
  src: url('/fonts/FiraCode/FiraCode-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fira Code';
  src: url('/fonts/FiraCode/FiraCode-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fira Code';
  src: url('/fonts/FiraCode/FiraCode-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fira Code';
  src: url('/fonts/FiraCode/FiraCode-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── VARIABLES ───────────────────────────────────────── */
/* Dark (default): near-black with a lavender ghost */
:root {
  --bg:      #14141c;
  --surface: #1b1b26;
  --border:  #28283c;
  --text:    #cdd6f4;
  --sub:     #a6adc8;
  --muted:   #585878;
  --accent:  #b4befe;   /* catppuccin mocha lavender */
  --green:   #a6e3a1;   /* catppuccin mocha green   */
  --max-w:   820px;
}

/* Light: warm-gray with lavender cast */
[data-theme="light"] {
  --bg:      #e4e4f0;   /* light lavender-gray base          */
  --surface: #efeffc;   /* card surface, clearly above bg    */
  --border:  #8888bc;   /* visible border — was too washed   */
  --text:    #2e2e50;   /* near-black, high contrast         */
  --sub:     #484870;   /* readable secondary text           */
  --muted:   #6060a0;   /* was #9ca0bc → ~2:1 contrast, unusable */
  --accent:  #5060f0;   /* darker lavender, readable on light bg  */
  --green:   #2a8c1e;   /* darker green for light bg         */
}

/* ── RESET ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  /* Smooth theme switch for bg */
  transition: background-color 0.3s;
}

body {
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  line-height: 1.75;
  min-height: 100vh;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  -webkit-font-smoothing: antialiased;
  transition: color 0.3s, background-color 0.3s;
}

/* Pixel Operator needs AA disabled — otherwise browser blurs the pixel edges */
.nav-home,
.nav-link,
.section-label,
.page-title,
.term-name,
.card h3,
.me-card h2,
.me-card li,
.terminal-title,
.terminal-section h2,
.terminal-section h3,
.post-hd h1,
.prose h2,
.prose h3,
.prose h4,
.list-item h2,
.post-card h3 {
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  text-rendering: optimizeSpeed;
}

/* Standardised scale — three fonts, three sub-scales */
:root {
  /* Inter (body prose) */
  --inter-xs:   12px;  /* dates, meta, captions */
  --inter-sm:   14px;  /* teasers, secondary text */
  --inter-base: 18px;  /* body paragraphs */

  /* Fira Code (code, decorations, ASCII) */
  --code-xs:   12px;  /* decorative markers, ::before arrows */
  --code-sm:   14px;  /* code blocks, inline code */
  --code-base: 16px;  /* terminal commands, footer, tags, labels */

  /* Pixel Operator (headings, UI chrome — MUST be multiples of 16) */
  --px-sm:  16px;  /* nav links, section labels, me-card li */
  --px-md:  32px;  /* card/list titles, prose h3, terminal-section h2 */
  --px-lg:  48px;  /* page titles, prose h2, SHADOW hero */
  --px-xl:  64px;  /* post h1 display title */

  /* Legacy aliases (kept for any remaining var() refs — map to new scale) */
  --fs-xs:   12px;
  --fs-sm:   14px;
  --fs-base: 18px;
  --fs-md:   16px;  /* remapped: was 20px (non-multiple) */
  --fs-lg:   16px;  /* remapped: was 24px (non-multiple) */
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }

/* ── CRT SCANLINES ───────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px, transparent 3px,
    rgb(0 0 0 / 0.055) 3px, rgb(0 0 0 / 0.055) 4px
  );
  pointer-events: none;
  z-index: 9999;
}
[data-theme="light"] body::before {
  background: repeating-linear-gradient(
    0deg,
    transparent 0px, transparent 3px,
    rgb(0 0 0 / 0.025) 3px, rgb(0 0 0 / 0.025) 4px
  );
}

/* ── LAYOUT ──────────────────────────────────────────── */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }

/* ── ASCII DIVIDER ───────────────────────────────────── */
.px-div {
  overflow: hidden;
  white-space: nowrap;
  height: 1.1em;
  line-height: 1.1;
  font-family: 'Fira Code', monospace;
  font-size: var(--fs-sm);
  color: var(--border);
  margin: 0.15rem 0;
  user-select: none;
  transition: color 0.3s;
}
.px-div::before {
  content: '────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────';
}


/* ── HEADER ──────────────────────────────────────────── */
header { padding: 1.75rem 0; border-bottom: 1px solid var(--border); }

.header-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: relative;
}

.header-top .theme-toggle {
  position: absolute;
  right: 0;
}

.header-nav {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-home {
  font-family: 'Pixel Operator', monospace;
  font-weight: 900;
  font-size: 48px;
  color: var(--accent);
  letter-spacing: 3px;
  line-height: 1;
  transition: color 0.15s, text-shadow 0.15s;
}
.nav-home:hover { color: var(--text); text-shadow: 0 0 12px rgba(180, 190, 254, 0.4); }

.nav-link {
  font-family: 'Pixel Operator', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--sub);
  letter-spacing: 0.08em;
  transition: color 0.15s, text-shadow 0.15s;
}
.nav-link:hover { color: var(--accent); text-shadow: 0 0 8px rgba(180, 190, 254, 0.3); }
.nav-bracket {
  color: var(--muted);
  transition: color 0.15s;
}
.nav-link:hover .nav-bracket { color: var(--accent); }

/* ── THEME TOGGLE ────────────────────────────────────── */
.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--sub);
  font-family: 'Fira Code', monospace;
  font-size: 20px;
  padding: 4px 12px 6px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  transition: background-color 0.3s, border-color 0.15s, color 0.15s, box-shadow 0.2s;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent), 0 0 8px rgba(180, 190, 254, 0.3);
}

/* ── CSS PIXEL SPARKLES ──────────────────────────────── */
/*
  Pure CSS pixel art: a 2×2 center + 4 arms via box-shadow.
  Rotates 45° at midpoint → twinkling ✦ effect.
*/
.px-spark {
  position: absolute;
  display: block;
  width: 2px; height: 2px;
  background: transparent;
  box-shadow:
     0   -5px 0 1px var(--accent),
     0    5px 0 1px var(--accent),
    -5px  0   0 1px var(--accent),
     5px  0   0 1px var(--accent);
  animation: spark 3.2s ease-in-out infinite;
}
.px-spark.s2 {
  animation-delay: 1.15s;
  box-shadow:
     0   -4px 0 1px var(--muted),
     0    4px 0 1px var(--muted),
    -4px  0   0 1px var(--muted),
     4px  0   0 1px var(--muted);
}
.px-spark.s3 { animation-delay: 2.3s; }

@keyframes spark {
  0%, 100% { opacity: 0.85; transform: rotate(0deg)  scale(1);   }
  50%       { opacity: 0.08; transform: rotate(45deg) scale(0.5); }
}

/* ── CARD BASE ───────────────────────────────────────── */
.card {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
  padding: 1.5rem;
  position: relative;
  transition: background-color 0.3s, transform 0.08s, filter 0.08s, box-shadow 0.2s;
}

a.card { color: inherit; }

/* ASCII corner marks — sit just inside the clip-path polygon cuts */
.card::before, .card::after {
  font-family: 'Fira Code', monospace;
  font-size: var(--fs-xs);
  color: var(--border);
  position: absolute;
  line-height: 1;
  pointer-events: none;
  transition: color 0.08s;
}
.card::before { content: '┌'; top: 5px; left: 5px; }
.card::after  { content: '┘'; bottom: 5px; right: 5px; }

/* Section nav card content */
.card h3 {
  font-family: 'Pixel Operator', monospace;
  font-size: var(--px-md);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}
.card h3::before {
  content: '→ ';
  color: var(--green);
  font-size: 12px;
  font-family: 'Fira Code', monospace;
}
.card p {
  font-size: var(--fs-sm);
  color: var(--sub);
}

/* Pixel jump: element shifts up-left, accent drop-shadow stays behind = "popped" */
a.card:hover {
  box-shadow: inset 0 0 0 2px var(--accent);
  transform: translate(-3px, -3px);
  filter: drop-shadow(3px 3px 0 var(--accent));
  color: var(--accent);
}
a.card:hover::before,
a.card:hover::after { color: var(--accent); }

/* ── TERMINAL (homepage) ─────────────────────────────── */
.terminal {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
  margin: 2rem 0 2.5rem;
  position: relative;
  transition: background-color 0.3s, box-shadow 0.3s;
}

/* No hover effects — keep terminal plain */

.terminal::after {
  content: '┘';
  position: absolute;
  bottom: 5px;
  right: 5px;
  font-family: 'Fira Code', monospace;
  font-size: var(--fs-xs);
  color: var(--border);
  line-height: 1;
  pointer-events: none;
}

.term-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.3s, border-color 0.3s;
  position: relative;
}

/* ASCII corner marks for terminal frame */
/* ASCII corner marks for terminal frame */
.term-bar::before, .term-bar::after {
  font-family: 'Fira Code', monospace;
  font-size: var(--fs-xs);
  color: var(--border);
  position: absolute;
  line-height: 1;
  pointer-events: none;
}
.term-bar::before { content: '┌'; top: 5px; left: 5px; }
.term-bar::after  { content: '┐'; top: 5px; right: 5px; }

/* Square pixel dots (not circles — this is pixel art) */
.td { width: 8px; height: 8px; display: inline-block; background: var(--border); }
.td.a { background: var(--muted); }
.td.b { background: var(--accent); }

.term-path {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-left: 8px;
  font-family: 'Fira Code', monospace;
  letter-spacing: 0.04em;
}

.term-body {
  padding: 1.75rem 2.25rem 2rem;
  position: relative;
  min-height: 180px;
}

.term-body::before {
  content: '└';
  position: absolute;
  bottom: 5px;
  left: 5px;
  font-family: 'Fira Code', monospace;
  font-size: var(--fs-xs);
  color: var(--border);
  line-height: 1;
  pointer-events: none;
}

/* Typewriter effect on the shell command line */
.term-cmd {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 1.75rem;
  overflow: hidden;
  white-space: nowrap;
  font-family: 'Fira Code', monospace;
  animation: type-in 0.5s steps(14, end) 0.25s both;
  letter-spacing: 0.05em;
}
@keyframes type-in { from { width: 0; } to { width: 100%; } }

.ps1 { color: var(--green); margin-right: 5px; }

.term-name {
  font-family: 'Pixel Operator', monospace;
  font-weight: 900;
  font-size: 48px;
  line-height: 1;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fade-up 0.4s ease 0.8s both;
  letter-spacing: 0.03em;
  color: var(--accent);
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  text-rendering: optimizeSpeed;
}
.term-prompt { color: var(--green); }

/* Block cursor blink after name */
.blink::after {
  content: '█';
  color: var(--accent);
  font-family: 'Fira Code', monospace;
  font-size: 32px;
  vertical-align: middle;
  margin-left: 4px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.term-intro {
  font-size: 16px;
  color: var(--sub);
  margin-bottom: 2rem;
  max-width: 600px;
  font-family: 'Inter', sans-serif;
  animation: fade-up 0.4s ease 1s both;
  line-height: 1.75;
  font-weight: 400;
}
.term-intro p { margin-bottom: 0; }

.term-table {
  padding-top: 0;
  animation: fade-up 0.4s ease 1.2s both;
}
.term-table::before {
  content: '├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────';
  display: block;
  overflow: hidden;
  white-space: nowrap;
  font-family: 'Fira Code', monospace;
  font-size: var(--fs-sm);
  color: var(--border);
  margin-bottom: 0.625rem;
  line-height: 1;
  user-select: none;
  transition: color 0.3s;
}
.term-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.5rem;
  font-size: 13px;
  padding: 7px 0;
  font-family: 'Fira Code', monospace;
  align-items: baseline;
  border-bottom: 1px solid var(--border);
}
.term-row:last-child {
  border-bottom: none;
}
.term-key {
  color: var(--accent);
  font-family: 'Fira Code', monospace;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.term-val { color: var(--text); font-weight: 400; }
.term-val a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
.term-val a:hover { color: var(--text); text-shadow: 0 0 8px rgba(180, 190, 254, 0.2); }

/* Glitch on terminal hover */
.terminal:hover .term-path { animation: glitch 0.35s linear; }
@keyframes glitch {
  0%, 100% { text-shadow: none; transform: none; }
  20%      { text-shadow: -2px 0 var(--accent), 2px 0 var(--green); transform: translateX(1px); }
  40%      { text-shadow:  2px 0 var(--accent),-2px 0 var(--green); transform: translateX(-1px); }
  60%      { text-shadow: none; transform: none; }
  80%      { text-shadow: -1px 0 var(--accent); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* ── SECTION LABEL ───────────────────────────────────── */
.section-label {
  font-size: 16px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin: 2rem 0 1.5rem;
  font-family: 'Pixel Operator', monospace;
  user-select: none;
  font-weight: 700;
}
.section-label::before { content: '┌─[ '; color: var(--muted); }
.section-label::after  { content: ' ]'; color: var(--muted); }

/* ── PAGE TITLE ──────────────────────────────────────── */
.page-title {
  font-family: 'Pixel Operator', monospace;
  font-weight: 900;
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.page-title::before {
  content: '~/';
  color: var(--muted);
  font-size: var(--code-base);
  font-family: 'Fira Code', monospace;
  font-weight: 400;
}

/* ── RECENT / POST GRID ──────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.post-card h3 {
  font-size: var(--px-md);
  font-weight: 700;
  font-family: 'Pixel Operator', monospace;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.post-card h3::before { content: '→ '; color: var(--green); font-size: 12px; font-family: 'Fira Code', monospace; }
.post-card .teaser { font-size: var(--fs-sm); color: var(--sub); font-style: italic; font-weight: 400; font-family: 'Inter', sans-serif; line-height: 1.6; }
.post-card .card-meta { display: flex; gap: 0.5rem; align-items: baseline; }
.post-card .card-date { font-size: var(--inter-xs); font-family: 'Fira Code', monospace; color: var(--muted); letter-spacing: 0.04em; }
.post-card .more { font-size: var(--fs-xs); font-family: 'Fira Code', monospace; text-decoration: underline; margin-top: auto; color: var(--accent); transition: color 0.2s; letter-spacing: 0.04em; }
.post-card:hover .more { color: var(--text); }

/* ── SECTION LIST ────────────────────────────────────── */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.list-item {
  display: block;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
  padding: 1.5rem 1.75rem;
  position: relative;
  transition: background-color 0.3s, transform 0.08s, filter 0.08s, box-shadow 0.2s;
}
.list-item::before, .list-item::after {
  font-family: 'Fira Code', monospace;
  font-size: var(--fs-xs);
  color: var(--border);
  position: absolute;
  line-height: 1;
  pointer-events: none;
  transition: color 0.08s;
}
.list-item::before { content: '┌'; top: 5px; left: 5px; }
.list-item::after  { content: '┘'; bottom: 5px; right: 5px; }
.list-item:hover {
  box-shadow: inset 0 0 0 2px var(--accent);
  transform: translate(-3px, -3px);
  filter: drop-shadow(3px 3px 0 var(--accent));
  color: var(--accent);
}
.list-item:hover::before,
.list-item:hover::after { color: var(--accent); }
.list-item h2 {
  font-size: var(--px-md);
  font-weight: 700;
  margin-bottom: 0.4rem;
  font-family: 'Pixel Operator', monospace;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.list-item h2::before { content: '→ '; color: var(--green); font-size: 12px; font-family: 'Fira Code', monospace; }
.list-item .list-meta {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}
.list-item time {
  font-size: var(--fs-xs);
  color: var(--muted);
  font-family: 'Fira Code', monospace;
  letter-spacing: 0.04em;
}
.list-section {
  font-size: var(--inter-xs);
  font-family: 'Fira Code', monospace;
  color: var(--accent);
  letter-spacing: 0.06em;
  opacity: 0.7;
}
.list-section::before { content: '['; }
.list-section::after  { content: ']'; }
.list-item .teaser { font-size: var(--fs-sm); color: var(--sub); font-style: italic; font-weight: 400; font-family: 'Inter', sans-serif; margin-top: 0.25rem; line-height: 1.6; }
.empty { color: var(--muted); font-size: var(--fs-base); margin-top: 1.5rem; font-family: 'Fira Code', monospace; }

/* ── SINGLE POST ─────────────────────────────────────── */
.post-hd {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.post-hd h1 {
  font-family: 'Pixel Operator', monospace;
  font-weight: 900;
  font-size: 64px;
  line-height: 1.1;
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}
.post-hd h1::before {
  content: '▌ ';
  font-family: 'Fira Code', monospace;
  font-size: 28px;
  color: var(--accent);
  font-weight: 400;
  vertical-align: middle;
  margin-right: 2px;
  opacity: 0.7;
}
.post-hd time {
  font-size: var(--inter-sm);
  color: var(--muted);
  font-family: 'Fira Code', monospace;
  display: block;
  margin-left: 1.1rem;
  margin-top: 0.25rem;
}
.post-hd time::before {
  content: '└── ';
  font-family: 'Fira Code', monospace;
  color: var(--accent);
}

.tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.tag {
  font-size: var(--fs-xs);
  color: var(--accent);
  background: transparent;
  padding: 2px 6px;
  font-family: 'Fira Code', monospace;
  transition: color 0.1s, box-shadow 0.1s;
  letter-spacing: 0.04em;
}
.tag::before { content: '['; color: var(--accent); }
.tag::after  { content: ']'; color: var(--accent); }
.tag:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }

/* ── PROSE ───────────────────────────────────────────── */
.prose { max-width: 700px; }
.prose p  { margin-bottom: 1.25rem; }
.prose h2 { font-family: 'Pixel Operator', monospace; font-weight: 900; font-size: 48px; margin: 2.5rem 0 1rem; letter-spacing: 0.02em; line-height: 1.1; }
.prose h3 { font-family: 'Pixel Operator', monospace; font-weight: 700; font-size: 32px; margin: 2rem 0 0.75rem; letter-spacing: 0.02em; color: var(--accent); line-height: 1.2; }
.prose h4 { font-family: 'Pixel Operator', monospace; font-weight: 700; font-size: 16px; margin: 1.5rem 0 0.5rem; letter-spacing: 0.06em; color: var(--sub); line-height: 1.3; }
.prose a  { text-decoration: underline; transition: color 0.2s; }
.prose a:hover { color: var(--accent); text-shadow: 0 0 6px rgba(180, 190, 254, 0.2); }

.prose ul { list-style: none; padding-left: 1.5rem; margin-bottom: 1.25rem; }
.prose ul li { position: relative; padding-left: 1.5rem; margin-bottom: 0.5rem; }
.prose ul li::before {
  content: '▸';
  position: absolute;
  left: 0; top: 0.25em;
  color: var(--accent);
  font-size: var(--fs-xs);
  font-family: 'Fira Code', monospace;
}
.prose ul li:has(input[type="checkbox"]) { padding-left: 0; }
.prose ul li:has(input[type="checkbox"])::before { display: none; }
.prose ol { list-style: decimal; padding-left: 2rem; margin-bottom: 1rem; }

.prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--sub);
  transition: border-color 0.3s;
  background: rgba(180, 190, 254, 0.08);
  padding: 0.75rem 0 0.75rem 1.25rem;
}
.prose pre {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
  padding: 1.25rem 1.25rem 1.25rem 1.25rem;
  padding-top: 2.75rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  transition: background-color 0.3s;
  border-left: 3px solid var(--accent);
  position: relative;
}
.prose code { font-family: 'Fira Code', monospace; font-size: 15px; letter-spacing: 0.02em; line-height: 1.7; }
.prose pre code { font-size: 14px; }
.prose p code {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
  padding: 2px 6px;
  transition: background-color 0.3s, box-shadow 0.2s;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
}

/* ── COPY BUTTON ─────────────────────────────────────── */
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--bg);
  border: none;
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--muted);
  font-family: 'Fira Code', monospace;
  font-size: var(--fs-xs);
  padding: 3px 8px;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: color 0.15s, box-shadow 0.15s, background-color 0.15s;
  line-height: 1.7;
  user-select: none;
  z-index: 1;
}
.copy-btn:hover {
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: rgba(180, 190, 254, 0.06);
}
.copy-btn.copied {
  color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
  background: rgba(166, 227, 161, 0.06);
}
.prose p a code { color: var(--accent); }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

.prose img {
  margin: 1.5rem auto;
  box-shadow: inset 0 0 0 1px var(--border), 0 0 0 1px var(--border);
  transition: box-shadow 0.2s;
}
.prose img:hover { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 1px var(--accent); }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-family: 'Fira Code', monospace;
  font-size: var(--code-sm);
}
.prose th {
  font-family: 'Pixel Operator', monospace;
  font-size: var(--px-sm);
  font-weight: 700;
  color: var(--accent);
  text-align: left;
  padding: 0.5rem 1rem;
  border-bottom: 2px solid var(--border);
  letter-spacing: 0.04em;
  -webkit-font-smoothing: none;
  text-rendering: optimizeSpeed;
}
.prose td {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--sub);
  vertical-align: top;
  line-height: 1.6;
}
.prose tr:last-child td { border-bottom: none; }
.prose tr:hover td { color: var(--text); background: rgba(180, 190, 254, 0.04); }

/* ── ME PAGE ─────────────────────────────────────────── */
.me-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
.me-card {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
  padding: 1.75rem;
  transition: background-color 0.3s, box-shadow 0.2s;
}
.me-card h2 {
  font-family: 'Pixel Operator', monospace;
  font-size: var(--px-md);
  color: var(--accent);
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
  font-weight: 700;
  line-height: 1;
}
.me-card h2 .sym { color: var(--green); margin-right: 4px; }
.me-card ul { list-style: none; padding: 0; }
.me-card li { font-family: 'Pixel Operator', monospace; font-size: 16px; padding: 6px 0 6px 1.25rem; position: relative; }
.me-card li::before {
  content: '▸';
  position: absolute;
  left: 0; top: 0.25em;
  color: var(--muted);
  font-size: 12px;
  font-family: 'Fira Code', monospace;
}

/* ── CHECKBOXES ──────────────────────────────────────── */
input[type="checkbox"] {
  appearance: none;
  width: 16px; height: 16px;
  box-shadow: inset 0 0 0 1px var(--border);
  background: transparent;
  margin-right: 8px;
  vertical-align: middle;
  cursor: pointer;
  position: relative;
  transition: box-shadow 0.2s, background-color 0.2s;
}
input[type="checkbox"]:hover {
  box-shadow: inset 0 0 0 1px var(--accent);
}
input[type="checkbox"]:checked {
  background-color: rgba(180, 190, 254, 0.1);
  box-shadow: inset 0 0 0 1px var(--accent);
}
input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: -2px; left: 2px;
  color: var(--accent);
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
}

/* ── TAXONOMY ────────────────────────────────────────── */
.tag-count { color: var(--accent); font-size: var(--fs-xs); margin-left: 6px; font-weight: 600; }

/* ── FOOTER ──────────────────────────────────────────── */
footer {
  padding: 1.5rem 0 2rem;
  font-size: var(--code-base);
  color: var(--muted);
  text-align: center;
  font-family: 'Fira Code', monospace;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}
footer a { color: var(--sub); transition: color 0.2s; }
footer a:hover { color: var(--accent); }
footer::before {
  content: '└──[  ]──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────';
  display: block;
  overflow: hidden;
  white-space: nowrap;
  font-family: 'Fira Code', monospace;
  font-size: var(--code-base);
  color: var(--border);
  margin-bottom: 0.75rem;
  line-height: 1;
  user-select: none;
  transition: color 0.3s;
  text-align: left;
}

/* ── TERMINAL / CLI STYLING ──────────────────────────────── */
/* Reusable classes for terminal/ASCII aesthetic in content */

.terminal-prompt {
  font-family: 'Fira Code', monospace;
  font-size: var(--code-base);
  color: var(--muted);
  margin-bottom: 0.75rem;
  display: block;
  letter-spacing: 0.05em;
}

.prompt-user { color: var(--green); }
.prompt-sep { color: var(--sub); }
.prompt-host { color: var(--accent); }
.prompt-path { color: var(--muted); }
.prompt-sym { color: var(--text); margin-left: 4px; }

.terminal-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.terminal-title {
  font-family: 'Pixel Operator', monospace;
  font-size: var(--px-lg);
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-top: 0;
}

.terminal-divider {
  height: 1.1em;
  line-height: 1.1;
  font-family: 'Fira Code', monospace;
  font-size: var(--fs-sm);
  color: var(--border);
  margin: 2rem 0;
  user-select: none;
  transition: color 0.3s;
  overflow: hidden;
  white-space: nowrap;
}

.terminal-divider::before {
  content: '────────────────────────────────────────────────────────────────────────────────────────';
}

.terminal-section {
  margin: 2rem 0 1.5rem 0;
}

.terminal-section h2,
.terminal-section h3 {
  font-family: 'Pixel Operator', monospace;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin: 0 0 1rem 0;
  position: relative;
  padding-left: 1.5rem;
}

.terminal-section h2 { font-size: var(--px-md); line-height: 1.1; }
.terminal-section h3 { font-size: var(--px-sm); line-height: 1.2; }

.terminal-section h2::before,
.terminal-section h3::before {
  content: '├─ ';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: var(--code-xs);
  font-family: 'Fira Code', monospace;
  font-weight: 600;
}

.terminal-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem 1.5rem;
  font-family: 'Fira Code', monospace;
  font-size: var(--code-base);
  line-height: 1.8;
}

.terminal-list li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.terminal-list li::before {
  content: '├─ ';
  position: absolute;
  left: 0;
  color: var(--border);
  font-size: var(--fs-xs);
}

.terminal-list li:last-child::before {
  content: '└─ ';
}

.terminal-list ul {
  margin: 0.5rem 0 0.5rem 1rem;
  font-size: var(--fs-sm);
}

.terminal-list ul li {
  padding-left: 1.5rem;
}

.terminal-list ul li::before {
  content: '├─ ';
  font-size: var(--fs-xs);
}

.terminal-list ul li:last-child::before {
  content: '└─ ';
}

.terminal-footer {
  text-align: center;
  font-family: 'Fira Code', monospace;
  font-size: var(--fs-sm);
  color: var(--muted);
  padding: 1rem 0;
  user-select: none;
  margin-top: 2rem;
}

.terminal-footer::before {
  content: '[ ';
  color: var(--border);
}

.terminal-footer::after {
  content: ' ]';
  color: var(--border);
}

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 600px) {
  .post-grid   { grid-template-columns: 1fr; }
  .me-grid     { grid-template-columns: 1fr 1fr; }
  .wrap        { padding: 0 1rem; }
  .term-body   { padding: 1.25rem; min-height: unset; }
  .term-name   { font-size: 32px; }
  .term-row    { grid-template-columns: 80px 1fr; gap: 1rem; }
  header       { padding: 1.25rem 0; }
  .header-inner { gap: 0.625rem; }
  .header-nav  { gap: 1rem; }
  nav          { gap: 1rem; }
  .nav-home    { font-size: 32px; }
  .nav-link    { font-size: 16px; }
  .page-title  { font-size: 32px; }
  .post-hd h1  { font-size: 48px; }
  .post-hd h1::before { font-size: 22px; }
  .prose h2    { font-size: 32px; }
  .prose h3    { font-size: 16px; }
  .list-item h2   { font-size: 16px; }
  .post-card h3   { font-size: 16px; }
  .card h3        { font-size: 16px; }
  .me-card h2     { font-size: 16px; }
  .terminal-title { font-size: 32px; }
  .terminal-section h2 { font-size: 16px; }
}
@media (max-width: 380px) {
  .me-grid     { grid-template-columns: 1fr; }
  .nav-link    { font-size: 16px; }
}
