﻿:root {
  --bg: #090909;
  --panel: #111111;
  --panel-2: #1a1010;
  --text: #f5eded;
  --muted: #bba9a9;
  --accent: #d12b2b;
  --danger: #ff6a6a;
  --ok: #63db8f;
  --idle: #ffd866;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 14% 18%, #321111 0%, transparent 32%),
    radial-gradient(circle at 83% 8%, #2a0d0d 0%, transparent 28%),
    var(--bg);
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(209, 43, 43, 0.18), transparent 42%),
    radial-gradient(circle at 75% 70%, rgba(145, 22, 22, 0.12), transparent 40%);
  animation: bgShift 18s ease-in-out infinite alternate;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
  padding: 3rem 0 4rem;
  position: relative;
  z-index: 1;
}

.to-top-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(32, 13, 13, 0.85);
  color: #f8eded;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  z-index: 12;
}

.to-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.to-top-btn:hover {
  background: rgba(70, 20, 20, 0.95);
  border-color: rgba(209, 43, 43, 0.95);
}

.hero h1 {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 6vw, 3.6rem);
  animation: titleEnter 0.8s ease both;
}

.hero-intro {
  margin: 0.7rem 0 0;
  color: #f1e7e7;
  font-size: 1.02rem;
  line-height: 1.45;
  animation: fadeUp 0.7s ease both;
}

.hero-tags {
  margin: 0.75rem 0 0;
  color: #dfc7c7;
  line-height: 1.6;
  animation: fadeUp 0.85s ease both;
}

.mini-terminal {
  margin-top: 1rem;
  width: min(620px, 100%);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.92), rgba(21, 11, 11, 0.92));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: fadeUp 0.95s ease both;
}

.terminal-bar {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.7rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
}

.terminal-bar span:nth-child(2) {
  background: #febc2e;
}

.terminal-bar span:nth-child(3) {
  background: #28c840;
}

.terminal-body {
  padding: 0.9rem 1rem 1rem;
  font-family: "Fira Code", "Consolas", monospace;
  font-size: 0.95rem;
  line-height: 1.5;
}

.terminal-body p {
  margin: 0 0 0.75rem;
}

.terminal-body p:last-child {
  margin-bottom: 0;
}

.prompt {
  color: #ff8b8b;
  font-weight: 700;
}

.eyebrow {
  letter-spacing: 0.1em;
  color: var(--accent);
  font-size: 0.8rem;
  margin-bottom: 0.7rem;
  animation: titleEnter 0.6s ease both;
}

.grid {
  margin-top: 2rem;
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr 2fr;
}

.tech-stack {
  margin-top: 2.6rem;
  animation: fadeUp 0.8s ease both;
}

.tech-stack h2 {
  margin: 0 0 0.9rem;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.tech-item {
  position: relative;
  overflow: hidden;
  min-height: 56px;
  border-radius: 10px;
  background: #0b1118;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.85rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
  animation: softRise 0.45s ease both;
}

.tech-item::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.14) 50%, transparent 65%);
  transform: translateX(-130%);
  animation: none;
}

.tech-item:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: rgba(209, 43, 43, 0.9);
  background: #241010;
  box-shadow: 0 8px 18px rgba(209, 43, 43, 0.22);
}

.tech-item:nth-child(1) { animation-delay: 0.03s; }
.tech-item:nth-child(2) { animation-delay: 0.12s; }
.tech-item:nth-child(3) { animation-delay: 0.21s; }
.tech-item:nth-child(4) { animation-delay: 0.3s; }
.tech-item:nth-child(5) { animation-delay: 0.39s; }

.tech-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  opacity: 0.92;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.tech-item:hover .tech-icon {
  transform: translateY(-1px) rotate(-4deg) scale(1.08);
  opacity: 1;
}

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1rem;
  backdrop-filter: blur(4px);
  animation: fadeUp 0.75s ease both;
}

.grid .card:nth-child(2) {
  animation-delay: 0.15s;
}

.discord-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.discord-card::before {
  content: "";
  position: absolute;
  inset: -55% -35%;
  background:
    radial-gradient(circle at 20% 25%, rgba(209, 43, 43, 0.22) 0%, rgba(209, 43, 43, 0) 44%),
    radial-gradient(circle at 75% 15%, rgba(166, 26, 26, 0.17) 0%, rgba(166, 26, 26, 0) 42%),
    radial-gradient(circle at 65% 80%, rgba(255, 102, 102, 0.1) 0%, rgba(255, 102, 102, 0) 45%);
  filter: blur(0.5px) saturate(120%);
  animation: auroraShift 12s ease-in-out infinite alternate;
  pointer-events: none;
}

.discord-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 36%),
    linear-gradient(320deg, rgba(209, 43, 43, 0.11), transparent 40%);
  mix-blend-mode: screen;
  animation: cardSweep 14s ease-in-out infinite;
  pointer-events: none;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.card-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

#github-profile-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
}

.discord-profile {
  margin-top: 1rem;
  display: flex;
  gap: 0.8rem;
  align-items: center;
  position: relative;
  z-index: 1;
  animation: floaty 3.8s ease-in-out infinite;
}

#discord-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: #233441;
  box-shadow: 0 0 0 0 rgba(94, 224, 127, 0.35);
  transition: transform 0.2s ease;
  animation: avatarBreath 2.8s ease-in-out infinite, avatarAura 2s ease-out infinite;
}

.discord-profile h3 {
  margin: 0;
}

.discord-profile p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.status-ping {
  animation: ping 1.3s ease-out infinite;
}

.online { background: var(--ok); }
.idle { background: var(--idle); }
.dnd { background: var(--danger); }
.offline { background: #77828a; }

.spotify {
  margin-top: 0;
  padding: 0 0.8rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition: max-height 0.35s ease, opacity 0.3s ease, transform 0.3s ease, margin-top 0.3s ease, padding 0.3s ease;
}

.spotify.is-active {
  margin-top: 1rem;
  padding: 0.8rem;
  max-height: 130px;
  opacity: 1;
  transform: translateY(0);
}

.spotify .label {
  margin: 0;
  font-size: 0.8rem;
  color: #ff7d7d;
}

.spotify p {
  margin: 0.25rem 0;
}

.note {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.discord-socials {
  margin-top: auto;
  padding-top: 1rem;
  position: relative;
  z-index: 1;
}

.discord-about {
  margin-top: 0.8rem;
  position: relative;
  z-index: 1;
}

.discord-about .hero-intro {
  margin-top: 0.45rem;
  font-size: 0.92rem;
}

.discord-about .hero-tags {
  margin-top: 0.55rem;
  font-size: 0.9rem;
}

.mini-terminal-compact {
  margin-top: 0.7rem;
}

.mini-terminal-compact .terminal-body {
  font-size: 0.82rem;
  line-height: 1.45;
  padding: 0.7rem 0.8rem 0.8rem;
}

.social-title {
  margin: 0 0 0.6rem;
  color: #cfe1ea;
  font-size: 0.88rem;
  font-weight: 700;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.social-link {
  text-decoration: none;
  color: #e7f2f7;
  background: rgba(12, 20, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
  animation: softRise 0.45s ease both;
}

.social-link:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: rgba(209, 43, 43, 0.95);
  background: rgba(64, 20, 20, 0.9);
  box-shadow: 0 8px 18px rgba(209, 43, 43, 0.22);
}

.social-link:nth-child(1) { animation-delay: 0.04s; }
.social-link:nth-child(2) { animation-delay: 0.1s; }
.social-link:nth-child(3) { animation-delay: 0.16s; }
.social-link:nth-child(4) { animation-delay: 0.22s; }

.social-link span {
  line-height: 1;
}

.social-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
  opacity: 0.92;
}

.social-link:hover .social-icon {
  transform: translateY(-1px) rotate(-4deg) scale(1.08);
  opacity: 1;
}

.repo-list {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.65rem;
}

.repo {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
  animation: softRise 0.5s ease both;
}

.repo:hover {
  transform: translateY(-2px);
  border-color: rgba(209, 43, 43, 0.9);
  background: rgba(255, 255, 255, 0.035);
}

.repo:nth-child(1) { animation-delay: 0.04s; }
.repo:nth-child(2) { animation-delay: 0.08s; }
.repo:nth-child(3) { animation-delay: 0.12s; }
.repo:nth-child(4) { animation-delay: 0.16s; }
.repo:nth-child(5) { animation-delay: 0.2s; }
.repo:nth-child(6) { animation-delay: 0.24s; }
.repo:nth-child(7) { animation-delay: 0.28s; }
.repo:nth-child(8) { animation-delay: 0.32s; }

.repo-title {
  margin: 0;
  font-weight: 700;
}

.repo-desc {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.repo-meta {
  margin: 0.45rem 0 0;
  color: #bdd2df;
  font-size: 0.82rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.avatar-pop {
  animation: avatarPop 0.34s ease;
}

.muted {
  color: var(--muted);
}

@media (max-width: 900px) {
  .tech-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 560px) {
  .tech-grid {
    grid-template-columns: 1fr;
  }

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

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(94, 224, 127, 0.5); }
  100% { box-shadow: 0 0 0 9px rgba(94, 224, 127, 0); }
}

@keyframes auroraShift {
  0% { transform: translate3d(-7%, -4%, 0) scale(1) rotate(0deg); opacity: 0.82; }
  35% { transform: translate3d(6%, -2%, 0) scale(1.06) rotate(7deg); opacity: 1; }
  70% { transform: translate3d(4%, 6%, 0) scale(1.02) rotate(-6deg); opacity: 0.9; }
  100% { transform: translate3d(-5%, 3%, 0) scale(1.08) rotate(4deg); opacity: 0.96; }
}

@keyframes floaty {
  0% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

@keyframes avatarPop {
  0% { transform: scale(0.88); }
  80% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes avatarBreath {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes avatarAura {
  0% { box-shadow: 0 0 0 0 rgba(209, 43, 43, 0.35); }
  100% { box-shadow: 0 0 0 12px rgba(209, 43, 43, 0); }
}

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes techIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes techFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

@keyframes shine {
  0% { transform: translateX(-130%); }
  100% { transform: translateX(130%); }
}

@keyframes titleEnter {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes bgShift {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.9; }
  100% { transform: translate3d(1.5%, -1.5%, 0) scale(1.04); opacity: 1; }
}

@keyframes cardSweep {
  0% { background-position: 0% 0%, 0% 0%; opacity: 0.78; }
  50% { background-position: 100% 0%, 0% 100%; opacity: 1; }
  100% { background-position: 0% 0%, 0% 0%; opacity: 0.78; }
}

@keyframes softRise {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
