/* ==========================================================================
   site.css: inner pages (Personal Info, Education & Achievements, Family)
   Light: white board, black parts, metal-gold highlights.
   Dark:  black board, ivory text, the same gold.
   ========================================================================== */
:root {
  --bg: #fbfaf6; --ink: #111111; --ink-2: #3b3832; --muted: #6e6a62;
  --panel: #ffffff; --panel-2: rgba(255, 255, 255, 0.86); --line: rgba(17, 17, 17, 0.11); --line-2: rgba(17, 17, 17, 0.24);
  --gold: #8f6a1f; --gold-hi: #d9ad4f; --gold-dim: rgba(176, 131, 39, 0.45);
  --solid: #111111; --on-solid: #ffffff; --pin: #111111; --node-line: transparent;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.05);
  --vig: radial-gradient(ellipse 70% 62% at 50% 50%, rgba(251, 250, 246, 0.6), transparent), radial-gradient(ellipse at 50% 50%, transparent 52%, rgba(20, 16, 10, 0.16) 78%, rgba(8, 6, 4, 0.4) 100%);
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}
:root[data-theme="dark"] {
  --bg: #0b0b0c; --ink: #f2ede2; --ink-2: #cfc8b8; --muted: #9c968a;
  --panel: #141414; --panel-2: rgba(20, 20, 20, 0.8); --line: rgba(242, 237, 226, 0.09); --line-2: rgba(242, 237, 226, 0.22);
  --gold: #d9ad4f; --gold-hi: #f1d38a; --gold-dim: rgba(217, 173, 79, 0.38);
  --solid: #f2ede2; --on-solid: #111111; --pin: #c9a063; --node-line: rgba(217, 173, 79, 0.45);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(217, 173, 79, 0.06);
  --vig: radial-gradient(ellipse 70% 62% at 50% 50%, rgba(217, 173, 79, 0.05), transparent), radial-gradient(ellipse at 50% 50%, transparent 48%, rgba(0, 0, 0, 0.45) 80%, rgba(0, 0, 0, 0.8) 100%);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--mono); -webkit-font-smoothing: antialiased; overflow: hidden; transition: background-color 0.5s ease, color 0.5s ease; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- background: circuit board + vignette ---------- */
#bg { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: var(--vig); }

/* ---------- shell ---------- */
.shell { position: relative; z-index: 2; height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: clamp(10px, 2vh, 20px); padding: clamp(14px, 2.6vh, 26px) clamp(18px, 4vw, 56px); }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand .mini { position: relative; width: 38px; height: 38px; background: #111; border-radius: 4px; flex: none; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--node-line); }
.brand .mini::before, .brand .mini::after { content: ""; position: absolute; z-index: -1; }
.brand .mini::before { left: 7px; right: 7px; top: -5px; bottom: -5px; background: repeating-linear-gradient(90deg, var(--gold-hi) 0 3px, transparent 3px 7px); }
.brand .mini::after { top: 7px; bottom: 7px; left: -5px; right: -5px; background: repeating-linear-gradient(180deg, var(--gold-hi) 0 3px, transparent 3px 7px); }
.brand .mini i { position: absolute; inset: 9px; border: 1px solid var(--gold-hi); border-radius: 2px; }
.brand b { display: block; font: 400 22px/1 var(--serif); }
.brand small { display: block; margin-top: 4px; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }

.top-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.nav { display: flex; flex-wrap: wrap; gap: 6px; }
.nav a {
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); background: var(--panel-2); border: 1px solid var(--line-2); padding: 10px 14px; border-radius: 2px;
  transition: transform 0.18s, border-color 0.18s, background 0.3s, color 0.3s;
}
.nav a em { font-style: normal; color: var(--gold); font-weight: 500; }
.nav a:hover { transform: translateY(-2px); border-color: var(--gold); }
.nav a[aria-current="page"] { background: var(--solid); border-color: var(--solid); color: var(--on-solid); cursor: default; }
.nav a[aria-current="page"] em { color: var(--gold-hi); }
:root[data-theme="dark"] .nav a[aria-current="page"] em { color: #8a6420; }
.nav a .sm { display: none; }
@media (max-width: 1380px) and (min-width: 861px) {
  .nav { gap: 4px; }
  .nav a { font-size: 10px; letter-spacing: 0.1em; padding: 9px 10px; gap: 7px; }
  .theme-btn .txt { display: none; }
  .brand small { display: none; }
}

/* page header */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.kicker { font-size: 11px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: 12px; }
.kicker::before { content: ""; width: 34px; height: 1px; background: var(--gold); }
.head h1 { margin-top: 8px; font: 400 clamp(46px, 5.4vw, 86px)/0.92 var(--serif); letter-spacing: -0.01em; }
.head h1 i, .metal {
  font-style: italic; padding: 0 0.1em 0.16em 0; margin-bottom: -0.16em; display: inline-block;
  background: linear-gradient(100deg, #6e4c14 0%, #b08327 22%, #e8c66e 34%, #b08327 46%, #7f5a1a 70%, #cfa043 88%, #6e4c14 100%);
  background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 7s linear infinite;
}
:root[data-theme="dark"] .head h1 i, :root[data-theme="dark"] .metal { background-image: linear-gradient(100deg, #a67a2a 0%, #d9ad4f 22%, #fff0c4 34%, #d9ad4f 46%, #a67a2a 70%, #f1d38a 88%, #a67a2a 100%); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -160% 0; } }
.head p { max-width: 430px; font-size: 13px; line-height: 1.7; color: var(--ink-2); text-align: right; }

/* ---------- panels ---------- */
.body { min-height: 0; overflow: hidden; scrollbar-width: none; display: grid; }
@media (max-height: 600px) and (min-width: 861px) { .body { overflow-y: auto; } }
.body::-webkit-scrollbar { display: none; }
.panel { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 3px; box-shadow: var(--shadow); transition: background-color 0.5s ease, border-color 0.5s ease; }
.panel.tick::before, .panel.tick::after { content: ""; position: absolute; width: 12px; height: 12px; border: 0 solid var(--gold); pointer-events: none; }
.panel.tick::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.panel.tick::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.label { display: block; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.label b { color: var(--muted); font-weight: 500; }
.todo { font-style: italic; color: var(--muted) !important; }
.empty { border-style: dashed !important; border-color: var(--gold-dim) !important; background: var(--panel-2) !important; box-shadow: none !important; }

/* the photo chip (same part as on the home page) */
.chip {
  position: relative; width: 100%; padding: 7% 7% 5%; background: linear-gradient(150deg, #1d201e 0%, #121413 55%, #0b0c0c 100%); border-radius: 8px;
  box-shadow: 0 40px 70px rgba(0, 0, 0, 0.38), 0 14px 26px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--node-line);
}
.chip .pins { position: absolute; background: repeating-linear-gradient(90deg, var(--pin) 0 6px, transparent 6px 14px); }
.chip .pins.t, .chip .pins.b { left: 13%; right: 13%; height: 13px; }
.chip .pins.t { top: -13px; } .chip .pins.b { bottom: -13px; }
.chip .pins.l, .chip .pins.r { top: 13%; bottom: 13%; width: 13px; background: repeating-linear-gradient(180deg, var(--pin) 0 6px, transparent 6px 14px); }
.chip .pins.l { left: -13px; } .chip .pins.r { right: -13px; }
.chip .die { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 2px; background: #060606; box-shadow: inset 0 0 0 1px rgba(217, 173, 79, 0.4); }
.chip .die img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chip .die .slot { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 18px; color: rgba(241, 211, 138, 0.75); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; line-height: 1.9;
  background: repeating-linear-gradient(45deg, #0b0b0b 0 10px, #080808 10px 20px); border: 1px dashed rgba(217, 173, 79, 0.35); }
.chip .die .slot b { display: block; font: italic 400 30px/1.1 var(--serif); letter-spacing: 0; text-transform: none; color: #f1d38a; margin-bottom: 6px; }
.chip .corner { position: absolute; width: 12px; height: 12px; border: 0 solid #f1d38a; z-index: 2; opacity: 0.85; }
.chip .corner.a { top: 6px; left: 6px; border-top-width: 1.5px; border-left-width: 1.5px; }
.chip .corner.d { bottom: 6px; right: 6px; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.chip .marking { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 12px; font-size: 9.5px; letter-spacing: 0.16em; line-height: 1.7; color: rgba(217, 173, 79, 0.8); text-transform: uppercase; }
.chip .marking i { width: 8px; height: 8px; border-radius: 50%; background: rgba(217, 173, 79, 0.55); margin-bottom: 4px; }
.fig { margin-top: 26px; text-align: center; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.fig b { color: var(--gold); font-weight: 600; }

/* ---------- personal info: the same composition as the home page ---------- */
.shell.noh { grid-template-rows: auto minmax(0, 1fr) auto; }
.pi { align-self: center; display: grid; grid-template-columns: minmax(0, 760px) auto; justify-content: center; align-items: center; gap: clamp(32px, 5vw, 90px); }
.pi-text { position: relative; }
.pi-text::before { content: ""; position: absolute; inset: -70px -90px -50px -90px; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 60% 58% at 45% 50%, var(--bg) 52%, transparent 100%); }
.pi-name { margin-top: 18px; font: 400 clamp(44px, min(6.4vw, 11vh), 108px)/0.9 var(--serif); letter-spacing: -0.01em; }
.pi-name i { display: block; padding-left: 0.42em; }
.pi-name i {
  font-style: italic; padding-bottom: 0.18em; margin-bottom: -0.18em; padding-right: 0.12em; width: max-content;
  background: linear-gradient(100deg, #6e4c14 0%, #b08327 22%, #e8c66e 34%, #b08327 46%, #7f5a1a 70%, #cfa043 88%, #6e4c14 100%);
  background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 7s linear infinite;
}
:root[data-theme="dark"] .pi-name i { background-image: linear-gradient(100deg, #a67a2a 0%, #d9ad4f 22%, #fff0c4 34%, #d9ad4f 46%, #a67a2a 70%, #f1d38a 88%, #a67a2a 100%); }
.pi-desc { margin-top: 22px; max-width: 580px; font-size: 14px; font-weight: 500; line-height: 1.7; color: var(--ink); }
.pi-contact { margin-top: clamp(20px, 3.4vh, 36px); display: flex; flex-wrap: wrap; gap: 8px 34px; max-width: 800px; }
.pi-mail { display: inline-flex; align-items: baseline; gap: 12px; text-decoration: none; color: var(--ink); }
.pi-mail span { font-size: 10.5px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.pi-mail b { font: 400 clamp(17px, min(1.5vw, 2.9vh), 23px)/1.15 var(--serif); font-weight: 400; background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1px no-repeat; transition: background-size 0.3s ease; }
a.pi-mail:hover b { background-size: 100% 1px; }
.facts { margin-top: clamp(22px, 4vh, 40px); max-width: 800px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 26px; }
.hob { list-style: none; display: grid; gap: 3px; margin-top: 2px; }
.hob li { position: relative; padding-left: 18px; }
.hob li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }
.fact.c6 { grid-column: span 6; } .fact.c7 { grid-column: span 7; } .fact.c2 { grid-column: span 2; } .fact.c3 { grid-column: span 3; } .fact.c4 { grid-column: span 4; } .fact.c5 { grid-column: span 5; } .fact.c8 { grid-column: span 8; } .fact.c12 { grid-column: 1 / -1; }
.fact { padding: 12px 0 11px; border-top: 1px solid var(--line-2); min-width: 0; }
.fact dd.todo { color: var(--muted) !important; }
.fact.w2 { grid-column: span 2; }
.fact.w3 { grid-column: 1 / -1; }
.fact dd.skills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; font: 500 10.5px/1 var(--mono); letter-spacing: 0.06em; }
.fact dd.skills span { padding: 5px 9px; border: 1px solid var(--gold-dim); border-radius: 999px; color: var(--ink); background: color-mix(in srgb, var(--bg) 70%, transparent); }
.fact dd.skills span:first-child { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
.fact dt { font-size: 10.5px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.fact dd { margin-top: 5px; font: 400 clamp(17px, min(1.6vw, 3.1vh), 25px)/1.15 var(--serif); color: var(--ink); overflow-wrap: anywhere; }
.fact dd a { text-decoration: none; background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1px no-repeat; transition: background-size 0.3s ease; }
.fact dd a:hover { background-size: 100% 1px; }
.fact dd.todo { font-style: italic; font-size: clamp(16px, 1.3vw, 19px); }
.pi .figure { position: relative; width: clamp(220px, min(28vw, 54vh), 440px); }
.pi .figure::before { content: ""; position: absolute; inset: -16%; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(217, 173, 79, 0.2), transparent 62%); animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.07); opacity: 0.6; } }
.pi .chipcol { padding: 16px; }
.pi .chip .pins { background: repeating-linear-gradient(90deg, var(--pin) 0 7px, transparent 7px 17px); }
.pi .chip .pins.l, .pi .chip .pins.r { background: repeating-linear-gradient(180deg, var(--pin) 0 7px, transparent 7px 17px); width: 16px; }
.pi .chip .pins.t, .pi .chip .pins.b { height: 16px; }
.pi .chip .pins.t { top: -16px; } .pi .chip .pins.b { bottom: -16px; } .pi .chip .pins.l { left: -16px; } .pi .chip .pins.r { right: -16px; }
.pi .chip .marking { font-size: 10px; }

/* ---------- about me ---------- */
.ab { align-self: center; display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 640px); justify-content: center; gap: clamp(28px, 4.5vw, 72px); align-items: center; }
.ab-intro { position: relative; }
.ab-intro::before { content: ""; position: absolute; inset: -60px -80px; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 62% 60% at 45% 50%, var(--bg) 50%, transparent 100%); }
.ab-title { margin-top: 14px; font: 400 clamp(42px, min(5.4vw, 10vh), 92px)/0.92 var(--serif); letter-spacing: -0.01em; }
.ab-title i {
  font-style: italic; display: inline-block; padding: 0 0.12em 0.18em 0; margin-bottom: -0.18em;
  background: linear-gradient(100deg, #6e4c14 0%, #b08327 22%, #e8c66e 34%, #b08327 46%, #7f5a1a 70%, #cfa043 88%, #6e4c14 100%);
  background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 7s linear infinite;
}
:root[data-theme="dark"] .ab-title i { background-image: linear-gradient(100deg, #a67a2a 0%, #d9ad4f 22%, #fff0c4 34%, #d9ad4f 46%, #a67a2a 70%, #f1d38a 88%, #a67a2a 100%); }
.ab-lead { margin-top: 18px; font: 400 clamp(18px, 1.55vw, 23px)/1.4 var(--serif); color: var(--ink); max-width: 560px; }
.ab-lead em { font-style: italic; color: var(--gold); }
.ab-story { margin-top: clamp(14px, 2.4vh, 22px); display: grid; gap: clamp(8px, 1.4vh, 12px); max-width: 580px; }
.ab-story p { font-size: 12.5px; line-height: 1.7; color: var(--ink); }
.ab-story em { font-style: italic; font-family: var(--serif); font-size: 1.2em; color: var(--gold); }
.ab-stats { margin-top: clamp(16px, 3vh, 26px); display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 clamp(20px, 2.6vw, 40px); }
.ab-stats div { border-top: 1px solid var(--line-2); padding-top: 10px; }
.ab-stats b { display: block; font: 400 clamp(30px, 3vw, 46px)/1 var(--serif); color: var(--ink); }
.ab-stats span { display: block; margin-top: 6px; font-size: 10px; font-weight: 600; letter-spacing: 0.16em; line-height: 1.6; text-transform: uppercase; color: var(--gold); }
.ab-notes { margin-top: clamp(14px, 2.6vh, 24px); display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 600px; }
.ab-note p { margin-top: 6px; font-size: 12px; line-height: 1.65; color: var(--ink); }
.ab-note .label { font-weight: 600; }
.ab-note em { font-style: italic; color: var(--gold); }
.ab-cv { display: inline-flex; align-items: baseline; gap: 14px; margin-top: clamp(14px, 2.6vh, 24px); text-decoration: none; color: var(--ink); }
.ab-cv span { font-size: 10.5px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.ab-cv b { font: 400 clamp(18px, 1.5vw, 22px)/1.15 var(--serif); background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1px no-repeat; transition: background-size 0.3s ease; }
.ab-cv:hover b { background-size: 100% 1px; }

.ab-h { font-size: 11px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; display: flex; align-items: center; gap: 12px; }
.ab-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-dim), transparent); }
.xp { list-style: none; position: relative; display: grid; gap: clamp(10px, 1.8vh, 16px); }
.xp::before { content: ""; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 7px; background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 3px); opacity: 0.35; }
.xp::after { content: ""; position: absolute; left: 21px; top: 20px; bottom: 20px; width: 3px; background: linear-gradient(180deg, transparent, var(--gold-hi), transparent); background-size: 100% 40%; background-repeat: no-repeat; animation: xprun 2.8s linear infinite; }
@keyframes xprun { from { background-position: 0 -60%; } to { background-position: 0 160%; } }
.xp-item { position: relative; display: grid; grid-template-columns: 46px 1fr; gap: 14px; align-items: start; }
.xp::before, .xp::after { z-index: 0; }
.xp-item::before { content: ""; position: absolute; z-index: 1; left: -5px; width: 50px; top: 20px; height: 24px; background: repeating-linear-gradient(180deg, var(--pin) 0 2px, transparent 2px 5px); }
.xp-node { position: relative; z-index: 2; margin-top: 12px; width: 40px; height: 40px; background: #111; border-radius: 3px; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: #d9ad4f; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--node-line); }
.xp-item.now .xp-node { background: linear-gradient(135deg, #d9ad4f, #b08327); color: #111; }
.xp-card { padding: 13px 18px 12px; }
.xp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.xp-top b { font: 400 clamp(18px, 1.5vw, 23px)/1.15 var(--serif); }
.xp-when { flex: none; font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.xp-co { display: block; margin-top: 3px; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.xp-card ul { list-style: none; margin-top: 8px; display: grid; gap: 4px; }
.xp-card li { position: relative; padding-left: 16px; font-size: 12px; line-height: 1.55; color: var(--ink); }
.xp-card li::before { content: ""; position: absolute; left: 1px; top: 0.6em; width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); }
.xp-card li em { font-style: italic; font-family: var(--serif); font-size: 1.15em; }
.xp-tech { display: block; margin-top: 8px; font-size: 10px; letter-spacing: 0.08em; color: var(--muted); }

/* ---------- education & achievements ---------- */
.edu { align-self: center; width: 100%; max-width: 1240px; justify-self: center; display: grid; grid-template-rows: 1fr auto; gap: clamp(14px, 2.4vh, 24px); }
.bus { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-content: center; }
.bus::before { content: ""; position: absolute; left: 10%; right: 10%; top: 17px; height: 7px; background: repeating-linear-gradient(180deg, var(--ink) 0 1px, transparent 1px 3px); opacity: 0.4; }
.bus::after { content: ""; position: absolute; left: 10%; right: 10%; top: 19px; height: 3px; background: linear-gradient(90deg, transparent, var(--gold-hi), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: busrun 2.6s linear infinite; }
@keyframes busrun { from { background-position: -60% 0; } to { background-position: 160% 0; } }
.stop { position: relative; display: flex; flex-direction: column; align-items: center; z-index: 1; }
.node { width: 40px; height: 40px; background: #111; border-radius: 3px; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: #d9ad4f; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--node-line); position: relative; }
.node::before { content: ""; position: absolute; inset: -5px 8px; background: repeating-linear-gradient(90deg, var(--pin) 0 2px, transparent 2px 5px); z-index: -1; }
.stop.now .node { background: linear-gradient(135deg, #d9ad4f, #b08327); color: #111; box-shadow: 0 0 0 6px rgba(217, 173, 79, 0.25), 0 6px 18px rgba(176, 131, 39, 0.5); animation: now 1.6s ease-in-out infinite; }
@keyframes now { 50% { box-shadow: 0 0 0 12px rgba(217, 173, 79, 0.08), 0 6px 18px rgba(176, 131, 39, 0.5); } }
.stop .panel { margin-top: 14px; width: 100%; min-height: clamp(150px, 24vh, 210px); padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.stop h2 { font: 400 clamp(19px, 1.6vw, 24px)/1.12 var(--serif); }
.stop p { font-size: 11.5px; line-height: 1.55; color: var(--ink-2); }
.stop .tag { margin-top: auto; align-self: flex-start; font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; padding: 4px 8px; border: 1px solid var(--gold-dim); color: var(--gold); }
.stop.now .panel { border-color: var(--gold); }
.stop.now .tag { background: var(--solid); color: var(--gold-hi); border-color: var(--solid); }
:root[data-theme="dark"] .stop.now .tag { color: #6e4c14; }

.awards h3 { font-size: 11px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; display: flex; align-items: center; gap: 12px; }
.awards h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-dim), transparent); }
.awards .row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.award { padding: 14px 16px; display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: start; }
.medal { width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f6e1a6, #c99a3e 45%, #7a5418 100%); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #3a2a0c; box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.25), 0 4px 10px rgba(122, 84, 24, 0.4); }
.award b { display: block; font: 400 clamp(18px, 1.5vw, 22px)/1.1 var(--serif); }
.award p { margin-top: 5px; font-size: 11px; line-height: 1.55; color: var(--ink-2); }
.award.empty .medal { background: none; border: 1px dashed var(--gold-dim); color: var(--gold); box-shadow: none; }

/* ---------- family ---------- */
.family { align-self: center; display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 520px); justify-content: center; gap: clamp(28px, 4vw, 60px); align-items: center; }
.family .figure { width: min(100%, 58vh, 520px); justify-self: center; }
.family .chipcol { padding: 13px; }
.family .chip .die { aspect-ratio: 4 / 3; }
.regs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: center; }
.reg { padding: 16px 18px; }
.reg.w2 { grid-column: 1 / -1; }
.reg .val { display: block; margin-top: 6px; font: 400 clamp(19px, 1.75vw, 26px)/1.15 var(--serif); }

/* ---------- footer: prev / next ---------- */
.foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.foot .status { font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.foot .status i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80; animation: blink 1s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: 0.25; box-shadow: none; } }
.step { justify-self: start; display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 11.5px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; padding: 13px 20px; border-radius: 2px; transition: transform 0.18s, background 0.3s, color 0.3s, box-shadow 0.18s; }
.step em { font-style: normal; font-weight: 500; opacity: 0.75; }
.step.prev { background: var(--solid); color: var(--on-solid); border: 1px solid var(--solid); }
.step.prev:hover { transform: translateX(-3px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25); }
.step.next { justify-self: end; background: var(--gold); color: #111; border: 1px solid var(--gold); }
.step.next:hover { background: var(--gold-hi); border-color: var(--gold-hi); transform: translateX(3px); box-shadow: 0 10px 26px rgba(176, 131, 39, 0.4); }

/* ---------- boot sequence (after the warp, or on a normal load) ---------- */
[data-boot] { opacity: 0; transform: translateY(18px); filter: blur(6px); }
body.booted [data-boot] { opacity: 1; transform: none; filter: none; transition: opacity 0.7s ease calc(var(--i, 0) * 55ms), transform 0.8s cubic-bezier(.2, .8, .2, 1) calc(var(--i, 0) * 55ms), filter 0.7s ease calc(var(--i, 0) * 55ms); }
[data-boot].still { opacity: 1 !important; transform: none !important; filter: none !important; }
.scan { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 5; pointer-events: none; background: linear-gradient(90deg, transparent, var(--gold-hi), transparent); box-shadow: 0 0 18px var(--gold-hi); opacity: 0; }
body.booted .scan { animation: scan 1.1s cubic-bezier(.5, 0, .3, 1) 0.05s 1 both; }
@keyframes scan { 0% { top: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 0.8; } 100% { top: 100%; opacity: 0; } }

/* ---------- shorter laptop screens ---------- */
@media (max-height: 760px) and (min-width: 861px) {
  .head h1 { font-size: clamp(40px, 4.4vw, 64px); }
  .head p { font-size: 12px; line-height: 1.6; }
  .pi-name { font-size: clamp(46px, 5.6vw, 84px); margin-top: 12px; }
  .ab-title { font-size: clamp(42px, 4.6vw, 70px); }
  .ab-story p { font-size: 11.5px; line-height: 1.6; }
  .ab-lead { font-size: clamp(16px, 1.35vw, 19px); margin-top: 12px; }
  .ab-stats b { font-size: clamp(26px, 2.5vw, 36px); }
  .xp-card { padding: 9px 15px 9px; }
  .xp-card ul { margin-top: 5px; gap: 2px; }
  .xp-card li { font-size: 11px; line-height: 1.45; }
  .xp-tech { margin-top: 5px; }
  .xp { gap: 8px; }
  .pi-desc { margin-top: 14px; font-size: 12px; line-height: 1.6; }
  .facts { margin-top: 14px; }
  .pi-contact { margin-top: 14px; }
  .fact { padding: 8px 0 7px; }
  .fact dd { font-size: clamp(17px, 1.45vw, 21px); }
  .fig { margin-top: 18px; }
  .reg { padding: 11px 15px; }
  .reg .val { font-size: clamp(17px, 1.5vw, 22px); margin-top: 4px; }
  .stop .panel { min-height: 140px; padding: 11px 12px 10px; }
  .award { padding: 11px 14px; }
  .step { padding: 11px 16px; }
}

/* ---------- phones and tablets: allow scrolling ---------- */
@media (max-width: 860px) {
  body { overflow: auto; }
  .shell { height: auto; min-height: 100dvh; grid-template-rows: auto; }
  .top-r { width: 100%; justify-content: space-between; }
  .nav { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .nav a { justify-content: center; flex-direction: column; gap: 3px; padding: 8px 2px; font-size: 8.5px; letter-spacing: 0.04em; text-align: center; min-width: 0; }
  .nav a .lg { display: none; } .nav a .sm { display: inline; }
  .head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .head p { text-align: left; }
  .personal, .family { grid-template-columns: 1fr; }
  .pi { grid-template-columns: 1fr; padding: 0; gap: 34px; }
  .ab { grid-template-columns: 1fr; padding: 0; gap: 34px; }
  .ab-notes { grid-template-columns: 1fr; }
  .xp-top { flex-direction: column; gap: 4px; }
  .pi .figure { order: -1; justify-self: center; width: min(68vw, 320px); }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact.c2, .fact.c3 { grid-column: span 1; }
  .fact.c4, .fact.c5, .fact.c6, .fact.c7, .fact.c8, .fact.c12 { grid-column: 1 / -1; }
  .fact.w2 { grid-column: 1 / -1; }
  .bus { grid-template-columns: 1fr; gap: 10px; }
  .bus::before, .bus::after { display: none; }
  .stop { flex-direction: row; align-items: stretch; gap: 12px; }
  .stop .panel { margin-top: 0; min-height: 0; }
  .awards .row { grid-template-columns: 1fr 1fr; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot .status { display: none; }
  .step { padding: 12px 14px; font-size: 10.5px; letter-spacing: 0.1em; }
}
@media (max-width: 520px) {
  .awards .row, .regs { grid-template-columns: 1fr; }
  .pi-name i { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   Highlighted navigation: raised, high-contrast buttons so they are easy to
   spot; the 0x0… numbers are dimmed so the page names read first.
   ========================================================================== */
:root { --btn-edge: #111111; --btn-lift: 0 3px 0 #111111, 0 10px 22px rgba(0, 0, 0, 0.14); }
:root[data-theme="dark"] { --btn-edge: #d9ad4f; --btn-lift: 0 3px 0 #d9ad4f, 0 10px 22px rgba(0, 0, 0, 0.5); }

.nav a { background: var(--panel); border: 1.5px solid var(--btn-edge); color: var(--ink); font-weight: 700; box-shadow: var(--btn-lift); }
.nav a:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 5px 0 var(--gold), 0 12px 26px rgba(176, 131, 39, 0.25); }
.nav a[aria-current="page"] { background: var(--solid); color: var(--on-solid); border-color: var(--solid); box-shadow: 0 3px 0 var(--gold-hi), 0 0 0 3px rgba(217, 173, 79, 0.28), 0 10px 22px rgba(0, 0, 0, 0.2); }
.nav a em, .step em { color: inherit !important; opacity: 0.5 !important; font-weight: 500; }

.step { font-size: 12.5px; font-weight: 700; padding: 15px 24px; border-width: 1.5px; }
.step.prev { box-shadow: 0 4px 0 var(--gold), 0 12px 26px rgba(0, 0, 0, 0.22); }
.step.prev:hover { transform: translate(-3px, -2px); box-shadow: 0 6px 0 var(--gold), 0 14px 30px rgba(0, 0, 0, 0.28); }
.step.next { border-color: #8a6420; box-shadow: 0 4px 0 #6e4c14, 0 0 0 0 rgba(217, 173, 79, 0.55), 0 12px 26px rgba(176, 131, 39, 0.35); animation: nextGlow 2.4s ease-in-out infinite; }
.step.next:hover { transform: translate(3px, -2px); box-shadow: 0 6px 0 #6e4c14, 0 14px 30px rgba(176, 131, 39, 0.45); animation: none; }
@keyframes nextGlow { 50% { box-shadow: 0 4px 0 #6e4c14, 0 0 0 7px rgba(217, 173, 79, 0), 0 12px 26px rgba(176, 131, 39, 0.35); } }
.foot { padding-bottom: 4px; }

@media (max-height: 760px) and (min-width: 861px) { .step { padding: 12px 20px; } }
@media (max-width: 860px) { .step { padding: 12px 14px; font-size: 11px; } .nav a { box-shadow: 0 2px 0 var(--btn-edge); } }
@media (prefers-reduced-motion: reduce) { .step.next { animation: none; } }

/* ---------- personal info: two sections (personal data / skills & hobbies) ---------- */
.pi-name.one { font-size: clamp(40px, min(4.6vw, 8vh), 76px); margin-top: 10px; }
.pi-name.one i { display: inline-block; padding-left: 0; }
.pi-contact { margin-top: clamp(12px, 2vh, 22px); }
.pi-tabs { display: flex; gap: 8px; margin-top: clamp(14px, 2.4vh, 24px); }
.pi-tabs button { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font: 700 11.5px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); background: var(--panel); border: 1.5px solid var(--btn-edge, var(--ink)); border-radius: 2px; padding: 10px 16px; box-shadow: var(--btn-lift, none); transition: transform 0.18s, background 0.25s, color 0.25s; }
.pi-tabs button em { font-style: normal; opacity: 0.5; font-weight: 500; }
.pi-tabs button:hover { transform: translateY(-2px); border-color: var(--gold); }
.pi-tabs button.on { background: var(--gold); color: #111; border-color: var(--gold); box-shadow: 0 3px 0 #6e4c14, 0 10px 22px rgba(176, 131, 39, 0.3); }
.facts { margin-top: clamp(10px, 1.8vh, 18px); }
.pi-pane { display: none; }
.pi-pane.on { display: grid; animation: paneIn 0.4s ease; }
@keyframes paneIn { from { opacity: 0; transform: translateY(8px); } }
.fact dd small { display: block; margin-top: 2px; font: 500 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
[data-pipane="data"] .fact { padding: clamp(7px, 1.2vh, 11px) 0 clamp(6px, 1.1vh, 10px); }
[data-pipane="data"] .fact dd { font-size: clamp(16px, min(1.45vw, 2.7vh), 22px); }
@media (max-width: 860px) {
  .pi-name.one { font-size: clamp(36px, 10vw, 52px); }
  .pi-tabs button { padding: 9px 12px; font-size: 10px; letter-spacing: 0.1em; }
}

/* ==========================================================================
   Education & Achievements (3 pages) + proof viewer
   ========================================================================== */
.ea { align-self: stretch; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: clamp(12px, 2.2vh, 22px); width: 100%; max-width: 1280px; justify-self: center; min-height: 0; }
.ea-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.ea-title { margin-top: 8px; font: 400 clamp(38px, min(4.4vw, 8vh), 72px)/0.95 var(--serif); letter-spacing: -0.01em; }
.ea-title i { font-style: italic; display: inline-block; padding: 0 0.12em 0.16em 0; margin-bottom: -0.16em; background: linear-gradient(100deg, #a67a2a 0%, #d9ad4f 22%, #fff0c4 34%, #d9ad4f 46%, #a67a2a 70%, #f1d38a 88%, #a67a2a 100%); background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 7s linear infinite; }
:root:not([data-theme="dark"]) .ea-title i { background-image: linear-gradient(100deg, #6e4c14 0%, #b08327 22%, #e8c66e 34%, #b08327 46%, #7f5a1a 70%, #cfa043 88%, #6e4c14 100%); }
.ea-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.ea-steps a { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font: 700 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); background: var(--panel); border: 1.5px solid var(--btn-edge, var(--ink)); padding: 10px 14px; border-radius: 2px; box-shadow: var(--btn-lift, none); transition: transform 0.18s, border-color 0.18s; }
.ea-steps a em { font-style: normal; opacity: 0.5; font-weight: 500; }
.ea-steps a:hover { transform: translateY(-2px); border-color: var(--gold); }
.ea-steps a[aria-current="page"] { background: var(--gold); color: #111; border-color: var(--gold); box-shadow: 0 3px 0 #6e4c14; }

/* proof thumbnails */
.proof { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line-2); border-radius: 3px; overflow: hidden; background: #0c0c0c; cursor: zoom-in; aspect-ratio: 16 / 10; }
.proof img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease, filter 0.3s; }
.proof span { position: absolute; left: 8px; bottom: 8px; font: 700 9.5px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: #111; background: var(--gold-hi); padding: 4px 8px; border-radius: 2px; }
.proof:hover img { transform: scale(1.04); }
.proof:hover { border-color: var(--gold); }
.proof.none { display: grid; place-items: center; text-align: center; cursor: default; border: 1.5px dashed var(--gold-dim); background: var(--panel-2); padding: 10px; }
.proof.none b { display: block; font: 700 9.5px var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.proof.none span { position: static; background: none; color: var(--muted); font: italic 400 13px/1.35 var(--serif); letter-spacing: 0; text-transform: none; padding: 0; margin-top: 4px; }
.plink { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font: 700 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); border: 1px solid var(--line-2); padding: 6px 10px; border-radius: 2px; transition: border-color 0.2s, color 0.2s; }
.plink:hover { border-color: var(--gold); color: var(--gold); }
.pnote { font: 500 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* page 1: education timeline */
.edu5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-content: center; min-height: 0; }
.est { display: flex; flex-direction: column; gap: 6px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 3px; box-shadow: var(--shadow); min-height: 0; }
.est.empty { border-style: dashed; border-color: var(--gold-dim); background: var(--panel-2); box-shadow: none; }
.est.now { border-color: var(--gold); }
.est-top { display: flex; align-items: center; gap: 10px; }
.est .node { width: 34px; height: 34px; font-size: 10px; }
.est h2 { font: 400 clamp(18px, min(1.5vw, 2.8vh), 23px)/1.12 var(--serif); }
.est p { font-size: 11.5px; line-height: 1.5; color: var(--ink-2); }
.est-years { font: 600 10px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.est .tag { align-self: flex-start; font: 700 9.5px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; padding: 4px 8px; border: 1px solid var(--gold-dim); color: var(--gold); }
.est.now .tag { background: var(--gold); color: #111; border-color: var(--gold); }
.est .proof { margin-top: auto; }

/* page 2: awards & activities */
.aw-group h3 { font: 700 11px var(--mono); letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; display: flex; align-items: center; gap: 12px; }
.aw-group h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-dim), transparent); }
.ea .aw-wrap, .ea > .aw-group { min-height: 0; }
.aw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.aw-grid.one { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aw { display: grid; grid-template-columns: minmax(130px, 0.8fr) 1.4fr; gap: 14px; align-items: center; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 3px; box-shadow: var(--shadow); }
.aw .proof { aspect-ratio: 4 / 3; }
.aw-copy h2 { font: 400 clamp(18px, min(1.55vw, 2.9vh), 24px)/1.1 var(--serif); margin-top: 3px; }
.aw-sub { font: 600 10.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-top: 3px; }
.aw-copy p:not(.aw-sub) { font-size: 11.5px; line-height: 1.5; color: var(--ink-2); margin-top: 4px; }
.aw-stack { display: grid; gap: clamp(10px, 2vh, 18px); align-content: center; min-height: 0; }

/* page 3: work experience */
.jobs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-content: center; min-height: 0; }
.job { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 3px; box-shadow: var(--shadow); min-height: 0; }
.job-top { display: flex; gap: 12px; align-items: flex-start; }
.job .node { width: 38px; height: 38px; flex: none; background: linear-gradient(135deg, #d9ad4f, #b08327); color: #111; }
.job h2 { font: 400 clamp(18px, min(1.5vw, 2.8vh), 23px)/1.12 var(--serif); }
.job-co { display: block; margin-top: 3px; font: 500 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.job-when { font: 700 10px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.job ul { list-style: none; display: grid; gap: 4px; }
.job li { position: relative; padding-left: 15px; font-size: 11.5px; line-height: 1.5; color: var(--ink-2); }
.job li::before { content: ""; position: absolute; left: 1px; top: 0.6em; width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); }
.job li em { font-family: var(--serif); font-style: italic; font-size: 1.15em; color: var(--ink); }
.job-proofs { margin-top: auto; }
.job-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* full-screen proof viewer */
.lb { position: fixed; inset: 0; z-index: 2147482000; display: grid; place-items: center; padding: 4vh 4vw; background: rgba(5, 5, 6, 0.9); backdrop-filter: blur(6px); }
.lb[hidden] { display: none; }
.lb figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lb img { max-width: 92vw; max-height: 80vh; object-fit: contain; border-radius: 3px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); background: #111; }
.lb figcaption { max-width: 760px; text-align: center; font: 500 12px/1.6 var(--mono); letter-spacing: 0.06em; color: #e8e2d4; }
.lb-x { position: absolute; top: 18px; right: 18px; font: 700 11px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: #111; background: #d9ad4f; border: 0; border-radius: 2px; padding: 10px 14px; cursor: pointer; }

@media (max-height: 760px) and (min-width: 861px) {
  .est { padding: 10px; gap: 4px; } .est p { font-size: 11px; line-height: 1.4; }
  .aw { padding: 8px; gap: 10px; } .aw-copy p:not(.aw-sub) { font-size: 11px; line-height: 1.4; }
  .job { padding: 12px; gap: 6px; } .job li { font-size: 11px; line-height: 1.42; }
  .ea-steps a { padding: 8px 12px; }
}
@media (max-width: 1100px) and (min-width: 861px) { .edu5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; } .est h2 { font-size: 16px; } }
@media (max-width: 860px) {
  .ea-head { flex-direction: column; align-items: flex-start; }
  .edu5, .jobs { grid-template-columns: 1fr; }
  .aw-grid, .aw-grid.one { grid-template-columns: 1fr; }
  .aw { grid-template-columns: 120px 1fr; }
  .ea-steps a { padding: 8px 10px; font-size: 9.5px; letter-spacing: 0.08em; }
}
.aw-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.aw-grid.three .aw { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; }
.aw-grid.three .aw .proof { aspect-ratio: 3 / 4; }
@media (max-width: 1100px) and (min-width: 861px) { .aw-grid.three .aw { grid-template-columns: 1fr; } .aw-grid.three .aw .proof { aspect-ratio: 16 / 9; } }
@media (max-width: 860px) { .aw-grid.three { grid-template-columns: 1fr; } .aw-grid.three .aw { grid-template-columns: 120px 1fr; } .aw-grid.three .aw .proof { aspect-ratio: 4 / 3; } }
@media (max-height: 760px) and (min-width: 861px) { .aw-grid.three .aw .proof { aspect-ratio: 1 / 1; } .aw-grid.three .aw-copy h2 { font-size: 18px; } .aw-group h3 { margin-bottom: 6px; } .aw-grid { gap: 8px; } }

/* ---------- senior high card with its academic awards ---------- */
.edu5 { grid-template-columns: repeat(3, minmax(0, 0.9fr)) minmax(0, 1.55fr) minmax(0, 1fr); }
.shs-awards { list-style: none; display: grid; gap: 4px; margin: 2px 0 2px; }
.shs-awards li { position: relative; padding-left: 15px; font-size: 11.5px; line-height: 1.45; color: var(--ink-2); }
.shs-awards li::before { content: ""; position: absolute; left: 1px; top: 0.55em; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }
.shs-awards b { color: var(--gold); font-weight: 700; }
.proof3 { margin-top: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.proof3 .proof { aspect-ratio: 1 / 1; }
.proof3 .proof span { display: none; }
.proof3-l { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; font: 700 8.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-align: center; }
.aw-stack .aw-grid:not(.three) .aw .proof { aspect-ratio: 4 / 3; }
@media (max-width: 860px) { .edu5 { grid-template-columns: 1fr; } }

/* ---------- quick light sweep between the parts of a section ---------- */
html.sliding-out::after, html.sliding-in::after {
  content: ""; position: fixed; top: -10vh; bottom: -10vh; width: 38vw; z-index: 2147483000; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(217, 173, 79, 0.18) 30%, rgba(255, 236, 190, 0.85) 62%, rgba(255, 252, 240, 0.95) 70%, transparent 100%);
  filter: blur(10px); transform: skewX(-12deg);
}
html.dir-l.sliding-out::after, html.dir-l.sliding-in::after { background: linear-gradient(270deg, transparent 0%, rgba(217, 173, 79, 0.18) 30%, rgba(255, 236, 190, 0.85) 62%, rgba(255, 252, 240, 0.95) 70%, transparent 100%); }
html.dir-r.sliding-out::after { left: 0; animation: sweepOutR 0.5s cubic-bezier(.55, 0, .75, .4) forwards; }
html.dir-r.sliding-in::after  { left: 0; animation: sweepInR 0.65s cubic-bezier(.2, .6, .3, 1) forwards; }
html.dir-l.sliding-out::after { left: 0; animation: sweepOutL 0.5s cubic-bezier(.55, 0, .75, .4) forwards; }
html.dir-l.sliding-in::after  { left: 0; animation: sweepInL 0.65s cubic-bezier(.2, .6, .3, 1) forwards; }
@keyframes sweepOutR { from { transform: translateX(-40vw) skewX(-12deg); opacity: 0.4; } to { transform: translateX(62vw) skewX(-12deg); opacity: 1; } }
@keyframes sweepInR  { from { transform: translateX(62vw) skewX(-12deg); opacity: 1; } to { transform: translateX(110vw) skewX(-12deg); opacity: 0; } }
@keyframes sweepOutL { from { transform: translateX(100vw) skewX(12deg); opacity: 0.4; } to { transform: translateX(0) skewX(12deg); opacity: 1; } }
@keyframes sweepInL  { from { transform: translateX(0) skewX(12deg); opacity: 1; } to { transform: translateX(-45vw) skewX(12deg); opacity: 0; } }
html.dir-r.sliding-out .ea { animation: eaOutL 0.42s cubic-bezier(.5, 0, .75, .3) forwards; }
html.dir-l.sliding-out .ea { animation: eaOutR 0.42s cubic-bezier(.5, 0, .75, .3) forwards; }
html.dir-r.sliding-in .ea { animation: eaInR 0.6s cubic-bezier(.2, .7, .3, 1) both; }
html.dir-l.sliding-in .ea { animation: eaInL 0.6s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes eaOutL { to { transform: translateX(-7vw); opacity: 0; filter: blur(4px); } }
@keyframes eaOutR { to { transform: translateX(7vw); opacity: 0; filter: blur(4px); } }
@keyframes eaInR { from { transform: translateX(9vw); opacity: 0; filter: blur(4px); } }
@keyframes eaInL { from { transform: translateX(-9vw); opacity: 0; filter: blur(4px); } }
/* arriving by a sweep: show the parts at once (the slide is the entrance) */
html.sliding-in .ea [data-boot] { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }


/* ==========================================================================
   0x03 Achievements, one screen:
   15% photo rail (moving up) | 70% details | 15% photo rail (moving down)
   ========================================================================== */
.ach3 { align-self: stretch; width: 100%; max-width: 1500px; justify-self: center; min-height: 0; display: grid; grid-template-columns: 15% minmax(0, 1fr) 15%; gap: clamp(12px, 1.6vw, 26px); }

/* rails */
.rail { position: relative; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 8px; }
.rail-t { font: 700 9.5px var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); text-align: center; padding: 6px 4px; border: 1px solid var(--gold-dim); border-radius: 2px; background: var(--panel-2); }
.rail-win { position: relative; min-height: 0; overflow: hidden; border-radius: 3px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(180deg, transparent, #000 9%, #000 91%, transparent); }
.rail-track { display: flex; flex-direction: column; animation: railUp var(--dur, 60s) linear infinite; will-change: transform; }
.rail.r .rail-track { animation-name: railDown; }
.rail-set { display: flex; flex-direction: column; gap: 10px; padding-bottom: 10px; }
@keyframes railUp { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes railDown { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.rail:hover .rail-track, .rail:focus-within .rail-track { animation-play-state: paused; }
.rp { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line-2); border-radius: 3px; overflow: hidden; background: #0c0c0c; cursor: zoom-in; box-shadow: var(--shadow); }
.rp img { display: block; width: 100%; height: auto; transition: transform 0.4s ease; }
.rp:hover { border-color: var(--gold); }
.rp:hover img { transform: scale(1.05); }
.rp span { position: absolute; left: 6px; bottom: 6px; right: 6px; width: max-content; max-width: calc(100% - 12px); font: 700 8.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: #111; background: var(--gold-hi); padding: 3px 6px; border-radius: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* middle: details */
.mid { min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: clamp(8px, 1.6vh, 16px); align-content: center; }
.mid-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.mid .ea-title { font-size: clamp(30px, min(3.2vw, 5.6vh), 56px); margin-top: 4px; }
.ach-hint { font: 500 10.5px/1.5 var(--mono); letter-spacing: 0.04em; color: var(--muted); text-align: right; max-width: 300px; }
.ach-hint b { color: var(--gold); }
.ach-hint span { font-weight: 700; color: #111; background: var(--gold-hi); padding: 1px 5px; border-radius: 2px; }
.cx { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 3px; box-shadow: var(--shadow); padding: clamp(10px, 1.6vh, 16px) clamp(12px, 1.2vw, 18px); position: relative; }
.cx::before { content: ""; position: absolute; top: -1px; left: -1px; width: 12px; height: 12px; border-top: 2px solid var(--gold); border-left: 2px solid var(--gold); }
.cx-h { font: 700 10.5px var(--mono); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink); display: flex; align-items: center; gap: 10px; margin-bottom: clamp(8px, 1.3vh, 12px); }
.cx-h em { font-style: normal; color: #111; background: var(--gold); padding: 2px 6px; border-radius: 2px; letter-spacing: 0.1em; }
.cx-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-dim), transparent); }
.mid .label { font-size: clamp(8.5px, min(0.68vw, 1.4vh), 10px); font-weight: 600; letter-spacing: 0.14em; }

/* 01 education: a 5-stop timeline */
.schools { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; position: relative; }
.schools::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 2px; background: repeating-linear-gradient(90deg, var(--gold-dim) 0 6px, transparent 6px 10px); }
.schools::after { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-hi), transparent) no-repeat; background-size: 22% 100%; animation: busrun 3.4s linear infinite; }
.sc { position: relative; padding: 18px 12px 0 0; display: grid; gap: 2px; align-content: start; }
.sc::before { content: ""; position: absolute; left: 0; top: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--gold); z-index: 1; }
.sc.done::before { background: var(--gold); }
.sc.now::before { background: var(--gold-hi); box-shadow: 0 0 0 4px rgba(217, 173, 79, 0.25); animation: now 1.6s ease-in-out infinite; }
.sc b { font: 400 clamp(14px, min(1.2vw, 2.4vh), 21px)/1.12 var(--serif); }
.sc small { font-size: clamp(9px, min(0.7vw, 1.45vh), 10.5px); line-height: 1.35; color: var(--muted); }
.sc-y { font: 700 clamp(9px, min(0.7vw, 1.45vh), 10.5px) var(--mono); letter-spacing: 0.08em; color: var(--gold); margin-top: 2px; }
.sc-tag { display: inline-block; font-size: 0.85em; letter-spacing: 0.1em; text-transform: uppercase; color: #111; background: var(--gold-hi); padding: 1px 5px; border-radius: 2px; margin-left: 2px; }

/* 02 / 03 lists */
.cols { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(10px, 1.2vw, 16px); }
.items { list-style: none; display: grid; gap: clamp(6px, 1.2vh, 12px); }
.it { display: grid; gap: 2px; padding-bottom: clamp(6px, 1.2vh, 12px); border-bottom: 1px dashed var(--line-2); }
.it:last-child { border-bottom: 0; padding-bottom: 0; }
.it-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.it b { font: 400 clamp(15px, min(1.25vw, 2.5vh), 22px)/1.12 var(--serif); }
.it b i { font-style: italic; color: var(--gold); }
.it p { font-size: clamp(10px, min(0.78vw, 1.6vh), 12px); line-height: 1.42; color: var(--ink-2); }
.it p:empty { display: none; }
.pf { flex: none; cursor: zoom-in; font: 700 8.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: #111; background: var(--gold-hi); border: 0; border-radius: 2px; padding: 3px 7px; box-shadow: 0 2px 0 #6e4c14; transition: transform 0.15s; }
.pf:hover { transform: translateY(-1px); }
.sash { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.sash li { font: italic 400 clamp(11px, min(0.85vw, 1.75vh), 14px)/1 var(--serif); padding: 3px 7px 4px; border-radius: 2px; color: #3a2a08; background: linear-gradient(100deg, #f6e7bf, #fff8e6 45%, #ead39a); box-shadow: inset 0 0 0 1px rgba(143, 106, 31, 0.35); }
.links { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 3px; }
.links .plink { padding: 3px 7px; font-size: 9px; }

/* lightbox gallery arrows */
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid #d9ad4f; background: rgba(17, 17, 17, 0.7); color: #f1d38a; font: 700 20px var(--mono); cursor: pointer; }
.lb-nav:hover { background: #d9ad4f; color: #111; }
.lb-prev { left: 2vw; } .lb-next { right: 2vw; }
.lb.single .lb-nav, .lb.single .lb-n { display: none; }
.lb-n { font: 700 10.5px var(--mono); letter-spacing: 0.2em; color: #d9ad4f; }

@media (max-height: 720px) and (min-width: 861px) {
  .mid .kicker, .ach-hint { display: none; }
  .mid .ea-title { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .rail-win { overflow-y: auto; } .rail-track { animation: none; } }
@media (max-width: 860px) {
  .ach3 { grid-template-columns: 1fr; align-content: start; }
  .mid { order: 1; } .rail.l { order: 2; } .rail.r { order: 3; }
  .mid-head { flex-direction: column; align-items: flex-start; } .ach-hint { text-align: left; }
  .rail-win { height: 150px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
  .rail-track, .rail-set { flex-direction: row; }
  .rail-track { width: max-content; height: 100%; animation-name: railLeft; }
  .rail.r .rail-track { animation-name: railRight; }
  .rail-set { gap: 10px; padding: 0 10px 0 0; height: 100%; }
  .rp { width: auto; height: 100%; } .rp img { height: 100%; width: auto; }
  @keyframes railLeft { to { transform: translateX(-50%); } }
  @keyframes railRight { from { transform: translateX(-50%); } to { transform: translateX(0); } }
  .schools { grid-template-columns: 1fr; gap: 10px; }
  .schools::before, .schools::after { left: 5px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .schools::after { display: none; }
  .sc { padding: 0 0 0 24px; }
  .cols { grid-template-columns: 1fr; }
}
@media (min-width: 861px) {
  .ach3 { height: 100%; grid-template-rows: minmax(0, 1fr); }
  .rail-track { position: absolute; left: 0; right: 0; top: 0; }
}
/* compaction so the middle always fits */
.mid { gap: clamp(6px, 1.2vh, 14px); }
.cx { padding: clamp(8px, 1.3vh, 14px) clamp(12px, 1.1vw, 18px); }
.cx-h { margin-bottom: clamp(6px, 1vh, 10px); }
.items { gap: clamp(4px, 0.9vh, 10px); }
.it { padding-bottom: clamp(4px, 0.9vh, 10px); gap: 1px; }
.it p { line-height: 1.35; }
.sc { padding-top: 16px; }
@media (max-height: 820px) and (min-width: 861px) {
  .mid .kicker { display: none; }
  .mid .ea-title { margin-top: 0; font-size: clamp(26px, 4.6vh, 44px); }
  .it b { font-size: clamp(14px, min(1.15vw, 2.4vh), 19px); }
  .it p { font-size: clamp(9.5px, min(0.74vw, 1.5vh), 11px); }
  .sash li { font-size: clamp(10.5px, 1.6vh, 12.5px); padding: 2px 6px 3px; }
}
@media (max-height: 690px) and (min-width: 861px) {
  .mid-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mid { grid-template-rows: auto minmax(0, 1fr); }
  .sc small { line-height: 1.25; }
}
@media (max-width: 1280px) and (min-width: 861px) {
  .it b { font-size: clamp(13.5px, 1.15vw, 17px); }
  .it p { font-size: 9.5px; }
  .sc b { font-size: clamp(13px, 1.1vw, 16px); }
  .sash { gap: 3px; }
}
@media (max-height: 620px) and (min-width: 861px) {
  .links { display: none; }
  .cx-h { margin-bottom: 5px; }
  .sc { padding-top: 14px; }
}
@media (max-height: 690px) and (min-width: 861px) {
  .it { display: block; }
  .it-top { display: inline; }
  .it-top .label { display: inline; margin-right: 8px; }
  .it-top .pf { float: right; margin-left: 6px; }
  .it b { display: inline; }
  .it p, .it .sash { margin-top: 2px; }
}

/* ---------- v3: details 80% left, one proof gallery 20% right ---------- */
.ach3 { grid-template-columns: minmax(0, 1fr) 20%; max-width: 1480px; }
@media (max-width: 860px) { .ach3 { grid-template-columns: 1fr; } .rail.g { order: 2; } }
/* school photo + my photo in uniform, per school */
.sc-ph { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 6px; max-width: 200px; }
.slot { position: relative; aspect-ratio: 4 / 5; display: grid; place-content: center; text-align: center; gap: 2px; padding: 4px; border: 1.5px dashed var(--gold-dim); border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.slot b { font: 700 7.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.slot > span { font: italic 400 clamp(10px, 0.8vw, 12px)/1.15 var(--serif); color: var(--muted); }
.slot.pic { padding: 0; border: 1px solid var(--gold); cursor: zoom-in; display: block; }
.slot.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot.pic span { position: absolute; left: 3px; bottom: 3px; font: 700 7.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: #111; background: var(--gold-hi); padding: 2px 4px; border-radius: 2px; font-style: normal; }
.sc { padding-top: 16px; }
@media (max-height: 820px) and (min-width: 861px) { .sc-ph { max-width: none; width: min(100%, 15vh * 1.6); } }
@media (max-height: 690px) and (min-width: 861px) { .sc-ph { width: min(100%, 14vh * 1.6); margin-bottom: 4px; } .slot { aspect-ratio: 1 / 1; } }
@media (max-width: 860px) { .sc-ph { max-width: 220px; } }
@media (max-height: 820px) and (min-width: 861px) { .sc-ph { width: min(100%, 22vh + 5px); } .slot { aspect-ratio: 1 / 1; } }
@media (max-height: 760px) and (min-width: 861px) {
  .mid-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mid { grid-template-rows: auto minmax(0, 1fr); }
  .sc-ph { width: min(100%, 20vh + 5px); }
}
@media (max-height: 690px) and (min-width: 861px) { .sc-ph { width: min(100%, 22vh + 5px); } }
@media (min-height: 761px) and (max-height: 820px) and (min-width: 861px) { .sc-ph { width: min(100%, 19vh + 5px); } .mid .ea-title { font-size: clamp(26px, 4.2vh, 40px); } }

/* ---------- v4: bigger education section; SHS awards live under Informatics ---------- */
.mid { grid-template-rows: auto auto auto; }
.sc-ph { max-width: 250px; width: 100%; }
.sc-aw { list-style: none; display: grid; gap: 4px; margin-top: 6px; }
.sc-aw li { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 5px 7px; border: 1px solid var(--gold-dim); border-left: 3px solid var(--gold); border-radius: 2px; background: var(--panel-2); }
.sc-aw b { display: block; font: 700 clamp(9px, min(0.7vw, 1.45vh), 10.5px) var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.sc-aw span { display: block; font-size: clamp(9px, min(0.68vw, 1.4vh), 10.5px); line-height: 1.3; color: var(--ink-2); }
.sc-aw .pf { padding: 2px 5px; font-size: 8px; }
@media (max-height: 820px) and (min-width: 861px) { .sc-ph { width: min(100%, 25vh + 5px); } }
@media (max-height: 760px) and (min-width: 861px) { .sc-ph { width: min(100%, 24vh + 5px); } }
@media (max-height: 690px) and (min-width: 861px) { .sc-ph { width: min(100%, 23vh + 5px); } .sc-aw li { padding: 3px 6px; } }
@media (min-width: 861px) {
  .schools { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.55fr) minmax(0, 1fr); }
  .sc.done .sc-ph { max-width: none; width: min(100%, 250px); }
  .sc-aw { grid-template-columns: 1fr 1fr; gap: 5px; }
  .sc-aw li { align-items: flex-start; flex-direction: column; gap: 3px; position: relative; padding-right: 7px; }
  .sc-aw .pf { position: absolute; top: 4px; right: 5px; }
}
@media (max-height: 820px) and (min-width: 861px) { .sc.done .sc-ph { width: min(100%, 25vh + 5px); } }
@media (max-height: 760px) and (min-width: 861px) { .sc.done .sc-ph { width: min(100%, 24vh + 5px); } }
@media (max-height: 690px) and (min-width: 861px) { .sc.done .sc-ph { width: min(100%, 23vh + 5px); } }
@media (max-height: 820px) and (min-width: 861px) { .sc-ph { width: min(100%, 23vh + 5px); } .sc.done .sc-ph { width: min(100%, 23vh + 5px); } }
@media (max-height: 640px) and (min-width: 861px) { .sc-ph, .sc.done .sc-ph { width: min(100%, 20vh + 5px); } }
@media (max-width: 1280px) and (min-width: 861px) { .sc-aw span { font-size: 9px; } }
@media (max-height: 610px) and (min-width: 861px) { .sc-ph, .sc.done .sc-ph { width: min(100%, 17vh + 5px); } .sc small { display: none; } }
@media (min-width: 861px) {
  .sc-aw li { flex-direction: row; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
  .sc-aw li > div { flex: 1 1 110px; min-width: 0; }
  .sc-aw .pf { position: static; }
}
@media (max-height: 820px) and (min-width: 861px) { .sc-ph, .sc.done .sc-ph { width: min(100%, 21vh + 5px); } }
@media (max-height: 640px) and (min-width: 861px) { .sc-ph, .sc.done .sc-ph { width: min(100%, 20vh + 5px); } }
@media (max-height: 610px) and (min-width: 861px) { .sc-ph, .sc.done .sc-ph { width: min(100%, 17vh + 5px); } }

/* ---------- v5: senior high only slightly wider than the other schools ---------- */
@media (min-width: 861px) {
  .schools { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.2fr) minmax(0, 1fr); }
  .sc-aw { grid-template-columns: 1fr; gap: 4px; }
  .sc-aw li { padding: 4px 6px; }
}

/* ---------- v5: senior high only slightly wider; "Latest" tag ---------- */
@media (min-width: 861px) {
  .schools { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.18fr) minmax(0, 1fr); }
  .sc.done .sc-ph { width: 100%; max-width: 250px; }
  .sc-aw { grid-template-columns: 1fr; gap: 4px; }
  .sc-aw li { flex-wrap: nowrap; align-items: center; padding: 4px 6px; }
  .sc-aw li > div { flex: 1 1 auto; }
}
@media (max-height: 820px) and (min-width: 861px) { .sc-ph, .sc.done .sc-ph { width: min(100%, 21vh + 5px); } }
@media (max-height: 640px) and (min-width: 861px) { .sc-ph, .sc.done .sc-ph { width: min(100%, 20vh + 5px); } }
@media (max-height: 610px) and (min-width: 861px) { .sc-ph, .sc.done .sc-ph { width: min(100%, 17vh + 5px); } }
.label .new { display: inline-block; margin-left: 6px; color: #111; background: var(--gold-hi); padding: 1px 5px; border-radius: 2px; letter-spacing: 0.1em; }
@media (min-width: 861px) {
  .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr); }
  .work .items { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); column-gap: clamp(12px, 1.4vw, 22px); }
  .work .it:nth-child(3) { grid-column: 2; grid-row: 1 / 3; align-self: stretch; border-bottom: 0; padding: 0 0 0 clamp(12px, 1.4vw, 22px); border-left: 1px dashed var(--line-2); align-content: start; }
  .work .it:nth-child(2) { border-bottom: 0; padding-bottom: 0; }
}
@media (max-height: 690px) and (min-width: 861px) {
  .it { display: grid; }
  .it-top { display: flex; }
  .it-top .label { display: block; margin-right: 0; }
  .it-top .pf { float: none; margin-left: 0; }
  .it b { display: block; }
}
@media (min-width: 861px) {
  .sc-aw li { padding: 3px 6px; }
  .sc-aw li > div { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; }
  .sc-aw b, .sc-aw span { display: inline; }
}
@media (max-height: 660px) and (min-width: 861px) { .sc-ph, .sc.done .sc-ph { width: min(100%, 18vh + 5px); } }
@media (max-height: 660px) and (min-width: 861px) { .mid { gap: 6px; } .cx { padding-top: 7px; padding-bottom: 7px; } .cx-h { margin-bottom: 4px; } .items { gap: 4px; } .it { padding-bottom: 4px; } }

/* ---------- v6: the middle always fits (site.js scales it down if needed) ---------- */
@media (min-width: 861px) {
  .mid { display: block; overflow: hidden; min-height: 0; position: relative; }
  .mid-in { display: grid; grid-template-rows: auto auto auto; gap: clamp(6px, 1.2vh, 14px); transform-origin: 0 0; }
  html.ach-nohead .mid-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mid-head { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .mid .kicker { display: flex; }
}
@media (max-width: 860px) { .mid-in { display: grid; gap: 12px; } }

/* ===== Achievements v7: item photos, merged SHS awards box, "View all pictures" pop-up ===== */
.cx .it-tx { display: grid; gap: 2px; min-width: 0; align-content: start; }
.cx .it-tx .label { display: block; }
.cx .it.has-ph { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(8px, 0.9vw, 14px); align-items: start; }
.ph { position: relative; flex: none; width: clamp(46px, min(4.6vw, 8.5vh), 74px); aspect-ratio: 1; padding: 0; border: 1px solid var(--gold); border-radius: 3px; overflow: hidden; background: #0c0c0c; cursor: zoom-in; box-shadow: var(--shadow); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.ph:hover img, .ph:focus-visible img { transform: scale(1.08); }
.ph-n { position: absolute; right: 2px; bottom: 2px; font: 700 8.5px var(--mono); letter-spacing: 0.04em; color: #111; background: var(--gold-hi); padding: 1px 4px; border-radius: 2px; }
.sc-aw1 { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 5px 6px 5px 8px; border: 1px solid var(--gold-dim); border-left: 3px solid var(--gold); border-radius: 2px; background: var(--panel-2); }
.sc-aw1 ul { list-style: none; flex: 1 1 auto; min-width: 0; display: grid; gap: 3px; }
.sc-aw1 li { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; }
.sc-aw1 b { font: 700 clamp(9px, min(0.7vw, 1.45vh), 10.5px) var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.sc-aw1 span { font-size: clamp(9px, min(0.68vw, 1.4vh), 10.5px); line-height: 1.3; color: var(--ink-2); }
.sc-aw1 .ph { width: clamp(38px, min(3.4vw, 6.4vh), 54px); }
button.rail-t { cursor: pointer; width: 100%; color: #111; background: var(--gold-hi); border-color: var(--gold); box-shadow: 0 2px 0 #6e4c14; transition: transform 0.15s, background 0.15s; }
button.rail-t:hover { transform: translateY(-1px); background: #f6dd9c; }
button.rail-t::after { content: " \2197"; }

.ap { position: fixed; inset: 0; z-index: 2147481000; display: grid; place-items: center; padding: clamp(10px, 3vh, 34px) clamp(10px, 3vw, 40px); background: rgba(5, 5, 6, 0.82); backdrop-filter: blur(6px); }
.ap[hidden] { display: none; }
html.ap-open, html.ap-open body { overflow: hidden; }
.ap-box { width: min(1180px, 100%); height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--bg); color: var(--ink); border: 1px solid var(--gold-dim); border-radius: 4px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); overflow: hidden; }
.ap-h { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: var(--panel); }
.ap-h h2 { font: 400 clamp(24px, 3vh, 32px)/1 var(--serif); margin: 0; }
.ap-h h2 i { color: var(--gold); }
.ap-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-right: auto; }
.ap-jump a { font: 700 9.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 2px; }
.ap-jump a em { font-style: normal; color: var(--gold); margin-right: 3px; }
.ap-jump a:hover { border-color: var(--gold); color: var(--gold); }
.ap-x { font: 700 11px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: #111; background: #d9ad4f; border: 0; border-radius: 2px; padding: 10px 14px; cursor: pointer; }
.ap-body { overflow-y: auto; overscroll-behavior: contain; padding: 6px 16px 22px; scroll-behavior: smooth; }
.ap-s { padding-top: 14px; }
.ap-s h3 { display: flex; align-items: center; gap: 8px; font: 700 11px var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink); margin: 0 0 8px; padding-bottom: 7px; border-bottom: 1px solid var(--gold-dim); }
.ap-s h3 em { font-style: normal; color: #111; background: var(--gold-hi); padding: 2px 6px; border-radius: 2px; letter-spacing: 0.1em; }
.ap-g { margin: 10px 0 14px; }
.ap-g h4 { font: 400 clamp(17px, 2.1vh, 21px)/1.2 var(--serif); margin: 0 0 7px; color: var(--ink); }
.ap-g h4 small { font: 700 9px var(--mono); letter-spacing: 0.1em; color: var(--gold); margin-left: 6px; vertical-align: middle; }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ap-p { position: relative; aspect-ratio: 4 / 3; padding: 0; border: 1px solid var(--line-2); border-radius: 3px; overflow: hidden; background: #0c0c0c; cursor: zoom-in; }
.ap-p img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.ap-p:hover { border-color: var(--gold); }
.ap-p:hover img { transform: scale(1.05); }
.ap-p span { position: absolute; left: 5px; bottom: 5px; max-width: calc(100% - 10px); font: 700 8.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: #111; background: var(--gold-hi); padding: 2px 5px; border-radius: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .ap { padding: 0; } .ap-box { border-radius: 0; border: 0; } .ap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .ap-jump { order: 3; width: 100%; } }
.ap-s { display: flex; flex-wrap: wrap; column-gap: 26px; align-items: flex-start; }
.ap-s h3 { flex: 1 0 100%; }
.ap-g { flex: 0 1 auto; max-width: 100%; }
.ap-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.ap-p { width: clamp(132px, 13vw, 168px); flex: none; }
@media (max-width: 600px) { .ap-g { flex: 1 1 100%; } .ap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .ap-p { width: auto; } }
/* bigger item photos (extracurricular & work) */
.cols .ph { width: clamp(72px, min(7.8vw, 14vh), 136px); aspect-ratio: 4 / 3; border-width: 1.5px; }
.cols .ph-n { font-size: 10px; padding: 2px 5px; right: 3px; bottom: 3px; }
.cx .it.has-ph { column-gap: clamp(10px, 1.1vw, 18px); }
.cols .ph img { object-position: 50% 22%; }

/* ===== v8: scrollable photo strips + hover grow ===== */
.phs { position: relative; flex: none; width: clamp(72px, min(7.8vw, 14vh), 136px); aspect-ratio: 4 / 3; border: 1.5px solid var(--gold); border-radius: 3px; overflow: hidden; background: #0c0c0c; box-shadow: var(--shadow); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.phs-track { display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.phs-track::-webkit-scrollbar { display: none; }
.phs-i { flex: 0 0 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; scroll-snap-align: start; }
.phs-i img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; display: block; }
.phs-a { position: absolute; top: 50%; transform: translateY(-50%); width: 20px; height: 26px; display: grid; place-items: center; padding: 0 0 2px; font: 700 17px/1 var(--mono); color: #111; background: rgba(241, 211, 138, 0.92); border: 0; cursor: pointer; opacity: 0.85; transition: opacity 0.2s; }
.phs-a[hidden] { display: none; }
.phs-a.prev { left: 0; border-radius: 0 3px 3px 0; } .phs-a.next { right: 0; border-radius: 3px 0 0 3px; }
.phs-a:hover { opacity: 1; background: var(--gold-hi); }
.phs-n { position: absolute; right: 3px; bottom: 3px; font: 700 9.5px var(--mono); letter-spacing: 0.04em; color: #111; background: var(--gold-hi); padding: 1px 5px; border-radius: 2px; pointer-events: none; }
.phs.one .phs-i { cursor: zoom-in; }

/* every picture grows a bit when the cursor is on it */
.phs:hover, .ph:hover, .slot.pic:hover, .ap-p:hover { transform: scale(1.07); z-index: 5; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--gold); }
.rp:hover { transform: scale(1.035); z-index: 5; }
.ph, .slot.pic, .ap-p, .rp { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s; }
.slot.pic { position: relative; }
.ph:hover img, .ph:focus-visible img, .rp:hover img, .ap-p:hover img { transform: none; }
.rail-set { padding-left: 4px; padding-right: 4px; }
.ap-grid { padding: 4px; }
@media (prefers-reduced-motion: reduce) { .phs:hover, .ph:hover, .slot.pic:hover, .ap-p:hover, .rp:hover { transform: none; } }

/* ===== v9: timeline circles centred over each school's photos; senior high = dotted ring ===== */
@media (min-width: 861px) {
  .sc::before { display: none; }
  .sc { padding-top: 16px; }
  .sc-ph { position: relative; }
  .sc-ph::before { content: ""; position: absolute; left: 50%; top: -16px; width: 12px; height: 12px; margin-left: -8px; border-radius: 50%; background: var(--panel); border: 2px solid var(--gold); z-index: 1; }
  .sc.done .sc-ph::before { background: var(--panel); border: 2px dotted var(--gold-hi); }
  .sc.now .sc-ph::before { background: var(--gold-hi); box-shadow: 0 0 0 4px rgba(217, 173, 79, 0.25); animation: now 1.6s ease-in-out infinite; }
}
@media (max-width: 860px) { .sc.done::before { background: var(--panel); border-style: dotted; border-color: var(--gold-hi); } }

/* ===== v10: medal count on sports ===== */
.medals { list-style: none; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.medals li { display: inline-flex; align-items: center; gap: 5px; font: 700 clamp(9px, min(0.72vw, 1.5vh), 10.5px) var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); padding: 2px 7px 2px 3px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-2); }
.medals i { width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 -2px 0 rgba(0,0,0,0.25); }
.medals .g i { background: radial-gradient(circle at 35% 30%, #fff3c4, #e2b53e 55%, #9c7414); }
.medals .s i { background: radial-gradient(circle at 35% 30%, #ffffff, #c4c9d2 55%, #7d838f); }
.medals .b i { background: radial-gradient(circle at 35% 30%, #ffe0c2, #c98a4e 55%, #7f4f22); }

/* ===== v11: college is the highlight ===== */
.sc.now { isolation: isolate; }
.sc.now::after { content: ""; position: absolute; z-index: -1; inset: 6px -8px -8px -10px; border: 1px solid var(--gold); border-radius: 4px; background: linear-gradient(160deg, rgba(217, 173, 79, 0.16), rgba(217, 173, 79, 0.04) 60%, transparent); box-shadow: 0 0 22px rgba(217, 173, 79, 0.18); pointer-events: none; }
.sc.now > b { font-size: 1.22em; color: var(--gold-hi); }
:root[data-theme="light"] .sc.now > b { color: var(--gold); }
.sc.now .label { color: var(--gold-hi); }
.sc-note { margin: 5px 0 0; padding: 4px 7px; border-left: 3px solid var(--gold); background: var(--panel-2); font: 600 clamp(9px, min(0.7vw, 1.45vh), 10.5px)/1.35 var(--mono); letter-spacing: 0.04em; color: var(--ink); }
.sc-note span { color: var(--gold); }

/* ===== v12: every school the same size; senior high dot = solid circle ===== */
@media (min-width: 861px) {
  .schools { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .sc.done .sc-ph::before { background: var(--gold); border: 2px solid var(--gold); }
}
@media (min-width: 861px) and (min-height: 821px) {
  .sc.done .sc-ph { max-width: 250px; width: 100%; }
}
.medal-rows { display: grid; gap: 3px; margin-top: 4px; }
.medal-rows > div { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.medal-rows > div > b { font: 700 clamp(9px, min(0.72vw, 1.5vh), 10.5px) var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); min-width: 7.5em; }
.medal-rows .medals { margin-top: 0; }

/* ===== v13: medal table (sport · medal · event · city) + wider extracurricular column ===== */
.mtab { list-style: none; display: grid; grid-template-columns: auto auto minmax(0, 1fr); column-gap: 8px; row-gap: 3px; margin-top: 5px; }
.mtab li { display: contents; }
.mtab .sp { font: 700 clamp(8.5px, min(0.68vw, 1.4vh), 10px) var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); align-self: center; }
.mtab .k .sp { padding-top: 3px; }
.mtab .md { display: inline-flex; align-items: center; gap: 4px; font: 700 clamp(8.5px, min(0.68vw, 1.4vh), 10px) var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); padding: 1px 6px 1px 2px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-2); justify-self: start; }
.mtab .md i { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 -2px 0 rgba(0,0,0,0.25); }
.mtab .g .md i { background: radial-gradient(circle at 35% 30%, #fff3c4, #e2b53e 55%, #9c7414); }
.mtab .s .md i { background: radial-gradient(circle at 35% 30%, #ffffff, #c4c9d2 55%, #7d838f); }
.mtab .b .md i { background: radial-gradient(circle at 35% 30%, #ffe0c2, #c98a4e 55%, #7f4f22); }
.mtab .ev { font-size: clamp(9px, min(0.72vw, 1.5vh), 10.5px); line-height: 1.3; color: var(--ink-2); align-self: center; }
.mtab .ev em { font-style: normal; color: var(--muted); }
.mtab .k .sp, .mtab .k .md, .mtab .k .ev { margin-top: 3px; }
@media (min-width: 861px) {
  .cols { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.6fr); }
}
.it > .mtab { grid-column: 1 / -1; margin-top: 6px; }

/* ===== v14: responsive fill: boxes run end to end (button to button) and grow with the screen ===== */
@media (min-width: 861px) {
  .ach3 { max-width: none; width: 100%; justify-self: stretch; }
  .mid-in > .cx.edu { max-width: none; width: auto; justify-self: stretch; align-self: start; display: block; }
}
@media (min-width: 861px) {
  .mid-in { position: absolute; top: 0; left: 0; }
}

/* ===== v15: photos use their space: school pairs fill the column, strips are larger ===== */
@media (min-width: 861px) {
  .sc-ph, .sc.done .sc-ph { width: 100% !important; max-width: none !important; }
  /* photo sizes are a share of the SCREEN height: --s is the page's fit scale, so they stay that size on screen */
  .sc-ph .slot { aspect-ratio: auto; height: clamp(84px, 14vh, 160px); }
  .sc-ph .slot.pic img { object-position: 50% 30%; }
  .cols .phs { width: clamp(96px, min(10vw, 17.5vh), 180px); aspect-ratio: 4 / 3.1; }
}

/* ===== v16: bigger photo in the senior high awards box ===== */
@media (min-width: 861px) {
  .sc-aw1 { align-items: stretch; }
  .sc-aw1 .ph { width: clamp(64px, 6.5vw, 120px); aspect-ratio: 4 / 5; align-self: center; }
  .sc-aw1 .ph img { object-position: 50% 40%; }
}
/* senior high dot = same open ring as the other finished schools (only college is filled) */
@media (min-width: 861px) { .sc.done .sc-ph::before { background: var(--panel); border: 2px solid var(--gold); } }
@media (max-width: 860px) { .sc.done::before { background: var(--panel); border-style: solid; border-color: var(--gold); } }

/* ===== v17: Family & Friends page ===== */
.ff { height: 100%; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.7fr); gap: clamp(12px, 1.4vw, 22px); align-items: stretch; }
.ff-card { margin: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 3px; box-shadow: var(--shadow); }
.ff-ph { position: relative; flex: 1; min-height: 120px; border: 1.5px dashed var(--gold-dim); border-radius: 2px; background: var(--panel-2); display: grid; place-items: center; overflow: hidden; }
.ff-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.ff-ph .c { position: absolute; width: 14px; height: 14px; border-color: var(--gold); border-style: solid; z-index: 1; }
.ff-ph .c.tl { top: 6px; left: 6px; border-width: 2px 0 0 2px; } .ff-ph .c.br { bottom: 6px; right: 6px; border-width: 0 2px 2px 0; }
.ff-empty { text-align: center; font: italic 400 clamp(14px, 1.2vw, 18px)/1.3 var(--serif); color: var(--muted); }
.ff-empty b { display: block; font: 700 10px var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); font-style: normal; margin-bottom: 4px; }
.ff-card figcaption { display: grid; gap: 2px; }
.ff-card figcaption b { font: 400 clamp(20px, min(1.9vw, 3.6vh), 30px)/1.1 var(--serif); }
.ff-card figcaption small { font-size: 12px; color: var(--muted); }
@media (max-width: 860px) { .ff { grid-template-columns: 1fr 1fr; height: auto; } .ff-card.wide { grid-column: span 2; } .ff-ph { min-height: 180px; } }

/* ===== v17: the college note fills the rest of the college box ===== */
@media (min-width: 861px) {
  .sc.now { display: flex; flex-direction: column; }
  .sc.now .sc-note { flex: 1; display: flex; flex-direction: column; justify-content: center; margin-top: 8px; padding: 10px 12px;
    font: 400 clamp(17px, min(1.6vw, 3vh), 26px)/1.25 var(--serif); letter-spacing: 0; color: var(--ink); }
  .sc.now .sc-note span { display: block; margin-top: 4px; font: 700 0.62em var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
}
/* Family & Friends: four equal frames, each with a short description */
.ff { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.ff-card.wide { grid-column: auto !important; }
.ff-card figcaption p { margin: 2px 0 0; font-size: clamp(12px, min(0.95vw, 1.8vh), 14.5px); line-height: 1.5; color: var(--ink-2); }
@media (max-width: 860px) { .ff { grid-template-columns: 1fr 1fr !important; } }
/* equal frames: the four cards share one row for photos and one for captions */
@media (min-width: 861px) {
  .ff { grid-template-rows: minmax(0, 1fr) auto; row-gap: 0; }
  .ff-card { grid-row: span 2; display: grid; grid-template-rows: subgrid; row-gap: 10px; }
  .ff-card .ff-ph { min-height: 0; }
}
.ff-card figcaption { align-self: start; }
@media (max-width: 860px) { .ff-ph { aspect-ratio: 4 / 5; min-height: 0 !important; flex: none; } }

/* ===== v18: each school's photo is the background of its box (theme-coloured veil keeps text readable) ===== */
@media (min-width: 861px) {
  .schools { column-gap: clamp(8px, 0.9vw, 14px); }
  .sc.has-bg { isolation: isolate; padding: 18px 10px 10px 10px; }
  .sc.has-bg::before { display: block !important; content: ""; position: absolute; inset: 10px 0 0 0; z-index: -2; border-radius: 4px;
    border: 1px solid var(--line-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--panel) 30%, transparent) 0%, color-mix(in srgb, var(--panel) 52%, transparent) 38%, color-mix(in srgb, var(--panel) 70%, transparent) 62%, color-mix(in srgb, var(--panel) 84%, transparent) 100%),
      var(--sc-bg) center 30% / cover no-repeat;
    width: auto; height: auto; left: 0; top: 10px; margin: 0; animation: none; }
  .sc.now.has-bg::after { inset: 10px 0 0 0; z-index: -1; }
  .sc.has-bg .sc-ph { width: 100% !important; max-width: none !important; grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .sc.has-bg .sc-ph .slot { width: 62%; }
  .sc.has-bg .sc-ph::before { top: -18px; }
  .sc.has-bg > .label, .sc.has-bg > b, .sc.has-bg > small, .sc.has-bg > .sc-y { text-shadow: 0 0 2px var(--panel), 0 0 6px var(--panel), 0 1px 10px var(--panel); }
  .sc.has-bg > small { color: var(--ink-2); }
}
/* light mode: the small gold labels stay crisp over the brighter school photos */
@media (min-width: 861px) {
  :root[data-theme="light"] .sc.has-bg > .label, :root[data-theme="light"] .sc.has-bg > .sc-y { color: #6a4a0c; font-weight: 700; }
  :root[data-theme="light"] .sc.has-bg > .label, :root[data-theme="light"] .sc.has-bg > b, :root[data-theme="light"] .sc.has-bg > small, :root[data-theme="light"] .sc.has-bg > .sc-y { text-shadow: 0 0 2px #fff, 0 0 5px #fff, 0 0 9px rgba(255, 255, 255, 0.9); }
  :root[data-theme="light"] .sc.has-bg > small { color: #2e2b26; }
}
/* v19: education photos are portrait frames big enough for the face AND the outfit (thumbnails are cropped 4:5) */
@media (min-width: 861px) {
  .sc.has-bg .sc-ph .slot { width: min(78%, 21vh); height: auto; aspect-ratio: 4 / 5; }
  .sc.has-bg .sc-ph .slot.pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
}
/* v20: Extracurricular + Work: each item's photos become its moving background (same idea as the school boxes).
   The photo strip fills the whole item and keeps travelling; a veil in the panel colour keeps the text readable.
   Clicking anywhere on the item opens the photo that is showing. */
.cx .it.has-ph { position: relative; display: block !important; isolation: isolate; overflow: hidden;
  padding: clamp(6px, 0.8vh, 10px) clamp(8px, 0.8vw, 12px) !important; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent) !important;
  border-radius: 4px; margin-bottom: clamp(4px, 0.7vh, 8px); min-height: clamp(64px, 9vh, 120px); }
.work .it.has-ph:nth-child(3) { padding-left: clamp(8px, 0.8vw, 12px) !important; border-left: 1px solid color-mix(in srgb, var(--gold) 45%, transparent) !important; margin-left: 0; }
.cx .it.has-ph > .phs { position: absolute !important; inset: 0 !important; width: auto !important; height: auto !important; aspect-ratio: auto !important;
  z-index: 0; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: #0c0c0c; transform: none !important; }
.cx .it.has-ph > .phs .phs-i img { object-position: 50% 35%; }
.cx .it.has-ph::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--panel) 90%, transparent) 0%, color-mix(in srgb, var(--panel) 80%, transparent) 50%, color-mix(in srgb, var(--panel) 48%, transparent) 100%); }
.cx .it.has-ph > :not(.phs) { position: relative; z-index: 2; pointer-events: none; }
.cx .it.has-ph > :not(.phs) a, .cx .it.has-ph > :not(.phs) button { pointer-events: auto; }
.cx .it.has-ph .label, .cx .it.has-ph b, .cx .it.has-ph p, .cx .it.has-ph i, .cx .it.has-ph td, .cx .it.has-ph th, .cx .it.has-ph span { text-shadow: 0 0 2px var(--panel), 0 0 6px var(--panel), 0 1px 10px var(--panel); }
.cx .it.has-ph > .phs .phs-n { z-index: 3; }
.cx .it.has-ph:hover { border-color: var(--gold) !important; }
.cx .it.has-ph { cursor: zoom-in; }
/* v21: no empty space: the Extracurricular + Work row takes all the height left under the schools,
   and the items inside each panel stretch to fill their panel */
@media (min-width: 861px) {
  .mid-in { display: flex !important; flex-direction: column; }
  .mid-in > .cols { flex: 1 1 auto; min-height: 0; align-items: stretch; }
  .cols > .cx { display: flex; flex-direction: column; min-height: 0; }
  .cols > .cx > .items { flex: 1 1 auto; min-height: 0; align-content: stretch; grid-auto-rows: auto; }
  .cols .it.has-ph { margin-bottom: 0 !important; min-height: 0; }
  .work .items { grid-template-rows: auto auto; }
  .work .it.has-ph:nth-child(3) { grid-row: 1 / 3 !important; align-self: stretch; }
}
/* v22: the View all pictures rail stops ONLY while the cursor is on it: it moves again the moment the cursor leaves
   (a photo keeping focus after a click no longer keeps it paused; keyboard users still get a pause while tabbing) */
.rail:focus-within .rail-track { animation-play-state: running; }
.rail:hover .rail-track, .rail:has(:focus-visible) .rail-track { animation-play-state: paused; }
/* v23: no "View all pictures" button any more: the photo column fills its whole height and just keeps moving */
.rail.g { grid-template-rows: minmax(0, 1fr); }
/* photo column labels: show the whole name (wrap onto a second line instead of cutting it off) */
.rp span { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; }

/* Senior High awards box: its photo follows the box height, so the box can match the College note exactly */
@media (min-width: 861px) {
  .sc-aw1 { box-sizing: border-box; overflow: hidden; }
  .sc-aw1 .ph { height: 100%; width: auto !important; aspect-ratio: 4 / 5; max-width: 42%; align-self: stretch; flex: none; }
  .sc.now .sc-note { box-sizing: border-box; }
}
