:root {
  color-scheme: dark;
  --ink: #fffaf2;
  --muted: rgba(255, 250, 242, 0.72);
  --quiet: rgba(255, 250, 242, 0.12);
  --line: rgba(255, 250, 242, 0.2);
  --black: #09070f;
  --pink: #ff2ea6;
  --cyan: #19e6ff;
  --lime: #c7ff2e;
  --yellow: #ffe45e;
  --orange: #ff7a30;
  --violet: #8a5cff;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 46, 166, 0.35), transparent 26%),
    radial-gradient(circle at 82% 12%, rgba(25, 230, 255, 0.28), transparent 24%),
    radial-gradient(circle at 72% 78%, rgba(199, 255, 46, 0.22), transparent 28%),
    linear-gradient(140deg, #09070f 0%, #151020 48%, #060b12 100%);
}

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

.liquid-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.liquid-stage::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, transparent 0%, rgba(9, 7, 15, 0.2) 62%, rgba(9, 7, 15, 0.82) 100%);
  background-size: 72px 72px, 72px 72px, auto;
  mix-blend-mode: screen;
}

#liquidCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.liquid-stage:active {
  cursor: grabbing;
}

.site-header,
.hero,
.section,
.site-footer {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  pointer-events: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  gap: 24px;
}

.brand,
.nav,
.hero-actions,
.hero-meta,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 820;
  pointer-events: auto;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  background: conic-gradient(from 160deg, var(--pink), var(--yellow), var(--lime), var(--cyan), var(--violet), var(--pink));
  color: #07070c;
  font-weight: 900;
}

.nav {
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 8, 14, 0.38);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.nav a {
  min-width: 94px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.12);
}

.hero {
  display: grid;
  min-height: calc(100vh - 82px);
  padding: 9vh 0 72px;
  align-items: end;
}

.projects-page .hero {
  min-height: auto;
}

.projects-hero {
  padding: 96px 0 56px;
}

.hero-copy {
  max-width: 850px;
  pointer-events: auto;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--lime);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

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

h1 {
  max-width: 940px;
  margin-bottom: 24px;
  font-size: clamp(50px, 10vw, 132px);
  line-height: 0.94;
  font-weight: 920;
  text-shadow: 0 5px 28px rgba(9, 7, 15, 0.55);
  text-wrap: balance;
}

.lead {
  max-width: 670px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.55;
  text-shadow: 0 3px 18px rgba(9, 7, 15, 0.68);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  font-weight: 820;
  backdrop-filter: blur(16px);
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(110deg, var(--pink), var(--orange), var(--yellow));
  color: #120a10;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.1);
}

.hero-meta {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 74px;
  pointer-events: auto;
}

.hero-meta span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 7, 12, 0.32);
  color: var(--muted);
  font-size: 13px;
  backdrop-filter: blur(14px);
}

.section {
  padding: 76px 0;
  border-top: 1px solid var(--line);
}

.studio {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 46px;
}

.studio > *,
.section-heading,
.card,
.sequencer-panel,
.site-footer > * {
  pointer-events: auto;
}

.studio p,
.card p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.sequencer {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 42px;
  align-items: start;
}

.sequencer-panel {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.045));
  backdrop-filter: blur(22px);
}

.prompt-field {
  display: grid;
  gap: 10px;
  font-weight: 850;
}

.prompt-field textarea {
  width: 100%;
  min-height: 128px;
  resize: vertical;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  outline: none;
  background: rgba(5, 6, 12, 0.48);
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
}

.prompt-field textarea:focus {
  border-color: rgba(25, 230, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(25, 230, 255, 0.12);
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preset-row button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.preset-row button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.sequencer-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

#programOutput {
  color: var(--muted);
  font-weight: 760;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 30px;
}

.split-heading {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.05;
  text-wrap: balance;
}

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

.card {
  min-height: 250px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.045));
  backdrop-filter: blur(20px);
}

.project-card {
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.project-card:hover {
  border-color: rgba(199, 255, 46, 0.72);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.07));
  transform: translateY(-3px);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.project-meta small {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.card span {
  display: inline-block;
  margin-bottom: 62px;
  color: var(--cyan);
  font-weight: 900;
}

h3 {
  margin-bottom: 12px;
  font-size: 24px;
}

.site-footer {
  justify-content: space-between;
  gap: 18px;
  padding: 34px 0 44px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer a {
  color: var(--ink);
  font-weight: 800;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 0;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .nav a {
    min-width: 0;
    flex: 1;
    padding-inline: 8px;
  }

  .hero {
    min-height: calc(100vh - 118px);
    padding-top: 44px;
  }

  h1 {
    font-size: clamp(46px, 15vw, 78px);
  }

  .lead {
    font-size: 19px;
  }

  .studio,
  .sequencer,
  .grid {
    grid-template-columns: 1fr;
  }

  .split-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .card {
    min-height: 210px;
  }
}

@media (max-width: 520px) {
  .site-header,
  .hero,
  .section,
  .site-footer {
    width: min(100% - 28px, 1160px);
  }

  .button {
    width: 100%;
  }

  .hero-meta {
    margin-top: 52px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
