:root {
  color-scheme: dark;
  --bg: #070707;
  --ink: #f2f2f2;
  --muted: #808080;
  --dim: #3a3a3a;
  --line: rgba(255, 255, 255, 0.14);
  --panel: rgba(255, 255, 255, 0.045);
  --glow: rgba(255, 255, 255, 0.68);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 58%, rgba(255, 255, 255, 0.075), transparent 31rem),
    radial-gradient(circle at 50% 52%, rgba(255, 255, 255, 0.035), transparent 52rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 42px;
  left: 50%;
  transform: translateX(-50%);
}

.index-nav-button {
  display: inline-grid;
  min-width: 148px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  color: #111;
  background: #f7f7f7;
  box-shadow:
    0 0 26px rgba(255, 255, 255, 0.34),
    inset 0 0 18px rgba(255, 255, 255, 0.5);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.index-nav-button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 34px rgba(255, 255, 255, 0.48),
    inset 0 0 18px rgba(255, 255, 255, 0.68);
}

.hero {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(ellipse at center, transparent 0 42%, rgba(0, 0, 0, 0.28) 58%, rgba(0, 0, 0, 0.92) 100%),
    #080808;
}

.hero::before {
  position: absolute;
  inset: -18% -8%;
  height: auto;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(ellipse at 48% 42%, rgba(255, 190, 226, 0.12), transparent 34rem),
    radial-gradient(ellipse at 50% 60%, rgba(255, 255, 255, 0.06), transparent 48rem);
  opacity: 0.72;
}

.hero::after {
  display: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.46);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(0.72rem, 1.2vw, 0.82rem);
  font-weight: 600;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-weight: 900;
  line-height: 0.88;
  text-transform: uppercase;
}

h1 {
  max-width: none;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1.1rem, 2.4vw, 1.8rem);
  line-height: 1;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.28);
}

h2 {
  font-size: clamp(2.4rem, 8vw, 7.6rem);
}

.lede {
  max-width: 34rem;
  margin: 12px auto 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.92rem;
  line-height: 1.55;
}

.butterfly-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  cursor: grab;
  touch-action: none;
  filter:
    contrast(1.14)
    drop-shadow(0 0 20px rgba(255, 255, 255, 0.22))
    drop-shadow(0 0 44px rgba(255, 255, 255, 0.12));
}

.butterfly-stage:active {
  cursor: grabbing;
}

.butterfly-stage::before,
.butterfly-stage::after {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  content: "";
}

.butterfly-stage::before {
  display: none;
}

.butterfly-stage::after {
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0 48%, rgba(0, 0, 0, 0.4) 72%, rgba(0, 0, 0, 0.92) 100%);
}

#butterflyCanvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.canvas-fallback {
  position: absolute;
  inset: 20%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.drag-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 1px solid rgba(247, 243, 232, 0.26);
  border-radius: 50%;
  color: var(--bg);
  background: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  pointer-events: none;
  mix-blend-mode: screen;
  box-shadow: 0 0 34px rgba(255, 255, 255, 0.28);
}

.side-rail {
  position: absolute;
  z-index: 5;
  right: 28px;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  transform: translateY(-50%);
}

.glow-slider {
  width: 156px;
  height: 28px;
  margin: 0;
  accent-color: #fff;
  cursor: pointer;
  filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.26));
}

.glow-slider::-webkit-slider-runnable-track {
  height: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.72) 62%, #fff 100%),
    rgba(0, 0, 0, 0.5);
}

.glow-slider::-webkit-slider-thumb {
  width: 20px;
  height: 28px;
  margin-top: -12px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 0;
  appearance: none;
  background: #fff;
  box-shadow: 0 0 32px rgba(255, 255, 255, 0.72);
}

.glow-slider::-moz-range-track {
  height: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.72) 62%, #fff 100%);
}

.glow-slider::-moz-range-thumb {
  width: 20px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 0;
  background: #fff;
  box-shadow: 0 0 32px rgba(255, 255, 255, 0.72);
}

.bottom-hud {
  position: absolute;
  z-index: 5;
  right: 64px;
  bottom: 38px;
  display: flex;
  gap: 12px;
}

.bottom-hud span {
  display: grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.corner-reticle {
  position: absolute;
  z-index: 5;
  width: 70px;
  height: 70px;
  pointer-events: none;
}

.corner-reticle::before,
.corner-reticle::after {
  position: absolute;
  content: "";
  border-color: rgba(255, 255, 255, 0.26);
}

.corner-reticle::before {
  inset: 0;
  border-style: solid;
  border-width: 1px 0 0 1px;
}

.corner-reticle::after {
  top: 20px;
  left: 20px;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  box-shadow:
    0 8px 0 -8px #fff,
    8px 0 0 -8px #fff;
}

.top-left {
  top: 48px;
  left: 36px;
}

.top-right {
  top: 48px;
  right: 36px;
  transform: scaleX(-1);
}

.bottom-left {
  bottom: 28px;
  left: 28px;
  transform: scaleY(-1);
}

.bottom-right {
  right: 28px;
  bottom: 28px;
  transform: scale(-1);
}

.index-section {
  position: relative;
  padding: clamp(72px, 10vw, 132px) clamp(18px, 4vw, 56px);
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 72px),
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.06), transparent 34rem),
    #080807;
}

.index-section::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "0100 0001 0100 1101 0101 0110 0010 1111 0100 1001 0100 1110 0100 0100 0100 0101 0101 1000";
  color: rgba(255, 255, 255, 0.035);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(3.2rem, 9vw, 10rem);
  font-weight: 800;
  line-height: 0.86;
  overflow-wrap: anywhere;
  transform: translateY(8%) rotate(-4deg);
}

.section-heading {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(240px, 1.1fr);
  align-items: end;
  gap: 28px;
  margin-bottom: 34px;
}

.section-heading .eyebrow {
  margin: 0;
}

.index-tools {
  position: sticky;
  z-index: 10;
  top: 72px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  margin-bottom: 22px;
  overflow-x: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 8, 7, 0.76);
  backdrop-filter: blur(18px);
}

.letter-strip {
  display: flex;
  gap: 8px;
}

.filter-button {
  min-width: 42px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--muted);
  background:
    linear-gradient(135deg, transparent 7px, rgba(255, 255, 255, 0.035) 7px),
    rgba(255, 255, 255, 0.02);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease, transform 180ms ease;
}

.filter-button:hover,
.filter-button.active {
  border-color: rgba(255, 255, 255, 0.62);
  color: var(--bg);
  background: var(--ink);
  transform: translateY(-1px);
}

.author-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}

.author-card {
  position: relative;
  min-height: 214px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.1), transparent 28%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 12px),
    rgba(255, 255, 255, 0.035);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 10px);
  transform: translateY(calc(var(--card-offset) * 2px));
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease, background 220ms ease;
}

.author-card::before,
.author-card::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.author-card::before {
  inset: -120% 0 auto;
  height: 90%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  opacity: 0;
  transform: translateY(-20%);
  transition: opacity 180ms ease, transform 500ms ease;
}

.author-card::after {
  right: -34px;
  bottom: -36px;
  width: 138px;
  height: 138px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transform: rotate(22deg);
}

.author-card:hover {
  border-color: rgba(255, 255, 255, 0.52);
  box-shadow:
    0 0 32px rgba(255, 255, 255, 0.12),
    inset 0 0 28px rgba(255, 255, 255, 0.045);
  transform: translateY(calc(var(--card-offset) * 2px - 6px)) skewY(-0.6deg);
}

.author-card:hover::before {
  opacity: 1;
  transform: translateY(230%);
}

.card-chrome {
  position: absolute;
  inset: 10px;
  z-index: 2;
  pointer-events: none;
}

.card-chrome span {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(255, 255, 255, 0.46);
}

.card-chrome span:nth-child(1) {
  top: 0;
  left: 0;
  border-top: 1px solid;
  border-left: 1px solid;
}

.card-chrome span:nth-child(2) {
  top: 0;
  right: 0;
  border-top: 1px solid;
  border-right: 1px solid;
}

.card-chrome span:nth-child(3) {
  right: 0;
  bottom: 0;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.card-chrome span:nth-child(4) {
  bottom: 0;
  left: 0;
  border-bottom: 1px solid;
  border-left: 1px solid;
}

.author-card-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.author-avatar {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.24);
  object-fit: cover;
  background: #080808;
  box-shadow:
    0 0 26px rgba(255, 255, 255, 0.1),
    inset 0 0 20px rgba(255, 255, 255, 0.08);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  transition: filter 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.author-card:hover .author-avatar {
  filter: brightness(1.28) contrast(1.18);
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 0 38px rgba(255, 255, 255, 0.18),
    inset 0 0 24px rgba(255, 255, 255, 0.12);
}

.author-letter {
  display: inline-grid;
  position: relative;
  z-index: 3;
  width: 24px;
  height: 24px;
  place-items: center;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.34);
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.68rem;
  font-weight: 900;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.05);
}

.author-serial {
  color: rgba(255, 255, 255, 0.48);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
}

.author-card h3 {
  position: relative;
  z-index: 3;
  margin: 0;
  font-size: 0.88rem;
  line-height: 0.95;
  overflow-wrap: anywhere;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
}

.author-card h3::after {
  position: absolute;
  top: 0.08em;
  left: 0.08em;
  z-index: -1;
  width: 100%;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.2);
  content: attr(data-text);
  clip-path: inset(58% 0 14% 0);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.author-card:hover h3::after {
  opacity: 1;
  transform: translateX(4px);
}

.author-meta {
  position: relative;
  z-index: 3;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.45;
}

.author-binary {
  position: relative;
  z-index: 3;
  max-height: 28px;
  margin: 8px 0 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.2);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.52rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.author-tags {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.author-tags span {
  border: 1px solid rgba(247, 243, 232, 0.18);
  border-radius: 0;
  padding: 3px 5px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.28);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.52rem;
  font-weight: 800;
  text-transform: uppercase;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: color 180ms ease, border-color 180ms ease;
}

.author-card:hover .author-tags span {
  border-color: rgba(255, 255, 255, 0.34);
  color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 1060px) {
  .hero {
    min-height: 100vh;
  }

  .butterfly-stage {
    width: 100%;
    min-height: 100vh;
  }

  .author-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .author-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    top: 18px;
  }

  .index-nav-button {
    min-width: 132px;
    height: 38px;
    font-size: 0.82rem;
  }

  .hero {
    min-height: 100vh;
  }

  h1 {
    font-size: 1.08rem;
  }

  .butterfly-stage {
    min-height: 100vh;
  }

  .side-rail,
  .bottom-hud {
    display: none;
  }

  .section-heading {
    grid-template-columns: 1fr;
  }

  .index-tools {
    top: 0;
  }

  .author-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .corner-reticle {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 460px) {
  .author-grid {
    grid-template-columns: 1fr;
  }
}
