:root {
  --ink: #0f2238;
  --paper: #f8f3e6;
  --paper2: #efe8d4;
  --line: rgba(15, 34, 56, .18);
  --muted: #56637a;
  --coral: #e8452c;
  --cream: #f7efd9;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { overflow-x: clip; }
body {
  /* fallback when the live landscape can't run: the same descent, as a gradient */
  background: linear-gradient(180deg, #f4e6b8 0%, #ecd27a 12%, #8fc2a0 34%, #29878a 56%, #124d69 78%, #091c38 100%);
  color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
#land, #walk { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none; }
header, main, section, footer, .note { position: relative; z-index: 1; }
a { color: inherit; }
img, video { display: block; max-width: 100%; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }

/* nav: a paper tag pinned to the map */
nav.top {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 20;
  display: flex; gap: 26px; align-items: center; white-space: nowrap;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 999px;
  padding: 7px 7px 7px 22px; box-shadow: 0 10px 30px rgba(9, 28, 56, .22);
}
nav.top a { text-decoration: none; font-size: .92rem; font-weight: 500; }
nav.top .mark { font-family: var(--serif); font-size: 1.25rem; font-weight: 400; }
nav.top .links { display: flex; gap: 20px; align-items: center; }
nav.top .links a:hover { color: var(--coral); }
.pill { background: var(--ink); color: var(--paper); padding: 8px 16px; border-radius: 999px; }
nav.top .links a.pill:hover { background: var(--coral); color: #fff; }

/* hero: text straight on the landscape */
.hero { min-height: 100svh; display: flex; align-items: center; }
.hero-text { width: 100%; padding-top: 110px; padding-bottom: 60px; position: relative; }
.hero-text::before {
  content: ""; position: absolute; left: -6%; top: 4%; width: min(900px, 96%); height: 96%; z-index: -1;
  background: radial-gradient(closest-side, rgba(248, 243, 230, .82) 0%, rgba(248, 243, 230, .55) 55%, rgba(248, 243, 230, 0) 100%);
}
h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3.1rem, 7.6vw, 7rem); line-height: .93; letter-spacing: -.015em;
  max-width: 11.5ch; text-wrap: balance;
}
h1 em { font-style: italic; color: var(--coral); }
.lede { max-width: 50ch; margin-top: 28px; font-size: 1.2rem; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 13px 22px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper);
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }
.btn.solid { background: var(--coral); border-color: var(--ink); color: #fff; }
.btn.solid:hover { background: var(--ink); }
.scrollhint { margin-top: 44px; font-family: var(--mono); font-size: .78rem; color: var(--ink); opacity: .75; }
.scrollhint::before { content: "\2193  "; color: var(--coral); }

/* teaser reel in the hero */
.hero { position: relative; }
.reel {
  position: absolute; right: max(28px, calc((100vw - 1240px) / 2 + 28px)); bottom: 9vh; width: min(500px, 37vw); z-index: 2;
  display: block; text-decoration: none; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 14px; padding: 8px 8px 0;
  box-shadow: 0 24px 60px rgba(6, 18, 36, .34); transform: rotate(-2deg); transition: transform .25s ease;
}
.reel:hover { transform: rotate(0deg) scale(1.02); }
.reel video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #0a0f18; }
.reel span { display: block; padding: 9px 6px 10px; font-size: .9rem; font-weight: 600; }
.reel span::after { content: "  \2193"; color: var(--coral); }

/* readout */
.hud {
  position: fixed; right: 18px; bottom: 16px; z-index: 15; display: flex; gap: 22px;
  background: rgba(9, 24, 44, .86); color: var(--cream); border-radius: 10px; padding: 10px 16px 9px;
  backdrop-filter: blur(6px); font-family: var(--mono);
}
.hud b { display: block; font-weight: 500; font-size: 1.02rem; line-height: 1.1; font-variant-numeric: tabular-nums; min-width: 4ch; }
.hud span { font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }
.hud.done b { color: #8fe0b0; }
.no-gl .hud { display: none; }

/* sheets: paper laid on the map */
.sheet {
  width: min(1240px, calc(100% - 40px)); margin: 0 auto 22vh;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 16px;
  padding: 50px 52px 56px; box-shadow: 0 30px 70px rgba(6, 18, 36, .32);
}
main > .sheet > .cta:first-child { margin-top: 0; }
.sec-head { position: relative; margin-bottom: 34px; }
.sec-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.5rem, 5.4vw, 4.6rem); line-height: .98; letter-spacing: -.01em; max-width: 16ch; }
.sec-head p { color: var(--muted); max-width: 62ch; margin-top: 14px; font-size: 1.06rem; }
.stamp { display: block; font-family: var(--mono); font-size: .74rem; color: var(--coral); margin-bottom: 14px; }
.stamp:empty { display: none; }

.note { width: min(1240px, calc(100% - 40px)); margin: -8vh auto 10vh; }
.note p {
  display: inline-block; background: var(--ink); color: var(--cream); border-radius: 14px;
  font-family: var(--serif); font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.15; padding: 20px 28px 22px; max-width: 26ch;
}

.media { position: relative; overflow: hidden; background: #0a0f18; border-radius: 10px; aspect-ratio: 16 / 9; }
.media video, .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
[data-play] .media { cursor: pointer; }
.card:hover .media video, .card:hover .media img, .feature:hover .media video { transform: scale(1.03); }
.tall .media { aspect-ratio: 9 / 16; }
.play {
  position: absolute; left: 14px; bottom: 14px; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: var(--paper); cursor: pointer; display: grid; place-items: center;
  transition: background .15s, transform .15s;
}
.play span { border-left: 13px solid var(--ink); border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 4px; }
[data-play]:hover .play { background: var(--coral); transform: scale(1.08); }
[data-play]:hover .play span { border-left-color: #fff; }

.feature { display: grid; grid-template-columns: 1.7fr 1fr; gap: 34px; align-items: end; margin-bottom: 34px; }
.feature h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 4.6vw, 4rem); line-height: .95; margin: 6px 0 14px; }
.tag { font-family: var(--mono); font-size: .78rem; color: var(--coral); }
.links-row { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 18px; font-weight: 600; }
.links-row a { text-underline-offset: 4px; text-decoration-color: var(--coral); }
.links-row a:hover { color: var(--coral); }

.grid { display: grid; gap: 32px 26px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4e { grid-template-columns: repeat(4, 1fr); gap: 30px 20px; }
.g4e .card h3 { font-size: 1.15rem; }
.g4e .card p { font-size: .92rem; }
.g4e .media { aspect-ratio: 4 / 3; }
.g5 { grid-template-columns: repeat(5, 1fr); gap: 30px 20px; }
.g5 .card h3 { font-size: 1.15rem; }
.g5 .card p { font-size: .9rem; }
.g4 { grid-template-columns: repeat(3, 1fr) .6fr; align-items: start; }
.g3v { grid-template-columns: .55fr .55fr 1.3fr; align-items: start; }
.card { text-decoration: none; display: block; }
.card h3 { font-weight: 800; font-stretch: 85%; font-size: 1.28rem; line-height: 1.2; margin-top: 14px; }
.card p { color: var(--muted); font-size: .97rem; margin-top: 6px; }
.go { font-family: var(--mono); font-weight: 500; font-size: .74rem; color: var(--coral); margin-left: 8px; white-space: nowrap; }
.go::after { content: " \2197"; }
.card.link:hover h3 { color: var(--coral); }
.shot .media { aspect-ratio: 16 / 10; border: 1px solid var(--line); }
.shot .media img { object-position: top; }

/* ML cases */
.cases { gap: 20px; }
.case { background: var(--paper2); border: 1px solid var(--line); border-radius: 12px; padding: 26px 28px 24px; }
.case h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 2.6vw, 2.3rem); line-height: 1.04; margin: 8px 0 12px; }
.case p { font-size: 1rem; }
.case .tag { font-family: var(--sans); font-weight: 700; font-size: .95rem; }
.case .tech { font-family: var(--mono); font-size: .74rem; color: var(--muted); margin-top: 16px; }
.fullstack { display: grid; grid-template-columns: 1fr 1.6fr; gap: 30px; align-items: start; }
.fullstack h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.05; }
.fullstack + .cta { margin-top: 30px; }
.sub { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 0 0 22px; }
.logos { display: grid; grid-template-columns: repeat(6, 1fr); gap: 38px 30px; align-items: center; padding: 10px 0 6px; }
.logo-tile { display: grid; place-items: center; height: 70px; }
.logo-tile img { max-width: 100%; height: var(--h, 40px); max-height: none; width: auto; height: auto; object-fit: contain; mix-blend-mode: multiply; filter: grayscale(1) contrast(1.25); opacity: .86; transition: filter .25s ease, opacity .25s ease, transform .25s ease; }
.logo-tile:hover img { filter: none; opacity: 1; transform: scale(1.06); }
.lg { display: inline-grid; place-items: center; height: 40px; margin-bottom: 12px; }
.lg img { height: var(--h, 30px); max-width: 100%; width: auto; object-fit: contain; mix-blend-mode: multiply; filter: grayscale(1) contrast(1.25); opacity: .86; transition: filter .25s ease, opacity .25s ease; }
.lg:hover img, .case:hover .lg img, .jobs li:hover .lg img { filter: none; opacity: 1; }
.lgs { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.case .lg { height: 46px; margin-bottom: 14px; justify-items: start; }
.jobs li .lg, .jobs li .lgs { display: flex; width: max-content; max-width: 100%; }
.jobs li .lgs .lg { display: inline-grid; margin-bottom: 12px; }
.also { color: var(--muted); max-width: 80ch; margin-top: 24px; font-size: .98rem; }

/* HabitBull */
.habit {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 30px; align-items: center; overflow: hidden;
  background: #5b3b8c; color: #fff; border-radius: 14px; padding: 34px 36px 0; margin-bottom: 34px;
}
.habit-text { padding-bottom: 34px; }
.habit h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 5vw, 4.2rem); line-height: 1; margin-bottom: 12px; }
.habit p { color: rgba(255, 255, 255, .86); max-width: 46ch; }
.habit a { color: #fff; font-weight: 600; text-underline-offset: 4px; }
.stats { display: flex; flex-wrap: wrap; gap: 16px 34px; margin-top: 22px; }
.stats div strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 2.3rem; line-height: 1; }
.stats div span { font-size: .85rem; opacity: .8; }
.phones { display: flex; gap: 16px; align-self: end; justify-content: center; }
.phones img { width: 46%; max-width: 230px; border-radius: 14px 14px 0 0; box-shadow: 0 -8px 40px rgba(0, 0, 0, .35); }
.phones img:first-child { transform: translateY(26px) rotate(-3deg); }
.phones img:last-child { transform: translateY(8px) rotate(2deg); }

/* closing band: text on the valley floor */
.hire { padding: 6vh 0 20vh; color: var(--cream); }
.hire h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.8rem, 7vw, 6rem); line-height: .96; max-width: 14ch; }
.hire p { max-width: 54ch; margin-top: 20px; font-size: 1.12rem; color: rgba(247, 239, 217, .85); }
.hire .btn { border-color: var(--cream); background: transparent; color: var(--cream); }
.hire .btn:hover { background: var(--cream); color: var(--ink); }
.hire .btn.solid { background: var(--coral); border-color: var(--coral); color: #fff; }
.hire .btn.solid:hover { background: var(--cream); border-color: var(--cream); color: var(--ink); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 90px; font-size: .9rem; color: rgba(247, 239, 217, .75); }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: #fff; }

/* player */
dialog#player { margin: auto; border: 0; background: transparent; color: var(--cream); width: min(1200px, 94vw); max-height: 94vh; overflow: visible; }
dialog#player::backdrop { background: rgba(4, 12, 24, .94); }
dialog#player video { width: 100%; max-height: 82vh; background: #000; border-radius: 8px; }
dialog#player.vertical { width: min(46vh, 94vw); }
dialog#player .close { background: none; border: 0; color: var(--cream); font: 500 .85rem var(--mono); cursor: pointer; padding: 8px 0; display: block; margin-left: auto; }
dialog#player .close:hover { color: var(--coral); }
.p-title { font-family: var(--serif); font-size: 1.4rem; margin-top: 10px; }

/* background + story pages */
.page-head { padding-top: 170px; padding-bottom: 70px; position: relative; }
.page-head::before {
  content: ""; position: absolute; left: -4%; top: 60px; width: min(1000px, 100%); height: 100%; z-index: -1;
  background: radial-gradient(closest-side, rgba(248, 243, 230, .82) 0%, rgba(248, 243, 230, .5) 55%, rgba(248, 243, 230, 0) 100%);
}
.page-head h1 { font-size: clamp(2.8rem, 7.4vw, 6.4rem); max-width: 15ch; }
.intro { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; margin-top: 40px; align-items: start; }
.intro p { font-size: 1.14rem; margin-bottom: 16px; max-width: 60ch; }
.intro a { text-decoration-color: var(--coral); text-underline-offset: 4px; }
.facts { list-style: none; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 14px; padding: 8px 22px; }
.facts li { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.facts li:last-child { border-bottom: 0; }
.facts span:first-child { color: var(--muted); }
.facts span:last-child { text-align: right; font-weight: 600; }
.era { display: grid; grid-template-columns: 200px 1fr; gap: 40px; padding: 34px 0; border-top: 1px solid var(--line); }
.era:first-child { border-top: 0; padding-top: 0; }
.era .when { font-family: var(--mono); font-size: .82rem; color: var(--coral); padding-top: 12px; }
.era h3 { font-family: var(--serif); font-weight: 400; font-size: 2.4rem; line-height: 1.05; }
.era .role { color: var(--muted); margin: 4px 0 14px; }
.era p { max-width: 68ch; }
.jobs { list-style: none; margin-top: 18px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 34px; }
.jobs li { font-size: .97rem; color: #33415a; }
.jobs b { display: block; color: var(--ink); font-weight: 800; font-stretch: 85%; font-size: 1.1rem; }
.jobs i { display: block; font-style: normal; font-family: var(--mono); font-size: .72rem; color: var(--muted); margin-top: 5px; }
.era .stats div span { color: var(--muted); opacity: 1; }
.courses { list-style: none; margin-top: 8px; }
.courses li { display: flex; justify-content: space-between; gap: 24px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.courses li:last-child { border-bottom: 0; }
.courses b { font-weight: 700; }
.courses span { color: var(--muted); font-size: .92rem; text-align: right; flex: 0 0 auto; max-width: 46%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chips span { font-size: .86rem; background: var(--paper2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; }

.prose-wrap { padding-bottom: 60px; }
.prose { max-width: 700px; margin: 0 auto; }
.prose p { font-size: 1.17rem; line-height: 1.68; margin-bottom: 22px; }
.prose a { text-decoration-color: var(--coral); text-underline-offset: 4px; }
.prose a:hover { color: var(--coral); }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.3rem, 4.8vw, 3.6rem); line-height: 1; margin-bottom: 26px; }
.prose .part { font-family: var(--mono); font-size: .82rem; color: var(--coral); margin: 64px 0 10px; border-top: 1px solid var(--line); padding-top: 24px; }
.prose .part:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.prose .sign { margin-top: 40px; font-weight: 600; }

@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 18px; }
  .hero { flex-direction: column; justify-content: center; }
  .reel { position: relative; right: auto; bottom: auto; width: min(520px, calc(100% - 36px)); margin: 0 18px 60px; align-self: flex-start; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: 1fr; }
  .g4e { grid-template-columns: repeat(2, 1fr); }
  .logos { grid-template-columns: repeat(4, 1fr); }
  .fullstack { grid-template-columns: 1fr; gap: 10px; }
  .g5 { grid-template-columns: repeat(3, 1fr); }
  .g3v { grid-template-columns: repeat(2, 1fr); }
  .g3v .wide-note { grid-column: 1 / -1; }
  .habit { grid-template-columns: 1fr; padding: 28px 24px 0; }
  .habit-text { padding-bottom: 6px; }
  .intro { grid-template-columns: 1fr; gap: 30px; }
  .era { grid-template-columns: 1fr; gap: 6px; }
  .jobs { grid-template-columns: 1fr; }
  .sheet { padding: 38px 30px 42px; }
}
@media (max-width: 600px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  .page-head { padding-top: 120px; padding-bottom: 40px; }
  nav.top { gap: 10px; padding: 6px 6px 6px 16px; left: 8px; right: 8px; transform: none; justify-content: space-between; }
  nav.top .mark { font-size: 1.08rem; }
  nav.top .links { gap: 12px; }
  nav.top a { font-size: .84rem; }
  nav.top .links a:first-child { display: none; }
  .pill { padding: 7px 12px; }
  .g2 { grid-template-columns: 1fr; }
  .logos { grid-template-columns: repeat(3, 1fr); gap: 26px 18px; }
  .g5 { grid-template-columns: repeat(2, 1fr); }
  .sheet { width: calc(100% - 20px); padding: 28px 18px 32px; margin-bottom: 18vh; border-radius: 14px; }
  .note { width: calc(100% - 20px); }
  .hero-text::before { left: -25%; width: 150%; top: -5%; height: 110%; background: radial-gradient(closest-side, rgba(248,243,230,.86) 0%, rgba(248,243,230,.6) 60%, rgba(248,243,230,0) 100%); }
  .hud { right: 10px; bottom: 10px; padding: 8px 12px 7px; gap: 16px; }
  .hud b { font-size: .9rem; }
}
