@view-transition {
  navigation: auto;
}

:root {
  color-scheme: light dark;

  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", arial, sans-serif;
  --font-mono:
    ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", menlo, consolas, monospace;
  --bg: light-dark(oklch(96.5% 0.005 90deg), oklch(16% 0.008 85deg));
  --surface: light-dark(oklch(100% 0 0deg), oklch(20.5% 0.01 85deg));
  --surface-2: light-dark(oklch(94% 0.006 90deg), oklch(25% 0.012 85deg));
  --text: light-dark(oklch(24% 0.02 85deg), oklch(93% 0.008 85deg));
  --text-muted: light-dark(oklch(47% 0.02 85deg), oklch(68% 0.012 85deg));
  --border: light-dark(oklch(87% 0.008 90deg), oklch(29% 0.014 85deg));
  --accent: light-dark(oklch(52% 0.13 72deg), oklch(79% 0.13 76deg));
  --accent-ink: light-dark(oklch(99% 0.002 90deg), oklch(18% 0.02 76deg));
  --live: light-dark(oklch(50% 0.12 148deg), oklch(72% 0.14 148deg));
  --building: light-dark(oklch(55% 0.11 60deg), oklch(75% 0.12 60deg));
  --planned: light-dark(oklch(55% 0.01 85deg), oklch(62% 0.01 85deg));
  --sidebar-w: 15.5rem;
  --topbar-h: 3.5rem;
  --maxw: 72rem;
  --radius: 0.65rem;
  --shadow-drawer: 0 1.5rem 4rem light-dark(oklch(30% 0.02 85deg / 25%), oklch(5% 0.01 85deg / 60%));
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  scrollbar-color: var(--border) transparent;
  overflow-x: clip;
}

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

button {
  font: inherit;
  color: inherit;
}

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

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

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

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  height: 100dvh;
  padding: 1.5rem 1.25rem;
  border-right: 1px solid var(--border);
  background: var(--surface);
  overflow-y: auto;

  & .brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
  }

  & .brand__mark {
    width: 1.6rem;
    height: 1.6rem;
    color: var(--accent);
    transition: transform 300ms ease;
  }

  & .brand:hover .brand__mark {
    transform: rotate(-8deg) scale(1.05);
  }

  & .nav {
    display: grid;
    gap: 0.35rem;
  }

  & .nav__label {
    margin: 0 0 0.25rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  & .nav__list {
    display: grid;
    gap: 0.1rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  & .nav__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.55rem;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    transition:
      color 150ms ease,
      background-color 150ms ease;
  }

  & .nav__link:hover,
  & .nav__link:focus-visible {
    color: var(--text);
    background: var(--surface-2);
  }

  & .nav__link--muted {
    opacity: 0.6;
    cursor: default;
  }

  & .nav__link--muted:hover,
  & .nav__link--muted:focus-visible {
    color: var(--text-muted);
    background: transparent;
  }

  & .nav__favicon {
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 0.3rem;
    object-fit: cover;
  }

  & .sidebar__foot {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
  }

  & .status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
  }
}

.status__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--live);
  animation-name: pulse;
  animation-duration: 2.4s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--topbar-h);
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
}

.topbar__crumb,
.topbar__clock,
.status--topbar {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.topbar__crumb {
  display: flex;
  gap: 0.45rem;
  margin: 0;
}

.topbar__crumb .topbar__slash {
  color: var(--accent);
}

.status--topbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0 auto;
}

.status--topbar .status__dot {
  width: 0.42rem;
  height: 0.42rem;
}

.topbar__clock {
  font-variant-numeric: tabular-nums;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: var(--text);
  transition:
    transform 250ms ease,
    opacity 150ms ease;
}

.sidebar.open .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.sidebar.open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.sidebar.open .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    color 150ms ease,
    border-color 150ms ease;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.theme-toggle__icon {
  width: 1.1rem;
  height: 1.1rem;
}

:root[data-theme="dark"] .theme-toggle__icon--sun {
  display: none;
}

:root[data-theme="light"] .theme-toggle__icon--moon {
  display: none;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: none;
  background: light-dark(oklch(20% 0.01 85deg / 30%), oklch(5% 0.01 85deg / 55%));
  backdrop-filter: blur(2px);
  border: 0;
  cursor: pointer;
}

#content {
  width: min(100%, var(--maxw));
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  padding-block: 0 4rem;
}

.hero {
  padding-block: clamp(3.5rem, 9vw, 7rem) 3rem;
}

.hero__eyebrow {
  display: inline-flex;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.hero__eyebrow .prompt {
  color: var(--accent);
}

.hero__title {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero__title em {
  font-style: normal;
  color: var(--accent);
}

.hero__lede {
  margin: 1.5rem 0 2rem;
  max-width: 46ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    border-color 150ms ease,
    background-color 150ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 4px 18px color-mix(in oklab, var(--accent) 35%, transparent);
}

.btn--primary:hover {
  box-shadow: 0 8px 26px color-mix(in oklab, var(--accent) 45%, transparent);
}

.btn--ghost {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.marquee {
  overflow: clip;
  padding-block: 0.85rem;
  border-block: 1px solid var(--border);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation-name: marquee;
  animation-duration: 45s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.marquee__group {
  display: flex;
  padding-right: 2.5rem;
}

.marquee__group span {
  padding-right: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: var(--text-muted);
}

.marquee__group span::before {
  content: "●";
  margin-right: 0.5rem;
  color: var(--accent);
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.stats {
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-block: 3rem;
}

.stat {
  display: grid;
  gap: 0.35rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 11cqi, 3.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@container (width < 36rem) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.section-head {
  display: grid;
  gap: 0.35rem;
  margin-block: 4rem 1.75rem;
}

.section-head__title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.section-head__title::before {
  content: "#";
  margin-right: 0.5rem;
  color: var(--accent);
}

.section-head__sub {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
}

.group-head {
  margin: 2.5rem 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.group-head::before {
  content: "## ";
  color: var(--accent);
}

.group-head:first-of-type {
  margin-top: 0;
}

.grid:has(.card:hover) .card:not(:hover) {
  opacity: 0.55;
}

.card {
  container-type: inline-size;
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  gap: 0.6rem;
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition:
    transform 200ms ease,
    border-color 200ms ease,
    opacity 200ms ease,
    box-shadow 200ms ease;
  animation-name: rise;
  animation-timing-function: linear;
  animation-fill-mode: backwards;
  animation-timeline: view();
  animation-range: entry 0% entry 45%;
}

.card::before {
  content: "";
  width: 2.25rem;
  height: 3px;
  margin-bottom: 0.25rem;
  border-radius: 2px;
  background: hsl(var(--hue) 55% 50%);
}

.card:hover {
  transform: translateY(-4px);
  border-color: hsl(var(--hue) 55% 60%);
  box-shadow: 0 12px 32px color-mix(in oklab, hsl(var(--hue) 55% 50%) 18%, transparent);
}

.card--sauce {
  --hue: 40;
}

.card--imn {
  --hue: 210;
}

.card--handmade {
  --hue: 25;
}

.card--orda {
  --hue: 265;
}

.card--mile2 {
  --hue: 330;
}

.card--ogex {
  --hue: 185;
}

.card--myplace {
  --hue: 95;
}

.card--ppdeck {
  --hue: 130;
}

.card--agentex {
  --hue: 290;
}

.card__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card__favicon {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.4rem;
  object-fit: cover;
}

.card__site {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.card__site::after {
  content: "↗";
  font-size: 0.8em;
  color: var(--text-muted);
  transition: color 150ms ease;
}

.card__site:hover::after {
  color: var(--accent);
}

.card__desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.card__links a {
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition:
    color 150ms ease,
    border-color 150ms ease;
}

.card__links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  align-self: end;
}

.card__domain {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.badge {
  padding: 0.2rem 0.55rem;
  border: 1px solid color-mix(in oklab, currentcolor 40%, transparent);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: color-mix(in oklab, currentcolor 12%, transparent);
}

.badge--live {
  color: var(--live);
}

.badge--building {
  color: var(--building);
}

.badge--planned {
  color: var(--planned);
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 3rem;
  margin-top: 4rem;
  padding: 2.5rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  background: var(--surface);
}

.about__body p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.about__feats {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about__feats li {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--surface-2);
}

.about__feats li::before {
  content: "▹";
  margin-right: 0.5rem;
  color: var(--accent);
}

.about__feats a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 150ms ease;
}

.about__feats a:hover {
  color: var(--accent);
}

.feat__favicon {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0.3rem;
  object-fit: cover;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
  align-items: center;
  padding: 1.75rem clamp(1.25rem, 4vw, 2.5rem);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer p {
  margin: 0;
}

.footer__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 150ms ease;
}

.footer__link:hover {
  color: var(--accent);
}

.footer__link::before {
  content: "[";
  color: var(--border);
}

.footer__link::after {
  content: "]";
  color: var(--border);
}

.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 3px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    var(--accent),
    color-mix(in oklab, var(--accent) 40%, var(--bg))
  );
  transform-origin: 0 50%;
  animation-name: progress;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  animation-timeline: scroll(root);
}

::view-transition-old(root) {
  animation-name: fade-out;
  animation-duration: 150ms;
  animation-timing-function: ease-out;
}

::view-transition-new(root) {
  animation-name: fade-in;
  animation-duration: 300ms;
  animation-timing-function: ease-out;
}

@media (width < 48rem) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(85vw, var(--sidebar-w));
    transform: translateX(-100%);
    transition: transform 280ms ease;
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-drawer);
  }

  body:has(.sidebar.open) .scrim {
    display: block;
  }

  .nav-toggle {
    display: flex;
  }

  .status--topbar {
    display: none;
  }

  .about {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.75rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@keyframes pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }

  100% {
    opacity: 1;
  }
}

@keyframes marquee {
  to {
    translate: -50% 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes progress {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}
