/*
  AZYRO Portfolio — clean, animated, not-template.
  - Space Grotesk (UI) + Bebas Neue (headline)
  - subtle grain + glass
  - reveal animations + micro interactions
*/

:root {
  --bg-0: #000000;
  --bg-1: #050505;
  --card: rgba(255, 255, 255, 0.06);
  --card-2: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.14);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.64);
  --faint: rgba(255, 255, 255, 0.42);
  --primary: #ffffff;
  --primary-2: #ffffff;
  --accent: #ffffff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  --r: 22px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg-0);
  overflow-x: hidden;
}

/* subtle grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* ============ Loading ============ */
@keyframes fadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg-0);
  z-index: 9999;
  animation: fadeOut 0.8s ease 1.8s forwards;
}

.loader {
  text-align: center;
}

.spinner {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.10);
  border-top-color: rgba(255, 255, 255, 0.92);
  animation: spin 0.9s linear infinite;
  margin: 0 auto 18px;
}

.loading-screen p {
  font-family: "Bebas Neue", system-ui;
  font-size: 40px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.95);
}

/* ============ Layout ============ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px;
}

section {
  padding: 88px 0;
}

.section-title {
  font-size: 40px;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 18px;
}

/* ============ Navbar ============ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 14px 0;
  background: rgba(5, 6, 10, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.nav-logo {
  font-family: "Bebas Neue", system-ui;
  font-size: 28px;
  letter-spacing: 0.10em;
  text-decoration: none;
  color: var(--text);
  position: relative;
}

.nav-logo::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  opacity: 0.55;
  transform: scaleX(0.0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.nav-logo:hover::after {
  transform: scaleX(1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 999px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 92px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

#canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 18px;
}

@keyframes titleGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(106, 228, 255, 0.0)); }
  50% { filter: drop-shadow(0 14px 40px rgba(106, 228, 255, 0.20)); }
}

.hero-title {
  font-family: "Bebas Neue", system-ui;
  font-size: clamp(72px, 12vw, 150px);
  line-height: 0.92;
  letter-spacing: 0.10em;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.96);
  animation: titleGlow 5.2s ease-in-out infinite;
  position: relative;
}

/* glitch shadow (subtle) */
.hero-title::before,
.hero-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0.18;
  color: #fff;
  -webkit-text-fill-color: #fff;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero-title::before { transform: translate(2px, 0); }
.hero-title::after { transform: translate(-2px, 0); opacity: 0.12; }

.hero-sub {
  color: var(--muted);
  font-size: 18px;
  letter-spacing: 0.02em;
  margin-bottom: 26px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn-primary {
  color: #000;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 70px rgba(106, 228, 255, 0.24);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.10);
}

/* ============ Cards ============ */
.discord-section .discord-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.card {
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
  padding: 18px 18px;
  position: relative;
  overflow: hidden;
  transform: translateY(6px);
  transition: transform 220ms ease, background 220ms ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(500px 140px at 30% 0%, rgba(106, 228, 255, 0.18), transparent 60%);
  opacity: 0.8;
  pointer-events: none;
}

.card:hover {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.08);
}

.card .icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 12px;
}

.card p {
  color: var(--faint);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
}

.card h3 {
  font-size: 18px;
  letter-spacing: -0.01em;
}

/* ============ About ============ */
.about-section {
  padding-top: 40px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  align-items: stretch;
}

.about-text {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  max-width: 62ch;
}

.pill-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.about-card {
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.about-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.about-stat .label { color: var(--faint); font-weight: 700; font-size: 13px; }
.about-stat .value {
  font-weight: 800;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.92);
}

/* ============ Projects ============ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.chip:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.08); color: var(--text); }
.chip.is-active { color: #000; background: rgba(255, 255, 255, 0.92); border-color: rgba(255, 255, 255, 0.92); }

.project-card {
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 220ms ease, background 220ms ease;
}

.project-card.is-mounted {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-3px);
}

.project-media {
  height: 170px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  position: relative;
  overflow: hidden;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 260ms ease;
}

.project-card:hover .project-media img {
  transform: scale(1.10);
}

.project-media-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 30px;
  color: rgba(255, 255, 255, 0.45);
  background:
    radial-gradient(600px 200px at 20% 0%, rgba(106, 228, 255, 0.18), transparent 60%),
    radial-gradient(500px 180px at 90% 30%, rgba(159, 123, 255, 0.14), transparent 60%);
}

.project-body {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-title {
  font-size: 18px;
  letter-spacing: -0.01em;
}

.project-desc {
  color: var(--muted);
  line-height: 1.55;
  min-height: 44px;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.badge {
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
  color: #000;
  background: rgba(255, 255, 255, 0.92);
}

.project-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.meta {
  font-size: 12px;
  color: var(--faint);
}

.project-card.is-ping {
  animation: ping 320ms ease;
}

@keyframes ping {
  0% { transform: translateY(-3px) scale(1.00); }
  60% { transform: translateY(-3px) scale(1.01); }
  100% { transform: translateY(-3px) scale(1.00); }
}

/* ============ Footer ============ */
.footer {
  padding: 46px 0 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.18);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: "Bebas Neue", system-ui;
  font-size: 28px;
  letter-spacing: 0.10em;
}

.footer-text {
  color: var(--muted);
  margin-top: 8px;
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.footer-link:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

/* ============ Reveal ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 420ms ease, transform 420ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .discord-section .discord-cards { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .discord-section .discord-cards { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 32px; }
}
