/* ========================================
   Ahmed N.G.K — Portfolio CSS
   Black & White Glassmorphism Theme
======================================== */

/* ─── Reset & Base ──────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #050505;
  --bg-secondary: #0a0a0a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-card-hover: rgba(255, 255, 255, 0.18);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.35);
  --accent: #ffffff;
  --accent-dim: rgba(255, 255, 255, 0.12);
  --font-main: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;
  --font-display: 'Orbitron', sans-serif;
  --blur: 16px;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 0.25s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  opacity: 0;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  cursor: none;
}

a, button, .glass-card, .drag-item, .nav-links a {
  cursor: none;
}

/* ─── Custom Cursor ─────────────────── */
#cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--text-primary);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
}

#cursor-outline {
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

#cursor-outline.hover {
  width: 60px;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ─── Lenis Smooth Scroll ─────────── */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* ─── Custom Scrollbar ─────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) rgba(255, 255, 255, 0.02);
}

/* ─── Three.js Canvas ──────────────── */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: auto;
  cursor: grab;
}

#bg-canvas:active {
  cursor: grabbing;
}

/* ─── Loading Screen ───────────────── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.discord-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Initial state for GSAP animation */
.nav-logo, .nav-links a, .hero-badge, .hero-line, .hero-subtitle, .stats-item, .hero-cta .btn {
  opacity: 0;
  transform: translateY(20px);
}

/* ─── Navigation ───────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  transition: var(--transition);
  background: transparent;
}

#navbar.scrolled {
  padding: 14px 40px;
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text-primary);
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

#nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

#nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text-primary);
  transition: var(--transition);
}

#nav-toggle.active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
#nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
#nav-toggle.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

#mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

#mobile-menu a {
  font-size: 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: color var(--transition-fast);
}

#mobile-menu a:hover {
  color: var(--text-primary);
}

/* ─── Sections ─────────────────────── */
.section {
  position: relative;
  z-index: 1;
  padding: 120px 0;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.section-header {
  margin-bottom: 50px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.5), transparent);
  margin-top: 6px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 500px;
}

/* ─── Glass Card ───────────────────── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  will-change: transform;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(255, 255, 255, 0.02);
}

/* ─── Hero ─────────────────────────── */
#hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
}

.hero-content {
  text-align: center;
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s forwards;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

.hero-title {
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.8s 0.5s forwards;
  cursor: pointer;
}

.hero-line {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.05;
  color: var(--text-primary);
  text-transform: uppercase;
}

/* ─── Name Morph Effect ────────────── */
.name-morph {
  cursor: pointer;
  position: relative;
  display: inline-block;
  transition: text-shadow 0.3s ease;
}

.name-morph-hide {
  display: block;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.4s ease, transform 0.4s ease;
  max-height: 10rem;
  opacity: 1;
  transform: translateY(0);
}

.name-morph-hide.hidden {
  max-height: 0;
  opacity: 0;
  transform: translateY(-20px);
}

.name-morph:hover {
  text-shadow:
    0 0 20px rgba(255, 255, 255, 0.3),
    0 0 40px rgba(255, 255, 255, 0.15),
    0 0 80px rgba(255, 255, 255, 0.05);
}

/* Glitch scanline overlay */
.name-morph::before {
  content: '';
  position: absolute;
  top: 0;
  left: -5%;
  width: 110%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(255, 255, 255, 0.03) 2px,
    rgba(255, 255, 255, 0.03) 4px
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.name-morph:hover::before {
  opacity: 1;
  animation: scanlineShift 0.15s steps(3) infinite;
}

/* Glow bar sweep */
.name-morph::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.name-morph:hover::after {
  opacity: 1;
  animation: glowSweep 1.2s ease infinite;
}

.name-morph.glitching {
  animation: glitchShake 0.08s steps(2) infinite;
}

@keyframes glitchShake {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2px, 1px); }
  50%  { transform: translate(2px, -1px); }
  75%  { transform: translate(-1px, -1px); }
  100% { transform: translate(1px, 1px); }
}

@keyframes scanlineShift {
  0%   { background-position: 0 0; }
  100% { background-position: 0 4px; }
}

@keyframes glowSweep {
  0%   { left: -50%; }
  100% { left: 150%; }
}

.hero-line.accent {
  -webkit-text-stroke: 2px rgba(255,255,255,0.2);
  color: transparent;
  background: linear-gradient(135deg, #ffffff 0%, #888888 50%, #ffffff 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s ease infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.8s 0.7s forwards;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 40px;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.8s 0.85s forwards;
}

.hero-cta {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s 1s forwards;
  margin-bottom: 70px;
}

.hero-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  animation: fadeUp 0.8s 1.2s forwards;
  margin-bottom: 120px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
}

.hero-stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-stat-divider {
  width: 1px;
  height: 30px;
  background: rgba(255,255,255,0.1);
}

/* ─── Buttons ──────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary);
  border: 2px solid var(--text-primary);
}

.btn-primary:hover {
  background: transparent;
  color: var(--text-primary);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  border-color: var(--text-primary);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.08);
}

/* ─── Scroll Indicator ─────────────── */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeUp 0.8s 1.8s forwards;
  z-index: 10;
  pointer-events: none;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
  animation: scrollPulse 2s ease infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.3; transform: scaleY(0.6); }
}

.scroll-indicator span {
  font-size: 0.65rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ─── About ────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 22px;
  line-height: 1.8;
}

.about-text strong {
  color: var(--text-primary);
}

.about-quote {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 20px 24px;
  background: rgba(255,255,255,0.02);
  border-left: 2px solid rgba(255,255,255,0.15);
  border-radius: 0 12px 12px 0;
  margin-bottom: 28px;
}

.quote-text {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
}

.text-highlight {
  color: var(--text-primary);
  position: relative;
}

.text-highlight::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.3);
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  transition: var(--transition-fast);
}

.tag:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-card {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.stat-icon-wrap {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.stat-card:hover .stat-icon-wrap {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
  margin-top: 2px;
}

/* ─── Skills ───────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.skill-card {
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.skill-icon-box {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.skill-card:hover .skill-icon-box {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
}

.skill-icon-box.accent-box {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

.skill-level {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
}

.spec-label {
  color: var(--text-secondary);
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
}

.skill-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.skill-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.6;
  flex: 1;
}

.skill-bar {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 14px;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.15), rgba(255,255,255,0.5));
  border-radius: 3px;
  transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tags span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  padding: 3px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.skill-card.specialization {
  border-color: rgba(255,255,255,0.1);
}

/* ─── Projects ─────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.project-card.featured {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
}

.project-featured-label {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 1px;
  color: var(--text-primary);
  padding: 3px 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.project-icon-wrap {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.project-card:hover .project-icon-wrap {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
}

.project-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.project-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 20px;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.project-tech span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  padding: 2px 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
}

.project-arrow {
  color: var(--text-muted);
  transition: var(--transition);
  flex-shrink: 0;
}

.project-card:hover .project-arrow {
  color: var(--text-primary);
  transform: translate(3px, -3px);
}

/* ─── Discord ──────────────────────── */
.discord-grid {
  display: grid;
  gap: 40px;
}

.discord-profile {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 36px 40px;
  max-width: 500px;
}

.discord-avatar {
  width: 72px;
  height: 72px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.discord-profile:hover .discord-avatar {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
}

.discord-svg {
  width: 36px;
  height: 36px;
  color: var(--text-secondary);
}

.discord-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.online {
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.4);
}

.discord-info h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.discord-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.discord-communities h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text-secondary);
}

.community-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.community-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  text-decoration: none;
  color: inherit;
}

.community-arrow {
  color: var(--text-muted);
  margin-left: auto;
  transition: var(--transition);
  flex-shrink: 0;
}

.community-card:hover .community-arrow {
  color: var(--text-primary);
  transform: translate(3px, -3px);
}

.community-icon {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  transition: var(--transition);
}

.community-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.community-card:hover .community-icon {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.18);
}

.community-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
}

.community-info p {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.community-role {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  padding: 3px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  margin-top: 8px;
}

/* ─── Contact ──────────────────────── */
.contact-content {
  max-width: 700px;
}

.contact-text {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.8;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 30px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.contact-icon-wrap {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: var(--transition);
  margin-bottom: 6px;
}

.contact-card:hover .contact-icon-wrap {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  color: var(--text-primary);
  box-shadow: 0 0 30px rgba(255,255,255,0.05);
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-muted);
}

.contact-value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.contact-card:hover .contact-value {
  color: var(--text-primary);
}

.contact-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.contact-card:hover .contact-hint {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Footer ───────────────────────── */
#footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

#footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* ─── Reveal Animations ────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Reduced Motion ───────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero-tag, .hero-title, .hero-subtitle, .hero-cta, .scroll-indicator {
    opacity: 1;
    animation: none;
  }
}

/* ─── Responsive ───────────────────── */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-stats {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .stat-card {
    flex: 1;
    min-width: 140px;
  }
}

@media (max-width: 768px) {
  #navbar {
    padding: 16px 24px;
  }
  #navbar.scrolled {
    padding: 12px 24px;
  }
  .nav-links {
    display: none;
  }
  #nav-toggle {
    display: flex;
  }
  .container {
    padding: 0 24px;
  }
  .section {
    padding: 80px 0;
  }
  #hero {
    padding: 0 24px;
  }
  .hero-line {
    letter-spacing: 0px;
  }
  .hero-subtitle {
    letter-spacing: 3px;
    font-size: 0.8rem;
  }
  .section-title {
    font-size: 1.5rem;
  }
  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .discord-profile {
    max-width: 100%;
  }
  .about-stats {
    flex-direction: column;
  }
  .stat-card {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  .btn {
    width: 100%;
    justify-content: center;
    max-width: 280px;
  }
  .contact-methods {
    grid-template-columns: 1fr;
  }
  .community-cards {
    grid-template-columns: 1fr;
  }
}
