/* =====================================================================
   BRUTALIST TERMINAL — Variation B
   Black + monospace. JetBrains Mono dominant, DM Serif Display surprise.
   ===================================================================== */

:root {
  --bg: #050606;
  --bg-alt: #0c0d0d;
  --bg-panel: #131414;
  --line: #2a2c2c;
  --line-bright: #3d4040;
  --txt: #d8dad6;
  --txt-soft: #8b8d88;
  --txt-mute: #5e5f5b;
  --green: #aef27f;
  --green-deep: #6fb544;
  --amber: #f0b132;
  --red: #ec4f3a;
  --serif: "DM Serif Display", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --display: "Major Mono Display", "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-image:
    repeating-linear-gradient(0deg, transparent 0, transparent 2px, rgba(255, 255, 255, 0.012) 2px, rgba(255, 255, 255, 0.012) 4px);
}

a { color: var(--green); text-decoration: none; transition: color .15s; }
a:hover { color: var(--amber); text-decoration: underline; }
p { margin: 0 0 1em; }
em { font-style: normal; color: var(--amber); }
strong { color: #fff; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--green); color: var(--bg); padding: 6px 10px; }

/* ======================== BOOT BAR ======================== */
.bootbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--txt-mute);
  text-transform: lowercase;
  letter-spacing: 0.04em;
}
.boot-led {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.3; } }
.boot-spacer { flex: 1; min-width: 12px; }

/* ======================== HERO ======================== */
.hero {
  padding: 32px 16px 48px;
  max-width: 1280px;
  margin: 0 auto;
}
.hero-frame {
  border: 1px solid var(--line-bright);
  background: var(--bg-alt);
  position: relative;
}
.hero-frame::before {
  content: "│ ┐ │ │";
  letter-spacing: 12px;
  color: var(--txt-mute);
  position: absolute;
  top: 8px;
  right: 14px;
  font-size: 10px;
}

.hero-head {
  border-bottom: 1px solid var(--line);
  padding: 14px 22px;
  background: linear-gradient(90deg, rgba(174, 242, 127, 0.04), transparent);
}
.hero-head-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.prompt { color: var(--green); font-weight: 700; }
.cmd { color: var(--txt-soft); }
.line.dim { color: var(--txt-mute); margin-bottom: 18px; }

.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px;
  padding: 36px 28px 32px;
}

/* big name as NAMEPLATE — one giant name + single meta line, no fill */
.big-name {
  font-family: var(--mono);
  font-weight: 700;
  margin: 6px 0 16px;
  font-size: clamp(40px, 7vw, 82px);
  letter-spacing: -0.035em;
  line-height: 0.95;
  color: #fff;
}
.big-name-val {
  display: inline-block;
  padding-bottom: 10px;
  border-bottom: 4px solid var(--green);
}
.big-name-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-family: var(--mono);
  font-size: clamp(12px, 1.4vw, 15px);
  letter-spacing: 0.06em;
  margin: 0 0 24px;
}
.meta-role { color: var(--amber); font-weight: 700; }
.meta-loc { color: var(--txt); font-weight: 500; }
.meta-since { color: var(--txt-soft); }
.meta-sep { color: var(--txt-mute); }

.hero-tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.3;
  color: var(--txt);
  margin: 16px 0 24px;
  max-width: 50ch;
}
.hero-tag em { color: var(--amber); }

.hero-keys { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-keys kbd {
  font-family: var(--mono);
  font-size: 10px;
  background: var(--bg);
  border: 1px solid var(--line-bright);
  border-bottom-width: 2px;
  padding: 4px 8px;
  letter-spacing: 0.08em;
  color: var(--txt);
}

/* CRT */
.crt { margin: 0; }
.crt-bezel {
  background: #1a1a1a;
  background:
    linear-gradient(180deg, #232525 0%, #0a0a0a 100%);
  padding: 16px 16px 8px;
  border: 1px solid var(--line-bright);
  border-radius: 6px;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 8px 24px rgba(0,0,0,0.5);
}
.crt-screen {
  background: #000;
  border-radius: 8px;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  box-shadow: inset 0 0 24px rgba(0,0,0,0.9), inset 0 0 4px rgba(174, 242, 127, 0.2);
}
.crt-screen video {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.1) saturate(1.1);
}
.crt-scanlines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, transparent 0, transparent 2px, rgba(0,0,0,0.35) 2px, rgba(0,0,0,0.35) 3px);
  pointer-events: none;
  mix-blend-mode: multiply;
}
.crt-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
}
.crt-knobs {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 4px 6px;
}
.knob {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #4a4a4a, #1a1a1a);
  box-shadow: inset 0 0 0 1px #2a2a2a;
}
.crt-led {
  margin-left: auto;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 6px var(--red);
  animation: blink 1.2s linear infinite;
}
.crt figcaption {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--txt-mute);
}
.crt figcaption span:first-child { color: var(--red); }
.crt figcaption span:nth-child(2) { color: var(--green); }

/* HERO FOOT */
.hero-foot {
  border-top: 1px solid var(--line);
  padding: 22px 28px 26px;
  background: linear-gradient(0deg, rgba(174, 242, 127, 0.03), transparent);
}
.prompt-line { font-size: 12px; margin-bottom: 12px; }
.hero-foot ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  font-size: 13px;
}
.hero-foot ul li span:first-child {
  color: var(--amber);
  font-weight: 500;
  margin-right: 4px;
}

/* ======================== BLOCK (section) ======================== */
.block {
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 16px;
  border-top: 1px solid var(--line);
}
.block-alt { background: var(--bg-alt); }
.block-head {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  margin-bottom: 28px;
  padding: 10px 14px;
  border: 1px solid var(--line-bright);
  background: var(--bg-panel);
  flex-wrap: wrap;
}
.block-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--bg);
  background: var(--green);
  padding: 3px 8px;
  letter-spacing: 0.1em;
}
.block-path { color: var(--amber); font-weight: 500; }
.block-stat { color: var(--txt-mute); margin-left: auto; font-size: 11px; }

/* ======================== PROFILE ======================== */
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}
.big-quote {
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.3;
  color: var(--amber);
  margin: 0 0 28px;
  position: relative;
  font-style: italic;
}
.big-quote-mark {
  font-family: var(--serif);
  color: var(--green);
  font-size: 1.4em;
  font-style: normal;
  opacity: 0.7;
  margin: 0 0.06em;
}
.datacard {
  background: var(--bg-panel);
  border: 1px solid var(--line-bright);
  padding: 18px 20px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--txt);
  overflow: auto;
  margin: 0;
}
.datacard code { color: var(--txt); }

/* ======================== SHIPPED ======================== */
.ship-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.ship-grid li { background: var(--bg); padding: 0; }
.ship-grid a {
  display: block;
  padding: 18px 18px 16px;
  color: var(--txt);
  height: 100%;
}
.ship-grid a:hover {
  background: var(--bg-panel);
  text-decoration: none;
}
.ship-grid a:hover h3 { color: var(--green); }
.ship-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #000;
  margin-bottom: 14px;
  display: block;
  border: 1px solid var(--line);
}
.ship-grid h3 {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--txt);
  word-break: break-word;
  transition: color .15s ease;
}
.ship-grid p {
  font-size: 11px;
  color: var(--txt-mute);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ======================== CASE LIST ======================== */
.case-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.case-list li {
  padding: 24px 26px;
  background: var(--bg);
}
.case-list li:hover { background: var(--bg-panel); }
.case-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 8px;
}
.case-list h3 {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--amber);
  word-break: break-word;
}
.case-list p {
  font-size: 13px;
  color: var(--txt-soft);
  line-height: 1.65;
  margin: 0;
}

/* ======================== ROSTER (log table) ======================== */
.log {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  border: 1px solid var(--line-bright);
  background: var(--bg-panel);
}
.log th, .log td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.log thead th {
  background: var(--bg);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  border-bottom: 1px solid var(--line-bright);
}
.log tbody tr:hover { background: rgba(174, 242, 127, 0.04); }
.log tbody td:first-child { color: var(--amber); white-space: nowrap; font-weight: 500; }
.log tbody td:nth-child(2) { color: var(--txt); font-weight: 500; }
.log tbody td:nth-child(3) { color: var(--txt-soft); }
.log tbody td:nth-child(4) { color: var(--txt-mute); }
.log tbody em { color: var(--amber); }

/* ======================== STACK JSON ======================== */
.stack-json {
  background: var(--bg-panel);
  border: 1px solid var(--line-bright);
  padding: 22px 26px;
  font-size: 13px;
  line-height: 1.85;
  margin: 0;
  overflow: auto;
}
.stack-json .k { color: var(--green); }
.stack-json .v { color: var(--amber); }

/* ======================== CONTACT SHELL ======================== */
.contact-shell {
  background: var(--bg-panel);
  border: 1px solid var(--line-bright);
  padding: 22px 24px;
  font-size: 14px;
}
.contact-shell .dim { color: var(--txt-mute); margin-bottom: 18px; }
.contact-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}
.contact-list li { font-size: 14px; }
.contact-list span { color: var(--green); margin-right: 10px; font-weight: 500; }
.contact-list em { color: var(--txt-mute); margin-left: 6px; font-size: 12px; }

/* ======================== FOOTER ======================== */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 18px 16px;
  margin-top: 0;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--txt-mute);
  text-transform: lowercase;
  letter-spacing: 0.05em;
}
.footer-sep { color: var(--green); }

/* ======================== RESPONSIVE / MOTION ======================== */
@media (max-width: 820px) {
  .hero-body { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .hero-tag { font-size: 18px; }
  .case-list { grid-template-columns: 1fr; }
  .case-list h3 { font-size: 14px; }
  .log { font-size: 11px; }
  .log th, .log td { padding: 8px 10px; }
}
@media (max-width: 600px) {
  /* nameplate: let it scale down on small screens (was being forced to 18px) */
  .big-name { font-size: clamp(32px, 11vw, 60px); }

  /* history.log: collapse the 4-col table into stacked cards so the notes
     column gets full width instead of a crushed sliver */
  .log { display: block; border: 0; background: transparent; font-size: 12.5px; }
  .log thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .log tbody, .log tr, .log td { display: block; }
  .log tr {
    border: 1px solid var(--line-bright);
    background: var(--bg-panel);
    padding: 12px 14px;
    margin-bottom: 10px;
  }
  .log tbody tr:hover { background: var(--bg-panel); }
  .log td { border: 0; padding: 1px 0; white-space: normal; overflow-wrap: anywhere; }
  .log tbody td:first-child { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 3px; }
  .log tbody td:nth-child(2) { font-size: 14px; }
  .log tbody td:nth-child(4) { margin-top: 8px; line-height: 1.65; }
}
@media (prefers-reduced-motion: reduce) {
  .boot-led, .crt-led { animation: none; }
}
