:root {
  --paper: #f9f6f0;
  --ink: #1d2a44;
  --accent: #c5a059;
  --jukebox-left: 1.5rem;
  --jukebox-top: 50%;
  --jukebox-selector-width: 15rem;
}

:root[data-theme="dark"] {
  --paper: #121a2a;
  --ink: #f7f2e8;
  --accent: #dfb866;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body {
  min-width: 0;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  position: relative;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.22'/%3E%3C/svg%3E");
  content: "";
  opacity: 0.16;
  pointer-events: none;
}

.js-enhanced .portfolio {
  animation: portfolio-arrival 780ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes portfolio-arrival {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cfg-background {
  --cfg-x: -30rem;
  --cfg-y: -30rem;
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms ease;
  -webkit-mask-image: radial-gradient(circle 19rem at var(--cfg-x) var(--cfg-y), #000 0%, rgb(0 0 0 / 0.92) 36%, transparent 72%);
  mask-image: radial-gradient(circle 19rem at var(--cfg-x) var(--cfg-y), #000 0%, rgb(0 0 0 / 0.92) 36%, transparent 72%);
}

.cfg-background.is-revealed {
  opacity: 1;
}

.cfg-background::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent calc(50% - 27rem),
    color-mix(in srgb, var(--paper) 54%, transparent) calc(50% - 20rem),
    color-mix(in srgb, var(--paper) 96%, transparent) calc(50% - 12rem),
    var(--paper) 50%,
    color-mix(in srgb, var(--paper) 96%, transparent) calc(50% + 12rem),
    color-mix(in srgb, var(--paper) 54%, transparent) calc(50% + 20rem),
    transparent calc(50% + 27rem),
    transparent 100%
  );
  content: "";
  opacity: 1;
}

.cfg-background svg {
  position: absolute;
  z-index: 0;
  top: 48%;
  left: 50%;
  width: auto;
  height: max(165rem, 190vh);
  opacity: 0.38;
  transform: translate(-50%, -50%) rotate(-2deg);
}

.cfg-background .graph > polygon {
  fill: transparent !important;
}

.cfg-background .node polygon,
.cfg-background .node path {
  fill: color-mix(in srgb, var(--paper) 70%, transparent) !important;
  stroke: color-mix(in srgb, var(--ink) 45%, transparent) !important;
}

.cfg-background .edge path,
.cfg-background .edge polygon {
  fill: none;
  stroke: color-mix(in srgb, var(--accent) 80%, var(--ink)) !important;
}

.cfg-background .edge polygon {
  fill: color-mix(in srgb, var(--accent) 80%, var(--ink)) !important;
}

.cfg-background text {
  fill: var(--ink) !important;
  font-family: "Space Mono", "Courier New", monospace !important;
}

:root[data-theme="dark"] .cfg-background {
  -webkit-mask-image: radial-gradient(circle 23rem at var(--cfg-x) var(--cfg-y), #000 0%, rgb(0 0 0 / 0.72) 34%, transparent 84%);
  mask-image: radial-gradient(circle 23rem at var(--cfg-x) var(--cfg-y), #000 0%, rgb(0 0 0 / 0.72) 34%, transparent 84%);
}

:root[data-theme="dark"] .cfg-background svg {
  opacity: 0.22;
}

:root[data-theme="dark"] .cfg-background::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce), (hover: none) {
  .cfg-background {
    --cfg-x: 50vw;
    --cfg-y: 40vh;
    opacity: 0.16;
    transition: none;
  }
}

a {
  color: inherit;
}

button {
  color: inherit;
}

.theme-toggle {
  --theme-toggle-offset-y: -50%;
  position: absolute;
  z-index: 21;
  top: 50%;
  right: -3.25rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
  place-items: center;
  transform: translateY(var(--theme-toggle-offset-y));
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
  transform: translateY(var(--theme-toggle-offset-y)) rotate(12deg) scale(1.08);
}

.theme-toggle.is-changing {
  animation: theme-toggle-pop 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-icon {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.theme-icon--sun {
  display: none;
}

:root[data-theme="dark"] .theme-icon--moon {
  display: none;
}

:root[data-theme="dark"] .theme-icon--sun {
  display: block;
}

.theme-wipe {
  position: fixed;
  z-index: 20;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.theme-stripe {
  position: absolute;
  top: var(--stripe-top);
  left: 0;
  width: 100%;
  height: calc(var(--stripe-height) + 1px);
  background: var(--theme-stripe);
  transform: translate3d(var(--stripe-start), 0, 0);
  will-change: transform;
}

.theme-wipe[data-theme="dark"] {
  --theme-stripe: #1c2b45;
}

.theme-wipe[data-theme="light"] {
  --theme-stripe: #e7e1d4;
}

.theme-wipe[data-direction="forward"] .theme-stripe:nth-child(odd),
.theme-wipe[data-direction="reverse"] .theme-stripe:nth-child(even) {
  --stripe-start: -105%;
}

.theme-wipe[data-direction="forward"] .theme-stripe:nth-child(even),
.theme-wipe[data-direction="reverse"] .theme-stripe:nth-child(odd) {
  --stripe-start: 105%;
}

.theme-wipe.is-covering,
.theme-wipe.is-revealing {
  opacity: 1;
}

.theme-wipe.is-covering .theme-stripe {
  animation: theme-stripe-enter 620ms cubic-bezier(0.22, 1, 0.36, 1) var(--stripe-delay) both;
}

.theme-wipe.is-revealing .theme-stripe {
  animation: theme-stripe-leave 540ms cubic-bezier(0.65, 0, 0.35, 1) var(--stripe-reveal-delay) both;
}

@keyframes theme-stripe-enter {
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes theme-stripe-leave {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(var(--stripe-start), 0, 0);
  }
}

@keyframes theme-toggle-pop {
  from,
  to {
    transform: translateY(var(--theme-toggle-offset-y));
  }

  50% {
    transform: translateY(var(--theme-toggle-offset-y)) scale(0.78) rotate(-16deg);
  }
}

.portfolio {
  position: relative;
  z-index: 1;
  width: min(100% - 3rem, 38rem);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.25rem) 0 5rem;
}

.music {
  position: sticky;
  z-index: 7;
  top: 0;
  isolation: isolate;
  margin-bottom: clamp(1.8rem, 4vw, 2.75rem);
}

.music::before {
  position: absolute;
  z-index: -1;
  inset: -0.65rem -1rem;
  background: var(--paper);
  box-shadow: 0 0.5rem 1rem color-mix(in srgb, var(--paper) 94%, transparent);
  content: "";
  opacity: 0;
  transform: translateY(-0.45rem) scaleY(0.75);
  transition: opacity 260ms ease, transform 340ms cubic-bezier(0.22, 1, 0.36, 1);
}

.music.is-stuck::before {
  opacity: 0.98;
  transform: translateY(0) scaleY(1);
}

.now-playing {
  position: relative;
  display: grid;
  grid-template-areas:
    "info time toggle"
    "wave wave wave";
  grid-template-columns: minmax(0, 1fr) auto 2.8rem;
  gap: 0.42rem 0.65rem;
  align-items: center;
  width: 100%;
  padding: 0.35rem 0 0.25rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: "Space Mono", "Courier New", monospace;
  text-align: left;
}

.now-playing__info,
.now-playing__label,
.now-playing__title,
.now-playing__artist {
  display: block;
  min-width: 0;
}

.now-playing__info {
  grid-area: info;
  overflow: hidden;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-playing__label {
  display: inline;
  margin: 0 0.45rem 0 0;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.58;
}

.now-playing__title {
  overflow: hidden;
  display: inline;
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.78rem;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-playing__artist {
  display: inline;
  margin: 0 0 0 0.38rem;
  font-size: 0.68rem;
  opacity: 0.62;
}

.now-playing__artist::before {
  margin-right: 0.38rem;
  content: "/";
}

.now-playing__wave {
  grid-area: wave;
  display: flex;
  gap: 3px;
  align-items: center;
  height: 1.65rem;
  padding: 0.15rem 0.3rem 0.05rem 0;
  border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
}

.wave-bar {
  width: 2px;
  height: var(--wave-height);
  border-radius: 99px;
  background: var(--accent);
  opacity: 0.9;
  transform-origin: center;
  animation: mellow-wave 1.9s ease-in-out infinite;
  animation-delay: var(--wave-delay);
}

.music.is-live .wave-bar {
  animation: none;
  transform: scaleY(var(--audio-level, 0.2));
}

.music.is-unanalysed .wave-bar {
  animation: none;
  opacity: 0.32;
  transform: scaleY(0.3);
}

@keyframes mellow-wave {
  0%,
  100% {
    transform: scaleY(0.3);
  }

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

.now-playing__time {
  grid-area: time;
  font-size: 0.68rem;
  white-space: nowrap;
}

.now-playing__toggle {
  grid-area: toggle;
  width: 2.8rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.67rem;
  text-align: right;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.23rem;
}

.now-playing__skip {
  display: none;
}

.now-playing__toggle:hover,
.now-playing__toggle:focus-visible {
  color: var(--accent);
  outline: none;
}

.music.is-toggling .now-playing__toggle {
  animation: playback-toggle 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.music.is-toggling .now-playing__wave {
  animation: playback-pulse 320ms ease-out;
}

@keyframes playback-toggle {
  0% {
    opacity: 0;
    transform: translateY(0.35rem) scale(0.82);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes playback-pulse {
  50% {
    opacity: 0.45;
    transform: translateX(0.2rem);
  }
}

.music.is-paused .wave-bar {
  width: 2px;
  height: 2px;
  animation: none;
  opacity: 0.5;
  transform: none;
}

.jukebox {
  position: fixed;
  z-index: 6;
  top: var(--jukebox-top);
  left: var(--jukebox-left);
  width: 2.8rem;
  height: 2.8rem;
  transform: translateY(-50%);
}

.jukebox__handle {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
}

.jukebox__handle:active {
  cursor: grabbing;
}

.jukebox__handle span {
  width: 1.05rem;
  height: 1.05rem;
  background: radial-gradient(circle, var(--ink) 1.15px, transparent 1.6px) 0 0 / 0.36rem 0.36rem;
}

.jukebox__selector {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: calc(100% + 0.5rem);
  left: auto;
  display: grid;
  width: max-content;
  max-width: min(15rem, 50vw);
  transform: translate(0.5rem, -50%);
  opacity: 0;
  pointer-events: none;
  text-align: right;
  transition: opacity 180ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.jukebox.is-open .jukebox__selector {
  transform: translate(0, -50%);
  opacity: 1;
  pointer-events: auto;
}

.jukebox:not(.is-docked-left) .jukebox__selector {
  right: calc(100% + 0.5rem);
}

.jukebox:not(.is-docked-left).is-open .jukebox__selector {
  transform: translate(0, -50%);
}

.jukebox.is-docked-left .jukebox__selector {
  right: auto;
  left: calc(100% + 0.5rem);
  transform: translate(-0.5rem, -50%);
  text-align: left;
}

.jukebox.is-docked-left.is-open .jukebox__selector {
  transform: translate(0, -50%);
}

.jukebox.is-reordering .jukebox__selector {
  opacity: 0;
  pointer-events: none;
  transform: translate(0, -50%) scale(0.96);
}

.jukebox__option {
  overflow: hidden;
  min-height: 1.35rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.56rem;
  line-height: 1.35rem;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 160ms ease, transform 180ms ease;
}

.jukebox__option.is-previous,
.jukebox__option.is-next {
  opacity: 0.35;
}

.jukebox__option.is-current {
  font-size: 0.66rem;
  opacity: 1;
}

.jukebox__option:hover,
.jukebox__option:focus-visible {
  opacity: 1;
  outline: none;
  transform: translateX(0.25rem);
}

.jukebox__vinyl {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: calc(var(--jukebox-selector-width) + 5.1rem);
  left: auto;
  display: grid;
  width: 9rem;
  height: 9rem;
  place-items: center;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #233452 0 1px, #111c30 2px 4px);
  box-shadow: 0.35rem 0.7rem 1.5rem rgb(29 42 68 / 18%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.72) rotate(-20deg);
  transition: opacity 180ms ease, left 480ms cubic-bezier(0.22, 1, 0.36, 1), transform 460ms cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="dark"] .jukebox__vinyl {
  background: repeating-radial-gradient(circle, #927540 0 1px, #2d2518 2px 4px);
  box-shadow: 0.35rem 0.7rem 1.5rem rgb(0 0 0 / 38%);
}

.jukebox.is-docked-left .jukebox__vinyl {
  right: auto;
  left: calc(100% + var(--jukebox-selector-width) + 2.3rem);
}

.jukebox__vinyl::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--paper);
  content: "";
  transform: translate(-50%, -50%);
}

.jukebox__vinyl img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5.8rem;
  height: 5.8rem;
  border-radius: 50%;
  object-fit: cover;
  transform: translate(-50%, -50%);
}

.jukebox.is-open .jukebox__vinyl {
  opacity: 1;
  transform: translateY(-50%) scale(1) rotate(0deg);
}

.jukebox.is-open.is-playing:not(.is-switching):not(.is-reordering) .jukebox__vinyl {
  animation: vinyl-spin 4.8s linear infinite;
}

@keyframes vinyl-spin {
  to {
    transform: translateY(-50%) scale(1) rotate(360deg);
  }
}

.jukebox.is-reordering .jukebox__vinyl {
  opacity: 0;
  transform: translateY(-50%) scale(0.68) rotate(36deg);
}

.jukebox.is-reordering .jukebox__handle span {
  animation: jukebox-reorder 210ms ease-in-out;
}

@keyframes jukebox-reorder {
  50% {
    transform: rotate(45deg) scale(0.8);
    opacity: 0.45;
  }
}

.jukebox.is-switching .jukebox__vinyl {
  animation: vinyl-switch 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

.jukebox.is-switching .jukebox__vinyl img {
  animation: cover-switch 560ms ease-in-out;
}

.jukebox.is-switching-next .jukebox__option {
  animation: track-list-next 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

.jukebox.is-switching-previous .jukebox__option {
  animation: track-list-previous 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes vinyl-switch {
  0% {
    opacity: 1;
    transform: translateY(-50%) translateX(0) rotate(0deg) scale(1);
  }

  42% {
    opacity: 0.08;
    transform: translateY(-50%) translateX(-1.7rem) rotate(170deg) scale(0.58);
  }

  58% {
    opacity: 0.08;
    transform: translateY(-50%) translateX(1rem) rotate(215deg) scale(0.58);
  }

  100% {
    opacity: 1;
    transform: translateY(-50%) translateX(0) rotate(360deg) scale(1);
  }
}

@keyframes cover-switch {
  0%,
  35% {
    opacity: 1;
  }

  50% {
    opacity: 0.08;
  }

  65%,
  100% {
    opacity: 1;
  }
}

@keyframes track-list-next {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  48% {
    opacity: 0;
    transform: translateY(-0.8rem);
  }

  52% {
    opacity: 0;
    transform: translateY(0.8rem);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes track-list-previous {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  48% {
    opacity: 0;
    transform: translateY(0.8rem);
  }

  52% {
    opacity: 0;
    transform: translateY(-0.8rem);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.intro-heading {
  display: flex;
  align-items: flex-end;
  gap: clamp(1rem, 3vw, 2rem);
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.045em;
}

h1 {
  font-size: clamp(3.35rem, 10vw, 5rem);
  line-height: 0.95;
  white-space: nowrap;
}

.title-letter {
  display: inline-block;
}

.js-enhanced .title-letter {
  animation: title-arrival 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--letter-index) * 35ms + 100ms);
}

@keyframes title-arrival {
  from {
    opacity: 0;
    transform: translateY(0.22em);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mascot-holo {
  --mascot-rotate-x: 0deg;
  --mascot-rotate-y: 0deg;
  --holo-x: 50%;
  --holo-y: 50%;
  --holo-shift-x: 0px;
  --holo-shift-y: 0px;
  --holo-secondary-x: 0px;
  --holo-secondary-y: 0px;
  --holo-color-x: 50%;
  --holo-color-y: 50%;
  --holo-light-x: 50%;
  --holo-light-y: 50%;
  --mascot-surface-brightness: 1;
  --holo-hue: 0deg;
  --holo-brightness: 1;
  --holo-glint: 0;
  position: relative;
  flex: 0 0 auto;
  width: clamp(7.75rem, 18vw, 12.5rem);
  perspective: 24rem;
  transform: perspective(24rem) rotateX(var(--mascot-rotate-x)) rotateY(var(--mascot-rotate-y));
  transform-style: preserve-3d;
  will-change: transform;
}

.mascot {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  object-fit: contain;
  transition: filter 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="dark"] .mascot {
  filter: brightness(0) saturate(100%) invert(93%) sepia(13%) saturate(352%) hue-rotate(346deg) brightness(105%) contrast(95%);
}

.mascot-holo::before,
.mascot-holo::after {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateZ(0.5rem);
  transition: opacity 260ms ease;
  -webkit-mask-image: url("assets/mascot.png");
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-image: url("assets/mascot.png");
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.mascot-holo::before {
  display: block;
  background: radial-gradient(ellipse 50% 62% at var(--holo-light-x) var(--holo-light-y), rgb(238 251 255 / 0.26) 0%, rgb(160 222 255 / 0.13) 46%, transparent 78%);
  filter: blur(0.35px);
  mix-blend-mode: screen;
}

.mascot-holo::after {
  display: none;
}

.mascot-cosmos {
  position: absolute;
  z-index: 2;
  inset: 0;
  background-image: url("assets/holo-mask.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 145% auto;
  filter: brightness(var(--holo-brightness)) contrast(1.16);
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  transform: translateZ(0.75rem);
  transition: opacity 380ms cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-mask-image: url("assets/mascot.png");
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-image: url("assets/mascot.png");
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.mascot-cosmos::after {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 16% 22% at var(--holo-light-x) var(--holo-light-y), rgb(255 255 255 / 0.92) 0%, rgb(195 240 255 / 0.44) 38%, transparent 75%);
  content: "";
  mix-blend-mode: screen;
  opacity: 0.32;
  pointer-events: none;
  animation: cosmos-twinkle 1.8s ease-in-out infinite alternate;
  -webkit-mask-image: url("assets/holo-alpha.png");
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 145% auto;
  mask-image: url("assets/holo-alpha.png");
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: 145% auto;
}

.mascot-cosmos::before {
  display: none;
}

canvas.mascot-cosmos {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
  filter: none;
  mix-blend-mode: normal;
  -webkit-mask-image: url("assets/mascot.png");
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-image: url("assets/mascot.png");
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.mascot-holo.is-hovered .mascot-cosmos {
  opacity: 1;
}



.mascot-holo.is-hovered::before {
  opacity: 0.14;
}

.mascot-holo.is-hovered .mascot {
  filter: brightness(var(--mascot-surface-brightness)) saturate(1.04) contrast(1.02);
}

@keyframes cosmos-twinkle {
  from {
    opacity: 0.2;
    transform: scale(0.96);
  }

  to {
    opacity: 0.38;
    transform: scale(1.04);
  }
}

:root[data-theme="dark"] .mascot-holo.is-hovered .mascot {
  filter: brightness(0) saturate(100%) invert(93%) sepia(13%) saturate(352%) hue-rotate(346deg) brightness(105%) contrast(95%) brightness(var(--mascot-surface-brightness));
}

.intro-copy {
  max-width: 100%;
  margin: 2.75rem auto 0;
  font-family: "Space Mono", "Courier New", monospace;
  font-size: clamp(0.7rem, 1.25vw, 0.82rem);
  line-height: 1.55;
  text-align: center;
}

.intro-copy p + p {
  margin-top: 1.15rem;
}

.birthday-age {
  color: var(--accent);
  background: linear-gradient(
    110deg,
    var(--accent) 0%,
    var(--accent) 42%,
    #fff9e7 50%,
    var(--accent) 58%,
    var(--accent) 100%
  );
  background-position: 100% 0;
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
  text-decoration: none;
  animation: birthday-glow 1.8s ease-in-out infinite alternate, birthday-shine 4.8s ease-in-out infinite;
}

.age-unit {
  position: relative;
  display: inline-block;
}

.age-number {
  position: relative;
  display: inline-block;
}

.age-number.is-ticking {
  animation: age-number-flash 500ms ease-out;
}

:root[data-theme="dark"] .age-number.is-ticking {
  animation-name: age-number-flash-dark;
}

.age-number.is-ticking::before {
  position: absolute;
  top: -0.42em;
  left: 50%;
  width: 2px;
  height: 0.22em;
  background: var(--accent);
  box-shadow: -0.5em 0.2em 0 var(--accent), 0.5em 0.2em 0 var(--accent), -0.25em -0.08em 0 var(--accent), 0.25em -0.08em 0 var(--accent);
  content: "";
  opacity: 0;
  transform: translateX(-50%) scaleY(0.45);
  animation: age-spark 480ms ease-out;
}

.age-rainbow-letter {
  display: inline-block;
  animation: age-rainbow-wave 760ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(600ms + var(--age-wave-index) * 56ms);
}

@keyframes age-number-flash {
  0%,
  45% {
    color: #fff9e7;
    text-shadow: 0 0 0.35rem color-mix(in srgb, var(--accent) 80%, transparent);
  }

  100% {
    color: var(--ink);
    text-shadow: none;
  }
}

@keyframes age-number-flash-dark {
  0%,
  45% {
    color: var(--paper);
    text-shadow: 0 0 0.35rem color-mix(in srgb, var(--accent) 85%, transparent);
  }

  100% {
    color: var(--ink);
    text-shadow: none;
  }
}

@keyframes age-spark {
  30% {
    opacity: 1;
    transform: translateX(-50%) translateY(-0.16em) scaleY(1);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-0.34em) scaleY(0.5);
  }
}

@keyframes age-rainbow-wave {
  0% {
    color: hsl(var(--age-wave-hue) 100% 62%);
    opacity: 0.35;
    text-shadow: 0 0 0.24rem hsl(var(--age-wave-hue) 100% 62% / 45%);
    transform: translateY(0.16em);
  }

  40% {
    color: hsl(var(--age-wave-hue) 100% 62%);
    opacity: 1;
    text-shadow: 0 0 0.3rem hsl(var(--age-wave-hue) 100% 62% / 55%);
    transform: translateY(-0.27em);
  }

  100% {
    color: var(--ink);
    opacity: 1;
    text-shadow: none;
    transform: translateY(0);
  }
}

.accent-note {
  color: var(--accent);
  background: linear-gradient(
    110deg,
    var(--accent) 0%,
    var(--accent) 42%,
    #fff9e7 50%,
    var(--accent) 58%,
    var(--accent) 100%
  );
  background-position: 100% 0;
  background-size: 280% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  animation: birthday-glow 2.1s ease-in-out infinite alternate, birthday-shine 5.8s ease-in-out infinite;
}

@keyframes birthday-glow {
  from {
    text-shadow: 0 0 0.15rem color-mix(in srgb, var(--accent) 24%, transparent);
  }

  to {
    text-shadow: 0 0 0.5rem color-mix(in srgb, var(--accent) 45%, transparent);
  }
}

@keyframes birthday-shine {
  0%,
  55% {
    background-position: 100% 0;
  }

  75%,
  100% {
    background-position: 0 0;
  }
}

.birthday-bubble {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.66rem;
  line-height: 1.25;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(calc(var(--bubble-x, 0px) + 1rem), calc(var(--bubble-y, 0px) + 1rem), 0) scale(0.86);
  transform-origin: top left;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.birthday-bubble:not(.is-ready) {
  transition: none;
}

.birthday-bubble.is-visible {
  opacity: 1;
  transform: translate3d(calc(var(--bubble-x, 0px) + 1rem), calc(var(--bubble-y, 0px) + 1rem), 0) scale(1);
}

.birthday-bubble-letter {
  display: inline-block;
  white-space: pre;
}

.birthday-bubble.is-visible.is-waving .birthday-bubble-letter {
  animation: birthday-wave 3.6s ease-in-out infinite;
  animation-delay: calc(var(--letter-index) * 42ms);
}

.letter-shake {
  display: inline-block;
  animation: letter-shake 460ms ease-in-out;
}

@keyframes letter-shake {
  0%,
  100% {
    transform: translate(0) rotate(0);
  }

  25% {
    transform: translate(var(--shake-x), var(--shake-y)) rotate(var(--shake-rotation));
  }

  50% {
    transform: translate(var(--shake-x-alt), var(--shake-y-alt)) rotate(var(--shake-rotation-alt));
  }

  75% {
    transform: translate(var(--shake-x-end), var(--shake-y-end)) rotate(var(--shake-rotation-end));
  }
}

@keyframes birthday-wave {
  0%,
  6%,
  18%,
  100% {
    transform: translateY(0);
  }

  12% {
    transform: translateY(-0.16rem);
  }
}

.content-section {
  margin-top: clamp(3.8rem, 9vw, 6.5rem);
}

h2 {
  font-size: clamp(2rem, 4.6vw, 2.85rem);
  line-height: 1;
}

.entry-list {
  padding: 0;
  margin: 1.55rem 0 0;
  list-style: none;
  border-top: 0;
}

.entry-item {
  transition: opacity 220ms ease var(--domino-delay, 0ms);
}

.portfolio:has(.entry:hover) .entry-item,
.portfolio:has(.entry-item.is-open) .entry-item {
  opacity: 0.35;
}

.portfolio:has(.entry:hover) .entry-item:has(.entry:hover),
.portfolio:has(.entry-item.is-open) .entry-item.is-open {
  opacity: 1;
}

.entry {
  display: grid;
  width: 100%;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.35rem 0;
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.74rem;
  line-height: 1.35;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.entry {
  transition: background-color 160ms ease, color 160ms ease, padding 160ms ease;
}

.entry:hover,
.entry:focus-visible,
.entry-item.is-open .entry {
  padding-right: 0.7rem;
  padding-left: 0.7rem;
  color: var(--paper);
  background: var(--ink);
  outline: none;
}

.entry:hover .entry-year,
.entry:focus-visible .entry-year,
.entry-item.is-open .entry-year {
  color: var(--paper);
}

.entry-detail {
  display: grid;
  grid-template-rows: 0fr;
  padding: 0 0.7rem;
  overflow: hidden;
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.72rem;
  line-height: 1.55;
  opacity: 0;
  transition: grid-template-rows 300ms ease, padding 300ms ease, opacity 200ms ease;
}

.entry-detail p {
  min-height: 0;
  overflow: hidden;
}

.entry-link {
  display: block;
  width: fit-content;
  margin-top: 0.72rem;
  color: var(--ink);
  font-size: 0.68rem;
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24rem;
  transition: color 360ms ease, opacity 360ms ease, text-decoration-color 360ms ease;
}

.entry-link,
.contact-list a {
  position: relative;
}

.entry-link:hover,
.entry-link:focus-visible {
  outline: none;
  color: var(--accent);
  opacity: 0.72;
  text-decoration-color: currentColor;
}

.entry-item.is-open .entry-detail {
  grid-template-rows: 1fr;
  padding-top: 0.8rem;
  padding-bottom: 1rem;
  opacity: 0.78;
}

.contact-section {
  padding-bottom: 1.5rem;
}

.contact-copy {
  margin: 1.55rem 0 0;
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.72rem;
  line-height: 1.55;
  opacity: 0.72;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.7rem;
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.72rem;
}

.contact-list a {
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24rem;
  transition: color 360ms ease, text-decoration-color 360ms ease;
}

.contact-list .accent-note {
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 62%, transparent);
}

.contact-list a:hover,
.contact-list a:focus-visible {
  color: var(--accent);
  outline: none;
  text-decoration-color: currentColor;
}

.entry-year {
  color: var(--ink);
  white-space: nowrap;
}

.scroll-progress {
  position: fixed;
  z-index: 5;
  top: 1.5rem;
  right: 1.25rem;
  width: 2px;
  height: min(var(--scroll-progress, 0%), calc(100vh - 3rem));
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.7;
  transition: height 120ms ease-out;
}

.js-enhanced .music,
.js-enhanced .intro,
.js-enhanced .content-section {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.js-enhanced .music.is-visible,
.js-enhanced .intro.is-visible,
.js-enhanced .content-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 560px) {
  .music {
    top: 0;
    padding-top: 2.6rem;
    margin-bottom: 1.75rem;
  }

  .music::before {
    opacity: 0.98;
    transform: none;
  }

  .theme-toggle {
    --theme-toggle-offset-y: 0;
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 1rem);
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  .theme-toggle:hover,
  .theme-toggle:focus-visible {
    transform: translateX(-50%) rotate(12deg) scale(1.08);
  }

  .theme-toggle.is-changing {
    animation-name: theme-toggle-pop-mobile;
  }

  .portfolio {
    width: min(100% - 2rem, 38rem);
  }

  h1 {
    white-space: normal;
  }

  .mascot-holo {
    flex: 0 0 auto;
    width: clamp(5.75rem, 25vw, 7rem);
    margin-top: 0;
  }

  .entry {
    grid-template-columns: 3.1rem minmax(0, 1fr) auto;
    gap: 0.35rem;
  }

  .entry-name {
    overflow-wrap: anywhere;
  }

  .now-playing__wave {
    display: none;
  }

  .jukebox__selector {
    width: min(10rem, 58vw);
  }

  .jukebox__vinyl {
    display: none;
  }
}

@media (max-width: 420px) {
  .portfolio {
    width: min(100% - 1.35rem, 38rem);
    padding-top: 1.15rem;
  }

  .intro-heading {
    gap: 0.7rem;
  }

  h1 {
    font-size: clamp(2.7rem, 14vw, 3.35rem);
    line-height: 0.88;
  }

  .intro-copy {
    margin-top: 2rem;
    font-size: 0.69rem;
    line-height: 1.6;
  }

  .entry {
    grid-template-columns: 2.75rem minmax(0, 1fr);
    gap: 0.12rem 0.35rem;
    padding-top: 0.48rem;
    padding-bottom: 0.48rem;
  }

  .entry-number {
    grid-row: span 2;
  }

  .entry-year {
    grid-column: 2;
    justify-self: start;
  }

  .entry-detail {
    padding-right: 0.35rem;
    padding-left: 0.35rem;
    font-size: 0.68rem;
  }

  .now-playing {
    grid-template-areas:
      "info toggle"
      "time time";
    grid-template-columns: minmax(0, 1fr) 2.8rem;
    gap: 0.32rem 0.45rem;
    padding-bottom: 0.3rem;
  }

  .now-playing__time {
    font-size: 0.62rem;
  }

  .contact-list {
    gap: 0.7rem;
  }

  .scroll-progress {
    right: 0.55rem;
  }
}

@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  .js-enhanced .music {
    transform: none;
  }

  .js-enhanced .music.is-visible {
    transform: none;
  }

  .music {
    top: 0;
    padding-top: 2.6rem;
  }

  .music::before {
    opacity: 0.98;
    transform: none;
  }

  .theme-toggle {
    --theme-toggle-offset-y: 0;
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 1rem);
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  .theme-toggle:hover,
  .theme-toggle:focus-visible {
    transform: translateX(-50%) rotate(12deg) scale(1.08);
  }

  .theme-toggle.is-changing {
    animation-name: theme-toggle-pop-mobile;
  }

  .jukebox {
    display: none;
  }

  .now-playing {
    grid-template-areas:
      "info info toggle"
      "previous time next";
    grid-template-columns: 2.65rem minmax(0, 1fr) 2.65rem;
    gap: 0.4rem 0.55rem;
    padding-bottom: 0.35rem;
  }

  .now-playing__skip {
    display: block;
    min-height: 2rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-family: "Space Mono", "Courier New", monospace;
    font-size: 0.62rem;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent);
    text-underline-offset: 0.23rem;
  }

  #track-previous {
    grid-area: previous;
    text-align: left;
  }

  #track-next {
    grid-area: next;
    text-align: right;
  }

  .now-playing__time {
    align-self: center;
    text-align: center;
  }

  .mascot-holo.is-hovered .mascot-cosmos {
    opacity: 0.95;
  }

  .mascot-holo.is-hovered::before {
    opacity: 0.3;
  }

  .entry:hover {
    color: inherit;
    background: transparent;
  }
}

@keyframes theme-toggle-pop-mobile {
  from,
  to {
    transform: translateX(-50%);
  }

  50% {
    transform: translateX(-50%) scale(0.78) rotate(-16deg);
  }
}

@media (max-height: 560px) and (min-width: 561px) {
  .portfolio {
    padding-top: 1.25rem;
  }

  .music {
    margin-bottom: 1.5rem;
  }

  .jukebox {
    top: auto;
    bottom: 1rem;
    transform: none;
  }
}
