:root {
  color-scheme: dark;

  --black: #000000;
  --raise: #0a0a0a;
  --white: #ffffff;
  --ash: #8f8f8f;
  --dim: #757575;
  --hair: rgba(255, 255, 255, 0.14);
  --mark: rgba(255, 255, 255, 0.3);
  --grid: rgba(255, 255, 255, 0.026);

  --acid: #fcee0a;
  --kanji: #c43249;

  --font: Georgia, 'Times New Roman', Times, serif;

  --gutter: clamp(1.5rem, 5vw, 4rem);
}

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

html {
  background: var(--black);
}

body {
  margin: 0;
  color: var(--ash);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.shell::before,
.shell::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

.shell::before {
  background-image:
    repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, var(--grid) 0 1px, transparent 1px 72px);
  -webkit-mask-image: radial-gradient(ellipse 78% 62% at 50% 38%, #000 0%, transparent 76%);
  mask-image: radial-gradient(ellipse 78% 62% at 50% 38%, #000 0%, transparent 76%);
}

.shell::after {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.5) 0.6px, transparent 0.6px),
    radial-gradient(circle, rgba(255, 255, 255, 0.32) 0.5px, transparent 0.5px);
  background-size:
    137px 149px,
    83px 71px;
  background-position:
    0 0,
    31px 47px;
  -webkit-mask-image: radial-gradient(ellipse 82% 70% at 50% 40%, #000 0%, transparent 82%);
  mask-image: radial-gradient(ellipse 82% 70% at 50% 40%, #000 0%, transparent 82%);
}

.bloom {
  position: fixed;
  inset: -30%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 34% 30% at 50% 50%,
    rgba(255, 255, 255, 0.055),
    transparent 66%
  );
}

.shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0 clamp(1.75rem, 4vw, 2.75rem);
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.micro {
  font-size: 0.625rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

.hud-end {
  margin-right: -0.28em;
  color: var(--ash);
}

.dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 0.9em;
  border-radius: 50%;
  background: var(--white);
  vertical-align: middle;
}

.masthead {
  padding-bottom: clamp(4rem, 12vh, 9rem);
}

.wordmark {
  margin: clamp(5rem, 16vh, 11rem) 0 0;
  font-family: var(--font);
  font-size: clamp(2.75rem, 12.5vw, 10.5rem);
  font-weight: 400;
  font-style: italic;
  line-height: 0.92;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: center;
  text-indent: 0.09em;
  color: var(--white);
  background-image: linear-gradient(
    178deg,
    #ffffff 0%,
    #fafafa 13%,
    #d2d2d2 33%,
    #8b8b8b 48%,
    #ffffff 54%,
    #f4f4f4 64%,
    #c4c4c4 82%,
    #efefef 100%
  );
  filter: drop-shadow(0 1px 16px rgba(255, 255, 255, 0.14));
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
  .wordmark {
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.masthead-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(2rem, 6vw, 5rem);
  margin-top: clamp(2rem, 5vh, 3.25rem);
}

.creed {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.6vw, 1.9rem);
}

.kanji {
  font-family: 'Noto Sans JP', var(--font);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
  color: var(--kanji);
}

.quotes {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 46ch;
}

.quote {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ash);
}

.breach {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
  padding-top: 0.4rem;
}

.breach-label {
  font-size: 0.5625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

.breach-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1.75rem);
  gap: 0.72rem 0.95rem;
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  font-variant-numeric: lining-nums tabular-nums;
  color: rgba(255, 255, 255, 0.22);
}

.breach-grid .is-hot {
  color: var(--acid);
}

.breach-grid::after {
  content: '';
  position: absolute;
  left: -0.7rem;
  right: -0.7rem;
  top: 0;
  height: 34%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.06) 50%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
  pointer-events: none;
}

.breach-buffer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.breach-buffer .breach-label {
  margin-right: 0.35rem;
}

.buf {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.15rem;
  border: 1px solid var(--hair);
  font-size: 0.5625rem;
  letter-spacing: 0.06em;
  font-variant-numeric: lining-nums tabular-nums;
  color: transparent;
}

.buf.is-filled {
  border-color: color-mix(in srgb, var(--acid) 45%, transparent);
  color: var(--acid);
}

.eyes-slot {
  display: block;
  width: clamp(260px, 34vw, 420px);
  line-height: 0;
}

.eyes,
.eyes-still {
  display: block;
  width: 100%;
  aspect-ratio: 4.4 / 1;
  object-fit: cover;
  object-position: 50% 48%;
  -webkit-mask-image: radial-gradient(ellipse 86% 92% at 50% 50%, #000 50%, transparent 100%);
  mask-image: radial-gradient(ellipse 86% 92% at 50% 50%, #000 50%, transparent 100%);
}

.eyes-still {
  display: none;
}

.index {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hair);
}

.entry {
  position: relative;
  border-bottom: 1px solid var(--hair);
  transition: background-color 260ms ease;
}

.entry:hover {
  background: var(--raise);
}

.entry::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

.entry:hover::after {
  transform: scaleX(1);
}

.entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6rem 1rem;
  align-items: center;
  gap: 0 1.5rem;
  padding-top: 1.6rem;
  padding-bottom: 1.6rem;
}

.entry-name {
  font-size: clamp(1.0625rem, 1.6vw, 1.3125rem);
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.82);
  transition: color 260ms ease;
}

.entry:hover .entry-name {
  color: var(--white);
}

.entry-status {
  text-align: right;
  margin-right: -0.28em;
}

.entry-mark {
  position: relative;
  width: 1rem;
  height: 0.875rem;
}

.entry-mark::before,
.entry-mark::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 5px;
  border: 1px solid var(--mark);
  transition: border-color 260ms ease;
}

.entry-mark::before {
  left: 0;
  border-right: 0;
}

.entry-mark::after {
  right: 0;
  border-left: 0;
}

.entry:hover .entry-mark::before,
.entry:hover .entry-mark::after {
  border-color: var(--white);
}

.colophon {
  margin-top: auto;
  padding-top: clamp(3.5rem, 10vh, 7rem);
}

.colophon .hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.colophon .hud > :last-child {
  justify-self: end;
}

.colophon-link {
  color: var(--dim);
  text-decoration: none;
  margin-right: -0.28em;
  transition: color 220ms ease;
}

.colophon-link:hover {
  color: var(--white);
}

.colophon-link:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 6px;
}

@media (max-width: 60rem) {
  .masthead-body {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(2.5rem, 7vh, 4rem);
  }

  .breach {
    padding-top: 0;
  }
}

@media (max-width: 44rem) {
  .colophon .hud {
    grid-template-columns: 1fr 1fr;
    row-gap: 1.75rem;
  }

  .eyes-slot {
    grid-area: 1 / 1 / 2 / 3;
    justify-self: center;
    width: min(100%, 340px);
  }

  .entry-row {
    grid-template-columns: minmax(0, 1fr) auto 1rem;
    gap: 0.55rem 1.25rem;
    grid-template-areas:
      'name name mark'
      'status status mark';
  }

  .entry-name {
    grid-area: name;
  }

  .entry-status {
    grid-area: status;
    text-align: left;
    margin-right: 0;
  }

  .entry-mark {
    grid-area: mark;
    align-self: center;
  }

  .hud {
    align-items: baseline;
  }

  .creed {
    gap: 1rem;
  }
}

@media (max-width: 26rem) {
  .hud-end {
    font-size: 0.5625rem;
    letter-spacing: 0.2em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entry::after {
    transition: none;
  }

  .eyes {
    display: none;
  }

  .eyes-still {
    display: block;
  }

  .breach-grid::after {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes resolve {
    from {
      opacity: 0;
      transform: translateY(14px);
      filter: blur(14px) drop-shadow(0 1px 16px rgba(255, 255, 255, 0));
    }
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  }

  @keyframes pulse {
    0%,
    100% {
      opacity: 1;
      transform: scale(1);
    }
    50% {
      opacity: 0.3;
      transform: scale(0.7);
    }
  }

  @keyframes drift {
    0% {
      transform: translate(-7%, -4%);
    }
    50% {
      transform: translate(8%, 5%);
    }
    100% {
      transform: translate(-7%, -4%);
    }
  }

  @keyframes breach-scan {
    from {
      transform: translateY(-110%);
    }
    to {
      transform: translateY(400%);
    }
  }

  .bloom {
    animation: drift 48s ease-in-out infinite;
  }

  .dot {
    animation: pulse 2.6s ease-in-out infinite;
  }

  .breach-grid::after {
    animation: breach-scan 5.5s linear infinite;
  }

  .breach {
    animation: rise 760ms cubic-bezier(0.16, 1, 0.3, 1) 940ms both;
  }

  .wordmark {
    animation: resolve 1400ms cubic-bezier(0.16, 1, 0.3, 1) 120ms both;
  }

  .masthead .hud,
  .creed,
  .entry,
  .colophon {
    animation: rise 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .creed {
    animation-delay: 800ms;
  }

  .entry {
    animation-delay: calc(1000ms + var(--i) * 70ms);
  }

  .colophon {
    animation-delay: 1500ms;
  }
}
