@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/fonts/unbounded-900.woff2') format('woff2');
}

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

:root {
  --bg: #000;
  --text: #c8d8e8;
  --muted: #8aa0b2;
  --dim: #526575;
  --white: #fff;
  --accent: #ffab5e;
  --rule: #1b232b;
  --grad: linear-gradient(90deg,
    rgb(255,224,138), rgb(255,171,94), rgb(255,95,109),
    rgb(200,75,214), rgb(255,95,109), rgb(255,171,94), rgb(255,224,138));
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(14px, 1.5vw, 15px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 9vw, 4.5rem) clamp(1.5rem, 6vw, 2rem) clamp(5rem, 12vw, 7rem);
}

.sec {
  margin-top: 2.25rem;
}

.sec__label,
.top__head,
.badges__label {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.7rem;
}

.sec:has(.np:empty),
.sec:has(.top:empty),
.sec:has(.badges:empty) { display: none; }

.version {
  display: block;
  margin-top: 3rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--dim);
  user-select: none;
  pointer-events: none;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}
a:hover { color: var(--white); }

.wordmark {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  line-height: 1;
  letter-spacing: -0.03em;
  background: var(--grad);
  background-size: 200% 100%;
  background-position: 18% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: background-position 0.6s ease;
  margin-bottom: 0.9rem;
  user-select: none;
  display: inline-block;
  padding-right: 0.06em;
}

.wordmark:hover { background-position: 78% 50%; }

.wordmark--sm {
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  margin-bottom: 1.6rem;
}

@keyframes ombre {
  from { background-position: 0% 50%; }
  to   { background-position: 200% 50%; }
}

.pagenav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.5rem;
  margin-bottom: 1.1rem;
}

.pagenav a {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 400;
  font-size: 1em;
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  transition: color 0.18s ease;
}

.pagenav a:hover,
.pagenav a:focus-visible { color: var(--accent); }
.pagenav a:hover .arw,
.pagenav a:focus-visible .arw { color: var(--accent); }

.pagenav .arw {
  display: inline-block;
  color: var(--muted);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.pagenav a:hover .arw { transform: translateX(0.3em); }
.pagenav a:hover .arw--out { transform: translate(0.22em, -0.22em); }

.pagenav--back {
  margin-bottom: 2.2rem;
}

.pagenav--back a {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 400;
  font-size: 0.85em;
  color: var(--muted);
}

.pagenav--back a:hover .arw { transform: translateX(-0.3em); }

.bio {
  color: var(--muted);
  margin-bottom: 0;
  max-width: 42ch;
}

.projects {
  margin-bottom: 3rem;
}

.project {
  border-top: 1px solid var(--dim);
}
.project:last-of-type {
  border-bottom: 1px solid var(--dim);
}

.project summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  min-height: 48px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  outline: none;
}
.project summary:focus-visible {
  outline: 2px solid var(--muted);
  outline-offset: 4px;
}
.project summary::-webkit-details-marker { display: none; }

.project__name {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: 1em;
  letter-spacing: -0.02em;
  color: var(--white);
  transition: color 0.18s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: left center;
  display: inline-block;
  -webkit-background-clip: text;
  background-clip: text;
  background-size: 200% 100%;
}

.project summary:hover .project__name,
.project summary:focus-visible .project__name,
.project[open] .project__name {
  color: transparent;
  background-image: linear-gradient(90deg, var(--ca), var(--cb));
}

.project summary:hover .project__name,
.project summary:focus-visible .project__name {
  transform: scale(1.1);
}

.project__tag {
  font-size: 0.78em;
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.project summary:hover .project__tag,
.project[open] summary .project__tag {
  transform: translateX(0.55em);
}

.project__toggle {
  color: var(--dim);
  font-size: 1.1em;
  font-weight: 400;
  flex-shrink: 0;
  transition: color 0.18s ease;
  width: 1em;
  text-align: right;
}
.project summary:hover .project__toggle { color: var(--muted); }

.project__body {
  font-size: 0.82em;
  color: var(--muted);
  line-height: 1.75;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.38s cubic-bezier(0.16, 1, 0.3, 1), padding 0.38s ease;
  padding: 0;
}
.project[open] .project__body {
  max-height: none;
  padding-bottom: 1rem;
}
.project__body a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.project__body a:hover { color: var(--white); }
.project__meta {
  color: var(--dim);
  margin-top: 0.35rem;
  font-size: 0.9em;
}

.project__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: 0.5rem;
}
.project__link {
  display: inline-block;
}

.contact-links {
  display: flex;
  flex-direction: row;
  gap: 1.2rem;
  align-items: center;
  margin-top: 0.9rem;
}

.contact-links a {
  display: inline-flex;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
  touch-action: manipulation;
  padding: 0.25rem;
  margin: -0.25rem;
}
.contact-links a:hover { color: var(--white); }
.contact-links svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
  display: block;
}

.error-screen {
  color: var(--muted);
  font-size: 0.82em;
}

.rings {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}
.rings .webrings,
.rings .bonkiring,
.rings .onlinering { margin: 0; }

.webrings {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.webring__name a {
  text-decoration: none;
  color: var(--muted);
  letter-spacing: 0.03em;
  transition: color 0.18s ease;
}
.webring__name a:hover { color: var(--white); }

.webring__nav {
  display: inline-flex;
  color: var(--muted);
  text-decoration: none;
  font-size: 1em;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), color 0.18s ease;
  padding: 0.1rem 0.15rem;
}
.webring__nav:hover { color: var(--white); }
.webring__nav--prev:hover { transform: translateX(-0.25em); }
.webring__nav--next:hover { transform: translateX(0.25em); }


.np {
  width: 100%;
  max-width: 22rem;
  margin-bottom: 0;
  border: 1px solid var(--dim);
  background: #05090d;
}
.np:empty { display: none; }

.np__body {
  display: flex;
  gap: 0.7rem;
  padding: 0.65rem;
}

.np__art {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  display: block;
  object-fit: cover;
  border: 1px solid var(--dim);
  border-radius: 4px;
  background: var(--dim);
}
.np__art--none { background: linear-gradient(145deg, #1b2733, #0b141c); }

.np__meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.05rem;
}
.np__title {
  color: var(--white);
  font-size: 0.85em;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.np__artist {
  color: var(--muted);
  font-size: 0.78em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.np__foot {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.3rem;
  font-size: 0.72em;
}
.np__tx {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  color: var(--muted);
  flex-shrink: 0;
}
.np__tx svg { display: block; }
.np__dur { color: var(--muted); white-space: nowrap; }
.np__ago { color: var(--dim); white-space: nowrap; }

.np__src {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.np__src:hover { color: var(--white); }
.np__logo {
  width: 0.95em;
  height: 0.95em;
  fill: #1ed760;
  flex-shrink: 0;
  display: block;
}

.np__prog {
  height: 2px;
  background: #0d1720;
}
.np__prog-fill {
  height: 2px;
  background: linear-gradient(90deg, rgb(255,224,138), rgb(255,171,94), rgb(255,95,109));
}

.top {
  width: 100%;
  margin-bottom: 0;
}
.top__head {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.7rem;
}
.top__range {
  color: var(--dim);
  letter-spacing: 0.06em;
}

.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: 3px;
  aspect-ratio: 4 / 3;
  width: 100%;
  max-width: 268px;
}
.mosaic__cell {
  position: relative;
  display: block;
  overflow: hidden;
  min-width: 0;
  background: rgba(255, 255, 255, 0.04);
}
.mosaic__cell--xl {
  grid-column: span 2;
  grid-row: span 2;
}
.mosaic__cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  filter: saturate(0.7) brightness(0.82);
  transition: filter 0.18s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.mosaic__cell:hover img,
.mosaic__cell:focus-visible img {
  filter: none;
  transform: scale(1.08);
}

.mosaic__caps {
  position: relative;
  margin-top: 0.5rem;
  min-height: 1.35em;
  font-size: 0.78rem;
}
.mosaic__cap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  opacity: 0;
  transition: opacity 0.14s ease;
  pointer-events: none;
  white-space: nowrap;
}
.mosaic__rank {
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.mosaic__title {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}
.mosaic__artist {
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.mosaic__cap:first-child { opacity: 1; }

@supports selector(:has(*)) {
  .top:has(.mosaic__cell:hover) .mosaic__cap,
  .top:has(.mosaic__cell:focus-visible) .mosaic__cap { opacity: 0; }
  .top:has(.mosaic__cell:nth-child(1):hover) .mosaic__cap:nth-child(1),
  .top:has(.mosaic__cell:nth-child(1):focus-visible) .mosaic__cap:nth-child(1),
  .top:has(.mosaic__cell:nth-child(2):hover) .mosaic__cap:nth-child(2),
  .top:has(.mosaic__cell:nth-child(2):focus-visible) .mosaic__cap:nth-child(2),
  .top:has(.mosaic__cell:nth-child(3):hover) .mosaic__cap:nth-child(3),
  .top:has(.mosaic__cell:nth-child(3):focus-visible) .mosaic__cap:nth-child(3),
  .top:has(.mosaic__cell:nth-child(4):hover) .mosaic__cap:nth-child(4),
  .top:has(.mosaic__cell:nth-child(4):focus-visible) .mosaic__cap:nth-child(4),
  .top:has(.mosaic__cell:nth-child(5):hover) .mosaic__cap:nth-child(5),
  .top:has(.mosaic__cell:nth-child(5):focus-visible) .mosaic__cap:nth-child(5),
  .top:has(.mosaic__cell:nth-child(6):hover) .mosaic__cap:nth-child(6),
  .top:has(.mosaic__cell:nth-child(6):focus-visible) .mosaic__cap:nth-child(6),
  .top:has(.mosaic__cell:nth-child(7):hover) .mosaic__cap:nth-child(7),
  .top:has(.mosaic__cell:nth-child(7):focus-visible) .mosaic__cap:nth-child(7),
  .top:has(.mosaic__cell:nth-child(8):hover) .mosaic__cap:nth-child(8),
  .top:has(.mosaic__cell:nth-child(8):focus-visible) .mosaic__cap:nth-child(8),
  .top:has(.mosaic__cell:nth-child(9):hover) .mosaic__cap:nth-child(9),
  .top:has(.mosaic__cell:nth-child(9):focus-visible) .mosaic__cap:nth-child(9) { opacity: 1; }
}

.bonkiring {
  margin-top: 0;
}
.bonkiring .bonkiringdiv {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  width: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0;
  background: none !important;
  background-image: none !important;
  cursor: auto !important;
}
.bonkiring .bonkiringdiv a,
.bonkiring .bonkiringdiv p {
  font-family: 'JetBrains Mono', ui-monospace, monospace !important;
  font-size: 0.8em !important;
  cursor: pointer !important;
}

.onlinering {
  margin-top: 0;
}
.onlinering img {
  display: block;
  width: 200px;
  height: 40px;
  max-width: none;
  image-rendering: pixelated;
}

.badges {
  position: relative;
  width: 100%;
  margin-top: 0;
}
.badges:empty { display: none; }

.badges__label {
  display: block;
  transition: opacity 0.15s ease;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.7rem;
}


.badges__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 90px);
  gap: 6px;
  justify-content: start;
}

.badge {
  display: block;
  line-height: 0;
  outline: none;
}
.badge:focus-visible {
  outline: 2px solid var(--muted);
  outline-offset: 4px;
}

.badge__img {
  box-sizing: content-box;
  width: 88px;
  height: 31px;
  display: block;
  image-rendering: pixelated;
  border: 1px solid var(--dim);
  opacity: 0.68;
  filter: saturate(0.7);
  transition: opacity 0.18s ease, filter 0.18s ease, border-color 0.18s ease,
              transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.badge:hover .badge__img,
.badge:focus-visible .badge__img {
  opacity: 1;
  filter: none;
  border-color: var(--muted);
  transform: translateY(-2px);
}

.badge__img--still { display: none; }

.badge[data-label]::after {
  content: attr(data-label);
  content: attr(data-label) / "";
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  white-space: nowrap;
  font-size: 0.78em;
  line-height: inherit;
  letter-spacing: 0.03em;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.badge[data-label]:hover::after,
.badge[data-label]:focus-visible::after { opacity: 1; }

@supports selector(:has(*)) {
  .badge[data-label]::after { left: 0; right: auto; }
  .badges__grid:has(.badge:hover) .badge:not(:hover) .badge__img,
  .badges__grid:has(.badge:focus-visible) .badge:not(:focus-visible) .badge__img {
    opacity: 0.25;
    filter: saturate(0.35) blur(1px);
  }
  .badges:has(.badge[data-label]:hover) .badges__label,
  .badges:has(.badge[data-label]:focus-visible) .badges__label { opacity: 0; }
}

@media (max-width: 560px) {
  .project summary { gap: 0.5rem; }
  .project__tag { white-space: normal; line-height: 1.35; }
  .mosaic__cap { white-space: normal; }

  .contact-links svg { width: 1.4rem; height: 1.4rem; }

  .np { max-width: none; }
  .badges__grid { gap: 5px; }
  .wordmark { margin-bottom: 2rem; }
  .bio { margin-bottom: 2rem; }
  .np { margin-bottom: 2rem; }
  .pagenav { margin-bottom: 1.8rem; }
  .rings {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}
.rings .webrings,
.rings .bonkiring,
.rings .onlinering { margin: 0; }

.webrings { margin-top: 2.2rem; }
}

@media (max-width: 420px) {
  .project summary { align-items: flex-start; }
  .project__name { max-width: 45%; }
  .project__toggle { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .wordmark { transition: none; }
  .project__name,
  .project__body,
  .badge__img,
  .webring__nav { transition: none; }
  .project__body { max-height: none; padding-bottom: 1rem; }
  .badge:hover .badge__img,
  .badge:focus-visible .badge__img { transform: none; }
  .badge__img--moving { display: none; }
  .badge__img--still { display: block; }
}
