:root {
  /* colors */

  /* graphite */
  --graphite-950: #121416;
  --graphite-900: #181b1e;
  --graphite-800: #212529;
  --graphite-700: #2c3136;
  --graphite-600: #3a4047;
  --graphite-400: #6b737c;
  --graphite-200: #b5bcc3;
  --graphite-100: #dde1e5;

  /* acid */
  --acid-300: #d4ff66;
  --acid-400: #c2ff33;
  --acid-500: #a8ff00;
  --acid-600: #86cc00;
  --acid-900: #2a4000;

  /* font */
  --font: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 6px;
  --nav-h: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--graphite-900);
  color: var(--graphite-100);
  font-family: var(--font);
  line-height: 1.6;
}

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

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.accent {
  color: var(--acid-500);
}

/* background */

.bg-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;
  pointer-events: none;
}

.navbar,
.main,
.footer {
  position: relative;
  z-index: 1;
}

/* nav */

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(18, 20, 22, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--graphite-700);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo__accent {
  color: var(--acid-500);
}

.logo__bracket {
  color: var(--graphite-400);
}

.nav__list {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav__link {
  position: relative;
  display: block;
  padding: 8px 12px;
  color: var(--graphite-200);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--acid-500);
  box-shadow: 0 0 8px var(--acid-500);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.nav__link:hover {
  color: var(--acid-400);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
}

.nav__link.is-active {
  color: var(--acid-500);
}

.logo {
  transition: text-shadow 0.25s;
}

/* logo */

.logo:hover {
  text-shadow: 0 0 12px rgba(168, 255, 0, 0.5);
}

.logo {
  display: inline-flex;
  align-items: center;
}

.logo__bracket {
  display: inline-block;
  animation: 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.logo__bracket--l {
  animation-name: bracket-l;
}

.logo__bracket--r {
  animation-name: bracket-r;
}

.logo__text {
  display: inline-block;
  animation: logo-text 0.6s 0.25s ease both;
}

@keyframes bracket-l {
  from {
    opacity: 0;
    transform: translateX(3.2em);
  }
}

@keyframes bracket-r {
  from {
    opacity: 0;
    transform: translateX(-3.2em);
  }
}

@keyframes logo-text {
  from {
    opacity: 0;
    clip-path: inset(0 50%);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0);
    filter: none;
  }
}

.nav__list li {
  animation: nav-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(0.5s + var(--i, 0) * 0.08s);
}

@keyframes nav-in {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
}

@media (max-width: 760px) {
  .navbar__inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    height: auto;
    padding-top: 12px;
  }

  .nav {
    width: calc(100% + 32px);
    margin: 4px -16px 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav__list {
    padding: 0 4px 4px;
    white-space: nowrap;
  }
}

/* main */

.main {
  flex: 1;
}

.hero {
  padding-top: 120px;
  padding-bottom: 100px;
}

.hero__prompt {
  color: var(--acid-600);
  margin-bottom: 16px;
}

.cursor {
  animation: blink 1s steps(1) infinite;
}

.typed {
  color: var(--graphite-100);
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero__title {
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero__title .accent {
  text-shadow: 0 0 24px rgba(168, 255, 0, 0.35);
  animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
  50% {
    text-shadow: 0 0 36px rgba(168, 255, 0, 0.6);
  }
}

.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.glitch::before {
  color: var(--acid-300);
  animation: glitch-a 4s steps(1) infinite;
}

.glitch::after {
  color: var(--acid-900);
  animation: glitch-b 4s steps(1) infinite;
}

@keyframes glitch-a {
  0%, 89%, 100% { opacity: 0; transform: none; clip-path: none; }
  90% { opacity: 0.8; transform: translate(-3px, -2px); clip-path: inset(10% 0 55% 0); }
  93% { opacity: 0.8; transform: translate(3px, 1px); clip-path: inset(60% 0 5% 0); }
  96% { opacity: 0.8; transform: translate(-2px, 2px); clip-path: inset(30% 0 40% 0); }
}

@keyframes glitch-b {
  0%, 90%, 100% { opacity: 0; transform: none; clip-path: none; }
  91% { opacity: 0.9; transform: translate(3px, 2px); clip-path: inset(45% 0 20% 0); }
  94% { opacity: 0.9; transform: translate(-3px, -1px); clip-path: inset(5% 0 70% 0); }
  97% { opacity: 0.9; transform: translate(2px, -2px); clip-path: inset(70% 0 10% 0); }
}

.hero__subtitle {
  color: var(--graphite-400);
  font-size: 1.1rem;
}

.about {
  padding-bottom: 100px;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.about p {
  max-width: 760px;
  margin-bottom: 16px;
  color: var(--graphite-200);
}

/* pages */

.view[hidden] {
  display: none;
}

.page {
  padding-top: 80px;
  padding-bottom: 100px;
}

.page__prompt {
  color: var(--acid-600);
  margin-bottom: 12px;
}

.page__lead {
  max-width: 640px;
  margin-bottom: 40px;
  color: var(--graphite-200);
}

.terminal {
  max-width: 640px;
  padding: 20px;
  background: var(--graphite-950);
  border: 1px solid var(--graphite-700);
  border-radius: var(--radius);
  color: var(--graphite-200);
  font: inherit;
  white-space: pre-wrap;
}

/* cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  padding: 24px;
  background: rgba(33, 37, 41, 0.85);
  border: 1px solid var(--graphite-700);
  border-radius: var(--radius);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--acid-600);
  box-shadow: 0 8px 28px rgba(168, 255, 0, 0.12);
}

.card__avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  background: var(--graphite-900);
  border: 1px solid var(--acid-600);
  border-radius: var(--radius);
  color: var(--acid-500);
  font-weight: 800;
  font-size: 1.1rem;
  overflow: hidden;
  transition: box-shadow 0.25s;
}

.card__avatar .icon {
  width: 30px;
  height: 30px;
}

.card:hover .card__avatar {
  box-shadow: 0 0 14px rgba(168, 255, 0, 0.45);
}

.card__nick {
  font-size: 1.15rem;
}

.card__nick:empty {
  display: none;
}

.card__nick::before {
  content: "@";
  color: var(--graphite-400);
}

.card__role {
  margin-bottom: 12px;
  color: var(--acid-600);
  font-size: 0.85rem;
}

.card__bio {
  margin-bottom: 16px;
  color: var(--graphite-200);
  font-size: 0.9rem;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}

.card__tags li {
  padding: 2px 8px;
  border: 1px solid var(--graphite-600);
  border-radius: 4px;
  color: var(--graphite-400);
  font-size: 0.75rem;
}

.secret__img {
  display: block;
  width: min(420px, 100%);
  border: 1px solid var(--acid-600);
  border-radius: var(--radius);
  box-shadow: 0 0 30px rgba(168, 255, 0, 0.15);
}

/* anim */

.anim-in {
  opacity: 0;
  animation: fade-up 0.7s ease forwards;
  animation-delay: calc(var(--d, 0) * 0.15s);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.about .reveal:nth-child(3) { transition-delay: 0.1s; }
.about .reveal:nth-child(4) { transition-delay: 0.2s; }

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

  .anim-in,
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* footer */

.footer {
  border-top: 1px solid var(--graphite-700);
  background: var(--graphite-950);
  font-size: 0.875rem;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}

.footer__muted {
  color: var(--graphite-400);
}

/* admin form */

.admin-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  flex-direction: row;
}

.admin-form__message {
  flex-basis: 100%;
  min-height: 1.6em;
  margin-top: 8px;
  color: var(--acid-400);
}

.admin-form__label {
  margin-right: 8px;
  color: var(--graphite-200);
}

.admin-form__input {
  padding: 6px 8px;
  border: 1px solid var(--graphite-700);
  border-radius: var(--radius);
  background: var(--graphite-900);
  color: var(--graphite-100);
  margin-right: 8px;
  -webkit-text-security: disc;
}

.admin-form__button {
  padding: 6px 12px;
  border: 1px solid var(--graphite-700);
  border-radius: var(--radius);
  background: var(--graphite-900);
  color: var(--acid-400);
  font: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.admin-panel__cards {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

.admin-editor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--graphite-700);
  border-radius: var(--radius);
}

.admin-editor legend {
  padding: 0 8px;
  color: var(--acid-400);
}

.admin-editor__field {
  display: grid;
  gap: 4px;
  color: var(--graphite-200);
  font-size: 0.85rem;
}

.admin-editor__field input,
.admin-editor__field textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--graphite-700);
  border-radius: var(--radius);
  background: var(--graphite-900);
  color: var(--graphite-100);
  font: inherit;
}

.admin-editor__field input {
  height: 42px;
}

.admin-editor__field textarea {
  min-height: 150px;
  resize: vertical;
}

.admin-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-form__button:hover {
  background: var(--graphite-800);
}

.admin-form__button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.admin-editor__remove {
  justify-self: start;
  align-self: end;
}

/* icons */

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: block;
  color: var(--acid-500);
}

/* icon picker */

.icon-picker {
  position: relative;
}

.icon-picker__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--graphite-700);
  border-radius: var(--radius);
  background: var(--graphite-900);
  color: var(--graphite-400);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s;
}

.icon-picker__toggle:hover,
.icon-picker__toggle[aria-expanded="true"] {
  border-color: var(--acid-600);
}

.icon-picker__toggle .icon {
  width: 24px;
  height: 24px;
}

.icon-picker__caret {
  color: var(--graphite-400);
  font-size: 0.8rem;
}

.icon-picker__grid {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(7, 40px);
  gap: 6px;
  padding: 10px;
  background: var(--graphite-800);
  border: 1px solid var(--graphite-600);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.icon-picker__grid[hidden] {
  display: none;
}

.icon-picker__option {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--graphite-900);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.icon-picker__option .icon {
  width: 22px;
  height: 22px;
}

.icon-picker__option:hover,
.icon-picker__option:focus-visible {
  border-color: var(--acid-600);
}

.icon-picker__option.is-selected {
  border-color: var(--acid-500);
  box-shadow: 0 0 10px rgba(168, 255, 0, 0.35);
}

@media (max-width: 760px) {
  .icon-picker__grid {
    grid-template-columns: repeat(5, 40px);
  }
}

/* тройной клик по подписи не должен выделять текст */
#footerSign {
  user-select: none;
}
