:root {
  color-scheme: dark;
  --ink: #f3f0e8;
  --muted: #a9aca8;
  --paper: #101215;
  --surface: #171a1e;
  --surface-raised: #1d2025;
  --line: #33373d;
  --lime: #b8e86f;
  --coral: #ff826c;
  --blue: #6bbfe5;
  --max-width: 1180px;
  --radius: 1.25rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(107, 191, 229, 0.08), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: calc(0.75rem + env(safe-area-inset-top, 0px));
  left: calc(0.75rem + env(safe-area-inset-left, 0px));
  z-index: 1000;
  max-width: calc(100vw - 1.5rem);
  padding: 0.65rem 1rem;
  border-radius: 0.35rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  opacity: 0;
  transform: translateY(calc(-100% - 4rem));
  white-space: nowrap;
}

.skip-link:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

main:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.site-header,
main,
footer {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  min-height: 5rem;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

nav a {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

nav a:hover {
  color: var(--ink);
}

.hero {
  display: grid;
  align-items: center;
  min-height: min(42rem, calc(88vh - 5rem));
  min-height: min(42rem, calc(88svh - 5rem));
  padding-block: clamp(3.25rem, 7vw, 5.5rem);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--lime);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  line-height: 1.04;
}

h1 {
  max-width: 14ch;
  margin-bottom: 1.5rem;
  font-size: clamp(3rem, 10.5vw, 7.3rem);
  letter-spacing: -0.065em;
}

h1 em,
h2 em {
  color: var(--coral);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.intro {
  max-width: 39rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--lime);
  border-radius: 999px;
  background: var(--lime);
  color: #10150b;
  font-size: 0.88rem;
  font-weight: 850;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover {
  background: transparent;
  color: var(--lime);
  transform: translateY(-2px);
}

.hero-object {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
}

.orbit {
  position: absolute;
  border: 0.0625em solid var(--line);
  border-radius: 50%;
}

.orbit-one {
  width: 90%;
  height: 90%;
}

.orbit-two {
  width: 64%;
  height: 64%;
  border-style: dashed;
}

.bobble {
  --body-x: 0px;
  --body-y: 0px;
  --body-rotation: 0deg;
  --head-x: 0px;
  --head-y: 0px;
  --head-rotation: 0deg;
  --spring-angle: 0deg;
  --spring-length: 3em;
  --base-y: 0px;
  --base-rotation: 0deg;
  --base-scale-x: 1;
  --base-scale-y: 1;
  --shadow-x: 0px;
  --shadow-y: 1.5em;
  --shadow-blur: 1.875em;
  position: relative;
  display: block;
  width: 8.5em;
  height: 15em;
  cursor: grab;
  filter: drop-shadow(var(--shadow-x) var(--shadow-y) var(--shadow-blur) rgba(0, 0, 0, 0.35));
  touch-action: none;
  transform: translate3d(var(--body-x), var(--body-y), 0)
    rotate(var(--body-rotation));
  transform-origin: 50% 85%;
  user-select: none;
  will-change: transform, filter;
}

.bobble.is-dragging {
  cursor: grabbing;
}

.bobble.is-loose {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  margin: 0;
}

.mascot-hint {
  position: absolute;
  z-index: 4;
  top: -1.25rem;
  left: calc(50% + 3em);
  max-width: 8rem;
  padding: 0.42rem 0.72rem;
  border: 1px solid rgba(243, 240, 232, 0.34);
  border-radius: 999px;
  background: rgba(29, 32, 37, 0.96);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.015em;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-10%, 0.25rem, 0) scale(0.94);
  transform-origin: 20% 100%;
  transition: opacity 180ms ease, transform 180ms ease;
  white-space: nowrap;
}

.mascot-hint::before,
.mascot-hint::after {
  position: absolute;
  border: 1px solid rgba(243, 240, 232, 0.34);
  border-radius: 50%;
  background: var(--surface-raised);
  content: "";
}

.mascot-hint::before {
  bottom: -0.5rem;
  left: 0.72rem;
  width: 0.42rem;
  height: 0.42rem;
}

.mascot-hint::after {
  bottom: -0.8rem;
  left: 0.42rem;
  width: 0.22rem;
  height: 0.22rem;
}

.bobble.is-hint-visible .mascot-hint {
  opacity: 1;
  transform: translate3d(-10%, 0, 0) scale(1);
}

.bobble-face {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 8.5em;
  height: 7.5em;
  border: 0.1875em solid var(--paper);
  border-radius: 48% 52% 46% 54%;
  background: var(--coral);
  pointer-events: auto;
  transform: translate3d(calc(-50% + var(--head-x)), var(--head-y), 0)
    rotate(calc(-4deg + var(--head-rotation)));
  transform-origin: 50% 100%;
  will-change: transform;
}

.bobble-face span {
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: var(--paper);
  transform: translate3d(var(--eye-x, 0px), var(--eye-y, 0px), 0);
  will-change: transform;
}

.bobble-spring {
  position: absolute;
  z-index: 1;
  top: calc(10.5em - var(--spring-length));
  left: calc(50% - 0.8em);
  width: 1.6em;
  height: var(--spring-length);
  background: repeating-linear-gradient(175deg, transparent 0 0.3125em, var(--lime) 0.375em 0.5625em);
  pointer-events: auto;
  transform: rotate(var(--spring-angle));
  transform-origin: 50% 100%;
  will-change: transform;
}

.bobble-base {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: 50%;
  display: grid;
  place-items: center;
  width: calc(8em / 1.7);
  height: calc(4.5em / 1.7);
  border-radius: 50% 50% 18% 18%;
  background: var(--blue);
  color: var(--paper);
  font-size: 1.7em;
  font-weight: 950;
  letter-spacing: -0.08em;
  pointer-events: auto;
  transform: translate3d(-50%, var(--base-y), 0)
    rotate(var(--base-rotation))
    scale(var(--base-scale-x), var(--base-scale-y));
  transform-origin: 50% 100%;
  will-change: transform;
}

.spark {
  position: absolute;
  color: var(--lime);
  font-size: 2em;
}

.spark-one {
  top: 15%;
  right: 12%;
}

.spark-two {
  bottom: 16%;
  left: 12%;
  color: var(--coral);
}

.projects {
  padding-block: clamp(5rem, 10vw, 9rem);
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 2.5rem;
}

.about h2 {
  margin-bottom: 0;
  font-size: clamp(2.3rem, 6vw, 4.75rem);
  letter-spacing: -0.055em;
}

.project-grid {
  display: grid;
  gap: 1rem;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 32rem;
  overflow: hidden;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.project-card::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
  content: "";
  pointer-events: none;
}

.project-card-featured {
  background: linear-gradient(145deg, rgba(184, 232, 111, 0.08), transparent 42%), var(--surface-raised);
}

.card-topline,
.card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.project-number {
  color: #929692;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
}

.status {
  padding: 0.28rem 0.65rem;
  border: 1px solid #454a51;
  border-radius: 999px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-live {
  border-color: rgba(184, 232, 111, 0.35);
  color: var(--lime);
}

.status-live span {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.25rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(184, 232, 111, 0.1);
}

.project-symbol {
  position: absolute;
  top: 4.5rem;
  right: -1rem;
  display: grid;
  width: 12rem;
  height: 12rem;
  opacity: 0.86;
  transform: rotate(7deg);
}

.compass {
  place-items: center;
  border: 1px solid rgba(184, 232, 111, 0.4);
  border-radius: 50%;
  background: radial-gradient(circle, var(--surface-raised) 0 24%, rgba(184, 232, 111, 0.1) 25% 26%, transparent 27%);
}

.compass::before,
.compass::after {
  position: absolute;
  background: rgba(184, 232, 111, 0.28);
  content: "";
}

.compass::before {
  width: 100%;
  height: 1px;
}

.compass::after {
  width: 1px;
  height: 100%;
}

.compass span {
  position: absolute;
  color: var(--lime);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
}

.compass span:nth-child(1) { top: 0.7rem; }
.compass span:nth-child(2) { right: 0.8rem; }
.compass span:nth-child(3) { bottom: 0.7rem; }
.compass span:nth-child(4) { left: 0.8rem; }
.compass strong { font-size: 2rem; }

.dice {
  grid-template-columns: repeat(3, 1fr);
  place-items: center;
  padding: 1.5rem;
  border: 1px solid rgba(107, 191, 229, 0.38);
  border-radius: 2.5rem;
  background: rgba(107, 191, 229, 0.06);
}

.dice span {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--blue);
}

.dice span:nth-child(1) { grid-area: 1 / 1; }
.dice span:nth-child(2) { grid-area: 1 / 3; }
.dice span:nth-child(3) { grid-area: 2 / 2; }
.dice span:nth-child(4) { grid-area: 3 / 1; }
.dice span:nth-child(5) { grid-area: 3 / 3; }

.card-copy {
  position: relative;
  z-index: 1;
  max-width: 30rem;
  margin-top: auto;
  padding-top: 13rem;
}

.project-type {
  margin-bottom: 0.55rem;
  color: var(--coral);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-card-soon .project-type {
  color: var(--blue);
}

.card-copy h3 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.045em;
}

.card-copy > p:last-child {
  color: var(--muted);
}

.card-link {
  position: relative;
  z-index: 1;
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
}

a.card-link:hover {
  color: var(--lime);
}

.card-link-muted {
  color: #929692;
}

.shelf-note {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px dashed #3d4248;
  border-radius: var(--radius);
  color: var(--muted);
}

.shelf-note span {
  color: var(--coral);
  font-size: 1.5rem;
}

.shelf-note p {
  margin: 0;
  font-size: 0.9rem;
}

.shelf-note strong {
  color: var(--ink);
}

.about {
  padding-block: clamp(5rem, 11vw, 10rem);
  border-top: 1px solid var(--line);
}

.about-grid {
  display: grid;
  gap: 2rem;
}

.about-grid > div {
  max-width: 36rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.note-signature {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 800;
}

.contact {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  border-top: 1px solid var(--line);
}

.contact h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.035em;
}

.contact p {
  max-width: 34rem;
  margin-bottom: 1rem;
  color: var(--muted);
}

.contact-email {
  display: inline-block;
  color: var(--lime);
  font-weight: 800;
  overflow-wrap: anywhere;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.3em;
  transition: color 160ms ease;
}

.contact-email:hover,
.contact-email:focus-visible {
  color: var(--ink);
}

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 7rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

footer p {
  margin: 0;
}

.footer-identity {
  max-width: 39rem;
}

@media (max-width: 47.999rem) {
  .hero-object {
    width: 21em;
    margin-block: 1.5rem 0.5rem;
    justify-self: center;
    font-size: 0.625rem;
  }

  .mascot-hint {
    top: -2.25rem;
    left: 50%;
    transform: translate3d(-50%, 0.2rem, 0) scale(0.94);
    transform-origin: 50% 100%;
  }

  .bobble.is-hint-visible .mascot-hint {
    transform: translate3d(-50%, 0, 0) scale(1);
  }

  .mascot-hint::before {
    left: calc(50% - 0.05rem);
  }

  .mascot-hint::after {
    left: calc(50% - 0.28rem);
  }
}

@media (min-width: 48rem) {
  .site-header,
  main,
  footer {
    width: min(calc(100% - 4rem), var(--max-width));
  }

  nav {
    gap: 2rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.6fr);
    gap: 2rem;
    min-height: min(43rem, calc(90vh - 5rem));
    min-height: min(43rem, calc(90svh - 5rem));
  }

  .hero-object {
    display: grid;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shelf-note {
    grid-column: 1 / -1;
  }

  .about-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
    align-items: start;
  }

  .footer-identity {
    text-align: right;
  }
}

@media (min-width: 70rem) {
  .project-card {
    min-height: 38rem;
  }

  .project-symbol {
    width: 15rem;
    height: 15rem;
  }

  .card-copy {
    padding-top: 16rem;
  }
}

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

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

  .mascot-hint,
  .bobble.is-hint-visible .mascot-hint {
    transform: translate3d(-10%, 0, 0) scale(1);
  }
}

@media (max-width: 47.999rem) and (prefers-reduced-motion: reduce) {
  .mascot-hint,
  .bobble.is-hint-visible .mascot-hint {
    transform: translate3d(-50%, 0, 0) scale(1);
  }
}
