@font-face { font-family: Marcellus; src: url(/fonts/marcellus.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Hanken; src: url(/fonts/hanken.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #04060a;
  --fg: #f3efe6;
  --muted: #aeb3bf;
  --line: rgba(226, 232, 245, .17);
  --card: rgba(8, 11, 18, .55);
  --accent: #f0b871;
  --display: Marcellus, "Palatino Linotype", Palatino, Georgia, serif;
  --body: Hanken, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gut: clamp(20px, 5vw, 88px);
  --out: cubic-bezier(.16, 1, .3, 1);
  interpolate-size: allow-keywords;
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--fg); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--accent); color: #14100a; }

/* ---------- the scene */
#space { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100lvh; display: block; z-index: -2; opacity: 0; transition: opacity 1.4s ease; pointer-events: none; }
#space.show { opacity: 1; }
/* a still planet edge drawn in CSS: shown while the scene loads, and kept if WebGL isn't available */
body::before {
  content: ""; position: fixed; z-index: -3; left: 50%; top: 66vh; width: 150vmax; aspect-ratio: 1; border-radius: 50%; translate: -50% 0;
  background: radial-gradient(circle at 50% 0, #0a1520, #04070c 24%);
  box-shadow: 0 -1px 6px rgba(255, 226, 180, .9), 0 -6px 34px rgba(235, 160, 85, .38), 0 -22px 110px rgba(80, 140, 255, .22);
}
.page::before { display: none; }
.no-gl section:not(.hero), .no-gl footer { background: var(--bg); }

/* ---------- header */
.bar { position: absolute; inset: 0 0 auto; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px var(--gut); }
.mark { font: 400 21px/1 var(--display); text-decoration: none; white-space: nowrap; }
.bar nav { display: flex; gap: 30px; }
.bar nav a { font-size: 15px; color: var(--muted); text-decoration: none; padding: 8px 0; transition: color .25s; }
.bar nav a:hover { color: var(--fg); }

/* ---------- sunrise */
.hero { min-height: 100vh; min-height: 100svh; padding: 17vh var(--gut) 0; padding-top: 17svh; text-align: center; }
h1 { font: 400 clamp(42px, 7.1vw, 124px)/1.02 var(--display); letter-spacing: -.022em; text-wrap: balance; }
h1 .ln { display: block; overflow: clip; overflow-clip-margin: .12em; }
h1 .ln > span { display: block; }
.lead { max-width: 33em; margin: clamp(20px, 2.6vw, 34px) auto 0; color: #d5d8df; font-size: clamp(16.5px, 1.25vw, 21px); text-wrap: balance; }
.gap { height: 55vh; }

/* ---------- portfolio + past ventures */
.act { padding: 15vh var(--gut) 12vh; }
.col { width: min(44%, 660px); }
h2 { font: 400 clamp(38px, 4.6vw, 78px)/1.05 var(--display); letter-spacing: -.02em; margin-bottom: clamp(24px, 3vw, 44px); }
#portfolio { min-height: 118vh; }
#past { min-height: 100vh; padding-top: 18vh; }

.list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.list li { border-top: 1px solid var(--line); }
.venture { --c: var(--fg); position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 20px; padding: 20px 4px 21px; text-decoration: none; transition: padding .6s var(--out); }
.venture::before { content: ""; position: absolute; inset: -1px auto auto 0; width: 100%; height: 1px; background: linear-gradient(90deg, var(--c), transparent); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--out); }
.venture strong { font: 400 clamp(25px, 2.1vw, 36px)/1.2 var(--display); transition: color .35s; }
.venture .what { grid-column: 1; color: var(--muted); font-size: 16px; }
.venture .dom { grid-area: 1 / 2 / 3 / 3; color: var(--muted); font-size: 15px; display: flex; align-items: center; gap: 12px; transition: color .35s; }
.venture svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .6s var(--out); }
.venture:is(:hover, :focus-visible, .hot) { padding-left: 18px; }
.venture:is(:hover, :focus-visible, .hot)::before { transform: none; }
.venture:is(:hover, :focus-visible, .hot) strong { color: var(--c); }
.venture:is(:hover, :focus-visible, .hot) .dom { color: var(--fg); }
.venture:is(:hover, :focus-visible, .hot) svg { transform: translate(3px, -3px); }
.c0 { --c: #c3aaff; } .c1 { --c: #86c0ff; } .c2 { --c: #83dcb9; } .c3 { --c: #ffb87c; }

/* names next to the moons */
.tag { --c: var(--fg); position: fixed; left: 0; top: 0; z-index: 3; padding: 4px 10px 6px; font-size: 13.5px; line-height: 1.2; color: #cdd2dc; text-decoration: none; text-shadow: 0 1px 8px #04060a, 0 0 3px #04060a; white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity .45s, visibility .45s, color .3s; }
.tag.show { opacity: .85; visibility: visible; }
.tag.on, .tag:hover { color: var(--c); opacity: 1; }

/* past ventures */
.past { border-top: 1px solid var(--line); }
.past:last-child { border-bottom: 1px solid var(--line); }
.past summary { display: grid; grid-template-columns: 1fr auto 20px; align-items: center; gap: 6px 18px; padding: 19px 4px; cursor: pointer; list-style: none; }
.past summary::-webkit-details-marker { display: none; }
.past summary strong { font: 400 clamp(21px, 1.65vw, 28px)/1.25 var(--display); color: #d3d6dd; transition: color .3s; }
.past summary .dom { color: var(--muted); font-size: 15px; transition: color .3s; }
.past summary:hover strong, .past[open] summary strong { color: var(--fg); }
.past summary:hover .dom { color: var(--fg); }
.plus { position: relative; width: 15px; height: 15px; justify-self: end; transition: rotate .6s var(--out); }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; top: 6.5px; width: 15px; height: 2px; background: currentColor; }
.nb { white-space: nowrap; }
.plus::after { rotate: 90deg; }
.past[open] .plus { rotate: 135deg; color: var(--accent); }
.past::details-content { height: 0; overflow: clip; opacity: 0; transition: height .6s var(--out), opacity .45s, content-visibility .6s allow-discrete; }
.past[open]::details-content { height: auto; opacity: 1; }
.story { padding: 2px 4px 28px; max-width: 37em; }
.story h3 { font: 600 15px/1.4 var(--body); color: var(--accent); margin: 16px 0 2px; }
.story h3:first-child { margin-top: 0; }
.story p { color: #d0d4dc; font-size: 16.5px; }

/* ---------- footer */
footer { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; padding: 26px var(--gut) 30px; color: var(--muted); font-size: 15px; }
footer a:hover { color: var(--fg); }
.contact-gate { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 40px; }
footer .cg-btn, .page .cg-btn { min-height: 40px; border-radius: 999px; padding: 8px 18px 8px 14px; }
#motion { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 4px; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; transition: color .25s; }
#motion[hidden] { display: none; }
#motion:hover { color: var(--fg); }
#motion svg { width: 14px; height: 14px; fill: currentColor; }
#motion .play, .paused #motion .stop { display: none; }
.paused #motion .play { display: block; }

/* ---------- entrances (only when JavaScript is running) */
@media (prefers-reduced-motion: no-preference) {
  .js h1 .ln > span { transform: translateY(112%); transition: transform 1.7s var(--out); }
  .js h1 .ln:nth-child(2) > span { transition-delay: .13s; }
  .js .lead, .js .bar { opacity: 0; transition: opacity 1.6s ease .75s; }
  .js.ready h1 .ln > span { transform: none; }
  .js.ready .lead, .js.ready .bar { opacity: 1; }
  .js .rv { opacity: 0; transform: translateY(34px); transition: opacity 1.1s ease, transform 1.3s var(--out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js .rv.in { opacity: 1; transform: none; }
  /* the headline lifts away as the camera leaves the surface */
  @supports (animation-timeline: scroll()) {
    .hero-in { animation: lift linear both; animation-timeline: scroll(); animation-range: 0 75vh; }
    @keyframes lift { to { opacity: 0; transform: translateY(-9vh) scale(.95); } }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after, .past::details-content { transition-duration: .01ms !important; }
}

/* ---------- phones and tall screens: the planet sits above each list */
@media (max-width: 859px), (max-aspect-ratio: 102/100) {
  .bar { padding-block: 20px; }
  .bar nav { gap: 20px; }
  .hero { padding-top: 19vh; padding-top: 19svh; }
  .col { width: 100%; max-width: 620px; margin-inline: auto; }
  .gap { height: 35vh; }
  .act, #past { padding-top: 52vh; padding-top: 52svh; padding-bottom: 8vh; min-height: 0; }
  .tag { display: none; }
}
@media (max-width: 350px) { .bar nav a:first-child { display: none; } }
@media (max-width: 520px) {
  .bar nav { gap: 16px; }
  .mark { font-size: 19px; }
  .venture { padding-right: 40px; }
  .venture .dom { grid-area: 3 / 1; font-size: 14.5px; }
  .venture svg { position: absolute; right: 4px; top: calc(50% - 9px); }
  .past summary { grid-template-columns: 1fr 20px; }
  .past summary .dom { grid-area: 2 / 1; }
  .plus { grid-area: 1 / 2 / 3 / 3; }
  #motion { margin-left: 0; }
}
/* short, wide windows */
@media (min-width: 860px) and (max-height: 640px) { h1 { font-size: clamp(40px, 5.6vw, 76px); } .hero { padding-top: 96px; } }

/* ---------- plain pages (privacy policy) */
.page { background: radial-gradient(120vmax 70vmax at 50% -30vmax, rgba(70, 120, 200, .20), transparent 70%) no-repeat, var(--bg); min-height: 100vh; }
.page .wrap { max-width: 720px; margin: 0 auto; padding: 30px 20px 56px; }
.page h1 { font-size: clamp(38px, 6vw, 58px); margin: 72px 0 12px; }
.page h2 { font-size: 25px; letter-spacing: 0; margin: 40px 0 8px; }
.page p { color: #d0d4dc; }
.page .muted { color: var(--muted); }
.page code { font-size: .92em; color: var(--fg); }
.page footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 22px 0 0; }
