:root {
  --bg: #0e0d0f;
  --bg-soft: #141216;
  --card: #1a181d;
  --line: rgba(255, 255, 255, 0.07);
  --text: #f3eff1;
  --muted: #a29aa3;
  --accent: #e5484d;
  --accent-2: #ff7a5c;
  --radius: 18px;
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg-soft);
}

body {
  font-family: var(--font-body);
  background: linear-gradient(
    180deg,
    var(--bg-soft) 0%,
    var(--bg) clamp(520px, 72vw, 820px),
    var(--bg) 100%
  );
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.hero,
.gallery-wrap,
.footer {
  position: relative;
  z-index: 1;
}

.decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.decor-symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.decor__item {
  position: absolute;
  height: auto;
  will-change: transform;
  filter: saturate(0.9);
}

@media (max-width: 700px) {
  .decor__item {
    opacity: calc(var(--decor-opacity, 0.07) * 0.85);
  }
}

.hero {
  position: relative;
  padding: clamp(64px, 10vw, 120px) 24px clamp(48px, 7vw, 88px);
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
}

.hero__glow--1 {
  width: 420px;
  height: 420px;
  top: -160px;
  left: 50%;
  transform: translateX(-80%);
  background: radial-gradient(circle, var(--accent), transparent 65%);
}

.hero__glow--2 {
  width: 360px;
  height: 360px;
  top: -80px;
  left: 50%;
  transform: translateX(10%);
  background: radial-gradient(circle, #6c2bd9, transparent 65%);
  opacity: 0.25;
}

.hero__inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.hero__avatar {
  width: clamp(88px, 14vw, 120px);
  height: clamp(88px, 14vw, 120px);
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 120deg, var(--accent), #ff9d6c, #d24bd8, var(--accent));
  box-shadow: 0 0 0 6px rgba(229, 72, 77, 0.08), var(--shadow);
}

.hero__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 5.5vw, 3rem);
  letter-spacing: 0.01em;
  background: linear-gradient(100deg, #fff 20%, #ffb4a6 55%, var(--accent) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__desc {
  max-width: 420px;
  color: var(--muted);
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.stat-chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.85rem;
  color: var(--muted);
  backdrop-filter: blur(6px);
}

.stat-chip strong {
  color: var(--text);
  font-weight: 600;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(229, 72, 77, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(229, 72, 77, 0.45);
}

.gallery-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(14px, 3vw, 32px);
}

.gallery {
  columns: 1;
  column-gap: 16px;
}

@media (min-width: 560px) {
  .gallery { columns: 2; }
}

@media (min-width: 900px) {
  .gallery { columns: 3; }
}

@media (min-width: 1280px) {
  .gallery { columns: 4; }
}

.card {
  position: relative;
  break-inside: avoid;
  margin: 0 0 16px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  cursor: zoom-in;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

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

.card:hover,
.card:focus-visible {
  box-shadow: var(--shadow);
  border-color: rgba(229, 72, 77, 0.35);
}

.card__frame {
  position: relative;
  background: linear-gradient(110deg, #17161a 30%, #221f26 45%, #17161a 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.card__img {
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.card__img.is-loaded {
  opacity: 1;
}

.card.is-loaded .card__frame {
  animation: none;
  background: none;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px;
  background: linear-gradient(180deg, transparent 45%, rgba(10, 9, 11, 0.88) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover .card__overlay,
.card:focus-visible .card__overlay {
  opacity: 1;
}

.card__caption {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
}

.card__reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  font-size: 0.75rem;
  color: #fff;
}

.card__chip--views svg {
  opacity: 0.85;
}

.gallery__end {
  text-align: center;
  padding: 32px 0 8px;
  color: var(--muted);
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 1s ease;
}

.gallery__end.is-visible {
  opacity: 1;
}

.footer {
  padding: 36px 24px 48px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
}

.footer a {
  font-weight: 500;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 3vw, 40px);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.is-open {
  visibility: visible;
  opacity: 1;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 7, 9, 0.92);
  backdrop-filter: blur(10px);
}

.lightbox__figure {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: min(1000px, 100%);
  max-height: 100%;
}

.lightbox__img {
  max-width: 100%;
  max-height: min(76vh, 100%);
  width: auto;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  user-select: none;
}

.lightbox__caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: min(640px, 100%);
  text-align: center;
}

.lightbox__text {
  font-size: 0.95rem;
  color: #eae5e8;
  white-space: pre-line;
}

.lightbox__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--muted);
}

.lightbox__views {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.lightbox__views svg {
  width: 14px;
  height: 14px;
}

.lightbox__reactions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.lightbox__reactions .card__chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  transition: background 0.25s ease, transform 0.25s ease;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(229, 72, 77, 0.35);
  transform: scale(1.08);
}

.lightbox__close {
  top: clamp(12px, 3vw, 28px);
  right: clamp(12px, 3vw, 28px);
  width: 44px;
  height: 44px;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
}

.lightbox__nav--prev { left: clamp(10px, 3vw, 28px); }
.lightbox__nav--next { right: clamp(10px, 3vw, 28px); }

.lightbox__nav--prev:hover { transform: translateY(-50%) scale(1.08); }
.lightbox__nav--next:hover { transform: translateY(-50%) scale(1.08); }

@media (max-width: 560px) {
  .lightbox__nav {
    top: auto;
    bottom: 18px;
    transform: none;
    width: 46px;
    height: 46px;
  }

  .lightbox__nav--prev { left: calc(50% - 60px); }
  .lightbox__nav--next { right: calc(50% - 60px); }

  .lightbox__nav--prev:hover,
  .lightbox__nav--next:hover {
    transform: scale(1.08);
  }

  .lightbox__figure {
    gap: 10px;
  }

  .lightbox__img {
    max-height: 66vh;
  }
}

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

  html {
    scroll-behavior: auto;
  }
}
