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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: #b9b9b9 transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--canvas);
  background-image: radial-gradient(circle at 1px 1px, var(--canvas-dot) 1px, transparent 1.4px);
  background-size: var(--canvas-dot-gap) var(--canvas-dot-gap);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.5;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #111;
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-thumb {
  background: #c4c4c4;
  border: 3px solid var(--canvas);
  border-radius: 99px;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.05em;
  height: 1.05em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: #111;
  color: #fff;
  padding: 10px 16px;
  border-radius: 99px;
  transition: top var(--t-fast) var(--ease-out);
}
.skip-link:focus {
  top: 16px;
}

/* ============================================================
   Top bar
   ============================================================ */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding: 8px var(--gutter) 0;
  pointer-events: none;
}

.topbar-inner {
  pointer-events: auto;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 14px;
  border-radius: 18px;
  transition:
    background-color var(--t-med) var(--ease-out),
    box-shadow var(--t-med) var(--ease-out),
    backdrop-filter var(--t-med) var(--ease-out);
}

.topbar.is-scrolled .topbar-inner {
  background: rgba(150, 150, 150, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.35);
}

.wordmark {
  font-weight: 900;
  font-size: 1.95rem;
  letter-spacing: -0.035em;
  line-height: 1;
  color: #0c0c0c;
  font-variation-settings: "opsz" 32;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: var(--pill);
  border-radius: 999px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.9),
    0 6px 16px -10px rgba(0, 0, 0, 0.6);
}

.pill-btn {
  position: relative;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--pill-ink);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    color var(--t-fast) var(--ease-out),
    background-color var(--t-fast) var(--ease-out);
}
.pill-btn:hover {
  color: #fff;
}
.pill-btn[aria-checked="true"],
.pill-btn[aria-current="page"],
.pill-btn[aria-pressed="true"] {
  background: var(--pill-active);
  color: var(--pill-active-ink);
}

.tabs {
  justify-self: center;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.speed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  min-width: 110px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--pill);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.round-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pill);
  color: #e6e6e6;
  transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast);
}
.round-btn:hover {
  background: #2b2b2b;
}
.round-btn:active {
  transform: scale(0.94);
}
.round-btn[aria-pressed="true"] {
  background: #fff;
  color: #111;
  box-shadow: 0 0 0 1px #111;
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: #111;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px #111;
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1);
}

.menu-btn {
  display: none;
}

.sheet {
  pointer-events: auto;
  max-width: 1440px;
  margin: 8px auto 0;
  padding: 20px;
  border-radius: 20px;
  background: var(--card);
  color: var(--on-card);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.5);
}
.sheet-nav {
  display: grid;
  gap: 2px;
}
.sheet-nav a {
  padding: 12px 4px;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--hairline);
}
.sheet-nav a[aria-current="page"] {
  color: #fff;
}
.sheet-nav a:not([aria-current="page"]) {
  color: var(--on-card-mute);
}
.sheet-label {
  margin: 20px 0 10px;
  color: var(--on-card-mute);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lens-sheet {
  box-shadow: 0 0 0 1px var(--hairline);
}

/* ============================================================
   Views
   ============================================================ */
main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 108px var(--gutter) 24px;
}

.view[hidden] {
  display: none;
}

.view.is-entering .view-title,
.view.is-entering .view-sub,
.view.is-entering .filters {
  animation: view-in 560ms var(--ease-out) both;
}
.bento > .card,
.case-grid > .case,
.chapters > .chapter {
  animation: card-in 900ms var(--ease-out) both;
  animation-delay: calc(var(--n, 0) * 100ms);
}
@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.985);
  }
}
@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(6px);
  }
}

/* ============================================================
   Dashboard bento
   ============================================================ */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}

.card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border-radius: var(--r-card);
  border: 1px solid var(--card-line);
  background-color: var(--card);
  background-image: radial-gradient(circle at 1px 1px, var(--card-dot) 1px, transparent 1.4px);
  background-size: 22px 22px;
  color: var(--on-card);
  transition:
    opacity var(--t-med) var(--ease-out),
    filter var(--t-med) var(--ease-out),
    transform var(--t-med) var(--ease-out);
}

.card-intro {
  grid-column: span 3;
  height: 460px;
}
.card-time {
  grid-column: span 3;
  height: 460px;
}
.card-matrix {
  grid-column: span 6;
  height: 460px;
}
.card-city,
.card-recent,
.card-globe {
  grid-column: span 4;
  height: 510px;
}

.card-label {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 24px 24px 0;
  color: var(--on-card-soft);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.card-label .icon {
  width: 17px;
  height: 17px;
  color: var(--on-card-mute);
}
.card-label-quiet {
  padding: 32px 32px 0;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.arrow-mini {
  color: var(--on-card-mute);
  font-weight: 400;
}

/* ---------- Intro card ---------- */
.card-intro {
  background: #0d0d0d;
}
.intro-art,
.intro-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.intro-photo {
  object-fit: cover;
  object-position: center top;
  filter: grayscale(1) contrast(1.2) brightness(0.85);
}
.card-intro::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.35) 22%, transparent 36%, transparent 50%, rgba(0, 0, 0, 0.88) 92%);
  pointer-events: none;
}
.intro-name {
  position: absolute;
  z-index: 2;
  top: 24px;
  left: 24px;
  right: 24px;
  display: grid;
  line-height: 1.2;
}
.intro-lead {
  color: var(--on-card-soft);
  font-size: 1.375rem;
  font-weight: 300;
}
.intro-name strong {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.intro-name {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}
.intro-statement {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: 24px;
  bottom: 24px;
  margin: 0;
  max-width: 30ch;
  color: #f2f2f2;
  font-size: 1.1875rem;
  font-weight: 400;
  line-height: 1.38;
  letter-spacing: -0.012em;
  text-wrap: pretty;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
}
.intro-statement.is-swapping {
  opacity: 0;
  transform: translateY(6px);
}

/* ---------- Time card ---------- */
.time-readout {
  position: absolute;
  top: 31%;
  left: 0;
  right: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}
.time-number {
  font-size: var(--fs-number);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.time-caption {
  color: var(--on-card-soft);
  font-size: 0.75rem;
  max-width: 24ch;
}
.gauge {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -2px;
}
.gauge-svg {
  width: 100%;
  overflow: visible;
}
.gauge-arc-seg {
  fill: none;
  stroke-width: 15;
}
.gauge-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 1;
}
.gauge-knob {
  fill: #0b0b0b;
  stroke: #0b0b0b;
  stroke-width: 2;
  transition: r var(--t-fast) var(--ease-out);
}
.gauge.is-dragging .gauge-knob {
  r: 10;
}
.gauge-hit {
  position: absolute;
  inset: 0 0 20px;
  cursor: grab;
  touch-action: none;
  border-radius: 140px 140px 0 0;
}
.gauge.is-dragging .gauge-hit {
  cursor: grabbing;
}
.gauge-ends {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--on-card-soft);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}
.gauge-ends b {
  color: #fff;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 4px;
  vertical-align: -2px;
}

/* ---------- Matrix card ---------- */
.matrix {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 22px 24px 0;
}
.matrix-head {
  display: flex;
  justify-content: space-between;
  margin: 0 0 12px;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.matrix-tools .matrix-head {
  justify-content: flex-end;
}
.matrix-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 210px));
  grid-auto-flow: column;
  grid-template-rows: repeat(8, auto);
  column-gap: 32px;
  row-gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.matrix-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  color: var(--on-card-soft);
  font-size: 0.8125rem;
  line-height: 1.35;
  animation: row-in 420ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 28ms);
}
.matrix-list li {
  cursor: default;
  transition: color 300ms ease;
}
.matrix-list li:hover {
  color: #fff;
}
.matrix-list li:hover .badge {
  background: #fff;
  color: #111;
}
.badge {
  transition: background-color 300ms ease, color 300ms ease;
}
.matrix-list li span:first-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.badge {
  flex: none;
  min-width: 26px;
  padding: 1px 6px;
  border-radius: 99px;
  background: #2c2c2c;
  color: #bdbdbd;
  font-size: 0.625rem;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.tool-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: right;
  color: var(--on-card-soft);
  font-size: 0.8125rem;
  line-height: 1.35;
}
.tool-list li {
  animation: row-in 420ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 28ms + 120ms);
}
@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.garden {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  width: calc(100% - 48px);
  height: 170px;
  overflow: visible;
}
.key {
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: 50% 80%;
  opacity: 0;
  transform: translateY(18px) scale(0.6);
}
.garden.is-in .key {
  animation: key-in 800ms var(--ease-back) both;
  animation-delay: calc(500ms + var(--i) * 60ms);
}
@keyframes key-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.6);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.key-shadow {
  fill: rgba(0, 0, 0, 0.45);
}
.key-top {
  transition: transform 260ms var(--ease-back);
}
.key text {
  fill: rgba(0, 0, 0, 0.72);
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: -0.01em;
  pointer-events: none;
}
.key.is-struck .key-top {
  transform: translateY(5px);
  transition-duration: 70ms;
  transition-timing-function: ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .key:hover .key-top {
    filter: brightness(1.08);
  }
}

/* ---------- City card ---------- */
.city {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.city-copy {
  position: absolute;
  z-index: 2;
  top: 104px;
  left: 24px;
  right: 24px;
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}
.city-line {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.underline-link {
  font-size: 0.9375rem;
  font-weight: 500;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size var(--t-med) var(--ease-out);
}
.underline-link:hover {
  background-size: 0% 1px;
  background-position: 100% 100%;
}

/* ---------- Fanned project cards (dashboard + projects view) ---------- */
.card-recent .fan {
  position: absolute;
  left: 50%;
  top: 52%;
  width: min(300px, 78%);
  transform: translate(-50%, -50%);
}
.fan {
  display: block;
}
.fan-stack {
  position: relative;
  display: block;
  height: 136px;
}
.fan-back,
.fan-front {
  position: absolute;
  bottom: -14px;
  width: 46%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: #fff;
  object-fit: cover;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.5);
  transition: transform 700ms var(--ease-out);
}
.fan-left {
  left: 13%;
  transform: rotate(-7deg);
}
.fan-right {
  right: 13%;
  transform: rotate(7deg);
}
.fan-front {
  left: 27%;
  width: 46%;
  padding: 6px 6px 0;
  overflow: hidden;
  z-index: 1;
  aspect-ratio: auto;
  height: 124px;
  bottom: -2px;
}
.fan-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  border-radius: 7px 7px 0 0;
  transition: opacity 300ms var(--ease-out);
}
.fan-body {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 4px;
  padding: 18px 18px 22px;
  border-radius: 0 0 16px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), #fff 40%);
  color: #111;
  backdrop-filter: blur(6px);
}
.card-recent .fan-body {
  border-radius: 16px;
  margin-top: -6px;
  box-shadow: 0 -18px 30px -8px rgba(255, 255, 255, 0.7);
}
.fan-body strong {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.fan-body > span {
  color: var(--ink-soft);
  font-size: 0.8125rem;
}
.fan:hover .fan-left,
.case:hover .fan-left {
  transform: rotate(-13deg) translate(-10px, -8px);
}
.fan:hover .fan-right,
.case:hover .fan-right {
  transform: rotate(13deg) translate(10px, -8px);
}
.fan:hover .fan-front,
.case:hover .fan-front {
  transform: translateY(-10px);
}

.recent-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.recent-dots button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}
.recent-dots button::before {
  content: "";
  width: 20px;
  height: 6px;
  border-radius: 99px;
  background: #555;
  transform: scaleX(0.3);
  transition: transform var(--t-med) var(--ease-out), background-color var(--t-fast);
}
.recent-dots button[aria-selected="true"]::before {
  transform: none;
  background: #fff;
}

/* ---------- Globe card ---------- */
.globe-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 24px;
}
.globe-head .card-label {
  padding-top: 0;
}
.globe-head {
  padding-top: 24px;
}
.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid #3a3a3a;
  background: #101010;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
.ghost-btn:hover {
  background: #fff;
  color: #111;
  border-color: #fff;
}
.globe {
  position: absolute;
  inset: 70px 0 0;
  width: 100%;
  height: calc(100% - 70px);
  cursor: grab;
  touch-action: pan-y;
}
.globe:active {
  cursor: grabbing;
}
.globe-tip {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 74px;
  margin: 0;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 14px) scale(0.95);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.globe-tip.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.globe-note {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: 96px;
  bottom: 22px;
  margin: 0;
  color: var(--on-card-soft);
  font-size: 0.8125rem;
  line-height: 1.45;
  pointer-events: none;
}

/* ---------- Contact form (inside the globe card) ---------- */
.ghost-btn {
  cursor: pointer;
}
.contact-panel {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow-y: auto;
  padding: 22px 24px 24px;
  background-color: var(--card);
  background-image: radial-gradient(circle at 1px 1px, var(--card-dot) 1px, transparent 1.4px);
  background-size: 22px 22px;
  opacity: 0;
  transform: translateY(10px);
  filter: blur(4px);
  transition:
    opacity 220ms var(--ease-out),
    transform 220ms var(--ease-out),
    filter 220ms var(--ease-out);
}
.contact-panel.is-open {
  opacity: 1;
  transform: none;
  filter: none;
}
.contact-form {
  display: grid;
  gap: 12px;
}
.contact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.contact-head h3,
.contact-done h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.contact-close {
  width: 34px;
  height: 34px;
  background: #262626;
}
.field {
  display: grid;
  gap: 6px;
}
.field label {
  color: var(--on-card-soft);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.field input,
.field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #333;
  border-radius: 12px;
  background: #101010;
  color: #fff;
  font: inherit;
  font-size: 0.9375rem;
  caret-color: #7aa2ff;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.field textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.45;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #8a8a8a;
}
.field input:hover,
.field textarea:hover {
  border-color: #4a4a4a;
}
.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: #7aa2ff;
  background: #0c0c0c;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.28);
}
.field [aria-invalid="true"] {
  border-color: #ff7b7b;
}
.field-error {
  min-height: 0;
  margin: 0;
  color: #ff9d9d;
  font-size: 0.75rem;
}
.field-error:empty {
  display: none;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.turnstile:empty {
  display: none;
}
.contact-foot {
  display: flex;
  flex-wrap: wrap-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}
.form-status {
  flex: 1 1 180px;
  margin: 0;
  color: var(--on-card-soft);
  font-size: 0.8125rem;
  line-height: 1.4;
}
.form-status.is-error {
  color: #ff9d9d;
}
.send-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 11px 18px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 0.875rem;
  font-weight: 600;
  transition: transform 140ms var(--ease-out), opacity 160ms ease;
}
.send-btn:active {
  transform: scale(0.97);
}
.send-btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}
@media (hover: hover) and (pointer: fine) {
  .send-btn .icon {
    transition: transform 200ms var(--ease-out);
  }
  .send-btn:not([disabled]):hover .icon {
    transform: translateX(3px);
  }
}
.contact-done {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 12px;
  min-height: 100%;
  outline: none;
}
.contact-done[hidden] {
  display: none;
}
.contact-done p {
  max-width: 34ch;
  margin: 0 0 8px;
  color: var(--on-card-soft);
}
.done-mark {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: #7aa2ff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.done-mark path {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: draw-check 520ms 120ms var(--ease-out) forwards;
}
@keyframes draw-check {
  to {
    stroke-dashoffset: 0;
  }
}

/* ============================================================
   Light views: Projects + Journey
   ============================================================ */
.view-title {
  margin: 28px 0 12px;
  text-align: center;
  font-size: var(--fs-view);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.view-sub {
  max-width: 46ch;
  margin: 0 auto 56px;
  text-align: center;
  color: var(--ink-soft);
  text-wrap: balance;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 14px;
}
.case {
  display: block;
  padding-top: 26px;
  border-radius: var(--r-sheet);
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(180deg, #ececec, #f6f6f6) border-box;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 18px 40px -28px rgba(0, 0, 0, 0.25);
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.case:hover {
  transform: translateY(-4px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 28px 50px -28px rgba(0, 0, 0, 0.35);
}
.case .fan-stack {
  height: 170px;
  margin: 0 18px;
}
.case .fan-back {
  border: 1px solid #eee;
}
.case .fan-front {
  height: 160px;
  border: 1px solid #eee;
  border-bottom: 0;
}
.case .fan-body {
  padding: 22px 22px 24px;
  box-shadow: 0 -24px 30px -4px #fff;
  border-radius: 0 0 var(--r-sheet) var(--r-sheet);
}
.case .fan-body em {
  margin-top: 8px;
  color: var(--ink-soft);
  font-style: normal;
  font-size: 0.875rem;
  line-height: 1.5;
}
.case-tags {
  margin-top: 6px;
  color: var(--ink-mute) !important;
  font-size: 0.75rem !important;
}

/* Journey */
.pill-light {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 56px;
  overflow-x: auto;
  background: #fff;
  box-shadow:
    0 0 0 1px #e6e6e6,
    0 4px 14px -8px rgba(0, 0, 0, 0.2);
}
.pill-light .pill-btn {
  color: #555;
  font-size: 0.8125rem;
  padding: 7px 14px;
}
.pill-light .pill-btn:hover {
  color: #111;
}
.pill-light .pill-btn[aria-pressed="true"] {
  background: #111;
  color: #fff;
}

.chapters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 1376px;
  margin: 0 auto;
}
.chapter {
  padding: 16px 16px 26px;
  border-radius: var(--r-sheet);
  border: 1px solid var(--sheet-line);
  background: var(--sheet);
  box-shadow: 0 18px 40px -32px rgba(0, 0, 0, 0.3);
}
.chapter[hidden] {
  display: none;
}
.chapter-art {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 240px;
  margin-bottom: 22px;
  padding: 24px;
  border-radius: 14px;
  background-color: var(--card);
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.08) 1px, transparent 1.4px);
  background-size: 18px 18px;
  color: #fff;
  overflow: hidden;
}
.chapter-year {
  font-size: clamp(3.5rem, 2.5rem + 3vw, 5.5rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.chapter-art::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 50%;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
}
.chapter-art::after {
  content: "";
  position: absolute;
  left: 24px;
  top: calc(50% - 1px);
  width: calc((100% - 48px) * var(--p, 0));
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, hsl(0 95% 58%), hsl(60 95% 58%), hsl(120 95% 50%), hsl(190 95% 58%), hsl(250 95% 66%), hsl(300 95% 60%)) 0 0 / calc(100% / var(--p, 1)) 100%;
  transform: translateY(-1px);
}
.chapter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chapter-chips i {
  padding: 5px 11px;
  border-radius: 99px;
  background: #2a2a2a;
  color: #dcdcdc;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 500;
}
.chapter h2 {
  margin: 0 8px 8px;
  font-size: 1.3125rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.chapter p {
  margin: 0 8px 10px;
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 0.875rem;
}
.chapter-quote {
  display: grid;
  place-items: center;
  padding: 48px;
  background: #111;
  border-color: #111;
  color: #fff;
}
.chapter-quote blockquote {
  margin: 0;
}
.chapter-quote p {
  margin: 0 0 16px;
  max-width: 24ch;
  color: #fff;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.journey-sub {
  margin-bottom: 28px;
}
.chapter-quote {
  place-items: center start;
  align-content: center;
  gap: 32px;
  padding: 48px clamp(28px, 6vw, 72px);
}
.epilogue-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 0.875rem;
  font-weight: 600;
  transition: transform 160ms var(--ease-out);
}
.epilogue-link:active {
  transform: scale(0.97);
}
@media (hover: hover) and (pointer: fine) {
  .epilogue-link .icon {
    transition: transform 200ms var(--ease-out);
  }
  .epilogue-link:hover .icon {
    transform: translateX(3px);
  }
}
.chapter-quote cite {
  display: block;
  line-height: 1.6;
  color: #aaa;
  font-style: normal;
  font-size: 0.8125rem;
}

/* ============================================================
   Footer + to-top
   ============================================================ */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px calc(var(--gutter) + 8px) 28px;
  color: var(--ink-mute);
  font-size: 0.8125rem;
}

.to-top {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15) inset,
    0 14px 30px -12px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  pointer-events: none;
  transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}
.to-top .icon {
  width: 22px;
  height: 22px;
}
.to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
@media (hover: hover) and (pointer: fine) {
  .to-top.is-visible:hover {
    transform: scale(1.08);
  }
}
.to-top.is-visible:active {
  transform: scale(0.95);
  transition-duration: 100ms;
}

.trail {
  position: fixed;
  inset: 0;
  z-index: 45;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1180px) {
  .topbar-inner {
    grid-template-columns: auto 1fr auto;
  }
  .lens:not(.lens-sheet) {
    display: none;
  }
  .card-intro,
  .card-time {
    grid-column: span 6;
  }
  .card-matrix {
    grid-column: span 12;
  }
  .card-city,
  .card-recent {
    grid-column: span 6;
  }
  .card-globe {
    grid-column: span 12;
  }
  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .tabs,
  .speed,
  [data-sound] {
    display: none;
  }
  .topbar-inner {
    grid-template-columns: 1fr auto;
    padding: 16px 12px;
  }
  .menu-btn {
    display: grid;
  }
}

@media (max-width: 720px) {
  main {
    padding-top: 92px;
  }
  .wordmark {
    font-size: 1.6rem;
  }
  .card-intro,
  .card-time,
  .card-matrix,
  .card-city,
  .card-recent,
  .card-globe {
    grid-column: span 12;
  }
  .card-intro {
    height: 400px;
  }
  .intro-statement {
    font-size: 1.0625rem;
  }
  .card-time {
    height: 290px;
  }
  .time-readout {
    top: 64px;
  }
  .card-matrix {
    height: auto;
    padding-bottom: 170px;
  }
  .matrix {
    grid-template-columns: 1fr;
  }
  .matrix-list {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    grid-template-rows: none;
  }
  .matrix-tools .matrix-head {
    justify-content: flex-start;
  }
  .tool-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    text-align: left;
    column-gap: 24px;
  }
  .card-city {
    height: 440px;
  }
  .card-recent {
    height: 420px;
  }
  .card-globe {
    height: 470px;
  }
  .globe-head {
    flex-direction: column;
    align-items: stretch;
    padding: 24px 24px 0;
  }
  .globe-head .card-label {
    padding: 0;
  }
  .ghost-btn {
    justify-content: center;
  }
  .globe {
    inset: 110px 0 0;
    height: calc(100% - 110px);
  }
  .case-grid,
  .chapters {
    grid-template-columns: 1fr;
    padding: 0;
  }
  .chapter-art {
    min-height: 200px;
  }
  .view-sub {
    margin-bottom: 36px;
  }
  .to-top {
    right: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
  }
  .footer {
    flex-direction: column;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .key,
  .garden.is-in .key {
    opacity: 1;
    transform: none;
    animation: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
