/* v2.5 layout: ink / paper sections, giant type, one attack-path thread */
:root {
  --ink: #0b0a09;
  --ink-2: #151311;
  --paper: #efe9de;
  --paper-2: #e5ddcf;
  --thread: #ff5a1f;
  --mega: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --gut: clamp(16px, 4vw, 64px);
}

/* tone tokens: "a" follows the theme, "b" is its opposite */
.tone-ink, html:not([data-theme="light"]) [data-tone="a"], html[data-theme="light"] [data-tone="b"] {
  --bg: var(--ink); --surface: #141210; --surface-2: #1c1915; --border: #34302a;
  --text: #e9e3d7; --text-bright: #f6f1e7; --text-dim: #958c7c;
  --accent: #ff6a1a; --accent-2: #ff9240; --accent-dim: #7a3814; --atext: #ff7a2e;
  --warn: #e0b84e; --danger: #e2503a; --ok: #8fbf6a; --cyan: #38bdf8; --gold: #f5c542;
  --win-bg: rgba(20, 18, 16, .92); --line: rgba(233, 227, 215, .78);
}
.tone-paper, html:not([data-theme="light"]) [data-tone="b"], html[data-theme="light"] [data-tone="a"] {
  --bg: var(--paper); --surface: #f7f3eb; --surface-2: var(--paper-2); --border: #cdc2ae;
  --text: #24201b; --text-bright: #100e0b; --text-dim: #6c6252;
  --accent: #d4500c; --accent-2: #b2470a; --accent-dim: #e7b991; --atext: #b2420a;
  --warn: #8f5f10; --danger: #b0301f; --ok: #3f7330; --cyan: #0b6fa0; --gold: #b07d12;
  --win-bg: rgba(247, 243, 235, .94); --line: rgba(20, 17, 14, .82);
}

body { background: var(--ink); }
html[data-theme="light"] body { background: var(--paper); }

/* nav: no bar, colour follows the section underneath */
.nav { height: 64px; }
.nav-inner, .nav[data-compact] .nav-inner { width: 100%; padding: 0 var(--gut); background: transparent; backdrop-filter: none; border-bottom: 0; }
.nav[data-tone="a"] { --nf: #f1ece2; --nd: rgba(241, 236, 226, .62); }
.nav[data-tone="b"] { --nf: #121110; --nd: rgba(18, 17, 16, .62); }
html[data-theme="light"] .nav[data-tone="a"] { --nf: #121110; --nd: rgba(18, 17, 16, .62); }
html[data-theme="light"] .nav[data-tone="b"] { --nf: #f1ece2; --nd: rgba(241, 236, 226, .62); }
.nav-prompt, .nav-prompt .host { color: var(--nf); transition: color .3s; }
.nav-links a { color: var(--nd); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; transition: color .3s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--nf); border-bottom-color: var(--thread); }
.theme-toggle, .nav-burger { color: var(--nf); border-color: transparent; }
.nav-burger i { background: var(--nf); }

/* the thread */
#flow { position: relative; display: block; }
.thread { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.th-seg { position: absolute; overflow: visible; contain: layout paint; }
.th-seg path { fill: none; stroke-linecap: round; }
.th-base { stroke: var(--thread); stroke-opacity: .2; stroke-width: 1.1; stroke-dasharray: 2 8; }
.th-live { stroke: var(--thread); stroke-width: 2; }
.th-dot { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 1.6px solid var(--thread); border-radius: 50%; opacity: .35; transition: opacity .4s; }
.th-dot::after { content: ""; position: absolute; inset: 4.4px; border-radius: 50%; background: var(--thread); }
.th-dot.on { opacity: 1; }
.tn { position: absolute; width: 1px; height: 1px; pointer-events: none; }

/* sections */
.sc { position: relative; min-height: 100vh; min-height: 100svh; padding: 112px var(--gut) 72px; color: var(--text); overflow: clip; }
.sc::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg); pointer-events: none; }
.pcard::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg); }
.sc > :where(:not(.tn):not(.pin)), .scene-word { position: relative; }
.kicker { color: var(--text-dim); }
.sec-lede { color: var(--text-dim); max-width: 60ch; font-size: 15px; margin: 18px 0 28px; }
.mega { font-family: var(--mega); font-weight: 800; text-transform: uppercase; letter-spacing: -.055em; line-height: .84; color: var(--text-bright); font-size: clamp(54px, 12.6vw, 236px); }
.mega .ln { display: block; padding: .02em 0 .06em; margin-left: calc(var(--in, 0) * 6vw); }
.mega .ln > span { display: inline-block; }
.mega .acc { color: var(--accent); }
[data-rev], [data-rev][data-in] { opacity: 1; transform: none; transition: none; }

/* hero */
.sc-hero { display: flex; flex-direction: column; justify-content: center; padding-top: 96px; }
.hero-hi { position: relative; z-index: 1; font-family: var(--mega); font-weight: 700; letter-spacing: -.02em; font-size: clamp(22px, 2.6vw, 44px); color: var(--text); margin-bottom: 10px; }
.hero-type { position: relative; z-index: 1; font-size: clamp(52px, 10.4vw, 196px); transform-origin: 0 0; }
.hero-role { font-family: var(--mega); font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; font-size: clamp(20px, 2.2vw, 36px); color: var(--accent); margin-bottom: 10px; }
.hero-line { position: relative; z-index: 1; margin-top: clamp(14px, 3vh, 36px); font-family: var(--mega); font-weight: 800; text-transform: uppercase; letter-spacing: -.04em; line-height: .95; font-size: clamp(24px, 4.6vw, 86px); color: var(--text); transform-origin: 0 0; }
.hero-line .acc { color: var(--accent); }
.hero-lock { position: absolute; right: 7vw; top: 22vh; width: clamp(80px, 11vw, 170px); fill: none; stroke: var(--line); stroke-width: 2.2; z-index: 3; transform: translateY(var(--py, 0px)) rotate(8deg); }

.hero-lock .crack { stroke: var(--thread); }
.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: clamp(28px, 7vh, 80px); }
.hero-intro { max-width: 46ch; font-size: 17px; line-height: 1.6; color: var(--text); }
.hero-intro b { color: var(--text-bright); }
.greet { display: inline-block; color: var(--atext); transition: opacity .3s, transform .3s; }
.greet-out { opacity: 0; transform: translateY(-6px); }
.scroll-cue { color: var(--text-dim); white-space: nowrap; }
.scroll-cue b { color: var(--thread); display: inline-block; animation: cue 1.6s var(--ease) infinite; }
@keyframes cue { 50% { transform: translateY(5px); } }

/* about */
.sc-about .mega { font-size: clamp(44px, 8.6vw, 160px); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 6vw; align-items: end; margin-top: clamp(40px, 9vh, 110px); }
.about-copy { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.about-desc { font-size: 17px; line-height: 1.65; max-width: 52ch; color: var(--text); }
.facts { display: grid; gap: 10px; width: 100%; max-width: 560px; }
.facts div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.facts dt { color: var(--text-dim); }
.facts dd { font-size: 14px; color: var(--text-bright); }
.phases { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 24px; }
.ph { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-width: 0; }
.ph .tn { position: relative; display: block; margin-bottom: 26px; }
.ph b { font-family: var(--mega); font-size: clamp(18px, 2vw, 28px); font-weight: 800; letter-spacing: -.03em; text-transform: uppercase; color: var(--text-bright); }
.ph em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--text-dim); }

/* stack: two sides around a radar */
.stack-type { font-size: clamp(38px, 7vw, 130px); }
.stack-kicker { margin: 28px 0 0; }
.ring-wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 3vw; margin-top: 64px; padding: 40px 0; }
.ring { position: relative; width: min(36vw, 520px); aspect-ratio: 1; }
.ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-c { fill: none; stroke: var(--thread); stroke-width: 1.4; }
.radar { position: absolute; inset: 14%; border-radius: 50%; overflow: hidden; border: 1px solid var(--border); }
.radar i { position: absolute; border: 1px solid var(--border); border-radius: 50%; }
.radar .r1 { inset: 16%; } .radar .r2 { inset: 33%; } .radar .r3 { inset: 49%; background: var(--thread); border: 0; }
.radar .sweep { inset: 0; border: 0; background: conic-gradient(from 0deg, transparent 0 290deg, color-mix(in srgb, var(--thread) 55%, transparent) 360deg); animation: sweep 4.2s linear infinite; }
.radar b { position: absolute; left: var(--bx); top: var(--by); width: 7px; height: 7px; border-radius: 50%; background: var(--thread); box-shadow: 0 0 12px var(--thread); animation: blip 4.2s linear infinite; }
.radar b:nth-of-type(2) { animation-delay: 1.4s; } .radar b:nth-of-type(3) { animation-delay: 2.6s; }
.radar span { position: absolute; left: 0; right: 0; bottom: 18%; text-align: center; color: var(--text-dim); font-size: 10px; }
@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes blip { 0%, 60%, 100% { opacity: .15; } 8% { opacity: 1; } }
.ring-side { display: flex; flex-direction: column; gap: 40px; }
.ring-side.left { text-align: right; align-items: flex-end; }
.side-label { color: var(--thread); }
.chap { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.ring-side.left .chap { align-items: flex-end; }
.chap-n { color: var(--text-dim); }
.chap-title { font-family: var(--mega); font-weight: 800; text-transform: uppercase; letter-spacing: -.03em; font-size: clamp(20px, 2.1vw, 32px); line-height: .95; color: var(--text-bright); }
.ring-side.left .tag-list { justify-content: flex-end; }
.tag-list li { background: transparent; border-color: var(--border); }

/* project scenes */
.scene { min-height: 125vh; min-height: 125svh; display: flex; flex-direction: column; padding-top: 104px; }
.scene-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6vw; }
.scene-lede { max-width: 46ch; font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--text); text-align: right; }
.scene-stage { position: relative; flex: 1 1 auto; min-height: 76vh; display: grid; place-items: center; margin: 12px 0; }
.scene-word { font-family: var(--mega); font-weight: 900; text-transform: uppercase; letter-spacing: -.065em; line-height: .78; white-space: nowrap; color: var(--text-bright); font-size: min(21vw, calc(96vw / (var(--len) * .7))); z-index: 1; }
.scene-word span { display: inline-block; }
.ob { position: absolute; left: var(--x); top: var(--y); width: var(--w, auto); max-width: 32%; z-index: 3; transform: rotate(var(--r, 0deg)); }
.ob-k { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); }
.ob-card { padding: 12px 16px 14px; background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: 5px 5px 0 -1px var(--bg), 5px 5px 0 0 var(--line); }
.ob-card .ob-k { padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.ob-card.dark { --surface: #0f0e0c; --text: #e9e3d7; --border: #34302a; --text-dim: #958c7c; }
.ob-card.alert { border-color: var(--accent); }
.ob-card.alert .ob-k { color: var(--atext); }
.ob-pre { margin: 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; white-space: pre; color: inherit; }
.ob-pre del { color: var(--danger); text-decoration: none; } .ob-pre ins { color: var(--ok); text-decoration: none; }
.ob-browser { display: flex; align-items: center; gap: 5px; margin-bottom: 8px; font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
.ob-browser i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--line); }
.ob-browser span { margin-left: 8px; padding: 1px 8px; border: 1px solid var(--border); }
.ob-flow { font-family: var(--mono); font-size: 14px; color: var(--text-bright); white-space: nowrap; }
.ob-flow b { color: var(--atext); font-weight: 400; padding: 0 4px; }
.ob-chips { display: flex; gap: 6px; }
.ob-chips i { font-style: normal; font-family: var(--mono); font-size: 12px; padding: 2px 8px; border: 1px solid var(--line); }
.ob-queue, .ob-feed { list-style: none; display: flex; flex-direction: column; gap: 8px; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.ob-queue b { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--text-dim); }
.ob-queue b.hot { background: var(--danger); } .ob-queue b.warn { background: var(--warn); }
.ob-feed li::before { content: "▸ "; color: var(--atext); }
.ob-matrix { display: grid; grid-template-columns: repeat(7, 18px); gap: 4px; }
.ob-matrix i { height: 14px; border: 1px solid var(--border); }
.ob-matrix i.hot { background: var(--accent); border-color: var(--accent); }
.ob-art svg { display: block; width: 100%; fill: none; stroke: var(--line); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ob-art svg * { vector-effect: non-scaling-stroke; }
.ob-art .hot { stroke: var(--thread); }
.ob-art .dash { stroke-dasharray: 3 4; stroke: var(--thread); }
.ob-art .ob-k { margin-top: 8px; }
.ob-shot { padding: 8px 8px 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 50px -28px rgba(0, 0, 0, .55); }
.ob-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--border); }
.ob-shot .ob-k { margin-top: 8px; }
.scene-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.scene-meta { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.scene-meta h4 { font-family: var(--mega); font-size: clamp(20px, 2vw, 28px); font-weight: 800; letter-spacing: -.02em; color: var(--text-bright); }
.scene-meta h4 .mono { margin-left: 8px; letter-spacing: .1em; }
.scene-points { list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--text); }
.scene-points li::before { content: "— "; color: var(--atext); }
.scene-links { display: flex; gap: 24px; flex: none; }
.scene-link { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-bright); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.scene-link:hover { color: var(--atext); border-color: var(--accent); text-decoration: none; }

/* writeups report sequence */
.sc-packet { min-height: 0; }
.pk-stick { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 4vw; align-items: center; padding: 72px var(--gut) 0; }
.pk-copy { gap: 18px; max-width: none; }
.pk-type { font-size: clamp(44px, 6.8vw, 128px); }
.pk-lede { max-width: 54ch; color: var(--text); }
.pk-meter i { transform: scaleX(var(--packet-meter, 0)); background: var(--thread); }
.cue { background: transparent; }

/* writeups table */
.sc-table .mega { font-size: clamp(48px, 10vw, 190px); }
.sc-table .win { border-color: var(--line); }
.sc-table .win-body { overflow: visible; max-height: none; }

/* achievements */
.ach-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 4vw; margin-bottom: 64px; }
.sc-ach .mega { font-size: clamp(48px, 9.6vw, 180px); }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 22px 26px; border: 1px solid var(--line); background: var(--surface); transform: translateY(var(--py, 0px)) rotate(3deg); box-shadow: 6px 6px 0 -1px var(--bg), 6px 6px 0 0 var(--line); }
.stat b { font-family: var(--mega); font-weight: 900; letter-spacing: -.05em; font-size: clamp(56px, 7.6vw, 140px); line-height: .9; color: var(--accent); }
.flag-art { width: 44px; fill: none; stroke: var(--line); stroke-width: 2; }
.flag-art path:nth-child(2) { stroke: var(--thread); }
.cube-art { width: 46px; fill: none; stroke: var(--line); stroke-width: 2; }
.cube-art path:nth-child(2) { stroke: var(--accent); }
.wu-head2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(24px, 4vw, 60px); align-items: start; margin-bottom: 30px; }
.wu-head2-main { min-width: 0; }
.wu-head2-main .sec-lede { margin: 20px 0 0; }
.wu-head2-side { display: flex; flex-direction: column; align-items: flex-end; gap: 22px; padding-top: 8px; }
.wu-rankwrap { display: flex; justify-content: flex-end; margin: 0; overflow: visible; }
/* #1285 rank card as a poster that pops in from the right and hangs from ropes */
.wu-poster {
  --t: 1;                                   /* data-dw drives this 0->1 on scroll */
  position: relative;
  padding-top: 42px;                        /* room for the ropes above the card */
  transform-origin: 50% 7px;                /* pivot at the pin */
  translate: calc((1 - clamp(0, var(--t), 1)) * 135%) 0;
  scale: calc(0.92 + 0.08 * clamp(0, var(--t), 1));
  opacity: clamp(0, var(--t) * 1.5, 1);
  animation: posterSway 5.2s ease-in-out infinite;
  will-change: translate, rotate, scale, opacity;
}
@keyframes posterSway { 0%, 100% { rotate: -1.7deg; } 50% { rotate: 1.7deg; } }
.wu-pin { position: absolute; top: 0; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); z-index: 3; }
.rope { position: absolute; top: 5px; left: 50%; width: 3px; height: 46px; margin-left: -1.5px; border-radius: 2px; background: linear-gradient(to bottom, var(--text-dim), var(--line)); transform-origin: top center; z-index: 1; }
.rope-l { rotate: -27deg; }
.rope-r { rotate: 27deg; }
.wu-rank { transform: none; position: relative; z-index: 2; }
.wu-rank b { font-size: clamp(40px, 4.8vw, 82px); }
@media (prefers-reduced-motion: reduce) {
  .wu-poster { translate: 0 !important; scale: 1 !important; opacity: 1 !important; rotate: -1.7deg !important; animation: none !important; }
}
@media (max-width: 860px) {
  .wu-head2 { grid-template-columns: 1fr; row-gap: 22px; }
  .wu-head2-side { flex-direction: column; align-items: stretch; gap: 18px; padding-top: 0; }
  .wu-head2-side .balls-nav { justify-content: flex-end; }
  .wu-rankwrap { justify-content: flex-start; }
}
.ach-grid h3 { color: var(--atext); }

/* resume */
.sc-resume .mega { font-size: clamp(48px, 10vw, 190px); }
.sc-resume .res-panel { margin-top: 56px; grid-template-columns: auto minmax(0, 1fr); gap: 6vw; }
.res-stage { position: relative; padding: 20px 40px 40px 20px; }
.sc-resume .res-card { height: min(72vh, 680px); transform: rotate(-4deg); }
.res-pen { position: absolute; right: -6px; top: 8%; width: 30px; fill: none; stroke: var(--line); stroke-width: 2; transform: translateY(var(--py, 0px)) rotate(18deg); z-index: 3; }
.stamp { position: absolute; left: 0; bottom: 10px; padding: 6px 12px; border: 1.5px solid var(--accent); color: var(--atext); transform: rotate(-9deg); z-index: 3; }
.res-info h3 { font-family: var(--mega); font-weight: 800; text-transform: uppercase; letter-spacing: -.03em; font-size: clamp(30px, 3.4vw, 52px); }

/* contact */
.sc-contact { display: flex; flex-direction: column; justify-content: center; }
.sc-contact .mega { font-size: clamp(60px, 15vw, 280px); }
.contact-hero { font-family: var(--mega); font-weight: 800; letter-spacing: -.03em; font-size: clamp(26px, 5.2vw, 84px); color: var(--text-bright); margin: 6px 0 28px; }
.keyhole { position: relative; }
.keyhole .tn { left: 50%; top: 50%; }

@media (max-width: 900px) {
  .sc { padding: 92px 16px 56px; min-height: 0; }
  .sc-hero { min-height: 100svh; }
  .hero-lock { top: 86px; right: 16px; width: 56px; }
  .nav-inner { background: color-mix(in srgb, var(--nb, #0b0a09) 88%, transparent); backdrop-filter: blur(8px); }
  .nav[data-tone="a"] { --nb: #0b0a09; } .nav[data-tone="b"] { --nb: #efe9de; }
  html[data-theme="light"] .nav[data-tone="a"] { --nb: #efe9de; } html[data-theme="light"] .nav[data-tone="b"] { --nb: #0b0a09; }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .phases { padding-top: 24px; }
  .ring-wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .ring { width: min(78vw, 360px); margin: 0 auto; order: -1; }
  .ring-side.left { text-align: left; align-items: flex-start; }
  .ring-side.left .chap { align-items: flex-start; }
  .ring-side.left .tag-list { justify-content: flex-start; }
  .scene { min-height: 0; }
  .scene-head { flex-direction: column; gap: 12px; }
  .scene-lede { text-align: left; }
  .scene-stage { display: flex; flex-wrap: wrap; gap: 14px; min-height: 0; margin: 28px 0; }
  .scene-word { width: 100%; font-size: min(22vw, calc(92vw / (var(--len) * .7))); margin-bottom: 8px; }
  .scene-word span { transform: none; }
  .ob { position: relative; left: auto; top: auto; width: auto; max-width: none; flex: 1 1 44%; transform: rotate(calc(var(--r, 0deg) * .5)); }
  .ob-shot { flex-basis: 100%; }
  .ob-art { flex: 0 0 28%; }
  .ob-pre { white-space: pre-wrap; font-size: 11.5px; }
  .ob-flow { white-space: normal; }
  .scene-foot { flex-direction: column; align-items: flex-start; }
  .sc-packet { height: auto; padding: 0; }
  .pk-stick { display: block; padding: 92px 16px 56px; }
  .ach-top { flex-direction: column; align-items: flex-start; }
  .sc-resume .res-panel { grid-template-columns: minmax(0, 1fr); }
  .sc-resume .res-card { height: auto; width: min(100%, 360px); transform: rotate(-2deg); }
  .res-pen { display: none; }
}


@media (prefers-reduced-motion: reduce) {
  .radar .sweep, .radar b, .scroll-cue b { animation: none; }
}
@media (max-width: 900px) {
    }

/* stack: the thread splits into a circle; skill groups sit on its nodes */
.arc-wrap { position: relative; width: min(1250px, 94vw); aspect-ratio: 1.25; margin: 24px auto 0; view-timeline-name: --arc; }
.arc { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.arc-p { fill: none; stroke: var(--thread); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.arc-hub { fill: var(--thread); }
.arc-label { position: absolute; top: 2%; color: var(--text-bright); font-size: 13px; letter-spacing: .2em; }
.arc-label.l { left: 20%; } .arc-label.r { right: 20%; }
#arcItems { position: absolute; inset: 0; }
.arc-item { position: absolute; top: var(--py); width: min(300px, 21vw); display: flex; flex-direction: column; gap: 6px; transform: translateY(-16px); }
.arc-item.a1 { --py: 24.3%; } .arc-item.a2 { --py: 72.9%; }
.arc-item.l.a1 { right: calc(74.5% + 30px); } .arc-item.l.a2 { right: calc(76.2% + 30px); }
.arc-item.r.a1 { left: calc(74.5% + 30px); } .arc-item.r.a2 { left: calc(76.2% + 30px); }
.arc-item.l { text-align: right; align-items: flex-end; }
.arc-dot { position: absolute; top: 16px; width: 16px; height: 16px; border: 1.6px solid var(--thread); border-radius: 50%; background: var(--bg); }
.arc-dot::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--thread); }
.arc-item.l .arc-dot { right: -30px; transform: translate(50%, -50%); }
.arc-item.r .arc-dot { left: -30px; transform: translate(-50%, -50%); }
.chap-desc { font-size: 14px; color: var(--text); }
.chap-tags { color: var(--text-dim); font-size: 10.5px; line-height: 1.8; letter-spacing: .08em; }

/* "view all projects" */
.all-projects { min-height: 0; padding-top: 110px; padding-bottom: 110px; }
.all-link { display: flex; flex-direction: column; gap: 14px; color: var(--text-bright); }
.all-link .mono { color: var(--text-dim); }
.all-link b { font-family: var(--mega); font-weight: 800; text-transform: uppercase; letter-spacing: -.05em; line-height: .9; font-size: clamp(44px, 9vw, 170px); }
.all-link b i { font-style: normal; color: var(--accent); display: inline-block; transition: transform .4s var(--ease); }
.all-link:hover { text-decoration: none; }
.all-link:hover b i { transform: translate(10px, -10px); }

/* projects page */
.pj-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.pj-head .mega { font-size: clamp(64px, 14vw, 260px); }
.pj-year { font-family: var(--mega); font-weight: 800; letter-spacing: -.05em; line-height: .84; font-size: clamp(64px, 14vw, 260px); color: var(--text-bright); }
.pj-year b { color: var(--accent); font-weight: 800; }
.pj-sub { display: flex; justify-content: space-between; gap: 16px; margin: 28px 0 40px; color: var(--text-dim); }
.pgrid { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.pcard { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 12px 12px 18px; color: var(--text); border: 1px solid var(--border); }
.pc-frame { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.pc-scale { position: absolute; left: 0; top: 0; width: 250%; height: 250%; transform: scale(.4); transform-origin: 0 0; transition: transform .7s var(--ease); container-type: inline-size; }
.pcard:hover .pc-scale { transform: scale(.43); }
.scene-stage.pc-stage { position: absolute; inset: 0; margin: 0; min-height: 0; display: grid; place-items: center; }
.pc-stage .scene-word { font-size: min(21cqw, calc(94cqw / (var(--len) * .7))); }
.pc-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-top: 4px; }
.pc-name { margin-top: 6px; font-family: var(--mega); font-weight: 800; letter-spacing: -.03em; font-size: clamp(20px, 2vw, 30px); line-height: 1; color: var(--text-bright); }
.pc-tags { list-style: none; text-align: right; color: var(--text-dim); font-size: 10px; line-height: 1.7; flex: none; }
.pc-desc { font-size: 14px; color: var(--text); max-width: 62ch; }
.pcard .scene-links { margin-top: auto; padding-top: 6px; }
.pj-foot .mega { font-size: clamp(56px, 12vw, 220px); }

@media (max-width: 900px) {
  .arc-wrap { aspect-ratio: auto; width: 100%; margin-top: 36px; }
  .arc, .arc-label, .arc-dot { display: none; }
  #arcItems { position: static; display: grid; gap: 28px; padding-left: 18px; border-left: 2px solid var(--thread); }
  .arc-item, .arc-item.l, .arc-item.r { position: static; width: auto; text-align: left; align-items: flex-start; transform: none; }
  .pgrid { grid-template-columns: minmax(0, 1fr); }
  .pj-head { flex-direction: column; align-items: flex-start; }
  .pc-stage .ob { position: absolute; left: var(--x); top: var(--y); width: var(--w, auto); max-width: 32%; flex: none; transform: rotate(var(--r, 0deg)); }
  .pc-stage .ob-pre { white-space: pre; }
  .scene-stage.pc-stage { display: grid; }
  .pc-stage .scene-word { width: auto; margin: 0; }
}

/* scroll motion is driven by stage.js (transform only); these are the rest/start states */
.hero-type, .hero-line, .mega .ln > span, .scene > .scene-stage > .scene-word > span { will-change: transform; }
.arc-head { fill: var(--thread); }
.arc-item { opacity: 0; translate: 0 16px; transition: opacity .6s var(--ease), translate .6s var(--ease); }
.arc-item.on { opacity: 1; translate: 0 0; }
.pcard { opacity: 0; translate: 0 40px; transition: opacity .8s var(--ease), translate .8s var(--ease); }
.pcard.in { opacity: 1; translate: 0 0; }
@media (min-width: 901px) { .scene > .scene-stage > .ob { will-change: transform; } }
@media (prefers-reduced-motion: reduce) { .arc-item, .pcard { opacity: 1; translate: 0 0; transition: none; } }

/* about: facts beside the copy */
.sc-about .mega { font-size: clamp(40px, 7.4vw, 140px); }
.about-side { position: relative; }
.about-copy .about-desc + .about-desc { margin-top: -8px; }

/* skills: cards rise from the bottom corners once, then stay put */
.sc-skills .mega { font-size: clamp(52px, 10vw, 190px); }
.skill-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; margin-top: 12px; }
.skill { grid-column: span 2; }
.skill:nth-child(n+4) { grid-column: span 3; }
.skill { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 24px; border: 1px solid var(--line); background: var(--surface); box-shadow: 5px 5px 0 -1px var(--bg), 5px 5px 0 0 var(--line);
  opacity: 0; transform: translate(var(--from-x, 0), 140px) rotate(var(--from-r, 0deg)); transition: opacity .7s var(--ease) var(--delay, 0ms), transform .9s var(--ease) var(--delay, 0ms); }
.skill-grid.in .skill { opacity: 1; transform: none; }
.skill .chap-title { font-size: clamp(22px, 2vw, 30px); }
.skill .chap-desc { font-size: 15px; line-height: 1.55; color: var(--text); }
.skill .tag-list { margin-top: 4px; }

/* lab reports: a hand of three cards dealt onto the table */
.pk-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5vw; align-items: center; }
.pk-copy { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.pk-type { font-size: clamp(52px, 8.4vw, 160px); }
.pk-lede { font-size: 17px; line-height: 1.6; max-width: 50ch; color: var(--text); }
.hand { position: relative; height: min(64vh, 560px); }
.hcard { position: absolute; left: 44%; top: 50%; width: min(280px, 52%); aspect-ratio: 3 / 4; display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--accent); color: var(--text); box-shadow: 0 30px 50px -30px rgba(0, 0, 0, .7);
  --rot: calc((var(--i) - 1) * 8deg); --dx: calc((var(--i) - 1) * 96px);
  transform: translate(-50%, -50%) translate(var(--dx), 0) rotate(var(--rot)); opacity: 0; translate: 0 -60px;
  transition: opacity .6s var(--ease) calc(var(--i) * 140ms), translate .8s var(--ease) calc(var(--i) * 140ms), transform .35s var(--ease); z-index: calc(3 - var(--i)); }
.hand.in .hcard { opacity: 1; translate: 0 0; }
.hcard:hover, .hcard:focus-visible { text-decoration: none; transform: translate(-50%, -50%) translate(var(--dx), -18px) rotate(calc(var(--rot) * .5)); z-index: 5; }
.hc-top { display: flex; align-items: center; gap: 12px; }
.hc-top b { display: block; font-family: var(--mega); font-weight: 800; text-transform: uppercase; letter-spacing: -.03em; font-size: 26px; line-height: 1; color: var(--atext); }
.hc-top .pk-ava { width: 46px; height: 46px; }
.hc-shot { flex: 1; min-height: 0; border: 1px solid var(--border); background: var(--surface-2); overflow: hidden; }
.hc-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.hc-foot { display: flex; justify-content: space-between; gap: 8px; color: var(--text-dim); font-size: 10px; }
.hc-foot span:last-child { color: var(--atext); }

/* all reports: a scrollable strip of balls */
.balls-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.sc-balls .mega { font-size: clamp(48px, 9vw, 170px); }
.balls-nav { display: flex; gap: 10px; flex: none; }
.ball-arrow { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text-bright); font-size: 22px; cursor: pointer; transition: background .2s, color .2s, opacity .2s; }
.ball-arrow:hover:not(:disabled) { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.ball-arrow:disabled { opacity: .3; cursor: default; }
.balls { display: flex; align-items: flex-start; gap: clamp(18px, 3vw, 44px); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 20px 4px 40px; scrollbar-width: none; }
.balls::-webkit-scrollbar { display: none; }
.ball { flex: none; display: flex; flex-direction: column; align-items: center; gap: 12px; width: var(--s); margin-top: var(--drop); scroll-snap-align: start; color: var(--text); text-align: center; }
.ball:hover { text-decoration: none; }
.ball-face { position: relative; width: var(--s); height: var(--s); border-radius: 50%; border: 2px solid var(--line); background: var(--surface); overflow: hidden; display: grid; place-items: center; transform: rotate(var(--roll, 0deg)); transition: border-color .2s, box-shadow .2s; }
.ball-ava { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ball-ava.ava-blank { display: grid; place-items: center; font-family: var(--mega); font-weight: 800; font-size: calc(var(--s) * .4); border: 0; background: var(--surface-2); color: var(--text-dim); }
.ball.is-ok:hover .ball-face { border-color: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 20%, transparent); }
.ball:not(.is-ok) .ball-face { filter: grayscale(1); opacity: .6; }
.ball-label { display: flex; flex-direction: column; gap: 2px; }
.ball-label b { font-family: var(--mega); font-weight: 800; font-size: 18px; color: var(--text-bright); }
.ball-label .mono { font-size: 10px; color: var(--text-dim); }
.ball.is-ok .ball-state { color: var(--atext); }

@media (max-width: 900px) {
  .skill-grid { grid-template-columns: minmax(0, 1fr); }
  .skill, .skill:nth-child(n+4) { grid-column: auto; }
  .skill { transform: translateY(80px); }
  .pk-wrap { grid-template-columns: minmax(0, 1fr); }
  .hand { height: 440px; }
  .hcard { width: min(240px, 64%); --dx: calc((var(--i) - 1) * 70px); }
  .balls-head { flex-direction: row; align-items: center; }
  .ball-arrow { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .skill, .hcard { opacity: 1; translate: 0 0; transition: none; }
  .skill { transform: none; }
  .ball-face { transform: none; }
}

/* menu on the right */
.nav-inner, .nav[data-compact] .nav-inner { grid-template-columns: auto 1fr auto; }
.nav-links { justify-self: end; }

/* the part of a ring that passes in front of text */
.thread-front { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.thread-front .th-live { stroke-width: 2.2; }

/* line-art scenes: objects drift and tilt a little; details fill in as you scroll */
.scene-stage.art-stage { min-height: clamp(760px, 118vh, 1150px); }
.art-stage .scene-word { position: absolute; left: 0; right: 0; top: 46%; text-align: center; }
.ob.art { max-width: none; }
.art svg { display: block; width: 100%; height: auto; fill: none; stroke: var(--line); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.art svg * { vector-effect: non-scaling-stroke; }
.art svg .hot { stroke: var(--thread); fill: var(--thread); }
.art svg .dash { stroke-dasharray: 3 5; stroke-opacity: .6; }
.art svg .thin { stroke-opacity: .5; }
.art svg text { fill: var(--text-dim); stroke: none; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; }
.a-map svg rect, .a-map svg path:not(.dash) { fill: var(--bg); }
.a-cap, .a-tag { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-bright); }
.a-tag { flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1px solid var(--border); }
.a-lbl { margin-top: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-bright); }
.a-lock svg { width: 70%; }
.a-lock .shk { transition: transform .8s var(--ease); }
.a-lock .shk.open { transform: translateY(-9px) rotate(-14deg); transform-origin: 44px 36px; }
.a-lock2 .shk { transform: translateY(calc(-9px * (1 - clamp(0, (var(--t, 1) - .7) / .25, 1)))); }
.paper { padding: 18px 20px 20px; background: var(--bg); border: 1.4px solid var(--line); font-family: var(--mono); color: var(--text-bright); display: flex; flex-direction: column; gap: 6px; }
.pp-t { font-size: 16px; letter-spacing: .08em; text-transform: uppercase; }
.pp-s { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.pp-k { margin-top: 6px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.pp-big { font-family: var(--mega); font-weight: 800; font-size: clamp(20px, 2.2vw, 34px); letter-spacing: -.02em; line-height: 1; }
.pp-v { font-size: 13px; }
.paper .sig { width: 60%; margin-top: 6px; stroke: var(--line); stroke-width: 1.4; fill: none; }
.paper.alert { border-color: var(--accent); }
.paper.alert .pp-k:first-child { color: var(--atext); }
.dots { display: inline-flex; align-items: center; gap: 5px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--line); }
.chart { margin: 6px 0; }
.chart .grid { stroke-opacity: .25; }
.a-shield .tick { stroke: var(--thread); stroke-width: 2.4; }
.chart-line { stroke: var(--line); stroke-width: 1.8; }
.nb { position: relative; display: grid; grid-template-columns: 1fr 26px 1fr; padding: 22px 6px 26px; background: var(--bg); border: 1.4px solid var(--line); border-radius: 6px 14px 6px 6px; box-shadow: 4px 4px 0 -1px var(--bg), 4px 4px 0 0 var(--line), 8px 8px 0 -1px var(--bg), 8px 8px 0 0 var(--line); font-family: var(--mono); color: var(--text-bright); }
.nb-p { display: flex; flex-direction: column; gap: 12px; padding: 0 20px; }
.nb-h { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.nb-sw { color: var(--text-dim); } .nb-sw u { color: var(--text-bright); text-underline-offset: 4px; }
.nb-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.nb-tot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 19px; letter-spacing: .06em; text-transform: uppercase; }
.nb-ok { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 1.4px solid var(--line); border-radius: 50%; font-size: 15px; }
.nb-rings { display: flex; flex-direction: column; justify-content: space-around; align-items: center; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.nb-rings i { width: 22px; height: 12px; border: 1.6px solid var(--line); border-radius: 50%; background: var(--bg); }
.scene.lv1 .rv1:nth-child(3), .scene.lv2 .rv2:nth-child(4) { transition-delay: .12s; }
.pc-stage .rv { opacity: 1; translate: 0 0; }

@media (max-width: 900px) {
  .scene-stage.art-stage { min-height: 0; }
  .art-stage .scene-word { position: relative; top: auto; }
  .ob.art { flex: 1 1 100%; }
  .ob.a-lock { flex: 0 0 40%; }
  .nb { grid-template-columns: 1fr; gap: 18px; }
  .nb-rings { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; translate: 0 0; transition: none; }
  .a-cloud .flow { animation: none; }
}

/* ---- objects are fully drawn; only their details respond when the line reaches them (--t: 0 to 1) ---- */
.art svg * { vector-effect: none; }
.art svg { stroke-width: 1.6; }
.tick, .chart-line, .hot-line, .sig path { stroke-dasharray: 1 1; stroke-dashoffset: calc(1 - clamp(0, (var(--t, 1) - .25) / .55, 1)); }
[data-dw] svg .hot { fill-opacity: clamp(0, (var(--t, 1) - .5) * 3, 1); }
.rv1 { opacity: clamp(0, (var(--t, 1) - .2) * 4, 1); }
.rv2 { opacity: clamp(0, (var(--t, 1) - .45) * 4, 1); }
.rv3 { opacity: clamp(0, (var(--t, 1) - .7) * 4, 1); }
.bx { position: relative; }
.sheet-box { border: 1.4px solid var(--line); background: var(--bg); }
.a-stamp .bx { border: 2px solid var(--accent); opacity: clamp(0, (var(--t, 1) - .5) * 4, 1); transform: scale(calc(1.25 - .25 * clamp(0, (var(--t, 1) - .5) * 4, 1))); }
.a-lock2 .shk { transform: translateY(calc(-9px * (1 - clamp(0, (var(--t, 1) - .4) * 3, 1)))); }
.skill .skill-ico { opacity: calc(.45 + .55 * var(--t, 1)); }

/* the line's tip: a dot with a ring */
.th-tip { position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 1.5px solid var(--thread); border-radius: 50%; opacity: 0; transition: opacity .25s; pointer-events: none; will-change: transform; }
.th-tip::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--thread); }

/* project titles: a red dot lands on the title when the line arrives */
.scene-word { position: relative; }
.title-dot { position: absolute; left: calc(46% + 24px); top: calc(30% + 24px); z-index: 2; width: clamp(28px, 3vw, 48px); aspect-ratio: 1; border-radius: 50%; background: var(--thread); display: grid; place-items: center; overflow: hidden; transform: translate(-50%, -50%) scale(clamp(0, (var(--t, 1) - .3) * 4, 1)); transition: width .35s var(--ease); text-decoration: none; }
a.title-dot { cursor: pointer; }
.title-dot span { font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #0b0a09; opacity: 0; transition: opacity .2s; white-space: nowrap; }
a.title-dot:hover, a.title-dot:focus-visible { width: clamp(84px, 7vw, 110px); text-decoration: none; }
a.title-dot:hover span, a.title-dot:focus-visible span { opacity: 1; transition-delay: .12s; }
a.title-dot:focus-visible { outline: 2px solid var(--text-bright); outline-offset: 4px; }
@media (hover: none) { a.title-dot { width: clamp(64px, 16vw, 84px); } a.title-dot span { opacity: 1; font-size: 11px; } }

/* resume: the scan finds each part of the page */
.res-hls { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.res-hls i { position: absolute; left: 5%; right: 5%; top: var(--y); height: var(--h); border: 1.5px solid var(--thread); opacity: clamp(0, (var(--t, 1) - var(--d)) * 6, 1); }
.res-checks { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--text-dim); font-size: 11px; margin: -4px 0 4px; }
.res-checks li { color: var(--atext); }
/* hero lock: lifts, swings open on a hinge, keyhole turns */
.hero-lock { transform: none; transform-origin: 50% 100%; rotate: calc(8deg - var(--t, 0) * 14deg); }
.hero-lock .shackle { transform-box: view-box; transform-origin: 90px 70px; transform: translateY(calc(min(var(--t, 0), .35) / .35 * -12px)) rotate(calc(clamp(0, (var(--t, 0) - .35) / .65, 1) * 42deg)); }
.hero-lock .keyhole-g { transform-box: view-box; transform-origin: 60px 104px; transform: rotate(calc(min(var(--t, 0), .35) / .35 * 90deg)); }

/* rocking objects pivot on one end */
.res-pen { transform-origin: 50% 8%; }
.a-shield { transform-origin: 50% 96%; }
.a-glass { transform-origin: 90% 90%; }
.a-clipr { transform-origin: 50% 0%; }

/* skills: scattered inside the frame, drawn in, lit by the line */
@media (min-width: 901px) {
  .skill-grid { display: block; position: relative; height: 860px; }
  .skill, .skill:nth-child(n+4) { position: absolute; left: var(--sx); top: var(--sy); width: 30%; rotate: var(--sr); }
}
.skill, .skill-grid.in .skill { opacity: 1; transform: none; transition: none; }
.skill .tn { position: absolute; }
.skill-ico { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; fill: none; stroke: var(--line); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.skill.lit .skill-ico { stroke: var(--accent); }
.skill.lit .chap-n, .skill.lit .chap-title { color: var(--atext); }
.skill.lit .tag-list li { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); }
.skill .chap-n, .skill .chap-title { transition: color .5s; }

/* lab reports */
.sc-packet { min-height: 0; padding-bottom: 40px; }
.sc-packet .mega { font-size: clamp(52px, 10vw, 190px); }
.pk-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin: 26px 0 40px; }
.pk-intro .pk-lede { font-size: 17px; line-height: 1.6; max-width: 56ch; color: var(--text); }
.sheets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 44px); }
.sheet { display: block; color: var(--text); rotate: var(--r); }
.sheet:hover { text-decoration: none; }
.sheet-box { display: flex; flex-direction: column; gap: 14px; aspect-ratio: 3 / 4; padding: 22px; }
.sh-top { display: flex; align-items: center; gap: 14px; }
.sh-ava { width: 54px; height: 54px; border-radius: 50%; }
.sh-top b { display: block; font-family: var(--mega); font-weight: 800; text-transform: uppercase; letter-spacing: -.03em; font-size: clamp(24px, 2.4vw, 38px); line-height: 1; color: var(--atext); }
.sh-top .mono { color: var(--text-dim); font-size: 11px; }
.sh-lines { flex: 1; width: 100%; fill: none; stroke: var(--line); stroke-width: 1.6; stroke-linecap: round; opacity: 1 !important; }
.sh-foot { display: flex; justify-content: space-between; color: var(--text-dim); font-size: 11px; }
.sh-foot span:last-child { color: var(--atext); }
.sheet:hover .sh-foot span:last-child { text-decoration: underline; }
.pk-stage { position: relative; height: 56vh; margin-top: 60px; }
.pk-stage .ob { position: absolute; left: var(--x); top: var(--y); width: var(--w); }
.a-clip .paper { gap: 12px; }
.a-clip .nb-row { font-size: 13px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.a-stamp .bx { display: inline-block; padding: 12px 18px; color: var(--atext); font-family: var(--mega); font-weight: 800; font-size: clamp(18px, 2vw, 30px); letter-spacing: .02em; text-transform: uppercase; }

/* all writeups: scattered across both axes, drag to move */
.balls { display: block; overflow-x: auto; overflow-y: hidden; cursor: grab; user-select: none; padding: 10px 0 20px; }
.balls.is-grab { cursor: grabbing; }
.balls-canvas { position: relative; height: 570px; }
.ball { position: absolute; margin: 0; }
.ball-face { transform: none !important; display: grid; place-items: center; }
.ball-face .ball-ava { width: 66px; height: 66px; border-radius: 50%; image-rendering: auto; }
.ball-face .ball-ava.ava-blank { font-size: 30px; }
.ball img { -webkit-user-drag: none; }
.wu-story { position: relative; width: min(960px, 100%); margin: 30px auto 0; }
.wu-story svg { width: 100%; }

/* resume: one scanner line, objects on the empty right side */
.res-card .scan { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.res-card .scan b { position: absolute; inset: 0; transform: translateX(calc(min(1, var(--t, 1) / .4) * 100%)); opacity: min(1, var(--t, 1) * 40, (.4 - var(--t, 1)) * 40); }
.res-card .scan b::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--thread); }
.sc-resume { position: relative; }
.res-objs { position: absolute; right: var(--gut); top: 34%; width: min(240px, 18vw); height: 420px; }
.res-objs .ob { position: absolute; left: var(--x); top: var(--y); width: var(--w); }
.res-info { max-width: 46ch; }

/* contact slides up over the resume like a sheet */
.sc-contact { z-index: 2; border-radius: 28px 28px 0 0; box-shadow: 0 -30px 70px -20px rgba(0, 0, 0, .55); }

/* contact: the email is underlined as you arrive */
.contact-hero { position: relative; display: inline-block; }
.contact-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent); transform-origin: left; transform: scaleX(clamp(0, (var(--t, 1) - .3) / .5, 1)); }

/* VAPT: title on top, the drawings underneath */
.art-vapt .scene-word { top: 4%; }
.a-bars svg text, .a-map svg text { font-size: 11px; }
.a-bars .hot-line { stroke: var(--thread); }

@media (max-width: 900px) {
  .pk-intro { flex-direction: column; align-items: flex-start; }
  .sheets { grid-template-columns: minmax(0, 1fr); }
  .sheet-box { aspect-ratio: auto; min-height: 320px; }
  .pk-stage { height: auto; display: flex; flex-wrap: wrap; gap: 16px; }
  .pk-stage .ob { position: relative; left: auto; top: auto; width: auto; flex: 1 1 44%; }
  .balls-canvas { height: 440px; }
  .res-objs { display: none; }
  .sc-contact { border-radius: 20px 20px 0 0; }
}

.thread-local { position: absolute; inset: 0; pointer-events: none; z-index: 0; }

/* AC monogram */
.nav-logo-link { display: inline-flex; align-items: center; min-height: 44px; }
.ac-logo { width: 46px; height: 34px; fill: none; stroke: var(--nf, var(--text-bright)); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; overflow: visible; transition: stroke .3s; }
.ac-logo .ac-dot { fill: var(--thread); stroke: none; }
.nav-logo-link:hover .ac-c { stroke: var(--thread); }

/* hero: role, pitch and the two actions HR needs, all on the first screen */
.hero-role { font-size: clamp(26px, 3.2vw, 52px); }
.hero-intro { max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-cta .btn.big { min-height: 56px; padding: 0 28px; font-size: 15px; }

/* about: experience */
.exp { margin-top: 36px; display: flex; flex-direction: column; gap: 18px; max-width: 560px; }
.exp-item { padding-top: 14px; border-top: 1px solid var(--border); }
.exp-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.exp-top b { font-family: var(--mega); font-size: 20px; color: var(--text-bright); letter-spacing: -.01em; }
.exp-org { color: var(--atext); font-family: var(--mono); font-size: 12px; margin: 2px 0 8px; }
.exp-item ul { list-style: none; display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--text); }
.exp-item li::before { content: "— "; color: var(--atext); }

/* report sheets: one real sentence each */
.sh-k { color: var(--text-dim); font-size: 10px; margin-top: 6px; }
.sh-text { font-size: clamp(15px, 1.25vw, 18px); line-height: 1.45; color: var(--text-bright); }
.sh-lines { flex: 1; max-height: 70px; }
.ball-more .ball-face { border-style: dashed; }
.ball-more .ball-face b { font-family: var(--mega); font-size: 34px; color: var(--text-dim); }

/* a shorter page */
.sc { min-height: 0; padding-top: 96px; padding-bottom: 64px; }
.sc-hero { min-height: 100vh; min-height: 100svh; }
.sc-contact { min-height: 80vh; }
.scene { min-height: 0; padding-top: 88px; }
.scene-stage.art-stage { min-height: clamp(600px, 88vh, 860px); }
@media (min-width: 901px) { .skill-grid { height: 700px; } }
.pk-stage { height: 300px; margin-top: 30px; }
.balls-canvas { height: 440px; }
.all-projects { padding-top: 70px; padding-bottom: 70px; }
@media (max-width: 900px) { .pk-stage { height: auto; } .balls-canvas { height: 400px; } .exp-top { flex-direction: column; } }

/* solid menu bar so nothing slides under it */
.nav-inner, .nav[data-compact] .nav-inner { background: color-mix(in srgb, var(--nb, #0b0a09) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav[data-tone="a"] { --nb: #0b0a09; } .nav[data-tone="b"] { --nb: #efe9de; }
html[data-theme="light"] .nav[data-tone="a"] { --nb: #efe9de; } html[data-theme="light"] .nav[data-tone="b"] { --nb: #0b0a09; }
.wu-note { margin-top: 6px; color: var(--text-dim); font-size: 11px; }
main > section + section, main > section#skills { margin-top: 0; }
@media (max-width: 900px) {
  .sc { padding-top: 76px; padding-bottom: 48px; }
}
.sheet-box { aspect-ratio: auto; min-height: 0; }
.sh-lines { max-height: 46px; }
.nav-inner, .nav[data-compact] .nav-inner { background: var(--nb, #0b0a09); backdrop-filter: none; -webkit-backdrop-filter: none; }

/* rounded by default: line ends and joins on every drawing; near-sharp corners on boxes */
.th-seg path, .art svg, .art svg *, .ob-art svg, .skill-ico, .sh-lines, .flag-art, .res-pen, .hero-lock, .ac-logo, .wu-story svg { stroke-linecap: round; stroke-linejoin: round; }
.paper, .nb, .skill, .sheet-box, .stat, .ob-card, .ob-shot, .btn, .chip, .win, .tag-list li, .a-stamp .bx, .res-hls i, .pcard, .pc-frame { border-radius: .5px; }
.res-card .packet, .res-face { border-radius: .5px; }
.th-seg path { shape-rendering: geometricPrecision; }
.th-seg { contain: none; }
.th-mark { stroke-width: 1.8; }
/* light sections: dark text on orange buttons and active chips (contrast 4.5:1+) */
html:not([data-theme="light"]) [data-tone="b"] .btn.solid, html[data-theme="light"] [data-tone="a"] .btn.solid,
html:not([data-theme="light"]) [data-tone="b"] .chip.on, html[data-theme="light"] [data-tone="a"] .chip.on { color: #0b0a09; }

/* contact drawer: the contact footer pulled up from the bottom */
.cdrawer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; max-height: min(86vh, 760px); overflow-y: auto; overscroll-behavior: contain; border-radius: 28px 28px 0 0; background: var(--bg); color: var(--text); box-shadow: 0 -30px 80px -20px rgba(0, 0, 0, .6); transform: translate3d(0, 104%, 0); transition: transform .6s cubic-bezier(.22, 1, .36, 1); visibility: hidden; }
.cdrawer-open .cdrawer { transform: none; visibility: visible; }
.cdrawer .cdrawer-in { min-height: 0; margin: 0; padding: 56px var(--gut) 44px; border-radius: 0; box-shadow: none; transform: none !important; }
.cdrawer .cdrawer-in .mega { font-size: clamp(48px, 9vw, 150px); }
.cdrawer .wu-foot-in { padding-top: 48px; }
.cdrawer::before { content: ""; position: sticky; top: 10px; display: block; width: 46px; height: 4px; margin: 10px auto -14px; border-radius: 2px; background: var(--text-dim); opacity: .5; z-index: 2; }
.cdrawer-shade { position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; transition: opacity .45s ease; }
.cdrawer-open .cdrawer-shade { opacity: 1; pointer-events: auto; }
.cdrawer { transition: transform .6s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .6s; }
.cdrawer-open .cdrawer { transition: transform .6s cubic-bezier(.22, 1, .36, 1), visibility 0s; }

/* the contact link steps out of the menu while the contact section is on screen */
.nav-links a[aria-controls="contactDrawer"] { max-width: 140px; overflow: hidden; white-space: nowrap; transition: max-width .4s var(--ease), padding .4s var(--ease), opacity .3s ease .3s, color .3s; }
.nav-links a[aria-controls="contactDrawer"].nav-gone { max-width: 0; padding-left: 0; padding-right: 0; opacity: 0; pointer-events: none; transition: opacity .25s ease, max-width .4s var(--ease) .22s, padding .4s var(--ease) .22s; }
@media (max-width: 900px) {
  .nav--menu .nav-links a[aria-controls="contactDrawer"].nav-gone { display: none; }
  .cdrawer { max-height: 88vh; border-radius: 20px 20px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cdrawer, .cdrawer-open .cdrawer, .cdrawer-shade, .nav-links a[aria-controls="contactDrawer"] { transition: none; }
}
.cdrawer-open .nav { z-index: 75; }
