:root {
  --bg: #0b0e11;
  --panel: #12161a;
  --text: #d8e0e6;
  --muted: #6b7680;
  --accent: #7dd3c0;
  --accent-2: #c6a6ff;
  --line: #232a30;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
}

.term {
  position: relative;
  width: 100%;
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 22, 26, 0.42);
  backdrop-filter: blur(5px) saturate(130%);
  -webkit-backdrop-filter: blur(5px) saturate(130%);
  overflow: hidden;
  transition: transform 0.15s ease-out;
}

.term::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 18, 22, 0.6);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
}

.term-title {
  margin-left: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.term-body {
  position: relative;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem) clamp(1.75rem, 4vw, 2.5rem);
}

.node-mark {
  position: absolute;
  top: 2rem;
  right: 2rem;
  opacity: 0.9;
}

.prompt {
  color: var(--accent);
  margin: 0 0 0.25rem;
}

.prompt::before {
  content: "sam@turrell:~$ ";
  color: var(--muted);
}

.type-line {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  animation: typeName 1.1s steps(11, end) 0.3s both;
}

@keyframes typeName {
  from { width: 0; }
  to { width: 11.2ch; }
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 1rem 0 0.35rem;
  font-weight: 600;
  color: #fff;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

@keyframes blink {
  50% { opacity: 0; }
}

.fade-line {
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.role {
  color: var(--accent-2);
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  animation-delay: 1.5s;
}

.lede {
  color: var(--muted);
  line-height: 1.7;
  max-width: 56ch;
  margin: 0 0 2rem;
  font-size: 0.92rem;
  animation-delay: 1.8s;
}

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

.prompt2 {
  animation-delay: 2.2s;
}

.skills {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  line-height: 1.9;
}

.skills li {
  opacity: 0;
  animation: fadeUp 0.4s ease forwards;
}

.skills li::before {
  content: "├─ ";
  color: var(--line);
}

.skills li:last-child::before {
  content: "└─ ";
}

.skills li:nth-child(1) { animation-delay: 2.5s; }
.skills li:nth-child(2) { animation-delay: 2.62s; }
.skills li:nth-child(3) { animation-delay: 2.74s; }
.skills li:nth-child(4) { animation-delay: 2.86s; }
.skills li:nth-child(5) { animation-delay: 2.98s; }
.skills li:nth-child(6) { animation-delay: 3.10s; }
.skills li:nth-child(7) { animation-delay: 3.22s; }
.skills li:nth-child(8) { animation-delay: 3.34s; }

.links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  padding-top: 1.25rem;
  margin: 0;
  border-top: 1px dashed var(--line);
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
  animation-delay: 3.6s;
}

.links a {
  color: var(--accent);
  text-decoration: none;
}

.links a::before {
  content: "→ ";
  color: var(--muted);
}

.links a:hover,
.links a:focus-visible {
  color: var(--accent-2);
}

.links a:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (max-width: 640px) {
  .node-mark {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .type-line {
    animation: none;
    width: 11.2ch;
  }
  .cursor {
    animation: none;
  }
  .fade-line,
  .skills li,
  .links {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .term {
    transition: none;
  }
}
