@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono-latin.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --void: #050505;
  --text: #fafafa;
  --subtle: #a3a3a3;
  --muted: #525252;
  --faint: rgba(255, 255, 255, 0.05);
  --accent: #22d3ee;
  --measure: 42rem;
  --index: 20rem;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--void);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--void);
  color: var(--text);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
  font-size: 16px;
  line-height: 1.5;
  text-rendering: geometricPrecision;
}

body::selection {
  background: rgba(34, 211, 238, 0.2);
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
}

.ambient {
  position: fixed;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: min(42rem, 90vw);
  height: min(42rem, 90vw);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.03;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  outline: none;
}

.loading,
.fallback {
  width: min(var(--index), calc(100% - 3rem));
  margin: 0 auto;
  padding-top: 45vh;
  color: var(--muted);
  font-size: 0.875rem;
}

.index-view {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.index-shell {
  width: 100%;
  max-width: var(--index);
}

.index-header {
  margin-bottom: 4rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.index-header h1,
.view-header h1 {
  margin-bottom: 0;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.index-header p,
.view-header > p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.index-nav {
  display: flex;
  flex-direction: column;
}

.index-link {
  position: relative;
  display: flex;
  min-height: 3rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  color: var(--subtle);
  outline: none;
  transition: color 200ms ease;
}

.index-link::after {
  position: absolute;
  bottom: 0.5rem;
  left: 0;
  width: 0;
  height: 1px;
  background: color-mix(in srgb, var(--accent) 40%, transparent);
  content: "";
  transition: width 300ms ease-out;
}

.index-link .arrow {
  color: var(--muted);
  font-size: 0.875rem;
  opacity: 0;
  transform: translateX(-0.125rem);
  transition:
    opacity 200ms ease,
    transform 200ms ease;
}

.index-link:hover,
.index-link:focus-visible {
  color: var(--text);
}

.index-link:hover::after,
.index-link:focus-visible::after {
  width: 100%;
}

.index-link:hover .arrow,
.index-link:focus-visible .arrow {
  opacity: 1;
  transform: translateX(0.125rem);
}

.index-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--faint);
}

.index-footer a,
.back-link,
.text-link {
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  transition: color 200ms ease;
}

.index-footer a:hover,
.index-footer a:focus-visible,
.back-link:hover,
.back-link:focus-visible,
.text-link:hover,
.text-link:focus-visible {
  color: var(--text);
}

.detail-view {
  width: min(var(--measure), calc(100% - 3rem));
  margin: 0 auto;
  padding: 5rem 0 7rem;
}

.back-link {
  display: inline-flex;
  margin-bottom: 4rem;
}

.view-header {
  margin-bottom: 4rem;
}

.view-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.25rem;
}

.view-header .lede {
  max-width: 38rem;
  margin-top: 1.5rem;
  color: var(--subtle);
  font-size: 1rem;
}

.view-header .status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.view-header .status::before {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 1rem rgba(34, 211, 238, 0.35);
  content: "";
}

.title-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  transition:
    color 200ms ease,
    background 200ms ease,
    transform 200ms ease;
}

.title-action:hover,
.title-action:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  transform: translateY(-1px);
}

.content-section {
  padding: 2rem 0;
  border-top: 1px solid var(--faint);
}

.section-label {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.content-section h2,
.demo-copy h2 {
  margin-bottom: 1rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 400;
}

.content-section p,
.demo-copy p {
  margin-bottom: 1rem;
  color: var(--subtle);
}

.content-section p:last-child,
.demo-copy p:last-child {
  margin-bottom: 0;
}

.metric-list,
.bullet-list,
.stack-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.metric-list li,
.bullet-list li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1.25rem;
  padding: 0.75rem 0;
  color: var(--subtle);
  border-bottom: 1px solid var(--faint);
}

.metric-list li:last-child,
.bullet-list li:last-child {
  border-bottom: 0;
}

.metric-list span:first-child,
.bullet-list span:first-child {
  color: var(--muted);
  font-size: 0.875rem;
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.stack-list li {
  color: var(--muted);
  font-size: 0.875rem;
}

.stack-list li::before {
  margin-right: 0.5rem;
  color: var(--accent);
  content: "·";
}

.view-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--faint);
}

.text-link {
  position: relative;
}

.text-link.external::after {
  margin-left: 0.4rem;
  content: "↗";
}

.demo {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--faint);
}

.project-demos {
  margin-top: 1.5rem;
}

.project-demos .demo {
  padding: 0 0 3rem;
  border-top: 0;
}

.project-demos .demo + .demo {
  padding-top: 3rem;
  border-top: 1px solid var(--faint);
}

.project-demos .demo:last-child {
  padding-bottom: 0;
}

.demo-copy {
  margin-bottom: 1.5rem;
}

.demo-copy .section-label {
  margin-bottom: 0.75rem;
}

.demo video {
  display: block;
  width: 100%;
  max-height: 30rem;
  border: 1px solid var(--faint);
  border-radius: 0.25rem;
  background: #000;
  object-fit: contain;
}

.demo.phone video {
  width: min(22rem, 100%);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
}

.profile-grid .content-section {
  min-width: 0;
}

.not-found-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.not-found-stage {
  display: flex;
  min-height: 100vh;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.not-found-copy {
  text-align: center;
}

.not-found-copy h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(6rem, 18vw, 8rem);
  font-weight: 300;
  letter-spacing: -0.08em;
  line-height: 1;
}

.not-found-copy p {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
}

.not-found-copy > a {
  display: inline-block;
  margin-top: 2rem;
  color: var(--subtle);
  transition: color 200ms ease;
}

.not-found-copy > a:hover,
.not-found-copy > a:focus-visible,
.not-found-aside a:hover,
.not-found-aside a:focus-visible,
.not-found-footer a:hover,
.not-found-footer a:focus-visible {
  color: var(--text);
}

.not-found-aside {
  margin-bottom: 2rem;
  text-align: center;
}

.not-found-aside a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  transition: color 200ms ease;
}

.not-found-footer {
  margin-bottom: 2rem;
  padding: 2.5rem 1rem max(2.5rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--faint);
}

.not-found-footer nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
}

.not-found-footer a {
  transition: color 200ms ease;
}

.reveal {
  opacity: 0;
  animation: fade-in-up 600ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .index-view {
    align-items: flex-start;
    padding-top: max(6rem, 18vh);
  }

  .detail-view {
    width: min(100% - 2rem, var(--measure));
    padding-top: 2rem;
  }

  .back-link,
  .view-header {
    margin-bottom: 3rem;
  }

  .metric-list li,
  .bullet-list li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
