/* ===== Shorts-version of the AV business card =====
   Vertical snap deck: each section = one full-screen slide. */

@font-face {
  font-family: "Vogue Highline Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/VogueHighlineSans-Regular.woff2") format("woff2");
}

:root {
  --ink: #0B0E14;
  --panel: #111826;
  --line: #222D40;
  --cy: #C6A15B;
  --cy-dim: #8A7130;
  --silver: #C7CFD9;
  --slate: #7A8595;
  --paper: #F1F4F7;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --body: "Inter", system-ui, sans-serif;
  --display: "Archivo", system-ui, sans-serif;
  --head: "Vogue Highline Sans", "Archivo", system-ui, sans-serif;
  --pad: clamp(18px, 5vw, 56px);
}

* { box-sizing: border-box; }

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar { display: none; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Top bar ===== */
.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) var(--pad);
  pointer-events: none;
}

.bar a, .bar__hint { pointer-events: auto; }

.bar__toggle {
  font: 500 11px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cy);
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 14, 20, .7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color .2s, color .2s;
}

.bar__toggle:hover { border-color: var(--cy-dim); color: var(--paper); }

.bar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bar__hint {
  font: 500 11px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--slate);
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang__link,
.lang__link:visited {
  font: 500 11px var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--slate);
  text-decoration: none;
  transition: color .2s;
}

.lang__link + .lang__link::before {
  content: "/";
  margin-right: 6px;
  color: var(--slate);
  opacity: .55;
}

.lang__link:hover { color: var(--paper); }
.lang__link.is-current { color: var(--cy); }
.lang__link.is-current:hover { color: var(--cy-dim); }

/* ===== Deck & slides ===== */
.deck { position: relative; }

.slide {
  position: relative;
  height: 100vh;
  min-height: 100vh;
  scroll-snap-align: start;
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  padding:
    calc(env(safe-area-inset-top, 0px) + 72px)
    var(--pad)
    calc(env(safe-area-inset-bottom, 0px) + 40px);
}

.slide::-webkit-scrollbar { display: none; }

@supports (height: 100dvh) {
  .slide { height: 100dvh; min-height: 100dvh; }
}

.slide__ghost {
  position: absolute;
  top: 4vh;
  right: -0.06em;
  z-index: 0;
  font-family: var(--head);
  font-weight: 400;
  font-size: clamp(240px, 42vh, 360px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(34, 45, 64, .55);
  user-select: none;
  pointer-events: none;
  letter-spacing: .01em;
}

.slide__inner {
  position: relative;
  z-index: 1;
  margin: auto;
  width: 100%;
  max-width: min(760px, calc(100% - 52px));
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.6vh, 28px);
  min-height: 0;
}

/* ===== Shared text pieces ===== */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--silver);
  margin: 0;
}

.eyebrow__idx {
  color: var(--cy);
  font-weight: 600;
  margin-right: 10px;
  position: relative;
}

.slide__title {
  font-family: var(--head);
  font-weight: 400;
  font-size: clamp(34px, 8vw, 62px);
  line-height: 1.05;
  letter-spacing: .01em;
  text-transform: uppercase;
  overflow-wrap: break-word;
  color: var(--paper);
  margin: 0;
  min-width: 0;
}

.slide__title .accent { color: var(--cy); }

.slide__title .title--coin {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--cy);
}

.slide__lede {
  font-family: var(--body);
  font-size: clamp(16px, 2.4vw, 18px);
  line-height: 1.55;
  color: var(--slate);
  margin: 0;
  max-width: 52ch;
}

.contacts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--silver);
  margin: 0;
  padding: 0;
  list-style: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 600 14px var(--body);
  letter-spacing: .02em;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: transform .15s, background .2s, border-color .2s, color .2s;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--cy);
  color: #07131B;
}

.btn--primary:hover { background: #D8BD7F; }

.btn--ghost {
  border-color: var(--line);
  color: var(--silver);
}

.btn--ghost:hover { border-color: var(--cy-dim); color: var(--paper); }

.btn--lg { font-size: 16px; padding: 17px 28px; }

.btn__arrow { font-family: var(--mono); }

/* Brand marks & logos */
.slide__lede .comp { color: #D8BD7F; }

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 9px;
  line-height: 1;
  letter-spacing: .04em;
  color: var(--cy);
  border: 1px solid rgba(198, 161, 91, .45);
  border-radius: 5px;
  padding: 2px 5px;
  background: rgba(198, 161, 91, .07);
  vertical-align: 1px;
  white-space: nowrap;
}

.brand--lg { font-size: 10px; padding: 3px 7px; border-radius: 7px; }

.lg {
  display: inline-block;
  width: auto;
  height: 13px;
  margin-right: 4px;
  vertical-align: -2px;
}

.lg--t { height: 12px; margin-right: 3px; }
.lg--xs { height: 10px; margin-right: 3px; vertical-align: -1.5px; }

.tl__org .brand { margin-right: 6px; }
.term__line .brand { margin-right: 6px; }
.term__line .lg { height: 11px; margin-right: 3px; }

.slide__cta { margin-top: 4px; }

/* ===== Widgets ===== */
.widget {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vh, 22px);
}

/* Terminal panels */
.term {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: clamp(12px, 1.7vw, 13.5px);
  line-height: 1.9;
  overflow: hidden;
}

.term__bar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.term__dot { width: 9px; height: 9px; border-radius: 50%; }

.term__dot--r { background: #FF5F57; }
.term__dot--y { background: #FEBC2E; }
.term__dot--g { background: #28C840; }

.term__line { color: var(--silver); white-space: pre-wrap; word-break: break-word; }

.term__prompt { color: var(--cy); font-weight: 600; }
  .term__ok { color: var(--cy); font-weight: 600; }

.term__path { color: var(--cy-dim); }

/* Hero medallion */
.medal {
  position: relative;
  align-self: center;
  width: clamp(150px, 34vw, 208px);
  height: clamp(150px, 34vw, 208px);
  border-radius: 50%;
}

.medal__orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed var(--line);
  animation: orbit 26s linear infinite;
}

.medal__orbit--a { inset: -18px; border-style: solid; border-color: rgba(46, 155, 181, .14); animation-duration: 34s; }
.medal__orbit--b { inset: -36px; border-style: dotted; border-color: rgba(198, 161, 91, .1); animation-duration: 48s; animation-direction: reverse; }

.medal__node {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--cy);
  animation: spin 22s linear infinite;
}

.medal__node::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cy);
  box-shadow: 0 0 12px rgba(198, 161, 91, .9);
  transform: translateX(-50%);
}

.medal__img {
  position: absolute;
  inset: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 8%;
  border: 1px solid var(--line);
}

.medal__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  align-self: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--slate);
}

.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cy); display: inline-block; flex: none; }

@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Counter stats */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(8px, 2vw, 14px);
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.stat__num {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 8vw, 40px);
  line-height: 1;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
}

.stat__suf {
  color: var(--cy);
}

.stat__lbl {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: .02em;
  color: var(--slate);
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stat { align-items: center; text-align: center; }
}

/* Quadrant (spheres) */
.quad {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(10px, 1.6vh, 14px);
}

.quad__cell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.quad__no {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cy-dim);
}

.quad__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(12px, 1.8vw, 16px);
  color: var(--paper);
  line-height: 1.25;
  overflow-wrap: normal;
  hyphens: none;
}

.quad__tags { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 10px; }

.quad__tags li {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* Service rows */
.svc { display: flex; flex-direction: column; gap: 10px; }

.svc__row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
}

.svc__key {
  flex: none;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 12px;
  color: var(--cy);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}

.svc__body { min-width: 0; }

.svc__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(14px, 2vw, 16px);
  color: var(--paper);
  line-height: 1.3;
}

.svc__sub {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cy-dim);
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* Timeline */
.tl { position: relative; padding-left: 0; list-style: none; margin: 0; display: flex; flex-direction: column; gap: clamp(10px, 1.8vh, 16px); }

.tl::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

.tl__row { position: relative; padding-left: 26px; }

.tl__row::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--cy-dim);
}

.tl__row:last-child::before { box-shadow: 0 0 12px rgba(198, 161, 91, .8); border-color: var(--cy); }

.tl__period {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cy-dim);
  letter-spacing: .04em;
}

.tl__role {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(14px, 2vw, 16px);
  color: var(--paper);
  line-height: 1.35;
}

.tl__org {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--slate);
}

/* ===== Project deck (horizontal carousel) ===== */
.pdeck {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}

.pdeck__track {
  display: flex;
  align-items: stretch;
  transition: transform .5s cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}

.no-anim .pdeck__track { transition: none; }

.pcard {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: linear-gradient(155deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, .02) 42%, rgba(198, 161, 91, .07) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    0 14px 34px rgba(3, 6, 12, .5);
  overflow: hidden;
}

.pcard::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .14) 47%, rgba(198, 161, 91, .2) 52%, transparent 60%);
  transform: translateX(-130%);
  animation: pcard-sheen 8s ease-in-out infinite;
}

.pcard:hover {
  border-color: rgba(198, 161, 91, .55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    0 14px 34px rgba(3, 6, 12, .5),
    0 0 26px rgba(198, 161, 91, .22);
}

@keyframes pcard-sheen {
  0%, 45% { transform: translateX(-130%); }
  85%, 100% { transform: translateX(130%); }
}

.pcard__badge {
  align-self: flex-start;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--cy);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(198, 161, 91, .05);
  white-space: nowrap;
}

.pcard__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(17px, 3.6vw, 24px);
  color: var(--paper);
  line-height: 1.2;
}

.pcard__desc {
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--slate);
  min-width: 0;
  overflow-wrap: break-word;
}

.pcard__links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pcard__link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cy);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  transition: border-color .2s, color .2s;
}

.pcard__link:hover { border-color: var(--cy-dim); color: var(--paper); }

.pdeck__ui {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.pdeck__hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--slate);
  white-space: nowrap;
}

.hint-arr { display: inline-block; opacity: .4; animation: hint-r 1.7s ease-in-out infinite; }
.hint-arr--l { animation-name: hint-l; }
.hint-arr--r { animation-name: hint-r; }

@keyframes hint-l {
  0%, 100% { transform: translateX(2px); opacity: .35; }
  50% { transform: translateX(-4px); opacity: 1; }
}

@keyframes hint-r {
  0%, 100% { transform: translateX(-2px); opacity: .35; }
  50% { transform: translateX(4px); opacity: 1; }
}

.pdeck__right { display: flex; align-items: center; gap: 10px; }

.pdeck__btn {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1;
  color: var(--silver);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  flex: none;
  transition: border-color .2s, color .2s, opacity .2s;
}

.pdeck__btn:hover { border-color: var(--cy-dim); color: var(--cy); }
.pdeck__btn:disabled { opacity: .35; pointer-events: none; }

.pdeck__dots { display: flex; align-items: center; gap: 8px; }

.pdeck__dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  border: 1px solid var(--slate);
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.pdeck__dot.is-active { background: var(--cy); border-color: var(--cy); animation: dot-pulse 2.2s ease-out infinite; }

@keyframes dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(198, 161, 91, .5); }
  70% { box-shadow: 0 0 0 7px rgba(198, 161, 91, 0); }
  100% { box-shadow: 0 0 0 0 rgba(198, 161, 91, 0); }
}


/* Chips (stack tags) */
.chips { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }

.chips li {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--silver);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--panel);
}

/* Education rows */
.edu { display: flex; flex-direction: column; gap: 10px; }

.edu__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  min-width: 0;
}

.edu__row:last-of-type { border-bottom: 0; padding-bottom: 0; }

.edu__school { font-family: var(--mono); font-size: 12.5px; color: var(--silver); }

.edu__spec { font-family: var(--body); font-weight: 500; font-size: 14px; color: var(--paper); white-space: nowrap; }

.edu__extra {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--slate);
  margin: 0;
}

/* Contact channels */
.chan { display: flex; flex-direction: column; gap: 10px; }

.chan a {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  padding: 13px 16px;
  text-decoration: none;
  overflow: hidden;
  transition: border-color .25s, transform .2s, background .25s;
}

.chan a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: radial-gradient(120% 100% at 100% 0%, rgba(198, 161, 91, .18), transparent 55%);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}

.chan a:hover {
  border-color: var(--cy-dim);
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(198, 161, 91, .10), rgba(198, 161, 91, .02));
}

.chan a:hover::before { opacity: 1; }

.chan__ico {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(198, 161, 91, .09);
  border: 1px solid rgba(198, 161, 91, .4);
  color: var(--cy);
}

.chan__ico img, .chan__ico svg { width: 22px; height: 22px; display: block; }

.chan__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.chan__lbl { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--cy-dim); }

.chan__val { font-family: var(--display); font-weight: 600; font-size: clamp(14px, 2vw, 17px); color: var(--paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chan__go { font-family: var(--mono); font-size: 11px; color: var(--slate); white-space: nowrap; display: inline-flex; align-items: center; }

.chan__go::after { content: "→"; margin-left: 6px; color: var(--cy); transition: transform .2s; }

.chan a:hover .chan__go::after { transform: translateX(3px); }


/* ===== Progress rail ===== */
.rail {
  position: fixed;
  top: 50%;
  right: clamp(10px, 2vw, 20px);
  transform: translateY(-50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.rail__count {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--silver);
  font-variant-numeric: tabular-nums;
}

.rail__track {
  position: relative;
  width: 3px;
  height: min(220px, 34vh);
  background: var(--line);
  border-radius: 2px;
}

.rail__fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0;
  background: var(--cy);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(198, 161, 91, .6);
  transition: height .3s ease;
}

.rail__dot {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  border: 1px solid var(--line);
  padding: 0;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.rail__dot:hover { border-color: var(--cy-dim); }

.rail__dot.is-on { background: var(--cy); border-color: var(--cy); }

/* ===== Reveal (JS only) ===== */
.js .r { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }

.js .slide.is-active .r { opacity: 1; transform: none; transition-delay: var(--d, 0s); }

/* Reduced motion: static, no stagger */
.no-anim .r, .no-anim .slide.is-active .r { opacity: 1; transform: none; transition: none; }

.no-anim .medal__orbit, .no-anim .medal__node { animation: none; }
.no-anim .pcard::before, .no-anim .hint-arr, .no-anim .pdeck__dot.is-active { animation: none; }
.no-anim .hint-arr { opacity: .5; }

/* ===== Landscape / short screens ===== */
@media (max-height: 620px) {
  .slide { padding-top: calc(env(safe-area-inset-top, 0px) + 60px); }
  .slide__ghost { font-size: 30vh; }
  .slide__inner { gap: 10px; }
  .slide__lede { display: none; }
  .stat { padding: 12px 10px; }
  .medal { width: 110px; height: 110px; }
  .tl { gap: 6px; }
  .quad { gap: 8px; }
  .pdeck__ui { margin-top: 10px; }
}

@media (max-width: 480px) {
  .slide__title { font-size: clamp(28px, 8vw, 34px); }
  .edu__row { flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; }
  .edu__spec { white-space: normal; }
  .pcard { padding: 14px 16px; }
  .pcard__desc { font-size: 13px; line-height: 1.45; }
  #s06 .pcard { padding: 12px 14px; }
  #s06 .pcard__desc { line-height: 1.4; }
  #s06 .pdeck__ui { margin-top: 10px; }
  .quad { grid-template-columns: 1fr 1fr; }
  .slide__inner { max-width: 100%; }
  .bar__hint { display: none; }
}

/* Tall phones (>=745px height): scale up layout to fill the screen — Tier A */
@media (min-height: 745px) and (max-width: 480px) {
  .slide {
    padding-top: calc(env(safe-area-inset-top, 0px) + 84px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 56px);
  }
  .slide__inner { gap: clamp(16px, 2.6vh, 26px); }

  .eyebrow { font-size: 12px; }
  .slide__title { font-size: clamp(30px, 8vw, 34px); }
  .slide__lede { font-size: 16px; line-height: 1.55; }
  .contacts-row { font-size: 13px; gap: 8px 22px; }

  .btn { font-size: 15px; padding: 16px 24px; }
  .btn--lg { font-size: 17px; padding: 18px 32px; }

  .widget { gap: clamp(14px, 2vh, 20px); }

  .term { padding: 18px 20px; font-size: 14px; line-height: 1.8; }
  .term__bar { margin-bottom: 12px; }

  .medal { width: clamp(180px, 48vw, 232px); height: clamp(180px, 48vw, 232px); }
  .medal__tag { font-size: 12px; }

  #s01 .slide__inner { margin: 0 auto; justify-content: flex-start; }
  #s01.slide {
    padding-top: calc(env(safe-area-inset-top, 0px) + 72px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 44px);
  }
  #s02 .slide__inner { gap: clamp(14px, 2vh, 22px); margin: 0 auto; }
  #s02 .slide__lede { font-size: 15px; }
  #s02 .stats { gap: 12px; }
  #s02 .stat { padding: 16px 14px; gap: 8px; }
  #s02 .stat__num { font-size: clamp(38px, 9.5vw, 46px); }
  #s02 .stat__lbl { font-size: 12.5px; }
  #s03 .slide__inner, #s05 .slide__inner, #s06 .slide__inner,
  #s07 .slide__inner, #s08 .slide__inner, #s09 .slide__inner {
    gap: clamp(24px, 4vh, 38px);
  }
  #s06 .slide__inner { gap: clamp(20px, 3.2vh, 30px); }

  /* Slides with a big single block: stretch to full height, push blocks apart — no empty bands */
  #s03 .slide__inner,
  #s04 .slide__inner, #s05 .slide__inner,
  #s07 .slide__inner, #s08 .slide__inner, #s09 .slide__inner {
    margin: 0 auto;
    align-self: stretch;
  }
  #s03 .widget,
  #s04 .widget, #s05 .widget,
  #s07 .widget, #s08 .widget, #s09 .widget {
    flex: 1;
    justify-content: space-between;
  }
  #s03 .quad { grid-auto-rows: 1fr; }
  #s04 .svc { flex: 1; justify-content: space-between; }
  #s04 .svc__row { flex: 1 1 0px; align-items: center; }
  #s05 .tl { flex: 1; justify-content: space-between; }
  #s05 .tl__row { flex: 1 1 0px; }
  #s07 .term { flex: 1; }
  #s08 .edu { flex: 1; justify-content: space-between; }
  #s08 .edu__row { flex: 1 1 0px; }
  #s09 .chan { flex: 1; justify-content: space-between; }

  .stats { gap: 10px; }
  .stat { padding: 14px 14px; gap: 7px; }
  .stat__num { font-size: clamp(32px, 8vw, 38px); }
  .stat__lbl { font-size: 11.5px; }

  .quad { gap: clamp(12px, 2vh, 16px); }
  .quad__cell { padding: 14px 12px; gap: 7px; }
  .quad__no { font-size: 11.5px; }
  .quad__name { font-size: clamp(13px, 2.2vw, 17px); }
  .quad__tags li { font-size: 11px; }

  .svc { gap: 12px; }
  .svc__row { padding: 14px 16px; gap: 14px; }
  .svc__key { width: 30px; height: 30px; font-size: 12.5px; }
  .svc__name { font-size: clamp(15px, 2.2vw, 17px); }
  .svc__sub { font-size: 12px; }

  .tl { gap: clamp(13px, 2.4vh, 20px); }
  .tl__period { font-size: 12.5px; }
  .tl__role { font-size: clamp(15px, 2.2vw, 17px); }
  .tl__org { font-size: 12px; }

  .pcard { padding: 18px 18px; gap: 11px; }
  .pcard__badge { font-size: 11px; padding: 4px 10px; }
  .pcard__name { font-size: clamp(18px, 3.6vw, 24px); }
  .pcard__desc { font-size: 14px; line-height: 1.5; }
  .pcard__link { font-size: 12px; padding: 6px 12px; }
  .pdeck__ui { margin-top: 18px; }
  #s06 .pcard { padding: 16px 16px; gap: 10px; }
  #s06 .pcard__desc { line-height: 1.45; }
  #s06 .pdeck__ui { margin-top: 12px; }

  .chips { gap: 9px; }
  .chips li { font-size: 13px; padding: 7px 13px; }

  .edu { gap: 16px; }
  .edu__row { min-height: 90px; padding-bottom: 16px; }
  .edu__school { font-size: 14.5px; }
  .edu__spec { font-size: 17px; }
  .edu__extra { font-size: 12.5px; }

  .chan { gap: 11px; }
  .chan a { padding: 18px 20px; }
  .chan__lbl { font-size: 11.5px; }
  .chan__val { font-size: clamp(15.5px, 2.3vw, 18px); }
  .chan__go { font-size: 11.5px; }
}

/* Extra-large tall phones (>=855px height): push further — Tier B */
@media (min-height: 855px) and (max-width: 480px) {
  .slide__inner { gap: clamp(22px, 3.4vh, 32px); }

  .slide__title { font-size: clamp(32px, 8.5vw, 38px); }
  .slide__lede { font-size: 17px; }

  .medal { width: clamp(200px, 54vw, 272px); height: clamp(200px, 54vw, 272px); }

  #s01.slide {
    padding-top: calc(env(safe-area-inset-top, 0px) + 64px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 40px);
  }
  #s01 .slide__inner { gap: clamp(18px, 3vh, 28px); }

  .term { padding: 22px 24px; }

  .svc__name { font-size: clamp(16px, 2.4vw, 18px); }
  .svc__sub { font-size: 12.5px; }

  .tl__period { font-size: 13px; }
  .tl__role { font-size: clamp(16px, 2.4vw, 18px); }
  .tl__org { font-size: 12.5px; }

  #s03 .slide__inner, #s05 .slide__inner, #s06 .slide__inner,
  #s07 .slide__inner, #s08 .slide__inner, #s09 .slide__inner {
    gap: clamp(28px, 4.6vh, 44px);
  }

  .stat { padding: 18px 16px; gap: 8px; }
  .stat__num { font-size: clamp(34px, 8.6vw, 42px); }

  .quad { gap: clamp(14px, 2.4vh, 20px); }
  .quad__cell { padding: 17px 15px; gap: 8px; }

  .svc__row { padding: 16px 18px; }

  .tl { gap: clamp(15px, 2.8vh, 24px); }

  .chips { gap: 10px; }
  .chips li { font-size: 13.5px; padding: 8px 14px; }

  .edu { gap: 18px; }
  .edu__row { min-height: 110px; padding-bottom: 20px; }
  .edu__school { font-size: 15px; }
  .edu__spec { font-size: 18px; }

  .chan a { padding: 20px 22px; }
  .chan__val { font-size: clamp(16.5px, 2.5vw, 19px); }
}

@media (max-width: 340px) and (max-height: 600px) {
  .slide { overflow-y: auto; }
}

/* Compact phones (height <= 744px): keep content tight */
@media (max-width: 480px) and (max-height: 744px) {
  .slide__inner { gap: 10px; }
  #s07 .slide__inner { gap: 8px; }
  #s07 .term { font-size: 11.5px; line-height: 1.75; }
  #s07 .term__bar { margin-bottom: 8px; }
  .chan a { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; padding: 11px 14px; }
  .chan__ico { width: 36px; height: 36px; }
  .chan__ico img, .chan__ico svg { width: 19px; height: 19px; }
  .chan__val { font-size: 13.5px; }
  .chan__go { font-size: 10px; }
  .slide__lede { font-size: 13px; }
  .stat { padding: 11px 10px; gap: 5px; }
  .stats { gap: 8px; }
  .edu__extra { font-size: 10px; }
  .tl { gap: 7px; }
}

@media (min-width: 900px) {
  .rail { right: 24px; }
}