/* ──────────────────────────────────────────────────────────
   jeremy.design — black & white. monospace. nothing else.
   ────────────────────────────────────────────────────────── */
@font-face {
  font-family: "Departure Mono";
  src: url("fonts/DepartureMono-Regular.woff2") format("woff2");
  font-display: swap;
}
:root {
  --bg: #000;
  --fg: #fff;
  --dim: #888;
  --mono: "Departure Mono", ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}
html.invert { --bg: #fff; --fg: #000; --dim: #666; }

* { margin: 0; padding: 0; box-sizing: border-box; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  transition: background .15s, color .15s;
}
::selection { background: var(--fg); color: var(--bg); }
a { color: var(--fg); }
a:hover { background: var(--fg); color: var(--bg); text-decoration: none; }

/* CRT scanlines — barely there */
.crt {
  position: fixed; inset: 0; pointer-events: none; z-index: 9;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(127,127,127,.04) 2px 4px);
}

.wrap { max-width: 920px; margin: 0 auto; padding: 48px 20px 80px; }

/* ── banner ─────────────────────────────────────────────── */
#banner {
  font-size: clamp(12px, 4.5vw, 30px);
  line-height: 1.2;
  white-space: pre;
  margin-bottom: 10px;
  min-height: 7.2em;
}
.tagline { color: var(--dim); margin-bottom: 32px; }
.cursor { animation: blink 1.06s steps(1) infinite; }
.blink { animation: blink 1.06s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ── terminal ───────────────────────────────────────────── */
#terminal {
  border: 1px solid var(--fg);
  padding: 14px 16px;
  min-height: 130px;
  max-height: 420px;
  overflow-y: auto;
  cursor: text;
}
#terminal:focus { outline: none; box-shadow: 0 0 0 1px var(--fg); }
#output .line { white-space: pre-wrap; word-break: break-word; }
#output .line.dim { color: var(--dim); }
#output .line.err { font-weight: 700; }
#output a { text-underline-offset: 3px; }
.input-line { display: flex; align-items: baseline; gap: 8px; }
.prompt { flex-shrink: 0; }
#cmd {
  flex: 0 1 auto; width: 1ch; min-width: 1ch;
  background: none; border: none; color: var(--fg);
  font: inherit; caret-color: transparent; outline: none;
  padding: 0;
}
.input-cursor { margin-left: -6px; }
.hint { color: var(--dim); margin-top: 10px; font-size: 13px; }
.cmdlink {
  background: none; border: none; color: var(--fg); font: inherit;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0;
}
.cmdlink:hover { background: var(--fg); color: var(--bg); }

/* ── sections ───────────────────────────────────────────── */
section { margin-top: 72px; scroll-margin-top: 24px; }
h2 { font-size: 15px; font-weight: 700; letter-spacing: .14em; margin-bottom: 20px; }
.sec-num { color: var(--dim); margin-right: 6px; }
.h-slash { animation: blink 1.06s steps(1) infinite; }
.sub { color: var(--dim); margin: -12px 0 20px; font-size: 13px; }

#about-body p { margin: 6px 0; }
#about-body p::before { content: "> "; color: var(--dim); }
blockquote {
  margin-top: 24px; padding-left: 16px;
  border-left: 2px solid var(--fg);
  color: var(--dim); font-style: italic;
}
/* kudos bento */
#kudos-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.kudo { border: 1px solid var(--fg); padding: 18px; }
.kudo:first-child { grid-column: span 2; }
.kudo-head { display: flex; align-items: center; gap: 12px; }
.kudo-head canvas {
  display: block;
  width: 48px; height: 48px;
  image-rendering: pixelated;
  border: 1px solid var(--fg);
  filter: grayscale(1);
}
html.invert .kudo-head canvas { filter: grayscale(1) invert(1); }
.kudo-id { display: flex; flex-direction: column; line-height: 1.5; }
.kudo-org { color: var(--dim); font-size: 13px; }
.kudo blockquote {
  border-left: none;
  padding-left: 0;
  margin-top: 14px;
  font-size: 14px;
}
blockquote .author { font-style: normal; }

/* ── rows (work / projects / contact) ───────────────────── */
.rows { border-top: 1px solid var(--fg); }
.row {
  display: grid;
  grid-template-columns: 130px 180px 1fr auto;
  gap: 6px 20px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--fg);
  text-decoration: none;
  align-items: baseline;
}
a.row:hover { background: var(--fg); }
a.row:hover * { color: var(--bg); }
.row .c1 { color: var(--dim); font-size: 13px; }
.row .c2 { font-weight: 700; }
.row .c3 { color: var(--dim); }
.row .c4 { font-size: 12px; border: 1px solid var(--fg); padding: 1px 8px; white-space: nowrap; }
a.row:hover .c4 { border-color: var(--bg); }
.row-private { cursor: default; }
.row-private .c4 { border-style: dashed; }
.more { color: var(--dim); margin-top: 14px; font-size: 13px; }

/* ── contact = one big pixel envelope, full width ───────── */
.contact-grid { padding: 12px 0; }
.envelope { display: block; text-decoration: none; }
.envelope pre {
  font-size: min(calc((100vw - 40px) / 19.2), 46px);
  line-height: 1;
  white-space: pre;
  text-align: center;
}
.envelope:hover { background: var(--fg); }
.envelope:hover pre { color: var(--bg); }

/* ── linkedin icon, top-right ───────────────────────────── */
.li-link {
  position: absolute;
  top: 20px; right: 20px;
  z-index: 10;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--fg);
  font-weight: 700; font-size: 17px;
  text-decoration: none;
}
.li-link:hover { background: var(--fg); color: var(--bg); }

/* ── footer ─────────────────────────────────────────────── */
footer {
  margin-top: 96px; padding-top: 16px;
  border-top: 1px solid var(--fg);
  display: flex; flex-wrap: wrap; gap: 4px 24px;
  color: var(--dim); font-size: 12px;
}

/* ── responsive ─────────────────────────────────────────── */
@media (max-width: 720px) {
  /* stack each row: period → name → description → centered CTA */
  .row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .row .c4 {
    align-self: stretch;
    text-align: center;
    margin-top: 10px;
    padding: 6px 16px;
  }
  /* full labels on mobile — desktop keeps the bare icon / status */
  #work .row .c4::before { content: "visit "; }
  #projects .row .c4::after { content: " ↗"; }
  #kudos-list { grid-template-columns: 1fr; }
  .kudo:first-child { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor, .blink, .h-slash { animation: none; }
  html { scroll-behavior: auto; }
}
