:root {
  color-scheme: dark;
  --background: #0b0d14;
  --surface: #11141e;
  --surface-raised: #171a27;
  --text: #f3f1fa;
  --muted: #9294a6;
  --line: #ffffff12;
  --purple: #a78bfa;
  --blue: #70a5ff;
  --mint: #72e6ca;
  --font: "Manrope", "Segoe UI", sans-serif;
  --mono: "DM Mono", Consolas, monospace;
  font-family: var(--font);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  background: var(--background);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 82% 4%, #5842a119, transparent 34rem),
    radial-gradient(ellipse at 4% 32%, #177b7910, transparent 28rem),
    var(--background);
}

button,
input {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
}

::selection {
  background: #8d78e977;
  color: #fff;
}

.page-width {
  width: min(1120px, calc(100% - 64px));
  margin-inline: auto;
}

.visually-hidden,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.skip-link:focus {
  position: fixed;
  z-index: 20;
  top: 16px;
  left: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--surface-raised);
}

.site-header {
  display: flex;
  width: min(1280px, calc(100% - 64px));
  height: 78px;
  align-items: center;
  justify-content: space-between;
  margin-inline: auto;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .13em;
}

.wordmark-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid #a78bfa50;
  border-radius: 10px;
  background: #a78bfa12;
  font-size: 17px;
  letter-spacing: -.08em;
}

.wordmark-mark span,
.footer-brand span {
  color: var(--purple);
}

.wordmark-light {
  color: #b6b5c5;
  font-weight: 500;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #c1c0cc;
  font-size: 13px;
  transition: color 180ms ease;
}

.header-link:hover,
.hero-link:hover {
  color: var(--mint);
}

.hero {
  position: relative;
  display: grid;
  min-height: 390px;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  padding-block: 62px 56px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 17px;
  color: #9698ac;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .13em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px #72e6ca88;
}

.hero h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -.065em;
  line-height: 1.08;
}

.gradient-text {
  background: linear-gradient(95deg, #a88dff 3%, #78b2ff 51%, #6be4ca 97%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  max-width: 485px;
  margin: 20px 0 22px;
  color: #a5a6b5;
  font-size: 14px;
  line-height: 1.8;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #dedbe9;
  font-size: 13px;
  font-weight: 700;
  transition: color 180ms ease, gap 180ms ease;
}

.hero-link:hover {
  gap: 15px;
}

.hero-art {
  position: relative;
  display: grid;
  min-height: 260px;
  overflow: clip;
  place-items: center;
}

.orbit {
  position: absolute;
  width: 270px;
  height: 270px;
  border: 1px solid #a78bfa19;
  border-radius: 50%;
}

.orbit-two {
  width: 206px;
  height: 206px;
  border-color: #70a5ff20;
}

.hero-card {
  position: absolute;
  display: flex;
  width: 174px;
  height: 206px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid #ffffff20;
  border-radius: 19px;
  box-shadow: 0 25px 70px #00000055;
  transform: rotate(-11deg);
  backdrop-filter: blur(12px);
}

.hero-card-back {
  z-index: 0;
  margin: 24px 0 0 72px;
  background: linear-gradient(145deg, #263350dd, #171827ee);
  color: #9fbaff;
  font-family: var(--mono);
  font-size: 12px;
  transform: rotate(12deg) translate(22px, -7px);
}

.hero-card-back span:last-child {
  align-self: flex-end;
  color: var(--mint);
  font-size: 25px;
}

.hero-card-front {
  z-index: 1;
  background: linear-gradient(150deg, #282047eF, #191925f2 75%);
}

.hero-card-label,
.hero-card-caption {
  color: #b8addb;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .1em;
}

.hero-card-caption {
  color: #a6a6b8;
}

.hero-card-symbol {
  display: grid;
  width: 84px;
  height: 84px;
  align-self: center;
  place-items: center;
  border: 1px solid #b69aff4d;
  border-radius: 25px;
  background: linear-gradient(145deg, #a78bfa2e, #70a5ff14);
  box-shadow: 0 0 35px #987bfa20;
  color: #c7b7ff;
  font-size: 45px;
  transform: rotate(-8deg);
}

.hero-spark,
.hero-code {
  position: absolute;
  color: var(--mint);
}

.spark-one {
  top: 25px;
  right: 68px;
  color: var(--purple);
  font-size: 26px;
}

.spark-two {
  bottom: 28px;
  left: 43px;
  color: var(--blue);
  font-size: 18px;
}

.hero-code {
  right: 8px;
  bottom: 7px;
  color: #83849a;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
}

.gallery-section {
  padding-block: 55px 79px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 25px;
}

.section-heading .eyebrow {
  margin-bottom: 9px;
}

.section-heading h2,
.about-section h2 {
  margin: 0;
  font-size: clamp(26px, 3.5vw, 37px);
  font-weight: 750;
  letter-spacing: -.055em;
}

.heading-dot {
  color: var(--purple);
}

.gallery-note {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 19px;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  min-height: 35px;
  padding: 7px 13px;
  border: 1px solid #ffffff14;
  border-radius: 999px;
  background: #ffffff04;
  color: #a5a5b4;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.filter-button:hover {
  transform: translateY(-1px);
  border-color: #a78bfa66;
  color: var(--text);
}

.filter-button.is-active {
  border-color: #a78bfa66;
  background: #a78bfa20;
  color: #d3c4ff;
}

.search-box {
  display: flex;
  width: 224px;
  min-width: 190px;
  height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 12px;
  border: 1px solid #ffffff17;
  border-radius: 11px;
  background: #ffffff05;
  transition: border-color 180ms ease;
}

.search-box:focus-within {
  border-color: #a78bfa88;
}

.search-icon {
  color: #a8a0c1;
  font-size: 22px;
  line-height: 1;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}

.search-box input::placeholder {
  color: #777989;
}

.search-box kbd {
  display: grid;
  width: 19px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #ffffff19;
  border-radius: 5px;
  color: #878999;
  font-family: var(--mono);
  font-size: 10px;
}

.results-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 13px;
  color: #828394;
  font-family: var(--mono);
  font-size: 10px;
}

.results-hint {
  font-family: var(--font);
}

.comic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.comic-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #ffffff10;
  border-radius: 16px;
  background: linear-gradient(155deg, #ffffff08, #ffffff03 58%), #11141eaa;
  box-shadow: 0 10px 30px #00000018;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.comic-card:hover {
  transform: translateY(-5px);
  border-color: #a78bfa4d;
  box-shadow: 0 18px 38px #00000038, 0 0 30px #8468db0d;
}

.card-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: #151724;
}

.card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 350ms ease;
}

.comic-card:hover .card-image {
  transform: scale(1.035);
}

.card-number {
  position: absolute;
  top: 11px;
  left: 11px;
  padding: 5px 8px;
  border: 1px solid #ffffff24;
  border-radius: 7px;
  background: #0b0d14a8;
  color: #dfdbee;
  font-family: var(--mono);
  font-size: 9px;
  backdrop-filter: blur(8px);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 16px 14px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.4;
}

.card-description {
  min-height: 42px;
  margin: 0 0 14px;
  color: #9b9cad;
  font-size: 11px;
  line-height: 1.75;
}

.card-tags,
.dialog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 5px 8px;
  border: 1px solid #a78bfa25;
  border-radius: 6px;
  background: #a78bfa0c;
  color: #bdb1df;
  font-family: var(--mono);
  font-size: 9px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 15px;
}

.card-date {
  color: #77798b;
  font-family: var(--mono);
  font-size: 9px;
}

.read-button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #a78bfa35;
  border-radius: 8px;
  background: #a78bfa10;
  color: #d4c8f2;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  transition: background 180ms ease, border-color 180ms ease;
}

.read-button:hover {
  border-color: #a78bfa77;
  background: #a78bfa21;
}

.read-button span {
  color: var(--mint);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 48px 20px;
  border: 1px dashed #ffffff20;
  border-radius: 16px;
  color: #a2a3b2;
  text-align: center;
}

.empty-state p {
  margin: 0;
  font-size: 14px;
}

.empty-state span {
  display: block;
  margin-top: 7px;
  color: #77798b;
  font-size: 11px;
}

.about-section {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr 40px;
  align-items: center;
  gap: 20px;
  padding: 27px 30px;
  border: 1px solid #ffffff12;
  border-radius: 17px;
  background: linear-gradient(110deg, #9a7be512, #72e6ca08), #ffffff03;
}

.about-icon {
  display: grid;
  width: 49px;
  height: 49px;
  place-items: center;
  border: 1px solid #a78bfa30;
  border-radius: 14px;
  background: #a78bfa13;
  color: #bca9ff;
  font-size: 24px;
}

.about-section .eyebrow {
  margin-bottom: 7px;
}

.about-section h2 {
  font-size: 20px;
}

.about-section div > p:last-child {
  max-width: 630px;
  margin: 7px 0 0;
  color: #999bab;
  font-size: 11px;
  line-height: 1.75;
}

.back-to-top {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 1px solid #ffffff18;
  border-radius: 11px;
  color: #c1b6e4;
  transition: border-color 180ms ease, background 180ms ease;
}

.back-to-top:hover {
  border-color: #a78bfa66;
  background: #a78bfa15;
}

.site-footer {
  display: flex;
  min-height: 83px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
  color: #77798b;
  font-size: 10px;
}

.footer-brand {
  color: #b8b6c8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.comic-dialog {
  width: min(1020px, calc(100% - 32px));
  max-width: none;
  max-height: min(790px, calc(100% - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #ffffff20;
  border-radius: 20px;
  background: #11131c;
  color: var(--text);
  box-shadow: 0 35px 100px #00000088;
}

.comic-dialog::backdrop {
  background: #06070bc9;
  backdrop-filter: blur(9px);
}

.dialog-shell {
  position: relative;
  display: grid;
  min-height: 430px;
  max-height: min(790px, calc(100dvh - 32px));
  grid-template-columns: 1fr .83fr;
}

.dialog-close {
  position: absolute;
  z-index: 2;
  top: 13px;
  right: 13px;
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid #ffffff22;
  border-radius: 10px;
  background: #11131caa;
  color: white;
  cursor: pointer;
  font-size: 23px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.dialog-visual {
  position: relative;
  display: grid;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  background:
    radial-gradient(ellipse at 50% 40%, #6556a11f, transparent 75%),
    #0d0f17;
}

.image-viewport {
  width: 100%;
  height: 100%;
  overflow: auto;
  scrollbar-color: #77718d transparent;
}

.dialog-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: contain;
  transition: width 180ms ease, height 180ms ease;
}

.dialog-image.is-zoomed {
  width: 155%;
  height: 155%;
  min-height: 650px;
  object-fit: contain;
  cursor: zoom-out;
}

.zoom-button {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid #ffffff20;
  border-radius: 9px;
  background: #11131cae;
  color: #ebe8f5;
  cursor: pointer;
  font-size: 10px;
  backdrop-filter: blur(9px);
}

.dialog-content {
  padding: 35px 31px 25px;
  overflow-y: auto;
}

.dialog-date {
  margin-bottom: 10px;
}

.dialog-content h2 {
  margin: 0;
  padding-right: 22px;
  font-size: clamp(22px, 3vw, 31px);
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: 1.2;
}

.dialog-description {
  margin: 13px 0 23px;
  color: #a5a6b5;
  font-size: 12px;
  line-height: 1.8;
}

.steps-heading {
  margin: 0 0 11px;
  color: #e5e2ef;
  font-size: 12px;
  font-weight: 700;
}

.dialog-steps {
  display: grid;
  gap: 11px;
  margin: 0 0 21px;
  padding: 0;
  list-style: none;
  counter-reset: comic-step;
}

.dialog-steps li {
  position: relative;
  min-height: 27px;
  padding: 3px 0 0 37px;
  color: #b4b4c1;
  counter-increment: comic-step;
  font-size: 11px;
  line-height: 1.65;
}

.dialog-steps li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid #a78bfa35;
  border-radius: 8px;
  background: #a78bfa10;
  color: #c7b7ff;
  content: counter(comic-step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 9px;
}

.dialog-tags {
  margin-bottom: 18px;
}

.copy-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid #72e6ca40;
  border-radius: 9px;
  background: #72e6ca12;
  color: #a6efdf;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: background 180ms ease;
}

.copy-button:hover {
  background: #72e6ca20;
}

.copy-status {
  min-height: 16px;
  margin: 8px 0 0;
  color: var(--mint);
  font-size: 10px;
}

@media (min-width: 1440px) {
  .page-width {
    width: min(1180px, calc(100% - 80px));
  }
}

@media (max-width: 850px) {
  .gallery-toolbar {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .search-box {
    width: min(100%, 380px);
  }

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

@media (max-width: 600px) {
  .page-width,
  .site-header {
    width: calc(100% - 36px);
  }

  .site-header {
    height: 65px;
  }

  .wordmark {
    gap: 8px;
    font-size: 11px;
  }

  .header-link {
    font-size: 11px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-block: 48px 24px;
  }

  .hero h1 {
    font-size: clamp(42px, 11vw, 61px);
  }

  .hero-description {
    max-width: 430px;
    font-size: 12px;
  }

  .hero-art {
    min-height: 214px;
    margin-top: 4px;
  }

  .hero-card {
    width: 140px;
    height: 166px;
    padding: 14px;
  }

  .hero-card-symbol {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    font-size: 37px;
  }

  .orbit {
    width: 215px;
    height: 215px;
  }

  .orbit-two {
    width: 166px;
    height: 166px;
  }

  .spark-one {
    right: calc(50% - 120px);
  }

  .spark-two {
    left: calc(50% - 127px);
  }

  .hero-code {
    right: 2px;
    bottom: 0;
  }

  .gallery-section {
    padding-block: 40px 52px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }

  .gallery-note {
    margin: 0;
  }

  .filter-list {
    gap: 7px;
  }

  .filter-button {
    min-height: 33px;
    padding-inline: 10px;
    font-size: 10px;
  }

  .comic-grid {
    gap: 11px;
  }

  .card-body {
    padding: 12px 11px 11px;
  }

  .card-title {
    font-size: 12px;
  }

  .card-description {
    min-height: 0;
    font-size: 10px;
  }

  .card-footer {
    align-items: start;
    flex-direction: column;
    gap: 9px;
  }

  .read-button {
    width: 100%;
    justify-content: center;
  }

  .card-tags {
    gap: 4px;
  }

  .tag {
    padding: 4px 6px;
    font-size: 8px;
  }

  .results-hint {
    max-width: 45%;
    text-align: right;
  }

  .about-section {
    grid-template-columns: 42px minmax(0, 1fr) 30px;
    gap: 11px;
    padding: 18px 14px;
  }

  .about-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .about-section h2 {
    font-size: 16px;
  }

  .about-section div > p:last-child {
    font-size: 10px;
  }

  .back-to-top {
    width: 30px;
    height: 30px;
  }

  .site-footer {
    min-height: 70px;
    margin-top: 24px;
    font-size: 8px;
  }

  .footer-brand {
    font-size: 8px;
  }

  .comic-dialog {
    width: calc(100% - 20px);
    max-height: calc(100% - 20px);
    border-radius: 15px;
  }

  .dialog-shell {
    max-height: calc(100dvh - 20px);
    grid-template-columns: 1fr;
    grid-template-rows: minmax(220px, 36dvh) minmax(0, 1fr);
  }

  .dialog-image {
    min-height: 0;
    height: 100%;
  }

  .dialog-image.is-zoomed {
    min-height: 430px;
  }

  .dialog-content {
    padding: 22px 19px 18px;
  }

  .dialog-content h2 {
    font-size: 23px;
  }

  .dialog-description {
    margin-block: 9px 16px;
  }

  .dialog-steps {
    gap: 8px;
    margin-bottom: 16px;
  }

  .dialog-close {
    top: 9px;
    right: 9px;
  }
}

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

  .card-footer {
    align-items: center;
    flex-direction: row;
  }

  .read-button {
    width: auto;
  }
}

@media (max-width: 350px) {
  .header-link {
    display: none;
  }

  .wordmark {
    font-size: 10px;
  }

  .hero .eyebrow {
    flex-wrap: wrap;
    letter-spacing: .07em;
  }
}

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