:root {
  color-scheme: dark;
  --bg: #080808;
  --surface: #101010;
  --card: #141414;
  --card-hover: #191919;
  --text: #f4f4f4;
  --text-2: #a1a1a1;
  --text-3: #6f6f6f;
  --border: #242424;
  --soft-border: #1a1a1a;
  --inverse: #f4f4f4;
  --inverse-text: #080808;
  --signal: #ffffff;
  --soft-signal: #dcdcdc;
  --container: 1248px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.018), transparent 680px),
    var(--bg);
  font-family: "Geist", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "liga" 1;
  text-rendering: geometricPrecision;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  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: 72px 72px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,0.78) 38%, transparent 100%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.45;
  background: radial-gradient(circle at 74% 10%, rgba(255,255,255,0.08), transparent 22rem);
}

::selection {
  color: var(--inverse-text);
  background: var(--inverse);
}

.container {
  width: min(var(--container), calc(100% - 96px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--soft-border);
  background: rgba(8, 8, 8, 0.84);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.mark {
  display: grid;
  grid-template-columns: repeat(2, 4px);
  grid-auto-rows: 4px;
  gap: 5px 8px;
}

.mark span,
.mini-rail i,
.card-dots i,
.corner-dots i,
.timeline-dot::before,
.dot-column span {
  display: block;
  border-radius: 999px;
  background: var(--text);
}

.mark span:nth-child(2n + 1) { opacity: 0.96; }
.mark span:nth-child(2n) { opacity: 0.46; }
.mark span:nth-child(6) { opacity: 0.14; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a,
.footer-links a {
  color: var(--text-2);
  font-size: 13px;
  text-decoration: none;
  transition: color 160ms var(--ease);
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--text);
}

.nav-links a:focus-visible,
.footer-links a:focus-visible,
.brand:focus-visible,
.button:focus-visible,
.nav-cta:focus-visible,
.log-row:focus-visible,
.newsletter-card button:focus-visible {
  color: var(--text);
  outline: 1px solid var(--text);
  outline-offset: 4px;
}

.nav-cta,
.button,
.newsletter-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease);
}

.nav-cta,
.button-primary,
.newsletter-card button {
  color: var(--inverse-text);
  background: var(--inverse);
  border: 1px solid var(--inverse);
  padding: 10px 16px;
}

.button-secondary {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  padding: 12px 18px;
}

.nav-cta:hover,
.button-primary:hover,
.newsletter-card button:hover {
  background: var(--signal);
  transform: translateY(-1px);
}

.button-secondary:hover {
  border-color: #3a3a3a;
  transform: translateY(-1px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr);
  gap: clamp(48px, 7vw, 96px);
  align-items: center;
  min-height: 760px;
  padding: 96px 0 120px;
}

.section-label {
  margin: 0;
  color: var(--text-3);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 920px;
  margin-bottom: 24px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(5.4rem, 8vw, 7.75rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.065em;
}

.subheadline {
  margin-bottom: 22px;
  color: var(--text);
  font-size: clamp(2.3rem, 4.1vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-body,
.section-intro p,
.sticky-copy p,
.newsletter-card p,
.about > div > p {
  color: var(--text-2);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.55;
}

.hero-body {
  max-width: 660px;
  margin-bottom: 34px;
}

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

.loading-sculpture {
  position: relative;
  min-height: 540px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    rgba(255,255,255,0.018);
  background-size: 64px 64px;
  overflow: hidden;
}

.loading-sculpture::before,
.newsletter-card::before {
  position: absolute;
  inset: 18px;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(255,255,255,0.055);
  border-radius: 20px;
}

.sculpture-grid {
  position: absolute;
  top: 54px;
  left: 50%;
  display: flex;
  gap: 92px;
  transform: translateX(-50%);
}

.dot-column {
  display: grid;
  gap: 18px;
}

.dot-column span {
  width: 8px;
  height: 8px;
  opacity: 0.18;
  animation: dotLoad 2.8s var(--ease) infinite;
}

.dot-column.delay span { animation-delay: 0.18s; }
.dot-column span:nth-child(1) { animation-delay: 0.9s; }
.dot-column span:nth-child(2) { animation-delay: 0.8s; }
.dot-column span:nth-child(3) { animation-delay: 0.7s; }
.dot-column span:nth-child(4) { animation-delay: 0.6s; }
.dot-column span:nth-child(5) { animation-delay: 0.5s; }
.dot-column span:nth-child(6) { animation-delay: 0.4s; }
.dot-column span:nth-child(7) { animation-delay: 0.3s; }
.dot-column span:nth-child(8) { animation-delay: 0.2s; }
.dot-column span:nth-child(9) { animation-delay: 0.1s; }
.dot-column span:nth-child(10) { animation-delay: 0s; }
.dot-column span:nth-child(3),
.dot-column.delay span:nth-child(8) { opacity: 0.04; }

.status-panel {
  position: absolute;
  right: 28px;
  bottom: 28px;
  left: 28px;
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid var(--soft-border);
  border-radius: 18px;
  background: rgba(8,8,8,0.72);
  backdrop-filter: blur(18px);
}

.status-panel div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--soft-border);
}

.status-panel div:last-child { border-bottom: 0; }
.status-panel dt,
.status-panel dd,
.card-topline,
.project-card small,
.log-row time,
.log-row small,
.timeline small,
.footer small {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-panel dt { color: var(--text-3); }
.status-panel dd { margin: 0; color: var(--text); }

.section {
  padding: clamp(88px, 12vw, 168px) 0;
  border-top: 1px solid var(--soft-border);
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 48px;
}

.section-intro.narrow {
  display: block;
  max-width: 780px;
}

.section-intro h2,
.sticky-copy h2,
.newsletter-card h2,
.about h2 {
  margin-bottom: 18px;
  font-size: clamp(2.8rem, 5vw, 4.4rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.label-with-rail {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mini-rail {
  display: inline-grid;
  gap: 5px;
}

.mini-rail i {
  width: 3px;
  height: 3px;
  opacity: 0.42;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(260px, auto);
  gap: 14px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  transition: transform 220ms var(--ease), border-color 220ms var(--ease), background 220ms var(--ease);
}

.project-card:hover {
  background: var(--card-hover);
  border-color: #3a3a3a;
  transform: translateY(-2px);
}

.project-card:hover .card-dots i { animation: pulseOnce 520ms var(--ease); }

.featured-card {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 534px;
  justify-content: flex-end;
}

.card-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-3);
  margin-bottom: auto;
}

.project-card h3 {
  margin: 56px 0 12px;
  font-size: clamp(1.5rem, 2.3vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.featured-card h3 { font-size: clamp(2.2rem, 4vw, 4.2rem); }
.project-card p { color: var(--text-2); line-height: 1.55; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 24px;
}

.tags span {
  color: var(--text-2);
  border: 1px solid var(--soft-border);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.project-card small { color: var(--text-3); }

.card-dots {
  display: grid;
  gap: 6px;
}

.card-dots i {
  width: 3px;
  height: 3px;
  opacity: 0.24;
}

.card-dots.building i:nth-child(odd),
.card-dots.prototype i:nth-child(-n + 2),
.card-dots.internal i:nth-child(-n + 3) { opacity: 0.92; }
.card-dots.paused i:first-child { opacity: 0.92; }
.card-dots.experiment i:nth-child(2),
.card-dots.experiment i:nth-child(4) { opacity: 0.72; }

.build-logs {
  display: grid;
  grid-template-columns: minmax(240px, 4fr) minmax(0, 8fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
}

.sticky-copy {
  position: sticky;
  top: 112px;
}

.log-list {
  border-top: 1px solid var(--soft-border);
}

.log-row {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 34px;
  padding: 30px 0;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--soft-border);
}

.log-row::before {
  position: absolute;
  top: 34px;
  bottom: 34px;
  left: -18px;
  width: 3px;
  content: "";
  opacity: 0;
  background: radial-gradient(circle, var(--text) 1.5px, transparent 2px) 0 0 / 3px 11px;
  transition: opacity 180ms var(--ease);
}

.log-row h3 {
  margin-bottom: 8px;
  font-size: clamp(1.4rem, 2.1vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  transition: transform 180ms var(--ease);
}

.log-row p { color: var(--text-2); line-height: 1.55; }
.log-row time,
.log-row small { color: var(--text-3); }
.log-row:hover::before { opacity: 1; }
.log-row:hover h3 { transform: translateX(4px); }

.timeline {
  position: relative;
  display: grid;
  gap: 0;
  max-width: 980px;
  margin: 70px auto 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 50%;
  width: 3px;
  content: "";
  transform: translateX(-50%);
  background: radial-gradient(circle, #343434 1.5px, transparent 2px) center top / 3px 22px repeat-y;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: start;
  min-height: 170px;
}

.timeline li:nth-child(odd) > div { grid-column: 1; text-align: right; }
.timeline li:nth-child(even) > div { grid-column: 2; }

.timeline-dot {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 14px;
  height: 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  transform: translateX(-50%);
}

.timeline-dot::before {
  width: 4px;
  height: 4px;
  margin: 4px;
}

.timeline h3 {
  margin: 8px 0;
  font-size: 1.4rem;
  letter-spacing: -0.035em;
}

.timeline p { color: var(--text-2); line-height: 1.55; }
.timeline small { color: var(--text-3); }

.newsletter-card {
  position: relative;
  overflow: hidden;
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  text-align: center;
}

.newsletter-card h2 {
  max-width: 780px;
  margin-inline: auto;
}

.newsletter-card p {
  max-width: 680px;
  margin-inline: auto;
}

.newsletter-card form {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  max-width: 620px;
  margin: 34px auto 14px;
}

.newsletter-card input {
  flex: 1;
  min-width: 0;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  padding: 0 18px;
  font: inherit;
  outline: none;
}

.newsletter-card input:focus {
  border-color: #3a3a3a;
}

.newsletter-card input:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 4px;
}

.newsletter-card small { color: var(--text-3); }

.corner-dots {
  position: absolute;
  right: 34px;
  top: 34px;
  display: grid;
  grid-template-columns: repeat(2, 4px);
  gap: 7px 11px;
  opacity: 0.2;
}
.corner-dots i { width: 4px; height: 4px; }

.about {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr);
  gap: clamp(44px, 8vw, 112px);
}

.about > div > p {
  max-width: 740px;
}

.principles {
  display: grid;
  gap: 12px;
}

.principles article {
  padding: 24px;
  border: 1px solid var(--soft-border);
  border-radius: 20px;
  background: rgba(255,255,255,0.018);
}

.principles span {
  color: var(--text-3);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.principles h3 {
  margin: 18px 0 8px;
  letter-spacing: -0.035em;
}

.principles p { color: var(--text-2); line-height: 1.55; }

.footer {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(260px, 2fr) auto auto;
  gap: 32px;
  align-items: start;
  padding: 58px 0;
  border-top: 1px solid var(--soft-border);
}

.footer p {
  margin: 14px 0 0;
  color: var(--text-2);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
}

.still-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.footer small { color: var(--text-3); }

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

.reveal {
  animation: reveal 700ms var(--ease) both;
}

.loading-sculpture.reveal { animation-delay: 160ms; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes dotLoad {
  0%, 100% { opacity: 0.13; transform: scale(0.84); }
  42%, 58% { opacity: 0.92; transform: scale(1); }
}

@keyframes pulseOnce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.85); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 980px) {
  .container {
    width: min(var(--container), calc(100% - 64px));
  }

  .hero,
  .section-intro,
  .build-logs,
  .about {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 72px;
  }

  .loading-sculpture {
    min-height: 420px;
  }

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

  .featured-card {
    grid-column: span 2;
    min-height: 420px;
  }

  .sticky-copy {
    position: static;
  }

  .timeline::before,
  .timeline-dot {
    left: 10px;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: auto;
    padding: 0 0 36px 42px;
  }

  .timeline li:nth-child(odd) > div,
  .timeline li:nth-child(even) > div {
    grid-column: 1;
    text-align: left;
  }

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

@media (max-width: 680px) {
  .container {
    width: min(var(--container), calc(100% - 40px));
  }

  .nav {
    min-height: 64px;
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    min-height: 38px;
    padding-inline: 13px;
    font-size: 13px;
  }

  .hero {
    padding: 56px 0 88px;
  }

  h1 {
    font-size: clamp(4.8rem, 21vw, 5.6rem);
  }

  .subheadline {
    font-size: 2.35rem;
  }

  .loading-sculpture {
    min-height: 320px;
    border-radius: 22px;
  }

  .sculpture-grid {
    top: 38px;
    gap: 58px;
  }

  .dot-column { gap: 12px; }
  .dot-column span { width: 6px; height: 6px; }

  .status-panel {
    right: 16px;
    bottom: 16px;
    left: 16px;
  }

  .section {
    padding: 84px 0;
  }

  .section-intro h2,
  .sticky-copy h2,
  .newsletter-card h2,
  .about h2 {
    font-size: clamp(2.6rem, 13vw, 3.4rem);
  }

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

  .featured-card {
    grid-column: auto;
    grid-row: auto;
    min-height: 320px;
  }

  .project-card {
    min-height: 250px;
    padding: 24px;
  }

  .log-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .newsletter-card form {
    flex-direction: column;
  }

  .newsletter-card input,
  .newsletter-card button {
    width: 100%;
    min-height: 48px;
  }

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

/* After-hours main direction (promoted from the former funky variant). */
/* Funky / hip variant: louder, sticker-like, after-hours lab energy. */
.variant-funky {
  --bg: #09070f;
  --surface: #151021;
  --card: #19122b;
  --card-hover: #211538;
  --text: #fff7d6;
  --text-2: #dac9ff;
  --text-3: #9c8dc2;
  --border: rgba(255, 247, 214, 0.22);
  --soft-border: rgba(255, 247, 214, 0.1);
  --inverse: #faff00;
  --inverse-text: #09070f;
  background:
    radial-gradient(circle at 14% 18%, rgba(250, 255, 0, 0.18), transparent 18rem),
    radial-gradient(circle at 84% 12%, rgba(255, 79, 216, 0.24), transparent 22rem),
    radial-gradient(circle at 66% 82%, rgba(0, 245, 255, 0.2), transparent 24rem),
    var(--bg);
}

.variant-funky::before {
  background-image:
    linear-gradient(rgba(250,255,0,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,79,216,0.055) 1px, transparent 1px);
  background-size: 38px 38px;
  opacity: 0.9;
}

.variant-funky h1,
.variant-funky .subheadline,
.variant-funky h2 {
  font-family: "Geist", Inter, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.085em;
  text-transform: lowercase;
}

.variant-funky h1 {
  transform: rotate(-1deg);
  text-shadow: 2px 2px 0 #ff4fd8, -2px -2px 0 #00f5ff;
}

.variant-funky .site-header {
  background: rgba(9, 7, 15, 0.78);
}

.variant-funky .loading-sculpture,
.variant-funky .newsletter-card,
.variant-funky .project-card,
.variant-funky .principles article {
  border-width: 2px;
  box-shadow: 8px 8px 0 rgba(250,255,0,0.16), -8px -8px 0 rgba(255,79,216,0.1);
}

.variant-funky .project-card:nth-child(odd) {
  transform: rotate(-0.5deg);
}

.variant-funky .project-card:nth-child(even) {
  transform: rotate(0.5deg);
}

.variant-funky .project-card:hover {
  transform: translateY(-4px) rotate(0deg) scale(1.01);
  border-color: #faff00;
}

.variant-funky .button-primary,
.variant-funky .nav-cta,
.variant-funky .newsletter-card button {
  box-shadow: 4px 4px 0 #ff4fd8;
}

.variant-funky .button-secondary {
  border-color: rgba(250,255,0,0.42);
}

.variant-funky .mark span,
.variant-funky .dot-column span,
.variant-funky .card-dots i,
.variant-funky .corner-dots i,
.variant-funky .mini-rail i,
.variant-funky .timeline-dot {
  background: #fffef2;
  box-shadow: 0 0 18px rgba(255, 254, 242, 0.35);
}


.variant-funky .newsletter-note {
  margin: 1.5rem 0 0;
  color: var(--text-2);
  max-width: 42rem;
}

.variant-funky .timeline::before {
  background: radial-gradient(circle, #faff00 1.5px, transparent 2px) center top / 3px 22px repeat-y;
}

