/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --soft: #f5f5f2;
  --ink: #0b0b0b;
  --ink-2: #333333;
  --muted: #6f6f6f;
  --line: #e4e4e1;
  --red: #e1251b;
  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.red { color: var(--red); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; }
.skip:focus { left: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 20px; background: var(--ink); color: #fff; border: 1.5px solid var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.btn:hover { background: var(--red); border-color: var(--red); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.arrow { font-weight: 700; text-decoration: none; white-space: nowrap; }
.arrow::after { content: " →"; color: var(--red); transition: margin 0.2s; }
.arrow:hover::after { margin-left: 4px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.94); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.nav.is-scrolled { border-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.nav__mark { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; text-decoration: none; }
.nav__menu { display: flex; align-items: center; gap: 30px; }
.nav__links { display: flex; gap: 24px; }
.nav__links a { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink-2); }
.nav__links a:hover, .nav__links a.is-current { color: var(--red); }
.nav__cta { font-size: 15px; font-weight: 700; text-decoration: none; }
.nav__toggle { display: none; position: relative; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; }
.nav__toggle i { position: absolute; left: 9px; right: 9px; height: 2px; background: var(--ink); transition: transform 0.3s var(--ease); }
.nav__toggle i:first-of-type { top: 15px; } .nav__toggle i:last-of-type { top: 23px; }
.nav__toggle[aria-expanded="true"] i:first-of-type { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] i:last-of-type { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 110px) 0 clamp(56px, 8vw, 110px); }
.hero__grid { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero__role { font-size: 15px; font-weight: 700; color: var(--red); margin-bottom: 18px; }
.hero__name { font-size: clamp(48px, 7.4vw, 96px); font-weight: 900; letter-spacing: -0.055em; line-height: 0.92; margin-bottom: 26px; }
.hero__lede { font-size: clamp(21px, 2.1vw, 28px); line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; max-width: 26em; margin-bottom: 14px; }
.hero__meta { color: var(--muted); font-size: 15.5px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* ---------- Photo header ---------- */
.show { position: relative; height: calc(100svh - 64px); min-height: 520px; max-height: 1000px; overflow: hidden; background: #111; color: #fff; }
.show__slides, .show__slide { position: absolute; inset: 0; margin: 0; }
.show__slide { opacity: 0; transition: opacity 1.4s ease; }
.show__slide.is-on { opacity: 1; }
.show__slide img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transform: scale(1.06); }
.show__slide.is-on img { animation: drift 9s linear forwards; }
@keyframes drift { from { transform: scale(1.06); } to { transform: scale(1); } }
.show__slide figcaption { position: absolute; right: var(--gutter); bottom: 26px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.85); text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.show::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.35) 38%, rgba(0,0,0,0) 62%), linear-gradient(to right, rgba(0,0,0,.35), rgba(0,0,0,0) 55%); }
.show__text { position: absolute; z-index: 2; left: var(--gutter); bottom: 78px; width: min(640px, calc(100% - 2 * var(--gutter))); }
.show__name { font-size: clamp(46px, 7vw, 96px); font-weight: 900; letter-spacing: -0.055em; line-height: 0.92; margin-bottom: 18px; text-shadow: 0 2px 30px rgba(0,0,0,.35); }
.show__line { font-size: clamp(17px, 1.7vw, 22px); font-weight: 600; line-height: 1.35; margin: 0 0 24px; max-width: 28em; text-shadow: 0 1px 14px rgba(0,0,0,.5); }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: var(--red); border-color: var(--red); color: #fff; }
.show__ctrl { position: absolute; z-index: 3; left: var(--gutter); bottom: 22px; display: flex; align-items: center; gap: 14px; }
.show__dots { display: flex; gap: 6px; }
.show__dots button { width: 28px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.show__dots button::before { content: ""; display: block; height: 3px; background: rgba(255,255,255,.45); transition: background .3s; }
.show__dots button.is-on::before { background: #fff; }
.show__pause { width: 28px; height: 28px; border: 0; background: none; cursor: pointer; position: relative; }
.show__pause i { position: absolute; left: 9px; top: 8px; width: 10px; height: 12px; border-left: 3px solid #fff; border-right: 3px solid #fff; }
.show__pause[aria-pressed="true"] i { width: 0; height: 0; border: 0; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; left: 10px; top: 7px; }

/* ---------- Sections ---------- */
.sec { padding: clamp(72px, 9vw, 120px) 0; border-top: 1px solid var(--line); }
.sec--soft { background: var(--soft); border-top: 0; }
.grid { display: grid; grid-template-columns: 260px 1fr; column-gap: clamp(24px, 5vw, 64px); align-items: start; }
.sec__head { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 96px; }
.sec__num { font-size: 14px; font-weight: 800; color: var(--red); margin: 0; }
.sec__head h2 { font-size: clamp(32px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.045em; }
.sec__intro { color: var(--ink-2); max-width: 44em; margin: 0; }

/* About */
.about__text { max-width: 40em; }
.about__lead { font-size: clamp(20px, 1.8vw, 24px); font-weight: 600; line-height: 1.35; letter-spacing: -0.015em; color: var(--ink); }
.about__text p:not(.about__lead) { color: var(--ink-2); }
.facts { grid-column: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 36px 0 0; }
.facts div { border-top: 2px solid var(--ink); padding-top: 10px; }
.facts dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.facts dd { margin: 4px 0 0; font-size: 15px; font-weight: 600; line-height: 1.35; }

/* What I do */
.pillars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 24px; }
.pillars li { border-top: 2px solid var(--ink); padding-top: 14px; }
.pillars__n { display: block; font-size: 13px; font-weight: 800; color: var(--red); margin-bottom: 6px; }
.pillars h3 { font-size: 22px; letter-spacing: -0.03em; margin-bottom: 8px; }
.pillars p { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--ink); }
.timeline li { position: relative; padding: 30px 16px 0 0; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 0; width: 16px; height: 16px; background: #fff; border: 2px solid var(--ink); box-sizing: border-box; }
.timeline li.is-now::before { background: var(--red); border-color: var(--red); }
.timeline__when { display: block; font-size: 13px; font-weight: 800; color: var(--red); margin-bottom: 4px; }
.timeline__what { display: block; font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }

/* Experience */
.jobs { display: grid; }
.job { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid #dcdcd8; }
.job:first-child { border-top: 2px solid var(--ink); }
.job__meta { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.job__when { font-weight: 700; color: var(--ink); }
.job h3 { font-size: 21px; letter-spacing: -0.025em; }
.job__org { margin: 4px 0 14px; font-weight: 600; color: var(--red); }
.job ul { display: grid; gap: 10px; }
.job li { position: relative; padding-left: 18px; color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.job li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 7px; height: 2px; background: var(--red); }
.job li a { font-weight: 600; text-decoration-color: var(--red); text-underline-offset: 3px; }

.job__lead { font-size: 17px; font-weight: 600; color: var(--ink); margin: 2px 0 12px; }
.job__more { margin-top: 10px; }
.job__more summary { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; }
.job__more summary::-webkit-details-marker { display: none; }
.job__more summary::after { content: "+"; color: var(--red); font-weight: 800; }
.job__more[open] summary::after { content: "−"; }
.job__more[open] summary { margin-bottom: 10px; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.proj { display: flex; flex-direction: column; border: 1px solid var(--line); background: #fff; transition: border-color 0.3s, transform 0.3s var(--ease); }
.proj:hover { border-color: #c9c9c5; transform: translateY(-2px); }
.proj__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--soft); position: relative; }
.proj__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.6s var(--ease); }
a.proj__media:hover img { transform: scale(1.03); }
.proj__body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.proj__body p { color: var(--ink-2); font-size: 15.5px; }
.proj__body .arrow { margin-top: auto; }
.proj__tag { font-size: 12.5px !important; font-weight: 700; color: var(--red) !important; margin-bottom: 8px; }
.proj h3 { font-size: 21px; letter-spacing: -0.03em; margin-bottom: 10px; }
.proj__credit { font-size: 12px !important; color: var(--muted) !important; margin: 12px 0 0; }
.proj--wide { grid-column: span 3; flex-direction: row; }
.proj--wide .proj__media { flex: 1.25; aspect-ratio: auto; min-height: 320px; }
.proj--wide .proj__body { flex: 1; padding: 32px; justify-content: center; }
.proj--wide h3 { font-size: 28px; }
.proj__media--teaser { overflow: hidden; }
.proj__media--teaser img { filter: grayscale(.5) brightness(.7) blur(7px); transform: scale(1.08); }
.proj--soon:hover { transform: none; border-color: var(--line); }
.proj--soon:hover .proj__media img { transform: scale(1.08); }
.teaser__q { position: absolute; z-index: 2; left: 50%; top: 44%; transform: translate(-50%, -50%); font-size: 110px; font-weight: 900; line-height: 1; color: #fff; text-shadow: 0 4px 30px rgba(0,0,0,.35); }
.teaser__hand { position: absolute; z-index: 2; left: 0; right: 0; bottom: 18px; text-align: center; font: 600 30px/1 Caveat, "Bradley Hand", cursive; color: #fff; transform: rotate(-3deg); }
.proj__media--ui { display: flex; align-items: center; justify-content: center; padding: 18px; }

.flow { display: flex; flex-wrap: wrap; gap: 8px 0; justify-content: center; }
.flow li { position: relative; font-size: 12.5px; font-weight: 600; padding: 7px 10px; background: #fff; margin-right: 22px; border: 1px solid var(--line); }
.flow li:not(:last-child)::after { content: "→"; position: absolute; right: -17px; color: var(--muted); }
.flow li.is-on { background: var(--red); border-color: var(--red); color: #fff; }

.compare { --pos: 50%; position: absolute; inset: 0; overflow: hidden; background: #111; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.compare__handle span { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; background: #fff; }
.compare__handle span::before, .compare__handle span::after { content: ""; position: absolute; top: 50%; margin-top: -5px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.compare__handle span::before { left: 7px; border-right: 6px solid var(--ink); }
.compare__handle span::after { right: 7px; border-left: 6px solid var(--ink); }
.compare__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.compare:has(.compare__range:focus-visible) { outline: 2px solid var(--red); outline-offset: -2px; }
.compare__label { position: absolute; top: 10px; padding: 4px 8px; font-size: 11.5px; font-weight: 700; background: #fff; color: var(--ink); pointer-events: none; }
.compare__label--l { left: 10px; }
.viztabs { display: flex; border-bottom: 1px solid var(--line); }
.viztabs button { flex: 1; padding: 11px 6px; border: 0; border-right: 1px solid var(--line); background: #fff; font: 700 14px var(--font); color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.viztabs button:last-child { border-right: 0; }
.viztabs button:hover { color: var(--ink); }
.viztabs button.is-on { background: var(--ink); color: #fff; }
.compare__label--r { right: 10px; background: var(--red); color: #fff; }

.mac { background: radial-gradient(120% 90% at 20% 0%, #c9d6f2, transparent 60%), radial-gradient(120% 100% at 100% 100%, #f2d2c9, transparent 60%), #e9e7f0; }
.mac__bar { position: absolute; top: 0; left: 0; right: 0; height: 24px; display: flex; align-items: center; gap: 12px; padding: 0 12px; background: rgba(255, 255, 255, 0.6); font-size: 11.5px; font-weight: 600; }
.mac__apple { width: 9px; height: 11px; border-radius: 50% 50% 45% 45%; background: var(--ink); }
.mac__opt { margin-left: auto; color: var(--red); }
.mac__pill { position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: #121318; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25); }
.mac__dot { width: 8px; height: 8px; border-radius: 50%; background: #ff4d4d; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.wave { display: flex; align-items: center; gap: 3px; height: 22px; }
.wave i { width: 3px; height: 30%; border-radius: 3px; background: #fff; animation: wave 1.1s ease-in-out infinite; }
.wave i:nth-child(2n) { animation-delay: -0.3s; } .wave i:nth-child(3n) { animation-delay: -0.6s; } .wave i:nth-child(4n) { animation-delay: -0.15s; } .wave i:nth-child(5n) { animation-delay: -0.8s; }
@keyframes wave { 0%, 100% { height: 20%; } 50% { height: 100%; } }

/* Skills */
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 36px; }
.skill { border-top: 2px solid var(--ink); padding-top: 12px; }
.skill h3 { font-size: 18px; margin-bottom: 8px; }
.skill p { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* Education & honors */
.edu { display: grid; gap: 0; }
.edu__item { padding: 22px 0; border-top: 1px solid var(--line); }
.edu__item:first-child { border-top: 2px solid var(--ink); }
.edu__when { font-size: 14px; font-weight: 700; color: var(--red); }
.edu__item h3 { font-size: 21px; margin: 4px 0 4px; }
.edu__item p { margin: 0; color: var(--ink-2); }
.edu__item--cert { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; }
.edu__item--cert img { border: 1px solid var(--line); }
.honors { grid-column: 2; margin-top: 56px; }
.honors__title { font-size: 21px; margin-bottom: 16px; }
.honors__grid { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.honors__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.honors ul li { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15.5px; font-weight: 500; }
.honors ul li:first-child { border-top: 2px solid var(--ink); }
.honors ul li span { color: var(--red); font-weight: 700; font-size: 13.5px; }

/* Off the field */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); }
.gallery figcaption { font-size: 15px; line-height: 1.45; color: var(--ink-2); margin-top: 10px; }
.gallery figcaption b { display: block; font-size: 13px; font-weight: 800; color: var(--red); margin-bottom: 2px; }

/* Contact & footer */
.contact { padding: clamp(80px, 10vw, 130px) 0; background: var(--ink); color: #fff; }
.contact .sec__num { margin-bottom: 14px; }
.contact__big { font-weight: 900; font-size: clamp(56px, 10vw, 140px); letter-spacing: -0.06em; line-height: 0.88; margin-bottom: 32px; }
.contact__row { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.contact__row p { margin: 0; max-width: 32em; color: #cfcfcf; font-size: 18px; }
.contact__links { display: flex; flex-wrap: wrap; gap: 12px; }
.contact .btn { background: #fff; color: var(--ink); border-color: #fff; }
.contact .btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.contact .btn--ghost { background: transparent; color: #fff; border-color: #555; }
.footer { padding: 22px 0 36px; background: var(--ink); color: #8a8a8a; border-top: 1px solid #222; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; }
.footer p { margin: 0; font-size: 13px; }

/* ---------- Project pages ---------- */
.pj__head { padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(36px, 5vw, 56px); }
.pj__back { display: inline-block; margin-bottom: clamp(28px, 4vw, 48px); font-size: 15px; font-weight: 600; text-decoration: none; color: var(--ink-2); }
.pj__back:hover { color: var(--red); }
.pj__tag { font-size: 14px; font-weight: 700; color: var(--red); margin-bottom: 14px; }
.pj h1 { font-size: clamp(48px, 8vw, 104px); font-weight: 900; letter-spacing: -0.055em; line-height: 0.92; margin-bottom: 26px; }
.pj__lede { font-size: clamp(19px, 1.8vw, 24px); line-height: 1.4; max-width: 33em; margin-bottom: 28px; }
.pj__why { font-size: 17.5px; line-height: 1.6; max-width: 38em; color: var(--ink-2); margin-bottom: 28px; }
.pj__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: clamp(40px, 5vw, 60px); }
.pj__facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 24px; margin: 0; }
.pj__facts div { border-top: 2px solid var(--ink); padding-top: 10px; }
.pj__facts dt { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.pj__facts dd { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.35; }
.pj__hero { margin-bottom: clamp(56px, 7vw, 96px); }
.pj figure img { width: 100%; border: 1px solid var(--line); background: var(--soft); }
.pj figcaption { font-size: 13.5px; color: var(--muted); margin-top: 10px; }
.pj__sec { padding: clamp(44px, 5.5vw, 72px) 0; border-top: 1px solid var(--line); }
.pj__sec h2 { font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -0.04em; }
.pj__text { max-width: 44em; min-width: 0; }
.pj__text > p { color: var(--ink-2); }
.pj__text .pj__big { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.45; color: var(--ink); }
.pj__list { margin: 0 0 1em; }
.pj__list li { position: relative; padding-left: 18px; margin-bottom: 10px; color: var(--ink-2); }
.pj__list li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 7px; height: 2px; background: var(--red); }
.pj__list b { color: var(--ink); }
.pj__table { width: 100%; border-collapse: collapse; margin: 6px 0 22px; font-size: 15.5px; }
.pj__table th, .pj__table td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.pj__table th { font-size: 13px; font-weight: 700; color: var(--muted); border-bottom: 2px solid var(--ink); }
.pj__table .num { text-align: right; white-space: nowrap; }
.pj__table .hl { color: var(--red); font-weight: 700; }
.pj__code { margin: 4px 0 20px; padding: 16px 18px; background: var(--soft); font: 500 15px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; }
.pj__figs { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 24px; margin-top: 8px; }
.pj__figs .wide { grid-column: span 2; }
.pj__box { display: flex; align-items: center; justify-content: center; aspect-ratio: 1000 / 903; padding: 24px; background: #dedede; border: 1px solid var(--line); }
.pj .pj__box img { width: auto; max-width: 100%; border: 0; background: none; }
.pj__note { padding: 16px 18px; border-left: 3px solid var(--red); background: var(--soft); color: var(--ink-2); font-size: 15.5px; }
.pj__next { border-top: 1px solid var(--line); padding-top: clamp(44px, 5.5vw, 72px); padding-bottom: clamp(72px, 9vw, 120px); }
.pj__next span { display: block; font-size: 14px; font-weight: 700; color: var(--red); margin-bottom: 12px; }
.pj__next a { font-size: clamp(34px, 5.4vw, 64px); font-weight: 900; letter-spacing: -0.05em; line-height: 1; text-decoration: none; }
.pj__next a::after { content: " →"; color: var(--red); }
.pj__next a:hover { color: var(--red); }
.proj__links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: auto; }
.proj__links .arrow { margin-top: 0; }
.proj__links .ext { font-size: 15px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.proj__links .ext:hover { color: var(--red); }
.proj h3 a { text-decoration: none; }
.proj h3 a:hover { color: var(--red); }

/* ---------- Keep it up ---------- */
.keepup { background: var(--ink); color: #fff; padding: clamp(56px, 7vw, 96px) 0; border-top: 1px solid #222; }
.keepup__inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: stretch; }
.keepup__eyebrow { font-size: 14px; font-weight: 700; color: var(--red); margin-bottom: 8px; }
.keepup__title { font-size: clamp(36px, 4.4vw, 56px); font-weight: 900; letter-spacing: -0.05em; margin-bottom: 12px; }
.keepup__how { color: #bdbdbd; max-width: 26em; margin-bottom: 22px; }
.keepup__board { list-style: none; margin: 0 0 18px; padding: 0; counter-reset: rank; max-width: 340px; }
.keepup__board li { counter-increment: rank; display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid #2a2a2a; font-size: 15.5px; }
.keepup__board li::before { content: counter(rank); color: #8a8a8a; font-weight: 700; }
.keepup__board li b { font-weight: 800; }
.keepup__board li em { font-style: normal; color: #8a8a8a; font-size: 13px; margin-left: 6px; }
.keepup__board li.is-you { color: #ffd23f; }
.keepup__form { max-width: 340px; }
.keepup__got { margin: 0 0 10px; font-weight: 700; }
.keepup__row { display: flex; gap: 8px; }
.keepup__row input { flex: 1; min-width: 0; padding: 12px 12px; border: 1.5px solid #555; background: #151515; color: #fff; font: 600 15px var(--font); }
.keepup__row input:focus { outline: none; border-color: #fff; }
.keepup__field { position: relative; min-height: 340px; background: radial-gradient(120% 90% at 50% 100%, #1f3a26, #121614 70%); overflow: hidden; touch-action: manipulation; }
.keepup__ground { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: #2f6b3b; }
.keepup__score { position: absolute; top: 14px; left: 18px; margin: 0; font-size: 56px; font-weight: 900; letter-spacing: -0.05em; line-height: 1; color: rgba(255,255,255,.9); }
.keepup__msg { position: absolute; top: 24px; right: 18px; margin: 0; font-size: 14px; font-weight: 700; color: #bdbdbd; }
.keepup__ball { position: absolute; left: 0; top: 0; width: 52px; height: 52px; padding: 0; border: 0; background: none; cursor: pointer; will-change: transform; -webkit-tap-highlight-color: transparent; }
.keepup__ball svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 8px 10px rgba(0,0,0,.4)); }
.keepup__ball:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 50%; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .projects { grid-template-columns: 1fr 1fr; }
  .proj--wide { grid-column: span 2; }
  .grid { grid-template-columns: 200px 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__menu { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; background: #fff; border-bottom: 1px solid var(--line); display: none; }
  .nav__menu.is-open { display: flex; }
  .nav__links { flex-direction: column; gap: 0; }
  .nav__links a { display: block; padding: 12px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  .nav__cta { padding-top: 14px; font-size: 17px; }
  .hero__grid { grid-template-columns: 1fr; }
  .show__slide figcaption { right: auto; left: var(--gutter); bottom: 58px; }
  .hero__photo { max-width: 340px; order: -1; }
  .grid { grid-template-columns: 1fr; }
  .sec__head { position: static; margin-bottom: 24px; }
  .facts { grid-column: 1; }
  .job { grid-template-columns: 1fr; gap: 8px; }
  .job__meta { flex-direction: row; gap: 12px; }
  .projects { grid-template-columns: 1fr; margin-top: 32px; }
  .proj--wide { grid-column: auto; flex-direction: column; }
  .proj--wide .proj__media { min-height: 0; aspect-ratio: 4 / 3; }
  .proj--wide .proj__body { padding: 20px 22px 24px; }
  .proj--wide h3 { font-size: 22px; }
  .skills { grid-template-columns: 1fr; }
  .edu__item--cert { grid-template-columns: 1fr; }
  .edu__item--cert img { max-width: 280px; }
  .honors { grid-column: 1; }
  .honors__grid { grid-template-columns: 1fr; }
  .contact__row { grid-template-columns: 1fr; }
  .keepup__inner { grid-template-columns: 1fr; }
  .keepup__field { min-height: 300px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
  .pillars { grid-template-columns: 1fr 1fr; gap: 26px 18px; }
  .timeline { grid-template-columns: 1fr; }
  .timeline::before { left: 7px; right: auto; top: 8px; bottom: 8px; width: 2px; height: auto; }
  .timeline li { padding: 0 0 22px 34px; }
  .timeline li:last-child { padding-bottom: 0; }
  .pj__facts { grid-template-columns: 1fr 1fr; gap: 18px 20px; }
  .pj__figs { grid-template-columns: 1fr; }
  .pj__code { font-size: 12.5px; }
  .pj__figs .wide { grid-column: auto; }
  .pj__sec .grid h2 { margin-bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .show__slide.is-on img { animation: none; transform: none; }
  .show__slide { transition: none; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .wave i, .mac__dot { animation: none !important; }
  .proj, .proj__media img { transition: none; }
}

.honors li a { text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color .2s, color .2s; }
.honors li a::after { content: "\00a0↗"; color: var(--muted); font-size: .85em; }
.honors li a:hover { color: var(--red); border-color: var(--red); }

.footer__secret { color: #5c5c5c; text-decoration: none; transition: color .2s; }
.footer__secret:hover { color: #fff; }
.keepup--page { min-height: calc(100svh - 64px); display: flex; align-items: center; }
.keepup--page .keepup__inner { width: 100%; }
.keepup--page .keepup__field { min-height: min(62vh, 520px); }
.keepup__back { margin-top: 26px; }
.keepup__back .arrow { color: #fff; }

.contact__head { display: flex; align-items: center; gap: clamp(20px, 3vw, 36px); margin-bottom: 32px; }
.contact__head .contact__big { margin-bottom: 0; }
.contact__photo { width: clamp(96px, 11vw, 150px); height: clamp(96px, 11vw, 150px); border-radius: 50%; object-fit: cover; flex: none; }
