@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #181926;
  --panel: #202231;
  --panel-strong: #25273a;
  --line: #363a4f;
  --text: #cad3f5;
  --muted: #a5adcb;
  --subtle: #8087a2;
  --blue: #8aadf4;
  --cyan: #8bd5ca;
  --green: #a6da95;
  --yellow: #eed49f;
  --peach: #f5a97f;
  --rose: #f0a7b9;
  --red: #ed8796;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  display: flex;
  flex-direction: column;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(139, 213, 202, 0.06), transparent 360px),
    var(--bg);
  color: var(--text);
  font-family: "IBM Plex Mono", Consolas, "Liberation Mono", monospace;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.58;
}

::selection {
  background: #494d64;
  color: #ffffff;
}

a {
  color: var(--yellow);
  text-decoration: none;
  text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
  color: var(--cyan);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

p {
  margin: 0;
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

.intro {
  display: grid;
  gap: 18px;
  padding-top: 28px;
}

.brand {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 14px;
  color: var(--text);
}

.brand:hover,
.brand:focus-visible {
  color: var(--text);
  text-decoration: none;
}

.brand img {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
}

.brand-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  color: #ffffff;
  font-size: 2rem;
  line-height: 1.1;
}

h2 {
  display: inline-block;
  width: fit-content;
  margin-bottom: 10px;
  padding: 0 0.45rem;
  background: var(--blue);
  color: #10121b;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
}

h3 {
  font-size: 1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.domain {
  color: var(--muted);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.terminal-line {
  color: var(--text);
  overflow-wrap: anywhere;
}

.typing-line {
  display: inline-block;
  position: relative;
  width: 35ch;
  max-width: 100%;
  overflow: hidden;
  padding-right: 12px;
  white-space: nowrap;
  animation: typing 1.96s steps(28);
}

.typing-line::after {
  content: "";
  position: absolute;
  top: 0.16em;
  right: 0;
  width: 10px;
  height: 1.35em;
  background: var(--rose);
  animation: cursor-blink 0.7s step-end infinite alternate;
}

.text-secondary {
  color: var(--blue);
}

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

.cursor {
  color: var(--rose);
}

.output {
  max-width: 82ch;
  animation: fade-in 0.8s ease both;
}

.intro-output {
  display: grid;
  gap: 16px;
}

.typewriter-line {
  display: block;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
}

.typewriter-heading {
  padding: 0 0.45rem;
  background: var(--blue);
  color: #10121b;
  overflow: hidden;
}

.typewriter-heading-text {
  display: inline-block;
  line-height: 1.45;
  white-space: nowrap;
}

.typewriter-row {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  animation: typewriter-row-reveal var(--typewriter-duration, 0.54s) steps(var(--typewriter-steps, 24), end)
    var(--typewriter-delay, 0s) both;
  will-change: clip-path, opacity;
}

.typewriter-sequence:not(.is-complete) .typewriter-row {
  cursor: pointer;
}

.typewriter-sequence.is-complete .typewriter-row,
.typewriter-sequence.is-skipped .typewriter-row {
  opacity: 1;
  clip-path: inset(0);
  animation: none;
}

.typewriter-sequence.is-skipped.is-flashing .typewriter-row {
  animation: text-flash 0.5s ease;
}

.about-copy {
  display: grid;
  gap: 1rem;
}

.about-copy-line {
  display: block;
  width: fit-content;
  max-width: 100%;
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  white-space: nowrap;
}

.reveal-panel.is-body-visible .about-copy-line {
  animation: about-copy-line-type var(--about-line-duration, 0.5s) steps(var(--about-line-steps, 24), end)
    var(--about-line-delay, 0s) both;
}

.reveal-panel .output {
  animation: none;
}

.reveal-panel h2 {
  overflow: hidden;
  white-space: nowrap;
}

.reveal-panel.is-revealing h2 {
  width: 0;
  border-right: 8px solid var(--rose);
  animation:
    reveal-title-type 0.92s steps(16) forwards,
    blink 0.7s step-end 2;
}

.reveal-panel.is-title-done h2,
.reveal-panel.is-body-visible h2 {
  width: auto;
  overflow: visible;
  border-right: 0;
  animation: none;
}

.reveal-body {
  opacity: 0;
  transform: translateY(4px);
}

.reveal-panel.is-body-visible .reveal-body {
  animation: fade-in 0.8s ease forwards;
}

.quick-links {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quick-links a::before {
  content: "● ";
  color: var(--green);
}

.quick-links a:hover,
.quick-links a:focus-visible {
  text-decoration: none;
}

.command-block {
  margin-top: 32px;
}

.command-block > .terminal-line {
  margin-bottom: 6px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.intro-output > .metrics {
  margin-top: 0;
}

.metric {
  min-width: 0;
  padding: 10px 0 10px 12px;
  border-left: 2px solid var(--cyan);
  background: rgba(139, 213, 202, 0.05);
}

.metric span,
.metric strong {
  display: block;
}

.metric span {
  color: var(--muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.metric strong {
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1.2;
}

.project-list {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.reveal-panel .project-row {
  opacity: 0;
  transform: translateY(12px) scale(0.98);
}

.reveal-panel.is-body-visible .project-row {
  animation: project-row-wave-in 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
  animation-delay: calc(0.12s + (var(--project-row-wave-index, 0) * 90ms));
}

.project-list .project-row:nth-child(1) {
  --project-row-wave-index: 0;
}

.project-list .project-row:nth-child(2) {
  --project-row-wave-index: 1;
}

.project-list .project-row:nth-child(3) {
  --project-row-wave-index: 2;
}

.project-list .project-row:nth-child(4) {
  --project-row-wave-index: 3;
}

.project-list .project-row:nth-child(5) {
  --project-row-wave-index: 4;
}

.project-list .project-row:nth-child(6) {
  --project-row-wave-index: 5;
}

.info-list {
  margin: 0;
  padding-left: 1.5rem;
}

.info-list a:hover {
  text-decoration: none;
}

.info-list li + li {
  margin-top: 0.2rem;
}

.project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 30%);
  gap: 16px;
  align-items: center;
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.project-row:hover {
  border-color: #5b6078;
  background: var(--panel-strong);
}

.project-copy {
  min-width: 0;
}

.project-copy p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.project-copy h3 a:hover,
.project-copy h3 a:focus-visible {
  text-decoration: none;
}

.project-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 0;
}

.status-badge {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.2;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.progress {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.progress-track {
  display: block;
  width: min(190px, 100%);
  min-width: 112px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #363a4f;
}

.progress-fill {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: var(--progress-color, var(--yellow));
}

.progress strong {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}

.project-row[data-state="live"] {
  --progress-color: var(--green);
}

.project-row[data-state="live"] .status-badge {
  border-color: rgba(166, 218, 149, 0.45);
  color: var(--green);
}

.project-row[data-state="building"] {
  --progress-color: var(--yellow);
}

.project-row[data-state="building"] .status-badge {
  border-color: rgba(238, 212, 159, 0.45);
  color: var(--yellow);
}

.project-row[data-state="early"] {
  --progress-color: var(--peach);
}

.project-row[data-state="early"] .status-badge {
  border-color: rgba(245, 169, 127, 0.45);
  color: var(--peach);
}

.project-row[data-state="seed"] {
  --progress-color: var(--red);
}

.project-row[data-state="seed"] .status-badge {
  border-color: rgba(237, 135, 150, 0.45);
  color: var(--red);
}

.footer {
  margin-top: auto;
  padding: 36px 0 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

.not-found {
  display: grid;
  align-content: center;
  min-height: 100vh;
  gap: 16px;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 35ch;
  }
}

@keyframes reveal-title-type {
  from {
    width: 0;
  }
  to {
    width: var(--reveal-heading-width, 12ch);
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

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

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes project-row-wave-in {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  72% {
    opacity: 1;
    transform: translateY(-2px) scale(1.005);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes about-copy-line-type {
  from {
    opacity: 1;
    clip-path: inset(0 100% 0 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0);
  }
}

@keyframes typewriter-row-reveal {
  from {
    opacity: 1;
    clip-path: inset(0 100% 0 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0);
  }
}

@keyframes text-flash {
  0% {
    background: transparent;
    color: var(--text);
  }
  45% {
    background: var(--blue);
    color: #10121b;
  }
  100% {
    background: transparent;
    color: var(--text);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (min-width: 760px) {
  body {
    font-size: 18px;
  }

  .shell {
    width: min(1040px, calc(100% - 56px));
  }

  .intro {
    padding-top: 40px;
  }
}

@media (max-width: 720px) {
  .project-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .project-meta {
    justify-items: start;
  }

  .progress {
    justify-content: flex-start;
  }

  .metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 440px) {
  .shell {
    width: min(100% - 24px, 1040px);
  }

  .brand {
    align-items: flex-start;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  h1 {
    font-size: 1.55rem;
  }

  .typing-line {
    width: 100%;
    white-space: normal;
    padding-right: 0;
    animation: fade-in 0.8s ease both;
  }

  .typing-line::after {
    display: none;
  }

  .quick-links {
    gap: 8px 12px;
  }

  .project-row {
    padding: 10px;
  }

  .progress {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .progress-track {
    width: 100%;
    min-width: 0;
  }
}
