/* === Reset & Base Styles === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #ae0bb4;
  --primary-light: #d946ef;
  --primary-dark: #8b0a93;
  --secondary: #00c3ff;
  --dark: #0a0015;
  --dark-elevated: #1a0033;
  --dark-card: #161616;
  --text-primary: #ffffff;
  --text-secondary: #b8b8b8;
  --text-muted: #888888;
  --gradient-1: linear-gradient(135deg, #1a0033 0%, #2d0b4e 50%, #0e1a2b 100%);
  --gradient-2: linear-gradient(90deg, #ae0bb4, #00c3ff);
  --shadow-sm: 0 2px 8px rgba(174, 11, 180, 0.1);
  --shadow-md: 0 4px 16px rgba(174, 11, 180, 0.15);
  --shadow-lg: 0 8px 32px rgba(174, 11, 180, 0.25);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--gradient-1);
  min-height: 100vh;
  overflow-x: hidden;
}

/* === Header === */
.main-header {
  text-align: center;
  padding: 60px 20px 40px;
  position: relative;
}

.avatar-container {
  margin-bottom: 24px;
}

.header-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--primary);
  box-shadow: 0 0 30px rgba(174, 11, 180, 0.5),
              0 0 60px rgba(174, 11, 180, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  object-fit: cover;
}

.header-avatar:hover {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 0 40px rgba(174, 11, 180, 0.7),
              0 0 80px rgba(174, 11, 180, 0.4);
}

.text-title {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #ae0bb4, #00c3ff, #ae0bb4, #00c3ff);
  background-size: 300% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-flow 4s linear infinite;
}

@keyframes gradient-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

/* === Navigation Tabs === */
.tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  max-width: 800px;
  margin: 0 auto 50px;
  background: rgba(30, 0, 51, 0.6);
  border-radius: 16px;
  padding: 8px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
}

.tab-btn {
  flex: 1;
  padding: 16px 24px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tab-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-2);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.tab-btn:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
}

.tab-btn:hover::before {
  opacity: 0.1;
}

.tab-btn.active {
  background: var(--gradient-2);
  color: var(--text-primary);
  box-shadow: 0 4px 16px rgba(174, 11, 180, 0.4);
}

.tab-btn.active::before {
  opacity: 1;
}

/* === Main Content === */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.tab-content {
  display: none;
  animation: fadeInUp 0.5s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Section Header === */
.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 12px;
  background: var(--gradient-2);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* === Cards === */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.card {
  background: var(--dark-card);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow-md);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  padding: 2px;
  background: var(--gradient-2);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  height: 200px;
  background: linear-gradient(135deg, rgba(174, 11, 180, 0.1), rgba(0, 195, 255, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.card-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(174, 11, 180, 0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.card-img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(174, 11, 180, 0.3));
  transition: transform 0.3s ease;
}

.card:hover .card-img {
  transform: scale(1.1) rotate(5deg);
}

.card-body {
  padding: 24px;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary-light);
}

.card-text {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 8px;
}

.badge-info {
  background: rgba(0, 195, 255, 0.2);
  color: var(--secondary);
}

.badge-warning {
  background: rgba(255, 165, 0, 0.2);
  color: #ffa500;
}

.card-footer {
  padding: 0 24px 24px;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--gradient-2);
  color: var(--text-primary);
  box-shadow: 0 4px 16px rgba(174, 11, 180, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(174, 11, 180, 0.5);
  transform: translateY(-2px);
}

.btn svg {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.btn:hover svg {
  transform: translateX(4px);
}

/* === About Section === */
.about-section {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.about-card {
  max-width: 600px;
  width: 100%;
  background: rgba(30, 0, 51, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 48px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(174, 11, 180, 0.2);
}

.about-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto 24px;
  border: 4px solid var(--primary);
  box-shadow: 0 0 30px rgba(174, 11, 180, 0.5);
  object-fit: cover;
}

.about-card h2 {
  font-size: 2rem;
  margin-bottom: 16px;
  background: var(--gradient-2);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
}

/* === Skills Section === */
.skills-section {
  margin: 40px 0;
}

.skills-section h3 {
  font-size: 1.5rem;
  margin-bottom: 24px;
  color: var(--primary-light);
}

.skills-grid {
  display: grid;
  gap: 16px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(174, 11, 180, 0.1);
  border-radius: 16px;
  border: 1px solid rgba(174, 11, 180, 0.2);
  transition: all 0.3s ease;
  text-align: left;
}

.skill-item:hover {
  background: rgba(174, 11, 180, 0.15);
  border-color: rgba(174, 11, 180, 0.4);
  transform: translateX(8px);
}

.skill-icon {
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(174, 11, 180, 0.2);
  border-radius: 12px;
  flex-shrink: 0;
}

.skill-info {
  flex: 1;
}

.skill-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.skill-tech {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* === Social Links === */
.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.social-btn.github {
  background: #333;
  color: var(--text-primary);
}

.social-btn.github:hover {
  background: #fff;
  color: #333;
  border-color: #333;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(51, 51, 51, 0.3);
}

.social-btn.discord {
  background: #5865f2;
  color: var(--text-primary);
}

.social-btn.discord:hover {
  background: #fff;
  color: #5865f2;
  border-color: #5865f2;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.3);
}

.social-btn.email {
  background: var(--gradient-2);
  color: var(--text-primary);
}

.social-btn.email:hover {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(174, 11, 180, 0.3);
}

/* === Footer === */
.main-footer {
  background: linear-gradient(90deg, rgba(26, 0, 51, 0.9) 0%, rgba(174, 11, 180, 0.9) 100%);
  backdrop-filter: blur(10px);
  padding: 32px 20px;
  margin-top: 80px;
  border-top: 2px solid rgba(174, 11, 180, 0.3);
  box-shadow: 0 -4px 20px rgba(174, 11, 180, 0.2);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 1rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-links .separator {
  color: rgba(255, 255, 255, 0.5);
}

.main-footer a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 8px;
}

.main-footer a:hover {
  color: var(--primary-light);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* === Responsive Design === */
@media (max-width: 768px) {
  .text-title {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .header-avatar {
    width: 100px;
    height: 100px;
  }

  .tabs {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }

  .tab-btn {
    padding: 14px 20px;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .card-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about-card {
    padding: 32px 24px;
  }

  .skills-grid {
    gap: 12px;
  }

  .skill-item {
    padding: 16px;
  }

  .skill-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
  }

  .social-links {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .social-btn {
    width: 100%;
    justify-content: center;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .footer-links {
    flex-direction: column;
    gap: 8px;
  }

  .footer-links .separator {
    display: none;
  }
}

@media (max-width: 480px) {
  .text-title {
    font-size: 2rem;
    letter-spacing: 1px;
  }

  .main-header {
    padding: 40px 20px 30px;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .card-title {
    font-size: 1.3rem;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.95rem;
  }
}

/* === Scrollbar Styling === */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--dark);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-2);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* === Selection Styling === */
::selection {
  background: var(--primary);
  color: var(--text-primary);
}

::-moz-selection {
  background: var(--primary);
  color: var(--text-primary);
}