/* Exact site palette; gold is reserved for primary actions and active states. */
.tag,
.skill-chip {
  color: var(--secondary);
  border-color: var(--line);
  background: #f2f0ec04;
}
.skill-chip:before {
  background: var(--muted);
  box-shadow: none;
}
.skill-lane h3 {
  color: var(--secondary);
}
.project-open {
  color: var(--text);
  border-color: var(--line);
  background: #f2f0ec04;
}
.project-open:hover {
  color: var(--accent);
  border-color: #c7ab7866;
  background: #c7ab7808;
}
.project-card {
  background: var(--panel);
  border-color: var(--line);
}
.project-card:hover,
.project-card:focus-within {
  border-color: #f2f0ec44;
  box-shadow: 0 18px 40px #08090a55;
}
.project-art,
.project-actions {
  border-color: var(--line);
}
.project-art {
  height: 280px;
  background: var(--bg);
}
.project-art-label {
  display: none;
}
.project-meta,
.project-meta span + span,
.project-card p,
.project-repository {
  color: var(--secondary);
}
.hero-feature {
  background: #17191ceb;
  border-color: var(--line);
  transition: border-color 200ms;
}
.hero-feature:hover,
.hero-feature:focus-within {
  border-color: #f2f0ec44;
}
.feature-art {
  height: 280px;
  margin-top: 12px;
}
.feature-bottom {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.feature-bottom p {
  flex-basis: 100%;
}
.contact-button {
  background: var(--text);
  color: var(--bg);
}
.contact-button:hover {
  background: #f2f0ecd9;
}
.contact h2 em {
  color: var(--text);
}
.filters {
  background: var(--panel);
  border-color: var(--line);
  flex-wrap: wrap;
}
.filters button,
.filters button span {
  color: var(--secondary);
}
.filters button[aria-pressed='true'] {
  background: #c7ab7812;
  color: var(--accent);
}
.job-projects article {
  background: var(--panel);
  border-color: var(--line);
}

/* Work glass: cursor-positioned reflections on fixed translucent surfaces. */
.experience-title {
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.35;
}
.experience-title > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.company-logo {
  display: block;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.experience {
  margin-bottom: 14px;
  border: 0;
  border-radius: 14px;
  background:
    linear-gradient(125deg, #f2f0ec0a, #f2f0ec02 48%, transparent 75%), #17191c94;
  box-shadow:
    inset 0 1px 0 #f2f0ec26,
    0 10px 24px #08090a24;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.experience:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}
.experience summary {
  position: static;
  padding: 28px 24px;
  border-radius: inherit;
}

.experience summary:hover h3 {
  color: var(--text);
}
.experience .expand-icon {
  flex-shrink: 0;
  background: #f2f0ec05;
  transition:
    transform 220ms,
    background 180ms,
    color 180ms;
}
.experience summary:focus-visible .expand-icon,
.experience[open] .expand-icon {
  background: #c7ab7812;
  color: var(--accent);
}
.experience-body {
  padding: 0 24px 24px;
}
.job-projects article {
  position: relative;
  isolation: isolate;
  border: 0;
  background: linear-gradient(135deg, #f2f0ec0b, transparent 55%), #17191c99;
  box-shadow:
    inset 0 1px 0 #f2f0ec1f,
    0 6px 14px #08090a24;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

@media (hover: hover) and (pointer: fine) {
  .experience summary:hover .expand-icon {
    background: #c7ab7812;
    color: var(--accent);
  }
}
@media (max-width: 760px) {
  .experience-title {
    gap: 10px;
  }
  .company-logo {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
  }
  .experience summary {
    padding: 24px 18px;
  }
  .experience-body {
    padding: 0 18px 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .job-projects article:hover {
    transform: none;
  }
}
.experience-main i {
  color: var(--muted);
}
dialog {
  background: #17191cfa;
  border-color: #f2f0ec33;
}
.motion-control,
.close-button,
.expand-icon {
  color: var(--text);
  border-color: var(--line);
}
.contact-bottom p,
.section-heading > p,
.intro,
.footer {
  color: var(--secondary);
}
.experience-highlight,
.project-status,
.zetamac-score strong,
.award-list li > span {
  color: var(--text);
}

/* QuectoMM: a numeric book, with red asks above green bids. */
.book-terminal {
  padding: 14px 18px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #17191c;
  color: #f2f0ec;
  font-variant-numeric: tabular-nums;
  contain: layout paint;
}
.book-title,
.book-columns,
.book-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
}
.book-title {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #92969d;
  margin-bottom: 10px;
}
.book-title > span:last-child {
  font-size: 9px;
  color: #92969d;
}
.book-columns {
  font-size: 10px;
  color: #92969d;
  margin-bottom: 6px;
}
.book-columns span:not(:first-child),
.book-size,
.book-total {
  text-align: right;
}
.book-row {
  position: relative;
  isolation: isolate;
  min-height: 14px;
  font:
    11px/1.3 ui-monospace,
    monospace;
}
.book-row:before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 1px 0;
  transform-origin: right;
  transform: scaleX(var(--depth));
  background: #ef687b1d;
  transition: transform 200ms linear;
}
.book-row.bid:before {
  background: #41cca123;
}
.book-price {
  color: #fb8796;
}
.bid .book-price {
  color: #5dd7ae;
}
.book-total {
  color: #92969d;
}
.book-mid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 8px;
  margin-block: 3px;
  border-block: 1px solid #17191c;
}
.book-mid strong {
  font-size: 17px;
  font-weight: 500;
  color: #f2f0ec;
}
.book-mid > span {
  font-size: 10px;
  color: #92969d;
}
.book-caption {
  margin-top: auto;
  padding-top: 7px;
  font-size: 9px;
  color: #92969d;
}
.replay-control {
  min-height: 44px;
  padding: 8px 0;
  font-size: 12px;
  color: #92969d;
  border-bottom: 1px solid #92969d;
}
.replay-control:disabled {
  cursor: default;
  color: #92969d;
  border-color: transparent;
}

/* Actual deployed LetsCook homepage, scaled as a non-interactive browser preview. */
.site-preview {
  height: 100%;
  background: #f2f0ec;
  overflow: hidden;
}
.site-preview-bar {
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 13px;
  font-size: 9px;
  color: #92969d;
  background: #f2f0ec;
  border-bottom: 1px solid #f2f0ec;
}
.site-preview-bar span + span {
  font-size: 8px;
  letter-spacing: 0.06em;
}
.site-preview-viewport {
  position: relative;
  height: calc(100% - 27px);
  overflow: hidden;
  container-type: inline-size;
}
.site-preview iframe {
  width: 1280px;
  height: 1000px;
  border: 0;
  transform: scale(0.28);
  transform-origin: top left;
  pointer-events: none;
  background: #f2f0ec;
}

/* Other project displays are illustrative, based on the verified functionality. */
.portfolio-preview {
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--bg);
}
.portfolio-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
}
.portfolio-monogram {
  position: relative;
  color: var(--text);
  font: 800 64px / 1 var(--display);
  letter-spacing: -0.04em;
}
.portfolio-ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  animation: portfolio-ripple 4.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  animation-play-state: paused;
}
.portfolio-ripple-outer {
  border: 2px solid #c7ab7899;
}
.portfolio-ripple-inner {
  inset: 12%;
  border: 1px solid #f2f0ec88;
  animation-delay: 140ms;
}
@keyframes portfolio-ripple {
  0% {
    opacity: 0;
    transform: scale(0.28);
  }
  4% {
    opacity: 0.8;
  }
  30%,
  100% {
    opacity: 0;
    transform: scale(3.2);
  }
}

/* Personal interests share a shelf of recognizable objects. */
.personal-layout {
  display: block;
  border: 0;
  padding: 0;
  background: none;
}
.interest-shelf {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}
.interest {
  max-width: none;
  padding: 18px 13px;
  border: 1px solid #17191c;
  border-radius: 12px;
  background: #17191c55;
  transition:
    background 0.25s,
    border-color 0.25s;
}
.interest:hover,
.interest:focus-visible {
  background: #17191c77;
  border-color: #92969d;
}
.interest-art {
  height: 138px;
  background: none;
}
.interest-art img {
  object-fit: contain;
  max-width: 100%;
  transition: transform 0.3s;
}

.interest-label {
  font-size: 13px;
  gap: 6px;
  line-height: 1.5;
  color: #f2f0ec;
}
.interest-label .icon {
  width: 14px;
  height: 14px;
}
.interest > small {
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.7;
}
.royale-mark svg {
  width: 96px;
  height: 96px;
  color: #92969d;
}
.zetamac-mark {
  display: flex;
  flex-direction: column;
  font: 500 66px/1 var(--display);
  color: #f2f0ec;
  letter-spacing: -0.04em;
}
.zetamac-mark span {
  font-size: 15px;
  letter-spacing: 0.3em;
  margin-top: 12px;
  color: #92969d;
}
.zetamac-score {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 25px;
  margin-bottom: 25px;
  border-block: 1px solid #92969d;
}
.zetamac-score span {
  font-size: 14px;
  color: var(--secondary);
}
.zetamac-score strong {
  font: 500 64px var(--display);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.widget-team-logo,
.widget-club-logo {
  display: block;
  object-fit: contain;
  margin-bottom: 25px;
}
.award-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}
.award-list li {
  display: flex;
  gap: 18px;
  padding-block: 17px;
  border-top: 1px solid #92969d66;
}
.award-list li > span {
  font-size: 12px;
  color: var(--accent);
}
.award-list strong {
  font-size: 14px;
  font-weight: 500;
}
.award-list p {
  margin-top: 5px;
  font-size: 12px;
}
#royale-live-status {
  font-size: 13px;
  color: var(--secondary);
  line-height: 1.8;
}
.deck-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}
.deck-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.deck-card > span {
  font: 11px/1.4 var(--font);
  color: #f2f0ec;
}
@media (max-width: 1100px) {
  .interest-shelf {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
  .interest-shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
  }
  .interest {
    padding: 15px 12px;
  }
  .interest-art {
    height: 125px;
  }
  .feature-art {
    height: 280px;
  }
  .book-terminal {
    padding: 13px 16px;
  }
  .project-toolbar {
    align-items: stretch;
  }
  .filters {
    justify-content: flex-start;
  }
  .project-status {
    letter-spacing: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .book-row:before,
  .interest-art img {
    transition: none;
  }
}

/* Keep interest geometry stable across hover, focus, and dialog open/close. */
.interest-shelf {
  align-items: stretch;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.interest {
  display: grid;
  grid-template-rows: 168px auto;
  align-content: start;
  align-items: start;
  gap: 14px;
  height: auto;
  min-height: 274px;
  padding: 18px 15px;
  background: var(--panel);
  border-color: var(--line);
  overflow: hidden;
}
.interest:hover,
.interest:focus-visible {
  background: var(--panel);
  border-color: #f2f0ec55;
}
.interest-art {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 168px;
  align-items: center;
  justify-content: center;
}
.interest-art img,
.interest:hover .interest-art img {
  display: block;
  flex-shrink: 0;
  max-width: 100%;
  transform: none;
  transition: none;
}
.interest-label {
  align-items: flex-start;
  height: auto;
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}
.interest-copy {
  display: grid;
  align-content: start;
  gap: 5px;
  width: 100%;
}
.interest-copy > small {
  display: block;
  margin: 0;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.interest-art .game-art {
  width: 100%;
  height: auto;
  max-height: 112px;
  border-radius: 6px;
  object-fit: contain;
}
.widget-game-art {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 25px;
}
.widget-racing-logo {
  display: block;
  object-fit: contain;
  max-width: 100%;
  margin-bottom: 25px;
}

/* A restrained status pulse, distinct from premium actions; never flashes off. */
.status-in-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: #8eb6a3 !important;
  animation: progress-pulse 2.4s ease-in-out infinite;
  animation-play-state: paused;
}
.status-in-progress:before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  animation: status-dot-pulse 2.4s ease-in-out infinite;
  animation-play-state: inherit;
}
.status-in-progress[data-visible='true'] {
  animation-play-state: running;
}
.page-hidden .status-in-progress,
.modal-open .status-in-progress {
  animation-play-state: paused;
}
@keyframes progress-pulse {
  50% {
    opacity: 0.82;
  }
}
@keyframes status-dot-pulse {
  50% {
    opacity: 0.15;
  }
}

/* Resume is available in one click; PDF links retain native viewer controls. */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 25px;
  margin-top: 32px;
}
.hero-actions .primary-link {
  margin-top: 0;
  padding-block: 10px;
}
.resume-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 13px 21px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}
.resume-button:hover {
  background: #d6bd91;
}
.resume-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 24px;
  flex-basis: 100%;
}
.resume-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--secondary);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}
.resume-links a:hover {
  color: var(--text);
  border-color: var(--accent);
}
.file-type {
  font-size: 10px;
  color: var(--muted);
}
.contact-actions {
  max-width: 580px;
}

@media (max-width: 1100px) {
  .interest-shelf {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .interest-shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .interest {
    grid-template-rows: 152px auto;
    min-height: 258px;
    gap: 12px;
    padding: 15px 12px;
  }
  .interest-art {
    height: 100%;
    min-height: 152px;
  }
  .hero-actions {
    gap: 18px;
  }
  .resume-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .status-in-progress {
    animation: none;
    opacity: 1;
  }
}

/* Football: one hand of club cards, with Erin Mills always on top. */
.interest-shelf {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.football-hand {
  display: block;
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 154px;
  height: 138px;
}
.football-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44%;
  aspect-ratio: 0.76;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10% 5% 8%;
  border-radius: 12px;
  background: linear-gradient(145deg, #35383d, #202226 75%);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 #f2f0ec33,
    0 7px 12px #08090a66;
  transform-origin: 50% 90%;
}
.football-card--left {
  z-index: 1;
  transform: translate(-95%, -48%) rotate(-23deg);
}
.football-card--right {
  z-index: 2;
  transform: translate(-5%, -48%) rotate(19deg);
}
.football-card--front {
  z-index: 3;
  transform: translate(-50%, -43%) rotate(-3deg);
}
.interest-football .football-card img {
  width: 84%;
  height: 72%;
  min-height: 0;
  max-width: 100%;
  object-fit: contain;
  filter: none;
  transform: none;
}
.football-card-label {
  font-size: clamp(5px, 0.6vw, 7px);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
  color: var(--text);
}
.football-clubs {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}
.football-clubs li {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.football-club-mark {
  display: grid;
  place-items: center;
  width: 82px;
  height: 96px;
  border-radius: 12px;
  background: #f2f0ec08;
  padding: 10px;
}
.football-club-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
}
.football-clubs h3 {
  font: 500 17px/1.4 var(--display);
  margin-bottom: 12px;
}
.football-clubs .primary-link {
  font-size: 12px;
  gap: 16px;
  line-height: 1.6;
}
@media (max-width: 760px) {
  .interest-shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .football-hand {
    height: 125px;
    max-width: 116px;
  }
  .football-card {
    border-radius: 9px;
    gap: 4px;
  }
  .football-card-label {
    font-size: 5px;
  }
  .football-clubs li {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 17px;
  }
  .football-club-mark {
    width: 70px;
    height: 86px;
  }
}

/* RuneVault: an animated terminal map with room to read the dungeon. */
.rune-scene {
  height: 100%;
  padding: 26px 30px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 19px;
  background: #0e1012;
}
.rune-hud,
.rune-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font:
    10px/1.4 ui-monospace,
    monospace;
  color: var(--muted);
}
.rune-hud {
  max-width: 350px;
  width: 100%;
  margin-inline: auto;
  letter-spacing: 0.08em;
}
.rune-hud span:first-child {
  color: var(--text);
}
.rune-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(29, 1fr);
  grid-template-rows: repeat(13, 1fr);
  width: min(100%, 350px);
  aspect-ratio: 29 / 13;
  margin-inline: auto;
  font:
    10px/1 ui-monospace,
    monospace;
}
.rune-tile,
.rune-player {
  display: grid;
  place-items: center;
  min-width: 0;
}
.rune-tile--floor {
  color: #92969d36;
}
.rune-tile--wall {
  background: #30343a;
  box-shadow: inset 0 1px 0 #f2f0ec08;
  margin: 0.5px;
}
.rune-tile--door {
  color: var(--muted);
}
.rune-tile--scroll {
  color: #aab9ac;
}
.rune-tile--gem::before {
  content: '';
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  background: var(--gold);
}
.rune-player {
  position: absolute;
  left: 10.3448%;
  top: 46.1538%;
  width: 3.4483%;
  height: 7.6923%;
  color: var(--gold);
  background: #0e1012;
  font-weight: 700;
  animation: rune-patrol 12s steps(5, end) infinite;
}
.rune-legend {
  max-width: 350px;
  width: 100%;
  margin-inline: auto;
  font-size: 9px;
}
.rune-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rune-legend b {
  color: var(--gold);
  font-weight: 500;
}
.rune-legend i {
  width: 4px;
  height: 4px;
  transform: rotate(45deg);
  background: var(--gold);
}
@keyframes rune-patrol {
  0%,
  10% {
    transform: translate(0, 0);
  }
  40% {
    transform: translate(500%, 0);
  }
  45%,
  55% {
    transform: translate(500%, -100%);
  }
  85% {
    transform: translate(0, -100%);
  }
  95%,
  100% {
    transform: translate(0, 0);
  }
}
.scene-control {
  min-height: 44px;
  padding: 8px 0;
  font-size: 12px;
  color: var(--secondary);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 5px;
}
.scene-control:hover {
  color: var(--text);
}
.scene-control:disabled {
  cursor: default;
  text-decoration: none;
}

/* Not a Smartboard: a small orthographic hardware model, built from CSS cuboids. */
.smartboard-preview {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: #0e1012;
}
.smartboard-stage {
  position: absolute;
  width: 440px;
  height: 320px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(var(--scene-scale, 0.9));
}
.smartboard-world {
  position: absolute;
  left: 32px;
  top: 115px;
  width: 360px;
  height: 240px;
  transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(-32deg);
}
.smartboard-world *,
.smartboard-world *::before,
.smartboard-world *::after {
  transform-style: preserve-3d;
}
.scene-ground {
  position: absolute;
  left: 32px;
  top: 12px;
  width: 300px;
  height: 210px;
  background: #17191c;
  box-shadow: 14px 18px 24px #08090a88;
}
.scene-box {
  position: absolute;
  width: var(--w);
  height: var(--d);
  transform: translate3d(var(--x), var(--y), var(--z));
}
.scene-box > span {
  position: absolute;
  display: block;
  transform-origin: 0 0;
}
.box-top {
  width: var(--w);
  height: var(--d);
  background: var(--top, #44494f);
  transform: translateZ(var(--h));
}
.box-front {
  width: var(--w);
  height: var(--h);
  background: var(--front, #292d32);
  transform: translate3d(0, var(--d), var(--h)) rotateX(-90deg);
}
.box-side {
  width: var(--h);
  height: var(--d);
  background: var(--side, #34393f);
  transform: rotateY(-90deg);
}
.table-leg {
  --front: #292d32;
  --side: #363a40;
}
.scene-table {
  --top: #45494e;
  --front: #303339;
  --side: #393d43;
}
.scene-whiteboard {
  position: absolute;
  width: 270px;
  height: 130px;
  transform-origin: 0 0;
  transform: translate3d(42px, 20px, 175px) rotateX(-90deg);
  border: 4px solid #62676b;
  border-radius: 2px;
  background: #bdc3bf;
}
.board-projection {
  position: absolute;
  inset: 17px 20px;
  background: #f2f0ec0a;
}
.board-code {
  position: absolute;
  left: 0;
  height: 4px;
  background: #4c625e;
  animation: board-write 8s linear infinite;
  transform-origin: left;
}
.code-one {
  top: 9px;
  width: 75%;
}
.code-two {
  top: 26px;
  left: 14px;
  width: 49%;
  animation-delay: 0.3s;
}
.code-three {
  top: 43px;
  left: 14px;
  width: 63%;
  animation-delay: 0.6s;
}
.code-four {
  top: 60px;
  width: 44%;
  animation-delay: 0.9s;
}
.board-ink {
  position: absolute;
  left: 27px;
  top: 51px;
  width: 102px;
  height: 6px;
  border-bottom: 2px solid #956f3b;
  transform: rotate(-3deg);
  transform-origin: left;
  animation: board-annotate 8s linear infinite;
}
.board-tray {
  position: absolute;
  bottom: -5px;
  left: 10px;
  right: 10px;
  height: 5px;
  background: #72777b;
}
.scene-cables {
  position: absolute;
  left: 62px;
  top: 103px;
  width: 240px;
  height: 100px;
  transform: translateZ(45px);
  overflow: visible;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.cable-wire {
  stroke: #a0a3a5;
}
.cable-data {
  stroke: var(--gold);
  stroke-dasharray: 5 70;
  animation: cable-transfer 8s linear infinite;
}
.scene-laptop-base {
  --top: #8c9399;
  --front: #596169;
  --side: #676f76;
}
.scene-laptop-screen {
  position: absolute;
  width: 66px;
  height: 43px;
  padding: 8px;
  transform-origin: 0 0;
  transform: translate3d(88px, 148px, 87px) rotateX(-104deg);
  background: #11171a;
  border: 3px solid #747d84;
  border-radius: 2px;
}
.scene-laptop-screen > span {
  display: block;
  height: 2px;
  margin-bottom: 5px;
  width: 70%;
  background: #789c91;
}
.scene-laptop-screen > span:nth-child(2) {
  width: 48%;
}
.laptop-feedback {
  display: block;
  width: 82%;
  height: 3px;
  background: var(--gold);
  opacity: 0.25;
  animation: laptop-capture 8s linear infinite;
}
.laptop-keyboard {
  position: absolute;
  left: 96px;
  top: 158px;
  width: 50px;
  height: 22px;
  transform: translateZ(47.2px);
  background: repeating-linear-gradient(0deg, #444c53 0 2px, transparent 2px 5px);
}
.scene-pi {
  --top: #376557;
  --front: #23473d;
  --side: #2d5448;
}
.pi-chip {
  --top: #192122;
  --front: #101617;
  --side: #222c2d;
}
.pi-pins {
  position: absolute;
  left: 211px;
  top: 140px;
  width: 28px;
  height: 3px;
  transform: translateZ(48px);
  background: repeating-linear-gradient(90deg, #b3a078 0 2px, transparent 2px 4px);
}
.pi-led {
  position: absolute;
  left: 236px;
  top: 158px;
  width: 2px;
  height: 2px;
  transform: translateZ(48px);
  background: #b9d5b5;
  animation: pi-activity 8s linear infinite;
}
.scene-projector {
  --top: #a8adaf;
  --front: #80878b;
  --side: #939a9e;
}
.scene-projector .box-top::after {
  content: '';
  position: absolute;
  inset: 7px 9px 7px 23px;
  background: repeating-linear-gradient(90deg, #6b7276 0 1px, transparent 1px 3px);
}
.projector-lens {
  position: absolute;
  width: 12px;
  height: 8px;
  border: 2px solid #414b52;
  background: #d4e6df;
  border-radius: 2px;
  transform-origin: 0 0;
  transform: translate3d(197px, 105px, 55px) rotateX(-90deg);
}
.projector-beam {
  position: absolute;
  width: 180px;
  height: 113.45px;
  transform-origin: 0 0;
  transform: translate3d(90px, 20px, 125px) rotateX(-40.7deg);
  clip-path: polygon(0 0, 100% 0, 64% 100%);
  background: linear-gradient(#d4e6df08, #d4e6df1f);
  pointer-events: none;
  animation: projector-light 8s linear infinite;
}
.scene-caption {
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9px;
  color: var(--muted);
}
@keyframes board-write {
  0%,
  5% {
    clip-path: inset(0 100% 0 0);
  }
  28%,
  91% {
    clip-path: inset(0 0 0 0);
  }
  100% {
    clip-path: inset(0 100% 0 0);
  }
}
@keyframes board-annotate {
  0%,
  37% {
    clip-path: inset(0 100% 0 0);
  }
  57%,
  89% {
    clip-path: inset(0 0 0 0);
  }
  100% {
    clip-path: inset(0 100% 0 0);
  }
}
@keyframes laptop-capture {
  0%,
  54%,
  100% {
    opacity: 0.25;
  }
  66%,
  86% {
    opacity: 1;
  }
}
@keyframes cable-transfer {
  0%,
  52% {
    stroke-dashoffset: 75;
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  85%,
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}
@keyframes pi-activity {
  0%,
  48%,
  85%,
  100% {
    opacity: 0.4;
  }
  57%,
  73% {
    opacity: 1;
  }
}
@keyframes projector-light {
  0%,
  100% {
    opacity: 0.55;
  }
  20%,
  88% {
    opacity: 1;
  }
}

/* Loops run only while visible and can be paused independently. */
[data-preview-motion] *,
[data-preview-motion] *::before,
[data-preview-motion] *::after {
  animation-play-state: paused;
}
[data-preview-motion][data-running='true'] *,
[data-preview-motion][data-running='true'] *::before,
[data-preview-motion][data-running='true'] *::after {
  animation-play-state: running;
}
@media (max-width: 760px) {
  .rune-scene {
    padding: 24px;
  }
  .rune-legend {
    font-size: 8px;
    gap: 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .board-code,
  .board-ink {
    clip-path: none;
  }
  .rune-player {
    transform: none;
  }
  .laptop-feedback,
  .pi-led,
  .projector-beam {
    opacity: 1;
  }
}

/* Shared glass. The reflection itself is clipped, independently of child layers. */
.glass-surface {
  --glass-radius: 12px;
  position: relative;
  isolation: isolate;
  border-radius: var(--glass-radius);
}
.experience.glass-surface {
  --glass-radius: 14px;
}
.glass-surface::before,
.experience-light {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: var(--glass-radius);
  clip-path: inset(0 round var(--glass-radius));
  background:
    radial-gradient(
      ellipse 280px 180px at var(--glass-x, 50%) var(--glass-y, 50%),
      #f2f0ec18,
      transparent 72%
    ),
    linear-gradient(
      var(--glass-angle, 125deg),
      transparent 30%,
      #f2f0ec04 50%,
      transparent 70%
    );
  opacity: 0;
  transition: opacity 180ms;
}
.glass-surface[data-glass-active]::before {
  opacity: 1;
}
.experience.glass-surface::before {
  display: none;
}
.experience[data-glass-active] > summary > .experience-light {
  opacity: 1;
}
.experience > summary:focus-visible > .experience-light {
  opacity: 0.6;
}
.glass-surface:focus-visible::before {
  opacity: 0.6;
}
.project-card.glass-surface,
.interest.glass-surface,
.interest.glass-surface:hover,
.hero-feature.glass-surface {
  background: linear-gradient(125deg, #f2f0ec08, transparent 60%), #17191c94;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 #f2f0ec1f,
    0 10px 24px #08090a24;
}
.project-card.glass-surface:hover,
.project-card.glass-surface:focus-within {
  translate: none;
}
.interest-art .leetcode-mark {
  width: 82px;
  height: 82px;
  object-fit: contain;
}
.widget-leetcode-mark {
  display: block;
  object-fit: contain;
  margin-bottom: 24px;
}

.interest-label,
.interest:hover .interest-label {
  display: block;
  margin: 0;
  font-size: 13px;
}

/* Zetamac remains transparent; only the arithmetic changes under the best score. */
.zetamac-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
  font-variant-numeric: tabular-nums;
}
.zetamac-best {
  font: 500 60px/1 var(--display);
  letter-spacing: -0.04em;
  color: var(--text);
}
.math-question {
  font: 500 17px/1.4 var(--font);
  color: var(--secondary);
  min-height: 24px;
  white-space: nowrap;
}
.math-answer {
  font: 500 15px/1.3 var(--font);
  min-height: 20px;
  color: var(--text);
  opacity: 0;
  /* Hide immediately before replacing the text for the next question. */
  transition: none;
}
.math-answer[data-solved='true'] {
  opacity: 1;
  transition: opacity 100ms;
}

/* A muted ten-slot elixir meter: gradual regeneration and quick card spends. */
.royale-scene {
  width: min(100%, 200px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
}
.royale-scene .royale-mark svg {
  display: block;
  width: 77px;
  height: 77px;
}
.elixir-display {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
}
.elixir-value {
  width: 22px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.elixir-track {
  position: relative;
  display: block;
  height: 17px;
  flex: 1;
  background: #08090a88;
  border: 1px solid #f2f0ec26;
  border-radius: 3px;
  overflow: hidden;
}
.elixir-fill {
  position: absolute;
  inset: 2px;
  transform-origin: left;
  transform: scaleX(0.5);
  background: linear-gradient(#b6bac0, #7d838a);
  transition: transform 140ms linear;
}
.elixir-segments {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 calc(10% - 1px),
    #17191c calc(10% - 1px) 10%
  );
}

/* Actual vehicle artwork sits on transparent scenes, with bounded driving motion. */
.f1-scene {
  display: flex;
  width: min(100%, 270px);
  height: 138px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.interest-art .f1-team-mark {
  width: 104px;
  height: 43px;
}
.f1-road {
  position: relative;
  display: block;
  width: 100%;
  height: 68px;
  overflow: hidden;
}
.f1-car-motion {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  animation: f1-drive 4s ease-in-out infinite;
}
.interest-art .f1-car {
  width: 100%;
  height: auto;
}
.f1-road::after {
  content: '';
  position: absolute;
  left: -40px;
  right: -40px;
  bottom: 4px;
  height: 1px;
  opacity: 0.25;
  background: repeating-linear-gradient(90deg, #92969d 0 20px, transparent 20px 60px);
  animation: road-travel 0.6s linear infinite;
}
.kart-scene {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 138px;
}
.kart-motion {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  animation: kart-idle 1.1s ease-in-out infinite;
}
.interest-art .kart-motion img {
  width: min(100%, 170px);
  height: auto;
}
@keyframes f1-drive {
  0%,
  100% {
    transform: translateX(-6px);
  }
  50% {
    transform: translateX(6px);
  }
}
@keyframes road-travel {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-60px);
  }
}
@keyframes kart-idle {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1.5px);
  }
}

/* New moving layers follow the same visible/paused lifecycle as project scenes. */
[data-preview-motion] *,
[data-preview-motion] *::before,
[data-preview-motion] *::after {
  animation-play-state: paused;
}
[data-preview-motion][data-running='true'] *,
[data-preview-motion][data-running='true'] *::before,
[data-preview-motion][data-running='true'] *::after {
  animation-play-state: running;
}
@media (max-width: 760px) {
  .zetamac-best {
    font-size: 54px;
  }
  .math-question {
    font-size: 15px;
  }
  .math-answer {
    font-size: 14px;
  }
  .royale-scene .royale-mark svg {
    width: 66px;
    height: 66px;
  }
  .royale-scene {
    gap: 10px;
  }
  .interest-art .f1-team-mark {
    width: 88px;
    height: 36px;
  }
  .f1-scene {
    gap: 6px;
  }
  .f1-road {
    height: 48px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .math-answer {
    opacity: 1;
  }
  .f1-car-motion,
  .kart-motion,
  .f1-road::after {
    transform: none;
  }
}

/* Research: a small metal plaque behind a matte paper certificate. */
.research-hand {
  position: relative;
  display: block;
  isolation: isolate;
  width: min(100%, 176px);
  height: 138px;
}
.research-plaque,
.research-certificate {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48%;
  top: 50%;
  transform-origin: 50% 85%;
}
.research-plaque {
  z-index: 1;
  left: 43%;
  aspect-ratio: 0.77;
  padding: 10px 7px;
  gap: 8px;
  border: 3px solid #5b5750;
  border-radius: 6px;
  background: linear-gradient(135deg, #34363b, #1b1d21);
  box-shadow:
    inset 0 1px 0 #f2f0ec18,
    0 7px 13px #08090a77;
  transform: translate(-80%, -50%) rotate(-12deg);
}
.interest-art .research-plaque img,
.research-plaque img {
  width: 28%;
  height: 46%;
  min-height: 0;
  max-width: 100%;
  object-fit: contain;
}
.plaque-inscription {
  font: 500 7px/1.3 var(--font);
  text-align: center;
  color: var(--text);
}
.plaque-year {
  font: 500 6px/1.2 var(--font);
  letter-spacing: 0.1em;
  color: var(--accent);
}
.research-certificate {
  z-index: 2;
  left: 54%;
  aspect-ratio: 0.74;
  padding: 11px 9px;
  gap: 7px;
  border-radius: 3px;
  background: #d6d2c9;
  color: #27292d;
  box-shadow:
    inset 0 1px 0 #f2f0ecaa,
    0 7px 13px #08090a66;
  transform: translate(-20%, -47%) rotate(10deg);
}
.research-certificate::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid #92969d66;
  pointer-events: none;
}
.certificate-ap {
  font: 800 17px/1 var(--display);
  letter-spacing: -0.04em;
}
.certificate-title {
  font: 600 8px/1.5 var(--font);
  text-align: center;
}
.certificate-rule {
  width: 24px;
  height: 1px;
  background: #9c8761;
}
.certificate-topic {
  font: 500 6px/1.4 var(--font);
  text-align: center;
}
.research-dialog-art {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}
.research-dialog-art .research-hand {
  width: 214px;
  height: 172px;
}
.research-art-note {
  text-align: center;
  font-size: 11px;
  color: var(--secondary);
  margin-top: 9px;
}
.research-entry {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}
.research-entry h3 {
  font: 500 18px/1.55 var(--display);
  margin: 0 0 10px;
}
.research-entry > p {
  font-size: 14px;
  color: var(--secondary);
  line-height: 1.8;
  margin: 0;
}
.research-university-logo {
  display: block;
  width: 150px;
  height: 66px;
  object-fit: contain;
  object-position: left;
  margin-bottom: 18px;
}
.research-entry .project-links:empty {
  display: none;
}
@media (max-width: 760px) {
  .interest-art .research-hand {
    width: min(100%, 136px);
    height: 125px;
  }
  .interest-art .research-plaque {
    gap: 5px;
    padding: 7px 5px;
    border-width: 2px;
  }
  .interest-art .research-certificate {
    padding: 8px 6px;
    gap: 5px;
  }
  .interest-art .certificate-ap {
    font-size: 14px;
  }
  .interest-art .certificate-title {
    font-size: 6px;
  }
  .interest-art .certificate-topic,
  .interest-art .plaque-inscription,
  .interest-art .plaque-year {
    font-size: 5px;
  }
  .interest-art .research-certificate::before {
    inset: 4px;
  }
}

/* Capybaras shares one camera and floor between the cabinet and robot. */
.vex-showcase {
  position: relative;
  display: block;
  width: min(100%, 280px);
  min-width: 0;
  height: 138px;
}
.vex-scene-stage {
  position: absolute;
  display: block;
  width: 360px;
  height: 280px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(var(--scene-scale, 0.6));
}
.vex-showcase-world {
  position: absolute;
  display: block;
  left: 20px;
  top: 110px;
  width: 310px;
  height: 190px;
  transform: rotateX(58deg) rotateZ(-32deg);
}
.vex-showcase-world,
.vex-showcase-world *,
.vex-showcase-world *::before,
.vex-showcase-world *::after {
  transform-style: preserve-3d;
}
.vex-room-floor {
  position: absolute;
  display: block;
  width: 340px;
  height: 140px;
  transform-origin: 0 0;
  transform: translate3d(35px, -75px, -1px) rotateZ(29deg);
  background: #202328;
  box-shadow: 5px 9px 18px #08090a66;
}
.vex-robot-assembly {
  position: absolute;
  display: block;
  left: 165px;
  top: 92px;
  width: 120px;
  height: 80px;
}
.vex-cabinet-back {
  --top: #23282e;
  --front: #161c22;
  --side: #20262c;
}
.vex-cabinet-frame {
  --top: #686b6d;
  --front: #44494e;
  --side: #555a60;
}
.vex-cabinet-shelf {
  --top: #727b80;
  --front: #525d66;
  --side: #626d75;
}
.vex-cabinet-foot {
  --top: #42484f;
  --front: #282e35;
  --side: #363d45;
}
/* Every award has volume and rests directly on a cabinet shelf. */
.cabinet-trophy {
  position: absolute;
  display: block;
  width: 12px;
  height: 10px;
}
.trophy-gold {
  --top: #d7be8e;
  --front: #ae925f;
  --side: #c0a16f;
}
.trophy-silver {
  --top: #d1d5d9;
  --front: #959da6;
  --side: #b2bbc4;
}
.trophy-bronze {
  --top: #bba780;
  --front: #8b7453;
  --side: #a28b65;
}
.trophy-pedestal {
  --top: #363b42;
  --front: #1a1f25;
  --side: #282e35;
}
.vex-cabinet-glass {
  position: absolute;
  display: block;
  width: 102px;
  height: 140px;
  transform-origin: 0 0;
  transform: translate3d(24px, 53px, 154px) rotateX(-90deg);
  border: 1px solid #d5e4e61f;
  background: linear-gradient(
    115deg,
    #d5e4e604 24%,
    #d5e4e617 42%,
    #d5e4e605 56%,
    transparent 70%
  );
}
.interest-art .vex-cabinet-glass img {
  position: absolute;
  left: 31px;
  top: 67px;
  width: 38px;
  height: 38px;
  object-fit: contain;
  opacity: 0.88;
}
.vex-cabinet-handle {
  position: absolute;
  right: 5px;
  top: 66px;
  width: 2px;
  height: 14px;
  background: #a4adb1;
}
.vex-ground-shadow {
  position: absolute;
  display: block;
  left: 5px;
  top: 8px;
  width: 108px;
  height: 68px;
  background: #08090a55;
  box-shadow: 7px 10px 12px #08090a55;
}
.vex-wheel {
  --top: #30343a;
  --front: #101215;
  --side: #1a1d22;
}
.vex-wheel .box-front {
  border-radius: 7px;
}
.vex-wheel .box-front::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 2px;
  background: #666b72;
}
.vex-metal {
  --top: #a3a7ac;
  --front: #6c727a;
  --side: #848a91;
}
.vex-arm-metal {
  --top: #c4c6c8;
  --front: #7d838a;
  --side: #969da4;
}
.vex-fork {
  --top: #8c99a4;
  --front: #5d6b77;
  --side: #74818c;
}
.vex-brain {
  --top: #394048;
  --front: #242b32;
  --side: #2e353e;
}
.vex-brain .box-top::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 4px;
  width: 15px;
  height: 8px;
  background: #889e9a;
}
.vex-upright .box-front::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 5px;
  bottom: 5px;
  width: 3px;
  background: radial-gradient(circle, #32373d 1px, transparent 1.4px) center top / 3px 8px
    repeat-y;
}
.vex-team-plate {
  position: absolute;
  display: grid;
  place-items: center;
  width: 34px;
  height: 14px;
  background: #354f6b;
  color: #f2f0ec;
  font: 600 8px/1 var(--font);
  transform-origin: 0 0;
  transform: translate3d(40px, 74px, 29px) rotateX(-90deg);
}
.vex-arm-lift {
  position: absolute;
  display: block;
  width: 90px;
  height: 38px;
  transform-origin: 0 50% 0;
  transform: translate3d(28px, 23px, 86px) rotateY(-28deg);
  animation: vex-arm-lift 5.2s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}
@keyframes vex-arm-lift {
  0%,
  12%,
  100% {
    transform: translate3d(28px, 23px, 86px) rotateY(-10deg);
  }
  48%,
  62% {
    transform: translate3d(28px, 23px, 86px) rotateY(-60deg);
  }
}
/* The arm follows the shared scene pause and visibility state. */
.vex-showcase .vex-arm-lift {
  animation-play-state: paused;
}
.vex-showcase[data-running='true'] .vex-arm-lift {
  animation-play-state: running;
}
@media (max-width: 760px) {
  .vex-showcase {
    height: 125px;
  }
}

/* Compact repository actions retain a full keyboard and touch target. */
.project-repository {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  margin-left: auto;
  border-radius: 8px;
  color: var(--secondary);
  transition:
    color 160ms,
    background 160ms;
}
.project-repository:hover,
.project-repository:focus-visible {
  color: var(--text);
  background: #f2f0ec09;
}
.github-icon {
  display: block;
  width: 22px;
  height: 22px;
}

/* Both resume entry points expose the same two PDF choices. */
.header {
  position: relative;
  z-index: 8;
}
.hero-copy {
  position: relative;
  z-index: 2;
}
.resume-picker {
  position: relative;
}
.resume-picker > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  cursor: pointer;
  list-style: none;
  min-height: 44px;
  border-radius: 6px;
}
.resume-picker > summary::-webkit-details-marker {
  display: none;
}
.resume-picker > summary::after {
  content: '';
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 180ms;
}
.resume-picker[open] {
  z-index: 12;
}
.resume-picker[open] > summary::after {
  transform: translateY(1px) rotate(225deg);
}
.header-resumes > summary {
  font-size: 13px;
}
.resume-menu {
  position: absolute;
  z-index: 12;
  top: calc(100% + 9px);
  left: 0;
  width: 252px;
  max-width: calc(100vw - 40px);
  padding: 5px;
  background: #17191cf5;
  border: 1px solid #f2f0ec26;
  border-radius: 12px;
  box-shadow: 0 14px 32px #08090a88;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.header-resumes .resume-menu {
  right: 0;
  left: auto;
}
.resume-menu a {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 7px;
}
.resume-menu a:hover,
.resume-menu a:focus-visible {
  background: #f2f0ec08;
}
.resume-menu strong {
  font-size: 13px;
  font-weight: 600;
}
.resume-menu a > span:not(.sr-only) {
  font-size: 12px;
  color: var(--secondary);
}
.resume-picker[open] .resume-menu {
  animation: resume-menu-in 160ms ease-out;
}
@keyframes resume-menu-in {
  from {
    opacity: 0.3;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 760px) {
  .header-resumes {
    display: none;
  }
}

/* Brief transitions respond to opening and changing content. */
.experience[open] .experience-body {
  animation: work-detail-in 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes work-detail-in {
  from {
    opacity: 0.45;
    clip-path: inset(0 0 8% 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0);
  }
}
@supports (interpolate-size: allow-keywords) and selector(details::details-content) {
  .experience {
    interpolate-size: allow-keywords;
  }
  .experience::details-content {
    height: 0;
    overflow: clip;
    transition:
      height 300ms cubic-bezier(0.16, 1, 0.3, 1),
      content-visibility 300ms allow-discrete;
  }
  .experience[open]::details-content {
    height: auto;
  }
}
@supports (transition-behavior: allow-discrete) {
  dialog {
    opacity: 0;
    transform: translateY(6px) scale(0.99);
    transition:
      opacity 160ms,
      transform 200ms cubic-bezier(0.16, 1, 0.3, 1),
      display 200ms allow-discrete,
      overlay 200ms allow-discrete;
  }
  dialog[open] {
    opacity: 1;
    transform: none;
    animation: none;
  }
  dialog::backdrop {
    opacity: 0;
    transition: opacity 160ms;
  }
  dialog[open]::backdrop {
    opacity: 1;
  }
  @starting-style {
    dialog[open] {
      opacity: 0;
      transform: translateY(8px) scale(0.99);
    }
    dialog[open]::backdrop {
      opacity: 0;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .experience::details-content,
  dialog::backdrop {
    transition: none !important;
  }
}

/* A single HK impact and ripple, then a clear view of the portfolio. */
html.intro-pending {
  overflow: hidden;
}
.intro-active > :not(.startup-intro) *,
.intro-active > :not(.startup-intro) *::before,
.intro-active > :not(.startup-intro) *::after {
  animation-play-state: paused !important;
}
.startup-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  overflow: hidden;
  background: var(--bg);
}
.intro-pending .startup-intro {
  display: grid;
}
.startup-intro:focus {
  outline: none;
}
.startup-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(220px, 30vw, 340px);
  aspect-ratio: 1;
}
.startup-mark {
  position: relative;
  z-index: 1;
  color: var(--text);
  font: 800 clamp(80px, 11vw, 120px) / 1 var(--display);
  letter-spacing: -0.04em;
  opacity: 0;
}
.startup-bloom,
.startup-ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.startup-bloom {
  background: radial-gradient(circle, #f2f0ec12, #c7ab7824 30%, transparent 68%);
}
.startup-ripple-outer {
  border: 2px solid #c7ab7899;
}
.startup-ripple-inner {
  inset: 12%;
  border: 1px solid #f2f0ec88;
}
.intro-running .startup-intro {
  animation: startup-clear 1950ms linear both;
}
.intro-running .startup-stage {
  animation: startup-stage-clear 1950ms linear both;
}
.intro-running .startup-mark {
  animation: startup-mark 1300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.intro-running .startup-bloom {
  animation: startup-bloom 1050ms 280ms ease-out both;
}
.intro-running .startup-ripple-outer {
  animation: startup-ripple 1000ms 380ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.intro-running .startup-ripple-inner {
  animation: startup-ripple 950ms 500ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes startup-mark {
  0% {
    opacity: 0;
    transform: scale(0.72);
    filter: blur(12px);
  }
  36%,
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}
@keyframes startup-bloom {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  22% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(2.4);
  }
}
@keyframes startup-ripple {
  0% {
    opacity: 0;
    transform: scale(0.28);
  }
  12% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: scale(3.2);
  }
}
@keyframes startup-clear {
  0%,
  72% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes startup-stage-clear {
  0%,
  56% {
    opacity: 1;
  }
  72%,
  100% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .intro-pending .startup-intro {
    display: none;
  }
  html.intro-pending {
    overflow: visible;
  }
}

/* Ambient light, intermittent tile seams, and a highlight beneath the name. */
.hero {
  position: relative;
  isolation: isolate;
}
.hero-atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.hero-light {
  position: absolute;
  display: block;
  width: 85%;
  height: 110%;
  top: -5%;
  animation: hero-light-drift 24s ease-in-out infinite alternate;
}
.hero-light-platinum {
  left: -14%;
  background: radial-gradient(
    ellipse at 45% 48%,
    #92969d18,
    #17191c07 40%,
    transparent 70%
  );
}
.hero-light-gold {
  right: -16%;
  background: radial-gradient(ellipse at 50% 40%, #c7ab780b, transparent 68%);
  animation-duration: 31s;
  animation-direction: alternate-reverse;
}
/* Tile outlines share edges; a short light trace travels around each seam. */
.hero-tiles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--text);
  mask-image: radial-gradient(ellipse at 45% 50%, #000 20%, transparent 75%);
}
.hero-tile {
  opacity: 0;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 38 62;
  animation: hero-tile-seam 12s linear infinite;
}
.hero-tile-gold {
  color: var(--accent);
}
.hero-tile:nth-child(2) {
  animation-delay: -7s;
}
.hero-tile:nth-child(3) {
  animation-delay: -3s;
}
.hero-tile:nth-child(4) {
  animation-delay: -9s;
}
.hero-tile:nth-child(5) {
  animation-delay: -4s;
}
.hero-tile:nth-child(6) {
  animation-delay: -11s;
}
.hero-tile:nth-child(7) {
  animation-delay: -6s;
}
.hero-tile:nth-child(8) {
  animation-delay: -1.5s;
}
.hero-tile:nth-child(9) {
  animation-delay: -8s;
}
.hero-atmosphere .hero-light,
.hero-atmosphere .hero-tile {
  animation-play-state: paused;
}
.hero-atmosphere[data-running='true'] .hero-light,
.hero-atmosphere[data-running='true'] .hero-tile {
  animation-play-state: running;
}
@keyframes hero-tile-seam {
  0% {
    opacity: 0;
    stroke-dashoffset: 38;
  }
  8% {
    opacity: 0.32;
  }
  25% {
    opacity: 0.22;
  }
  38%,
  100% {
    opacity: 0;
    stroke-dashoffset: -62;
  }
}
.intro-university {
  color: var(--accent);
}
@keyframes hero-light-drift {
  from {
    transform: translate3d(-5%, 3%, 0) rotate(-6deg);
  }
  to {
    transform: translate3d(9%, -5%, 0) rotate(5deg);
  }
}
#hero-title {
  font-size: clamp(43px, 5.3vw, 76px);
}
.hero-name {
  position: relative;
  display: inline-block;
}
.hero-name::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  border-radius: 3px;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 30%, #c7ab78cc 48%, #f2f0ec 50%, transparent 70%),
    linear-gradient(90deg, transparent, #c7ab7855 35%, #c7ab7855 65%, transparent);
  background-size:
    240% 100%,
    100% 100%;
  animation: hero-name-light 14s ease-in-out infinite;
  animation-play-state: paused;
}
.hero-atmosphere[data-running='true'] ~ .hero-copy .hero-name::after {
  animation-play-state: running;
}
@keyframes hero-name-light {
  0%,
  18% {
    background-position:
      120% 0,
      0 0;
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
  82%,
  100% {
    background-position:
      -120% 0,
      0 0;
    opacity: 0.65;
  }
}

/* Public profile statistics remain readable when live refresh is unavailable. */
.leetcode-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 16px;
  margin: 28px 0;
}
.leetcode-stats dt,
.profile-status {
  font-size: 12px;
  color: var(--secondary);
  line-height: 1.6;
}
.leetcode-stats dd {
  margin: 6px 0 0;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 380px) {
  .leetcode-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.research-entry h4 {
  margin-top: 28px;
  font-size: 14px;
  font-weight: 500;
}
.research-entry .award-list .primary-link {
  display: inline;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
