/* ============================================================
   Токены
   Фактические значения цветов подставляются из config.js (тема
   dark/light) через JS — здесь только дефолтные (тёмная тема),
   чтобы страница не «мигала» без цвета до загрузки app.js.
   ============================================================ */
:root {
  --bg: #0c0d10;
  --bg-soft-1: #1b1e24;
  --bg-soft-2: #0c0d10;
  --surface: #15171c;
  --surface-line: #26292f;
  --text: #ece9e2;
  --text-dim: #8b8d93;
  --accent: #c9a46b;
  --accent-dim: #7a6644;
  --accent-soft: rgba(201, 164, 107, 0.14);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 20px;
}

* { box-sizing: border-box; }

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

body {
  background: var(--bg) radial-gradient(120% 140% at 50% -10%, var(--bg-soft-1) 0%, var(--bg-soft-2) 55%);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: inherit; }

/* subtle grain so the near-black bg doesn't look flat/AI-default */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   Каркас страницы
   ============================================================ */
.stage {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  perspective: 1200px;
}

/* ============================================================
   Карточка (signature element — буквально «визитка», с наклоном)
   ============================================================ */
.card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  background:
    linear-gradient(155deg, #191b20 0%, #121317 60%, #0e0f12 100%);
  border: 1.5px solid var(--surface-line);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  will-change: transform;
}

[data-theme="light"] .card {
  background: linear-gradient(155deg, #ffffff 0%, #f5f7fb 60%, #eef1f6 100%);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(155deg, var(--accent-dim), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card__sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(
    260px circle at var(--mx, 50%) var(--my, 50%),
    var(--accent-soft),
    transparent 60%
  );
}

.card:hover .card__sheen,
.card.is-active .card__sheen {
  opacity: 1;
}

.card__inner {
  position: relative;
  height: 100%;
  padding: clamp(20px, 5vw, 34px);
  display: flex;
  flex-direction: column;
  transform: translateZ(30px);
}

.card__eyebrow {
  margin: 0 0 auto;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent-dim);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 16px;
}

.card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 6vw, 34px);
  line-height: 1.1;
  margin: 14px 0 4px;
  color: var(--text);
}

.card__role {
  margin: 0;
  font-size: 14px;
  color: var(--accent);
  font-weight: 700;
}

.card__tagline {
  margin: 10px 0 0;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-dim);
  max-width: 34ch;
}

.card__rule {
  margin-top: auto;
  height: 1.5px;
  background: linear-gradient(90deg, var(--surface-line), transparent);
}

.card__hint {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  opacity: 0.6;
}

@media (hover: none) {
  .card__hint { display: none; }
}

/* ============================================================
   Переключатель темы (длинный ползунок под визиткой)
   ============================================================ */
.theme-switch {
  position: relative;
  width: 100%;
  height: 48px;
  display: flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid var(--surface-line);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.theme-switch__thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: linear-gradient(155deg, var(--accent), var(--accent-dim));
  transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 1);
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .theme-switch__thumb {
  transform: translateX(100%);
}

.theme-switch__btn {
  position: relative;
  z-index: 1;
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.3s ease;
}

.theme-switch__btn.is-active {
  color: var(--bg);
}

.theme-switch__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 999px;
}

/* ============================================================
   Контакты
   ============================================================ */
.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1.5px solid var(--surface-line);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.link-item:hover,
.link-item:focus-visible {
  border-color: var(--accent-dim);
  background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
  transform: translateY(-1px);
}

.link-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.link-item__icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.link-item__icon svg {
  width: 17px;
  height: 17px;
}

.link-item__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.link-item__label {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.link-item__value {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-item__arrow {
  margin-left: auto;
  flex: 0 0 auto;
  color: var(--text-dim);
  transition: transform 0.2s ease, color 0.2s ease;
}

.link-item:hover .link-item__arrow {
  transform: translate(2px, -2px);
  color: var(--accent);
}

/* ============================================================
   Подвал
   ============================================================ */
.footer {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}

/* ============================================================
   Декоративная кнопка «Скачать»
   ============================================================ */
.download-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  margin-top: 2px;
  border-radius: 12px;
  background: linear-gradient(155deg, var(--accent-soft), transparent);
  border: 1.5px solid var(--accent-dim);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.download-btn:hover,
.download-btn:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.download-btn:active {
  transform: translateY(0);
}

.download-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.download-btn__icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .card,
  .link-item,
  .link-item__arrow,
  .download-btn,
  .theme-switch__thumb {
    transition: none !important;
    transform: none !important;
  }
}
