/*
  The game layer: intro screen, HUD, exploration tracker, the docked panel,
  and the type scale for the sans display face. Loaded last.
*/

/* ---------- Type scale ---------- */

.monogram-mark {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.05em;
}

.hero-copy h1 {
  font-weight: 700;
  font-size: clamp(50px, 15vw, 72px);
  letter-spacing: -.05em;
}

.portfolio-dialog h2 {
  font-size: clamp(32px, 3.1vw, 44px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.portfolio-dialog h3 {
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.portfolio-dialog h4,
.timeline h4 {
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -.015em;
}

.timeline-year {
  font-size: 24px;
  letter-spacing: -.03em;
}

.contact-email {
  font-size: clamp(18px, 5vw, 32px);
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}

.contact-signoff {
  font-size: 20px;
  letter-spacing: -.02em;
}

/* ---------- Backdrop when WebGL is not available ---------- */

.scene-viewport {
  background: radial-gradient(120% 90% at 60% 40%, #1c2631 0%, #0b1016 70%);
}

body:not(.scene-3d) .scene-hotspot {
  display: none;
}

.scene-shade {
  background:
    linear-gradient(0deg, rgba(6, 9, 13, .96) 0%, rgba(6, 9, 13, .8) 26%, transparent 40%),
    linear-gradient(180deg, rgba(6, 9, 13, .92) 0%, rgba(6, 9, 13, .7) 26%, transparent 42%);
}

/* ---------- Scene markers ---------- */

.scene-3d .scene-hotspot > i {
  border-color: var(--accent);
  background: rgba(185, 163, 255, .35);
  box-shadow: none;
  animation: marker 2.6s ease-out infinite;
}

@keyframes marker {
  from { box-shadow: 0 0 0 0 rgba(255, 255, 255, .6); }
  to { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); }
}

.scene-hotspot > span {
  border-color: rgba(185, 163, 255, .4);
  background: rgba(8, 12, 16, .9);
  font: 500 12px/1.2 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ---------- HUD: the row of slots ---------- */

.collection-button kbd {
  display: none;
}

/* ---------- Welcome: the front door. One centred column over the room, softened and darkened:
   portrait, "Welcome to David's Open Desk", who I am, one button. ---------- */

div.intro {
  --mx: 50vw;
  --my: 42vh;
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background: radial-gradient(circle 60vmin at var(--mx) var(--my), rgba(5, 7, 10, .5) 0%, rgba(5, 7, 10, .74) 60%, rgba(5, 7, 10, .88) 100%);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  cursor: pointer;
  transition: opacity .9s, visibility .9s;
}

div.intro.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1100px;
}

/* Each piece rises into place, one after another. */
.intro-inner > * { animation: intro-in .9s cubic-bezier(.2, .8, .2, 1) backwards; }
.intro-title { animation-delay: .1s; }
.intro-role { animation-delay: .28s; }
.intro-inner > .intro-enter { animation-delay: .5s; }

@keyframes intro-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.intro-photo {
  display: block;
  flex: none;
  width: 92px;
  height: 92px;
  margin: 0 0 26px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .12), 0 10px 30px rgba(0, 0, 0, .5);
}

.intro-title {
  padding-top: .08em;
  font: 400 clamp(40px, 6.2vw, 98px)/.92 var(--game-face);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 5px 0 rgba(8, 6, 20, .75), 0 14px 40px rgba(0, 0, 0, .5);
  transform: skewX(-6deg);
  transform-origin: center bottom;
}

.intro-title > small {
  display: block;
  margin-bottom: .5em;
  color: #f7c81e;
  font-size: .26em;
  letter-spacing: .12em;
  text-shadow: 0 3px 0 rgba(8, 6, 20, .8);
}

.intro-title > span { color: #f7c81e; }

.intro-role {
  margin-top: 28px;
  font: 500 21px/1.4 'DM Sans', system-ui, sans-serif;
  color: #f3d870;
}

.intro-role b { color: #ffffff; font-weight: 700; }
.intro-role i { margin: 0 4px; font-style: normal; color: rgba(255, 255, 255, .4); }

.intro-enter {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  min-height: 58px;
  margin-top: 40px;
  padding: 4px 26px 0 22px;
  border: 0;
  border-radius: 10px;
  outline: none;
  background: linear-gradient(180deg, #fff06a, #f7c81e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 5px 0 #9a7208;
  color: #1a1430;
  font: 400 20px/1 var(--game-face);
  letter-spacing: .05em;
  text-transform: uppercase;
  transform: skewX(-8deg);
  transition: transform .18s, background-color .18s;
}

.intro-enter:hover {
  background: linear-gradient(180deg, #fff8a8, #ffd83a);
  transform: skewX(-8deg) translateY(-1px);
}

.intro-enter:focus-visible {
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 5px 0 #9a7208, 0 0 0 4px rgba(255, 255, 255, .22);
}

.intro-bulb {
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .5), 0 0 16px 4px rgba(255, 255, 255, .8);
}

/* The meter along the bottom of the button: it runs down, then the lights come on by themselves. */
.intro-count {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 5px;
  background: #1a1430;
  opacity: .55;
  transform: scaleX(var(--left, 1));
  transform-origin: left;
}

/* While the intro is up, the HUD waits; it arrives after the camera does. */

body.intro .site-header,
body.intro .hero-copy,
body.intro .collection-nav,
body.intro .studio-footer,
body.intro .camera-controls,
body.intro .scene-hotspot {
  opacity: 0 !important;
  pointer-events: none;
}

.studio-footer,
.scene-hotspot {
  transition: opacity .4s;
}

body.entering .site-header,
body.entering .hero-copy,
body.entering .collection-nav,
body.entering .studio-footer,
body.entering .camera-controls,
body.entering .scene-hotspot {
  transition: opacity .9s 1.3s, transform .9s 1.3s;
}

/* ---------- Panel open: clear the stage for the close-up ---------- */

.panel-open .hero-copy,
.panel-open .collection-nav,
.panel-open .site-header,
.panel-open .scene-hotspot {
  opacity: 0;
  pointer-events: none;
}

/* ---------- 760px and up ---------- */

@media (min-width: 760px) {
  .hero-copy {
    top: 15%;
    left: var(--gutter);
  }

  .hero-copy h1 {
    margin: 10px 0 16px;
    font-size: clamp(48px, 4.6vw, 80px);
  }

  .hero-description {
    font-size: clamp(18px, 1.4vw, 20px);
  }

  .portfolio-dialog h3 {
    font-size: 24px;
  }

  .timeline h4 {
    font-size: 20px;
  }

  .timeline-year {
    font-size: 32px;
  }

  .scene-shade {
    background:
      linear-gradient(0deg, rgba(6, 9, 13, .94) 0%, rgba(6, 9, 13, .55) 16%, transparent 34%),
      linear-gradient(90deg, rgba(6, 9, 13, .5), transparent 36%),
      radial-gradient(120% 95% at 55% 48%, transparent 62%, rgba(4, 6, 9, .34) 100%),
      linear-gradient(180deg, rgba(6, 9, 13, .5), transparent 22%);
  }

  .collection-nav {
    left: var(--gutter);
    right: var(--gutter);
    bottom: 64px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
  }

  .collection-button,
  .collection-button.collection-contact {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 2px 12px;
    padding: 12px 14px;
    border: 1px solid rgba(214, 226, 236, .16);
    border-radius: 12px;
    background: rgba(9, 13, 18, .66);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: background-color .18s, border-color .18s, transform .18s;
  }

  .collection-button:hover,
  .collection-button:focus-visible {
    border-color: var(--accent);
    background: rgba(14, 20, 27, .9);
    transform: translateY(-3px);
  }

  .collection-button::before,
  .collection-arrow {
    display: none;
  }

  .collection-button kbd {
    display: grid;
    grid-row: 1 / span 2;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(214, 226, 236, .28);
    border-radius: 7px;
    color: var(--muted);
    transition: border-color .3s, color .3s, background-color .3s;
  }

  .collection-name {
    font: 600 16px/1.25 var(--display);
    letter-spacing: -.015em;
  }

  .collection-button small {
    display: none;
    grid-column: 2;
    font-size: 12px;
    line-height: 1.3;
    color: var(--faint);
  }
}

/* ---------- 1100px and up: the panel docks on the right, the close-up stays in view ---------- */

@media (min-width: 1100px) {
  .collection-button small {
    display: block;
  }

  .portfolio-dialog {
    width: min(960px, 58vw);
    height: calc(100dvh - 32px);
    margin: 16px 16px 16px auto;
    transform: translateX(40px);
  }

  .portfolio-dialog[open] {
    transform: none;
  }

  @starting-style {
    .portfolio-dialog[open] {
      opacity: 0;
      transform: translateX(40px);
    }
  }

  .portfolio-dialog[open]::backdrop {
    background: rgba(4, 7, 10, .06);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (max-height: 700px) and (min-width: 760px) {
  .hero-copy h1 {
    font-size: clamp(52px, 10vh, 76px);
  }

  .collection-button small {
    display: none;
  }
}

@media (max-height: 640px) and (max-width: 759px) {
  .hero-copy h1 {
    font-size: 46px;
  }
}

/* ---------- Hero: a quiet name plate, so the desk is the main event ---------- */

.hero-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(44px, 11vw, 52px);
  letter-spacing: -.035em;
  line-height: 1;
}

.hero-description {
  font: 400 18px/1.45 var(--sans);
  letter-spacing: 0;
  color: #e6ebe6;
}

@media (min-width: 760px) {
  .hero-copy {
    top: 104px;
  }

  .hero-copy h1 {
    margin: 0 0 12px;
    font-size: clamp(44px, 3.6vw, 60px);
  }

  .hero-description {
    font-size: 18px;
  }

}

@media (max-height: 700px) and (min-width: 760px) {
  .hero-copy {
    top: 88px;
  }

  .hero-copy h1 {
    font-size: 44px;
  }
}

/* ---------- My story: career at a glance ---------- */

.career {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.career li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.career-years {
  font: 500 12px/1.6 var(--mono);
  letter-spacing: .06em;
  color: var(--faint);
}

.career li.is-now .career-years {
  color: var(--warm);
}

.career-org {
  font: 600 18px/1.3 var(--display);
  letter-spacing: -.01em;
  color: var(--ink);
}

.career-role {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

@container panel (min-width: 520px) {
  .career li {
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .career-years {
    grid-row: 1 / span 2;
    padding-top: 3px;
  }
}

/* ---------- Extra profile icons: desktop header only ---------- */

.icon-extra {
  display: none;
}

@media (min-width: 760px) {
  .icon-extra {
    display: grid;
  }
}

@media (min-width: 480px) {
  .contact-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Skills panel ---------- */

.claude-art {
  background: linear-gradient(135deg, #2a1a14, #17212a);
}

.claude-art .rig-word span {
  color: #d97757;
}

.plain-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.plain-list li {
  position: relative;
  padding-left: 18px;
}

.plain-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.skill-groups {
  display: grid;
  gap: 0;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}

.skill-groups > div {
  display: grid;
  gap: 10px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.skill-groups dt {
  font: 600 18px/1.3 var(--display);
  color: var(--ink);
}

.skill-groups dd {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-groups dd span {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
}

@container panel (min-width: 520px) {
  .skill-groups > div {
    grid-template-columns: 190px minmax(0, 1fr);
  }
}

/* ---------- Sound toggle ---------- */

.sound-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  white-space: nowrap;
}

.sound-toggle:hover,
.sound-toggle[aria-pressed="true"] {
  color: var(--accent);
}

@media (min-width: 760px) {
  .collection-nav {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

/* ---------- One menu per screen size ----------
   Desktop and tablet: the labels on the objects are the menu, so the bottom row and the top links step aside.
   Phones: the bottom buttons are the menu, and the objects carry dots only. */

@media (min-width: 760px) {
  .collection-nav,
  .site-sections {
    display: none !important;
  }

  .scene-shade {
    background:
      linear-gradient(0deg, rgba(6, 9, 13, .8) 0%, transparent 16%),
      linear-gradient(90deg, rgba(6, 9, 13, .5), transparent 36%),
      radial-gradient(120% 95% at 55% 48%, transparent 62%, rgba(4, 6, 9, .34) 100%),
      linear-gradient(180deg, rgba(6, 9, 13, .5), transparent 22%);
  }
}

@media (max-width: 759px) {
  .scene-3d .scene-hotspot {
    display: flex;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border-color: rgba(185, 163, 255, .7);
  }

  .scene-3d .scene-hotspot > span {
    display: none;
  }

  body:not(.exploring) .camera-controls {
    display: none;
  }
}

/* ---------- My career: a flow you scroll through ---------- */

.flow {
  margin-top: 8px;
}

.flow-rail {
  position: sticky;
  top: -34px;
  z-index: 2;
  display: flex;
  gap: 8px;
  margin: 0 0 28px;
  padding: 44px 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
  background: linear-gradient(var(--panel) 78%, transparent);
}

.flow-rail::-webkit-scrollbar {
  display: none;
}

.flow-track {
  position: relative;
  margin: 0;
  padding: 0 0 0 32px;
  list-style: none;
}

/* The spine, and the part of it you have travelled. */
.flow-track::before,
.flow-track::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 10px;
  width: 2px;
  border-radius: 2px;
}

.flow-track::before {
  bottom: 0;
  background: var(--line);
}

.flow-track::after {
  height: calc(var(--progress, 0) * (100% - 10px));
  background: var(--accent);
  transition: height .2s linear;
}

.flow-stop {
  position: relative;
  padding-bottom: 56px;
  scroll-margin-top: 72px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s, transform .6s cubic-bezier(.2, .8, .2, 1);
}

.flow-stop.is-in {
  opacity: 1;
  transform: none;
}

.flow-stop::before {
  content: '';
  position: absolute;
  z-index: 1;
  left: -32px;
  top: 3px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--panel);
}

.flow-stop.is-current::before {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(185, 163, 255, .16);
}

.flow-dates {
  font: 500 12px/1.6 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
}

.flow-stop.is-current .flow-dates {
  color: var(--accent);
}

.portfolio-dialog .flow-org {
  margin-top: 2px;
  font: 600 32px/1.15 var(--display);
  letter-spacing: -.02em;
}

.flow-place {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.flow-role {
  margin-top: 16px;
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.flow-role-head {
  display: grid;
  gap: 4px;
}

.portfolio-dialog .flow-role-title {
  font: 600 18px/1.3 var(--display);
  letter-spacing: -.01em;
}

.flow-role-dates {
  font: 500 12px/1.5 var(--mono);
  letter-spacing: .04em;
  color: var(--faint);
}

.flow-role .plain-list {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.55;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 -6px 20px;
  font: 500 12px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
}

.flow-step::before {
  content: '↑';
  color: var(--accent);
  font-size: 14px;
}

.motion-paused .flow-stop {
  opacity: 1;
  transform: none;
}

/* ---------- The panel as a terminal ----------
   Inside the panel every face becomes the monospace one (by re-pointing the font tokens),
   corners square off, and the chrome reads like a shell: a title bar, numbered commands, a prompt. */

.portfolio-dialog {
  --display: var(--mono);
  --sans: var(--mono);
  --panel: #0a0d10;
  --surface: #10151a;
  --surface-2: #171e25;
  --muted: #c3ccd2;
  --faint: #8d9aa5;
  --line: rgba(214, 226, 236, .14);
  --r: 6px;
}

.portfolio-dialog :is(h2, h3, h4, p, a, li, dt, dd, span, strong, button, input) {
  letter-spacing: 0;
}

.panel {
  border-radius: 10px;
}

.panel-content {
  font-size: 14px;
  line-height: 1.75;
}

/* Title bar */

.panel-bar {
  position: relative;
  min-height: 52px;
  padding-left: 84px;
  border-bottom: 1px solid var(--line);
  background: #0f1317;
}

.panel-bar::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -5px;
  border-radius: 50%;
  background: #ff6058;
  box-shadow: 18px 0 0 #ffbd2e, 36px 0 0 #28c941;
}

.panel-kicker {
  font: 500 12px/1.4 var(--mono);
  text-transform: lowercase;
  color: var(--faint);
}

.panel-kicker::before {
  content: 'david@studio:~/';
  color: var(--accent);
}

.close-dialog {
  min-height: 36px;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  text-transform: lowercase;
}

/* Commands */

.panel-tabs {
  counter-reset: command;
}

.panel-tabs button {
  justify-content: flex-start;
  gap: 10px;
  font: 500 14px/1 var(--mono);
  text-transform: lowercase;
}

.panel-tabs button::before {
  counter-increment: command;
  content: counter(command);
  display: grid;
  flex: none;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--faint);
  font-size: 11px;
}

.panel-tabs button .count {
  margin-left: auto;
}

.panel-tabs button.is-active {
  color: var(--accent);
}

.panel-tabs button.is-active::before {
  border-color: var(--accent);
  background: var(--accent);
  color: #0a0d10;
}

/* Prompt and headings */

.portfolio-dialog h2 {
  margin-bottom: 14px;
  font: 700 clamp(24px, 2.4vw, 32px)/1.2 var(--mono);
}

.portfolio-dialog h2::before {
  content: '> ';
  color: var(--accent);
  font-weight: 500;
}

.portfolio-dialog h2 > span {
  display: inline-block;
  width: .55em;
  height: 1em;
  margin-left: 6px;
  overflow: hidden;
  background: var(--accent);
  color: transparent;
  vertical-align: -.12em;
  animation: caret 1.1s steps(1) infinite;
}

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

.panel-lede {
  max-width: 62ch;
  margin-bottom: 32px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.portfolio-dialog h3 {
  font: 700 18px/1.35 var(--mono);
}

.portfolio-dialog h3.section-title::before {
  content: '## ';
  color: var(--faint);
  font-weight: 500;
}

.portfolio-dialog h4,
.portfolio-dialog .flow-role-title {
  font: 700 15px/1.45 var(--mono);
}

.portfolio-dialog .flow-org {
  font: 700 22px/1.25 var(--mono);
}

.prose p,
.feature-copy p,
.plain-list,
.flow-role .plain-list {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.eyebrow,
.flow-dates,
.flow-role-dates,
.career-years {
  font-size: 12px;
}

/* Lists, cards, chips and buttons: square, bordered, quiet */

.plain-list li::before {
  content: '›';
  top: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: var(--accent);
  font-weight: 700;
}

.portfolio-dialog :is(.feature, .flow-role, .rig-steps li, .contact-options a, .story-note),
.portfolio-dialog [class*="lib-card"],
.portfolio-dialog [class*="lib-row"],
.portfolio-dialog [class*="lib-search"] input {
  border-radius: 6px;
}

.portfolio-dialog :is(.flow-chip, .flow-note, .skill-groups dd span, .timeline-links a),
.portfolio-dialog [class*="lib-chip"],
.portfolio-dialog [class*="lib-badge"] {
  border-radius: 4px;
}

.skill-groups dd span {
  padding: 5px 10px;
  font-size: 13px;
}

.skill-groups dt,
.career-org {
  font: 700 15px/1.45 var(--mono);
}

.portfolio-dialog .ink-button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  font: 500 14px/1.2 var(--mono);
}

.portfolio-dialog .ink-button:hover {
  background: var(--accent);
  color: #0a0d10;
}

.portfolio-dialog .text-link {
  font: 500 14px/1.2 var(--mono);
}

.portfolio-dialog [class*="lib-title"] {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.portfolio-dialog .lib-card--featured .lib-title {
  font-size: 18px;
}

.contact-email {
  font-size: clamp(16px, 4vw, 22px);
  font-weight: 700;
}

.contact-options strong {
  font-size: 16px;
}

.contact-signoff,
.contact-signoff span {
  font-size: 16px;
}

.panel-nav-foot a,
.panel-brand {
  text-transform: lowercase;
}

@media (min-width: 760px) {
  .panel-bar {
    min-height: 52px;
    padding: 8px 12px 8px 84px;
  }

  .panel-nav {
    background: #0c1014;
  }

  .panel-brand span {
    font: 700 20px/1 var(--mono);
    color: var(--accent);
  }

  .panel-brand span::after {
    content: '@studio';
    color: var(--faint);
    font-weight: 500;
    font-size: 13px;
  }

  .panel-brand {
    font-size: 0;
  }

  .panel-tabs button.is-active {
    background: rgba(185, 163, 255, .08);
  }

  .panel-tabs button::after {
    display: none;
  }

  .panel-scroll {
    padding-top: 28px;
  }

  .portfolio-dialog h3 {
    font-size: 18px;
  }

  .panel-lede {
    font-size: 15px;
  }

  .timeline h4 {
    font-size: 15px;
  }

}

@media (min-width: 1100px) {
  .panel-bar {
    padding-left: 84px;
  }
}

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

.portfolio-dialog .lib-group-note {
  margin: 14px 0 16px;
  font-size: 13px;
}

/* ---------- Compact panel ----------
   No side rail: the commands run across the top, the panel is narrower, and the content gets the full width. */

@media (min-width: 760px) {
  .panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas:
      'bar'
      'nav'
      'scroll';
  }

  .panel-nav {
    display: block;
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: #0c1014;
  }

  .panel-brand,
  .panel-nav-foot {
    display: none;
  }

  .panel-tabs {
    flex-direction: row;
    gap: 2px;
    padding: 6px 10px;
    overflow-x: auto;
  }

  .panel-tabs button {
    width: auto;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 13px;
  }

  .panel-tabs button .count {
    margin-left: 0;
    font-size: 11px;
  }

  .panel-bar {
    min-height: 44px;
    padding: 4px 8px 4px 76px;
  }

  .panel-bar::before {
    left: 18px;
  }

  .panel-scroll {
    padding: 22px 28px 28px;
  }

  .portfolio-dialog h2 {
    margin-bottom: 8px;
    font-size: 24px;
  }

  .panel-lede {
    margin-bottom: 20px;
    font-size: 14px;
  }

  .section-title {
    margin: 36px 0 14px;
  }

  .inline-actions {
    margin-top: 28px;
  }

  .panel-content {
    padding-bottom: 32px;
  }
}

@media (min-width: 1100px) {
  .portfolio-dialog {
    width: min(720px, 50vw);
  }

  .panel-scroll {
    padding: 24px 32px 28px;
  }
}

/* ---------- Living background: two slow glows and a passing scan line, behind everything ---------- */

.panel {
  position: relative;
  isolation: isolate;
}

.panel::before,
.panel::after {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.panel::before {
  inset: 0;
  background:
    radial-gradient(42% 36% at 22% 28%, rgba(185, 163, 255, .12), transparent 70%),
    radial-gradient(38% 32% at 78% 70%, rgba(240, 168, 104, .10), transparent 70%),
    radial-gradient(30% 26% at 62% 18%, rgba(143, 176, 216, .09), transparent 70%);
  background-size: 170% 170%, 160% 160%, 180% 180%;
  animation: glow-drift 24s ease-in-out infinite alternate;
}

.panel::after {
  left: 0;
  right: 0;
  top: -20%;
  height: 20%;
  background: linear-gradient(180deg, transparent, rgba(185, 163, 255, .045) 60%, rgba(185, 163, 255, .09) 98%, transparent);
  animation: scan 9s linear infinite;
}

@keyframes glow-drift {
  0% { background-position: 0% 0%, 100% 100%, 60% 0%; }
  50% { background-position: 60% 40%, 30% 60%, 0% 70%; }
  100% { background-position: 100% 10%, 0% 20%, 90% 100%; }
}

@keyframes scan {
  to { transform: translateY(700%); }
}

.panel-bar,
.panel-nav {
  background: rgba(12, 16, 20, .82);
}

.portfolio-dialog :is(.flow-role, .feature, .skill-groups dd span),
.portfolio-dialog [class*="lib-card"] {
  background: rgba(16, 21, 26, .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* ---------- Smoother arrivals ---------- */

.portfolio-dialog {
  transition-duration: .22s;
}

.portfolio-dialog[open] {
  transition-duration: .42s;
  transition-timing-function: cubic-bezier(.16, 1, .3, 1);
}

.panel-content {
  animation: content-in .45s cubic-bezier(.16, 1, .3, 1);
}

.panel-scroll {
  scroll-behavior: smooth;
}

/* ---------- Compact career ---------- */

.flow-rail {
  top: -26px;
  margin: 0 0 16px;
  padding: 32px 0 10px;
  background: linear-gradient(rgba(10, 13, 16, .96) 80%, transparent);
}

.flow-track {
  padding-left: 26px;
}

.flow-stop {
  padding-bottom: 26px;
  transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1);
}

.flow-stop::before {
  left: -26px;
  top: 4px;
  width: 14px;
  height: 14px;
}

.flow-stop.is-current::before {
  animation: marker 2.6s ease-out infinite;
}

.flow-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 16px;
}

.portfolio-dialog .flow-org {
  margin: 0;
  font-size: 17px;
}

.flow-dates {
  font-size: 11px;
  text-transform: none;
}

.flow-place {
  margin-top: 0;
  font-size: 12px;
  color: var(--faint);
}

.flow-role {
  margin-top: 8px;
  padding: 0;
  overflow: hidden;
  transition: border-color .25s, background-color .25s;
}

.flow-role.is-open {
  border-color: rgba(185, 163, 255, .32);
}

.flow-role-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px 10px 14px;
  border: 0;
  background: none;
  color: var(--ink);
  text-align: left;
}

.flow-role-head:hover {
  background: rgba(185, 163, 255, .05);
}

.flow-role-heading {
  display: grid;
  gap: 1px;
}

.portfolio-dialog .flow-role-title {
  font: 500 13px/1.45 var(--mono);
}

.flow-role-dates {
  font-size: 11px;
}

.flow-role-mark {
  flex: none;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--accent);
  font: 500 14px/20px var(--mono);
  text-align: center;
}

.flow-role-mark::before {
  content: '+';
}

.flow-role.is-open .flow-role-mark::before {
  content: '−';
}

/* Height animates by growing a grid row from nothing to its natural size. */
.flow-role-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s cubic-bezier(.16, 1, .3, 1);
}

.flow-role.is-open .flow-role-body {
  grid-template-rows: 1fr;
}

.flow-role-inner {
  min-height: 0;
  overflow: hidden;
}

.flow-role .plain-list {
  margin: 0;
  padding: 2px 14px 14px;
  gap: 6px;
  font-size: 13px;
  line-height: 1.65;
}

.flow-step {
  margin: 6px 0 -2px 14px;
  font-size: 11px;
}

.career li {
  padding: 10px 0;
}

.career-org {
  font-size: 14px;
}

.career-role {
  font-size: 13px;
}

@media (min-width: 760px) {
  .panel-tabs button .count {
    display: none;
  }
}

/* ---------- My career, second pass: the arc, the numbers, a span bar to scale, logos and previews ---------- */

.arc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
}

.arc li {
  display: flex;
  align-items: center;
}

.arc li + li::before {
  content: '→';
  margin: 0 8px;
  color: var(--faint);
}

.arc li.is-now {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent);
  color: #0a0d10;
  font-weight: 700;
}

.arc li.is-now::before {
  margin-left: -8px;
}

.glance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 8px;
}

.glance > div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(16, 21, 26, .72);
}

.glance dt {
  font: 700 22px/1.1 var(--mono);
  color: var(--ink);
}

.glance dd {
  margin-top: 4px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.45;
}

@container panel (min-width: 520px) {
  .glance {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.flow-rail {
  display: block;
  top: -26px;
  margin: 0 0 6px;
  padding: 36px 0 8px;
  overflow: visible;
}

.span-bar {
  display: flex;
  gap: 3px;
  height: 30px;
}

.span-seg {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  min-width: 5px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
  transition: background-color .3s, border-color .3s, color .3s, transform .2s;
}

button.span-seg:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.span-seg.is-current {
  border-color: rgba(185, 163, 255, .55);
}

.span-seg.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #0a0d10;
}

.span-seg.is-gap {
  border-style: dashed;
  background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(214, 226, 236, .1) 5px 6px);
}

.span-label {
  padding: 0 8px;
  overflow: hidden;
  font: 500 11px/1 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.span-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: var(--faint);
  font-size: 11px;
}

.flow-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.portfolio-dialog .flow-tools .text-link {
  min-height: 28px;
  font-size: 12px;
}

.flow-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
}

.flow-logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #f6f4ee;
  color: #16191d;
  font: 700 12px/1 var(--mono);
}

.flow-logo img {
  width: 26px;
  height: auto;
}

.flow-logo-mark {
  width: 20px;
  height: 20px;
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}

.flow-when {
  text-align: right;
}

.flow-length {
  color: var(--faint);
  font-size: 11px;
}

.flow-stop::before {
  top: 10px;
}

.flow-role,
.flow-step {
  margin-left: 46px;
}

.flow-step {
  margin-left: 60px;
}

.flow-role-peek {
  display: block;
  max-width: 100%;
  margin-top: 2px;
  overflow: hidden;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-role-heading {
  min-width: 0;
}

.flow-role.is-open .flow-role-peek {
  display: none;
}

.flow-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 14px;
}

.flow-tags span {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 479px) {
  .flow-role,
  .flow-step {
    margin-left: 0;
  }
}

.arc li.is-now {
  padding: 0;
  background: none;
  color: var(--accent);
}

.arc li.is-now::before {
  margin-left: 8px;
}

.flow-rail {
  background: linear-gradient(transparent, rgba(10, 13, 16, .96) 42%, rgba(10, 13, 16, .96) 86%, transparent);
}

/* ---------- My career: awards, the IBM badge, a line about the company ---------- */

.flow-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 8px;
  border: 1px solid rgba(143, 176, 216, .5);
  border-radius: 4px;
  color: #a9c4e6;
  font: 500 11px/1.5 var(--mono);
  vertical-align: middle;
}

.flow-about {
  margin: 8px 0 0 46px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.flow-awards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0 46px;
  padding: 0;
  list-style: none;
}

.career .flow-awards {
  grid-column: 2;
  margin: 6px 0 0;
}

.flow-awards li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(240, 168, 104, .13);
  color: var(--warm);
  font-size: 12px;
  line-height: 1.5;
}

.flow-awards li::before {
  content: '★';
  font-size: 11px;
}

.flow-awards li span {
  color: rgba(240, 168, 104, .65);
  font-size: 11px;
}

@media (max-width: 479px) {
  .flow-about,
  .flow-awards {
    margin-left: 0;
  }
}

.flow-rail {
  background: linear-gradient(rgba(10, 13, 16, .98) 90%, transparent);
}

/* ---------- Writing: a plain list of links ---------- */

.lib-links {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.lib-link {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto 14px;
  align-items: baseline;
  gap: 4px 14px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color .18s, color .18s;
}

.lib-link:hover {
  background: rgba(185, 163, 255, .06);
  color: var(--accent);
}

.lib-link-date,
.lib-link-source {
  color: var(--faint);
  font-size: 11px;
  white-space: nowrap;
}

.lib-link-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lib-link-logo {
  flex: none;
  width: 15px;
  height: 15px;
  background: var(--logo-tint, currentColor);
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}

.lib-link-flag {
  margin-right: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  color: #1c1206;
  background: var(--warm, #f0a868);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.lib-link-go {
  color: var(--accent);
}

@container panel (max-width: 519px) {
  .lib-link {
    grid-template-columns: minmax(0, 1fr) 14px;
  }

  .lib-link-date {
    grid-column: 1;
  }

  .lib-link-title {
    grid-column: 1;
  }

  .lib-link-source {
    grid-column: 1;
  }

  .lib-link-go {
    grid-area: 1 / 2 / span 3;
    align-self: center;
  }
}

@media (min-width: 1100px) {
  .portfolio-dialog {
    width: min(880px, 58vw);
  }
}

/* ---------- My career header, third pass ---------- */

.portfolio-dialog[data-panel="career"] .panel-lede {
  margin-bottom: 14px;
}

.glance {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(120deg, rgba(185, 163, 255, .09), rgba(16, 21, 26, .7) 45%, rgba(240, 168, 104, .07));
  overflow: hidden;
}

.glance > div {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: inset -1px -1px 0 var(--line);
  transition: background-color .25s;
}

.glance > div:hover {
  background: rgba(185, 163, 255, .08);
}

.glance dt {
  font: 700 26px/1 var(--mono);
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, #ffffff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glance dd {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

@container panel (min-width: 520px) {
  .glance {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* The timeline bar */

.flow-rail {
  top: -14px;
  margin: 0 0 4px;
  padding: 22px 0 6px;
  background: rgba(10, 13, 16, .78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 100vmax rgba(10, 13, 16, 0);
}

.span-bar {
  gap: 2px;
  height: 34px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(16, 21, 26, .8);
}

.span-seg {
  position: relative;
  justify-content: center;
  overflow: visible;
  border: 0;
  border-radius: 5px;
  background: rgba(185, 163, 255, var(--strength, .2));
  color: var(--ink);
}

.span-seg.is-gap {
  border: 0;
  background: repeating-linear-gradient(135deg, rgba(240, 168, 104, .22) 0 4px, transparent 4px 8px);
  color: var(--warm);
}

button.span-seg:hover {
  transform: none;
  background: rgba(185, 163, 255, .55);
}

.span-seg.is-current {
  background: rgba(185, 163, 255, .72);
  color: #0a0d10;
}

.span-seg.is-active {
  background: var(--accent);
  color: #0a0d10;
  box-shadow: 0 0 18px rgba(185, 163, 255, .55);
}

.span-label {
  padding: 0 6px;
  font-size: 11px;
  font-weight: 500;
}

/* Hover names any segment, including the ones too short for a label. */
.span-seg[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(100% + 8px);
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #0a0d10;
  color: var(--ink);
  font: 500 11px/1.4 var(--mono);
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}

.span-seg:first-child[data-tip]:hover::after {
  left: 0;
  transform: none;
}

.span-seg:last-child[data-tip]:hover::after {
  left: auto;
  right: 0;
  transform: none;
}

.span-scale {
  position: relative;
  display: block;
  height: 18px;
  margin: 4px 4px 0;
  font-size: 10px;
}

.span-tick {
  position: absolute;
  top: 0;
  padding-top: 6px;
  color: var(--faint);
  transform: translateX(-50%);
}

.span-tick::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 4px;
  background: var(--faint);
}

.span-tick:first-child {
  transform: none;
}

.span-tick:first-child::before {
  left: 0;
}

.span-tick.is-now {
  left: auto;
  right: 0;
  color: var(--accent);
  transform: none;
}

.span-tick.is-now::before {
  left: auto;
  right: 0;
  background: var(--accent);
}

.flow-tools {
  margin-bottom: 8px;
}

.glance dt {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: var(--ink);
}

.glance > div:first-child dt {
  color: var(--accent);
}

.flow-rail {
  top: -8px;
  margin: 10px -8px 4px;
  padding: 8px 8px 6px;
  border-radius: 10px;
  background: rgba(10, 13, 16, .88);
}

/* ---------- Readable chrome: every piece of interface text sits on its own dark chip,
   so nothing is white on a bright wall, sky or floor ---------- */

.site-nav,
.monogram,
.studio-footer .location,
.studio-footer .sound-toggle,
.studio-footer #motion-toggle,
.studio-footer .camera-controls button {
  border: 1px solid rgba(214, 226, 236, .16);
  border-radius: 999px;
  background: rgba(8, 12, 16, .74);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.site-nav {
  padding: 4px;
}

.monogram {
  padding: 0 14px;
}

.icon-link {
  filter: none;
}

.studio-footer {
  gap: 8px;
  color: var(--ink);
}

.studio-footer .location,
.studio-footer .sound-toggle,
.studio-footer #motion-toggle,
.studio-footer .camera-controls button {
  min-height: 36px;
  padding: 0 14px;
  color: var(--ink);
  font: 500 12px/1 var(--sans);
  text-shadow: none;
}

/* "Look around" now lives in the footer with the other controls. */
.studio-footer .camera-controls {
  position: static;
  margin-left: auto;
  gap: 8px;
  transform: none;
}

.studio-footer .sound-toggle {
  margin-left: 0;
}

.studio-footer .camera-controls button:hover,
.studio-footer .sound-toggle:hover,
.studio-footer #motion-toggle:hover {
  border-color: var(--accent);
  background: rgba(8, 12, 16, .92);
  color: var(--ink);
}

.studio-footer .camera-controls kbd {
  padding: 2px 5px;
  font-size: 11px;
}

.exploring .studio-footer .camera-controls {
  position: fixed;
  left: 50%;
  right: auto;
  top: auto;
  bottom: 72px;
  width: auto;
  flex-wrap: nowrap;
  transform: translateX(-50%);
}

.exploring .camera-help {
  order: 0;
  width: auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(8, 12, 16, .74);
  white-space: nowrap;
}

/* The name plate gets a soft dark card behind it. */
.hero-copy {
  width: fit-content;
  max-width: calc(100% - var(--gutter) * 2);
  padding: 16px 20px 16px;
  border: 1px solid rgba(214, 226, 236, .12);
  border-radius: 16px;
  background: rgba(8, 12, 16, .58);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.hero-copy h1,
.hero-description {
  text-shadow: none;
}

@media (max-width: 759px) {
  .studio-footer .location,
  .studio-footer .sound-toggle,
  .studio-footer #motion-toggle {
    padding: 0 10px;
    font-size: 11px;
  }

  .hero-copy {
    padding: 12px 14px;
  }
}

.studio-footer > *,
.studio-footer .camera-controls button {
  white-space: nowrap;
}

@media (max-width: 1099px) {
  #quest-label {
    display: none;
  }
}

@media (max-width: 479px) {
  #motion-label {
    display: none;
  }
}

/* ---------- Photo and the executive line ---------- */

.hero-copy {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(460px, calc(100% - var(--gutter) * 2));
}

.hero-photo,
.contact-photo {
  flex: none;
  border: 2px solid rgba(242, 244, 238, .85);
  border-radius: 50%;
  object-fit: cover;
}

.hero-photo {
  width: 72px;
  height: 72px;
}

.hero-description {
  max-width: 30ch;
  font-size: 15px;
  line-height: 1.4;
  text-wrap: balance;
}

.contact-photo {
  display: block;
  width: 88px;
  height: 88px;
  margin-bottom: 16px;
  border-color: var(--accent);
}

@media (min-width: 760px) {
  .hero-copy h1 {
    margin-bottom: 6px;
    font-size: clamp(34px, 2.8vw, 44px);
  }

  .hero-description {
    font-size: 15px;
  }
}

@media (max-width: 759px) {
  .hero-photo {
    width: 56px;
    height: 56px;
  }

  .hero-copy h1 {
    font-size: 30px;
    margin-bottom: 4px;
  }

  .hero-description {
    font-size: 13px;
  }
}

.hero-copy {
  max-width: min(540px, calc(100% - var(--gutter) * 2));
}

.hero-description {
  max-width: 38ch;
}

/* ---------- Name card, compact ---------- */

.hero-copy {
  gap: 12px;
  max-width: min(400px, calc(100% - var(--gutter) * 2));
  padding: 12px 16px 12px 12px;
  border: 1px solid rgba(185, 163, 255, .28);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(8, 12, 16, .78), rgba(20, 16, 34, .7));
  box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
}

.hero-photo {
  width: 56px;
  height: 56px;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(185, 163, 255, .16);
}

.hero-copy h1 {
  margin: 0 0 2px;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -.025em;
}

.hero-description {
  max-width: none;
  font: 500 13px/1.4 var(--sans);
  color: #dfe4e2;
  white-space: nowrap;
}

.hero-description i {
  margin: 0 4px;
  font-style: normal;
  color: rgba(242, 244, 238, .45);
}

@media (min-width: 760px) {
  .hero-copy h1 {
    margin-bottom: 2px;
    font-size: 26px;
  }

  .hero-description {
    font-size: 13px;
  }
}

@media (max-width: 759px) {
  .hero-photo {
    width: 48px;
    height: 48px;
  }

  .hero-copy h1 {
    font-size: 22px;
  }

  .hero-description {
    font-size: 12px;
    white-space: normal;
  }
}

/* ---------- Podcast: compact rows led by company and guest ---------- */

.glance--podcast {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pod-actions {
  margin: 14px 0 22px;
}

.lib-brands {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 12px 0 14px;
}

.lib-brands-label,
.lib-brands-more {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lib-brands-label {
  margin-right: 4px;
}

.lib-brand {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .03);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .18s, background-color .18s, color .18s;
}

.lib-brand:hover,
.lib-brand[aria-pressed="true"] {
  border-color: var(--accent);
  background: rgba(185, 163, 255, .14);
  color: var(--accent);
}

.lib-eps {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.lib-ep {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 16px;
  align-items: baseline;
  gap: 1px 14px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  text-decoration: none;
  transition: background-color .18s;
}

.lib-ep:hover {
  background: rgba(185, 163, 255, .07);
}

.lib-ep-date {
  grid-row: 1 / span 2;
  color: var(--faint);
  font-size: 11px;
  white-space: nowrap;
}

.lib-ep-who {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 10px;
  min-width: 0;
}

.lib-ep-org {
  color: var(--accent);
  font-weight: 700;
}

.lib-ep-guest {
  font-weight: 500;
}

.lib-ep-role {
  color: var(--muted, var(--faint));
  font-size: 11.5px;
}

.lib-ep-title {
  grid-column: 2;
  overflow: hidden;
  color: var(--faint);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lib-ep-go {
  grid-area: 1 / 3 / span 2;
  align-self: center;
  color: var(--accent);
  font-size: 10px;
  opacity: .55;
  transition: opacity .18s;
}

.lib-ep:hover .lib-ep-go {
  opacity: 1;
}

.lib-ep:hover .lib-ep-title {
  color: var(--ink);
}

@container panel (max-width: 519px) {
  .lib-ep {
    grid-template-columns: minmax(0, 1fr) 16px;
  }

  .lib-ep-date {
    grid-row: auto;
    grid-column: 1;
  }

  .lib-ep-title {
    grid-column: 1;
    white-space: normal;
  }

  .lib-ep-go {
    grid-area: 1 / 2 / span 3;
  }
}

/* ---------- Library panels: a tighter header, and small pictures on video rows ---------- */

.portfolio-dialog .panel-lede:has(+ .library-section) { margin-bottom: 14px; }
.portfolio-dialog .library-section { margin-top: 18px; }
.portfolio-dialog .panel-lede + .library-section { margin-top: 0; }
.portfolio-dialog .lib-bar { gap: 8px 12px; }
.portfolio-dialog .lib-search { flex: 0 1 300px; }
.portfolio-dialog .lib-input { height: 34px; padding-left: 36px; font-size: 13px; background-position: 11px 50%; background-size: 15px; }
.portfolio-dialog .lib-count { margin-left: auto; font-size: 11px; }
.portfolio-dialog .lib-results { margin-top: 12px; }
.portfolio-dialog .lib-brands { margin-top: 10px; }
.lib-filters--inline { margin-top: 0; }
.lib-filters--inline .lib-chip { min-height: 34px; padding: 0 10px; font-size: 12px; }

.lib-thumb {
  display: block;
  width: 72px;
  height: 40px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, .04);
}

.lib-thumb-img { display: block; width: 100%; height: 100%; object-fit: cover; }

.lib-thumb--logo { display: grid; place-items: center; }

.lib-thumb-logo {
  width: 20px;
  height: 20px;
  background: var(--logo-tint, var(--muted));
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}

.lib-link--thumb {
  grid-template-columns: 72px 92px minmax(0, 1fr) auto 14px;
  align-items: center;
  padding: 6px 4px;
}

.lib-ep--thumb {
  grid-template-columns: 72px 62px minmax(0, 1fr) 16px;
  padding: 6px 4px;
}

.lib-ep--thumb .lib-thumb { grid-area: 1 / 1 / span 2; align-self: center; }
.lib-ep--thumb .lib-ep-date { grid-area: 1 / 2 / span 2; align-self: center; }
.lib-ep--thumb .lib-ep-who { grid-area: 1 / 3; align-self: end; }
.lib-ep--thumb .lib-ep-title { grid-area: 2 / 3; align-self: start; }
.lib-ep--thumb .lib-ep-go { grid-area: 1 / 4 / span 2; }

@container panel (max-width: 519px) {
  .lib-link--thumb { grid-template-columns: 72px minmax(0, 1fr) 14px; }
  .lib-link--thumb .lib-thumb { grid-area: 1 / 1 / span 3; }
  .lib-link--thumb .lib-link-date,
  .lib-link--thumb .lib-link-title,
  .lib-link--thumb .lib-link-source { grid-column: 2; }
  .lib-link--thumb .lib-link-go { grid-area: 1 / 3 / span 3; }

  .lib-ep--thumb { grid-template-columns: 72px minmax(0, 1fr) 16px; }
  .lib-ep--thumb .lib-thumb { grid-area: 1 / 1 / span 3; }
  .lib-ep--thumb .lib-ep-date { grid-area: 1 / 2; }
  .lib-ep--thumb .lib-ep-who { grid-area: 2 / 2; }
  .lib-ep--thumb .lib-ep-title { grid-area: 3 / 2; }
  .lib-ep--thumb .lib-ep-go { grid-area: 1 / 3 / span 3; }
}

/* ---------- Name plate: one slim bar in the top-left corner, where the monogram was ---------- */

@media (min-width: 760px) {
  .site-header .monogram {
    visibility: hidden;
  }

  .hero-copy {
    top: 16px;
    display: flex;
    align-items: center;
    gap: 11px;
    max-width: none;
    padding: 6px 18px 6px 6px;
    border-radius: 999px;
  }

  .hero-copy .hero-photo {
    width: 42px;
    height: 42px;
    border-width: 2px;
  }

  .hero-copy .hero-text {
    display: grid;
    grid-template-columns: auto;
    align-items: center;
    column-gap: 16px;
  }

  .hero-copy h1 {
    margin: 0;
    font-size: 19px;
    line-height: 1.15;
  }

  .hero-copy .hero-description {
    max-width: none;
    margin: 0;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
  }

}

@media (min-width: 1180px) {
  .hero-copy .hero-text {
    grid-template-columns: auto auto;
  }

  .hero-copy h1,
  .hero-copy .hero-description {
    grid-column: 1;
  }

}

/* ---------- Scene labels: a dot and a name on each clickable thing, as a tilted game card in chunky capitals.
   Aim at one and it turns yellow and shows its arrow. ---------- */

.scene-3d .scene-hotspot {
  flex-direction: row;
  gap: 8px;
  width: auto;
  height: 32px;
  padding: 0 14px 0 11px;
  /* Solid violet with a pale rim: violet is kept for clickable things, and the rim keeps the card's shape
     readable over the dark monitors as well as the pale wall. */
  border: 2px solid #fff4d6;
  border-radius: 8px;
  background: linear-gradient(180deg, #7446f7, #5a2be0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 0 #2a1278, 0 10px 20px rgba(0, 0, 0, .35);
  transform: translate(-50%, -50%) skewX(-8deg);
  transition: opacity .4s, background-color .18s, border-color .18s, transform .18s;
}

.scene-3d .scene-hotspot > i {
  width: 6px;
  height: 6px;
  border: 0;
  background: #ffffff;
  opacity: 1;
  /* A few pulses on arrival to say "these can be pressed", then it rests. */
  animation-iteration-count: 4;
}

/* At night the cards are a step lighter and carry a soft glow, the only lit things besides the screens. */
body.light-night .scene-3d .scene-hotspot {
  background: linear-gradient(180deg, #8a62ff, #6a3cf2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 0 #2a1278, 0 0 20px rgba(124, 77, 255, .5);
}

/* The face sits high on its line, so the text is nudged down to look centred. */
.scene-3d .scene-hotspot > span {
  position: static;
  padding: 3px 0 0;
  border: 0;
  background: none;
  font: 400 15px/1 var(--game-face);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 2px 0 rgba(8, 6, 20, .75);
  opacity: 1;
  transform: none;
}

.scene-3d .scene-hotspot > span > b {
  display: inline-block;
  width: 0;
  margin-left: 0;
  overflow: hidden;
  opacity: 0;
  vertical-align: bottom;
  transition: width .18s, margin-left .18s, opacity .18s;
}

.scene-3d .scene-hotspot.is-hover,
.scene-3d .scene-hotspot:hover,
.scene-3d .scene-hotspot:focus-visible {
  border-color: #fff6a8;
  background: linear-gradient(180deg, #fff06a, #f7c81e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 4px 0 #9a7208, 0 10px 22px rgba(0, 0, 0, .34);
  color: #14102a;
  transform: translate(-50%, -50%) skewX(-8deg) scale(1.06);
}

.scene-3d .scene-hotspot.is-hover > span,
.scene-3d .scene-hotspot:hover > span,
.scene-3d .scene-hotspot:focus-visible > span { color: #1a1430; text-shadow: none; }

.scene-3d .scene-hotspot.is-hover > span > b,
.scene-3d .scene-hotspot:hover > span > b,
.scene-3d .scene-hotspot:focus-visible > span > b {
  width: 1em;
  margin-left: 5px;
  color: #14102a;
  opacity: 1;
}

.scene-3d .scene-hotspot.is-hover > i,
.scene-3d .scene-hotspot:hover > i,
.scene-3d .scene-hotspot:focus-visible > i {
  background: #14102a;
  transform: none;
  animation: none;
}

/* On a phone the label is just its dot. */
@media (max-width: 759px) {
  .scene-3d .scene-hotspot { width: 20px; }
}

/* ---------- Bottom-bar controls: the same game cards ---------- */

.studio-footer .sound-toggle,
.studio-footer #motion-toggle,
.studio-footer .camera-controls button {
  min-height: 36px;
  padding: 3px 14px 0;
  border: 1.5px solid rgba(255, 255, 255, .38);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(46, 38, 92, .78), rgba(18, 16, 40, .82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 4px 0 rgba(8, 6, 20, .55);
  color: #ffffff;
  font: 400 13.5px/1 var(--game-face);
  letter-spacing: .05em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(8, 6, 20, .75);
  transform: skewX(-8deg);
}

.studio-footer .camera-controls button:hover,
.studio-footer .sound-toggle:hover,
.studio-footer #motion-toggle:hover {
  border-color: #fff6a8;
  background: linear-gradient(180deg, #fff06a, #f7c81e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 4px 0 #9a7208;
  color: #1a1430;
  text-shadow: none;
}

/* ---------- Top bar: the name plate and the links are tilted game cards, with the name in the chunky face
   and "Say hello" as the yellow action button. ---------- */

@media (min-width: 760px) {
  .hero-copy,
  .site-nav {
    border: 1.5px solid rgba(255, 255, 255, .38);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(46, 38, 92, .8), rgba(18, 16, 40, .86));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 5px 0 rgba(8, 6, 20, .55), 0 14px 28px rgba(0, 0, 0, .3);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transform: skewX(-8deg);
  }

  .hero-copy {
    gap: 12px;
    padding: 7px 24px 7px 9px;
  }

  /* The portrait stays upright inside the tilted card. */
  .hero-copy .hero-photo {
    width: 44px;
    height: 44px;
    border: 2px solid #ffffff;
    border-radius: 10px;
    box-shadow: none;
    transform: skewX(8deg);
  }

  .hero-copy h1 {
    padding-top: 4px;
    font: 400 25px/1 var(--game-face);
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 2px 0 rgba(8, 6, 20, .75);
  }

  .hero-copy h1 > span { color: #f7c81e; }

  .hero-copy .hero-description {
    font: 600 12.5px/1.3 'DM Sans', system-ui, sans-serif;
    color: rgba(255, 255, 255, .86);
  }

  .site-nav { padding: 5px 5px 5px 8px; }

  .site-nav .hello-button {
    padding-top: 3px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff06a, #f7c81e);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 3px 0 #9a7208;
    color: #1a1430;
    font: 400 16px/1 var(--game-face);
    letter-spacing: .05em;
    text-transform: uppercase;
  }

  .site-nav .hello-button:hover { background: linear-gradient(180deg, #fff8a8, #ffd83a); }
}

/* ---------- Game-style panels: the terminal stays (prompt, mono text, numbered commands), but its chrome
   speaks the room's language: chunky headings, tilted yellow selection, a card edge on the window. ---------- */

.portfolio-dialog .panel {
  border: 1.5px solid rgba(255, 255, 255, .34);
  border-radius: 14px;
  background: linear-gradient(180deg, #17142e 0, #0c0b18 220px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 8px 0 rgba(8, 6, 20, .6), 0 30px 60px rgba(0, 0, 0, .45);
}

.portfolio-dialog h2 {
  padding-top: 4px;
  font: 400 clamp(28px, 2.8vw, 38px)/1.1 var(--game-face);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-shadow: 0 3px 0 rgba(8, 6, 20, .7);
}

.portfolio-dialog h2::before {
  color: #f7c81e;
  font: 700 .8em/1 var(--mono);
}

.portfolio-dialog h2 > span { background: #f7c81e; }

.panel-tabs button {
  padding-top: 3px;
  font: 400 15px/1 var(--game-face);
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: 8px;
  transform: skewX(-8deg);
}

.panel-tabs button::before {
  margin-top: -3px;
  font: 500 11px/1 var(--mono);
}

.panel-tabs button.is-active {
  background: linear-gradient(180deg, #fff06a, #f7c81e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 3px 0 #9a7208;
  color: #1a1430;
}

.panel-tabs button.is-active::before {
  border-color: #1a1430;
  background: #1a1430;
  color: #f7c81e;
}

.portfolio-dialog .lib-chip {
  padding-top: 2px;
  font: 400 13px/1 var(--game-face);
  letter-spacing: .05em;
  text-transform: uppercase;
  transform: skewX(-8deg);
}

.portfolio-dialog .lib-chip-count { font: 500 11px/1 var(--mono); }

.portfolio-dialog .lib-chip[aria-pressed="true"] {
  border-color: #fff6a8;
  background: linear-gradient(180deg, #fff06a, #f7c81e);
  box-shadow: 0 3px 0 #9a7208;
  color: #1a1430;
}

.portfolio-dialog .lib-chip[aria-pressed="true"] .lib-chip-count { color: #5a4708; }

.close-dialog .close-label {
  padding-top: 2px;
  font: 400 14px/1 var(--game-face);
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* Rows light up yellow, like a highlighted menu item. */
.lib-link:hover,
.lib-ep:hover {
  background: rgba(247, 200, 30, .08);
  box-shadow: inset 3px 0 0 #f7c81e;
  color: #ffe66a;
}

.lib-link-go,
.lib-ep-go { color: #f7c81e; }

/* ---------- Easier reading in the panels: titles and sentences in a plain sans, small details quiet,
   a heading per year in place of a year on every row. ---------- */

.portfolio-dialog .panel-lede {
  max-width: 56ch;
  font: 400 15.5px/1.6 'DM Sans', system-ui, sans-serif;
  color: #c9d0d6;
}

.lib-links { border-top: 0; }

.lib-year {
  margin-top: 18px;
  padding: 0 4px 6px;
  border-bottom: 1px solid var(--line);
  color: #f7c81e;
  font: 400 15px/1 var(--game-face);
  letter-spacing: .06em;
}

.lib-year:first-child { margin-top: 4px; }

.lib-link { grid-template-columns: 52px minmax(0, 1fr) auto 14px; padding: 10px 4px; }
.lib-link--thumb { grid-template-columns: 72px 52px minmax(0, 1fr) auto 14px; padding: 8px 4px; }

.lib-link-title,
.lib-ep-guest,
.lib-ep-title {
  font-family: 'DM Sans', system-ui, sans-serif;
}

.lib-link-title { font-size: 14.5px; font-weight: 500; line-height: 1.35; }

.lib-link-date,
.lib-link-source { color: #7d8894; font-size: 11px; }

/* The picture already shows who hosted it, so the small mark beside the name is not repeated. */
.lib-link--thumb .lib-link-logo { display: none; }

.lib-ep-guest { font-size: 14px; }
.lib-ep-title { font-size: 12.5px; }

@container panel (max-width: 519px) {
  .lib-link { grid-template-columns: minmax(0, 1fr) 14px; }
  .lib-link--thumb { grid-template-columns: 72px minmax(0, 1fr) 14px; }
}

/* ---------- Title type: a tall poster face with a sunset fill (gold through orange and pink to violet),
   the look of a coastal-city game cover. Small labels keep a solid colour so they stay readable. ---------- */

:root {
  --game-face: 'Anton', 'Arial Narrow', Impact, sans-serif;
  --sunset: linear-gradient(180deg, #ffe27a 0%, #ffa04a 34%, #ff4d8f 66%, #b04dff 100%);
}

.intro-title,
.hero-copy h1,
.portfolio-dialog h2 {
  background: var(--sunset);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 3px 0 rgba(8, 6, 20, .8));
}

.intro-title {
  letter-spacing: .01em;
  filter: drop-shadow(0 5px 0 rgba(8, 6, 20, .8)) drop-shadow(0 14px 30px rgba(255, 77, 143, .28));
}

.intro-title > small,
.intro-title > span,
.hero-copy h1 > span,
.portfolio-dialog h2::before { -webkit-text-fill-color: currentColor; }

.intro-title > small { color: #ffffff; letter-spacing: .2em; text-shadow: none; }
.intro-title > span,
.hero-copy h1 > span { color: #ff4d8f; }

.hero-copy h1 { filter: drop-shadow(0 2px 0 rgba(8, 6, 20, .8)); }

/* The portrait's frame leans with the name plate, so its edges run parallel to the card's; the photo
   inside is straightened and slightly enlarged to fill the leaning corners. */
.hero-photo-frame { display: contents; }

@media (min-width: 760px) {
  .hero-photo-frame {
    display: block;
    flex: none;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border: 2px solid #ffffff;
    border-radius: 9px;
    background: #14102a;
  }

  .hero-copy .hero-photo-frame .hero-photo {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    object-fit: cover;
    transform: skewX(8deg) scale(1.34);
  }
}

/* ---------- Guided tour: a caption card above the bottom bar while the camera visits each object ---------- */

.tour {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 78px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 16px;
  align-items: start;
  width: min(620px, calc(100% - 32px));
  padding: 16px 18px 18px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, .38);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(40, 33, 84, .94), rgba(16, 14, 36, .96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 6px 0 rgba(8, 6, 20, .55), 0 22px 44px rgba(0, 0, 0, .4);
  color: #ffffff;
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: tour-in .35s ease-out;
}

.tour[hidden] { display: none; }

@keyframes tour-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

.tour-step {
  grid-row: span 2;
  margin: 2px 0 0;
  padding: 7px 9px 5px;
  border-radius: 8px;
  background: #f7c81e;
  color: #1a1430;
  font: 400 14px/1 var(--game-face);
  letter-spacing: .06em;
  white-space: nowrap;
}

.tour-title {
  margin: 0;
  background: var(--sunset);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font: 400 26px/1.1 var(--game-face);
  letter-spacing: .04em;
  text-transform: uppercase;
  filter: drop-shadow(0 2px 0 rgba(8, 6, 20, .8));
}

.tour-text {
  margin: 6px 0 0;
  font: 400 15px/1.5 'DM Sans', system-ui, sans-serif;
  color: #d5dae0;
}

.tour-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.tour-actions button {
  min-height: 36px;
  padding: 2px 14px 0;
  border: 1.5px solid rgba(255, 255, 255, .34);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: #ffffff;
  font: 400 14px/1 var(--game-face);
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.tour-actions button:hover { border-color: #fff6a8; background: rgba(255, 255, 255, .14); }
.tour-actions button:disabled { opacity: .35; cursor: default; }
.tour-actions .tour-next {
  border-color: transparent;
  background: linear-gradient(180deg, #fff06a, #f7c81e);
  box-shadow: 0 3px 0 #9a7208;
  color: #1a1430;
}
.tour-actions .tour-next:hover { background: linear-gradient(180deg, #fff8a8, #ffd83a); }
.tour-actions .tour-end { margin-left: auto; border-color: transparent; background: none; color: rgba(255, 255, 255, .7); }

/* A thin line along the bottom counts down to the next stop. */
.tour-meter {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--sunset);
  background: linear-gradient(90deg, #ffe27a, #ff4d8f, #b04dff);
  transform: scaleX(0);
  transform-origin: left;
}

.tour.is-timing .tour-meter { animation: tour-count 7s linear forwards; }

@keyframes tour-count {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* The object labels step aside while the tour is talking. */
body.touring .scene-hotspot { opacity: 0 !important; pointer-events: none !important; }

.studio-footer .tour-toggle[aria-pressed="false"] {
  border-color: transparent;
  background: linear-gradient(180deg, #fff06a, #f7c81e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 4px 0 #9a7208;
  color: #1a1430;
  text-shadow: none;
}

@media (max-width: 759px) {
  .tour { bottom: 70px; grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .tour-step { grid-row: auto; justify-self: start; }
  .tour-actions { grid-column: 1; }
  .tour-title { font-size: 22px; }
}

/* The welcome screen's two side doors. */
.intro-more {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 26px;
  font: 500 15px/1 'DM Sans', system-ui, sans-serif;
  color: rgba(255, 255, 255, .5);
}

.intro-more i { font-style: normal; }

.intro-more button,
.intro-more a {
  padding: 6px 2px;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, .88);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(247, 200, 30, .7);
  text-underline-offset: 4px;
  cursor: pointer;
}

.intro-more button:hover,
.intro-more a:hover { color: #f7c81e; }

.contact-resume { margin: 14px 0 0; }

/* On a phone the bottom bar keeps to the four controls: the place and time, and the word beside the pause
   symbol, make room for the tour. */
@media (max-width: 759px) {
  .studio-footer .location,
  .studio-footer #motion-label { display: none; }
  .studio-footer { gap: 8px; justify-content: center; }
  .studio-footer .sound-toggle,
  .studio-footer #motion-toggle { padding: 3px 10px 0; font-size: 12.5px; }
}

/* Bigger object labels on a full-size screen, so each one reads at a glance from across the room. */
@media (min-width: 760px) {
  .scene-3d .scene-hotspot {
    gap: 9px;
    height: 40px;
    padding: 0 18px 0 13px;
    border-width: 2.5px;
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 5px 0 #2a1278, 0 12px 24px rgba(0, 0, 0, .38);
  }

  .scene-3d .scene-hotspot > i { width: 7px; height: 7px; }

  .scene-3d .scene-hotspot > span {
    padding-top: 1px;
    font-size: 19px;
    letter-spacing: .06em;
  }
}

/* ---------- Podcast panel, calmer: the numbers are one quiet line beside the YouTube button, the episode
   count is not repeated, and the company shortcuts keep to a single row. ---------- */

.pod-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 22px;
}

.pod-line {
  margin: 0;
  font: 400 14.5px/1.4 'DM Sans', system-ui, sans-serif;
  color: #9aa4af;
}

.pod-line b { color: #ffffff; font-weight: 600; }
.pod-line i { margin: 0 6px; font-style: normal; color: rgba(255, 255, 255, .3); }

.pod-head .pod-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 0;
}

.lib--podcast .lib-count { display: none; }
.lib--podcast .lib-search { flex: 1; max-width: none; }
.portfolio-dialog .lib--podcast .lib-brands { margin: 12px 0 10px; }
.lib--podcast .lib-brand { border-color: transparent; background: rgba(255, 255, 255, .06); color: #c9d0d6; }

/* Podcast heading, one step simpler: the numbers live in the sentence, with the two links beside it. */
.pod-head { flex-wrap: nowrap; align-items: flex-start; margin: 0 0 20px; }
.pod-head .panel-lede { margin: 0; max-width: 46ch; }
.pod-head .panel-lede b { color: #ffffff; font-weight: 600; }
.pod-head .pod-actions { flex: none; padding-top: 2px; }

@container panel (max-width: 640px) {
  .pod-head { flex-wrap: wrap; }
}

/* Résumé, in the top bar beside the links. */
.site-nav .resume-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 2px 12px 0;
  border-radius: 8px;
  color: #ffffff;
  font: 400 16px/1 var(--game-face);
  letter-spacing: .05em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-nav .resume-link:hover,
.site-nav .resume-link:focus-visible { background: rgba(255, 255, 255, .14); color: #ffe66a; }

@media (max-width: 759px) {
  .site-nav .resume-link { min-height: 36px; padding: 1px 8px 0; font-size: 14px; }
}

/* Podcast heading links: two matching quiet pills on their own row under the sentence. */
.pod-head { display: block; margin: 0 0 20px; }
.pod-head .panel-lede { max-width: 58ch; }
.pod-head .pod-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; }

.pod-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px 0 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: #e6e9ee;
  font: 500 13.5px/1 'DM Sans', system-ui, sans-serif;
  text-decoration: none;
  transition: border-color .18s, background-color .18s, color .18s;
}

.pod-link > span { color: #f7c81e; font-size: 11px; }

.pod-link:hover,
.pod-link:focus-visible {
  border-color: #f7c81e;
  background: rgba(247, 200, 30, .1);
  color: #ffffff;
}

/* ---------- Side projects, compact: a slim Rig strip, then the six repos as small readable cards.
   With so few items there is no search bar, topic filter or Featured split. ---------- */

.portfolio-dialog[data-panel="work"] .panel-lede { margin-bottom: 18px; }

.portfolio-dialog[data-panel="work"] .feature {
  grid-template-columns: 150px minmax(0, 1fr);
  border-radius: 12px;
}

.portfolio-dialog[data-panel="work"] .feature-art {
  min-height: 0;
  padding: 18px;
  justify-content: center;
}

.portfolio-dialog[data-panel="work"] .rig-word { font-size: 40px; }
.portfolio-dialog[data-panel="work"] .rig-flow { display: none; }

.portfolio-dialog[data-panel="work"] .feature-copy { padding: 16px 20px; }
.portfolio-dialog[data-panel="work"] .feature-copy .eyebrow { margin-bottom: 4px; font-size: 11px; }
.portfolio-dialog[data-panel="work"] .feature-copy h3 { margin: 0 0 4px; font: 600 17px/1.3 'DM Sans', system-ui, sans-serif; }
.portfolio-dialog[data-panel="work"] .feature-copy > p:not(.eyebrow) { margin: 0 0 8px; font: 400 14px/1.5 'DM Sans', system-ui, sans-serif; color: #c2c9d0; }
.portfolio-dialog[data-panel="work"] .feature-copy .text-link { font-size: 13px; }

@container panel (max-width: 519px) {
  .portfolio-dialog[data-panel="work"] .feature { grid-template-columns: 1fr; }
  .portfolio-dialog[data-panel="work"] .feature-art { display: none; }
}

.portfolio-dialog[data-panel="work"] .library-section { margin-top: 18px; }
.lib--work .lib-bar,
.lib--work .lib-filters { display: none; }

.lib--work .lib-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 10px; }

.portfolio-dialog .lib--work .lib-card { border-radius: 10px; }
.portfolio-dialog .lib--work .lib-card-body { gap: 5px; padding: 13px 15px 12px; }
.lib--work .lib-meta { order: 3; margin-top: 4px; }
.lib--work .lib-type,
.lib--work .lib-flag,
.lib--work .lib-foot { display: none; }
.lib--work .lib-date { color: #7d8894; font-size: 11px; }
.portfolio-dialog .lib--work .lib-title { font: 600 15px/1.3 'DM Sans', system-ui, sans-serif; letter-spacing: 0; color: #ffffff; }
.portfolio-dialog .lib--work .lib-title::after { content: '\00a0↗'; color: #f7c81e; font-weight: 400; }
.portfolio-dialog .lib--work .lib-desc { font: 400 13.5px/1.45 'DM Sans', system-ui, sans-serif; color: #b9c1c9; }
.lib--work .lib-tags { order: 2; color: #b9a3ff; font-size: 11px; }

.portfolio-dialog[data-panel="work"] .feature-copy { gap: 2px; justify-content: center; }
.portfolio-dialog[data-panel="work"] .feature-copy .text-link { margin-top: 0; }
.portfolio-dialog .lib--work .lib-title { text-wrap: wrap; }

/* ---------- Experience, calmer: the numbers are one line, the résumé is one click away, and the roles read
   in a plain sans face with tighter spacing. The timeline bar stays: it is the quickest way through. ---------- */

.portfolio-dialog[data-panel="career"] .panel-lede { margin-bottom: 8px; }

.career-line {
  margin: 0;
  font: 400 14.5px/1.5 'DM Sans', system-ui, sans-serif;
  color: #9aa4af;
}
.career-line b { color: #ffffff; font-weight: 600; }
.career-line i { margin: 0 6px; font-style: normal; color: rgba(255, 255, 255, .3); }

.career-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; padding: 0; }

.portfolio-dialog[data-panel="career"] .flow-org { font: 600 19px/1.25 'DM Sans', system-ui, sans-serif; letter-spacing: 0; }
.portfolio-dialog[data-panel="career"] .flow-place,
.portfolio-dialog[data-panel="career"] .flow-about { font-family: 'DM Sans', system-ui, sans-serif; font-size: 13.5px; }

.portfolio-dialog[data-panel="career"] .flow-awards { gap: 6px; margin: 8px 0 10px; }
.portfolio-dialog[data-panel="career"] .flow-awards li { padding: 3px 9px; font: 500 12.5px/1.4 'DM Sans', system-ui, sans-serif; }

.portfolio-dialog[data-panel="career"] .flow-role { border-radius: 10px; }
.portfolio-dialog[data-panel="career"] .flow-role-head { padding: 12px 14px; }
.portfolio-dialog[data-panel="career"] .flow-role-title { font: 600 15.5px/1.3 'DM Sans', system-ui, sans-serif; }
.portfolio-dialog[data-panel="career"] .flow-role-dates { font-size: 12px; }
.portfolio-dialog[data-panel="career"] .flow-role-peek { font: 400 13.5px/1.45 'DM Sans', system-ui, sans-serif; }
.portfolio-dialog[data-panel="career"] .flow-role-inner { padding: 0 14px 14px; }
.portfolio-dialog[data-panel="career"] .flow-role .plain-list { gap: 6px; }
.portfolio-dialog[data-panel="career"] .flow-role .plain-list li { font: 400 14.5px/1.5 'DM Sans', system-ui, sans-serif; color: #d3d9df; }
.portfolio-dialog[data-panel="career"] .flow-tags { gap: 6px; margin-top: 12px; }
.portfolio-dialog[data-panel="career"] .flow-tags span { padding: 2px 8px; border-color: transparent; background: rgba(185, 163, 255, .12); color: #cdbcff; font-size: 11.5px; }
.portfolio-dialog[data-panel="career"] .flow-step { margin: 6px 0; font-size: 10.5px; }
.portfolio-dialog[data-panel="career"] .flow-stop { padding-bottom: 22px; }

/* ---------- Skills, compact: a slim "building with Claude" strip, then each group as a quiet label with
   small flat chips, all in the plain sans face. ---------- */

.portfolio-dialog[data-panel="skills"] .panel-lede { margin-bottom: 18px; }

.portfolio-dialog[data-panel="skills"] .feature { grid-template-columns: 170px minmax(0, 1fr); border-radius: 12px; }
.portfolio-dialog[data-panel="skills"] .feature-art { min-height: 0; padding: 18px; justify-content: center; }
.portfolio-dialog[data-panel="skills"] .rig-word { font-size: 34px; }
.portfolio-dialog[data-panel="skills"] .feature-copy { gap: 2px; justify-content: center; padding: 16px 20px; }
.portfolio-dialog[data-panel="skills"] .feature-copy .eyebrow { margin-bottom: 4px; font-size: 11px; }
.portfolio-dialog[data-panel="skills"] .feature-copy h3 { margin: 0 0 4px; font: 600 17px/1.3 'DM Sans', system-ui, sans-serif; }
.portfolio-dialog[data-panel="skills"] .feature-copy > p:not(.eyebrow) { margin: 0; font: 400 14px/1.5 'DM Sans', system-ui, sans-serif; color: #c2c9d0; }

@container panel (max-width: 519px) {
  .portfolio-dialog[data-panel="skills"] .feature { grid-template-columns: 1fr; }
  .portfolio-dialog[data-panel="skills"] .feature-art { display: none; }
}

.portfolio-dialog[data-panel="skills"] .skill-groups { margin-top: 18px; }
.portfolio-dialog[data-panel="skills"] .skill-groups > div { gap: 6px 20px; padding: 11px 0; align-items: start; }
.portfolio-dialog[data-panel="skills"] .skill-groups dt { padding-top: 3px; font: 600 13.5px/1.4 'DM Sans', system-ui, sans-serif; color: #f7c81e; }
.portfolio-dialog[data-panel="skills"] .skill-groups dd { gap: 6px; margin: 0; }
.portfolio-dialog[data-panel="skills"] .skill-groups dd span {
  padding: 3px 9px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, .07);
  color: #e3e7ec;
  font: 400 13px/1.45 'DM Sans', system-ui, sans-serif;
}

@container panel (min-width: 520px) {
  .portfolio-dialog[data-panel="skills"] .skill-groups > div { grid-template-columns: 170px minmax(0, 1fr); }
}

.skills-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; }
button.pod-link { cursor: pointer; }

/* ---------- Contact, rebuilt: two clear ways to reach me as big buttons, then six small tiles that lift
   and light up under the pointer. ---------- */

.portfolio-dialog[data-panel="contact"] .contact-head { display: flex; gap: 16px; align-items: center; margin: 4px 0 20px; }
.portfolio-dialog[data-panel="contact"] .contact-photo { flex: none; width: 72px; height: 72px; margin: 0; border: 2px solid #ffffff; border-radius: 50%; }
.portfolio-dialog[data-panel="contact"] .contact-head .panel-lede { margin: 0; max-width: 44ch; font-size: 16px; }

.contact-main { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }

.portfolio-dialog .contact-cta {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 68px;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff06a, #f7c81e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 5px 0 #9a7208;
  color: #1a1430;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, background-color .15s;
}
.portfolio-dialog .contact-cta svg { flex: none; width: 26px; height: 26px; }
.portfolio-dialog .contact-cta span { display: grid; gap: 3px; min-width: 0; }
.portfolio-dialog .contact-cta strong { font: 400 19px/1 var(--game-face); letter-spacing: .05em; text-transform: uppercase; }
.portfolio-dialog .contact-cta small { overflow: hidden; font: 500 13px/1.3 'DM Sans', system-ui, sans-serif; text-overflow: ellipsis; white-space: nowrap; opacity: .78; }
.portfolio-dialog .contact-cta:hover,
.portfolio-dialog .contact-cta:focus-visible { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 7px 0 #9a7208; }
.portfolio-dialog .contact-cta:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 2px 0 #9a7208; }

.portfolio-dialog .contact-cta--alt {
  background: linear-gradient(180deg, #7446f7, #5a2be0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 5px 0 #2a1278;
  color: #ffffff;
}
.portfolio-dialog .contact-cta--alt:hover,
.portfolio-dialog .contact-cta--alt:focus-visible { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 7px 0 #2a1278; }
.portfolio-dialog .contact-cta--alt:active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 0 #2a1278; }

.contact-also { margin: 26px 0 10px; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #7d8894; }

.portfolio-dialog[data-panel="contact"] .contact-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 10px; margin: 0; }
.portfolio-dialog[data-panel="contact"] .contact-options a {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  color: #ffffff;
  text-decoration: none;
  transition: transform .15s, border-color .15s, background-color .15s;
}
.portfolio-dialog[data-panel="contact"] .contact-options svg { flex: none; width: 20px; height: 20px; color: #cdbcff; transition: color .15s; }
.portfolio-dialog[data-panel="contact"] .contact-options span { display: grid; gap: 2px; min-width: 0; }
.portfolio-dialog[data-panel="contact"] .contact-options strong { font: 600 14.5px/1.2 'DM Sans', system-ui, sans-serif; }
.portfolio-dialog[data-panel="contact"] .contact-options small { font: 400 12.5px/1.3 'DM Sans', system-ui, sans-serif; color: #9aa4af; }
.portfolio-dialog[data-panel="contact"] .contact-options a > i { margin-left: auto; font-style: normal; color: #7d8894; transition: color .15s, transform .15s; }
.portfolio-dialog[data-panel="contact"] .contact-options a:hover,
.portfolio-dialog[data-panel="contact"] .contact-options a:focus-visible { border-color: #f7c81e; background: rgba(247, 200, 30, .09); transform: translateY(-2px); }
.portfolio-dialog[data-panel="contact"] .contact-options a:hover svg,
.portfolio-dialog[data-panel="contact"] .contact-options a:hover > i { color: #f7c81e; }
.portfolio-dialog[data-panel="contact"] .contact-options a:hover > i { transform: translate(2px, -2px); }

.portfolio-dialog[data-panel="contact"] .contact-signoff { margin-top: 26px; font: 400 14px/1.5 'DM Sans', system-ui, sans-serif; color: #9aa4af; }
.portfolio-dialog[data-panel="contact"] .contact-signoff span { color: #ffffff; font-weight: 600; }

.portfolio-dialog[data-panel="contact"] .contact-options { max-width: none; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }

/* ---------- Player card: opened from the name plate ---------- */

.hero-copy[role="button"] { cursor: pointer; pointer-events: auto; }
.hero-card-hint { display: none; }

@media (min-width: 760px) {
  .hero-copy[role="button"] { transition: transform .15s, border-color .15s; }
  .hero-copy[role="button"]:hover,
  .hero-copy[role="button"]:focus-visible { border-color: #fff6a8; transform: skewX(-8deg) translateY(-2px); outline: none; }
  .hero-card-hint {
    display: inline-block;
    align-self: center;
    margin-left: 6px;
    padding: 5px 8px 3px;
    border-radius: 6px;
    background: linear-gradient(180deg, #fff06a, #f7c81e);
    box-shadow: 0 2px 0 #9a7208;
    color: #1a1430;
    font: 400 12px/1 var(--game-face);
    letter-spacing: .08em;
    text-transform: uppercase;
  }
}

.player-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 16px;
  border: 0;
  background: transparent;
  overflow: auto;
}
.player-dialog[open] { display: grid; place-items: center; }
.player-dialog::backdrop { background: rgba(8, 6, 20, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

.player-wrap { display: grid; gap: 18px; justify-items: center; perspective: 1100px; }

.player-card {
  --rx: 0deg; --ry: 0deg; --sx: 30%; --sy: 20%;
  position: relative;
  width: min(340px, calc(100vw - 48px));
  padding: 20px 22px 20px;
  overflow: hidden;
  border-radius: 26px 26px 34px 34px;
  background:
    radial-gradient(circle at var(--sx) var(--sy), rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 46%),
    linear-gradient(160deg, #2c1f66 0%, #1a1440 55%, #120e2c 100%);
  box-shadow: 0 0 0 3px #f7c81e, 0 0 0 7px #2a1278, 0 26px 60px rgba(0, 0, 0, .6);
  color: #ffffff;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .12s ease-out;
  animation: player-in .5s cubic-bezier(.2, 1.3, .4, 1);
}

@keyframes player-in {
  from { opacity: 0; transform: translateY(30px) rotateY(-50deg) scale(.8); }
}

/* A sunset band behind the portrait. */
.player-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 190px;
  background: linear-gradient(180deg, #ffd76a 0%, #ff8a4c 40%, #ff4d8f 72%, rgba(176, 77, 255, 0) 100%);
  opacity: .9;
}

.player-top { position: relative; display: flex; align-items: flex-start; justify-content: space-between; min-height: 172px; }
.player-rating { display: grid; justify-items: center; margin: 0; color: #1a1430; }
.player-rating b { font: 400 68px/.95 var(--game-face); }
.player-rating span { font: 400 20px/1.1 var(--game-face); letter-spacing: .08em; }
.player-rating i { margin-top: 6px; padding-top: 6px; border-top: 2px solid rgba(26, 20, 48, .45); font: 700 11px/1 'DM Sans', system-ui, sans-serif; font-style: normal; letter-spacing: .1em; text-transform: uppercase; }
.player-photo { width: 170px; height: 170px; margin-right: -4px; border: 4px solid #ffffff; border-radius: 50%; object-fit: cover; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }

.player-name { position: relative; margin: 12px 0 0; text-align: center; font: 400 40px/1 var(--game-face); letter-spacing: .05em; text-transform: uppercase; }
.player-role { margin: 4px 0 0; text-align: center; font: 500 13px/1.3 'DM Sans', system-ui, sans-serif; color: #cdbcff; }

.player-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 22px; margin: 16px 0 0; padding: 14px 0 0; border-top: 2px solid rgba(247, 200, 30, .5); }
.player-stats > div { display: grid; grid-template-columns: auto 1fr; gap: 3px 9px; align-items: baseline; }
.player-stats dd { margin: 0; font: 400 26px/1 var(--game-face); color: #f7c81e; }
.player-stats dt { font: 400 18px/1 var(--game-face); letter-spacing: .08em; }
.player-stats i { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #ffd76a, #ff4d8f) 0 0 / var(--level) 100% no-repeat, rgba(255, 255, 255, .14); }

.player-line { margin: 14px 0 0; text-align: center; font: 400 12.5px/1.4 'DM Sans', system-ui, sans-serif; color: #aab3bd; }
.player-line b { color: #ffffff; font-weight: 700; }
.player-line i { margin: 0 3px; font-style: normal; opacity: .5; }
.player-tools { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0 0; }
.player-tools span { padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .1); font: 500 11.5px/1.4 'DM Sans', system-ui, sans-serif; }

.player-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0; }
.motion-paused .player-card { transform: none; }

/* The top bar spans the screen; only its own controls take clicks, so the name plate beneath is reachable. */
.site-header { pointer-events: none; }
.site-header > * { pointer-events: auto; }

/* The player card opens in place: it drops down from the name plate instead of taking over the screen. */
.player-dialog {
  position: fixed;
  z-index: 45;
  inset: var(--card-top, 84px) auto auto var(--card-left, 24px);
  width: auto;
  height: auto;
  max-height: calc(100dvh - var(--card-top, 84px) - 12px);
  padding: 8px 8px 12px;
  overflow: visible auto;
  scrollbar-width: none;
}
.player-dialog[open] { display: block; }
.player-wrap { justify-items: start; gap: 14px; perspective: 1000px; }
.player-card {
  width: min(310px, calc(100vw - 40px));
  transform-origin: 20% 0;
  animation: player-drop .42s cubic-bezier(.2, 1.25, .4, 1);
}
@keyframes player-drop {
  from { opacity: 0; transform: translateY(-26px) rotateX(-55deg) scale(.86); }
}
.player-top { min-height: 150px; }
.player-photo { width: 148px; height: 148px; }
.player-card::before { height: 168px; }
.player-rating b { font-size: 60px; }
.player-name { font-size: 36px; }
.player-actions { justify-content: flex-start; max-width: 326px; animation: player-fade .4s ease-out .12s backwards; }
@keyframes player-fade { from { opacity: 0; transform: translateY(-8px); } }
.player-actions .pod-link { background: rgba(18, 16, 40, .88); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* ---------- The name-plate card, second design: small, no scores. Years up top, six top skills, two buttons. ---------- */

.player-dialog { padding: 6px 8px 12px; }

.player-card {
  width: min(292px, calc(100vw - 40px));
  padding: 16px 18px 16px;
  border-radius: 20px;
  background:
    radial-gradient(circle at var(--sx) var(--sy), rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 46%),
    linear-gradient(170deg, #241a55 0%, #15112f 100%);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .38), 0 6px 0 rgba(8, 6, 20, .55), 0 24px 46px rgba(0, 0, 0, .5);
  outline: none;
}
.player-card::before {
  height: 118px;
  background: linear-gradient(180deg, #ffd76a 0%, #ff8a4c 46%, #ff4d8f 100%);
  opacity: 1;
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent);
  mask-image: linear-gradient(180deg, #000 62%, transparent);
}

.player-top { min-height: 0; align-items: center; }
.player-years { display: grid; margin: 0; color: #1a1430; }
.player-years b { font: 400 58px/.9 var(--game-face); letter-spacing: .01em; }
.player-years span { margin-top: 2px; font: 400 19px/1 var(--game-face); letter-spacing: .12em; text-transform: uppercase; }
.player-years i { margin-top: 7px; font: 700 10.5px/1 'DM Sans', system-ui, sans-serif; font-style: normal; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.player-photo { width: 104px; height: 104px; margin: 0; border-width: 3px; box-shadow: 0 8px 18px rgba(0, 0, 0, .3); }

.player-name { margin: 14px 0 0; text-align: left; font-size: 30px; }
.player-role { margin: 3px 0 0; text-align: left; font-size: 12.5px; color: #cdbcff; }

.player-label { margin: 14px 0 8px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .16); font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #f7c81e; }
.player-skills { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0; padding: 0; list-style: none; }
.player-skills li {
  display: flex;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .07);
  font: 600 12.5px/1.2 'DM Sans', system-ui, sans-serif;
  color: #ffffff;
}
.player-skills li::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 1.5px; background: linear-gradient(135deg, #ffd76a, #ff4d8f); transform: rotate(45deg); }

.player-line { margin: 12px 0 0; text-align: left; font-size: 12px; }

.player-card .player-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: none; margin: 14px 0 0; animation: none; }
.player-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 2px 10px 0;
  border: 1.5px solid rgba(255, 255, 255, .34);
  border-radius: 9px;
  background: rgba(255, 255, 255, .06);
  color: #ffffff;
  font: 400 15px/1 var(--game-face);
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .15s, border-color .15s, background-color .15s;
}
.player-button:hover,
.player-button:focus-visible { border-color: #fff6a8; background: rgba(255, 255, 255, .14); transform: translateY(-1px); }
.player-button--main { border-color: transparent; background: linear-gradient(180deg, #fff06a, #f7c81e); box-shadow: 0 3px 0 #9a7208; color: #1a1430; }
.player-button--main:hover,
.player-button--main:focus-visible { border-color: transparent; background: linear-gradient(180deg, #fff8a8, #ffd83a); }

.player-dialog { perspective: 1000px; }

/* The card takes the name plate's shape: the same lean, corners, rim and width, so the two read as one piece.
   Only the portrait stays upright, as it does on the plate. */
.player-card { width: min(var(--card-width, 292px), calc(100vw - 40px)); }

@media (min-width: 760px) {
  .player-card {
    border: 1.5px solid rgba(255, 255, 255, .38);
    border-radius: 12px;
    background:
      radial-gradient(circle at var(--sx) var(--sy), rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 46%),
      linear-gradient(180deg, #2c2559, #141128);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 5px 0 rgba(8, 6, 20, .55), 0 14px 28px rgba(0, 0, 0, .3);
    transform-origin: 0 0;
    transform: skewX(-8deg) rotateX(var(--rx)) rotateY(var(--ry));
    animation-name: player-lean;
  }
  .player-photo { transform: skewX(8deg); }
  .player-dialog { padding-left: var(--card-pad, 8px); }
  .motion-paused .player-card { transform: skewX(-8deg); }
}

@keyframes player-lean {
  from { opacity: 0; transform: skewX(-8deg) translateY(-22px) scaleY(.7); }
}

/* ---------- Name-plate card, polish pass: the name is not repeated (the plate above carries it), there is
   more room inside the slanted edges, each skill has its own colour, and the three numbers are a scoreline. ---------- */

.player-dialog { z-index: 60; }
.player-card { padding: 18px 26px 22px; }
.player-card::before {
  height: 132px;
  background:
    radial-gradient(120px 120px at 82% 18%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #ffd76a 0%, #ff9a4c 42%, #ff4d8f 88%);
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
  mask-image: linear-gradient(180deg, #000 70%, transparent);
}

.player-top { min-height: 108px; align-items: center; }
.player-years { display: flex; gap: 10px; align-items: flex-end; }
.player-years b { font-size: 64px; line-height: .86; }
.player-years span { margin: 0 0 3px; font: 700 12px/1.25 'DM Sans', system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.player-photo { width: 96px; height: 96px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .25), 0 8px 18px rgba(0, 0, 0, .3); }

.player-label { margin: 18px 0 9px; padding-top: 0; border-top: 0; }
.player-skills { gap: 7px; }
.player-skills li { min-height: 36px; padding: 6px 10px; border: 1px solid rgba(255, 255, 255, .09); background: rgba(255, 255, 255, .06); font-size: 13px; transition: background-color .15s, border-color .15s, transform .15s; }
.player-skills li:hover { border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .12); transform: translateY(-1px); }
.player-skills li::before { width: 8px; height: 8px; border-radius: 2px; background: var(--dot, #f7c81e); }
.player-skills li:nth-child(1) { --dot: #ffd23f; }
.player-skills li:nth-child(2) { --dot: #ff8a3c; }
.player-skills li:nth-child(3) { --dot: #ff4d8f; }
.player-skills li:nth-child(4) { --dot: #b98bff; }
.player-skills li:nth-child(5) { --dot: #22cfc9; }
.player-skills li:nth-child(6) { --dot: #5fd35a; }

.player-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.player-facts > div { padding: 0 10px; border-left: 1px solid rgba(255, 255, 255, .14); }
.player-facts > div:first-child { padding-left: 0; border-left: 0; }
.player-facts dt { background: var(--sunset); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font: 400 30px/1 var(--game-face); letter-spacing: .02em; }
.player-facts dd { margin: 3px 0 0; font: 500 11.5px/1.25 'DM Sans', system-ui, sans-serif; color: #aab3bd; }

.player-card .player-actions { margin-top: 16px; }
.player-button { min-height: 40px; }

/* The card stands upright: same width, corners and rim as the plate, without the lean. */
@media (min-width: 760px) {
  .player-dialog { padding-left: 8px; }
  .player-card { transform-origin: 30% 0; transform: rotateX(var(--rx)) rotateY(var(--ry)); animation-name: player-drop; }
  .player-photo { transform: none; }
  .motion-paused .player-card { transform: none; }
}

/* ---------- Paper mode (preview, ?paper): the room as an ink drawing on warm paper. The labels and buttons
   keep their colour, so they are the only colour on the page. ---------- */
body.paper #studio-canvas { filter: grayscale(1) contrast(1.22) brightness(1.1) sepia(.16); }
body.paper .scene-viewport::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(60, 40, 20, .035) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at center, rgba(255, 248, 230, 0) 55%, rgba(120, 90, 50, .22) 100%);
  mix-blend-mode: multiply;
}

/* Role cards: a closed card shows nothing of its body (the padding now sits on the content, not the clip box),
   and a one-line role is simply shown in full. */
.portfolio-dialog[data-panel="career"] .flow-role-inner { padding: 0 14px; }
.portfolio-dialog[data-panel="career"] .flow-role-inner > :last-child { margin-bottom: 14px; }
.portfolio-dialog[data-panel="career"] .flow-role.is-plain .flow-role-mark { display: none; }
.portfolio-dialog[data-panel="career"] .flow-role.is-plain .flow-role-head { cursor: default; color: inherit; opacity: 1; }
.portfolio-dialog[data-panel="career"] .flow-role.is-plain .flow-role-head:hover { background: none; }
.portfolio-dialog[data-panel="career"] .flow-role.is-plain .flow-role-head { padding-bottom: 6px; }
.portfolio-dialog[data-panel="career"] .flow-role.is-plain .plain-list { padding-left: 0; }
.portfolio-dialog[data-panel="career"] .flow-role.is-plain .plain-list li { padding-left: 0; color: #c2c9d0; }
.portfolio-dialog[data-panel="career"] .flow-role.is-plain .plain-list li::before { display: none; }
