:root {
  --night: #16121F;
  --dusk: #231D33;
  --deep: #1C1729;
  --stardust: #F6F4FA;
  --mist: #A8A1B8;
  --lav: #C4A7F0;
  --violet: #7C5CC4;
  --ember: #F4B183;
  --mint: #9EE0C4;
  --display: 'Bricolage Grotesque', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--stardust);
  font-family: 'Instrument Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--lav); text-decoration: none; }
a:hover { color: var(--ember); }
h1, h2, h3 { margin: 0; }

.wrap { max-width: 1280px; margin: 0 auto; padding-left: clamp(20px, 4vw, 48px); padding-right: clamp(20px, 4vw, 48px); }
.label { font-family: var(--mono); font-size: 12px; color: var(--mist); }
.label.ember { color: var(--ember); }
.muted { color: var(--mist); font-weight: 400; }
.lav { color: var(--lav); }

/* Wordmark */
.mark {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-ligatures: none;
  display: inline-flex;
  align-items: baseline;
  color: var(--stardust);
}
.mark .ff { letter-spacing: -0.06em; }
.mark .i { position: relative; margin-left: 0.03em; }
.mark .comet { position: absolute; width: 1.2em; height: 0.6em; left: calc(50% - 1.04em); top: -0.17em; overflow: visible; }
.mark circle { fill: var(--lav); stroke: var(--night); stroke-width: 3; paint-order: stroke; }

/* Buttons */
.btn { display: inline-block; font-weight: 600; border: 3px solid var(--night); transition: background .15s, color .15s; }
.btn-cta { color: var(--night); background: var(--mint); box-shadow: 6px 6px 0 var(--stardust); }
.btn-cta:hover { background: var(--ember); color: var(--night); }
.btn-sm { padding: 10px 16px; font-size: 15px; border-width: 2px; box-shadow: 4px 4px 0 var(--ember); }
.btn-lg { padding: 16px 26px; font-size: 17px; }
.btn-dark { color: var(--stardust); background: var(--night); padding: 16px 24px; font-size: 17px; box-shadow: 6px 6px 0 var(--stardust); }
.btn-dark:hover { background: var(--dusk); color: var(--stardust); }
.btn-ghost { color: var(--night); padding: 16px 24px; font-size: 17px; }
.btn-ghost:hover { background: rgba(22, 18, 31, 0.08); color: var(--night); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(22, 18, 31, 0.96); border-bottom: 3px solid var(--stardust); }
.nav-row { padding-top: 12px; padding-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.nav-brand .mark { font-size: 26px; }
.nav-links { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); flex-wrap: wrap; justify-content: flex-end; }
.nav-links > a:not(.btn) { color: var(--mist); font-size: 15px; font-weight: 500; }
.nav-links > a:not(.btn):hover { color: var(--stardust); }
.langs { display: flex; border: 2px solid var(--stardust); }
.langs button { font-family: var(--mono); font-weight: 700; font-size: 12px; padding: 8px 11px; border: none; cursor: pointer; background: transparent; color: var(--stardust); }
.langs button.active { background: var(--mint); color: var(--night); }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 3px solid var(--stardust); }
.sky {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; contain: strict;
  background: radial-gradient(ellipse 70% 60% at 78% -10%, rgba(124, 92, 196, 0.38), transparent 70%), radial-gradient(ellipse 60% 50% at 0% 110%, rgba(196, 167, 240, 0.10), transparent 70%);
}
.star { position: absolute; border-radius: 50%; will-change: opacity; animation: twinkle var(--d) ease-in-out var(--dl) infinite; }
.comet-wrap { position: absolute; transform: rotate(152deg); transform-origin: 0 0; }
.comet-trail { position: relative; height: 2px; opacity: 0; animation: shoot var(--d) linear var(--dl) infinite; }
.comet-trail span { position: absolute; right: -3px; top: -2px; width: 6px; height: 6px; border-radius: 50%; }
.hero-inner { position: relative; padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(40px, 5vw, 64px); }
.hero-row { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 64px); align-items: flex-end; justify-content: space-between; }
.hero-mark { cursor: pointer; font-size: clamp(96px, 17vw, 260px); letter-spacing: -0.05em; }
.hero-mark .comet { animation: land 1.6s cubic-bezier(.2, .7, .2, 1) .3s both; will-change: transform; }
.hero-mark .halo { fill: var(--lav); stroke: none; opacity: 0; animation: glow 3.5s ease-in-out 2s infinite; }
.hero-mark .comet polygon { transform-origin: 54px 24px; animation: tail 1.6s cubic-bezier(.2, .7, .2, 1) .3s both; }
.hero-copy { flex: 1 1 360px; max-width: 500px; padding-bottom: 12px; }
.tag { display: inline-block; font-family: var(--mono); font-weight: 700; font-size: 12px; color: var(--night); background: var(--ember); padding: 6px 10px; border: 2px solid var(--night); transform: rotate(-2deg); margin-bottom: 24px; }
.hero-intro { font-size: clamp(20px, 1.9vw, 25px); line-height: 1.45; margin: 0 0 32px; text-wrap: pretty; }

.route { margin-top: clamp(48px, 7vw, 88px); display: flex; align-items: center; gap: 16px; font-family: var(--mono); font-size: 12px; color: var(--mist); }
.route-city { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.route-city.right { text-align: right; }
.route-name { color: var(--stardust); font-weight: 700; font-size: 14px; }
.route-line { flex: 1; min-width: 40px; display: flex; align-items: center; position: relative; }
.route-head { width: 16px; height: 16px; border-radius: 50%; background: var(--mint); border: 3px solid var(--night); box-shadow: 0 0 0 2px var(--mint), 0 0 20px var(--mint); flex-shrink: 0; position: relative; z-index: 1; }
.route-trail { flex: 1; height: 3px; background: linear-gradient(90deg, var(--mint), rgba(244, 177, 131, 0.7) 45%, rgba(244, 177, 131, 0)); }
.route-km { position: absolute; left: 50%; top: -22px; transform: translateX(-50%); white-space: nowrap; }

/* Story */
.story { padding-top: clamp(56px, 6vw, 88px); padding-bottom: clamp(56px, 6vw, 88px); }
.story .label { font-size: 13px; margin-bottom: 12px; }
.story-title { font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: clamp(44px, 6vw, 80px); line-height: 0.95; letter-spacing: -0.03em; margin: 0 0 32px; text-wrap: balance; }
.story-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.portrait { flex: 0 1 260px; min-width: 200px; aspect-ratio: 4 / 5; position: relative; border: 3px solid var(--stardust); box-shadow: 8px 8px 0 var(--lav); overflow: hidden; background: var(--stardust); }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
.portrait-tag { position: absolute; left: 12px; bottom: 12px; background: var(--night); color: var(--stardust); border: 3px solid var(--stardust); padding: 6px 10px; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -0.02em; transform: rotate(-3deg); }
.story-panels { flex: 1 1 520px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.panel { border: 3px solid var(--stardust); }
.panel-path { background: var(--deep); padding: 20px 24px; }
.panel-path .label { margin-bottom: 0; }
.path-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.facts { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.facts span { font-family: var(--mono); font-size: 12px; color: var(--mist); white-space: nowrap; }
.facts b { color: var(--stardust); font-weight: 700; }
.path { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 0; }
.dot-line { display: flex; align-items: center; margin-bottom: 10px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--lav); border: 3px solid var(--deep); box-shadow: 0 0 0 2px var(--lav); flex-shrink: 0; }
.line { flex: 1; height: 2px; background: linear-gradient(var(--lav), rgba(244, 177, 131, 0.5)); margin-left: 6px; }
.path .last .dot { background: var(--mint); box-shadow: 0 0 0 2px var(--mint); }
.path .last .line { background: transparent; }
.pt { font-family: var(--display); font-weight: 800; font-size: clamp(16px, 1.6vw, 20px); letter-spacing: -0.02em; line-height: 1.15; padding-right: 10px; }
.pp { font-family: var(--mono); font-size: 11px; color: var(--lav); margin-top: 4px; padding-right: 12px; }
.panel-jobs { background: var(--dusk); padding: 16px 24px 8px; box-shadow: 8px 8px 0 var(--violet); }
.jobs-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.jobs-head .label { margin-bottom: 0; font-size: 12px; }
.job { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; padding: 9px 0; border-top: 1px dashed rgba(196, 167, 240, 0.25); }
.job .yrs { flex: 0 0 118px; font-family: var(--mono); font-size: 11px; color: var(--lav); }
.job .role { flex: 1 1 240px; min-width: 0; font-size: 15px; font-weight: 600; }

/* What I make */
.make { border-top: 3px solid var(--stardust); border-bottom: 3px solid var(--stardust); background: var(--deep); }
.make-inner { padding-top: clamp(72px, 9vw, 130px); padding-bottom: clamp(72px, 9vw, 130px); }
.make-line { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 6.4vw, 92px); line-height: 1.22; letter-spacing: -0.04em; margin: 0; max-width: 1100px; text-wrap: balance; }
.make-line mark { background: var(--lav); color: var(--night); padding: 0 0.12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.make-line mark.ember { background: var(--ember); }
.make-for { margin: 40px 0 0; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; color: var(--mist); max-width: 620px; }

/* Work */
.work { padding-top: clamp(64px, 8vw, 110px); padding-bottom: clamp(64px, 8vw, 110px); }
.work-title { font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: clamp(48px, 7vw, 96px); line-height: 0.9; letter-spacing: -0.03em; margin: 0 0 16px; }
.work-intro { margin: 0 0 40px; max-width: 600px; font-size: 18px; line-height: 1.5; color: var(--mist); text-wrap: pretty; }
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 28px; }
.card { display: block; border: 3px solid var(--stardust); background: var(--dusk); color: var(--stardust); box-shadow: 8px 8px 0 var(--violet); transition: transform .15s, box-shadow .15s; }
.card:hover { color: var(--stardust); transform: translate(-3px, -3px); box-shadow: 11px 11px 0 var(--ember); }
.card-shot { aspect-ratio: 16 / 10; border-bottom: 3px solid var(--stardust); display: flex; align-items: center; justify-content: center; }
.icke-shot { background: var(--stardust); }
/* Icke-Cup wordmark: the niffi comet with a volleyball head, landing on the i. Mirrors src/components/Wordmark.tsx in icke-scores. */
.icke { font-family: var(--display); font-weight: 800; font-size: clamp(48px, 7vw, 72px); letter-spacing: -0.04em; line-height: 1; font-variant-ligatures: none; display: inline-flex; align-items: baseline; color: #DA333C; padding-left: 0.9em; }
.icke .cup { color: #149567; margin-left: 0.22em; }
.icke .i { position: relative; }
.icke .comet { position: absolute; width: 1.3em; height: 0.65em; left: calc(50% - 1.12em); top: -0.3em; overflow: visible; }
.card-row { display: flex; justify-content: space-between; gap: 12px; padding: 16px 18px; }
.card-name { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.card-row .label { padding-top: 6px; }

/* Off the clock */
.off { padding-top: clamp(48px, 6vw, 90px); padding-bottom: clamp(72px, 9vw, 120px); }
.off-title { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 4vw, 52px); line-height: 1; letter-spacing: -0.04em; margin: 0 0 40px; color: var(--mist); }
.stickers { display: flex; flex-wrap: wrap; gap: 18px 14px; align-items: center; }
.stickers span { font-family: var(--display); font-weight: 800; border: 3px solid var(--night); padding: 12px 20px; font-size: clamp(22px, 2.6vw, 34px); letter-spacing: -0.02em; color: var(--night); }
.stickers .s0 { transform: rotate(-4deg); background: var(--lav); box-shadow: 4px 4px 0 var(--stardust); border-radius: 999px; }
.stickers .s1 { transform: rotate(3deg); background: var(--stardust); padding: 12px 18px; font-stretch: 75%; font-size: clamp(26px, 3vw, 40px); letter-spacing: 0; }
.stickers .s2 { transform: rotate(-2deg); background: var(--ember); box-shadow: 4px 4px 0 var(--stardust); }
.stickers .s3 { transform: rotate(5deg); background: var(--night); color: var(--stardust); border-color: var(--stardust); border-radius: 999px; }
.stickers .s4 { transform: rotate(-3deg); background: var(--violet); color: var(--stardust); border-color: var(--stardust); padding: 14px 22px; font-stretch: 75%; font-size: clamp(28px, 3.4vw, 46px); letter-spacing: -0.01em; }
.stickers .s5 { transform: rotate(2deg); background: var(--mint); box-shadow: 4px 4px 0 var(--lav); padding: 12px 18px; border-radius: 999px; }
.stickers .s6 { transform: rotate(-5deg); background: var(--lav); padding: 12px 18px; font-stretch: 75%; font-size: clamp(26px, 3vw, 40px); letter-spacing: 0; }
.stickers .s7 { transform: rotate(4deg); background: var(--ember); border-radius: 999px; }
.stickers .s8 { transform: rotate(-1deg); background: var(--night); color: var(--lav); border-color: var(--lav); }

/* Contact */
.contact { padding: 0 clamp(20px, 4vw, 48px) clamp(64px, 8vw, 110px); }
.contact-box { background: var(--lav); border: 4px solid var(--stardust); box-shadow: 14px 14px 0 var(--ember); padding: clamp(40px, 7vw, 96px); position: relative; overflow: hidden; }
.contact-box::before { content: ''; position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 88% 50%, rgba(22, 18, 31, 0.10) 0deg 1.5deg, transparent 1.5deg 7deg); pointer-events: none; }
.contact-inner { position: relative; max-width: 780px; }
.contact-title { font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: clamp(64px, 11vw, 160px); line-height: 0.85; letter-spacing: -0.03em; margin: 0 0 28px; color: var(--night); }
.contact-text { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: #2A2238; margin: 0 0 36px; max-width: 540px; }
.contact-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Footer */
.footer { border-top: 3px solid var(--stardust); }
.footer-row { padding-top: 28px; padding-bottom: 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; color: var(--mist); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--mist); }
.footer-links a:hover { color: var(--stardust); }

/* Animation */
@keyframes land { 0% { transform: translate(-2.2em, -1.3em); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(0, 0); opacity: 1; } }
@keyframes tail { 0% { transform: scaleX(1.9); } 100% { transform: scaleX(1); } }
@keyframes glow { 0%, 100% { opacity: 0; } 50% { opacity: .45; } }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes shoot { 0% { transform: translateX(0); opacity: 0; } 3% { opacity: 1; } 16% { opacity: 0; transform: translateX(1400px); } 100% { opacity: 0; transform: translateX(1400px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sky *, .hero-mark .comet, .hero-mark .comet * { animation: none !important; }
}

@media (max-width: 640px) {
  .nav-row, .nav-links { flex-wrap: nowrap; }
  .nav-links { gap: 12px; }
  .nav-links > a:not(.btn) { display: none; } /* ponytail: one-page site, scrolling reaches the sections; add a menu when there are real subpages */
  .path { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-title { font-size: clamp(48px, 15vw, 64px); }
}
