/* ── Reset & base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:      #39ff14;
  --green-dim:  #1a7a00;
  --green-mid:  #22cc00;
  --bg:         #0a0a0a;
  --scanline:   rgba(0, 255, 0, 0.02);
  --cursor-w:   0.6ch;
}

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--green);
  font-family: monospace;
  line-height: 1.6;
  min-height: 100vh;
  padding: 2rem 1rem;
  overflow-x: hidden;
  text-shadow: 0 0 6px rgba(57, 255, 20, 0.45);
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 3px,
      var(--scanline) 3px,
      var(--scanline) 4px
    );
}

/* ── Layout ───────────────────────────────────── */
main {
  max-width: 68ch;
  margin: 0 auto;
}

section { margin-bottom: 3rem; }

/* ── Boot sequence ────────────────────────────── */
.boot-seq {
  margin-bottom: 1.5rem;
  font-size: 0.78rem;
  color: var(--green-dim);
}

.boot-line {
  opacity: 0;
  animation: fadein 0.15s forwards;
}
.boot-line:nth-child(1) { animation-delay: 0.1s; }
.boot-line:nth-child(2) { animation-delay: 0.3s; }
.boot-line:nth-child(3) { animation-delay: 0.5s; }
.boot-line:nth-child(4) { animation-delay: 0.7s; }
.boot-line:nth-child(5) { animation-delay: 1.0s; }

.done { color: var(--green); }
.fail { color: #ff4444; text-shadow: 0 0 6px rgba(255, 68, 68, 0.6); }

/* ── Reveal animations ────────────────────────── */
.reveal {
  opacity: 0;
  animation: fadein 0.4s forwards;
}
.reveal-1 { animation-delay: 1.4s; }
.reveal-2 { animation-delay: 1.7s; }
.reveal-3 { animation-delay: 2.0s; }
.reveal-4 { animation-delay: 2.3s; }

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

/* ── Prompt prefix ────────────────────────────── */
.prompt::before {
  content: "> ";
  color: var(--green-dim);
}

/* ── Header ───────────────────────────────────── */
header {
  border-bottom: 1px solid var(--green-dim);
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
}

h1 {
  font-size: clamp(1.2rem, 4vw, 2rem);
  font-weight: bold;
  color: var(--green);
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.6);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.tagline {
  color: var(--green-dim);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

/* ── Section headings ─────────────────────────── */
h2 {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green-dim);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--green-dim);
  opacity: 0.4;
}

/* ── Bio ──────────────────────────────────────── */
.bio p {
  font-size: 1rem;
  max-width: 60ch;
  color: var(--green);
}

/* ── Projects ─────────────────────────────────── */
.project-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.project-list li {
  display: grid;
  grid-template-columns: 1fr;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  border-left: 2px solid var(--green-dim);
  padding-left: 1rem;
  transition: border-color 0.2s;
}
.project-list li:hover { border-color: var(--green); }

.project-name { font-weight: bold; font-size: 1rem; }

.project-desc {
  color: var(--green-dim);
  font-size: 0.85rem;
  grid-column: 1;
}

/* ── Links ────────────────────────────────────── */
.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.link-list li { display: flex; align-items: center; gap: 0.75rem; }

.link-list a {
  color: var(--green-mid);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s;
}
.link-list a:hover { color: var(--green); text-decoration: underline; }

.link-label {
  color: var(--green-dim);
  font-size: 0.8rem;
  min-width: 8ch;
}

/* ── Cursor ───────────────────────────────────── */
.cursor {
  display: inline-block;
  width: var(--cursor-w);
  height: 1.1em;
  background: var(--green);
  vertical-align: text-bottom;
  animation: blink 1.1s step-end infinite;
  box-shadow: 0 0 8px var(--green);
  margin-left: 0.1ch;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Footer ───────────────────────────────────── */
footer {
  border-top: 1px solid var(--green-dim);
  padding-top: 1rem;
  font-size: 0.75rem;
  color: var(--green-dim);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ── 404 page ─────────────────────────────────── */
.error-section { margin-top: 4rem; }

.error-code {
  font-size: clamp(4rem, 20vw, 8rem);
  font-weight: bold;
  color: var(--green-dim);
  letter-spacing: 0.05em;
  line-height: 1;
  margin-bottom: 1rem;
  text-shadow: 0 0 30px rgba(57, 255, 20, 0.2);
}

.error-msg {
  font-size: 1rem;
  margin-bottom: 2rem;
  color: var(--green);
}

.back-link {
  color: var(--green-mid);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s;
}
.back-link:hover { color: var(--green); text-decoration: underline; }
.back-link::before { content: "$ "; color: var(--green-dim); }

@media (prefers-reduced-motion: reduce) {
  .boot-line, .reveal { animation: none; opacity: 1; }
  .cursor { animation: none; }
}