:root {
  --bg: #0b0d0f;
  --bg-elev: #14171c;
  --bg-chrome: #1a1d23;
  --text: #d8dadf;
  --text-bright: #f4f5f7;
  --muted: #6b7280;
  --accent: #4ade80;
  --accent-dim: #166534;
  --accent-soft: rgba(74, 222, 128, 0.12);
  --warn: #fbbf24;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono",
    Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;

  --content-width: 920px;
  --pad: clamp(16px, 4vw, 40px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(
      circle at 20% 0%,
      rgba(74, 222, 128, 0.04),
      transparent 60%
    ),
    radial-gradient(
      circle at 100% 100%,
      rgba(74, 222, 128, 0.03),
      transparent 50%
    ),
    var(--bg);
  padding: clamp(20px, 5vw, 60px) clamp(12px, 3vw, 32px);
}

/* faint scanline texture, kept very subtle */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.012) 0 1px,
    transparent 1px 3px
  );
  z-index: 1;
  mix-blend-mode: overlay;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 8px 12px;
  z-index: 100;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── terminal window ─────────────────────────────────────── */

.terminal {
  position: relative;
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 2;
}

.terminal__chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-chrome);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.dot--red    { background: #ff5f57; }
.dot--yellow { background: #febc2e; }
.dot--green  { background: #28c840; }

.terminal__title {
  margin-left: 12px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
  user-select: none;
}

.terminal__screen {
  padding: var(--pad);
}

/* ─── boot sequence ───────────────────────────────────────── */

.boot {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13px;
}
.boot__line {
  margin: 2px 0;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}
.boot__line:nth-child(1) { animation-delay: 0.15s; }
.boot__line:nth-child(2) { animation-delay: 0.45s; }
.boot__line:nth-child(3) { animation-delay: 0.85s; }

.ok {
  color: var(--accent);
  font-weight: 500;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ─── ASCII logo ──────────────────────────────────────────── */

.ascii {
  font-family: var(--mono);
  font-size: clamp(6px, 1.1vw, 11px);
  line-height: 1.05;
  color: var(--accent);
  margin: 8px 0 4px;
  white-space: pre;
  overflow-x: auto;
  opacity: 0;
  animation: fadeIn 0.6s 1.1s forwards;
  text-shadow: 0 0 18px rgba(74, 222, 128, 0.25);
}

.tagline {
  margin: 0 0 36px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
  opacity: 0;
  animation: fadeIn 0.5s 1.4s forwards;
}

/* ─── content blocks ──────────────────────────────────────── */

.block {
  margin: 0 0 32px;
  opacity: 0;
  animation: fadeIn 0.5s forwards;
}
.block:nth-of-type(1) { animation-delay: 1.6s; }
.block:nth-of-type(2) { animation-delay: 1.85s; }
.block:nth-of-type(3) { animation-delay: 2.05s; }
.block:nth-of-type(4) { animation-delay: 2.25s; }

.prompt {
  margin: 0 0 6px;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}
.prompt__user   { color: var(--accent); }
.prompt__at     { color: var(--muted); }
.prompt__host   { color: var(--text-bright); }
.prompt__sep    { color: var(--muted); }
.prompt__path   { color: var(--warn); }
.prompt__sigil  { color: var(--muted); margin-right: 8px; }
.prompt__cmd    { color: var(--text); }

.output {
  margin: 0 0 0 16px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}
.output p { margin: 0 0 8px; }
.output p:last-child { margin-bottom: 0; }
.output strong {
  color: var(--text-bright);
  font-weight: 600;
}

.output--list {
  list-style: none;
  padding-left: 14px;
}
.output--list li {
  margin: 4px 0;
}
.bullet {
  color: var(--accent);
  margin-right: 10px;
}

.muted {
  color: var(--muted);
}

/* ─── primary email CTA ───────────────────────────────────── */

.block--contact .output {
  border-left-color: var(--accent-dim);
}

.cta {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  margin: 14px 0 18px;
  padding: 14px 20px;
  font-family: var(--mono);
  font-size: clamp(15px, 2.6vw, 20px);
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  background: var(--accent-soft);
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.cta__sigil {
  color: var(--muted);
  font-weight: 400;
}
.cta__email {
  color: var(--accent);
  letter-spacing: 0.01em;
}
.cta__arrow {
  color: var(--accent);
  transition: transform 0.18s ease;
}
.cta:hover,
.cta:focus-visible {
  background: rgba(74, 222, 128, 0.18);
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 1px var(--accent), 0 0 24px rgba(74, 222, 128, 0.2);
}
.cta:hover .cta__arrow,
.cta:focus-visible .cta__arrow {
  transform: translateX(4px);
}

/* ─── ready prompt + cursor ───────────────────────────────── */

.ready {
  margin: 0 0 8px;
  font-size: 14px;
  opacity: 0;
  animation: fadeIn 0.4s 2.4s forwards;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--accent);
  vertical-align: middle;
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
  to { opacity: 0; }
}

/* ─── footer ──────────────────────────────────────────────── */

.footer {
  margin: 32px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.footer p { margin: 0; }

/* ─── responsive ──────────────────────────────────────────── */

@media (max-width: 560px) {
  .ascii { font-size: 5px; }
  .prompt { font-size: 13px; }
  .output { margin-left: 0; padding-left: 12px; }
  .terminal__title { display: none; }
  .cta { padding: 12px 14px; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
  .cursor { animation: none; }
}

/* selection */
::selection {
  background: var(--accent-soft);
  color: var(--text-bright);
}
