/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --frost-blue: #6ec6ff;
  --frost-dark: #0d1b2a;
  --frost-mid: #1b2838;
  --frost-light: #e0f0ff;
  --accent: #ff6b35;
  --accent-glow: rgba(255, 107, 53, 0.4);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text: #e0e8f0;
  --text-dim: #8a9bb0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--frost-dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(110, 198, 255, 0.15) 0%, transparent 60%),
    linear-gradient(180deg, #0a1628 0%, #0d1b2a 40%, #12223a 100%);
  text-align: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="white" opacity="0.3"/><circle cx="80" cy="40" r="0.5" fill="white" opacity="0.2"/><circle cx="50" cy="80" r="0.8" fill="white" opacity="0.25"/><circle cx="10" cy="60" r="0.6" fill="white" opacity="0.15"/><circle cx="90" cy="10" r="0.7" fill="white" opacity="0.2"/><circle cx="40" cy="50" r="0.4" fill="white" opacity="0.3"/></svg>');
  animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Аватар */
.avatar-container {
  margin-bottom: 32px;
}

.avatar-ring {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--frost-blue), var(--accent));
  margin: 0 auto;
  animation: ringPulse 3s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 40px var(--accent-glow), 0 0 60px rgba(110, 198, 255, 0.2); }
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--frost-mid), #1e3a5f);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-letter {
  font-size: 64px;
  font-weight: 800;
  color: var(--frost-blue);
  text-shadow: 0 0 20px rgba(110, 198, 255, 0.5);
}

/* Заголовки */
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.highlight {
  background: linear-gradient(135deg, var(--frost-blue), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.hero-divider {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto 16px;
  border-radius: 2px;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Стрелка вниз */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  animation: bounce 2s infinite;
}

.scroll-indicator .arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--frost-blue);
  border-bottom: 2px solid var(--frost-blue);
  transform: rotate(45deg);
  margin: 8px auto 0;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

/* ===== ABOUT SECTION ===== */
.about {
  padding: 100px 0;
  background: linear-gradient(180deg, var(--frost-dark) 0%, #0f2035 100%);
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--accent);
  margin: 16px auto 0;
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-dim);
  margin-top: -40px;
  margin-bottom: 60px;
  font-size: 1.05rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}

.about-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  backdrop-filter: blur(10px);
}

.about-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  border-color: var(--frost-blue);
}

.card-icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.about-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--frost-blue);
}

.about-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ===== GALLERY ===== */
.gallery {
  padding: 100px 0;
  background: linear-gradient(180deg, #0f2035 0%, var(--frost-dark) 100%);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s ease;
}

.gallery-item:hover {
  transform: scale(1.03);
  z-index: 2;
}

.gallery-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-tag {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  width: fit-content;
}

.gallery-overlay p {
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* ===== FOOTER ===== */
.footer {
  padding: 32px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--glass-border);
}

/* ===== SNOWFLAKES (Frostpunk vibe) ===== */
.snowflakes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.snowflake {
  position: absolute;
  top: -10px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  animation: snowfall linear infinite;
}

@keyframes snowfall {
  0% {
    transform: translateY(-10px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0.3;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 180px;
  }

  .gallery-item.large {
    grid-column: span 2;
    grid-row: span 1;
  }

  .gallery-item.wide {
    grid-column: span 2;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }

  .gallery-item.large,
  .gallery-item.wide {
    grid-column: span 1;
  }

  .avatar-ring {
    width: 120px;
    height: 120px;
  }

  .avatar-letter {
    font-size: 48px;
  }
}