@font-face {
  font-family: "VCR OSD Mono";
  src: url("assets/fonts/VCR_OSD_MONO_1.001.woff2") format("woff2"),
       url("assets/fonts/VCR_OSD_MONO_1.001.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #161513;
  --text: #d9d2c5;
  --muted: #a39a8b;
  --accent: #cf8f5f;
  --accent-bright: #e5a97a;
  --line: rgba(217, 210, 197, 0.13);
  --line-strong: rgba(217, 210, 197, 0.28);
  --heading: #f2ead9;
  --surface: #1b1916;
  --surface-2: #221f1b;
  --frame: #100f0d;
  --backdrop: rgba(19, 18, 16, 0.94);
  --selection: rgba(207, 143, 95, 0.28);
  --img-line: rgba(217, 210, 197, 0.14);
  --img-shadow: rgba(0, 0, 0, 0.5);
  --vinyl: #0c0b09;
  --vinyl-band: #1b1917;
  --vinyl-band-2: #181614;
  --groove-line: rgba(240, 233, 221, 0.06);
  --groove-lip: rgba(240, 233, 221, 0.24);
  --sheen: rgba(255, 250, 240, 0.19);
  --sheen-soft: rgba(255, 250, 240, 0.07);
  --label-a: color-mix(in srgb, var(--accent) 86%, var(--vinyl));
  --label-b: color-mix(in srgb, var(--accent) 68%, var(--vinyl));
}

html.light {
  --bg: #ebe5d8;
  --text: #453f34;
  --muted: #695f4e;
  --accent: #b0642f;
  --accent-bright: #8f4c1d;
  --line: rgba(58, 52, 42, 0.18);
  --line-strong: rgba(58, 52, 42, 0.34);
  --heading: #2c2720;
  --surface: #e2dbcc;
  --surface-2: #d9d1c0;
  --frame: #dcd5c5;
  --backdrop: rgba(235, 229, 216, 0.94);
  --selection: rgba(176, 100, 47, 0.28);
  --img-line: rgba(58, 52, 42, 0.2);
  --img-shadow: rgba(58, 46, 30, 0.22);
  --vinyl: #17130f;
  --vinyl-band: #241f1a;
  --vinyl-band-2: #201b17;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
  color-scheme: dark;
}

html.light {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "VCR OSD Mono", "Courier New", monospace;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.veil {
  position: fixed;
  inset: 0;
  background: var(--surface);
  transform: translateX(calc(-100% - 2px));
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 20;
  pointer-events: none;
}

.veil.is-dragging {
  transition: none;
}

.veil.is-covering {
  transform: translateX(0);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

html.veil-arrive .veil {
  transform: translateX(0);
  transition: none;
}

html.veil-arrive.veil-leave .veil {
  transform: translateX(calc(100% + 2px));
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.pull-tab {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: none;
  border-radius: 0 4px 4px 0;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  touch-action: none;
  z-index: 19;
  transition: color 0.3s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.pull-tab.is-dragging {
  transition: color 0.3s ease;
}

.pull-tab.is-hidden {
  opacity: 0;
}

.pull-tab:hover {
  color: var(--accent-bright);
}

.pull-tab:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.pull-tab svg {
  width: 0.85rem;
  height: 0.85rem;
}

.pull-tab.is-back svg {
  transform: rotate(180deg);
}

.theme-toggle {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.875rem, env(safe-area-inset-right));
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  z-index: 6;
  transform: rotate(-4deg);
  transition: color 0.3s ease, transform 0.3s ease;
}

.theme-toggle:hover {
  color: var(--accent-bright);
  transform: rotate(3deg) scale(1.06);
}

.theme-toggle:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.theme-toggle img {
  position: absolute;
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
  opacity: 0.8;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

html.light .theme-toggle img {
  filter: invert(1);
}

.theme-toggle:hover .icon-sun {
  opacity: 1;
}

html.light .theme-toggle:hover .icon-sun {
  opacity: 0;
}

html.light .theme-toggle:hover .icon-moon {
  opacity: 1;
}

.theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-60deg) scale(0.6);
}

html.light .theme-toggle .icon-moon {
  opacity: 0.8;
  transform: rotate(0deg) scale(1);
}

html.light .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(60deg) scale(0.6);
}

.js .theme-toggle {
  opacity: 0;
  transition: opacity 0.9s ease 0.15s, color 0.3s ease, transform 0.3s ease;
}

.js.is-ready .theme-toggle {
  opacity: 1;
}

.theme-morph {
  position: fixed;
  width: 3.4rem;
  height: 3.4rem;
  margin: -1.7rem 0 0 -1.7rem;
  object-fit: cover;
  opacity: 0;
  transform: scale(0.44) rotate(6deg);
  filter: contrast(1.35);
  pointer-events: none;
  user-select: none;
  z-index: 7;
  transition: opacity 0.28s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-morph.blend-dark {
  mix-blend-mode: screen;
}

.theme-morph.blend-light {
  mix-blend-mode: multiply;
}

.theme-morph.is-playing {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.theme-toggle.is-morphing img {
  opacity: 0 !important;
  transition: opacity 0.12s ease;
}

html.light .tab-note,
html.light .mascot img {
  mix-blend-mode: multiply;
  filter: invert(1);
}

html.theme-anim body,
html.theme-anim .pull-tab,
html.theme-anim h1,
html.theme-anim h2,
html.theme-anim a,
html.theme-anim .stack li,
html.theme-anim .connect a.connect-card,
html.theme-anim .card-media,
html.theme-anim .card-name,
html.theme-anim .card-sub,
html.theme-anim .presence-dot,
html.theme-anim .row,
html.theme-anim .row-title,
html.theme-anim .projects-head,
html.theme-anim .projects-head span,
html.theme-anim .project-list li,
html.theme-anim .viewer-frame,
html.theme-anim .viewer-count {
  transition: background-color 0.55s ease, color 0.55s ease, border-color 0.55s ease, box-shadow 0.55s ease;
}

.tab-note {
  position: fixed;
  left: 1.8rem;
  top: calc(50% - 11.5rem);
  width: 10.5rem;
  height: auto;
  z-index: 5;
  pointer-events: none;
  user-select: none;
  mix-blend-mode: screen;
  transform: rotate(-2deg);
  opacity: 0.85;
}

.js .tab-note {
  opacity: 0;
  transition: opacity 0.6s ease 0.3s;
}

.js.is-ready .tab-note {
  opacity: 0.85;
}

@media (max-width: 62rem) {
  .tab-note {
    display: none;
  }
}


.mascot {
  position: fixed;
  right: max(1.5rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: 8.5rem;
  z-index: 5;
  user-select: none;
}

.mascot > img {
  display: block;
  width: 100%;
  height: auto;
  transform: rotate(2deg);
  opacity: 0.85;
  pointer-events: none;
}

.mascot > .mascot-bubble {
  position: absolute;
  bottom: 5.4rem;
  right: 3.65rem;
  width: 12rem;
  opacity: 0;
  transform: translateY(0.3rem) rotate(-2deg);
  transition: opacity 0.25s ease, transform 0.35s ease;
}

@media (hover: hover) {
  .mascot:hover > .mascot-bubble {
    opacity: 0.9;
    transform: translateY(0) rotate(-2deg);
  }
}

.js .mascot {
  opacity: 0;
  transition: opacity 0.6s ease 0.35s;
}

.js.is-ready .mascot {
  opacity: 1;
}

main {
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4.75rem 1.75rem 3.75rem;
}

main.wide {
  max-width: 54rem;
}

@media (max-width: 70rem) {
  .mascot {
    position: relative;
    right: auto;
    bottom: auto;
    align-self: flex-end;
    width: 6rem;
    margin-top: 2rem;
  }

  .mascot > .mascot-bubble {
    width: 10rem;
    bottom: 4rem;
    right: 2.75rem;
  }
}

@media (max-width: 36rem) {
  main {
    padding: 4.5rem max(1.25rem, env(safe-area-inset-right)) 2.5rem max(2.75rem, env(safe-area-inset-left));
  }
}

.projects-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.1rem;
  margin-bottom: 1.75rem;
}

.projects-head h1,
.projects-head h2 {
  margin: 0;
}

.projects-head span {
  font-size: 0.9375rem;
  color: var(--muted);
}

.projects-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 2rem;
  align-items: stretch;
}

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.project-list li {
  border-bottom: 1px solid var(--line);
}

.row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.85rem 0.2rem;
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.row-index {
  font-size: 0.75rem;
  opacity: 0.55;
}

.row-title {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  transform: translateX(0);
  transition: color 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.row svg {
  align-self: center;
  width: 0.8rem;
  height: 0.8rem;
  flex: none;
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-list li.is-active .row-title {
  color: var(--text);
  transform: translateX(4px);
}

.project-list li.is-active .row svg {
  opacity: 1;
  transform: translate(0, 0);
}

.project-viewer {
  display: flex;
  flex-direction: column;
}

.viewer-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--frame);
}

.viewer-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 800px;
  border: 0;
  transform-origin: 0 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.viewer-frame iframe.is-active {
  opacity: 1;
}

.viewer-count {
  display: block;
  margin-top: 0.6rem;
  text-align: right;
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.7;
}

.head-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.head-link svg {
  width: 0.75rem;
  height: 0.75rem;
  opacity: 0.7;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.head-link:hover {
  color: var(--accent-bright);
}

.head-link:hover svg {
  transform: translate(2px, -2px);
}

.repo-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.repo {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  min-width: 0;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.repo:hover,
.repo:focus-visible {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.repo-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.repo-name {
  min-width: 0;
  font-size: 0.9375rem;
  color: var(--heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

.repo:hover .repo-name {
  color: var(--accent-bright);
}

.repo-stars {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex: none;
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.repo-stars svg {
  width: 0.7rem;
  height: 0.7rem;
  opacity: 0.75;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.repo:hover .repo-stars svg {
  color: var(--accent);
  opacity: 1;
}

.repo-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}

.repo-foot {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: auto;
  font-size: 0.75rem;
  color: var(--muted);
}

.repo-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.repo-dot {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--muted);
}

.repo[data-lang="Kotlin"] .repo-dot {
  background: #a97bff;
}

.repo[data-lang="JavaScript"] .repo-dot {
  background: #f1e05a;
}

html.light .repo-dot {
  filter: saturate(1.25) brightness(0.75);
}

.repo-license {
  opacity: 0.7;
}

.repo-go {
  flex: none;
  width: 0.8rem;
  height: 0.8rem;
  margin-left: auto;
  color: var(--muted);
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease;
}

.repo:hover .repo-go,
.repo:focus-visible .repo-go {
  opacity: 1;
  transform: none;
  color: var(--accent);
}

.preview {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
}

.preview:not([open]) {
  display: none;
}

.preview::backdrop {
  background: transparent;
}

.preview-backdrop {
  position: absolute;
  inset: 0;
  background: var(--backdrop);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.preview.is-open .preview-backdrop {
  opacity: 1;
}

.preview-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  max-width: 72rem;
  margin: 0 auto;
  width: 100%;
}

.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.7rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease 0.2s, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

.preview.is-open .preview-bar {
  opacity: 1;
  transform: translateY(0);
}

.preview-title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text);
}

.preview-index {
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.7;
}

#previewName {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.preview-actions {
  flex: none;
  display: flex;
  gap: 0.35rem;
}

.preview-actions a,
.preview-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  text-decoration: none;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  font: inherit;
  transition: color 0.3s ease;
}

.preview-actions a:hover,
.preview-actions button:hover {
  color: var(--text);
}

.preview-actions a:focus-visible,
.preview-actions button:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.preview-actions svg {
  width: 0.95rem;
  height: 0.95rem;
}

.preview-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--frame);
  transform-origin: 0 0;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.preview-stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 46rem) {
  .projects-layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .project-viewer {
    order: -1;
  }

  .viewer-frame {
    flex: none;
    aspect-ratio: 16 / 10;
  }
}

h1 {
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--heading);
  letter-spacing: 0.01em;
  margin: 0 0 1.5rem;
}

p {
  margin: 0 0 1.05rem;
}

.intro p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(207, 143, 95, 0.45);
  text-underline-offset: 0.22em;
  transition: color 0.3s ease, text-decoration-color 0.3s ease;
}

a:hover {
  color: var(--accent-bright);
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

main > section {
  margin-top: 2.25rem;
}

main > .intro {
  margin-top: 0;
}

h2 {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin: 0 0 0.75rem;
}

.stack ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.4rem;
}

.stack li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
  transition: color 0.3s ease;
}

.stack li:hover {
  color: var(--accent-bright);
}

.stack li svg {
  width: 0.95em;
  height: 0.95em;
}


.rotation-count {
  margin-left: 0.3rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.crate {
  position: relative;
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0.75rem 0 0.25rem;
  isolation: isolate;
}

.crate li {
  --disc-shift: 76%;
  position: relative;
  flex: none;
  width: calc(100% * 3 / 29);
}

.crate li:last-child {
  width: calc(100% * 5 / 29);
}

.crate li:nth-last-child(-n + 3) {
  --disc-shift: -76%;
}

.crate li:nth-child(1) { z-index: 9; }
.crate li:nth-child(2) { z-index: 8; }
.crate li:nth-child(3) { z-index: 7; }
.crate li:nth-child(4) { z-index: 6; }
.crate li:nth-child(5) { z-index: 5; }
.crate li:nth-child(6) { z-index: 4; }
.crate li:nth-child(7) { z-index: 3; }
.crate li:nth-child(8) { z-index: 2; }
.crate li:nth-child(9) { z-index: 1; }

.crate li:is(:hover, :focus-within) {
  z-index: 10;
}

.crate a {
  --sleeve-tilt: 0deg;
  --disc-light: -28deg;
  position: relative;
  display: block;
  width: calc(100% * 5 / 3);
  border-radius: 3px;
  text-decoration: none;
  transform-origin: 50% 85%;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-tap-highlight-color: transparent;
}

.crate li:last-child a {
  width: 100%;
}

.sleeve-cover {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--img-line);
  filter: saturate(0.65) brightness(0.85);
  box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.22);
  transition: filter 0.35s ease, border-color 0.35s ease, box-shadow 0.4s ease;
}

.disc {
  position: absolute;
  top: 3%;
  left: 3%;
  width: 94%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #10100f;
  pointer-events: none;
  opacity: 0;
  transform: translateX(0) rotate(-25deg);
  box-shadow: 0 0.45rem 0.9rem rgba(0, 0, 0, 0.38), 0 1px 2px #000;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
  -webkit-mask-image: radial-gradient(circle closest-side, transparent 0 2.3%, #000 2.8%);
  mask-image: radial-gradient(circle closest-side, transparent 0 2.3%, #000 2.8%);
}

.disc::before,
.disc::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.disc::before {
  background:
    radial-gradient(circle closest-side,
      #151514 0 33%,
      #3a3832 33.5% 34%,
      #111110 34.5% 42%,
      transparent 42.5% 56%,
      #121211 56.5% 58%,
      transparent 58.5% 72%,
      #111110 72.5% 74%,
      transparent 74.5% 88%,
      #151514 88.5% 90%,
      transparent 90.5% 96%,
      #33312d 96.5% 97%,
      #111110 97.5%),
    repeating-radial-gradient(circle closest-side,
      rgba(225, 217, 204, 0.09) 0 0.6px,
      rgba(0, 0, 0, 0.45) 0.8px 1.45px,
      transparent 1.65px 2.1px);
  box-shadow: inset 0.5px 0.7px 0.5px rgba(255, 244, 222, 0.38), inset -1px -1px 1px #000;
}

.disc::after {
  z-index: 1;
  background: conic-gradient(from var(--disc-light),
    transparent 0deg,
    rgba(216, 227, 235, 0.02) 27deg,
    rgba(208, 219, 224, 0.28) 47deg,
    rgba(250, 233, 201, 0.12) 58deg,
    transparent 83deg 175deg,
    rgba(186, 177, 157, 0.07) 198deg,
    rgba(249, 232, 205, 0.25) 225deg,
    rgba(192, 207, 210, 0.06) 244deg,
    transparent 266deg);
  -webkit-mask-image: radial-gradient(circle closest-side, transparent 0 36%, #000 42% 96%, transparent 98%);
  mask-image: radial-gradient(circle closest-side, transparent 0 36%, #000 42% 96%, transparent 98%);
}

.disc-label {
  position: absolute;
  inset: 34%;
  overflow: hidden;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(226, 207, 167, 0.45), 0 0 0 3px #141413;
  animation: disc-spin 3.6s linear infinite paused;
}

.disc-label img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.8) brightness(0.9);
}

.disc-label::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle closest-side, transparent 0 15%, rgba(238, 229, 210, 0.6) 16% 18%, transparent 19% 63%, rgba(0, 0, 0, 0.2) 100%);
}

@keyframes disc-spin {
  to { transform: rotate(1turn); }
}

.crate li:is(:hover, :focus-within) a {
  transform: translateY(-0.55rem) rotate(var(--sleeve-tilt));
}

.crate li:is(:hover, :focus-within) .disc {
  opacity: 1;
  transform: translateX(var(--disc-shift)) rotate(0deg);
}

.crate li:is(:hover, :focus-within) .disc-label {
  animation-play-state: running;
}

.crate li:is(:hover, :focus-within) .sleeve-cover {
  filter: none;
  border-color: var(--line-strong);
  box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.2), 0 0.7rem 1.2rem var(--img-shadow);
}

.crate-now {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  min-height: 1.4em;
  margin: 0.8rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.crate-index {
  flex: none;
  font-size: 0.75rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.crate-name {
  min-width: 0;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crate-rule {
  flex: 1 1 auto;
  min-width: 0.75rem;
  height: 1px;
  margin-bottom: 0.3em;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 6px);
}

.crate-artist {
  flex: none;
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
}

.crate-now.is-in {
  animation: crate-in 0.24s ease both;
}

@keyframes crate-in {
  from { opacity: 0.3; transform: translateY(0.18rem); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 32.5rem) {
  .crate {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
    padding: 1rem 0.25rem 1rem;
    margin: -0.25rem -0.25rem 0;
    scroll-padding-inline: 0.25rem;
  }

  .crate li { width: 2.875rem; }
  .crate li:last-child { width: 4.75rem; }
  .crate a { width: 4.75rem; }

  .crate-now {
    display: grid;
    grid-template-columns: 1.4rem minmax(0, 1fr);
    grid-template-rows: 1.4em 1.4em;
    align-items: baseline;
    row-gap: 0.2rem;
    margin-top: 0.55rem;
  }

  .crate-rule { display: none; }
  .crate-name, .crate-artist { grid-column: 2; }
  .crate-artist { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

.connect-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.connect-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
  transition: border-color 0.3s ease;
}

.connect-card.is-wide {
  grid-column: 1 / -1;
}

.connect-card:is(:hover, :focus-visible) {
  border-color: var(--line-strong);
}

.connect-card:hover .card-name {
  color: var(--accent-bright);
}

.card-media {
  position: relative;
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--surface-2);
}

.connect-card .card-media svg {
  position: absolute;
  inset: 0;
  width: 1.05rem;
  height: 1.05rem;
  margin: auto;
  color: var(--muted);
}

.card-media img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: saturate(0.85);
}

.presence-dot {
  position: absolute;
  right: -0.1rem;
  bottom: -0.1rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #6f6a60;
  box-shadow: 0 0 0 3px var(--surface);
}

.connect-card[data-status="online"] .presence-dot {
  background: #94b878;
}

.connect-card[data-status="idle"] .presence-dot {
  background: #cfa75f;
}

.connect-card[data-status="dnd"] .presence-dot {
  background: #c46a5a;
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  line-height: 1.35;
}

.card-name {
  font-size: 0.9375rem;
  color: var(--text);
  transition: color 0.3s ease;
}

.card-sub {
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

::selection {
  background: var(--selection);
  color: var(--heading);
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.js.is-ready [data-reveal] {
  opacity: 1;
  transform: none;
}

.cursor-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 230px;
  z-index: 10;
  pointer-events: none;
  will-change: transform;
}

.cursor-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--img-line);
  box-shadow: 0 18px 44px var(--img-shadow);
  opacity: 0;
  transform: scale(0.92) translateY(6px);
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.cursor-preview.is-visible img {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    transition: none;
    transform: none;
    opacity: 1;
  }

  .crate-now.is-in,
  .disc-label {
    animation: none;
  }

  .theme-toggle img {
    transition: none;
  }

  a,
  .stack li,
  .veil,
  .pull-tab,
  .row,
  .row-title,
  .row svg,
  .repo,
  .repo-name,
  .repo-go,
  .head-link,
  .head-link svg,
  .crate a,
  .disc,
  .sleeve-cover,
  .mascot > .mascot-bubble,
  .viewer-frame iframe,
  .preview-backdrop,
  .preview-bar,
  .preview-stage,
  .preview-actions a,
  .preview-actions button,
  .cursor-preview img {
    transition: none;
  }
}

@media (max-width: 25rem) {
  .connect-grid { grid-template-columns: 1fr; }
  .projects-head { gap: 0.75rem; }
  .head-link { font-size: 0.8125rem; }
}

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