/* ---------------------------------------------------------------
   main.css - home, projects, and experience. Loads after base.css.
   --------------------------------------------------------------- */

/* =========================== HOME =========================== */

/* the hero owns its own vertical rhythm, so drop the shared top pad */
.home-main { padding-top: 0; }

.hero-shell {
  padding-block: clamp(3rem, 9vh, 6rem) clamp(2.5rem, 6vh, 5rem);
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(215px, .6fr);
  gap: clamp(2.5rem, 8vw, 8rem); align-items: center;
}
.hero-shell { position: relative; }
.hero-loop {
  position: absolute; z-index: 0; right: -6%; top: 50%; width: 62%; height: auto;
  transform: translateY(-52%); pointer-events: none; overflow: visible;
}
.hero-loop path {
  fill: none; stroke: rgba(209, 154, 97, .34); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 9 14;
  animation: heroDrift 26s linear infinite;
}
@keyframes heroDrift { to { stroke-dashoffset: -460; } }
.hero-intro, .now-panel { position: relative; z-index: 1; }
.hero-intro { align-self: center; }
.kicker { display: flex; align-items: center; gap: .65rem; margin: 0 0 1.6rem; }
.hero-intro h1 {
  max-width: 16ch; margin: 0;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3.6rem, 9vw, 8.6rem); line-height: .88; letter-spacing: -.035em;
}
.hero-name { color: var(--accent); font-style: italic; }
.hero-lede {
  max-width: 44ch; margin: clamp(1.6rem, 3.5vw, 2.6rem) 0 0;
  color: var(--text-2); font-size: clamp(1.05rem, 1.65vw, 1.3rem); line-height: 1.6; letter-spacing: -.01em;
}
.hero-lede strong { color: var(--paper); font-weight: 500; }
.hero-links { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 2.2rem; }
.hero-links a, .hero-links button {
  padding: 0; color: var(--text-3); background: none; border: 0;
  font-family: var(--mono); font-size: .76rem; letter-spacing: .04em;
  text-decoration: none; cursor: pointer; transition: color .2s ease;
}
.hero-links a:hover, .hero-links a:focus-visible,
.hero-links button:hover, .hero-links button:focus-visible { color: var(--accent); }
.hero-links button::before { content: "\25CE"; margin-right: .4rem; }

.now-panel { align-self: center; display: flex; flex-direction: column; border-top: 1px solid var(--line-strong); }
.now-block { padding: 1.1rem 0 1.2rem; border-bottom: 1px solid var(--line); }
.now-block p { margin: .6rem 0 0; color: var(--text-2); font-size: .93rem; line-height: 1.55; }
.now-block a { color: var(--paper); text-decoration-color: var(--accent); text-underline-offset: .22em; }

/* the three big doors */
.home-index { border-top: 1px solid var(--line-strong); display: grid; grid-template-columns: repeat(3, 1fr); }
.index-link {
  min-height: 112px; padding: 1.2rem 1rem 1.1rem 0;
  display: grid; grid-template-columns: 2.3rem 1fr; grid-template-rows: auto auto;
  column-gap: .9rem; align-content: center;
  color: var(--paper); text-decoration: none; border-right: 1px solid var(--line);
  transition: background .35s ease, padding .35s var(--ease);
}
.index-link:nth-child(n+2) { padding-left: 1.3rem; }
.index-link:last-child { border-right: 0; }
.index-link span { grid-row: 1 / 3; align-self: start; padding-top: .25rem; color: var(--muted); font-family: var(--mono); font-size: .72rem; }
.index-link strong { font-size: 1rem; font-weight: 500; }
.index-link em { color: var(--text-3); font-size: .8rem; font-style: normal; }
.index-link:hover, .index-link:focus-visible { background: rgba(255, 255, 255, .035); padding-right: .6rem; }
.index-link:hover span, .index-link:focus-visible span { color: var(--accent); }
.outside-link:hover, .outside-link:focus-visible { background: var(--accent-soft); }

/* ====================== INTERIOR PAGES ====================== */

.site-main { padding-top: clamp(3.5rem, 7vw, 6rem); padding-bottom: clamp(4rem, 8vw, 7rem); }

.page-heading { padding-bottom: clamp(2.2rem, 4.5vw, 3.5rem); }
.page-heading h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(3.6rem, 9vw, 7.6rem); line-height: .85; letter-spacing: -.04em; }
.page-heading h1 span { color: var(--accent); }

/* ========================= PROJECTS ========================= */

.project-filters {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  padding: .8rem 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(14, 14, 13, .82));
  -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
  border-top: 1px solid rgba(255, 255, 255, .11); border-bottom: 1px solid rgba(255, 255, 255, .07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.project-filters button {
  padding: .45rem .8rem; color: var(--text-3); background: none;
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .04em; cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.project-filters button:hover, .project-filters button:focus-visible { color: var(--paper); border-color: var(--line-strong); }
.project-filters button[aria-pressed="true"] { color: var(--ink); background: var(--accent); border-color: var(--accent); }
.project-filters button b { font-weight: 400; opacity: .55; }
.filter-count { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: .68rem; letter-spacing: .05em; }

.project-catalog { border-top: 0; }
.case-study {
  position: relative; min-height: 300px;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(275px, .92fr);
  border-bottom: 1px solid var(--line-strong); scroll-margin-top: 68px;
  transition: background .4s ease;
}
.case-study[hidden] { display: none; }
/* Hover lifts the row's own type rather than drawing a rule down the
   edge. The old bar ran the full 300px and, on flipped rows, landed on
   the image panel instead of the words. */
@media (hover: hover) and (pointer: fine) {
  .case-study:hover { background: rgba(255, 255, 255, .022); }
  .case-study:hover .case-topline { color: var(--text-2); }
  .case-study:hover h2 { transform: translateX(5px); }
  .case-study:hover .case-links a { color: var(--accent); }
}

.case-copy {
  padding: clamp(1.8rem, 3.2vw, 2.8rem) clamp(0rem, 3vw, 2.8rem) clamp(1.8rem, 3.2vw, 2.8rem) 0;
  display: flex; flex-direction: column; align-items: flex-start;
}
.case-topline {
  width: 100%; margin: 0; transition: color .3s ease;
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  color: var(--text-3); font-family: var(--mono); font-size: .7rem;
  letter-spacing: .09em; text-transform: uppercase;
}
.case-topline span:first-child { color: var(--accent); }
.case-copy h2 {
  margin: clamp(1.6rem, 3.5vw, 2.6rem) 0 .9rem;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.3rem, 4.2vw, 4rem); line-height: .95; letter-spacing: -.035em;
  transition: transform .45s var(--ease);
}
.case-copy > p { max-width: 56ch; margin: 0 0 1.1rem; color: var(--text-2); font-size: .95rem; line-height: 1.65; }
/* metrics and stack share one wrapping row, so each card is a row shorter */
.case-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .85rem;
  margin: .3rem 0 1.1rem !important; max-width: none !important;
}
.case-meta strong {
  color: var(--paper); font-family: var(--mono); font-size: .68rem; font-weight: 400;
  letter-spacing: .05em; text-transform: uppercase;
}
.case-meta span {
  padding: .22rem .55rem; color: var(--text-3);
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--mono); font-size: .64rem;
}
.case-links { margin: auto 0 0 !important; }
.case-links a { color: var(--paper); font-size: .84rem; text-decoration-color: var(--accent); text-underline-offset: .26em; transition: color .2s ease; }
.case-links a:hover, .case-links a:focus-visible { color: var(--accent); }

.case-visual {
  position: relative; min-height: 300px; padding: clamp(1.3rem, 2.6vw, 2.1rem);
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  background: radial-gradient(circle at 78% 18%, rgba(209, 154, 97, .12), transparent 40%), var(--ink-3);
  border-left: 1px solid var(--line);
}
.visual-label { color: var(--text-3); font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; }
.case-study.is-flipped .case-copy { grid-column: 2; grid-row: 1; padding-left: clamp(1.8rem, 3.5vw, 3.2rem); padding-right: 0; }
.case-study.is-flipped .case-visual { grid-column: 1; grid-row: 1; border-left: 0; border-right: 1px solid var(--line); }

.amdahl-visual { background: radial-gradient(circle at 20% 80%, rgba(209, 154, 97, .11), transparent 42%), var(--ink-3); }
.auxo-visual { background: radial-gradient(circle at 20% 80%, rgba(209, 154, 97, .1), transparent 40%), #161615; }
.radius-visual { background: radial-gradient(circle at 75% 20%, rgba(90, 160, 110, .1), transparent 42%), #151515; }
.think-visual { background: radial-gradient(circle at 25% 20%, rgba(209, 154, 97, .1), transparent 40%), var(--ink-3); }
.gnn-visual { background: radial-gradient(circle at 70% 75%, rgba(209, 154, 97, .13), transparent 38%), #151515; }
.clarity-visual { background: radial-gradient(circle at 20% 80%, rgba(209, 154, 97, .1), transparent 40%), var(--ink-3); }
.stock-visual, .quant-visual { background: linear-gradient(145deg, var(--ink-3), #111); }

/* --- hand-built project visuals --- */
.flow { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: .7rem; }
.flow strong { min-height: 70px; padding: .85rem; display: grid; place-items: center; border: 1px solid rgba(238, 236, 231, .2); font-size: .78rem; font-weight: 400; text-align: center; }
.flow i { color: var(--accent); font-style: normal; }

.waveform { height: 72px; display: flex; align-items: center; justify-content: center; gap: clamp(.35rem, 1.1vw, .8rem); }
.waveform i { width: 4px; height: 25%; background: rgba(209, 154, 97, .72); animation: wave 1.8s ease-in-out infinite alternate; }
.waveform i:nth-child(2n) { height: 68%; animation-delay: -.4s; }
.waveform i:nth-child(3n) { height: 92%; animation-delay: -.8s; }
@keyframes wave { to { transform: scaleY(.45); } }

.pipeline-visual { min-height: 210px; display: grid; grid-template-columns: .72fr 1fr 1.1fr; align-items: center; gap: clamp(.7rem, 2vw, 1.5rem); }
.source-stack { position: relative; height: 108px; display: grid; place-items: center; }
.source-stack i { position: absolute; width: 74px; height: 94px; border: 1px solid rgba(238, 236, 231, .25); background: #1e1e1c; transform: translate(calc(var(--n, 0) * 7px), calc(var(--n, 0) * -6px)) rotate(calc(var(--n, 0) * 2deg)); }
.source-stack i:nth-child(1) { --n: -1; }
.source-stack i:nth-child(2) { --n: 0; }
.source-stack i:nth-child(3) { --n: 1; }
.source-stack i::after { content: ""; position: absolute; left: 13px; right: 13px; top: 22px; height: 1px; background: #777; box-shadow: 0 13px #555, 0 26px #555, 0 39px #444; }
.source-stack span { position: absolute; bottom: -12px; color: var(--text-3); font-family: var(--mono); font-size: .64rem; letter-spacing: .07em; text-transform: uppercase; }
.pipeline-track { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; color: var(--text-3); font-family: var(--mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .09em; }
.pipeline-track i { height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }
.pipeline-track i:last-child { background: linear-gradient(90deg, var(--accent), transparent); }
.pipeline-track b { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(209, 154, 97, .42); border-radius: 50%; font-weight: 400; }
.search-result { padding: 1rem; background: #211f1a; border: 1px solid rgba(209, 154, 97, .38); box-shadow: 14px 18px 0 rgba(0, 0, 0, .18); transform: rotate(1deg); }
.search-result > span { color: var(--muted); font-family: var(--mono); font-size: .56rem; letter-spacing: .14em; }
.search-result strong { display: block; margin: .8rem 0 1.2rem; font-size: .86rem; font-weight: 400; }
.search-result p { margin: 0 0 .8rem; }
.search-result p i { display: block; width: 100%; height: 3px; margin: .42rem 0; background: #5f5a50; }
.search-result p i:nth-child(2) { width: 78%; background: var(--accent); }
.search-result small { color: var(--text-3); font-family: var(--mono); font-size: .6rem; }

.agent-map { position: relative; min-height: 225px; }
.agent-map svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.agent-map path { fill: none; stroke: rgba(209, 154, 97, .38); stroke-width: 1; stroke-dasharray: 5 7; }
.agent-core, .agent-node { position: absolute; z-index: 2; display: grid; place-items: center; border: 1px solid rgba(238, 236, 231, .22); background: var(--ink-3); }
.agent-core { left: 50%; top: 50%; width: 112px; height: 112px; margin: -56px; border-color: rgba(209, 154, 97, .7); border-radius: 50%; box-shadow: 0 0 50px rgba(209, 154, 97, .12); }
.agent-core b { font-family: var(--mono); font-size: .74rem; font-weight: 400; letter-spacing: .15em; }
.agent-core small { color: var(--accent); font-family: var(--mono); font-size: .58rem; }
.agent-node { min-width: 72px; padding: .65rem .75rem; color: var(--text-3); font-family: var(--mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .09em; }
.node-task { left: 2%; top: 5%; } .node-code { right: 1%; top: 7%; } .node-tools { left: 1%; bottom: 5%; }
.node-memory { right: 0; bottom: 5%; color: var(--paper); border-color: rgba(209, 154, 97, .45); }

.browser-check, .risk-console, .people-match, .chat-window, .stock-card, .signal-board { position: relative; min-height: 205px; margin-top: 1rem; }
.browser-check { padding: 0 1.1rem 1.1rem; background: #211f1a; border: 1px solid rgba(209, 154, 97, .32); box-shadow: 14px 16px 0 rgba(0, 0, 0, .27); transform: rotate(-1deg); }
.browser-bar { height: 42px; margin: 0 -1.1rem 1.4rem; padding: 0 .8rem; display: flex; align-items: center; gap: .4rem; border-bottom: 1px solid #4d493f; }
.browser-bar i { width: 7px; height: 7px; border-radius: 50%; background: #aaa; }
.browser-bar i:first-child { background: var(--accent); }
.browser-bar span { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: .62rem; }
.decision-row { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: .45rem; align-items: center; }
.decision-row span, .decision-row strong { padding: .85rem .45rem; border: 1px solid #59554b; font-family: var(--mono); font-size: .65rem; font-weight: 400; text-align: center; letter-spacing: .07em; }
.decision-row strong { color: var(--good); border-color: #426a4c; background: #18251b; }
.decision-row b { color: var(--accent); font-weight: 400; }
.browser-check > small { position: absolute; left: 1.1rem; bottom: 1.1rem; color: var(--text-3); font-family: var(--mono); font-size: .62rem; }

.risk-console { display: grid; grid-template-columns: .85fr 1.15fr; gap: 1rem; align-items: stretch; }
.risk-console > div { padding: 1.3rem; display: flex; flex-direction: column; justify-content: center; border: 1px solid rgba(209, 154, 97, .45); background: #111; }
.risk-console small { color: var(--text-3); font-family: var(--mono); letter-spacing: .11em; font-size: .62rem; }
.risk-console strong { font-family: var(--serif); font-size: clamp(3.4rem, 6vw, 5.6rem); line-height: 1.05; color: var(--paper); font-weight: 400; }
.risk-console > div span { width: max-content; padding: .25rem .45rem; color: var(--good); border: 1px solid #426a4c; font-family: var(--mono); font-size: .58rem; letter-spacing: .11em; }
.risk-console ul { margin: 0; padding: 1.2rem; display: grid; align-content: center; gap: 1.1rem; list-style: none; border: 1px solid var(--line); }
.risk-console li { display: flex; align-items: center; gap: .7rem; color: var(--text-2); font-size: .74rem; }
.risk-console li b { width: 8px; height: 8px; border-radius: 50%; background: #7eb28a; box-shadow: 0 0 12px #6a9; }

.people-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .8rem; }
.person-card { min-height: 150px; padding: 1rem; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; border: 1px solid var(--line-strong); background: linear-gradient(145deg, #232321, #141413); }
.person-card i { width: 48px; height: 48px; margin-bottom: auto; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: var(--accent); font-family: var(--mono); font-style: normal; font-size: .7rem; }
.person-card b { font-size: .88rem; font-weight: 500; }
.person-card small { color: var(--text-3); font-family: var(--mono); font-size: .68rem; }
.match-line { padding: .45rem; color: var(--accent); font-family: var(--mono); font-size: .56rem; letter-spacing: .09em; writing-mode: vertical-rl; }

.graph-field { position: relative; min-height: 220px; }
.graph-field svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.graph-field path { fill: none; stroke: rgba(238, 236, 231, .2); stroke-width: 1.2; }
.graph-field i { position: absolute; width: 15px; height: 15px; margin: -7px; border-radius: 50%; background: #aaa; border: 4px solid #272725; }
.graph-field .g1 { left: 14%; top: 27%; } .graph-field .g2 { left: 36%; top: 19%; } .graph-field .g3 { left: 51%; top: 50%; }
.graph-field .g4 { left: 79%; top: 23%; } .graph-field .g5 { left: 70%; top: 82%; } .graph-field .g6 { left: 21%; top: 79%; } .graph-field .g7 { left: 91%; top: 60%; }
.graph-field .alert { width: 27px; height: 27px; margin: -13px; background: var(--accent); border-color: #4e3623; box-shadow: 0 0 0 10px rgba(209, 154, 97, .08), 0 0 35px rgba(209, 154, 97, .35); }

.chat-window { padding: 0 1rem 1rem; background: #201f1b; border: 1px solid #4c493f; box-shadow: 12px 16px 0 rgba(0, 0, 0, .22); }
.chat-window > div { height: 44px; margin: 0 -1rem 1.1rem; padding: 0 1rem; display: flex; align-items: center; gap: .6rem; border-bottom: 1px solid #4c493f; font-family: var(--mono); font-size: .66rem; }
.chat-window > div i { width: 8px; height: 8px; border-radius: 50%; background: #5eaa78; }
.bubble { width: max-content; max-width: 78%; margin: .8rem 0; padding: .75rem .9rem; border-radius: 14px; font-size: .74rem; }
.bubble.left { background: #34322c; }
.bubble.right { margin-left: auto; color: #fff; background: #7d5837; }
.chat-window > small { position: absolute; left: 1rem; bottom: 1rem; color: var(--text-3); font-family: var(--mono); font-size: .62rem; }

.stock-card { padding: 1.2rem; border: 1px solid var(--line-strong); background: #121211; }
.stock-card > div { display: flex; justify-content: space-between; align-items: end; }
.stock-card > div span { font-family: var(--mono); font-size: 2.4rem; letter-spacing: .06em; }
.stock-card > div strong { color: #7cb58b; font-family: var(--mono); font-weight: 400; }
.stock-card svg { width: 100%; height: 120px; margin-top: .5rem; }
.stock-card path { fill: none; stroke: var(--accent); stroke-width: 3; }
.stock-card p { margin: 0; display: flex; gap: .5rem; }
.stock-card p b { padding: .35rem .5rem; color: var(--text-3); border: 1px solid var(--line); font-family: var(--mono); font-size: .56rem; font-weight: 400; letter-spacing: .09em; }

.signal-board { display: grid; grid-template-rows: auto 1fr; gap: 1rem; padding: 1.2rem; border: 1px solid var(--line-strong); background: #121211; }
.signal-board header { display: flex; justify-content: space-between; align-items: baseline; color: var(--text-3); font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; }
.signal-board header b { color: var(--good); font-weight: 400; }
.signal-rows { display: grid; align-content: center; gap: .75rem; }
.signal-rows div { display: grid; grid-template-columns: 4.5rem 1fr 2.6rem; align-items: center; gap: .7rem; color: var(--text-2); font-family: var(--mono); font-size: .66rem; }
.signal-rows i { height: 5px; background: #2d2b26; }
.signal-rows i::after { content: ""; display: block; height: 100%; width: var(--w, 50%); background: var(--accent); }
.signal-rows div:nth-child(2) i::after { background: #7cb58b; }
.signal-rows b { color: var(--paper); font-weight: 400; text-align: right; }

/* ======================== EXPERIENCE ======================== */

.timeline { border-top: 1px solid var(--line-strong); }
.role-row { min-height: 230px; display: grid; grid-template-columns: .42fr 1.25fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); padding: 2.4rem 0; border-bottom: 1px solid var(--line); transition: background .3s ease, padding .3s ease; }
.role-row:hover { padding-inline: 1rem; background: rgba(255, 255, 255, .022); }
.role-year { color: var(--accent); font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; }
.role-main h2 { margin: -.3rem 0 .3rem; font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 3.2vw, 3rem); line-height: 1; letter-spacing: -.03em; }
.role-title { margin: 0 0 1.3rem !important; color: var(--text-3) !important; font-family: var(--mono); font-size: .72rem !important; text-transform: uppercase; letter-spacing: .07em !important; }
.role-main p { max-width: 52ch; margin: 0; color: var(--text-2); font-size: .98rem; line-height: 1.65; }
.role-row ul { margin: 0; padding: 0; list-style: none; color: var(--text-3); font-size: .84rem; }
.role-row li { position: relative; padding: 0 0 .8rem 1.15rem; }
.role-row li::before { content: "\2192"; position: absolute; left: 0; color: #55534e; }
.role-row .role-highlight { margin-bottom: .8rem; color: var(--paper); font-size: clamp(1rem, 1.5vw, 1.18rem); line-height: 1.4; letter-spacing: -.01em; }
.role-row .role-highlight::before { color: var(--accent); }

/* ======================== FLIGHT INTRO ======================== */

.flight-intro {
  position: fixed; inset: 0; z-index: 600; overflow: hidden; color: var(--paper);
  background: radial-gradient(circle at 50% 45%, #23211d 0, #11110f 40%, #060606 100%);
  opacity: 1; transition: opacity .6s ease, filter .6s ease; isolation: isolate;
}
.flight-intro.is-leaving { opacity: 0; filter: blur(5px); pointer-events: none; }
.flight-intro[hidden], .flight-seen .flight-intro { display: none; }
.flight-sky { position: absolute; inset: 0; }
.flight-route { position: absolute; inset: 7% 4% 2%; width: 92%; height: 88%; overflow: visible; opacity: .68; }
.flight-route > .infinity-shadow { fill: none; stroke: rgba(238, 236, 231, .055); stroke-width: 18; }
.flight-route > #flight-path {
  fill: none; stroke: rgba(219, 176, 121, .58); stroke-width: 1.4; stroke-linecap: round;
  stroke-dasharray: 10 11; stroke-dashoffset: 680; animation: flightTrail 4.2s linear .15s infinite;
}
.flight-plane { fill: #eee9df; filter: drop-shadow(0 0 12px rgba(224, 181, 125, .8)); }
.flight-horizon {
  position: absolute; left: -8%; right: -8%; bottom: -67vw; height: 82vw; border-radius: 50% 50% 0 0;
  border-top: 1px solid rgba(226, 185, 131, .32);
  background: radial-gradient(circle at 50% 0, rgba(54, 51, 44, .85), #0c0c0b 48%, #050505 70%);
  box-shadow: 0 -22px 80px rgba(207, 155, 96, .08);
}
.flight-horizon::before, .flight-horizon::after {
  content: ""; position: absolute; left: 10%; right: 10%; top: 5%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 185, 131, .16), transparent);
}
.flight-horizon::after { top: 9%; left: 24%; right: 24%; opacity: .55; }
.flight-copy { position: absolute; z-index: 2; left: 50%; top: 49%; width: min(1120px, 84vw); transform: translate(-50%, -50%); text-align: center; }
.flight-copy blockquote { margin: 0; font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 4.8rem); line-height: 1.04; letter-spacing: -.025em; font-weight: 400; }
.flight-copy blockquote span {
  display: block; opacity: 0; transform: translateY(20px); filter: blur(6px);
  animation: finiteReveal .95s var(--ease) .4s forwards;
}
.flight-credit { margin: 1.4rem auto 0; display: flex; width: max-content; max-width: 100%; align-items: center; gap: .7rem; color: var(--text-3); font-family: var(--mono); font-size: .66rem; letter-spacing: .11em; text-transform: uppercase; opacity: 0; animation: finiteReveal .7s ease 1.6s forwards; }
.flight-credit i { width: 34px; height: 1px; background: rgba(219, 176, 121, .6); }
.flight-credit a { color: inherit; text-decoration: none; }
.flight-credit a:hover, .flight-credit a:focus-visible { color: var(--paper); }
/* the answer to the quote above it, so it reads as a reply rather than
   as a caption: italic, a beat later, its own attribution */
.flight-answer { margin: 2.2rem 0 0; opacity: 0; animation: finiteReveal .75s ease 2.3s forwards; }
.flight-answer span {
  display: block; color: #d8a76d; font-family: var(--serif);
  font-size: clamp(1.5rem, 3.4vw, 3.6rem); line-height: 1.1; letter-spacing: -.02em;
}
.flight-answer cite {
  display: block; margin-top: .9rem; color: var(--text-3); font-family: var(--mono);
  font-style: normal; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
}
.flight-skip {
  position: absolute; z-index: 3; right: var(--pad); top: 2rem;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .6rem .9rem; color: var(--text-2); border-radius: 999px;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.flight-skip:hover, .flight-skip:focus-visible { color: var(--paper); }
.flight-skip em { font-style: normal; opacity: .55; }
.flight-progress { position: absolute; z-index: 3; left: var(--pad); right: var(--pad); bottom: 1.6rem; height: 1px; background: rgba(238, 236, 231, .12); }
.flight-progress i { display: block; height: 100%; width: 0; background: var(--accent); animation: flightProgress 5s linear forwards; }
.flight-star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #dcb47f; box-shadow: 0 0 12px rgba(220, 180, 127, .7); animation: flightTwinkle 1.6s ease-in-out infinite alternate; }
.flight-star-one { left: 13%; top: 18%; }
.flight-star-two { left: 56%; top: 12%; animation-delay: -.4s; }
.flight-star-three { right: 18%; top: 38%; animation-delay: -.8s; }
.flight-star-four { left: 41%; top: 68%; animation-delay: -1.1s; }
@keyframes flightTrail { to { stroke-dashoffset: 0; } }
@keyframes flightTwinkle { to { opacity: .25; transform: scale(.55); } }
@keyframes finiteReveal { to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes flightProgress { to { width: 100%; } }

/* ======================== GLOBE INTRO ======================== */

.site-shell { transition: opacity .55s ease .08s, transform .65s var(--ease) .08s; }

/* Coming back to / after you have entered once should not replay the gate.
   Keyed off <html> so there is no flash before the scripts run. */
.site-entered .flight-intro, .site-entered .globe-intro { display: none !important; }
.site-entered .globe-pending { overflow: visible; }
.site-entered .globe-pending .site-shell { opacity: 1; transform: none; pointer-events: auto; }

.globe-pending { overflow: hidden; }
.globe-pending .site-shell { opacity: 0; transform: translateY(10px); pointer-events: none; }
.globe-finished .site-shell { opacity: 1; transform: none; }
.globe-intro {
  position: fixed; inset: 0; z-index: 500; overflow: hidden; color: var(--paper);
  background: radial-gradient(circle at 54% 48%, #1c1b18 0, #10100f 42%, #080808 100%);
  transition: opacity .5s ease, transform .6s cubic-bezier(.7, 0, .3, 1), filter .5s ease;
}
.flight-pending .globe-intro { opacity: 0; transform: scale(.965); pointer-events: none; }
.flight-seen .flight-pending .globe-intro { opacity: 1; transform: none; pointer-events: auto; }
.globe-intro.is-leaving { opacity: 0; transform: scale(1.07); filter: blur(8px); pointer-events: none; }
.globe-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; clip-path: inset(0 0 0 40%); transition: filter .45s ease, clip-path .5s ease; }
.globe-canvas:active { cursor: grabbing; }
.globe-canvas.is-over-place { cursor: zoom-in; }
.globe-intro.is-zoomed .globe-canvas { cursor: zoom-out; filter: brightness(.82) saturate(.78); }
.globe-grain {
  position: absolute; inset: -50%; pointer-events: none; opacity: .13; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
  animation: grain 1.5s steps(2) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(2%, -1%); } 50% { transform: translate(-1%, 2%); } 75% { transform: translate(1%, 1%); } }
/* these sit over the canvas, so let drags pass straight through them */
.globe-topline { position: absolute; z-index: 2; top: 1.75rem; left: var(--pad); right: var(--pad); display: flex; justify-content: flex-end; color: var(--text-3); font-family: var(--mono); font-size: .68rem; letter-spacing: .11em; pointer-events: none; }
.globe-clock { display: inline-flex; align-items: center; gap: .6rem; padding: .5rem .85rem; border-radius: 999px; }
.globe-copy { position: absolute; z-index: 2; left: var(--pad); top: 14%; width: min(460px, 36vw); pointer-events: none; }
.globe-kicker { margin: 0 0 1.2rem; color: var(--text-3); font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.globe-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(2.7rem, 5.4vw, 5.8rem); line-height: .9; letter-spacing: -.035em; }
.globe-title em { color: var(--accent); font-style: italic; }
.globe-intro-note { max-width: 430px; margin: 1.3rem 0 0; color: var(--text-3); font-size: clamp(.84rem, 1.2vw, 1rem); line-height: 1.6; }
.globe-locations { position: relative; z-index: 2; width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); margin: 1.35rem 0 0; padding: 0; list-style: none; border-top: 1px solid rgba(238, 236, 231, .2); }
.globe-locations li { display: block; color: var(--muted); border-bottom: 1px solid rgba(238, 236, 231, .1); transition: color .45s ease, transform .45s ease; }
.globe-locations li + li { border-left: 1px solid rgba(238, 236, 231, .1); }
.globe-locations button {
  width: 100%; padding: .85rem .8rem .85rem 0; display: block;
  color: inherit; background: none; border: 0; text-align: left; cursor: pointer;
  pointer-events: auto;
  transition: color .25s ease;
}
.globe-locations li + li button { padding-left: .8rem; }
.globe-locations button:hover, .globe-locations button:focus-visible { color: var(--paper); }
.globe-locations button:hover span, .globe-locations button:focus-visible span { color: var(--accent); }
.globe-locations span { display: block; margin-bottom: .4rem; color: var(--muted); font-family: var(--mono); font-size: .7rem; transition: color .25s ease; }
.globe-locations strong { font-size: .82rem; font-weight: 500; }
.globe-locations small { display: block; margin-top: .18rem; font-size: .72rem; line-height: 1.4; }
.globe-locations li.is-active { color: var(--paper); transform: translateY(-5px); }
.globe-locations li.is-active span { color: var(--accent); }
.globe-place-card {
  position: absolute; z-index: 5; right: clamp(1rem, 3vw, 3rem); top: 50%;
  width: min(540px, 40vw); height: min(64vh, 560px); overflow: hidden;
  background: #11110f; border: 0; box-shadow: 0 30px 90px rgba(0, 0, 0, .7);
  opacity: 0; transform: translateY(-46%) scale(.965); transition: opacity .35s ease, transform .6s var(--ease);
}
.globe-place-card::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(7, 7, 6, .62)); pointer-events: none; }
.globe-place-card.is-open { opacity: 1; transform: translateY(-50%) scale(1); }
.globe-place-card img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.82) contrast(1.06); }
.globe-place-card > div { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 1.5rem 1.5rem 1.3rem; display: grid; gap: .35rem; }
.place-card-kicker { color: var(--accent); font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.place-card-title { font-family: var(--serif); font-size: clamp(2rem, 4vw, 4rem); line-height: .95; font-weight: 400; letter-spacing: -.03em; }
.place-card-credit { width: max-content; max-width: 100%; color: var(--text-2); font-family: var(--mono); font-size: .68rem; line-height: 1.4; text-decoration: none; }
.place-card-credit:hover, .place-card-credit:focus-visible { color: var(--paper); text-decoration: underline; }
.place-card-close { position: absolute; z-index: 3; top: .8rem; left: .8rem; padding: .55rem .75rem; color: var(--paper); border-radius: 999px; font-family: var(--mono); font-size: .7rem; cursor: pointer; }
.globe-enter {
  position: absolute; z-index: 3; left: var(--pad); bottom: 2.2rem; width: min(460px, 36vw);
  padding: .95rem 1.2rem; display: flex; align-items: center; justify-content: space-between;
  color: var(--paper); border-radius: 999px;
  opacity: .55; transform: translateY(3px); cursor: pointer;
  transition: opacity .3s ease, transform .3s ease, color .2s ease;
}
.globe-enter.is-ready { opacity: 1; transform: none; }
.globe-enter span { font-family: var(--mono); font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; }
.globe-enter b { font-family: var(--mono); font-size: 1.1rem; font-weight: 400; transition: transform .3s var(--ease); }
.globe-enter:hover, .globe-enter:focus-visible { color: var(--accent); }
.globe-enter:hover b, .globe-enter:focus-visible b { transform: translateX(5px); }
.globe-orbit-note { position: absolute; z-index: 2; right: var(--pad); bottom: 2.9rem; padding: .5rem .85rem; border-radius: 999px; color: var(--text-3); font-family: var(--mono); font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; pointer-events: none; }
.globe-topline, .globe-copy, .globe-locations, .globe-enter, .globe-orbit-note { transition: opacity .35s ease, transform .5s var(--ease), filter .35s ease; }
.globe-intro.is-zoomed .globe-orbit-note { opacity: 0; }

/* ========================= RESPONSIVE ========================= */

/* on a real screen the home is exactly one viewport:
   header, hero, the three doors, footer */
@media (min-width: 901px) {
  .home-page .site-shell { min-height: 100svh; display: flex; flex-direction: column; }
  .home-page .home-main { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: clamp(2rem, 5vh, 4rem); }
  .home-page .hero-shell { flex: 1; align-content: center; padding-block: clamp(1.5rem, 4vh, 3rem); }
  .home-page .home-index { flex: none; }
}

@media (max-width: 900px) {
  .hero-shell { min-height: 0; grid-template-columns: 1fr; gap: 3rem; }
  .now-panel { display: grid; grid-template-columns: repeat(3, 1fr); }
  .now-block { padding-right: 1rem; border-top: 1px solid var(--line); }
  .now-block:not(:last-child) { border-right: 1px solid var(--line); }
  .now-block:not(:first-child) { padding-left: 1rem; }
  .case-study { grid-template-columns: 1fr; }
  .case-copy { padding-right: 0; }
  .case-visual { min-height: 230px; border-left: 0; border-top: 1px solid var(--line); }
  .case-study.is-flipped .case-copy { grid-column: 1; grid-row: 1; padding-left: 0; }
  .case-study.is-flipped .case-visual { grid-column: 1; grid-row: 2; border-right: 0; border-top: 1px solid var(--line); }
  .role-row { grid-template-columns: .3fr 1fr; }
  .role-row ul { grid-column: 2; }
}

@media (max-width: 650px) {
  .hero-intro h1 { font-size: clamp(3.4rem, 17vw, 5.6rem); }
  .hero-lede { font-size: 1.05rem; }
  .now-panel { grid-template-columns: 1fr; }
  .now-block:not(:last-child) { border-right: 0; }
  .now-block:not(:first-child) { padding-left: 0; }
  .home-index { grid-template-columns: 1fr; }
  .index-link, .index-link:nth-child(n+2) { min-height: 88px; padding-left: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .project-filters { gap: .4rem; padding: .7rem 0; }
  .project-filters button { padding: .45rem .7rem; font-size: .66rem; }
  .filter-count { width: 100%; margin-left: 0; }
  .case-study { min-height: 0; }
  .case-copy { min-height: 0; padding-block: 2rem 2.4rem; }
  .case-copy h2 { margin-top: 2.4rem; }
  .case-visual { min-height: 230px; }
  .flow { grid-template-columns: 1fr; gap: .4rem; }
  .flow strong { min-height: 50px; }
  .flow i { transform: rotate(90deg); justify-self: center; }
  .pipeline-visual { grid-template-columns: 1fr; gap: 1.3rem; }
  .pipeline-track { width: 80%; margin: auto; }
  .risk-console { grid-template-columns: 1fr 1fr; }
  .decision-row { gap: .25rem; }
  .role-row { grid-template-columns: 1fr; gap: 1.3rem; }
  .role-row ul { grid-column: 1; }
  .role-row:hover { padding-inline: 0; background: transparent; }
}

@media (max-width: 760px) {
  .flight-copy { top: 46%; width: calc(100vw - 2.4rem); }
  .flight-copy blockquote { font-size: clamp(2.1rem, 10vw, 4.2rem); line-height: 1.04; }
  .flight-credit { font-size: .58rem; letter-spacing: .07em; }
  .flight-answer { margin-top: 1.4rem; }
  .flight-answer span { font-size: clamp(1.3rem, 6.4vw, 2.1rem); }
  .flight-answer cite { margin-top: .6rem; font-size: .56rem; }
  .flight-skip { right: 1rem; top: 1.1rem; }
  .flight-horizon { bottom: -38vw; height: 80vw; }
  .flight-route { inset: 18% -28% 6%; width: 156%; height: 76%; }
  .globe-canvas { clip-path: inset(27% 0 14% 0); }
  .globe-intro.is-zoomed .globe-canvas { clip-path: inset(37% 0 12% 0); }
  .globe-copy { top: 11%; width: auto; right: var(--pad); }
  .globe-title { font-size: clamp(2.35rem, 11vw, 4.2rem); }
  .globe-kicker { margin-bottom: .8rem; }
  .globe-intro-note { max-width: 290px; margin-top: .9rem; font-size: .78rem; }
  .globe-locations { position: fixed; top: auto; right: var(--pad); bottom: 6.5rem; left: var(--pad); width: auto; margin: 0; }
  .globe-locations li { border-bottom: 0; }
  .globe-locations button { padding: .65rem .5rem .65rem 0; }
  .globe-enter { left: var(--pad); right: var(--pad); bottom: 1.3rem; width: auto; }
  .globe-orbit-note { display: none; }
  .globe-topline { top: 1.25rem; }
  .globe-place-card { top: auto; right: 1rem; bottom: 7.2rem; width: calc(100vw - 2rem); height: min(40vh, 330px); transform: translateY(14px) scale(.98); }
  .globe-place-card.is-open { transform: translateY(0) scale(1); }
  .globe-place-card > div { padding: 2rem 1rem 1rem; }
  .globe-intro.is-zoomed .globe-locations { opacity: 0; pointer-events: none; }
}

@media (max-height: 560px) {
  .flight-copy blockquote { font-size: clamp(1.4rem, 3.6vw, 2.2rem); }
  .flight-answer { margin-top: .9rem; }
  .flight-answer span { font-size: clamp(1.1rem, 2.8vw, 1.7rem); }
  .flight-answer cite { margin-top: .45rem; }
  .flight-credit { margin-top: .8rem; }
}

@media (max-width: 760px) and (max-height: 740px) {
  .globe-intro-note { display: none; }
  .globe-copy { top: 12%; }
  .globe-locations { bottom: 5.75rem; }
  .globe-enter { bottom: .9rem; }
}

@media (max-width: 760px) and (max-height: 500px) {
  .globe-canvas { clip-path: inset(0 0 0 45%); }
  .globe-copy { top: 9%; right: auto; width: 46%; }
  .globe-kicker { margin-bottom: .55rem; font-size: .64rem; }
  .globe-title { font-size: clamp(2.1rem, 5.6vw, 2.8rem); }
  .globe-locations { right: auto; bottom: 4.1rem; width: 42%; }
  .globe-locations button { padding-top: .45rem; padding-bottom: .45rem; }
  .globe-enter { bottom: .45rem; }
}

@media (max-height: 320px) {
  .globe-locations { display: none; }
  .globe-copy { top: 13%; }
  .globe-title { font-size: clamp(2rem, 5vw, 2.6rem); }
}

@media (min-width: 761px) and (max-height: 620px) {
  .globe-copy { top: 8%; }
  .globe-title { font-size: clamp(2.5rem, 5vw, 4.2rem); }
  .globe-intro-note { margin-top: .75rem; font-size: .78rem; }
  .globe-locations { margin-top: .8rem; }
  .globe-locations button { padding-top: .55rem; padding-bottom: .55rem; }
  .globe-enter { bottom: .8rem; }
}

@media (min-width: 761px) and (max-height: 480px) {
  .globe-intro-note { display: none; }
  .globe-locations { margin-top: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .flight-route > #flight-path, .flight-star, .flight-copy blockquote span, .flight-credit, .flight-answer { animation: none; opacity: 1; transform: none; filter: none; }
  .flight-progress { display: none; }
  .globe-grain, .hero-loop path { animation: none; }
  .globe-enter { opacity: 1; transform: none; }
}
