/* =====================================================================
   Home page
   ===================================================================== */

/* ---------- hero ---------- */
.hero { position: relative; height: 100svh; min-height: 640px; overflow: hidden; }
#km { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: crosshair; }
#km.grab { cursor: grab; } #km.grabbing { cursor: grabbing; }
.hero-copy { position: absolute; left: var(--pad); right: var(--pad); bottom: clamp(40px, 7vh, 72px); pointer-events: none; }
.hero-copy .eyebrow { margin-bottom: 18px; }
.hero h1 { font-size: clamp(56px, 14.5vw, 210px); line-height: .84; letter-spacing: -.055em; font-weight: 700; }
.hero h1 span { display: block; }
.hero .sub { margin-top: 24px; max-width: 600px; color: var(--fg2); font-size: clamp(16px, 1.55vw, 20px); line-height: 1.45; }
.hero .sub b { color: var(--fg); font-weight: 500; }
.hero .cta { display: flex; gap: 10px; margin-top: 26px; pointer-events: auto; flex-wrap: wrap; }

.panel { position: absolute; top: 78px; right: var(--pad); width: 262px; padding: 14px; border: 1px solid #ffffff14; border-radius: 14px;
         background: #0c0e11cc; backdrop-filter: blur(12px); font: 12px var(--mono); color: var(--dim); z-index: 5; }
.panel .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.panel b { color: var(--fg); font-weight: 600; }
.panel .title { color: var(--fg); font-weight: 600; }
.status { font-size: 11px; padding: 2px 8px; border-radius: 99px; border: 1px solid #ffffff22; white-space: nowrap; }
.status.done { color: var(--lime); border-color: #c6ff3d66; }
.stepper { display: flex; align-items: center; gap: 6px; }
.pbtn { background: #16191d; color: var(--fg); border: 1px solid #ffffff1c; border-radius: 8px; padding: 6px 9px; font: inherit; cursor: pointer; transition: border-color .15s; }
.pbtn:hover { border-color: var(--lime); }
.pbtn.on { background: var(--lime); color: #0b0c0e; border-color: var(--lime); }
.pbtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #ffffff1c; border-radius: 8px; overflow: hidden; margin-bottom: 10px; }
.seg button { background: none; border: 0; color: var(--dim); padding: 6px 0; font: inherit; cursor: pointer; }
.seg button.on { background: #ffffff14; color: var(--fg); }
#spark { width: 100%; height: 44px; display: block; }
#tip { margin-top: 8px; font-size: 11px; line-height: 1.5; }
.panel-toggle { display: none; }

/* ---------- stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: clamp(24px, 3vw, 40px) var(--pad); border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .n { font-size: clamp(36px, 4.4vw, 60px); font-weight: 700; letter-spacing: -.045em; color: var(--lime); line-height: 1; }
.stat .l { font: 12px/1.5 var(--mono); color: var(--dim); margin-top: 10px; }

/* ---------- work ---------- */
.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.w-hs { grid-column: span 7; } .w-pp { grid-column: span 5; } .w-bm { grid-column: span 7; } .w-cw { grid-column: span 5; }
.wcard { padding: clamp(22px, 2.4vw, 32px); display: flex; flex-direction: column; }
.wcard .top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.wcard h3 { font-size: clamp(28px, 2.8vw, 40px); letter-spacing: -.035em; line-height: 1; }
.wcard .tag { font: 12px var(--mono); color: var(--dim); margin: 8px 0 18px; }
.wcard p.blurb { color: var(--fg2); line-height: 1.5; font-size: 15px; margin-bottom: 18px; }
.wcard .more { margin-top: auto; padding-top: 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.wcard .more a { font: 13px var(--mono); color: var(--fg); text-decoration: none; }
.wcard .more a:hover { color: var(--lime); }
.wcard label { display: block; font: 12px var(--mono); color: var(--dim); margin: 12px 0 6px; }
.wcard input[type=range] { width: 100%; accent-color: var(--lime); }
.hs-out { margin-top: 20px; display: flex; gap: 22px; align-items: end; }
.hs-out .big { font-size: 64px; font-weight: 700; letter-spacing: -.04em; line-height: .9; }
.hs-out small { font: 12px var(--mono); color: var(--dim); }
.bar { height: 8px; border-radius: 99px; background: #1a1d21; overflow: hidden; margin: 8px 0; }
.bar i { display: block; height: 100%; background: var(--lime); transition: width .25s; }
.heat-wrap { display: grid; grid-template-columns: 18px 1fr; gap: 6px; }
.days { display: grid; grid-template-rows: repeat(7, 1fr); font: 10px var(--mono); color: var(--dim); align-items: center; }
#pp-heat { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; }
#pp-heat button { aspect-ratio: 1; border: 0; border-radius: 2px; cursor: pointer; padding: 0; transition: transform .1s; }
#pp-heat button:hover, #pp-heat button.sel, #pp-heat button:focus-visible { transform: scale(1.4); outline: 1.5px solid #fff; position: relative; z-index: 1; }
.hours { display: flex; justify-content: space-between; font: 10px var(--mono); color: var(--dim); margin: 6px 0 0 24px; }
.legend { display: flex; align-items: center; gap: 8px; font: 11px var(--mono); color: var(--dim); margin-top: 10px; }
.legend i { height: 6px; flex: 1; border-radius: 99px; background: linear-gradient(90deg, #c6ff3d, #ffd23c, #ff5a3c); }
.verdict { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg3); display: flex; gap: 14px; align-items: center; }
.verdict .pct { font: 700 34px var(--mono); letter-spacing: -.03em; min-width: 82px; }
.verdict .msg { font-size: 13px; color: var(--fg2); line-height: 1.4; }
.verdict .msg b { color: var(--fg); font-weight: 600; }
.illus { font: 11px var(--mono); color: var(--dim); }
.bm-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bm-figs img { width: 100%; border-radius: 10px; background: #fff; aspect-ratio: 4/3; object-fit: contain; padding: 6px; }
.courses { list-style: none; display: grid; gap: 0; }
.courses li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.courses li span { font: 12px var(--mono); color: var(--dim); text-align: right; }

/* ---------- experience ---------- */
.exp { display: grid; grid-template-columns: 1fr 380px; gap: clamp(24px, 4vw, 64px); align-items: start; }
.xlist { list-style: none; border-top: 1px solid var(--line); }
.xlist li { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.xlist .when { font: 12px/1.6 var(--mono); color: var(--dim); padding-top: 6px; }
.xlist h3 { font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -.03em; line-height: 1.1; }
.xlist h3 small { display: block; font: 13px var(--mono); color: var(--lime); letter-spacing: 0; margin-top: 6px; }
.xlist p { color: var(--fg2); line-height: 1.55; margin-top: 10px; font-size: 15px; }
.xlist li.now h3::after { content: "● now"; font: 11px var(--mono); color: var(--lime); border: 1px solid #c6ff3d55; border-radius: 99px; padding: 3px 8px; margin-left: 12px; vertical-align: middle; }
.side { position: sticky; top: 90px; }
.side .photo { border-radius: 20px; overflow: hidden; aspect-ratio: 3/4; }
.side .photo img { width: 100%; height: 100%; object-fit: cover; }
.side .box { margin-top: 14px; padding: 20px; }
.side h4 { font: 12px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.side .edu { font-size: 15px; line-height: 1.5; margin-bottom: 16px; }
.side .edu b { font-weight: 600; } .side .edu span { color: var(--dim); font: 12px var(--mono); display: block; }

/* ---------- journey: a route that fills in as you scroll ---------- */
.route { position: relative; max-width: 1040px; margin: 0 auto; }
.route .rail, .route .fill { position: absolute; left: 50%; top: 0; width: 2px; margin-left: -1px; }
.route .rail { bottom: 0; background: repeating-linear-gradient(to bottom, #ffffff26 0 6px, transparent 6px 14px); }
.route .fill { height: 0; background: var(--lime); box-shadow: 0 0 18px #c6ff3d88; }
.stop { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; padding: 34px 0; }
.stop .dot { position: absolute; left: 50%; top: 52px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--bg); border: 2px solid #ffffff55; transition: all .3s; }
.stop.lit .dot { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 0 6px #c6ff3d22; }
.stop .txt { padding-top: 34px; }
.stop:nth-child(odd) .txt { grid-column: 1; text-align: right; }
.stop:nth-child(odd) .pic { grid-column: 2; grid-row: 1; }
.stop:nth-child(even) .txt { grid-column: 2; }
.stop:nth-child(even) .pic { grid-column: 1; grid-row: 1; }
.stop .yr { font: 12px var(--mono); color: var(--lime); letter-spacing: .08em; }
.stop h3 { font-size: clamp(30px, 3.6vw, 52px); letter-spacing: -.04em; line-height: 1; margin: 8px 0 10px; }
.stop p { color: var(--fg2); line-height: 1.55; font-size: 15px; }
.stop .pic { border-radius: 16px; overflow: hidden; aspect-ratio: 4/3; background: var(--bg2); border: 1px solid var(--line); opacity: .35; filter: grayscale(1); transition: opacity .6s, filter .6s; }
.stop.lit .pic { opacity: 1; filter: none; }
.stop .pic img, .stop .pic video { width: 100%; height: 100%; object-fit: cover; }
.stop .pic.flags { display: grid; place-items: center; font-size: 84px; gap: 6px; grid-auto-flow: column; justify-content: center; }

/* ---------- life: bento ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 230px; gap: 12px; }
.tile { position: relative; border-radius: 18px; overflow: hidden; background: var(--bg2); border: 1px solid var(--line); }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.tile:hover img, .tile:hover video { transform: scale(1.05); }
.tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; background: linear-gradient(transparent, #000c); }
.tile .cap b { display: block; font-size: 20px; letter-spacing: -.02em; }
.tile .cap span { font: 11px var(--mono); color: var(--fg2); }
.tile.txt { padding: 22px; display: flex; flex-direction: column; justify-content: space-between; }
.tile.txt h3 { font-size: 26px; letter-spacing: -.03em; line-height: 1.05; }
.tile.txt p { color: var(--fg2); font-size: 14px; line-height: 1.5; }
.t-w2 { grid-column: span 2; } .t-h2 { grid-row: span 2; }
.statcard { background: linear-gradient(160deg, #11140c, #0d0f12 60%); }
.statcard .nums { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.statcard .nums div { font: 11px var(--mono); color: var(--dim); }
.statcard .nums b { display: block; font: 700 30px var(--sans); color: var(--lime); letter-spacing: -.03em; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .w-hs, .w-pp, .w-bm, .w-cw { grid-column: span 12; }
  .exp { grid-template-columns: 1fr; }
  .side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .side .box { margin-top: 0; }
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
}
@media (max-width: 820px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .hero-copy { bottom: 84px; }
  .hero .cta { display: none; }
  .panel { top: auto; bottom: 16px; right: 16px; left: auto; width: auto; padding: 0; background: none; border: 0; backdrop-filter: none; }
  .panel .body { display: none; }
  .panel.open { left: 16px; padding: 14px; background: #0c0e11f2; border: 1px solid #ffffff14; }
  .panel.open .body { display: block; }
  .panel-toggle { display: block; margin-left: auto; }
  .panel.open .panel-toggle { margin-bottom: 10px; }
  .xlist li { grid-template-columns: 1fr; gap: 6px; }
  .side { grid-template-columns: 1fr; }
  .route .rail, .route .fill { left: 7px; }
  .stop { grid-template-columns: 1fr; gap: 16px; padding: 24px 0 24px 36px; }
  .stop .dot { left: 7px; top: 30px; }
  .stop .txt, .stop:nth-child(odd) .txt, .stop:nth-child(even) .txt { grid-column: 1; grid-row: 1; text-align: left; padding-top: 0; }
  .stop .pic, .stop:nth-child(odd) .pic, .stop:nth-child(even) .pic { grid-column: 1; grid-row: 2; }
  .bento { grid-auto-rows: 170px; }
  /* small tiles: keep the caption to one short line so it doesn't cover the subject */
  .tile .cap { padding: 22px 10px 8px; }
  .tile .cap b { font-size: 15px; }
  .tile:not(.t-h2) .cap span { display: none; }
  .t-w2.m-1 { grid-column: span 1; }
}
