/* ==========================================================
   Irvan Abrori — personal site
   Layout concept: a climb. Every page opens at dawn over the
   East Java volcanoes; scrolling raises an altimeter toward
   Semeru's summit (3.676 mdpl).
   ========================================================== */

:root {
  /* Color */
  --bg: #F2F4F0;
  --bg-2: #E5EBE4;
  --fg: #10202E;
  --muted: #4A5B66;
  --line: rgba(16, 32, 46, .15);
  --accent: #C2431A;        /* ember */
  --accent-ink: #FFFFFF;
  --sulfur: #0A7B77;        /* Ijen lake */
  --night: #0B1622;
  --night-2: #14283A;
  --on-night: #EAF0EC;
  --on-night-muted: #A9BAC2;
  --dawn: #FF9A55;

  /* Type */
  --f-display: "Josefin Sans", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  --f-serif: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-ui: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(18px, 4.2vw, 60px);
  --max: 1260px;
  --hdr: 68px;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1622; --bg-2: #112334; --fg: #E9EFEA; --muted: #9DB0BA;
    --line: rgba(233, 239, 234, .16); --accent: #FF8A4C; --accent-ink: #0B1622;
    --sulfur: #3FD0C9; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1622; --bg-2: #112334; --fg: #E9EFEA; --muted: #9DB0BA;
  --line: rgba(233, 239, 234, .16); --accent: #FF8A4C; --accent-ink: #0B1622;
  --sulfur: #3FD0C9; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--f-ui); font-size: 1rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: .2em; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-display); font-weight: 400; line-height: 1.06; letter-spacing: .035em; text-wrap: balance; text-transform: uppercase; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--accent); }
.hero em, .phead em, .ftr em, .rute em, .path em, .reader-title em { color: var(--dawn); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .4s; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: .6rem 1rem; border-radius: 8px; transition: top .2s; }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.hdr {
  position: fixed; inset: 0 0 auto 0; height: var(--hdr); z-index: 50;
  display: flex; align-items: center; color: var(--on-night);
  transition: background .35s, backdrop-filter .35s, border-color .35s;
  border-bottom: 1px solid transparent;
}
.hdr.scrolled { background: color-mix(in srgb, var(--night) 93%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom-color: rgba(255,255,255,.08); }
.hdr .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { font-family: var(--f-display); font-weight: 400; font-size: 1.1rem; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; line-height: 1; display: inline-flex; align-items: baseline; gap: .4rem; }
.brand small { font-family: var(--f-ui); font-size: .72rem; font-weight: 500; letter-spacing: .02em; text-transform: none; opacity: .7; }
.nav { display: flex; align-items: center; gap: clamp(.9rem, 2.2vw, 2rem); }
.nav a { text-decoration: none; font-family: var(--f-display); font-weight: 400; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; position: relative; padding: .35rem 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--dawn); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.theme-btn, .menu-btn { appearance: none; background: transparent; border: 1px solid rgba(255,255,255,.28); color: inherit; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s; }
.theme-btn:hover, .menu-btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); }
.menu-btn { display: none; }
.lang-btn { text-decoration: none; background: transparent; border: 1px solid rgba(255,255,255,.28); color: inherit; height: 40px; min-width: 40px; padding: 0 .7rem; border-radius: 999px; display: inline-grid; place-items: center; font-family: var(--f-display); font-size: .78rem; letter-spacing: .1em; transition: background .2s, border-color .2s; }
.lang-btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); }
.theme-btn svg, .menu-btn svg { width: 18px; height: 18px; }
@media (max-width: 860px) {
  .menu-btn { display: grid; }
  .nav { position: fixed; inset: var(--hdr) 0 auto 0; flex-direction: column; align-items: flex-start; gap: 0; padding: .5rem var(--gutter) 1.4rem; background: var(--night); border-bottom: 1px solid rgba(255,255,255,.1); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
  .nav a { font-size: 1.05rem; letter-spacing: .08em; padding: .8rem 0; width: 100%; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav a::after { display: none; }
  .nav-open .nav { opacity: 1; transform: none; pointer-events: auto; }
  .hdr .controls { display: flex; gap: .5rem; }
  .brand small { display: none; }
}
.hdr .controls { display: flex; gap: .5rem; align-items: center; }
@media (min-width: 861px) { .hdr .nav { margin-left: auto; margin-right: 1.2rem; } }

/* ---------- Altimeter (signature element) ---------- */
.alt { position: fixed; right: max(14px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); z-index: 40; height: min(46vh, 380px); width: 78px; pointer-events: none; display: flex; justify-content: flex-end; }
.alt-rail { position: relative; width: 2px; height: 100%; background: rgba(128, 142, 154, .55); border-radius: 2px; margin-right: 2px; }
.alt-fill { position: absolute; left: 0; bottom: 0; width: 100%; height: 0; background: var(--accent); border-radius: 2px; }
.alt-dot { position: absolute; left: 50%; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); transform: translate(-50%, 50%); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.alt-tick { position: absolute; right: 12px; transform: translateY(50%); font-size: .68rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap; color: var(--muted); display: flex; align-items: center; gap: .35rem; background: color-mix(in srgb, var(--bg) 85%, transparent); padding: .08rem .2rem .08rem .5rem; border-radius: 999px; }
.alt-tick::after { content: ""; width: 8px; height: 1px; background: currentColor; }
.alt-tick.hit { color: var(--accent); }
.alt-read { position: absolute; right: 12px; top: -50px; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .65rem; font-weight: 700; font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.alt-read span { color: var(--muted); font-weight: 500; }
@media (max-width: 760px) {
  .alt { height: 0; width: auto; top: auto; bottom: max(14px, env(safe-area-inset-bottom, 0px)); right: max(14px, env(safe-area-inset-right, 0px)); transform: none; }
  .alt-rail, .alt-tick { display: none; }
  .alt-read { position: static; }
}

/* ---------- Hero (home) ---------- */
.hero { position: relative; min-height: min(100svh, 920px); background: var(--night); color: var(--on-night); overflow: hidden; isolation: isolate; }
.hero-sky { position: absolute; inset: 0; z-index: -3; background: linear-gradient(180deg, #08111B 0%, #11263A 46%, #3B3F52 70%, #C7714A 90%, #FF9A55 100%); }
.hero-glow { position: absolute; left: 50%; bottom: 18%; width: 140vmax; height: 70vmax; translate: -50% 50%; background: radial-gradient(closest-side, rgba(255,170,100,.55), rgba(255,140,80,.18) 45%, transparent 70%); z-index: -2; will-change: opacity, transform; }
.hero-stars { position: absolute; inset: 0 0 45% 0; z-index: -2; will-change: opacity; }
.hero-sun { position: absolute; left: 62%; bottom: 24%; width: clamp(70px, 9vw, 130px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #FFF3D1, #FFC57A 60%, #FF9A55); box-shadow: 0 0 80px 30px rgba(255,170,100,.5); z-index: -2; will-change: transform; }
.layer { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; z-index: -1; will-change: transform; pointer-events: none; }
.hero-in { position: relative; min-height: inherit; display: flex; flex-direction: column; justify-content: center; padding-block: calc(var(--hdr) + 5vh) 22vh; }
.hero h1 { font-size: clamp(2.1rem, 6.2vw, 5.4rem); line-height: 1.04; }
.hero h1 .line { display: block; }
.hero-sub { max-width: 34rem; margin-top: 1.6rem; font-family: var(--f-serif); font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.65; color: var(--on-night-muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.coords { position: absolute; left: var(--gutter); bottom: 5.6rem; font-size: .78rem; letter-spacing: .04em; color: var(--on-night-muted); font-variant-numeric: tabular-nums; }
.hero-fade { position: absolute; left: 0; right: 0; bottom: -1px; height: 18vh; background: linear-gradient(to bottom, transparent, var(--bg)); z-index: 0; pointer-events: none; opacity: 0; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .6rem; padding: .8rem 1.4rem; border-radius: 999px; font-weight: 400; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .25s var(--ease), background .2s, color .2s, border-color .2s; font-family: var(--f-display); }
.btn svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { border-color: currentColor; background: transparent; }
.btn-ghost:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.hero .btn-primary { background: var(--dawn); color: #1a0f08; }

/* ---------- Page head (inner pages) ---------- */
.phead { position: relative; background: var(--night); color: var(--on-night); overflow: hidden; isolation: isolate; padding: calc(var(--hdr) + clamp(3rem, 9vw, 6.5rem)) 0 clamp(5rem, 12vw, 9rem); }
.phead .hero-sky { background: linear-gradient(180deg, #08111B 0%, #10253A 55%, #3A4156 85%, #8C5D4B 100%); }
.phead h1 { font-size: clamp(2.2rem, 5.6vw, 4.6rem); line-height: 1.04; }
.phead p { max-width: 36rem; margin: 1.2rem 0 0; font-family: var(--f-serif); font-size: clamp(1rem, 1.4vw, 1.15rem); color: var(--on-night-muted); line-height: 1.5; }
.phead .layer { height: 70%; }

/* ---------- Sections ---------- */
.sec { padding-block: clamp(4.5rem, 10vw, 8.5rem); position: relative; }
.sec-tight { padding-block: clamp(3rem, 6vw, 5rem); }
.sec h2 { font-size: clamp(1.8rem, 4vw, 3.1rem); }
.lead { font-family: var(--f-serif); font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.65; color: var(--muted); max-width: 38rem; }
.kicker { font-size: .85rem; font-weight: 600; color: var(--accent); margin-bottom: .9rem; letter-spacing: .01em; }

/* Scroll-filled statement */
.statement { font-family: var(--f-serif); font-weight: 500; font-size: clamp(1.35rem, 2.9vw, 2.3rem); line-height: 1.32; letter-spacing: -.005em; max-width: 26em; text-wrap: pretty; }
.statement .wd { color: color-mix(in srgb, var(--fg) 24%, transparent); transition: color .35s; }
.statement .wd.on { color: var(--fg); }
.statement em { font-style: italic; }
.no-js .statement .wd, .reduce .statement .wd { color: var(--fg); }

/* ---------- Marquee ---------- */
.marq { overflow: hidden; border-block: 1px solid var(--line); padding: 1.1rem 0; background: var(--bg-2); }
.marq-in { display: flex; width: max-content; will-change: transform; }
.marq-in span { font-family: var(--f-display); font-weight: 400; letter-spacing: .06em; text-transform: uppercase; font-size: clamp(1.2rem, 3vw, 2.2rem); line-height: 1.1; padding-right: 1.6rem; display: inline-flex; align-items: center; gap: 1.6rem; white-space: nowrap; }
.marq-in span::after { content: ""; width: .5em; height: .5em; border: 2px solid var(--accent); border-radius: 50%; flex: none; }
.marq-in span:nth-child(3n) { color: transparent; -webkit-text-stroke: 1px var(--fg); }

/* ---------- Pinned horizontal route ---------- */
.rute { position: relative; background: var(--night); color: var(--on-night); }
.rute-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: center; }
.rute-track { display: flex; align-items: stretch; gap: clamp(14px, 2vw, 28px); padding-inline: var(--gutter); will-change: transform; height: min(74svh, 640px); }
.stop { position: relative; flex: none; width: min(80vw, 540px); border-radius: var(--radius); overflow: hidden; background: var(--night-2); }
.stop .scene { position: absolute; inset: 0; }
.stop .scene svg { width: 100%; height: 100%; }
.stop-cap { position: absolute; inset: auto 0 0 0; padding: 1.6rem 1.4rem 1.4rem; background: linear-gradient(to top, rgba(6,12,19,.88), rgba(6,12,19,0)); }
.stop-cap h3 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.stop-cap p { margin: .4rem 0 0; color: var(--on-night-muted); font-size: .98rem; max-width: 28rem; }
.stop-cap .where { font-size: .8rem; font-weight: 600; color: var(--dawn); margin-bottom: .3rem; }
.stop-intro { flex: none; width: min(78vw, 460px); display: flex; flex-direction: column; justify-content: center; padding-right: 1rem; }
.stop-intro h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
.stop-intro p { color: var(--on-night-muted); font-family: var(--f-serif); font-size: 1.05rem; margin-top: 1.2rem; line-height: 1.65; }
.stop-end { flex: none; width: min(60vw, 340px); display: flex; align-items: center; }
.rute:not(.pinned) .rute-pin { height: auto; overflow: visible; padding-block: 4rem; }
.rute:not(.pinned) .rute-track { overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 1rem; }
.rute:not(.pinned) .stop { scroll-snap-align: start; }
.rute-bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 5svh; height: 2px; background: rgba(255,255,255,.18); z-index: 2; }
.rute-bar i { display: block; height: 100%; background: var(--dawn); width: 0; }

/* ---------- Scenes ---------- */
.scene { position: relative; overflow: hidden; background: var(--night-2); }
.scene svg { width: 100%; height: 100%; display: block; }
.scene[data-photo] { background-size: cover; background-position: center; }
.scene[data-photo] svg { display: none; }

/* ---------- Cards / posts ---------- */
.grid-posts { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1rem, 2.4vw, 2rem); align-items: start; }
.post { display: flex; flex-direction: column; gap: 1rem; text-align: left; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; grid-column: span 4; }
.post .scene { aspect-ratio: 4 / 5; border-radius: var(--radius); }
.post:nth-child(3n+2) { margin-top: clamp(1rem, 6vw, 5rem); }
.post:nth-child(3n+2) .scene { aspect-ratio: 1 / 1; }
.post-feat { grid-column: 1 / -1; display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(1.2rem, 3vw, 3rem); align-items: end; margin-bottom: clamp(1rem, 4vw, 3rem); }
.post-feat .scene { aspect-ratio: 16 / 10; }
.post-feat h3 { font-size: clamp(1.9rem, 3.8vw, 3rem); }
.post-feat:nth-child(n) { margin-top: 0; }
.post h3 { font-size: clamp(1.25rem, 1.9vw, 1.6rem); transition: color .2s; }
.post:hover h3 { color: var(--accent); }
.post .scene svg { transition: transform .9s var(--ease); }
.post:hover .scene svg { transform: scale(1.06); }
.post .tag { font-size: .82rem; font-weight: 600; color: var(--sulfur); }
.post p { color: var(--muted); font-family: var(--f-serif); font-size: .98rem; line-height: 1.65; margin: 0; }
.post .more { font-weight: 600; font-size: .95rem; display: inline-flex; gap: .5rem; align-items: center; color: var(--fg); margin-top: .2rem; }
.post .more svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.post:hover .more svg { transform: translateX(5px); }
.post-meta { display: flex; gap: .8rem; align-items: baseline; font-size: .85rem; color: var(--muted); }
.post-body-hidden { display: none; }
@media (max-width: 900px) {
  .post { grid-column: span 6; }
  .post:nth-child(3n+2) { margin-top: 0; }
  .post-feat { grid-template-columns: 1fr; }
}
@media (max-width: 600px) { .post { grid-column: 1 / -1; } .post .scene, .post:nth-child(3n+2) .scene { aspect-ratio: 4 / 3; } }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: clamp(1.6rem, 4vw, 3rem); }
.chip { appearance: none; font: inherit; font-size: .92rem; font-weight: 600; padding: .5rem 1.05rem; border-radius: 999px; background: transparent; color: var(--fg); border: 1.5px solid var(--line); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.post.is-hidden { display: none; }

/* ---------- Reader dialog ---------- */
.reader { border: 0; padding: 0; width: min(980px, 100vw); max-width: 100vw; height: 100svh; max-height: 100svh; margin: 0 0 0 auto; background: var(--bg); color: var(--fg); overflow: hidden; }
.reader::backdrop { background: rgba(6, 12, 19, .66); backdrop-filter: blur(4px); }
.reader[open] { animation: slide-in .5s var(--ease); }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.reader-bar { position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 3; background: transparent; }
.reader-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.reader-close { position: absolute; top: 14px; right: 14px; z-index: 4; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(6,12,19,.55); color: #fff; cursor: pointer; display: grid; place-items: center; backdrop-filter: blur(6px); }
.reader-close:hover { background: rgba(6,12,19,.85); }
.reader-close svg { width: 18px; height: 18px; }
.reader-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.reader-hero { position: relative; height: min(56svh, 520px); }
.reader-hero .scene { position: absolute; inset: 0; }
.reader-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,12,19,.92), rgba(6,12,19,.1) 60%); }
.reader-title { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 0 clamp(20px, 5vw, 56px) 2rem; color: #fff; }
.reader-title h2 { font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.06; }
.reader-title .tag { font-size: .85rem; font-weight: 600; color: var(--dawn); margin-bottom: .6rem; }
.reader-text { padding: clamp(2rem, 5vw, 3.5rem) clamp(20px, 5vw, 56px) 5rem; max-width: 46rem; font-family: var(--f-serif); font-size: clamp(1.02rem, 1.3vw, 1.12rem); line-height: 1.8; }
.reader-text p { margin-bottom: 1.3em; }
.reader-text p:first-child::first-line { font-weight: 500; }
.reader-text p:first-child::first-letter { font-family: var(--f-display); font-weight: 400; float: left; font-size: 3.8em; line-height: .78; padding: .08em .1em 0 0; color: var(--accent); }
.reader-text blockquote { margin: 2rem 0; padding: 0 0 0 1.2rem; border-left: 3px solid var(--accent); font-size: 1.2em; line-height: 1.45; font-style: italic; }
.reader-foot { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2.4rem; font-family: var(--f-ui); }
body.lock { overflow: hidden; }

/* ---------- Itinerary stack ---------- */
.stack { display: grid; gap: 0; }
.itin { position: relative; margin-bottom: clamp(2rem, 6vw, 5rem); border-radius: 22px; overflow: hidden; display: grid; grid-template-columns: 1fr 1.05fr; min-height: min(62svh, 520px); background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 -18px 40px -24px rgba(6, 12, 19, .35); transform-origin: 50% 0; will-change: transform; }
.itin .scene { min-height: 280px; }
.itin .scene .route { position: absolute; inset: 0; width: 100%; height: 100%; }
.itin .scene .route path { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 6 9; opacity: .9; }
.itin .scene .route path.draw { stroke-dasharray: 1; stroke-dashoffset: 1; stroke: var(--dawn); stroke-width: 4; opacity: 1; }
.itin .scene .route circle { fill: #fff; stroke: var(--dawn); stroke-width: 3; }
.itin-body { padding: clamp(1.4rem, 3.2vw, 2.8rem); display: flex; flex-direction: column; gap: 1.1rem; }
.itin-body h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.itin-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; font-size: .92rem; color: var(--muted); }
.itin-meta b { color: var(--fg); font-weight: 700; }
.itin-body p.d { font-family: var(--f-serif); font-size: 1rem; color: var(--muted); margin: 0; line-height: 1.6; }
.sched { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.sched li { display: grid; grid-template-columns: 5.2rem 1fr; gap: 1rem; padding: .42rem 0; border-bottom: 1px solid var(--line); font-size: .98rem; }
.sched time { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
.itin-act { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: auto; padding-top: .6rem; }
.itin-act .btn-ghost { color: var(--fg); }
@media (min-width: 861px) and (min-height: 740px) { .itin { position: sticky; top: calc(var(--hdr) + var(--i) * 14px + 10px); } }
@media (max-width: 860px) { .itin { grid-template-columns: 1fr; } .itin .scene { min-height: 220px; aspect-ratio: 16/9; } }

.callout { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; padding: clamp(1.6rem, 4vw, 3rem); border-radius: 22px; background: var(--night); color: var(--on-night); position: relative; overflow: hidden; }
.callout h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.callout p { color: var(--on-night-muted); margin: .8rem 0 0; font-family: var(--f-serif); font-size: 1rem; max-width: 36rem; }
.callout .btn-primary { background: var(--dawn); color: #1a0f08; }
@media (max-width: 760px) { .callout { grid-template-columns: 1fr; } }

/* ---------- Projects ---------- */
.proj { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(1.4rem, 4vw, 4.5rem); align-items: center; padding-block: clamp(3rem, 7vw, 6rem); border-top: 1px solid var(--line); }
.proj:nth-of-type(even) { grid-template-columns: 7fr 5fr; }
.proj:nth-of-type(even) .proj-txt { order: 2; }
.proj-txt h3 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); margin-bottom: 1rem; }
.proj-txt p { color: var(--muted); font-family: var(--f-serif); font-size: 1rem; line-height: 1.65; }
.stackpills { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.2rem 0 1.6rem; padding: 0; list-style: none; }
.stackpills li { font-size: .82rem; font-weight: 600; padding: .3rem .75rem; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.proj-vis { perspective: 1400px; min-width: 0; }
.mock { border-radius: 16px; overflow: hidden; background: var(--night); color: var(--on-night); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 40px 80px -30px rgba(6,12,19,.55); transform: rotateX(var(--rx, 0deg)); transform-origin: 50% 100%; will-change: transform; }
.mock-bar { display: flex; align-items: center; gap: .4rem; padding: .7rem 1rem; background: rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.08); font-size: .75rem; color: var(--on-night-muted); }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.25); }
.mock-bar span { margin-left: .6rem; }
.mock-body { padding: 1.2rem; }

.m-builder { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.m-col h5 { margin: 0 0 .6rem; font-family: var(--f-display); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 400; color: var(--dawn); }
.m-item { padding: .55rem .7rem; border-radius: 8px; background: rgba(255,255,255,.07); font-size: .8rem; margin-bottom: .45rem; border-left: 3px solid var(--sulfur); transition: transform .3s var(--ease), background .2s; }
.m-item:hover { transform: translateX(4px); background: rgba(255,255,255,.12); }
.m-item small { display: block; color: var(--on-night-muted); font-size: .7rem; }
.m-actions { display: flex; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; }
.m-actions span { font-size: .78rem; font-weight: 600; padding: .45rem .9rem; border-radius: 999px; background: var(--dawn); color: #1a0f08; }
.m-actions span.alt2 { background: transparent; color: var(--on-night); border: 1px solid rgba(255,255,255,.3); }

.m-site { background: #122A22; }
.m-site .mock-body { padding: 0; }
.m-hero { padding: 2.2rem 1.6rem 1.6rem; background: linear-gradient(160deg, #122A22, #1b3d31); }
.m-hero em { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.05; display: block; color: #F1E9DD; }
.m-hero span.b { display: inline-block; margin-top: 1rem; padding: .5rem 1.1rem; border-radius: 999px; background: #A85A3B; color: #fff; font-size: .8rem; font-weight: 600; }
.m-sw { display: flex; }
.m-sw div { flex: 1; padding: .8rem 1rem; font-size: .72rem; font-weight: 600; }
.m-trips { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding: .8rem; background: #0d201a; }
.m-trips div { aspect-ratio: 3/4; border-radius: 8px; position: relative; overflow: hidden; }
.m-trips div i { position: absolute; inset: auto 0 0 0; padding: .4rem .5rem; font-size: .66rem; font-style: normal; font-weight: 600; background: linear-gradient(transparent, rgba(0,0,0,.7)); }

.m-hike { display: grid; gap: 1rem; }
.m-hike svg { width: 100%; height: auto; }
.board { border-radius: 10px; background: #060c13; padding: .3rem .8rem; font-variant-numeric: tabular-nums; }
.board div { display: grid; grid-template-columns: 1fr auto; padding: .5rem 0; border-bottom: 1px dashed rgba(255,255,255,.15); font-size: .82rem; font-weight: 600; letter-spacing: .02em; }
.board div:last-child { border: 0; }
.board b { color: #FFD08A; font-weight: 700; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-radius: 10px; background: rgba(255,255,255,.07); font-size: .85rem; }
.stepper div { display: flex; align-items: center; gap: .8rem; }
.stepper button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; font-size: 1.1rem; cursor: pointer; line-height: 1; }
.stepper button:hover { background: rgba(255,255,255,.15); }
.stepper output { min-width: 1.5ch; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.m-pdf { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: center; }
.pdf-page { background: #f6f3ec; color: #111; border-radius: 6px; padding: 1rem; aspect-ratio: 3/4; display: flex; flex-direction: column; gap: .5rem; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.pdf-page b { font-family: var(--f-display); font-size: 1.05rem; letter-spacing: .05em; text-transform: uppercase; line-height: 1.1; }
.pdf-page i { display: block; height: 6px; border-radius: 3px; background: #c9c3b4; }
.pdf-page i.s { width: 60%; } .pdf-page i.a { background: #d7592a; width: 35%; height: 8px; }
.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .72rem; line-height: 1.7; color: #BFD3DA; white-space: pre; overflow-x: auto; }
.code .k { color: #FF9A55; } .code .s { color: #7FE0D9; }
@media (max-width: 860px) {
  .proj, .proj:nth-of-type(even) { grid-template-columns: 1fr; }
  .proj:nth-of-type(even) .proj-txt { order: 0; }
  .m-builder { grid-template-columns: 1fr; }
  .m-pdf { grid-template-columns: 1fr; }
}

.stack-all { display: flex; flex-wrap: wrap; gap: .6rem; }
.stack-all span { font-family: var(--f-display); font-weight: 400; letter-spacing: .06em; text-transform: uppercase; font-size: clamp(.85rem, 1.3vw, 1.05rem); padding: .5rem 1.1rem; border: 1.5px solid var(--line); border-radius: 999px; line-height: 1.2; transition: background .2s, color .2s, border-color .2s; }
.stack-all span:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- CV ---------- */
.cv { display: grid; grid-template-columns: minmax(260px, 4fr) 8fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.cv-side { position: sticky; top: calc(var(--hdr) + 1.5rem); }
.cv-side h2 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); margin-bottom: .6rem; overflow-wrap: break-word; }
.cv-side .role { font-family: var(--f-serif); font-size: 1.02rem; color: var(--muted); line-height: 1.4; margin-bottom: 1.6rem; }
.cv-contact { list-style: none; padding: 0; margin: 0 0 1.8rem; display: grid; gap: .6rem; font-size: .98rem; }
.cv-contact li { display: grid; grid-template-columns: 6.2rem 1fr; gap: .6rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.cv-contact span { color: var(--muted); font-size: .85rem; padding-top: .12rem; }
.tl { position: relative; padding-left: clamp(1.6rem, 3vw, 2.6rem); --p: 0; }
.tl::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl::after { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--accent); transform-origin: top; transform: scaleY(var(--p)); }
.tl-i { position: relative; padding-bottom: clamp(2.2rem, 5vw, 3.6rem); }
.tl-i::before { content: ""; position: absolute; left: calc(-1 * clamp(1.6rem, 3vw, 2.6rem)); top: .55rem; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); transition: background .3s, border-color .3s, transform .3s var(--ease); z-index: 1; }
.tl-i.on::before { background: var(--accent); border-color: var(--accent); transform: scale(1.25); }
.tl-when { font-size: .88rem; font-weight: 700; color: var(--accent); margin-bottom: .3rem; }
.tl-i h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin-bottom: .6rem; }
.tl-i p { color: var(--muted); font-family: var(--f-serif); font-size: 1rem; line-height: 1.65; max-width: 40rem; }
.tl-i ul { margin: 0 0 .8rem; padding-left: 1.1rem; font-family: var(--f-serif); font-size: 1rem; color: var(--muted); line-height: 1.65; }
.cv-block { margin-top: clamp(2.6rem, 6vw, 4.6rem); }
.cv-block h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: 1.2rem; }
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.6rem; }
.skills h4 { font-family: var(--f-ui); text-transform: none; font-size: .95rem; font-weight: 700; margin-bottom: .6rem; line-height: 1.3; letter-spacing: 0; }
.skills ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.skills li { font-size: .88rem; padding: .3rem .7rem; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
@media (max-width: 860px) { .cv { grid-template-columns: 1fr; } .cv-side { position: static; } }

/* ---------- Dual path (home) ---------- */
.paths { display: grid; grid-template-columns: 1fr 1fr; min-height: 70svh; }
.path { position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(1.6rem, 4vw, 3.6rem); text-decoration: none; overflow: hidden; isolation: isolate; color: var(--on-night); min-height: 420px; }
.path .scene { position: absolute; inset: 0; z-index: -2; }
.path .scene svg { height: 100%; transition: transform 1.2s var(--ease); }
.path:hover .scene svg { transform: scale(1.07); }
.path::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(6,12,19,.9), rgba(6,12,19,.15) 70%); }
.path h3 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
.path p { max-width: 24rem; margin: .8rem 0 1.2rem; color: var(--on-night-muted); font-family: var(--f-serif); font-size: 1.02rem; }
.path .btn { align-self: flex-start; }
@media (max-width: 760px) { .paths { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.ftr { background: var(--night); color: var(--on-night); padding: clamp(4rem, 9vw, 7rem) 0 2rem; position: relative; overflow: hidden; }
.ftr h2 { font-size: clamp(2.1rem, 5.4vw, 4.4rem); line-height: 1.06; max-width: 16ch; }
.ftr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 2rem; margin-top: clamp(2.4rem, 6vw, 4.5rem); padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.14); }
.ftr h4 { font-family: var(--f-ui); text-transform: none; font-size: .85rem; font-weight: 600; color: var(--on-night-muted); margin-bottom: .6rem; letter-spacing: .01em; }
.ftr a { text-decoration-color: rgba(255,255,255,.3); }
.ftr ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; overflow-wrap: anywhere; }
.ftr .copy { margin-top: 3rem; font-size: .85rem; color: var(--on-night-muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; }
.ftr .btn-primary { background: var(--dawn); color: #1a0f08; margin-top: 2rem; }

/* ---------- Reveal system ---------- */
.js [data-r="fade"] { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js [data-r="fade"].in { opacity: 1; transform: none; }
.js [data-r="clip"] { clip-path: inset(0 0 100% 0); transition: clip-path 1.3s var(--ease); transition-delay: var(--d, 0s); }
.js [data-r="clip"].in { clip-path: inset(0 0 0 0); }
.js [data-r="words"] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .2em; margin-bottom: -.2em; }
.js [data-r="words"] .w > span { display: inline-block; transform: translateY(105%); transition: transform .9s var(--ease); transition-delay: calc(var(--wi, 0) * 55ms + var(--d, 0s)); }
.js [data-r="words"].in .w > span { transform: none; }
.reduce [data-r], .reduce [data-r] .w > span { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  @view-transition { navigation: none; }
}
