
:root {
  --bg: #000;
  --raise: #0b0b0b;
  --ink: #ececec;
  --muted: #8b8b8b;
  --faint: #4a4a4a;
  --line: rgba(255, 255, 255, 0.09);
  --planet: #a9b4c2;
  --radius: 20px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sans: 'Exo 2', system-ui, sans-serif;
  --display: 'Orbitron', 'Exo 2', sans-serif;
  --mono: 'Share Tech Mono', ui-monospace, monospace;
}

body[data-planet="introduction"] { --planet: #9cc9dc; }
body[data-planet="experience"] { --planet: #7fa9dd; }
body[data-planet="projects"] { --planet: #e08a5c; }
body[data-planet="skills"] { --planet: #d6b289; }
body[data-planet="about"] { --planet: #d48e68; }
body[data-planet="contact"] { --planet: #b392f0; }

/* planet accent, used sparingly */
.label,
.hud b,
.stack-card .when,
.edu .when,
.proj-kind {
  color: var(--planet);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: clip; /* hidden would make body a scroll container and break every position: sticky */
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
  border-radius: 4px;
}

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  z-index: 400;
  background: var(--ink);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* =========================
   ARRIVAL / DEPARTURE VEIL
   ========================= */
.transition-veil {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  background: var(--bg);
  pointer-events: none;
  opacity: 1;
  transition: opacity .6s var(--ease);
  animation: veil-fallback .01s 3s forwards;
}

@keyframes veil-fallback {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

body.is-ready .transition-veil {
  opacity: 0;
  animation: none;
}

body.is-leaving .transition-veil {
  opacity: 1;
  animation: none;
  visibility: visible;
}

.veil-hud {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.veil-hud b {
  display: block;
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -.02em;
  text-transform: none;
  color: var(--ink);
  margin: .6rem 0 .9rem;
}

.veil-hud .bar {
  width: 160px;
  height: 1px;
  margin: 1.1rem auto 0;
  background: var(--line);
}

.veil-hud .bar i {
  display: block;
  height: 100%;
  background: var(--ink);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}

/* =========================
   NAV: pill that tightens once you scroll
   ========================= */
.topbar {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: .15rem;
  width: min(1120px, calc(100vw - 2rem));
  padding: .4rem .4rem .4rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 10, 10, .72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: width .7s var(--ease), padding .7s var(--ease);
}

body.scrolled .topbar {
  width: min(780px, calc(100vw - 2rem));
}

.topbar .home-link {
  margin-right: auto;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.topbar .links {
  display: flex;
  gap: .1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.topbar .links::-webkit-scrollbar {
  display: none;
}

.topbar .links a {
  padding: .5rem .8rem;
  border-radius: 999px;
  font-size: .88rem;
  text-decoration: none;
  color: var(--muted);
  white-space: nowrap;
  transition: color .3s;
}

.topbar .links a:hover,
.topbar .links a[aria-current="page"] {
  color: var(--ink);
}

.audio-btn {
  flex: none;
  width: 38px;
  height: 38px;
  margin-left: .3rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.audio-btn .bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.audio-btn .bars i {
  width: 2px;
  height: 100%;
  background: var(--ink);
  transform-origin: bottom;
  animation: eq 1.1s ease-in-out infinite;
}

.audio-btn .bars i:nth-child(2) {
  animation-delay: -.35s;
}

.audio-btn .bars i:nth-child(3) {
  animation-delay: -.7s;
}

.audio-btn.muted .bars i {
  animation: none;
  transform: scaleY(.2);
  background: var(--muted);
}

@keyframes eq {

  0%,
  100% {
    transform: scaleY(.25);
  }

  50% {
    transform: scaleY(1);
  }
}

/* rotating badge, doubles as "back to orbit" */
.orbit-badge {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 300;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  text-decoration: none;
  opacity: 0;
  transform: scale(.85);
  transition: opacity .5s, transform .5s var(--ease);
  pointer-events: none;
}

body.scrolled .orbit-badge {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.orbit-badge svg {
  position: absolute;
  inset: 0;
  animation: spin 16s linear infinite;
}

.orbit-badge text {
  font-family: var(--mono);
  font-size: 8.4px;
  letter-spacing: 1.6px;
  fill: var(--muted);
  text-transform: uppercase;
}

.orbit-badge span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-size: 1rem;
  transition: transform .4s var(--ease);
}

.orbit-badge:hover span {
  transform: translateY(-3px);
}

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

/* HUD readout */
.hud {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 300;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
  line-height: 1.8;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.hud b {
  font-weight: 400;
  color: var(--muted);
}

/* camera feel: a little film grain */
body::after {
  content: '';
  position: fixed;
  inset: -100px;
  z-index: 450;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(5) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-30px, 20px); }
  40% { transform: translate(25px, -35px); }
  60% { transform: translate(-15px, 40px); }
  80% { transform: translate(35px, 10px); }
  100% { transform: translate(0, 0); }
}

/* =========================
   LAYOUT + TYPE
   ========================= */
main {
  position: relative;
  z-index: 1;
}

.wrap {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

section {
  padding: 8rem 0;
}

.label {
  display: block;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.display {
  font-weight: 300;
  font-size: clamp(3rem, 9vw, 7.5rem);
  line-height: .98;
  letter-spacing: -.045em;
}

h2.title {
  font-weight: 300;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  margin-bottom: 1.5rem;
}

.lede {
  font-size: clamp(1.1rem, 1.7vw, 1.4rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 40ch;
}

p {
  line-height: 1.65;
}

.split-line {
  display: inline-block;
  overflow: hidden;
  padding-bottom: .08em;
  margin-bottom: -.08em;
  vertical-align: top;
}

.split-char {
  display: inline-block;
}

.page-head {
  min-height: 82vh;
  display: flex;
  align-items: flex-end;
  padding: 10rem 0 5rem;
}

.page-head .lede {
  margin-top: 2rem;
}

/* =========================
   BUTTONS + LINKS
   ========================= */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 400;
  font-size: .95rem;
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
}

.btn:hover {
  border-color: var(--muted);
}

.btn.solid {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.btn.solid:hover {
  background: #fff;
}

.arrow::after {
  content: '→';
  display: inline-block;
  transition: transform .4s var(--ease);
}

.arrow:hover::after {
  transform: translateX(4px);
}

.text-link {
  display: inline-flex;
  gap: .45rem;
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  padding-bottom: .15rem;
  transition: border-color .3s;
}

.text-link:hover {
  border-color: var(--ink);
}

/* =========================
   SHARED BLOCKS
   ========================= */
.panel {
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rows {
  list-style: none;
  border-top: 1px dashed var(--line);
}

.rows li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px dashed var(--line);
}

.rows li span:last-child {
  color: var(--muted);
  text-align: right;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  list-style: none;
}

.tags li {
  font-size: .8rem;
  padding: .3rem .7rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--muted);
}

/* =========================
   INTRODUCTION
   ========================= */
.intro-hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  align-items: end;
  gap: 4rem;
  padding: 10rem 0 6rem;
}

.portrait {
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.portrait img {
  width: 100%;
  height: 112%;
  object-fit: cover;
}

.status {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: 1rem;
  font-size: .9rem;
  color: var(--muted);
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  50% {
    opacity: .25;
  }
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stat {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  min-height: 300px;
}

.stat small {
  font-size: .9rem;
  color: var(--ink);
}

.stat b {
  font-weight: 300;
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  letter-spacing: -.05em;
  margin: auto 0 1rem;
  font-variant-numeric: tabular-nums;
}

.stat b sup {
  font-size: .4em;
  vertical-align: .9em;
  margin-left: .1em;
}

.stat p {
  color: var(--muted);
  font-size: .92rem;
}

.statement {
  font-size: clamp(1.6rem, 3.6vw, 3rem);
  line-height: 1.22;
  letter-spacing: -.025em;
  max-width: 24ch;
}

.statement .word {
  opacity: .18;
}

/* =========================
   STACKING CARDS (experience)
   ========================= */
.stack {
  display: grid;
  gap: 2rem;
}

.stack-card {
  position: sticky;
  top: 6.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 3rem;
  min-height: 460px;
  transform-origin: 50% 0;
  box-shadow: 0 -30px 60px -20px rgba(0, 0, 0, .9);
}

.stack-card .when {
  font-family: var(--mono);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.stack-card h3 {
  font-weight: 300;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  letter-spacing: -.03em;
  line-height: 1.08;
  margin: 1rem 0 .6rem;
}

.stack-card .org {
  color: var(--muted);
  margin-bottom: 2rem;
}

.stack-card .org a {
  color: var(--ink);
}

.stack-card .rows li {
  display: block;
  color: var(--muted);
}

.stack-card .media {
  border-radius: 12px;
  overflow: hidden;
  background: #111;
}

.stack-card .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================
   PROJECTS: sticky copy, scrolling images
   ========================= */
.showcase {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 4rem;
  padding-top: 2rem;
}

.showcase-copy {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dashes {
  display: flex;
  gap: 6px;
  margin: 1.2rem 0 2rem;
}

.dashes i {
  width: 12px;
  height: 2px;
  background: var(--faint);
  transition: width .5s var(--ease), background .5s;
}

.dashes i.on {
  width: 30px;
  background: var(--ink);
}

.showcase-copy .slot {
  position: relative;
  min-height: 330px;
}

.showcase-copy article {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s, transform .6s var(--ease);
  pointer-events: none;
}

.showcase-copy article.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.showcase-copy h3 {
  font-weight: 300;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  letter-spacing: -.03em;
  line-height: 1.08;
  margin-bottom: 1.2rem;
}

.showcase-copy p {
  color: var(--muted);
  margin: 1.2rem 0 1.6rem;
}

.metrics {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.6rem;
  font-variant-numeric: tabular-nums;
}

.metrics b {
  display: block;
  font-weight: 300;
  font-size: 1.8rem;
  letter-spacing: -.03em;
}

.metrics span {
  font-size: .8rem;
  color: var(--muted);
}

.showcase-media {
  display: grid;
  gap: 1.5rem;
  padding: 18vh 0;
}

.showcase-media figure {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0d0d0d;
}

.showcase-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.6);
  transform: scale(1.06);
  transition: filter 1s var(--ease), transform 1.4s var(--ease);
}

.showcase-media figure.on img {
  filter: none;
  transform: none;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 2rem 0;
}

.filters button {
  font: inherit;
  font-size: .88rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .3s, border-color .3s, background .3s;
}

.filters button[aria-pressed="true"] {
  color: var(--bg);
  background: var(--ink);
  border-color: var(--ink);
}











/* =========================
   SKILLS
   ========================= */
.marquee {
  overflow: hidden;
  padding: 2rem 0;
  border-block: 1px solid var(--line);
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  gap: 3.5rem;
  font-weight: 300;
  font-size: clamp(2.8rem, 7vw, 6rem);
  letter-spacing: -.04em;
}

.marquee-track span:nth-child(even) {
  color: var(--faint);
}

.skill-rows {
  border-top: 1px solid var(--line);
}

.skill-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--line);
}

.skill-row h3 {
  font-weight: 300;
  font-size: 1.6rem;
  letter-spacing: -.02em;
}

.skill-row p {
  color: var(--muted);
  margin-top: .4rem;
  font-size: .95rem;
}

.skill-row ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.6rem;
  font-size: 1.15rem;
  align-content: start;
}

/* =========================
   ABOUT
   ========================= */
.edu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.edu .panel {
  overflow: hidden;
}

.edu .media {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.edu .media img {
  width: 100%;
  height: 118%;
  object-fit: cover;
}

.edu .body {
  padding: 1.8rem;
}

.edu .when {
  font-family: var(--mono);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.edu h3 {
  font-weight: 400;
  font-size: 1.25rem;
  margin: .7rem 0 .5rem;
  line-height: 1.3;
}

.edu p {
  color: var(--muted);
}

/* =========================
   CONTACT
   ========================= */
.cta {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10rem 0 4rem;
}

.cta .lede {
  margin: 1.8rem auto 0;
}

.cta .btn-row {
  justify-content: center;
}

.contact-rows {
  width: min(720px, 100%);
  margin-top: 5rem;
  text-align: left;
}

.contact-rows a {
  text-decoration: none;
}

.contact-rows a:hover span:last-child {
  color: var(--ink);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 160%);
  padding: .7rem 1.2rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: .9rem;
  z-index: 450;
  transition: transform .5s var(--ease);
}

.toast.show {
  transform: translate(-50%, 0);
}

/* =========================
   NEXT + ASCII FOOTER
   ========================= */
.next {
  display: block;
  text-decoration: none;
  padding: 9rem 0 4rem;
  text-align: center;
}

.next small {
  font-family: var(--mono);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.next span {
  display: block;
  font-weight: 300;
  font-size: clamp(3rem, 10vw, 8rem);
  letter-spacing: -.05em;
  margin-top: .5rem;
  transition: letter-spacing .8s var(--ease);
}

.next:hover span {
  letter-spacing: -.02em;
}

.footer {
  position: relative;
  padding-top: 2rem;
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
}

.footer .meta {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
}

.footer kbd {
  font-family: var(--mono);
  font-size: .8rem;
  padding: .05rem .4rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.ascii {
  margin-top: 3rem;
  /* block and box-drawing glyphs must come from one monospace face or the columns drift */
  font-family: 'DejaVu Sans Mono', Menlo, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 12px;
  line-height: 1;
  color: var(--faint);
  white-space: pre;
  overflow: hidden;
  text-align: left;
  user-select: none;
}

.ascii .hi {
  color: var(--muted);
}

/* =========================
   CAPTAIN'S LOG TERMINAL
   ========================= */
.term {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 600;
  width: min(680px, calc(100vw - 2rem));
  height: min(420px, 70vh);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(5, 5, 5, .94);
  backdrop-filter: blur(12px);
  font-family: var(--mono);
  font-size: .85rem;
  transform: translate(-50%, 110%);
  opacity: 0;
  visibility: hidden;
  transition: transform .5s var(--ease), opacity .3s, visibility .5s;
}

.term.open {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

.term header {
  display: flex;
  justify-content: space-between;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.term header button {
  font: inherit;
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
}

.term .out {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  white-space: pre-wrap;
  line-height: 1.6;
  color: #bdbdbd;
}

.term .out .cmd {
  color: var(--ink);
}

.term form {
  display: flex;
  gap: .6rem;
  padding: .7rem 1rem;
  border-top: 1px solid var(--line);
}

.term input {
  flex: 1;
  font: inherit;
  color: var(--ink);
  background: none;
  border: 0;
  outline: none;
}

/* =========================
   RESPONSIVE
   ========================= */
.mobile-copy h3 {
  font-weight: 300;
  font-size: 1.6rem;
  letter-spacing: -.03em;
  margin: .4rem 0 .6rem;
}

.mobile-copy p {
  color: var(--muted);
  margin-bottom: 1rem;
}

@media (min-width: 901px) {
  .showcase-media .mobile-copy {
    display: none;
  }

  /* one pinned frame: every project's figure sits in the same sticky slot, and scrolling cross-fades between them */
  /* every slide shares one tall grid cell, so each sticks for the whole track and stops exactly at its end */
  .showcase-media {
    display: grid;
    grid-template-rows: calc(4 * 80vh + 20vh);
    padding: 0;
  }

  .showcase-media > div {
    grid-area: 1 / 1;
    align-self: start;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    pointer-events: none;
  }

  .showcase-media > div > figure {
    width: 100%;
    pointer-events: auto;
    transition: opacity .6s var(--ease), transform .9s var(--ease);
  }

  .showcase-media > div > figure:not(.on) {
    opacity: 0;
    transform: translateY(36px) scale(.96);
    pointer-events: none;
  }
}

@media (max-width: 900px) {
  section {
    padding: 5.5rem 0;
  }

  .topbar .home-link {
    display: none;
  }

  .topbar {
    padding-left: .4rem;
  }

  .topbar .links {
    flex: 1;
  }

  body.scrolled .topbar {
    width: calc(100vw - 2rem);
  }

  .intro-hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 7.5rem;
    align-items: start;
  }

  .portrait {
    max-width: 340px;
    order: -1;
  }

  .stat-grid,
  .edu {
    grid-template-columns: 1fr;
  }

  .stat {
    min-height: 220px;
  }

  .stack-card {
    grid-template-columns: 1fr;
    padding: 1.8rem;
    gap: 1.5rem;
    top: 5rem;
    min-height: 0;
  }

  .stack-card .media {
    aspect-ratio: 16/10;
  }

  .showcase {
    grid-template-columns: minmax(0, 1fr); /* a long URL in a browser bar mustn't widen the column past the screen */
    gap: 0;
  }

  .showcase-media > div { min-width: 0; }
  .browser-bar b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .showcase-copy {
    display: none;
  }

  .showcase-media {
    padding: 0;
    gap: 3.5rem;
  }

  .showcase-media img {
    filter: none;
    transform: none;
  }




  .skill-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .orbit-badge {
    width: 76px;
    height: 76px;
  }
}

@media (max-width: 560px) {
  .hud {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

.rows li>a {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  text-decoration: none;
}

.rows li>a span:last-child {
  color: var(--muted);
  transition: color .3s;
}

.rows li>a:hover span:last-child {
  color: var(--ink);
}

.term-open {
  font: inherit;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
}

.term-open:hover {
  color: var(--ink);
}

.page-head,
.intro-hero,
.cta,
.next {
  text-shadow: 0 1px 14px rgba(0, 0, 0, .8);
}

/* =========================
   SOUND PROMPT + AVATAR
   ========================= */
.sound-prompt {
  position: fixed;
  left: 50%;
  top: 5.2rem;
  z-index: 320;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, .8);
  backdrop-filter: blur(12px);
  color: var(--ink);
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity .5s, transform .5s var(--ease);
}

.sound-prompt.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.sound-prompt .bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}

.sound-prompt .bars i {
  width: 2px;
  height: 100%;
  background: var(--planet);
  transform-origin: bottom;
  animation: eq 1.1s ease-in-out infinite;
}

.sound-prompt .bars i:nth-child(2) { animation-delay: -.35s; }
.sound-prompt .bars i:nth-child(3) { animation-delay: -.7s; }

.topbar .home-link {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}

.topbar .home-link img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

/* =========================
   DRIFTING PLANET NAME
   ========================= */
.page-head {
  position: relative;
  overflow: hidden;
}

.drift {
  position: absolute;
  left: 0;
  bottom: 1.5rem;
  z-index: -1;
  font-size: clamp(7rem, 22vw, 20rem);
  font-weight: 300;
  letter-spacing: -.06em;
  line-height: .8;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .09);
  pointer-events: none;
  user-select: none;
}

/* =========================
   NUMBERS STRIP (projects)
   ========================= */
.numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
}

.numbers div {
  padding: 2rem 1.5rem;
}

.numbers div+div {
  border-left: 1px solid var(--line);
}

.numbers b {
  display: block;
  font-weight: 300;
  font-size: clamp(2.6rem, 5vw, 4rem);
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}

.numbers span {
  color: var(--muted);
  font-size: .9rem;
}

.showcase-count {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--muted);
  margin-left: auto;
}

.showcase-count b {
  color: var(--ink);
  font-weight: 400;
}

.showcase-head {
  display: flex;
  align-items: center;
}









/* =========================
   SKILL ORBIT + USED-IN PANEL
   ========================= */
.orbit-wrap {
  padding: 1rem 0;
}

.orbit-map {
  --s: min(560px, 86vw);
  position: relative;
  width: var(--s);
  height: var(--s);
  margin-inline: auto;
}

.orbit-map .core {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22%;
  height: 22%;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), 0 0 60px color-mix(in srgb, var(--planet) 35%, transparent);
}

.orbit-map .core img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ring {
  position: absolute;
  inset: 0;
  margin: auto;
  width: var(--d);
  height: var(--d);
  border: 1px dashed rgba(255, 255, 255, .12);
  border-radius: 50%;
  animation: spin var(--t) linear infinite;
}

.ring.rev {
  animation-direction: reverse;
}

.ring>button {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: rotate(var(--a)) translateX(calc(var(--d) / 2)) rotate(calc(-1 * var(--a)));
  translate: -50% -50%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.ring>button span {
  display: block;
  padding: .4rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(12, 12, 12, .85);
  color: var(--ink);
  font-size: .85rem;
  white-space: nowrap;
  animation: spin var(--t) linear infinite reverse;
  transition: background .3s, color .3s, border-color .3s;
}

.ring.rev>button span {
  animation-direction: normal;
}

.ring>button.on span,
.ring>button:hover span,
.ring>button:focus-visible span {
  background: var(--planet);
  border-color: var(--planet);
  color: #000;
}

.orbit-map:hover .ring,
.orbit-map:hover .ring>button span,
.orbit-map:focus-within .ring,
.orbit-map:focus-within .ring>button span {
  animation-play-state: paused;
}

.used-in {
  padding: 2rem;
  min-height: 300px;
}

.used-in .label {
  margin-bottom: .6rem;
}

.used-title {
  font-weight: 300;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -.03em;
  line-height: 1.05;
  margin-bottom: 1.4rem;
}

.used-list {
  list-style: none;
  border-top: 1px dashed var(--line);
}

.used-list li {
  padding: .8rem 0;
  border-bottom: 1px dashed var(--line);
  color: var(--muted);
}

.used-in.swap .used-title,
.used-in.swap .used-list {
  animation: pop .5s var(--ease);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.skill-row ul li[data-used] {
  cursor: pointer;
  transition: color .3s;
  border-bottom: 1px solid transparent;
}

.skill-row ul li[data-used]:hover,
.skill-row ul li[data-used].on,
.skill-row ul li[data-used]:focus-visible {
  color: var(--planet);
  border-color: var(--planet);
  outline: none;
}

.skills-split {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 3rem;
  align-items: start;
}

.skills-split .used-in {
  position: sticky;
  top: 7rem;
}

/* =========================
   CONTACT EXTRAS
   ========================= */
.ktm {
  margin-top: 1.4rem;
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--muted);
  letter-spacing: .04em;
}

.ktm b {
  color: var(--planet);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: min(1000px, 100%);
  margin-top: 5rem;
  text-align: left;
}

.composer {
  padding: 2rem;
  display: grid;
  gap: 1rem;
}

.composer h2,
.channels-panel h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.composer label {
  display: grid;
  gap: .4rem;
  font-family: var(--mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.composer input,
.composer textarea {
  font: inherit;
  font-family: var(--sans);
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .8rem .9rem;
  resize: vertical;
  transition: border-color .3s;
}

.composer input:focus,
.composer textarea:focus {
  outline: none;
  border-color: var(--planet);
}

.composer .btn {
  justify-self: start;
}

.channels-panel {
  padding: 2rem;
}

.channels-panel .rows {
  margin-top: 1rem;
}

.copy-btn {
  font: inherit;
  font-family: var(--mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .25rem .5rem;
  cursor: pointer;
  margin-left: .6rem;
}

.copy-btn:hover {
  color: var(--ink);
  border-color: var(--muted);
}

@media (max-width: 900px) {
  .numbers {
    grid-template-columns: 1fr 1fr;
  }

  .numbers div:nth-child(3) {
    border-left: 0;
  }

  .numbers div:nth-child(n+3) {
    border-top: 1px solid var(--line);
  }

  .skills-split,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .skills-split .used-in {
    position: static;
  }

  .ring>button span {
    font-size: .7rem;
    padding: .3rem .55rem;
  }

}

.drift {
  text-shadow: none;
}

.numbers {
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.scene-shade {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, .62);
  opacity: 0;
  pointer-events: none;
}

.btn,
.filters button,
.copy-btn {
  text-shadow: none;
}

body.scrolled .sound-prompt.show {
  opacity: 0;
  pointer-events: none;
}

/* =========================
   VEIL: lander touching down / lifting off
   ========================= */
.veil-scene {
  --surf: 24vh;
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(1px 1px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 78% 12%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 34% 42%, #cfe3ff, transparent), radial-gradient(1px 1px at 62% 30%, #fff, transparent),
    radial-gradient(1px 1px at 88% 48%, #ffe9cf, transparent), radial-gradient(1px 1px at 22% 62%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 50% 8%, #fff, transparent), radial-gradient(1px 1px at 6% 40%, #fff, transparent),
    radial-gradient(1px 1px at 94% 22%, #fff, transparent), radial-gradient(1px 1px at 70% 58%, #fff, transparent);
}

.vs-planet {
  position: absolute;
  left: 50%;
  top: calc(100% - var(--surf));
  width: 220vmax;
  height: 220vmax;
  margin-left: -110vmax;
  border-radius: 50%;
  background:
    radial-gradient(ellipse 30% 4% at 50% 0, color-mix(in srgb, var(--planet) 60%, #fff) 0, transparent 100%),
    radial-gradient(circle at 50% 0, var(--planet) 0, color-mix(in srgb, var(--planet) 45%, #000) 9%, #050505 30%);
  box-shadow: 0 0 80px 10px color-mix(in srgb, var(--planet) 40%, transparent), inset 0 2px 0 color-mix(in srgb, var(--planet) 70%, #fff);
}

.vs-ship {
  position: absolute;
  left: 50%;
  bottom: var(--surf);
  width: 44px;
  height: 62px;
  margin-left: -22px;
}

.vs-ship svg {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.vs-hull { fill: #e9ebee; }
.vs-port { fill: #c9962e; stroke: #18191c; stroke-width: 1.5; }
.vs-fin { fill: #e0571f; }
.vs-leg { fill: none; stroke: #9aa0a8; stroke-width: 2; stroke-linecap: round; }

.vs-flame {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 14px;
  height: 46px;
  margin-left: -7px;
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  background: linear-gradient(#fff, #9fd0ff 30%, #3d8bff 60%, transparent);
  filter: blur(1px);
  transform-origin: 50% 0;
  transform: scaleY(0);
}

.vs-dust {
  position: absolute;
  left: 50%;
  bottom: calc(var(--surf) - 14px);
  width: 220px;
  height: 34px;
  margin-left: -110px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--planet) 55%, #fff), transparent);
  opacity: 0;
}

.transition-veil .veil-hud {
  position: absolute;
  top: 22vh;
  left: 0;
  right: 0;
  z-index: 1;
}

.transition-veil[data-mode="land"] .vs-planet { animation: vs-rise var(--vd, 1.6s) cubic-bezier(.2, .7, .3, 1) both; }
.transition-veil[data-mode="land"] .vs-ship { animation: vs-land var(--vd, 1.6s) cubic-bezier(.25, .8, .35, 1) both; }
.transition-veil[data-mode="land"] .vs-flame { animation: vs-burn-out var(--vd, 1.6s) linear both, vs-flicker .08s steps(2) infinite; }
.transition-veil[data-mode="land"] .vs-dust { animation: vs-puff .9s calc(var(--vd, 1.6s) * .78) ease-out both; }

.transition-veil[data-mode="approach"] .vs-planet { animation: vs-approach-planet .9s cubic-bezier(.3, .6, .4, 1) both; }
.transition-veil[data-mode="approach"] .vs-ship { animation: vs-approach-ship .9s cubic-bezier(.3, .6, .4, 1) both; }
.transition-veil[data-mode="approach"] .vs-flame { transform: scaleY(1); animation: vs-flicker .08s steps(2) infinite; }

.transition-veil[data-mode="launch"] .vs-planet { animation: vs-sink .9s cubic-bezier(.6, 0, .8, .4) both; }
.transition-veil[data-mode="launch"] .vs-ship { animation: vs-liftoff .9s cubic-bezier(.6, 0, .8, .4) both; }
.transition-veil[data-mode="launch"] .vs-flame { animation: vs-burn-up .9s linear both, vs-flicker .08s steps(2) infinite; }
.transition-veil[data-mode="launch"] .vs-dust { animation: vs-puff .7s ease-out both; }

@keyframes vs-rise { from { transform: translateY(45vh); } }
@keyframes vs-land {
  0% { transform: translateY(-80vh) rotate(-14deg); }
  70% { transform: translateY(-6vh) rotate(2deg); }
  88% { transform: translateY(2px) rotate(0); }
  94% { transform: translateY(-3px); }
  100% { transform: none; }
}
@keyframes vs-burn-out {
  0%, 60% { transform: scaleY(1.3); }
  85% { transform: scaleY(.6); }
  100% { transform: scaleY(0); }
}
@keyframes vs-flicker { 50% { opacity: .75; } }
@keyframes vs-puff {
  0% { opacity: 0; transform: scale(.3); }
  25% { opacity: .9; }
  100% { opacity: 0; transform: scale(1.8, 1.3); }
}
@keyframes vs-approach-planet { from { transform: translateY(60vh); } to { transform: translateY(8vh); } }
@keyframes vs-approach-ship { from { transform: translateY(-85vh) rotate(-18deg); } to { transform: translateY(-26vh) rotate(-6deg); } }
@keyframes vs-sink { to { transform: translateY(50vh); } }
@keyframes vs-liftoff {
  0% { transform: none; }
  15% { transform: translateY(2px); }
  100% { transform: translateY(-95vh) rotate(4deg); }
}
@keyframes vs-burn-up { from { transform: scaleY(.3); } 20% { transform: scaleY(1.2); } to { transform: scaleY(2.2); } }

@media (prefers-reduced-motion: reduce) {
  .veil-scene { display: none; }
}
.transition-veil:not([data-mode]) .veil-scene { display: none; }

/* =========================
   POINTER TOYS
   ========================= */
.reticle {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 600;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}

.reticle.on { opacity: 1; }

.reticle::before,
.reticle::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transition: transform .35s var(--ease), border-color .3s, opacity .3s;
}

/* ring broken into four arcs, like a targeting sight */
.reticle::before {
  border: 1px solid transparent;
  border-top-color: var(--planet);
  border-bottom-color: var(--planet);
  opacity: .7;
}

.reticle::after {
  inset: 15px;
  background: var(--planet);
}

.reticle.hot::before {
  transform: scale(1.6) rotate(90deg);
  border-left-color: var(--planet);
  border-right-color: var(--planet);
  opacity: 1;
}

.reticle.hot::after { transform: scale(0); }
.reticle.down::before { transform: scale(.8) rotate(45deg); }

.spark {
  position: fixed;
  z-index: 600;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: var(--planet);
  box-shadow: 0 0 6px var(--planet);
  pointer-events: none;
  animation: spark .6s var(--ease) forwards;
}

@keyframes spark {
  to {
    transform: translate(var(--x), var(--y)) scale(.2);
    opacity: 0;
  }
}

.btn { transition: background .3s, color .3s, border-color .3s, translate .35s var(--ease), box-shadow .3s; }
.btn:hover { box-shadow: 0 0 24px color-mix(in srgb, var(--planet) 35%, transparent); border-color: var(--planet); }
.btn.solid:hover { background: var(--planet); border-color: var(--planet); color: #000; }
.audio-btn, .filters button, .term-open { transition: translate .35s var(--ease), color .3s, background .3s, border-color .3s; }

.tilt {
  transition: transform .5s var(--ease);
  will-change: transform;
}

.tilt:hover { transition-duration: .12s; }

:where(.panel.glow) { position: relative; } /* zero specificity: sticky panels keep position: sticky */

.panel.glow::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), color-mix(in srgb, var(--planet) 14%, transparent), transparent 60%);
}

.panel.glow::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
  background: radial-gradient(260px circle at var(--gx, 50%) var(--gy, 50%), var(--planet), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.panel.glow:hover::before,
.panel.glow:hover::after { opacity: 1; }

@media (hover: none) {
  .reticle { display: none; }
}

/* =========================
   TYPE: Orbitron for display, Exo 2 for reading
   ========================= */
.display,
h2.title,
.veil-hud b,
.used-title,
.stat b,
.numbers b,
.metrics b,
.next span,
.drift,
.marquee-track span,
.topbar .home-link,
.stack-card h3,
.showcase-copy h3,
.edu h3,
.skill-row h3,
.mobile-copy h3 {
  font-family: var(--display);
  letter-spacing: 0;
}

.display { font-weight: 600; font-size: clamp(2.4rem, 6.6vw, 5.6rem); line-height: 1.04; text-transform: uppercase; }
h2.title { font-weight: 500; font-size: clamp(1.7rem, 3.8vw, 3rem); }
.used-title { font-weight: 500; font-size: clamp(1.4rem, 2.6vw, 2.1rem); }
.stack-card h3, .showcase-copy h3, .edu h3, .skill-row h3, .mobile-copy h3 { font-weight: 500; font-size: clamp(1.05rem, 1.8vw, 1.45rem); line-height: 1.25; }
.next span { font-weight: 600; text-transform: uppercase; }
.drift { font-weight: 700; text-transform: uppercase; }
.marquee-track span { font-weight: 500; text-transform: uppercase; }
.topbar .home-link { font-weight: 600; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; padding-right: 1rem; }
body.scrolled .topbar { width: min(880px, calc(100vw - 2rem)); }
.veil-hud b { font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
body { font-weight: 300; letter-spacing: .01em; }
.label, .veil-hud, .hud { letter-spacing: .14em; }

/* =========================
   INTRO EXTRAS
   ========================= */
.role-line {
  margin-top: 1.6rem;
  font-family: var(--mono);
  font-size: clamp(.95rem, 1.4vw, 1.15rem);
  color: var(--ink);
  min-height: 1.6em;
}

.typer { color: var(--planet); }

.caret {
  display: inline-block;
  width: .55em;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -.2em;
  background: var(--planet);
  animation: blink 1s steps(2) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* corner brackets + a scan line over the portrait */
.hud-frame::before,
.hud-frame::after {
  content: '';
  position: absolute;
  z-index: 2;
  width: 28px;
  height: 28px;
  pointer-events: none;
  border: 2px solid var(--planet);
  transition: inset .5s var(--ease);
}

.hud-frame::before { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.hud-frame::after { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }
.hud-frame:hover::before { top: 6px; left: 6px; }
.hud-frame:hover::after { bottom: 6px; right: 6px; }

.hud-frame .scan {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 0, color-mix(in srgb, var(--planet) 30%, transparent) 50%, transparent 52%);
  background-size: 100% 220%;
  mix-blend-mode: screen;
  animation: scan 4.5s linear infinite;
  opacity: .5;
}

@keyframes scan { from { background-position: 0 120%; } to { background-position: 0 -120%; } }

.hud-frame .tag {
  position: absolute;
  z-index: 2;
  left: 16px;
  bottom: 14px;
  padding: .3rem .55rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  color: var(--planet);
  background: rgba(0, 0, 0, .55);
  border: 1px solid color-mix(in srgb, var(--planet) 40%, transparent);
  border-radius: 4px;
  backdrop-filter: blur(6px);
}

.do-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 2.5rem;
}

.do-card {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: 2rem;
  min-height: 300px;
  text-decoration: none;
  overflow: hidden;
}

.do-card h3 { font-family: var(--display); font-weight: 500; font-size: 1.15rem; line-height: 1.3; }
.do-card p { color: var(--muted); }

.do-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 3rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--planet) 70%, transparent);
  transition: color .4s;
}

.do-card:hover .do-num { color: var(--planet); }

.do-go {
  margin-top: auto;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .08em;
  color: var(--planet);
  transform: translateX(-4px);
  opacity: .7;
  transition: transform .4s var(--ease), opacity .3s;
}

.do-card:hover .do-go { transform: none; opacity: 1; }

.apps-card {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3rem;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  text-decoration: none;
  overflow: hidden;
}

.apps-copy .lede { margin-bottom: 1.4rem; }
.apps-copy .tags { margin-bottom: 1.8rem; }

/* screenshot dressed as a browser window */
.browser {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: .55rem .8rem;
  background: #161616;
  border-bottom: 1px solid var(--line);
}

.browser-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3a3a3a;
}

.browser-bar i:first-child { background: #e0571f; }

.browser-bar b {
  flex: 1;
  margin-left: .6rem;
  padding: .2rem .7rem;
  border-radius: 999px;
  background: #0b0b0b;
  font-family: var(--mono);
  font-weight: 400;
  font-size: .68rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser img { width: 100%; aspect-ratio: 16/10; object-fit: cover; object-position: top; }

@media (max-width: 900px) {
  .do-grid, .apps-card { grid-template-columns: 1fr; }
  .do-card { min-height: 0; }
}

/* experience: employer and client sites as live browser windows */
.stack-card .media.browser { display: block; position: relative; align-self: center; text-decoration: none; }
.stack-card .media.browser img { height: auto; aspect-ratio: 16/10; object-position: top; transition: transform .8s var(--ease); }
.stack-card .media.browser:hover img { transform: scale(1.04); }

.visit {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: .45rem .8rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: #000;
  background: var(--planet);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s, transform .4s var(--ease);
}

.media.browser:hover .visit,
.media.browser:focus-visible .visit { opacity: 1; transform: none; }

.site-stack {
  position: relative;
  align-self: center;
  display: grid;
}

.site-stack > .media { grid-area: 1 / 1; transition: transform .6s var(--ease), z-index 0s .3s; }
.site-stack > .media:first-child { transform: translate(-7%, -12%) scale(.9); z-index: 1; }
.site-stack > .media:last-child { transform: translate(5%, 8%) scale(.9); z-index: 2; }
.site-stack > .media:hover { z-index: 3; transform: scale(.97); transition: transform .6s var(--ease), z-index 0s; }

/* =========================
   SKILLS: pills, family filter, richer used-in panel
   ========================= */
.skill-row ul { gap: .55rem; font-size: .98rem; }

.skill-row ul li {
  padding: .45rem .9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .02);
}

.skill-row ul li[data-used] { transition: color .3s, border-color .3s, background .3s, box-shadow .3s, transform .3s var(--ease); }

.skill-row ul li[data-used]:hover,
.skill-row ul li[data-used].on,
.skill-row ul li[data-used]:focus-visible {
  border-color: var(--planet);
  background: color-mix(in srgb, var(--planet) 12%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--planet) 25%, transparent);
  transform: translateY(-2px);
}

.skill-row { transition: opacity .4s; }
.skill-row.dim { opacity: .25; }

.skill-filters { justify-content: center; margin: 1.2rem 0 1rem; }

.ring > button { transition: opacity .4s, filter .4s; }
.ring > button.dim { opacity: .15; filter: grayscale(1); pointer-events: none; }
.orbit-map.filtered .ring > button:not(.dim) span {
  border-color: var(--planet);
  box-shadow: 0 0 16px color-mix(in srgb, var(--planet) 35%, transparent);
}

.used-cat {
  display: inline-block;
  margin-bottom: .8rem;
  padding: .2rem .6rem;
  border: 1px solid color-mix(in srgb, var(--planet) 45%, transparent);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--planet);
}

.used-title { margin-bottom: 1rem; }

.used-meter {
  display: flex;
  gap: 4px;
}

.used-meter i {
  flex: 1;
  height: 6px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .08);
  transition: background .4s, box-shadow .4s;
}

.used-meter i.on {
  background: var(--planet);
  box-shadow: 0 0 10px color-mix(in srgb, var(--planet) 60%, transparent);
}

.used-meter i:nth-child(2) { transition-delay: .05s; }
.used-meter i:nth-child(3) { transition-delay: .1s; }
.used-meter i:nth-child(4) { transition-delay: .15s; }
.used-meter i:nth-child(5) { transition-delay: .2s; }

.used-count {
  margin: .5rem 0 1.2rem;
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.used-list a { text-decoration: none; color: var(--ink); transition: color .3s; }
.used-list a::after { content: ' ↗'; color: var(--planet); }
.used-list a[href$=".html"]::after { content: ' →'; }
.used-list a:hover { color: var(--planet); }

.used-related { margin-top: 1.4rem; }

.used-related small {
  display: block;
  margin-bottom: .6rem;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}

.used-related .chips { display: flex; flex-wrap: wrap; gap: .35rem; }

.used-related button {
  font: inherit;
  font-size: .8rem;
  padding: .3rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .3s, border-color .3s;
}

.used-related button:hover { color: var(--ink); border-color: var(--planet); }
.stack-card .rows li { display: block; }
.stack-card .rows li > a { display: inline; width: auto; }

@media (max-width: 560px) {
  .topbar .home-link { font-size: .62rem; padding-right: .4rem; }
  .display { font-size: clamp(2rem, 10vw, 3rem); }
}

/* =========================
   PROJECT SHOWCASE: live sites scroll on hover, maps get a lens
   ========================= */
.showcase-media figure { position: relative; }

.showcase-media figure.site {
  display: flex;
  background: transparent;
  overflow: visible;
}

.showcase-media .site .browser {
  flex: 1;
  display: flex;
  flex-direction: column;
  filter: brightness(.55) saturate(.7);
  transform: scale(.97);
  transition: filter 1s var(--ease), transform 1.4s var(--ease);
}

.showcase-media .site.on .browser { filter: none; transform: none; }

.browser-bar em {
  font-style: normal;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #000;
  background: #7dffb0;
  padding: .1rem .45rem;
  border-radius: 4px;
  margin-left: .5rem;
  animation: blink 2s steps(2) infinite;
}

.scroller {
  flex: 1;
  display: block;
  background-size: 100% auto;
  background-repeat: no-repeat;
  background-position: 50% 0;
  transition: background-position 1.4s var(--ease);
  cursor: ns-resize;
}

.scroller:hover,
.scroller:focus-visible {
  background-position: 50% 100%;
  transition: background-position 9s linear;
}

.showcase-media figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  padding: .35rem .7rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(0, 0, 0, .6);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  pointer-events: none;
  transition: opacity .3s;
}

.showcase-media figure:hover figcaption { opacity: 0; }

.credit { margin: -.6rem 0 1.2rem !important; font-size: .9rem; }
.showcase-copy .tags { margin-bottom: 1.6rem; }

.lens {
  position: absolute;
  z-index: 4;
  width: 180px;
  height: 180px;
  margin: -90px 0 0 -90px;
  border-radius: 50%;
  border: 2px solid var(--planet);
  box-shadow: 0 0 0 6px rgba(0, 0, 0, .35), 0 20px 50px rgba(0, 0, 0, .6);
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .25s, transform .35s var(--ease);
}

.lens::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
}

figure:hover > .lens { opacity: 1; transform: none; }
[data-lens] { cursor: zoom-in; }

.ascii { cursor: pointer; }
.ascii i { font-style: normal; transition: color .4s; }
.ascii .a-s { color: #555; }
.ascii .a-b { color: #ddd; }
.ascii .a-c { color: #9ab; }
.ascii .a-q { color: color-mix(in srgb, var(--planet) 55%, #222); }
.ascii .a-r { color: color-mix(in srgb, var(--planet) 35%, #444); }
.ascii .a-f { color: #1f1f22; }
.ascii .a-n { color: color-mix(in srgb, var(--planet) 22%, #1a1a1a); }
.ascii .a-p { color: var(--planet); }
.ascii .a-l { color: #d8dbe0; }
.ascii .a-fl { color: #7fc2ff; }
.ascii .a-w { color: #e0571f; }
.ascii .a-t { color: var(--planet); }
.ascii:hover .a-n { color: color-mix(in srgb, var(--planet) 32%, #1a1a1a); }

/* =========================
   PLAY: blaster, fragments
   ========================= */
.play-canvas {
  position: fixed;
  inset: 0;
  z-index: 550;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.play-hud {
  position: fixed;
  top: 5.5rem;
  left: 50%;
  z-index: 551;
  transform: translateX(-50%);
  padding: .7rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, .7);
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .08em;
  text-align: center;
  color: var(--muted);
  pointer-events: none;
}

.play-hud b { font-family: var(--display); font-size: 1.4rem; color: var(--planet); margin-right: .3rem; }
.play-hud span { display: block; margin-top: .3rem; font-size: .68rem; color: var(--faint); text-transform: uppercase; }

.fragment {
  position: absolute;
  z-index: 5;
  width: 22px;
  height: 22px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: none;
}

.fragment::before {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--planet);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 6px var(--planet));
  animation: frag 2.4s ease-in-out infinite;
}

.fragment.got::before { animation: frag-got .7s var(--ease) forwards; }

@keyframes frag {
  0%, 100% { opacity: .35; transform: scale(.8) rotate(0); }
  50% { opacity: 1; transform: scale(1.1) rotate(45deg); }
}

@keyframes frag-got { to { transform: scale(4) rotate(180deg); opacity: 0; } }

/* =========================
   ABOUT: flight log, badges, off-duty cards
   ========================= */
.flight { outline: none; }
.flight:focus-visible .flight-track { outline: 1px solid var(--planet); outline-offset: 10px; border-radius: 8px; }

.flight-track {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin: 0 .5rem 2.5rem;
}

.flight-track::before,
.flight-fill {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: var(--line);
}

.flight-fill {
  right: auto;
  width: 0;
  background: var(--planet);
  box-shadow: 0 0 12px var(--planet);
  transition: width .6s var(--ease);
}

.flight-track button {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #0b0b0b;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .72rem;
  cursor: pointer;
  transition: border-color .3s, color .3s, background .3s, transform .4s var(--ease), box-shadow .3s;
}

.flight-track button:hover { transform: scale(1.12); color: var(--ink); }
.flight-track button.past { border-color: color-mix(in srgb, var(--planet) 50%, transparent); color: var(--ink); }

.flight-track button.on {
  background: var(--planet);
  border-color: var(--planet);
  color: #000;
  transform: scale(1.2);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--planet) 18%, transparent), 0 0 30px var(--planet);
}

.flight-card { padding: 2rem; max-width: 640px; min-height: 170px; }
.flight-when { font-family: var(--mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--planet); }
.flight-title { margin: .5rem 0 .7rem; font-family: var(--display); font-weight: 500; font-size: 1.3rem; }
.flight-text { color: var(--muted); }
.flight-card.swap > * { animation: pop .5s var(--ease); }

.badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }

.badge {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  padding: 1.6rem;
}

.badge h3 { font-family: var(--display); font-weight: 500; font-size: 1rem; margin-bottom: .3rem; }
.badge p { color: var(--muted); font-size: .9rem; }
.badge-year { margin-left: auto; font-family: var(--mono); color: var(--planet); }

.badge-seal {
  flex: none;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  color: var(--planet);
  border: 2px dashed color-mix(in srgb, var(--planet) 60%, transparent);
  border-radius: 50%;
  transition: transform .8s var(--ease);
}

.badge:hover .badge-seal { transform: rotate(360deg); }

.duty-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  margin-top: 3rem;
}

.duty {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  min-height: 260px;
  padding: 1.6rem;
  font: inherit;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
}

.duty strong { font-family: var(--display); font-weight: 500; font-size: 1.05rem; }
.duty p { color: var(--muted); font-size: .9rem; }
.duty-glyph { font-size: 2.2rem; color: var(--planet); line-height: 1; transition: transform .6s var(--ease); }
.duty:hover .duty-glyph { transform: scale(1.25) rotate(-12deg); }

.duty-act {
  margin-top: auto;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--planet);
}

.duty-act::before { content: '▸ '; }

.ball {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #bbb 60%, #666);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .5);
  pointer-events: none;
}

@media (max-width: 900px) {
  .duty-grid { grid-template-columns: repeat(2, 1fr); }
  .badges { grid-template-columns: 1fr; }
  .flight-track button { width: 36px; height: 36px; font-size: .6rem; }
}

/* =========================
   PROJECTS: card grid
   ========================= */
.proj-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.proj-grid li.is-hidden { display: none; }

.proj-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  text-decoration: none;
  background: rgba(11, 11, 11, .92);
  transition: transform .5s var(--ease), border-color .3s, box-shadow .4s;
}

.proj-card:hover,
.proj-card:focus-visible {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--planet) 50%, transparent);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .55), 0 0 30px color-mix(in srgb, var(--planet) 15%, transparent);
}

.proj-thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #111;
}

.proj-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 1.2s var(--ease), object-position 3s ease;
}

.proj-card:hover .proj-thumb img { transform: scale(1.05); object-position: bottom; }

/* code-only projects get a generated cover: tint, blueprint grid and a big mark */
.proj-thumb.tile {
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 22px 22px,
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--tint) 100%, #fff 15%), var(--tint) 45%, #050505);
  transition: background-position 1.5s var(--ease);
}

.proj-card:hover .proj-thumb.tile { background-position: 11px 11px, 11px 11px, 0 0; }

.proj-thumb.tile span {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 0 30px rgba(255, 255, 255, .35);
  transition: transform .8s var(--ease), letter-spacing .8s var(--ease);
}

.proj-card:hover .proj-thumb.tile span { transform: scale(1.08); letter-spacing: .14em; }

.proj-body {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  flex: 1;
  padding: 1.3rem 1.4rem 1.2rem;
}

.proj-kind { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.proj-body h3 { font-family: var(--display); font-weight: 500; font-size: 1.02rem; line-height: 1.3; }
.proj-body p { color: var(--muted); font-size: .9rem; line-height: 1.55; }

.proj-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: .8rem;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--faint);
}

.proj-foot .go { color: var(--muted); transition: color .3s, transform .4s var(--ease); }
.proj-card:hover .proj-foot .go { color: var(--planet); transform: translateX(3px); }

@media (max-width: 900px) { .proj-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .proj-grid { grid-template-columns: 1fr; } }

/* contact channel icons */
.ch { display: inline-flex; align-items: center; gap: .75rem; }

.ico {
  flex: none;
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  fill: none;
  stroke: var(--planet);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: background .3s, border-color .3s, transform .4s var(--ease), stroke .3s;
}

.rows li > a:hover .ico {
  background: var(--planet);
  border-color: var(--planet);
  stroke: #000;
  transform: rotate(-8deg) scale(1.08);
}

.play-exit {
  position: fixed;
  top: 5.5rem;
  right: 1.25rem;
  z-index: 552;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.1rem;
  border: 1px solid var(--planet);
  border-radius: 999px;
  background: rgba(0, 0, 0, .75);
  color: var(--ink);
  font: inherit;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .3s, color .3s;
}

.play-exit:hover { background: var(--planet); color: #000; }
.play-exit span { font-size: .95rem; }

.lander-ui { position: relative; height: 0; }
.lander-ui[hidden] { display: none; }
.lander-exit { position: absolute; top: 3.4rem; right: 1.25rem; z-index: 5; }

.lander-pad {
  display: none;
  justify-content: center;
  align-items: center;
  gap: .9rem;
  padding: 1rem 0 max(1.2rem, env(safe-area-inset-bottom));
}

.lander-pad button {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1px solid var(--planet);
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(8px);
  color: var(--planet);
  font-size: 1.4rem;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.lander-pad button:active { background: var(--planet); color: #000; }
.lander-pad button[data-k="up"] { width: 84px; height: 84px; }

@media (hover: none), (pointer: coarse) {
  .lander-pad.on { display: flex; }
}
.channels-panel .rows li, .channels-panel .rows li > a { align-items: center; }

/* project thumbnails: scrolling sites, live chart, live sim, typed terminal */
.proj-grid li { position: relative; }

.proj-thumb.scroll img { transition: object-position 1.2s var(--ease); }
.proj-card:hover .proj-thumb.scroll img { transform: none; object-position: 50% 100%; transition: object-position var(--dur, 6s) linear; }
.proj-thumb.scroll.auto img { animation: thumb-scroll var(--dur, 6s) ease-in-out infinite alternate; }
@keyframes thumb-scroll { from { object-position: 50% 0; } to { object-position: 50% 100%; } }

.proj-code {
  position: absolute;
  top: .8rem;
  right: .8rem;
  z-index: 2;
  padding: .35rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(6px);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  transition: background .3s, color .3s;
}

.proj-code:hover { background: var(--planet); color: #000; }

.proj-thumb small {
  position: absolute;
  left: .8rem;
  bottom: .7rem;
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.proj-thumb.chart {
  display: grid;
  place-items: center;
  padding: 1rem 1.2rem 1.8rem;
  background: radial-gradient(circle at 20% 0, #0f3a26, #050806 70%);
}

.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .lbl { font: 11px var(--sans); fill: #c9d6cf; }
.chart .val { font: 10px var(--mono); fill: #7dffb0; opacity: 0; transition: opacity .4s .5s; }
.chart rect { fill: #3ddc84; transform-box: fill-box; transform-origin: left; transform: scaleX(.04); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 80ms); }
.chart g:first-child rect { fill: #7dffb0; }
.chart.on rect { transform: none; }
.chart.on .val { opacity: 1; }

.proj-thumb.bh canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .4s; }
.proj-thumb.bh.run canvas { opacity: 1; }

.termthumb { background: #07090b; padding: .9rem 1rem; }

.termthumb pre {
  height: 100%;
  overflow: hidden;
  font-family: var(--mono);
  font-size: .66rem;
  line-height: 1.35;
  color: #9fe3b8;
  white-space: pre-wrap;
}

.termthumb pre::after { content: '▋'; animation: blink 1s steps(2) infinite; }

/* =========================
   PHONES: menu, type, order
   ========================= */
.menu-btn { display: none; }

.planet-menu {
  position: fixed;
  inset: 0;
  z-index: 290;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .3rem;
  padding: 6rem 1.5rem 3rem;
  background: rgba(0, 0, 0, .94);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s, visibility 0s .35s;
}

body.menu-open .planet-menu { opacity: 1; visibility: visible; transition: opacity .35s; }

.planet-menu a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px dashed var(--line);
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.6rem, 8vw, 2.4rem);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  transform: translateY(16px);
  opacity: 0;
  transition: transform .5s var(--ease), opacity .4s;
}

body.menu-open .planet-menu a { transform: none; opacity: 1; }
.planet-menu a:nth-child(2) { transition-delay: .04s; }
.planet-menu a:nth-child(3) { transition-delay: .08s; }
.planet-menu a:nth-child(4) { transition-delay: .12s; }
.planet-menu a:nth-child(5) { transition-delay: .16s; }
.planet-menu a:nth-child(6) { transition-delay: .2s; }
.planet-menu a small { font-family: var(--mono); font-size: .75rem; color: var(--c); }
.planet-menu a::after { content: ''; width: 10px; height: 10px; margin-left: auto; border-radius: 50%; background: var(--c); box-shadow: 0 0 14px var(--c); align-self: center; }
.planet-menu a[aria-current] { color: var(--c); }

@media (max-width: 760px) {
  .topbar .links { display: none; }
  .topbar .home-link { display: flex; margin-right: auto; }

  .menu-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    height: 38px;
    padding: 0 .9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-family: var(--mono);
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .menu-btn i {
    display: block;
    width: 14px;
    height: 1.5px;
    background: currentColor;
    transition: transform .35s var(--ease);
  }

  .menu-btn i + i { margin-left: calc(-14px - .45rem); transform: translateY(3px); } /* cancel the flex gap so the bars overlap */
  .menu-btn i:first-child { transform: translateY(-3px); }
  body.menu-open .menu-btn i:first-child { transform: rotate(45deg); }
  body.menu-open .menu-btn i + i { transform: rotate(-45deg); }

  h2.title { font-size: clamp(1.35rem, 6.4vw, 2rem); overflow-wrap: anywhere; }
  .display { overflow-wrap: anywhere; }
  .hud { font-size: .58rem; left: .9rem; bottom: .9rem; line-height: 1.6; }
  .orbit-badge { width: 72px; height: 72px; right: .8rem; bottom: .8rem; }
  .orbit-badge span { width: 32px; height: 32px; }

  /* skills: the used-in panel follows the orbit instead of trailing every row */
  .skills-split > div { display: contents; }
  .skills-split .rows-label, .skills-split .skill-rows { order: 2; }
  .skills-split .used-in { order: 1; margin-top: 1rem; }
  .ring > button span { font-size: .68rem; padding: .3rem .55rem; }

  .flight-track button { width: 32px; height: 32px; font-size: .55rem; }
  .duty { min-height: 200px; }
  .play-hud { top: auto; bottom: 6.5rem; width: calc(100vw - 2rem); }
  .play-exit { top: 1rem; }
}

/* touch devices: drop the full-screen grain layer and most background blurs; they cost frames on phones */
@media (hover: none) {
  body::after { display: none; }
  .play-hud, .proj-code, .visit, .showcase-media figcaption, .hud-frame .tag, .tip-body { backdrop-filter: none; }
  .hud-frame .scan { animation-duration: 8s; }
}
.proj-thumb.bh.run small { opacity: 0; }
.proj-grid li.wide { grid-column: 1 / -1; }
@media (min-width: 561px) {
  .proj-grid li.wide .proj-card { flex-direction: row; }
  .proj-grid li.wide .proj-thumb { flex: 1.3; aspect-ratio: auto; min-height: 260px; border-bottom: 0; border-right: 1px solid var(--line); }
  .proj-grid li.wide .proj-body { flex: 1; justify-content: center; }
}

.lander-play {
  display: block;
  margin: 2.4rem auto -1.4rem;
  padding: .7rem 1.4rem;
  position: relative;
  z-index: 2;
  border: 1px solid var(--planet);
  border-radius: 999px;
  background: rgba(0, 0, 0, .6);
  color: var(--planet);
  font: inherit;
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 20px color-mix(in srgb, var(--planet) 25%, transparent);
  transition: background .3s, color .3s, transform .3s var(--ease);
}

.lander-play:hover { background: var(--planet); color: #000; transform: translateY(-2px); }
.lander-play[hidden] { display: none; }
.ascii { touch-action: manipulation; }
.ascii .a-ok { color: #7dffb0; }

/* veil extras: stars rushing past, re-entry plasma, haze on the horizon */
.veil-scene::before {
  content: '';
  position: absolute;
  inset: -100% 0 0;
  background:
    radial-gradient(1px 6px at 20% 30%, rgba(255, 255, 255, .7), transparent), radial-gradient(1px 9px at 70% 10%, rgba(255, 255, 255, .5), transparent),
    radial-gradient(1px 5px at 45% 70%, rgba(200, 220, 255, .6), transparent), radial-gradient(1px 8px at 85% 55%, rgba(255, 255, 255, .5), transparent),
    radial-gradient(1px 7px at 8% 85%, rgba(255, 255, 255, .6), transparent);
  background-size: 260px 310px, 190px 370px, 330px 230px, 230px 410px, 290px 270px; /* mismatched tiles so no grid shows */
  opacity: 0;
}

.transition-veil[data-mode="land"] .veil-scene::before { animation: vs-rush var(--vd, 1.6s) cubic-bezier(.2, .7, .3, 1) both; }
.transition-veil[data-mode="launch"] .veil-scene::before { animation: vs-rush-down .9s cubic-bezier(.6, 0, .8, .4) both; }
@keyframes vs-rush { 0% { transform: translateY(0); opacity: .9; } 70% { opacity: .5; } 100% { transform: translateY(-50%); opacity: 0; } }
@keyframes vs-rush-down { 0% { transform: translateY(-50%); opacity: 0; } 30% { opacity: .8; } 100% { transform: translateY(0); opacity: .9; } }

/* plasma: a hot trail streaming up behind the falling lander, burning off before the flare */
.vs-ship::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 30%;
  width: 34px;
  height: 140px;
  margin-left: -17px;
  border-radius: 50% 50% 40% 40%;
  background: linear-gradient(to top, #fff 0, #ffd28a 12%, #ff7a2a 35%, rgba(255, 90, 30, .3) 65%, transparent);
  filter: blur(4px);
  opacity: 0;
  transform-origin: 50% 100%;
}

.transition-veil[data-mode="land"] .vs-ship::before { animation: vs-plasma var(--vd, 1.6s) linear both; }
@keyframes vs-plasma { 0% { opacity: .95; transform: scaleY(1.2); } 45% { opacity: .6; transform: scaleY(.7); } 60%, 100% { opacity: 0; transform: scaleY(.3); } }

.vs-planet::after {
  content: '';
  position: absolute;
  inset: -6px 0 auto;
  height: 30%;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: radial-gradient(ellipse 50% 40% at 50% 0, color-mix(in srgb, var(--planet) 40%, transparent), transparent);
  filter: blur(10px);
}

/* =========================
   PHONES: overflow + tap targets
   ========================= */
.contact-grid > * { min-width: 0; } /* grid items default to min-width:auto, which let one long row widen the page */

@media (max-width: 560px) {
  .channels-panel .rows li > a { flex-wrap: wrap; row-gap: .15rem; }
  .channels-panel .rows li > a span:last-child { flex-basis: 100%; padding-left: calc(34px + .75rem); text-align: left; font-size: .85rem; overflow-wrap: anywhere; }
  .channels-panel .rows li { gap: .6rem; }
}

@media (pointer: coarse) {
  .footer .meta a, .term-open { display: inline-flex; align-items: center; min-height: 40px; }
  .copy-btn { min-height: 38px; min-width: 56px; }
  .text-link.arrow, .mobile-copy .text-link { display: inline-flex; align-items: center; min-height: 40px; }
  .fragment { width: 40px; height: 40px; }
  .fragment::before { inset: 12px; }
  .topbar .home-link { min-height: 40px; display: flex; align-items: center; }
  .proj-code { padding: .55rem .9rem; }
}
.cta { position: relative; overflow-x: clip; }
html { overflow-x: clip; } /* belt and braces: nothing should ever widen the phone viewport */

/* bottom-left readouts: readable over bright planets */
.hud { color: var(--muted); text-shadow: 0 1px 3px #000, 0 0 12px #000; }
.hud b { color: var(--ink); }

/* =========================
   PHONES: round two
   ========================= */
@media (max-width: 760px) {
  .orbit-badge { display: none; } /* the name link in the bar already returns to orbit, and the badge covered content */
  .stack-card { position: relative; top: 0; } /* cards taller than the screen must scroll, not stick */

  /* flight log: a swipeable track with finger-sized stops */
  .flight-track { overflow-x: auto; scrollbar-width: none; gap: 1.6rem; justify-content: flex-start; padding: 1rem .5rem; margin: 0 -1.25rem 2rem; scroll-snap-type: x proximity; }
  .flight-track::-webkit-scrollbar { display: none; }
  .flight-track button { flex: none; width: 48px; height: 48px; font-size: .62rem; scroll-snap-align: center; }
  .flight-track::before, .flight-fill { display: none; }
}

/* touch screens: no hover, so drop hover-only captions and the lens; site previews scroll on their own */
@media (hover: none) {
  .showcase-media figcaption, .proj-thumb.bh small, .lens { display: none; }
  .scroller.auto { animation: bg-scroll 9s ease-in-out infinite alternate; }
}
@keyframes bg-scroll { from { background-position: 50% 0; } to { background-position: 50% 100%; } }
@media (pointer: coarse) { .rows li > a { min-height: 40px; align-items: center; } }

/* =========================
   SITE PREVIEW: a live browser window that pops out beside a hovered site link
   ========================= */
.site-pop {
  position: fixed;
  z-index: 450;
  width: var(--w, 640px);
  border-radius: 12px;
  overflow: hidden;
  background: #0b0b0b;
  border: 1px solid color-mix(in srgb, var(--planet) 40%, var(--line));
  box-shadow: 0 0 50px color-mix(in srgb, var(--planet) 18%, transparent), 0 40px 80px rgba(0, 0, 0, .7);
  opacity: 0;
  transform: scale(.92) translateY(8px);
  pointer-events: none;
  transition: opacity .25s, transform .45s var(--ease);
}
.site-pop.show { opacity: 1; transform: none; pointer-events: auto; }
.site-pop .browser-bar a { margin-left: auto; font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; color: var(--planet); }
.site-pop-body { position: relative; height: var(--h, 420px); background: #111; overflow: hidden; }
.site-pop iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: calc(var(--h, 420px) / var(--s, .5));
  border: 0;
  transform: scale(var(--s, .5));
  transform-origin: 0 0;
  background: #fff;
  opacity: 0;
  transition: opacity .5s;
}
.site-pop.loaded iframe { opacity: 1; }
.site-pop-shot { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.site-pop-shot img { display: block; width: 100%; }
.site-pop-load {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 3px);
}
.site-pop-load::after { content: '...'; animation: blink 1s steps(1) infinite; }
.site-pop.loaded .site-pop-load { display: none; }
@keyframes blink { 50% { opacity: 0; } }

/* =========================
   ANIME: hover the card for screentone and ゴゴゴ; click it for a full power-up
   ========================= */
.duty .tone {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--planet) 35%, transparent) 1px, transparent 1.6px) 0 0 / 7px 7px;
  mask-image: linear-gradient(135deg, transparent 30%, #000);
  opacity: 0;
  transition: opacity .5s;
  pointer-events: none;
}
.duty .menace {
  font-style: normal;
  position: absolute;
  right: .9rem;
  top: .6rem;
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -.05em;
  color: var(--planet);
  opacity: 0;
  transform: translateX(10px) skewX(-12deg);
  transition: opacity .4s, transform .5s var(--ease);
  pointer-events: none;
}
.duty:hover .tone, .duty:focus-visible .tone { opacity: 1; }
.duty:hover .menace, .duty:focus-visible .menace { opacity: .9; transform: skewX(-12deg); animation: menace .18s steps(2) infinite; }
@keyframes menace { 50% { translate: 1px -1px; } }

.duty-fx {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: grid;
  place-items: center;
  overflow: hidden auto;
  padding: 1rem 0;
  place-items: safe center;
  background: rgba(0, 0, 0, .9);
  backdrop-filter: blur(8px);
  animation: af-in .3s both;
}
.duty-fx.out { animation: af-in .45s reverse both; }
.anime-fx { overflow: hidden; } /* its speed lines overhang the screen on purpose */
@keyframes af-in { from { opacity: 0; } }

/* manga speed lines converging on the centre */
.af-lines {
  position: absolute;
  inset: -50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .55) 0 .6deg, transparent .6deg 4deg);
  mask-image: radial-gradient(circle, transparent 18%, #000 42%);
  animation: af-lines .9s cubic-bezier(.2, .8, .2, 1) both, af-spin .12s steps(2) infinite;
}
@keyframes af-lines { from { opacity: 0; transform: scale(2.4); } 60% { opacity: 1; } to { opacity: .45; transform: scale(1); } }
@keyframes af-spin { 50% { rotate: 1.2deg; } }

/* impact frame: a white flash, then the card slams in */
.af-flash { position: absolute; inset: 0; background: #fff; opacity: 0; animation: af-flash .5s .82s both; pointer-events: none; }
@keyframes af-flash { 0% { opacity: .95; } 100% { opacity: 0; } }

.af-go {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-style: normal;
  font-weight: 900;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  color: var(--planet);
  text-shadow: 3px 3px 0 #000, -1px -1px 0 #000;
  transform: rotate(var(--r)) skewX(-10deg);
  opacity: 0;
  animation: af-go 1.6s var(--d) both, menace .16s steps(2) infinite;
  pointer-events: none;
}
@keyframes af-go { 0% { opacity: 0; scale: .4; } 20% { opacity: 1; scale: 1.15; } 70% { opacity: .85; scale: 1; } 100% { opacity: .35; scale: 1; } }

.af-petal {
  position: absolute;
  left: var(--x);
  top: -5%;
  width: 12px;
  height: 9px;
  border-radius: 80% 0 80% 0;
  background: linear-gradient(135deg, #ffd6e4, #ff9cc0);
  scale: var(--s);
  opacity: .9;
  animation: af-fall var(--t) var(--d) linear infinite;
  pointer-events: none;
}
@keyframes af-fall { to { transform: translate(-12vw, 112vh) rotate(720deg); } }

.af-card {
  position: relative;
  width: min(460px, calc(100vw - 2rem));
  padding: 1.8rem 1.8rem 1.6rem;
  border: 3px solid #fff;
  border-radius: 4px;
  background: #0a0a0a;
  box-shadow: 8px 8px 0 var(--planet), 0 0 60px color-mix(in srgb, var(--planet) 35%, transparent);
  transform: rotate(-2deg);
  animation: af-slam .5s .85s cubic-bezier(.3, 1.6, .5, 1) both;
}
@keyframes af-slam { from { opacity: 0; transform: scale(2.2) rotate(6deg); } }
.af-card small { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--planet); }
.af-card b { display: block; margin: .4rem 0 .1rem; font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 6vw, 2.6rem); text-transform: uppercase; line-height: 1; }
.af-jp { display: block; font-weight: 900; font-size: 1.05rem; letter-spacing: .3em; color: var(--muted); }
.af-card p { margin: 1rem 0 1.4rem; color: var(--muted); }
.af-acts { display: flex; flex-wrap: wrap; gap: .7rem; }

@media (prefers-reduced-motion: reduce) {
  .af-lines, .af-go, .af-petal, .af-card, .af-flash { animation: none; }
  .af-go, .af-petal, .af-flash { display: none; }
}

/* =========================
   OFF DUTY: a United-red ball and League gold on the cards
   ========================= */
.duty[data-duty="sports"] .ball { background: radial-gradient(circle at 35% 35%, #fff 0 18%, #da291c 24% 60%, #7a0f0a); }

.duty[data-duty="game"] { transition: border-color .5s, box-shadow .5s; }
.duty[data-duty="game"]:hover { border-color: #c8aa6e; box-shadow: inset 0 0 0 1px #c8aa6e55, 0 0 30px #0ac8b922; }
.duty[data-duty="game"]:hover .duty-glyph { color: #c8aa6e; text-shadow: 0 0 14px #0ac8b9; }



/* shared card inside each off-duty scene */
.gt, .lol, .pk { position: relative; display: grid; justify-items: center; gap: 1rem; width: min(760px, calc(100vw - 2rem)); text-align: center; animation: af-slam .5s cubic-bezier(.3, 1.4, .5, 1) both; }
.gt small, .lol small, .pk small { font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.gt > b, .lol > b, .pk > b { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 5vw, 2.4rem); text-transform: uppercase; line-height: 1; }

/* =========================
   GUITAR: a rosewood neck with six strings
   ========================= */
.gt-neck {
  position: relative;
  width: 100%;
  height: min(260px, 38vh);
  border-radius: 6px;
  background:
    linear-gradient(90deg, #e8dcc0 0 14px, transparent 14px), /* the nut */
    linear-gradient(180deg, #3a2318, #2a170f 50%, #3a2318);
  box-shadow: inset 0 0 0 1px #00000080, 0 30px 60px rgba(0, 0, 0, .6);
  touch-action: none;
  cursor: grab;
  overflow: hidden;
}
.gt-neck:active { cursor: grabbing; }
.gt-fret { position: absolute; top: 0; bottom: 0; width: 3px; background: linear-gradient(90deg, #9a9a9a, #e9e9e9, #8a8a8a); }
.gt-fret:nth-child(1) { left: 20%; } .gt-fret:nth-child(2) { left: 38%; } .gt-fret:nth-child(3) { left: 54%; }
.gt-fret:nth-child(4) { left: 68%; } .gt-fret:nth-child(5) { left: 81%; }
.gt-dot { position: absolute; left: 46%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #e8dcc0; opacity: .8; }
.gt-str {
  position: absolute;
  left: 0;
  right: 0;
  top: calc((5 - var(--k)) * 16.66% + 8.33%);
  background: linear-gradient(#fff6, #d9c9a0, #8a7a55);
  box-shadow: 0 2px 3px #0008;
}
.gt-str[style*="--k:0"] { height: 4px; } .gt-str[style*="--k:1"] { height: 3.4px; } .gt-str[style*="--k:2"] { height: 2.8px; }
.gt-str[style*="--k:3"] { height: 2.2px; } .gt-str[style*="--k:4"] { height: 1.6px; } .gt-str[style*="--k:5"] { height: 1.2px; }
.gt-str.hum { animation: gt-hum .9s ease-out; }
@keyframes gt-hum {
  0% { background: var(--planet); box-shadow: 0 0 14px var(--planet); transform: translateY(3px); }
  8% { transform: translateY(-3px); } 16% { transform: translateY(2px); } 24% { transform: translateY(-1.5px); }
  36% { transform: translateY(1px); } 50%, 100% { transform: none; }
}
.gt-chords { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.gt-chords .btn { min-width: 64px; justify-content: center; }
.gt-chords .btn.on { background: var(--planet); border-color: var(--planet); color: #000; }
.gt-hint { color: var(--muted); font-size: .85rem; }

/* =========================
   LEAGUE: the queue pop
   ========================= */
.league-fx { background: radial-gradient(circle at 50% 45%, #0a1a24ee, #010a13f5 70%); }
.lol {
  width: min(420px, calc(100vw - 2rem));
  padding: 2rem 1.6rem 1.6rem;
  border: 2px solid #c8aa6e;
  background: linear-gradient(#010a13, #0a1428);
  box-shadow: 0 0 0 1px #785a28, 0 0 60px #0ac8b933, inset 0 0 40px #0ac8b914;
}
.lol::before, .lol::after { content: ''; position: absolute; left: 50%; width: 14px; height: 14px; margin-left: -7px; background: #c8aa6e; transform: rotate(45deg); }
.lol::before { top: -8px; } .lol::after { bottom: -8px; }
.lol small { color: #a09b8c; }
.lol > b { color: #f0e6d2; letter-spacing: .04em; }
.lol-ring { position: relative; width: 120px; height: 120px; }
.lol-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.lol-ring circle { fill: none; stroke: #1e2328; stroke-width: 4; }
.lol-ring .lol-t { stroke: #0ac8b9; filter: drop-shadow(0 0 6px #0ac8b9); }
.lol-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 2rem; color: #f0e6d2; }
.lol-accept {
  width: 100%;
  padding: .9rem;
  border: 2px solid #0ac8b9;
  background: linear-gradient(#1e2328, #0a1428);
  color: #cdfafa;
  font: inherit;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 20px #0ac8b944;
  transition: background .25s, box-shadow .25s;
}
.lol-accept:hover { background: linear-gradient(#0ac8b933, #0a1428); box-shadow: 0 0 30px #0ac8b988; }
.lol-decline { background: none; border: 0; color: #a09b8c; font: inherit; font-size: .85rem; cursor: pointer; text-decoration: underline; }
.lol-msg { min-height: 1.4em; color: #c8aa6e; font-family: var(--display); letter-spacing: .06em; }
.league-fx.accepted .lol { border-color: #0ac8b9; }
.league-fx.accepted .lol-accept { background: #0ac8b9; color: #010a13; }

/* =========================
   UNITED: a penalty shootout at Old Trafford
   ========================= */
.united-fx { background: radial-gradient(circle at 50% 30%, #3a0805f2, #0b0202f7 70%); }
.pk { width: min(720px, calc(100vw - 1.5rem), calc((100vh - 300px) * 1.6)); min-width: min(320px, calc(100vw - 1.5rem)); gap: .6rem; }
.pk .fx-emblem { width: 72px; height: 72px; }
.pk > b { color: #fff; text-shadow: 0 0 24px #da291c; }
.pk small { color: #fbe122; }
.pk-board { display: flex; align-items: center; gap: .7rem; padding: .45rem .9rem; border: 1px solid #da291c66; border-radius: 8px; background: #000a; font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; }
.pk-board strong { font-family: var(--display); font-size: 1.3rem; color: #fff; min-width: 4.5ch; text-align: center; }
.pk-board span { color: #fbe122; }
.pk-marks { display: flex; gap: 4px; font-style: normal; }
.pk-marks i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #ffffff66; }
.pk-marks i.in { background: #3fbf3f; border-color: #3fbf3f; }
.pk-marks i.out { background: #da291c; border-color: #da291c; }
.pk-cv { width: 100%; aspect-ratio: 720 / 450; border-radius: 10px; touch-action: none; cursor: crosshair; box-shadow: 0 30px 60px rgba(0, 0, 0, .6); }
.pk-msg { min-height: 1.4em; font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: #fff; }
@media (max-width: 560px) { .pk > b { font-size: 1.4rem; } .pk .fx-emblem { width: 64px; height: 64px; } }

/* LAST HIT: the Q button */
.lh-q {
  position: fixed;
  left: 50%;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  z-index: 552;
  width: 74px;
  height: 74px;
  margin-left: -37px;
  border: 2px solid #c8aa6e;
  border-radius: 12px;
  background: conic-gradient(#000b calc(var(--cd, 0) * 360deg), transparent 0), linear-gradient(#1e2328, #0a1428);
  color: #f0e6d2;
  font: 700 1.6rem/1 var(--display);
  cursor: pointer;
  box-shadow: 0 0 20px #0ac8b944;
}
.lh-q small { display: block; margin-top: 4px; font: 500 .5rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #a09b8c; }
.lh-q.cd { border-color: #785a28; color: #a09b8c; }
.lh-canvas { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .gt, .lol, .pk { animation: none; } .gt-str.hum { animation: none; } }

/* hover emblems on the off-duty cards: a guitar, a League sigil, a Red Devil crest */
.duty .emblem {
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 58px;
  height: 58px;
  color: var(--planet);
  opacity: 0;
  transform: scale(.5) rotate(-25deg);
  transition: opacity .4s, transform .6s cubic-bezier(.3, 1.5, .5, 1), filter .4s;
  pointer-events: none;
}
.duty .emblem svg, .duty .emblem img { width: 100%; height: 100%; display: block; object-fit: contain; }
.duty[data-duty="game"] .emblem { width: 104px; height: 42px; }
.duty[data-duty="sports"] .emblem { width: 64px; height: 64px; }
.duty:hover .emblem, .duty:focus-visible .emblem { opacity: 1; transform: none; filter: drop-shadow(0 0 12px color-mix(in srgb, var(--planet) 60%, transparent)); }
.duty[data-duty="game"]:hover .emblem { filter: drop-shadow(0 0 12px #0ac8b966); }
.duty[data-duty="sports"]:hover .emblem { filter: drop-shadow(0 0 14px #da291c99); animation: crest 1.6s ease-in-out infinite; }
@keyframes crest { 50% { translate: 0 -3px; } }
@media (hover: none) { .duty .emblem { opacity: .9; transform: none; } }

.fx-emblem { display: block; width: 64px; height: 64px; color: var(--planet); }
.fx-emblem svg, .fx-emblem img { width: 100%; height: 100%; object-fit: contain; }
.league-fx .fx-emblem { width: 180px; height: 70px; }
.united-fx .fx-emblem { width: 96px; height: 96px; filter: drop-shadow(0 0 18px #da291c); }
.league-fx .fx-emblem { filter: drop-shadow(0 0 12px #0ac8b955); }


