@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0d10;
  --fg: #d6e1cf;
  --muted: #b8c5b3;
  --muted-2: #5b6a52;
  --prompt: #7fa650;
  --accent: #62a0ea;
  --lit: #e9b949;
  --err: #e06c5b;
  --surface: #10141a;
  --rule: #1f2630;

  --mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --col-max: 1400px;
  --pad-desktop: 48px;
  --pad-phone: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(127,166,80,0.06), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px);
}

.col {
  position: relative;
  z-index: 1;
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 56px var(--pad-desktop) 0;
}

.titlebar {
  display: flex;
  justify-content: space-between;
  opacity: 0.55;
  font-size: 11px;
  letter-spacing: 0.04em;
  margin-bottom: 36px;
}

.lanes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 8px 0 28px;
}

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

@media (max-width: 600px) {
  .col { padding: 32px var(--pad-phone) 0; }
  .lanes { grid-template-columns: 1fr; }
  .titlebar { margin-bottom: 22px; }
}

/* === wordmark === */
.wordmark {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin: 0 0 10px;
}
.wordmark .name {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 0;
}
.wordmark .name .dot,
.wordmark .name .tld { color: var(--prompt); }
.wordmark .meta {
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .wordmark .name { font-size: 26px; }
}

.tagline {
  color: var(--muted);
  opacity: 0.85;
  margin: 0 0 30px;
  max-width: 70ch;
}

/* === blocks (whoami / contact / etc.) === */
.block {
  border-left: 2px solid var(--rule);
  padding: 4px 0 4px 14px;
  margin: 0 0 16px;
  max-width: 80ch;
}
.block.active { border-left-color: var(--prompt); }
.block.full { max-width: none; }
.block p { margin: 0; }

.prompt { color: var(--prompt); }
.accent { color: var(--accent); text-decoration: none; }
.accent:hover { text-decoration: underline; }
.muted { opacity: 0.55; }
.muted-link { color: var(--muted-2); text-decoration: none; }
.muted-link:hover { color: var(--muted); }

/* === lane cards === */
.lane {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 18px 18px 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.lane:hover {
  border-color: var(--prompt);
  background: #121821;
}
.lane .key {
  color: var(--lit);
  font-weight: 600;
  font-size: 12px;
}
.lane .lane-name {
  color: var(--fg);
  font-weight: 600;
  margin: 6px 0 8px;
  font-size: 14px;
}
.lane .desc {
  color: var(--muted);
  opacity: 0.8;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

/* === footer === */
.page-footer {
  display: flex;
  justify-content: space-between;
  opacity: 0.45;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 18px 0 14px;
  border-top: 1px dashed var(--rule);
  margin-top: 28px;
}

/* === inline terminal log (output above prompt) === */
#terminal-log {
  font-family: var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 12px 0 0;
}
#terminal-log .log-line { padding: 2px 0; }
#terminal-log .log-line.user { color: var(--fg); }
#terminal-log .log-line.user .prompt-fragment { color: var(--prompt); }
#terminal-log .log-line.dusty { color: var(--lit); }
#terminal-log .log-line.err { color: var(--err); }
#terminal-log .log-block {
  border-left: 2px solid var(--rule);
  padding: 4px 0 4px 14px;
  margin: 6px 0;
}

.live {
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, var(--bg) 70%, rgba(11,13,16,0));
  padding: 14px 0 18px;
  margin-top: 4px;
  z-index: 2;
}
.live .row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.live .prompt-label {
  color: var(--prompt);
  white-space: nowrap;
  user-select: none;
}
.live .prompt-label .muted { color: var(--muted-2); }
.live .prompt-label.chat { color: var(--lit); }
#prompt-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font: inherit;
  caret-color: transparent;
  padding: 0;
}
.cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--lit);
  vertical-align: -2px;
  margin-left: -8px;
  animation: blink 1.05s steps(2) infinite;
  pointer-events: none;
}
.cursor.spinner {
  background: transparent;
  animation: none;
  width: 1ch;
  text-align: center;
  color: var(--lit);
}
@keyframes blink { 50% { background: transparent; } }
.hint {
  color: var(--muted-2);
  font-size: 11px;
  margin-top: 6px;
}

/* matrix easter-egg theme override */
body.matrix-mode { background: #000; }
body.matrix-mode * { color: #00ff66 !important; }
body.matrix-mode .lane { border-color: #00ff66 !important; background: #001100 !important; }
