/* =========================================================
   AI-Эксперт — Link in bio
   Native CSS. No external dependencies, no frameworks.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Brand */
  --color-accent:        #5f8392;
  --color-accent-deep:   #4a6b78;
  --color-accent-glow:   rgba(95, 131, 146, .35);

  /* Surfaces (light) */
  --color-bg:            #e9ecf4;
  --color-bg-2:          #dfe4ee;
  --color-surface:       rgba(255, 255, 255, .62);
  --color-surface-solid: #ffffff;
  --color-border:        rgba(23, 5, 0, .08);

  /* Text */
  --color-text:          #170500;
  --color-text-muted:    #5a5550;

  /* Effects */
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(23, 5, 0, .06);
  --shadow-md: 0 8px 30px rgba(23, 5, 0, .10);
  --shadow-lg: 0 18px 50px rgba(23, 5, 0, .14);
  --shadow-accent: 0 10px 28px var(--color-accent-glow);
  --blur: blur(16px);

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: .25s;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg:            #141a20;
    --color-bg-2:          #0e1318;
    --color-surface:       rgba(34, 44, 52, .55);
    --color-surface-solid: #1b232a;
    --color-border:        rgba(255, 255, 255, .10);
    --color-text:          #f2f5f8;
    --color-text-muted:    #a7b1ba;
    --color-accent:        #7ba3b3;
    --color-accent-deep:   #5f8392;
    --color-accent-glow:   rgba(123, 163, 179, .30);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, .45);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-text);
  background: linear-gradient(165deg, var(--color-bg) 0%, var(--color-bg-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
h1, h2, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Decorative background ---------- */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .5;
}
.blob--1 { width: 340px; height: 340px; top: -90px; left: -80px;  background: var(--color-accent-glow); }
.blob--2 { width: 280px; height: 280px; top: 38%;   right: -110px; background: rgba(124, 154, 168, .28); }
.blob--3 { width: 300px; height: 300px; bottom: -100px; left: 30%; background: var(--color-accent-glow); opacity: .35; }

/* ---------- Layout ---------- */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: clamp(28px, 7vw, 56px) 20px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card {
  width: 100%;
  background: var(--color-surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ---------- Profile ---------- */
.profile {
  text-align: center;
  padding: 40px 28px 34px;
}
.avatar {
  position: relative;
  width: 124px;
  height: 124px;
  margin: 0 auto 22px;
}
.avatar__img {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-surface-solid);
  box-shadow: 0 0 0 4px var(--color-accent-glow), var(--shadow-md);
}
.avatar__badge {
  position: absolute;
  right: 2px;
  bottom: 4px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--color-accent);
  border: 3px solid var(--color-surface-solid);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}
.profile__name {
  font-size: clamp(1.45rem, 5vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 10px;
}
.profile__name .flag { font-weight: 400; }
.profile__descr {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 30ch;
  margin: 0 auto;
}

/* ---------- CTA button ---------- */
.cta {
  width: 100%;
  margin-top: 22px;
  text-align: center;
}
.btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 16px 24px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: .04em;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}
.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-deep) 100%);
  box-shadow: var(--shadow-accent), var(--shadow-sm);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px var(--color-accent-glow); }
.btn--primary:active { transform: translateY(0) scale(.985); }
.btn__icon { flex-shrink: 0; }
.btn__shine {
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg);
  animation: shine 3.6s var(--ease) infinite;
}
@keyframes shine {
  0%, 55% { left: -60%; }
  100%    { left: 130%; }
}
.cta__hint {
  margin-top: 12px;
  font-size: .85rem;
  color: var(--color-text-muted);
}

/* ---------- Divider ---------- */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(220px, 70%);
  margin: 38px auto;
  color: var(--color-accent);
}
.divider__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: .6;
}
.divider__icon { flex-shrink: 0; }

/* ---------- Gallery ---------- */
.gallery {
  width: 100%;
  text-align: center;
}
.gallery__title {
  font-size: clamp(1.25rem, 4.6vw, 1.5rem);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 14px;
}
.gallery__title strong { font-weight: 700; }
.gallery__descr {
  font-size: .97rem;
  color: var(--color-text-muted);
  max-width: 42ch;
  margin: 0 auto 28px;
}

/* ---------- Slider ---------- */
.slider {
  position: relative;
  width: 100%;
}
.slider__viewport {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.slider__track {
  display: flex;
  transition: transform .4s var(--ease);
  will-change: transform;
}
.slide {
  flex: 0 0 100%;
  min-width: 100%;
}
.slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 702 / 644;
  object-fit: cover;
}

.slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--color-text);
  background: var(--color-surface-solid);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: .92;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}
.slider__arrow:hover { transform: translateY(-50%) scale(1.08); opacity: 1; }
.slider__arrow:active { transform: translateY(-50%) scale(.94); }
.slider__arrow--prev { left: 10px; }
.slider__arrow--next { right: 10px; }

.slider__dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
}
.slider__dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: .3;
  cursor: pointer;
  transition: opacity var(--dur) var(--ease), width var(--dur) var(--ease),
              border-radius var(--dur) var(--ease);
}
.slider__dots button.is-active {
  opacity: 1;
  width: 24px;
  border-radius: var(--radius-pill);
}
/* Enlarge dot tap target without enlarging the visual dot */
.slider__dots li { display: flex; }
.slider__dots button { position: relative; }
.slider__dots button::after {
  content: "";
  position: absolute;
  inset: -14px;
}

/* ---------- Reveal on load ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal .6s var(--ease) forwards;
}
.profile.reveal { animation-delay: .05s; }
.gallery.reveal { animation-delay: .2s; }
@keyframes reveal {
  to { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (min-width: 600px) {
  .page { max-width: 560px; }
  .slider__arrow--prev { left: -14px; }
  .slider__arrow--next { right: -14px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .btn__shine { display: none; }
  .slider__track { transition: none; }
}
