/* datajack.org v12. Tokens from the design handoff. No radius, no shadows. */
@font-face {
  font-family: "Silkscreen";
  src: url("/assets/fonts/silkscreen.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #efede8;
  --ink: #2a2926;
  --muted: #55524c;
  --metal: #b9b5ad;
  --card: #ffffff;
  --accent: oklch(0.62 0.17 45);
  --pixel: Silkscreen, monospace;
  --u: 1.5; /* text scale: 1 = the original design sizes */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Verdana, Geneva, sans-serif;
  font-size: calc(11px * var(--u));
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, p, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* sprites */
@font-face {
  font-family: "VT323";
  src: url("/assets/fonts/vt323.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.sprite { display: block; }
.sprite .ink { fill: var(--ink); }
.sprite .metal { fill: var(--metal); }
.sprite .accent { fill: var(--accent); }
.sprite .white { fill: var(--card); }

/* page frame */
.page {
  box-sizing: border-box;
  min-height: 100vh;
  border: 1px solid var(--ink);
  display: grid;
  grid-template-columns: calc(200px * var(--u) * 0.85) 1fr;
  grid-template-rows: auto 1fr auto;
}

/* top bar */
.topbar {
  grid-column: 1 / 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: calc(28px * var(--u));
  padding: 0 14px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--pixel);
  font-size: calc(9px * var(--u));
  letter-spacing: 1px;
}
.topbar-right { display: flex; gap: 18px; align-items: center; }
.linkok { display: flex; align-items: center; gap: 6px; color: var(--accent); }

/* left column */
.side {
  border-right: 1px solid var(--ink);
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.logo {
  display: block;
  width: 100%;
  max-width: calc(170px * var(--u) * 0.85);
  aspect-ratio: 170 / 120;
  box-sizing: border-box;
  border: 1px solid var(--ink);
}
.logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.nav { display: flex; flex-direction: column; font-family: var(--pixel); font-size: calc(10px * var(--u)); letter-spacing: 1px; }
.nav a {
  color: var(--ink);
  padding: 7px 0;
  border-top: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  text-decoration: none;
}
.nav a:last-child { border-bottom: 1px solid var(--ink); }
.nav a:hover { color: var(--accent); }
.nav .dot.on { color: var(--accent); }

/* main column */
.main {
  min-width: 0;
  padding: 36px 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  overflow: hidden;
}
.hero { display: grid; grid-template-columns: minmax(0, 1fr) calc(300px * var(--u) * 0.85); gap: 48px; align-items: end; container-type: inline-size; }
/* 88px / -6px at 1200px wide (the design). Shrinks with the column between
   900px and 1200px so it never collides with the welcome text; the divisor is
   sized for Verdana Bold, the widest of the font stack. */
.wordmark { font-size: min(88px, max(40px, calc((100cqw - 348px) / 6.25))); font-weight: bold; letter-spacing: -0.0681818em; line-height: 0.85; }
.wordmark span { color: var(--accent); }
.welcome { font-size: calc(12px * var(--u)); line-height: 1.6; text-wrap: pretty; }
.welcome a:hover { text-decoration: underline; }

/* section header */
.section { display: flex; flex-direction: column; gap: 10px; }
.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--pixel);
  font-size: calc(9px * var(--u));
  letter-spacing: 1px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
}
.sec-head h2 { font: inherit; letter-spacing: inherit; }
.sec-title { display: flex; align-items: center; gap: 8px; }

/* patch bay */
.ports { display: grid; grid-template-columns: repeat(6, 1fr); border-left: 1px solid var(--ink); border-top: 1px solid var(--ink); }
.port {
  box-sizing: border-box;
  min-height: calc(92px * var(--u) * 0.9);
  padding: 10px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--ink);
  text-decoration: none;
  background: transparent;
}
.port.used { background: var(--card); }
a.port:hover .port-name { color: var(--accent); }
.port-top { display: flex; justify-content: space-between; font-family: var(--pixel); font-size: calc(8px * var(--u)); }
.port-name { font-weight: bold; font-size: calc(11px * var(--u)); }

/* feed */
.feed { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.entry { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.entry-date { font-family: var(--pixel); font-size: calc(9px * var(--u)); letter-spacing: 1px; color: var(--accent); }
.entry-title {
  font-size: calc(14px * var(--u));
  font-weight: bold;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.entry-excerpt { font-size: calc(11px * var(--u)); line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.entry-meta { font-family: var(--pixel); font-size: calc(8px * var(--u)); letter-spacing: 1px; color: var(--muted); }
.subscribe { display: flex; gap: 4px; align-items: center; color: var(--ink); text-decoration: none; }
.xml { background: var(--accent); color: #fff; padding: 1px 4px; }

/* inner pages */
.pagehead { display: flex; flex-direction: column; gap: 10px; }
.pagehead h1 { font-size: 40px; font-weight: bold; letter-spacing: -2px; line-height: 1; }
.lede { font-size: calc(12px * var(--u)); line-height: 1.6; color: var(--muted); text-wrap: pretty; max-width: 62ch; }
.crumb { font-family: var(--pixel); font-size: calc(9px * var(--u)); letter-spacing: 1px; }
.rows { list-style: none; }
.rows li { border-bottom: 1px solid var(--ink); }
.row {
  display: grid;
  grid-template-columns: calc(40px * var(--u)) 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  color: var(--ink);
  text-decoration: none;
}
.row:hover { background: var(--card); }
.row:hover .row-name { color: var(--accent); }
.row-n, .row-tag { font-family: var(--pixel); font-size: calc(8px * var(--u)); letter-spacing: 1px; }
.row-tag { display: flex; gap: 4px; align-items: center; }
.row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.row-name { font-size: calc(12px * var(--u)); }
.row-sum { color: var(--muted); font-size: calc(11px * var(--u)); line-height: 1.5; }

/* markdown body */
.prose { max-width: 70ch; font-size: calc(12px * var(--u)); line-height: 1.6; display: flex; flex-direction: column; gap: 14px; }
.prose p, .prose ul, .prose ol { margin: 0; }
.prose ul, .prose ol { padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.prose h2 {
  font-family: var(--pixel);
  font-size: calc(9px * var(--u));
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
  margin-top: 10px;
}
.prose code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: calc(11px * var(--u)); background: var(--card); padding: 0 3px; }
.prose a:hover { text-decoration: underline; }

/* things I like: 88x31-style badges with a pixel sprite */
.likes { display: flex; flex-wrap: wrap; gap: 8px; }
.like {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  height: calc(31px * var(--u));
  padding: 0 10px 0 6px;
  border: 1px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  font-family: var(--pixel);
  font-size: calc(8px * var(--u));
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
}
.like .sprite { flex: none; }
.like:hover { background: var(--ink); color: var(--bg); }

/* footer */
.foot {
  grid-column: 1 / 3;
  border-top: 1px solid var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  min-height: calc(34px * var(--u));
  flex-wrap: wrap;
}
.badge {
  box-sizing: border-box;
  min-width: calc(88px * var(--u));
  height: calc(20px * var(--u));
  border: 1px solid var(--ink);
  display: flex;
  font-family: var(--pixel);
  font-size: calc(8px * var(--u));
  color: var(--ink);
  text-decoration: none;
}
.badge span { display: flex; align-items: center; padding: 0 4px; }
.badge .me { background: var(--ink); color: var(--bg); }
.badge:hover { background: var(--ink); color: var(--bg); }
.badge:hover .me { background: var(--bg); color: var(--ink); }
.email { margin-left: auto; font-family: var(--pixel); font-size: calc(9px * var(--u)); }

/* responsive */
@media (max-width: 1400px) {
  .ports { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .page { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr auto; }
  .topbar { grid-column: 1; min-height: calc(28px * var(--u)); flex-wrap: wrap; gap: 2px 14px; padding-top: 6px; padding-bottom: 6px; }
  .side { border-right: 0; border-bottom: 1px solid var(--ink); flex-direction: row; align-items: center; gap: 24px; padding: 14px; }
  .nav { flex: 1; min-width: 0; }
  .main { padding: 24px 14px; gap: 28px; }
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .wordmark { font-size: clamp(44px, 15vw, 88px); letter-spacing: -0.068em; overflow-wrap: anywhere; }
  .ports { grid-template-columns: repeat(3, 1fr); }
  .feed { grid-template-columns: 1fr; }
  .foot { grid-column: 1; flex-wrap: wrap; padding: 8px 14px; }
}
@media (max-width: 520px) {
  .topbar-ver { display: none; }
  .side { flex-direction: column; align-items: stretch; gap: 16px; }
  .logo { width: 100%; max-width: calc(170px * var(--u) * 0.85); }
  .ports { grid-template-columns: repeat(2, 1fr); }
  .email { margin-left: 0; width: 100%; }
}

/* easter-egg terminal (src/assets/terminal.js) */
.term {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(42, 41, 38, 0.72);
}
.term[hidden] { display: none; }
.term-win {
  box-sizing: border-box;
  width: min(calc(720px * var(--u) * 0.8), 100%);
  height: min(calc(460px * var(--u) * 0.8), 100%);
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: VT323, "IBM Plex Mono", ui-monospace, monospace;
  font-size: calc(20px * var(--u));
  line-height: 1.15;
}
.term-bar {
  display: flex;
  justify-content: space-between;
  padding: 4px 10px;
  border-bottom: 1px solid var(--accent);
  font-family: var(--pixel);
  font-size: calc(8px * var(--u));
  letter-spacing: 1px;
}
.term-out { flex: 1; overflow-y: auto; padding: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.term-out a { color: var(--bg); text-decoration: underline; }
.term-dim { color: var(--metal); }
.term-line { display: flex; gap: 8px; padding: 0 10px 10px; }
.term-in {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--bg);
  font: inherit;
  caret-color: var(--accent);
}
.term-in:focus { outline: none; }
