:root {
  color-scheme: light;
  --acid: #c8f900;
  --black: #050505;
  --error: #e1193e;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100svh;
  overflow: hidden;
  background: var(--acid);
  color: var(--black);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

.top-icons {
  position: fixed;
  z-index: 5;
  top: clamp(1.15rem, 3vw, 2rem);
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2vw, 1.15rem);
  transform: translateX(-50%);
}

.top-icon {
  width: clamp(3rem, 4.2vw, 3.65rem);
  height: clamp(3rem, 4.2vw, 3.65rem);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid transparent;
  border-radius: 0.9rem;
  color: var(--black);
}

.top-icon--link {
  text-decoration: none;
  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.top-icon--link:hover,
.top-icon--link:focus-visible {
  border-color: var(--black);
  background: var(--black);
  color: var(--acid);
  transform: translateY(-4px);
  box-shadow: 5px 5px 0 rgba(5, 5, 5, 0.2);
  outline: none;
}

.top-icon--link:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 2px 2px 0 rgba(5, 5, 5, 0.18);
}

.top-icon svg {
  width: 58%;
  height: 58%;
  fill: currentColor;
}

.top-icon--arxiv {
  width: clamp(4.65rem, 6.3vw, 5.6rem);
  overflow: hidden;
  cursor: default;
  user-select: none;
}

.top-icon--arxiv img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.34);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.gateway {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2.2rem, 5vh, 3.8rem);
  padding: 2rem;
  transform: translateY(-2.5vh);
}

.portrait-shell {
  width: clamp(13rem, 19vw, 18.5rem);
  aspect-ratio: 1;
}

.portrait-shell img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.enter-button {
  position: relative;
  isolation: isolate;
  min-width: clamp(12rem, 15vw, 14rem);
  min-height: clamp(3.65rem, 5.2vw, 4.35rem);
  padding: 0.95rem 1.8rem;
  overflow: hidden;
  border: 2px solid var(--black);
  border-radius: 1rem;
  background: var(--black);
  color: #fff;
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.025em;
  cursor: pointer;
  box-shadow: 0 0 0 rgba(5, 5, 5, 0);
  transition:
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    color 180ms ease;
}

.enter-button::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: #fff;
  transform: translateY(102%);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.enter-button:hover,
.enter-button:focus-visible {
  color: var(--black);
  transform: translate(-4px, -4px);
  box-shadow: 8px 8px 0 rgba(5, 5, 5, 0.22);
  outline: none;
}

.enter-button:hover::before,
.enter-button:focus-visible::before {
  transform: translateY(0);
}

.enter-button:active {
  transform: translate(0, 0) scale(0.98);
  box-shadow: 2px 2px 0 rgba(5, 5, 5, 0.22);
}

.password-dialog {
  width: min(90vw, 24rem);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 2px solid var(--black);
  border-radius: 1.25rem;
  background: #fff;
  color: var(--black);
  box-shadow: 12px 12px 0 rgba(5, 5, 5, 0.24);
}

.password-dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
}

.password-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 2.5rem 1.8rem 1.8rem;
}

.password-form h1 {
  margin: 1rem 0 1.4rem;
  text-align: center;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.lock-mark {
  width: 3.1rem;
  height: 3.1rem;
  display: grid;
  place-items: center;
  align-self: center;
  border: 2px solid var(--black);
  border-radius: 50%;
  background: var(--acid);
}

.lock-mark svg {
  width: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--black);
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.dialog-close:hover,
.dialog-close:focus-visible {
  background: rgba(5, 5, 5, 0.08);
  transform: rotate(6deg);
  outline: none;
}

.dialog-close svg {
  width: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.password-form input {
  width: 100%;
  min-height: 3.45rem;
  padding: 0 1rem;
  border: 2px solid var(--black);
  border-radius: 0.8rem;
  background: #fff;
  color: var(--black);
  font-size: 1rem;
  outline: none;
}

.password-form input::placeholder {
  color: #777;
}

.password-form input:focus {
  box-shadow: 4px 4px 0 rgba(5, 5, 5, 0.18);
}

.password-form input[aria-invalid="true"] {
  border-color: var(--error);
}

.password-error {
  min-height: 1.25rem;
  margin: 0.55rem 0 0;
  color: var(--error);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25rem;
  visibility: hidden;
}

.password-error.is-visible {
  visibility: visible;
}

.unlock-button {
  min-height: 3.45rem;
  margin-top: 0.75rem;
  border: 2px solid var(--black);
  border-radius: 0.8rem;
  background: var(--black);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.unlock-button:hover,
.unlock-button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--acid);
  outline: none;
}

.unlock-button:active {
  transform: translate(0, 0);
  box-shadow: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 520px) {
  .top-icons {
    top: 0.9rem;
    gap: 0.55rem;
  }

  .top-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.78rem;
  }

  .top-icon--arxiv {
    width: 4.4rem;
  }

  .gateway {
    gap: 2rem;
    padding: 1.25rem;
    transform: translateY(-2vh);
  }

  .portrait-shell {
    width: min(62vw, 15rem);
  }

  .enter-button {
    min-width: 11.5rem;
    min-height: 3.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
