/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(20, 20, 35, 0.6);
  --accent-primary: #8b5cf6;
  --accent-secondary: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.5);
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  --gradient-3: linear-gradient(to right, #6366f1, #8b5cf6, #a855f7);
  --status-online: #22c55e;
  --status-idle: #f59e0b;
  --status-dnd: #ef4444;
  --status-offline: #71717a;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== CANVAS BACKGROUND ===== */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ===== BACK BUTTON ===== */
.back-button-container {
  padding-top: 40px;
  margin-bottom: -20px;
  position: relative;
  z-index: 100;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.back-button i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.back-button:hover {
  background: var(--gradient-2);
  transform: translateX(-5px);
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
  border-color: transparent;
}

.back-button:hover i {
  transform: translateX(-3px);
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  padding: 100px 0;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.title-wrapper {
  position: relative;
}

/* Glitch Effect */
.glitch {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--gradient-3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  animation: glitch-skew 1s infinite linear alternate-reverse;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glitch::before {
  animation: glitch-1 0.5s infinite linear alternate-reverse;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch::after {
  animation: glitch-2 0.5s infinite linear alternate-reverse;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch-1 {
  0% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-3px);
  }

  40% {
    transform: translateX(3px);
  }

  60% {
    transform: translateX(-1px);
  }

  80% {
    transform: translateX(2px);
  }

  100% {
    transform: translateX(0);
  }
}

@keyframes glitch-2 {
  0% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(3px);
  }

  40% {
    transform: translateX(-3px);
  }

  60% {
    transform: translateX(1px);
  }

  80% {
    transform: translateX(-2px);
  }

  100% {
    transform: translateX(0);
  }
}

@keyframes glitch-skew {
  0% {
    transform: skew(0deg);
  }

  10% {
    transform: skew(0.5deg);
  }

  20% {
    transform: skew(-0.5deg);
  }

  30% {
    transform: skew(0deg);
  }

  100% {
    transform: skew(0deg);
  }
}

.subtitle {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 10px;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 15px;
}

.social-btn {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.social-btn svg {
  width: 24px;
  height: 24px;
}

.social-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px var(--accent-glow);
  border-color: var(--accent-primary);
}

.social-btn.discord:hover {
  background: #5865F2;
}

.social-btn.github:hover {
  background: #333;
}

/* 3D Container */
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

#three-container {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
}

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.section-header .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-primary), transparent);
}

/* ===== DISCORD SECTION ===== */
.discord-section {
  padding: 60px 0;
}

.discord-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 30px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 25px;
  transition: all 0.3s ease;
}

.discord-card:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 60px rgba(139, 92, 246, 0.15);
}

.discord-avatar-wrapper {
  position: relative;
}

.discord-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-primary);
}

.status-indicator {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--status-offline);
  border: 3px solid var(--bg-primary);
}

.status-indicator.online {
  background: var(--status-online);
}

.status-indicator.idle {
  background: var(--status-idle);
}

.status-indicator.dnd {
  background: var(--status-dnd);
}

.status-indicator.offline {
  background: var(--status-offline);
}

.discord-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.discord-username {
  font-size: 1.5rem;
  font-weight: 700;
}

.discord-tag {
  color: var(--text-muted);
  font-weight: 400;
}

.discord-status {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Discord Activity */
.discord-activity {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 15px;
  min-width: 280px;
  display: none;
}

.discord-activity.active {
  display: block;
}

.activity-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.activity-content {
  display: flex;
  gap: 15px;
  align-items: center;
}

.activity-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}

.activity-info h4 {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 3px;
}

.activity-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Spotify Progress Bar */
.spotify-progress {
  margin-top: 10px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.spotify-progress-bar {
  height: 100%;
  background: #1DB954;
  border-radius: 2px;
  transition: width 1s linear;
}

/* ===== SKILLS SECTION ===== */
.skills-section {
  padding: 60px 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 25px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.skill-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--accent-primary);
  box-shadow: 0 20px 60px rgba(139, 92, 246, 0.2);
}

.skill-card i {
  font-size: 3rem;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.3s ease;
}

.skill-card:hover i {
  transform: scale(1.1) rotateY(180deg);
}

.skill-card span {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.skill-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  width: 0;
  background: var(--gradient-3);
  border-radius: 2px;
  transition: width 1s ease-out;
}

.skill-card.visible .skill-progress {
  width: var(--progress);
}

/* ===== PROJECTS SECTION ===== */
.projects-section {
  padding: 60px 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.project-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 30px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-3);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-primary);
  box-shadow: 0 25px 80px rgba(139, 92, 246, 0.15);
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-icon {
  font-size: 2rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 12px;
}

.project-icon i {
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.project-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.project-arrow {
  position: absolute;
  bottom: 25px;
  right: 25px;
  font-size: 1.5rem;
  color: var(--accent-primary);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.project-card:hover .project-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ===== FOOTER ===== */
/* ===== MODERN FOOTER 2026 ===== */
.main-footer {
  margin-top: 100px;
  padding: 80px 0 40px;
  background: rgba(15, 12, 41, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  position: relative;
  z-index: 10;
  overflow: hidden;
}

.footer-container {
  max-width: 100%;
  margin: 0;
  padding: 0 5%;
  position: relative;
  z-index: 2;
}

/* Animated Blobs */
.footer-blob {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  z-index: 1;
  pointer-events: none;
}

.blob-1 {
  top: -100px;
  left: -50px;
  animation: float-1 20s infinite alternate ease-in-out;
}

.blob-2 {
  bottom: -150px;
  right: 5%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, transparent 70%);
  animation: float-2 25s infinite alternate ease-in-out;
}

.blob-3 {
  top: 50%;
  left: 20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  animation: float-3 30s infinite alternate ease-in-out;
}

@keyframes float-1 {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(150px, 50px) scale(1.2);
  }
}

@keyframes float-2 {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  100% {
    transform: translate(-100px, -80px) rotate(90deg);
  }
}

@keyframes float-3 {
  0% {
    transform: translate(0, 0) scale(0.8);
  }

  100% {
    transform: translate(100px, -150px) scale(1.1);
  }
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.footer-brand {
  flex: 2;
  min-width: 300px;
}

.footer-brand h3 {
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.footer-brand p {
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 450px;
  font-size: 1.1rem;
}

.footer-links,
.footer-social {
  flex: 1;
  min-width: 200px;
}

.footer-links h4,
.footer-social h4 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 800;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links ul li {
  margin-bottom: 15px;
}

.footer-links ul li a {
  color: var(--text-secondary);
  transition: all 0.3s ease;
  font-size: 1.05rem;
}

.footer-links ul li a:hover {
  color: var(--accent-primary);
  padding-left: 10px;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.social-grid {
  display: flex;
  gap: 20px;
}

.social-item {
  width: 55px;
  height: 55px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 1.5rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.social-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: 0.5s;
}

.social-item:hover::before {
  left: 100%;
}

.social-item:hover {
  background: var(--gradient-2);
  transform: translateY(-10px) scale(1.1);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.5);
  border-color: transparent;
}

.footer-bottom {
  padding-top: 40px;
  border-top: 1px solid rgba(139, 92, 246, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-size: 1rem;
}

.footer-bottom .highlight {
  font-weight: 800;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

/* ===== ANIMATIONS ===== */
@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 20px var(--accent-glow);
  }

  50% {
    box-shadow: 0 0 40px var(--accent-glow), 0 0 60px rgba(139, 92, 246, 0.3);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-brand {
    grid-column: span 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 80px 0 40px;
  }

  .hero-left {
    align-items: center;
  }

  .social-links {
    justify-content: center;
  }

  .hero-right {
    order: -1;
  }

  #three-container {
    max-width: 300px;
  }

  .discord-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
  }

  .discord-activity {
    min-width: auto;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand {
    grid-column: span 1;
  }

  .footer-links h4,
  .footer-social h4 {
    margin-bottom: 15px;
  }

  .social-grid {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .glitch {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-header h2 {
    font-size: 1.5rem;
  }
}