/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:         #0e0305;
  --bg2:        #150608;
  --bg-card:    #1a0709;
  --red:        #c0001a;
  --red-neon:   #ff0033;
  --red-glow:   rgba(255, 0, 40, 0.55);
  --red-soft:   rgba(192, 0, 26, 0.18);
  --blue-acc:   #7b8fff;
  --purple-acc: #c084fc;
  --text:       #f0dde0;
  --text-muted: #8a6a6e;
  --border:     rgba(192, 0, 26, 0.3);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url('https://cdn.discordapp.com/avatars/1405108901510254612/6a0e24117d32b695a8e5887c6e9d9cde.png?size=1024');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.12;
  filter: blur(8px) saturate(0.5);
  pointer-events: none;
}

/* ===== NOISE OVERLAY ===== */
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 150px;
}

/* ===== NEON BORDER GLOW ===== */
.glow-border {
  display: none;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px 40px;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(192,0,26,0.22) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* ===== AVATAR ===== */
.avatar-wrap {
  position: relative;
  width: 120px;
  height: 120px;
}

.avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  animation: ring-pulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ring-pulse {
  0%, 100% { box-shadow: 0 0 20px var(--red-glow), 0 0 40px rgba(255,0,40,0.2); }
  50%       { box-shadow: 0 0 35px var(--red-glow), 0 0 70px rgba(255,0,40,0.35); }
}

.avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a0a0e 0%, #1a0709 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Unbounded', sans-serif;
  font-size: 48px;
  color: var(--red-neon);
  text-shadow: 0 0 20px var(--red-glow);
  user-select: none;
}

.avatar-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 0.4s ease,
    box-shadow 0.4s ease;
  filter: brightness(0.95) saturate(1.1);
}

.avatar-wrap:hover .avatar-img {
  transform: scale(1.1) rotate(4deg);
  filter: brightness(1.1) saturate(1.4) drop-shadow(0 0 16px rgba(255, 0, 40, 0.7));
  box-shadow: 0 0 30px rgba(255, 0, 40, 0.5);
}

.avatar-wrap:hover .avatar-ring {
  box-shadow: 0 0 50px var(--red-glow), 0 0 90px rgba(255,0,40,0.4);
  border-color: #ff4466;
  animation: none;
}

/* ===== HERO TEXT ===== */
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.name {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(48px, 10vw, 80px);
  font-weight: 900;
  color: var(--blue-acc);
  text-shadow:
    0 0 10px rgba(123, 143, 255, 0.8),
    0 0 30px rgba(123, 143, 255, 0.4),
    0 0 60px rgba(123, 143, 255, 0.2);
  letter-spacing: -1px;
  line-height: 1;
}

.handle {
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.handle .dot {
  color: var(--red-neon);
  margin: 0 6px;
}

.handle .emoji {
  margin-left: 6px;
}

.tagline {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 4px;
}

.accent {
  color: var(--red-neon);
  text-shadow: 0 0 10px var(--red-glow);
}

.scroll-hint {
  margin-top: 60px;
  color: var(--red-neon);
  font-size: 20px;
  opacity: 0.5;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

/* ===== MUSIC BUTTON ===== */
.music-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(10, 2, 3, 0.85);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

.music-btn:hover {
  border-color: var(--red-neon);
  color: var(--red-neon);
  box-shadow: 0 0 14px rgba(255,0,40,0.25);
}

.music-btn.muted {
  opacity: 0.5;
}

.music-icon {
  font-size: 14px;
  animation: music-pulse 1.5s ease-in-out infinite;
}

.music-btn.muted .music-icon {
  animation: none;
}

@keyframes music-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@media (max-width: 600px) {
  .music-btn { bottom: 16px; right: 16px; padding: 7px 12px; font-size: 11px; }
}

/* ===== AVATAR DECORATION ===== */
.avatar-decoration {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  pointer-events: none;
  z-index: 3;
}

/* ===== GUILD BADGE ===== */
.guild-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(192,0,26,0.12);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px 3px 6px;
  margin-top: 2px;
  width: fit-content;
}

.guild-badge-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
}

.guild-badge-tag {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  font-family: 'JetBrains Mono', monospace;
}

/* ===== STATUS DOT ===== */
.status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 4px solid var(--bg);
  background: #23a55a;
  transition: background 0.4s ease, box-shadow 0.4s ease;
  z-index: 3;
}
.status-dot.online  { background: #23a55a; box-shadow: 0 0 10px rgba(35,165,90,0.8); }
.status-dot.idle    { background: #f0b232; box-shadow: 0 0 10px rgba(240,178,50,0.8); }
.status-dot.dnd     { background: #f23f43; box-shadow: 0 0 10px rgba(242,63,67,0.8); }
.status-dot.offline { background: #747f8d; box-shadow: none; }

/* ===== TIME WIDGET ===== */
.time-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 24px;
  padding: 14px 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(192, 0, 26, 0.05);
  backdrop-filter: blur(4px);
}

.time-city {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.time-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 700;
  color: var(--red-neon);
  text-shadow: 0 0 14px var(--red-glow);
  letter-spacing: 0.05em;
  line-height: 1;
}

.time-date {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ===== SECTIONS ===== */
.section {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
  padding: 80px 24px;
}

.section-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

/* ===== CARD ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 0 30px rgba(192,0,26,0.08);
  line-height: 1.7;
  font-size: 15px;
  color: var(--text);
}

.card strong {
  color: var(--blue-acc);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag {
  background: rgba(192,0,26,0.15);
  border: 1px solid var(--border);
  color: var(--red-neon);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

/* ===== PROJECTS GRID ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.project-card:hover {
  border-color: var(--red-neon);
  box-shadow: 0 0 24px rgba(255,0,40,0.2);
  transform: translateY(-4px);
}

.project-icon {
  font-size: 28px;
}

.project-card h3 {
  font-family: 'Unbounded', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.project-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.25s;
  background: var(--red-neon);
  color: #0e0305;
  border: none;
  box-shadow: 0 0 14px rgba(255,0,40,0.4);
  width: fit-content;
}

.btn:hover {
  box-shadow: 0 0 28px rgba(255,0,40,0.7);
  transform: scale(1.04);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-ghost:hover {
  border-color: var(--red-neon);
  color: var(--red-neon);
  box-shadow: 0 0 12px rgba(255,0,40,0.2);
}

/* ===== CONTACT ===== */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 24px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
}

.contact-item:hover {
  border-color: var(--red-neon);
  box-shadow: 0 0 20px rgba(255,0,40,0.18);
  transform: translateX(4px);
}

.contact-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.contact-arrow {
  margin-left: auto;
  color: var(--red-neon);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}

.contact-item:hover .contact-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* ===== FOOTER ===== */
footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 24px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--red);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--red-neon); }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  /* Hero */
  .hero { padding: 80px 16px 32px; min-height: 100svh; }
  .hero-inner { gap: 20px; }
  .hero::before { width: 320px; height: 320px; }

  /* Avatar */
  .avatar-wrap { width: 96px; height: 96px; }
  .avatar-img  { width: 96px; height: 96px; }
  .avatar-placeholder { width: 96px; height: 96px; font-size: 36px; }
  .avatar-ring { inset: -3px; }

  /* Имя */
  .name { font-size: clamp(40px, 14vw, 56px); }
  .handle { font-size: 13px; }
  .tagline { font-size: 14px; }
  .scroll-hint { margin-top: 36px; }

  /* Секции */
  .section { padding: 48px 16px; }
  .section-title { font-size: 18px; margin-bottom: 24px; }

  /* Карточки */
  .card { padding: 18px 16px; font-size: 14px; }
  .projects-grid { grid-template-columns: 1fr; gap: 14px; }
  .project-card { padding: 20px 16px; }
  .project-card h3 { font-size: 15px; }

  /* Кнопки */
  .btn { padding: 10px 16px; font-size: 12px; width: 100%; text-align: center; }

  /* Контакты */
  .contact-item { padding: 14px 14px; font-size: 13px; gap: 12px; }
  .contact-arrow { opacity: 1; }

  /* Теги */
  .tag { font-size: 11px; padding: 4px 10px; }

  /* Footer */
  footer { padding: 28px 16px; font-size: 11px; }
}

/* Очень маленькие экраны */
@media (max-width: 380px) {
  .name { font-size: 36px; }
  .handle { font-size: 12px; }
  .section { padding: 40px 12px; }
}

/* Убираем hover-эффекты на тач-устройствах */
@media (hover: none) {
  .project-card:hover { transform: none; box-shadow: none; border-color: var(--border); }
  .contact-item:hover { transform: none; }
  .btn:hover { transform: none; }
  .avatar-wrap:hover .avatar-img { transform: none; filter: brightness(0.95) saturate(1.1); box-shadow: none; }
  .avatar-wrap:hover .avatar-ring { box-shadow: 0 0 20px var(--red-glow), 0 0 40px rgba(255,0,40,0.2); border-color: var(--red-neon); animation: ring-pulse 3s ease-in-out infinite; }
}
