:root {
  --bg: #0a0a0b;
  --fg: #f2f1ee;
  --mute: rgba(242, 241, 238, 0.55);
  --line: rgba(242, 241, 238, 0.14);
  --glass: rgba(28, 28, 31, 0.62);
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", Inter, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(16px, 2vw, 28px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.45 var(--sans);
  letter-spacing: -0.005em;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  touch-action: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
.label { display: block; color: var(--mute); }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; border-radius: 4px; }

/* ---------- Canvas & atmosphere ---------- */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.vignette {
  position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0,0,0,0.55) 100%);
}

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  display: grid; place-items: center;
  clip-path: inset(0 0 0 0); transition: clip-path 1.1s cubic-bezier(0.76, 0, 0.24, 1), visibility 1.1s;
}
.loader__center { display: grid; justify-items: center; gap: 22px; transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.6s; }
.loader__mark { width: 112px; height: auto; overflow: visible; }
.lm { fill: var(--fg); fill-opacity: 0; stroke: var(--fg); stroke-width: 7; stroke-dasharray: 1; stroke-dashoffset: 1; stroke-linejoin: round;
  animation: lmDraw 1.3s cubic-bezier(0.65, 0, 0.35, 1) forwards, lmFill 0.7s ease forwards; }
.lm--m { animation-delay: 0.1s, 1.15s; }
.lm--s { animation-delay: 0.45s, 1.35s; }
.lm-sheen { animation: lmSheen 1.6s cubic-bezier(0.45, 0, 0.2, 1) 1.8s infinite; }
@keyframes lmDraw { to { stroke-dashoffset: 0; } }
@keyframes lmFill { to { fill-opacity: 1; stroke-width: 0; } }
@keyframes lmSheen { 0% { transform: translateX(0); } 70%, 100% { transform: translateX(1050px); } }
.loader__bar { width: 112px; height: 1px; background: rgba(242, 241, 238, 0.14); overflow: hidden; border-radius: 1px; }
.loader__bar span { display: block; height: 100%; background: var(--fg); transform-origin: left; transform: scaleX(0); }
.loader__count {
  position: absolute; bottom: calc(var(--pad) - 0.12em); right: var(--pad);
  font: italic 400 clamp(56px, 9vw, 120px)/1 var(--serif); color: var(--fg); font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
/* Signature preloader: written left to right with a soft wet-ink edge */
.loader__sig { width: min(42vw, 520px); height: auto; overflow: visible; }
.sig-ghost { fill: #fff; opacity: 0.06; }
.sig-ink { fill: #fff; filter: drop-shadow(0 0 10px rgba(255,255,255,0.25)); }
.sig-pen { animation: sigWrite 1.45s cubic-bezier(0.55, 0.05, 0.35, 1) 0.1s forwards; }
@keyframes sigWrite { to { transform: translateX(1870px); } }
.loader__center { gap: 34px; }
.loader__bar { width: 140px; }
@media (prefers-reduced-motion: reduce) { .sig-pen { animation: none; transform: translateX(1870px); } }
/* Preloader ASCII background */
.loader__ascii { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.loader__center, .loader__count { position: relative; z-index: 1; }
.loader__count { position: absolute; }
/* MS monogram preloader: axis line splits the screen, the two halves slide in and draw,
   fill solid, a light sweeps across, then a soft glow breathes. ~1.6s total. */
.loader__ms { width: clamp(110px, 13vw, 168px); height: auto; overflow: visible; }
.ms-axis { stroke: #fff; stroke-width: 3; stroke-dasharray: 647; stroke-dashoffset: 647; opacity: .9;
  animation: msAxis .5s cubic-bezier(.7,0,.3,1) forwards, msFadeOut .4s ease 1.05s forwards; }
.ms-half { opacity: 0; animation: msIn .75s cubic-bezier(.16,1,.3,1) .2s forwards; }
.ms-half--m { --dx: -70px; --rot: -4deg; transform-origin: 300px 300px; }
.ms-half--s { --dx: 70px; --rot: 4deg; transform-origin: 400px 300px; }
.ms-line { fill: none; stroke: #fff; stroke-width: 5; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: msDraw .8s cubic-bezier(.65,0,.35,1) .2s forwards, msFadeOut .3s ease 1.1s forwards; }
.ms-fill { fill: #fff; opacity: 0; animation: msFill .45s ease .85s forwards; }
.ms-sheen { transform: skewX(-18deg); animation: msSheen .9s cubic-bezier(.45,0,.2,1) 1.05s forwards; mix-blend-mode: overlay; }
.ms-fill { filter: drop-shadow(0 0 1px #fff); }
.ms-glow { fill: #fff; opacity: 0; animation: msGlow 1.6s ease-in-out 1.2s infinite; }
.loader__ms { animation: msSettle 1.6s cubic-bezier(.16,1,.3,1) both; }
@keyframes msAxis { to { stroke-dashoffset: 0; } }
@keyframes msIn { from { opacity: 0; transform: translateX(var(--dx)) rotate(var(--rot)); } to { opacity: 1; transform: none; } }
@keyframes msDraw { to { stroke-dashoffset: 0; } }
@keyframes msFill { to { opacity: 1; } }
@keyframes msFadeOut { to { opacity: 0; } }
@keyframes msSheen { to { transform: translateX(1500px) skewX(-18deg); } }
@keyframes msGlow { 0%, 100% { opacity: .05; } 50% { opacity: .3; } }
@keyframes msSettle { from { transform: scale(.9); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .ms-axis, .ms-line, .ms-sheen, .ms-glow { display: none; }
  .ms-half { opacity: 1; animation: none; } .ms-fill { opacity: 1; animation: none; } .loader__ms { animation: none; }
}
body.is-leaving .loader__center { transform: translateY(-40px); opacity: 0; }
body:not(.is-loading) #loader { clip-path: inset(0 0 100% 0); visibility: hidden; }


/* ---------- Top bar ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; align-items: start; gap: 24px;
  padding: var(--pad); font-size: 13px; line-height: 1.35;
}
.brand { display: inline-flex; width: 42px; color: var(--fg); }
.mark { width: 42px; height: 38px; display: block; }
.top__meta--a { grid-column: 2; }
.top__meta--b { grid-column: 3; }
.top__nav { grid-column: 4; justify-self: end; text-align: left; }
.nav-links button { position: relative; }
.nav-links button::after, .link-u::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 0.45s var(--ease);
}
.nav-links button:hover::after, .nav-links button[aria-current="true"]::after,
.link-u:hover::after { transform: scaleX(1); transform-origin: left; }
.menu-btn { display: none; }
.mnav { display: none; }


/* ---------- Hero overlay ---------- */
.hero { position: fixed; inset: 0; z-index: 10; pointer-events: none; transition: opacity 0.7s var(--ease), transform 0.9s var(--ease); }
.hero > * { pointer-events: auto; }
.hero__intro {
  position: absolute; left: var(--pad); bottom: var(--name-h, 22vw);
  max-width: 440px; margin: 0; font-size: 15px; color: rgba(242,241,238,0.86);
}
.hero__intro strong { font-weight: 400; border-bottom: 1px solid currentColor; }
#explore { position: absolute; right: var(--pad); bottom: calc(var(--name-h, 22vw) + 4px); }
.hero__social { position: absolute; right: var(--pad); top: 50%; text-align: right; font-size: 13px; }
.hero__social a { text-decoration: none; position: relative; }
.bigname {
  position: absolute; left: 0; right: 0; bottom: var(--name-bottom, var(--pad)); margin: 0; text-align: center;
  font: italic 400 var(--name-size, 17vw)/1 var(--serif); letter-spacing: -0.035em; white-space: nowrap;
  pointer-events: none; user-select: none;
}
.bigname .ch { display: inline-block; transform: translateY(105%); transition: transform 1.2s var(--ease); }
body.is-ready .bigname .ch { transform: none; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 1s var(--ease) 0.5s, transform 1s var(--ease) 0.5s; }
body.is-ready .reveal { opacity: 1; transform: none; }
body.is-flying .hero { opacity: 0; transform: translateY(40px); pointer-events: none; }
body.is-flying .hero > * { pointer-events: none; }

/* ---------- Pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(20,20,22,0.45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 14px; transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.pill:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.3); }
.pill:active { transform: scale(0.97); }
.pill__icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); }
.pill--light { background: var(--fg); color: #111; border-color: var(--fg); padding: 0 16px; gap: 8px; }
.pill--light:hover { background: #fff; }
.pill--ghost { padding: 0 16px 0 12px; height: 34px; gap: 6px; }

/* ---------- HUD ---------- */
.hud {
  position: fixed; left: var(--pad); right: var(--pad); bottom: var(--pad); z-index: 12;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
body.is-flying .hud { opacity: 1; transform: none; pointer-events: auto; }
.hud__now { display: flex; align-items: flex-end; gap: 14px; text-align: left; }
.hud__i { font: italic 400 clamp(44px, 6vw, 72px)/0.8 var(--serif); font-variant-numeric: tabular-nums; }
.hud__t { display: flex; flex-direction: column; font: italic 400 22px/1.05 var(--serif); }
.hud__s { font: 400 12px/1.4 var(--sans); color: var(--mute); }
.hud__right { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--mute); }
.hud__now.swap .hud__i, .hud__now.swap .hud__t { animation: swap 0.5s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } }
.hint {
  position: fixed; left: 50%; bottom: calc(var(--pad) + 10px); transform: translateX(-50%); margin: 0; z-index: 14;
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  font: 500 16px/1 var(--sans); color: #fff; letter-spacing: 0;
  padding: 12px 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.22);
  background: rgba(10,10,11,0.72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  opacity: 0; transition: opacity 0.6s; pointer-events: none;
}
.hint kbd { font: 600 14px/1 var(--sans); color: #fff; min-width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 7px; border: 1px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.1); }
body.is-flying .hint.show { opacity: 1; }

/* ---------- Panel ---------- */
.box {
  position: fixed; z-index: 30; left: var(--pad); top: 84px; bottom: var(--pad); width: min(440px, calc(100vw - 2 * var(--pad)));
  display: flex; flex-direction: column; border-radius: 22px; border: 1px solid var(--line);
  background: var(--glass); backdrop-filter: blur(28px) saturate(140%); -webkit-backdrop-filter: blur(28px) saturate(140%);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  opacity: 0; transform: translateX(-24px) scale(0.98); pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
body.is-panel .box { opacity: 1; transform: none; pointer-events: auto; }
#gl { transition: filter 0.9s var(--ease); }
body.is-hero-panel #gl { filter: blur(2.5px) brightness(0.9); }
body.is-panel .hero { opacity: 0; transform: translateY(24px); pointer-events: none; }
body.is-panel .hero > * { pointer-events: none; }
.box__bar { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 6px; font-size: 12px; color: var(--mute); }
.box__tag { color: var(--mute); }
.box__nav { display: flex; gap: 8px; }
.box__nav [hidden] { display: none; }
#back-panel { animation: rise 0.4s var(--ease) both; }
.box__scroll { overflow-y: auto; padding: 14px 22px 26px; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: thin; }
.box h2 { font: italic 400 30px/1.08 var(--serif); letter-spacing: -0.01em; margin: 6px 0 12px; }
.box p { margin: 0 0 12px; color: rgba(242,241,238,0.8); }
.box .muted { color: var(--mute); }
.box section > * { animation: rise 0.6s var(--ease) both; }
.box section > *:nth-child(2) { animation-delay: 0.05s; }
.box section > *:nth-child(3) { animation-delay: 0.1s; }
.box section > *:nth-child(4) { animation-delay: 0.15s; }
.box section > *:nth-child(n+5) { animation-delay: 0.2s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.list { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.list button { width: 100%; display: grid; grid-template-columns: 66px 1fr auto; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); text-align: left; }
.list img { width: 66px; height: 50px; border-radius: 8px; object-fit: cover; display: block; transition: transform 0.5s var(--ease); }
.list button:hover img { transform: scale(1.06); }
.list .t { font: italic 400 23px/1.05 var(--serif); display: block; transition: transform 0.4s var(--ease); }
.list button:hover .t { transform: translateX(4px); }
.list .s { font-size: 12px; color: var(--mute); }
.list .n { font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }
.list--compact button { grid-template-columns: 34px 1fr auto; padding: 8px 0; }
.list--compact img { width: 34px; height: 26px; border-radius: 5px; }
.list--compact .t { font-size: 18px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; }
.grid2 .label { margin-bottom: 4px; font-size: 12px; }
.cta { margin-top: 18px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); }
.cta .label { font-size: 12px; }
.cta strong { display: block; font: italic 400 24px/1.1 var(--serif); margin: 4px 0 14px; }
.cta__row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.link-u { position: relative; text-decoration: none; }
.cover { width: 100%; border-radius: 14px; display: block; margin: 6px 0 16px; aspect-ratio: 4 / 3; object-fit: cover; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tags span { font-size: 12px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--mute); }
.pnav { display: flex; justify-content: space-between; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }

/* Form */
.form { display: grid; gap: 14px; margin-top: 8px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form label { display: grid; gap: 6px; font-size: 12px; color: var(--mute); }
.form input, .form textarea {
  font: inherit; font-size: 14px; color: var(--fg); background: rgba(255,255,255,0.05); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; outline: none; transition: border-color 0.3s, background 0.3s; width: 100%;
}
.form textarea { min-height: 96px; resize: vertical; }
.form input:focus, .form textarea:focus { border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.08); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font-size: 13px; padding: 8px 12px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); transition: all 0.25s; }
.chips button:hover { border-color: rgba(255,255,255,0.35); }
.chips button[aria-pressed="true"] { background: var(--fg); color: #111; border-color: var(--fg); }
.form .send { justify-self: start; }
.form .ok { font-size: 13px; color: #9fe6b8; margin: 0; }

.noscript { position: fixed; inset: auto 0 40% 0; text-align: center; }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  body { font-size: 14px; }
  .top { grid-template-columns: auto 1fr auto; gap: 12px; }
  .top__meta--a { grid-column: 2; }
  .top__meta--b, .top__nav { display: none; }
  .menu-btn { display: inline-flex; grid-column: 3; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); align-items: center; font-size: 13px; background: rgba(20,20,22,0.5); backdrop-filter: blur(10px); }
  .mnav { position: fixed; inset: 0; z-index: 19; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 var(--pad); background: rgba(10,10,11,0.86); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
  .mnav[hidden] { display: none; }
  .mnav > button { font: italic 400 54px/1.05 var(--serif); text-align: left; animation: rise 0.5s var(--ease) both; }
  .mnav > button:nth-child(2) { animation-delay: 0.05s; } .mnav > button:nth-child(3) { animation-delay: 0.1s; }
  .mnav__foot { margin-top: 30px; color: var(--mute); font-size: 13px; }
  .hero__intro { right: var(--pad); max-width: none; font-size: 14px; bottom: calc(var(--name-h, 22vw) + 64px); }
  #explore { left: var(--pad); right: auto; bottom: calc(var(--name-h, 22vw) + 12px); }
  .hero__social { top: auto; bottom: calc(var(--name-h, 22vw) + 18px); }
  .hero__social .label { display: inline; }
  .box { left: 8px; right: 8px; width: auto; top: 70px; bottom: 8px; border-radius: 20px; }
  .hud__i { font-size: 44px; }
  .hud__t { font-size: 18px; }
  .hud__seen { display: none; }
  .form .row { grid-template-columns: 1fr; }
  .hint { bottom: 92px; font-size: 15px; padding: 11px 16px; gap: 8px; }
  .hint kbd { min-width: 24px; height: 24px; font-size: 13px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .lm-sheen { display: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0ms !important; transition-duration: 0.001ms !important; transition-delay: 0ms !important; }
  .bigname .ch { transform: none; }
  .reveal { opacity: 1; transform: none; }
}

/* Legibility scrims behind fixed UI while flying */
.top::before, .hud::before {
  content: ""; position: fixed; left: 0; right: 0; pointer-events: none; z-index: -1; opacity: 0; transition: opacity 0.6s;
}
.top::before { top: 0; height: 130px; background: linear-gradient(rgba(10,10,11,0.85), rgba(10,10,11,0)); }
.hud::before { bottom: 0; height: 150px; background: linear-gradient(rgba(10,10,11,0), rgba(10,10,11,0.85)); }
body.is-flying .top::before, body.is-flying .hud::before { opacity: 1; }

/* About portrait card */
.me {
  position: relative; margin: 2px 0 20px; aspect-ratio: 5 / 4; border-radius: 16px; overflow: hidden; isolation: isolate;
  border: 1px solid var(--line);
  background:
    radial-gradient(60% 55% at 50% 58%, rgba(150, 160, 255, 0.26), rgba(150, 160, 255, 0) 70%),
    radial-gradient(rgba(255, 255, 255, 0.09) 0.9px, transparent 1.3px) 0 0 / 9px 9px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015));
}
.me::after { /* fade into the panel so the caption reads */
  content: ""; position: absolute; inset: auto 0 0 0; height: 46%; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(22, 22, 25, 0), rgba(22, 22, 25, 0.9));
}
.me img {
  position: absolute; left: 50%; bottom: -2%; height: 100%; width: auto; transform: translateX(-50%);
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
  transition: transform 1.2s var(--ease);
}
.me:hover img { transform: translateX(-50%) scale(1.025); }
.me figcaption { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 2; display: flex; flex-direction: column; gap: 2px; }
.me__name { font: italic 400 24px/1 var(--serif); }
.me__role { font-size: 12px; color: rgba(242, 241, 238, 0.7); }

/* ---------- About: fits the panel without scrolling ---------- */
.box[data-view="about"] .box__scroll { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; padding-bottom: 20px; }
.about { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.about .me { flex: 1 1 auto; min-height: 150px; max-height: 330px; aspect-ratio: auto; margin: 0 0 16px; }
.about .me img { height: 100%; bottom: -2%; }
.about h2 { font-size: clamp(24px, 3.3vh, 30px); margin: 0 0 8px; text-wrap: balance; }
.about > p { font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
.skills { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; }
.skills li { font-size: 12px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); color: rgba(242,241,238,0.82); background: rgba(255,255,255,0.03); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dt { font-size: 11px; color: var(--mute); margin-bottom: 2px; }
.facts dd { margin: 0; font-size: 13px; line-height: 1.3; }
.cta--compact { margin-top: 0; padding: 14px 16px; flex: none; }
.cta--compact strong { font-size: 21px; margin: 2px 0 12px; }
.cta--compact .cta__row { gap: 14px; }
.cta__links { margin-left: auto; display: flex; gap: 12px; font-size: 13px; }
.about > * { flex-shrink: 0; }
.about > .me { flex-shrink: 1; }
@media (max-height: 760px) {
  .about > p { font-size: 13px; }
  .about .me { min-height: 120px; }
}

/* Compact: keep the full-width head-and-shoulders card, tighten everything else */
.about--compact > .me { min-height: 150px; max-height: 260px; margin: 0 0 12px; }
.about--compact > .me img { height: 104%; bottom: -4%; transform: translateX(-46.5%); }
.about--compact > .me:hover img { transform: translateX(-46.5%) scale(1.025); }
.about--compact > .me figcaption { left: 14px; bottom: 11px; }
.about--compact > .me .me__name { font-size: 20px; }
.about--compact > h2 { margin: 0 0 8px; font-size: clamp(21px, 2.9vh, 26px); }
.about--compact > p { font-size: 13px; line-height: 1.45; margin-bottom: 10px; }
.about--compact .skills { gap: 5px; margin-bottom: 10px; }
.about--compact .skills li { font-size: 11px; padding: 4px 8px; }
.about--compact .facts { padding: 9px 0; margin-bottom: 10px; gap: 8px; }
.about--compact .facts dd { font-size: 12px; }
.about--compact .cta--compact { padding: 11px 14px; }
.about--compact .cta--compact strong { font-size: 18px; margin: 0 0 9px; }
/* Tight: very short screens — smaller card, drop the small extras */
.about--tight > .me { min-height: 112px; }
.about--tight > .me .me__role { display: none; }
.about--tight .cta--compact .label, .about--tight .cta--compact strong { display: none; }
.about--tight .cta--compact { padding: 10px 12px; }
.about--tight > .me { margin-bottom: 10px; }
.about--tight > h2 { margin-bottom: 6px; }
.about--tight .cta--compact .pill { height: 34px; font-size: 13px; }
.about--tight > h2 { font-size: 20px; }
.about--tight > p { font-size: 12.5px; line-height: 1.4; }
.about--tight .facts { padding: 8px 0; }

/* Work list with live-site links */
.list--work li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.list--work button { grid-template-columns: 96px minmax(0, 1fr); border-bottom: 0; padding: 12px 0; }
.list--work img { width: 96px; height: 72px; border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,0.35); }
.list--work .t { font-size: 24px; }
.list--work .s { display: block; margin-top: 2px; }
.site-link { font-size: 12px; color: var(--mute); text-decoration: none; white-space: nowrap; padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; transition: color 0.3s, border-color 0.3s, background 0.3s; }
.site-link:hover { color: var(--fg); border-color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.06); }
.visit { text-decoration: none; margin: 4px 0 14px; }
.cover-link { display: block; border-radius: 14px; overflow: hidden; margin: 6px 0 16px; }
.cover-link .cover { margin: 0; transition: transform 0.8s var(--ease); }
.cover-link:hover .cover { transform: scale(1.03); }
@media (max-width: 420px) {
  .list--work li { grid-template-columns: 1fr; gap: 0; padding-bottom: 10px; }
  .list--work .site-link { justify-self: start; margin-left: 108px; }
}

/* Work: big thumbnail cards */
.work-grid { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.work-card { min-width: 0; }
.work-card__title { min-width: 0; }
.work-card .site-link { max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.work-card__open { position: relative; display: block; width: 100%; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0,0,0,0.4); }
.work-card__img { display: block; aspect-ratio: 4 / 3; }
.work-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1s var(--ease); }
@media (hover: hover) { .work-card__open:hover .work-card__img img { transform: scale(1.04); } }
.work-card__open::after { content: "View project"; position: absolute; left: 12px; bottom: 12px; font-size: 12px; padding: 6px 12px; border-radius: 99px; background: rgba(10,10,11,0.72); backdrop-filter: blur(8px); opacity: 0; transform: translateY(6px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); }
@media (hover: hover) { .work-card__open:hover::after { opacity: 1; transform: none; } }
.work-card__open:focus-visible::after { opacity: 1; transform: none; }
.work-card__n { position: absolute; top: 10px; left: 10px; font: italic 400 17px/1 var(--serif); color: #fff; padding: 6px 10px 5px; border-radius: 99px; background: rgba(10,10,11,0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.work-card__meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 12px; }
.work-card__title { text-align: left; }
.work-card__title .t { display: block; font: italic 400 26px/1.05 var(--serif); }
.work-card__title .s { display: block; font-size: 12px; color: var(--mute); margin-top: 3px; }
.work-card .site-link { flex: none; }

/* Keep the flight HUD from showing through an open panel */
body.is-panel .hud__now { opacity: 0; pointer-events: none; transition: opacity 0.3s; }
@media (max-width: 820px) { body.is-panel .hud { opacity: 0; pointer-events: none; } }
.hint__touch { display: none; }
.hint__desk { display: inline-flex; align-items: center; gap: 8px; }
@media (hover: none) and (pointer: coarse) { .hint__desk { display: none; } .hint__touch { display: inline; } }

/* Mini: tiny phones (e.g. 320 x 568) — photo beside the heading, still head-and-shoulders */
.about--mini { display: grid; grid-template-columns: 116px minmax(0, 1fr); column-gap: 14px; align-content: start; }
.about--mini > * { grid-column: 1 / -1; }
.about--mini > .me { grid-column: 1; grid-row: 1; height: 132px; min-height: 0; max-height: none; flex: none; }
.about--mini > .me img { height: 108%; bottom: -6%; }
.about--mini > .me figcaption, .about--mini > .me::after { display: none; }
.about--mini > h2 { grid-column: 2; grid-row: 1; align-self: center; margin: 0 0 10px; }
.about--mini .skills { display: none; }
.about--mini > p { font-size: 12px; }
.about--mini > .me { height: 118px; }
.about--mini > p { line-height: 1.35; margin-bottom: 8px; }
.about--mini .facts { margin-bottom: 8px; padding: 7px 0; }
.about--mini > h2 { font-size: 19px; }

/* Project name label that follows the cursor over cards in the flight */
.card-tip {
  position: fixed; left: 0; top: 0; z-index: 15; pointer-events: none; white-space: nowrap;
  font: 500 14px/1 var(--sans); color: #fff; padding: 10px 14px; border-radius: 999px;
  background: rgba(30, 30, 33, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0; transition: opacity 0.2s;
}
.card-tip.show { opacity: 1; }
@media (hover: none) { .card-tip { display: none; } }
@media (max-width: 600px) { .loader__bar { width: 110px; } }
