:root {
  --bg: #0d1117;
  --bg-elevated: #161b22;
  --border: #30363d;
  --border-hover: #6e7681;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #d97757;
  --accent-soft: rgba(217, 119, 87, 0.14);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Hero (index) ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 6vw, 3.5rem);
  padding: 2rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68vw;
  height: 68vw;
  max-width: 780px;
  max-height: 780px;
  transform: translate(-50%, -50%) scale(1);
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none;
  animation: breathe 6s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.85;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.12);
    opacity: 1;
  }
}

.hero-text {
  position: relative;
  margin: 0;
  text-align: center;
  font-weight: 600;
  line-height: 1.15;
}

.line {
  display: block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(10px);
  animation: revealIn 0.9s cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
}

.line-1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  color: var(--text);
  animation-delay: 0.15s;
}

.line-2 {
  font-size: clamp(1.3rem, 3.4vw, 1.9rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 0.4rem;
  animation-delay: 0.5s;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 4px;
  background: var(--accent);
  vertical-align: -0.15em;
  animation: blink 1.1s steps(1) infinite;
}

.hero-actions {
  position: relative;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(10px);
  animation: revealIn 0.9s cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
  animation-delay: 1.1s;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  background: var(--bg-elevated);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
  transform: translateY(-1px);
}

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

@keyframes revealIn {
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes blink {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .line, .hero-actions, .reveal {
    animation: none;
    opacity: 1;
    filter: none;
    transform: none;
  }
  .cursor, .hero-glow {
    animation: none;
  }
}

.reveal {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(10px);
  animation: revealIn 0.9s cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
}

.reveal-1 { animation-delay: 0.15s; }
.reveal-2 { animation-delay: 0.5s; }
.reveal-3 { animation-delay: 0.9s; }

/* ---------- Subpages (socials / projects) ---------- */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.2rem;
  padding: 3rem 1.5rem;
  text-align: center;
}

.page-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  margin: 0;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 420px;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-elevated);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.social-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
  transform: translateY(-2px);
}

.social-card i {
  font-size: 1.6rem;
}

.social-card.telegram i { color: #58a6ff; }
.social-card.github i { color: var(--text); }
.social-card.tiktok i { color: #f2f2f2; }
.social-card.steam i { color: #8b949e; }

.back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.back-link:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

.empty-state {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 380px;
  line-height: 1.5;
}
