:root {
  color-scheme: dark;
  --bg: #0a0510;
  --surface: rgba(25, 10, 50, 0.85);
  --surface-strong: rgba(40, 15, 80, 0.95);
  --panel: rgba(150, 50, 255, 0.12);
  --text: #e7eefc;
  --muted: #b8a8e8;
  --accent: #9c4dff;
  --accent-strong: #ff1493;
  --border: rgba(200, 100, 255, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 15% 40%, #ff1493 0%, transparent 35%),
              radial-gradient(circle at 85% 70%, #9c4dff 0%, transparent 40%),
              radial-gradient(circle at 50% 10%, #00d9ff 0%, transparent 50%),
              linear-gradient(135deg, #0a0510 0%, #1a0a3e 50%, #0f0525 100%);
  background-size: 400% 400%, 400% 400%, 400% 400%, 100% 100%;
  background-position: 0% 0%, 100% 100%, 50% 50%, 0% 0%;
  color: var(--text);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-attachment: fixed;
  animation: animateBackground 15s ease infinite;
}

@keyframes animateBackground {
  0% {
    background-position: 0% 0%, 100% 100%, 50% 50%, 0% 0%;
  }
  25% {
    background-position: 50% 50%, 50% 50%, 100% 0%, 0% 0%;
  }
  50% {
    background-position: 100% 100%, 0% 0%, 50% 100%, 0% 0%;
  }
  75% {
    background-position: 50% 50%, 50% 50%, 0% 50%, 0% 0%;
  }
  100% {
    background-position: 0% 0%, 100% 100%, 50% 50%, 0% 0%;
  }
}

.page-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.hero {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  padding: 48px 32px;
  background: linear-gradient(180deg, rgba(156,77,255,0.15), rgba(255,20,147,0.08));
  border: 2px solid rgba(200, 100, 255, 0.5);
  border-radius: 24px;
  box-shadow: 0 0 40px rgba(156, 77, 255, 0.25), 0 0 60px rgba(255, 20, 147, 0.15);
}

.label {
  display: inline-flex;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(156, 77, 255, 0.25);
  color: #ff1493;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 20, 147, 0.5);
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(2.9rem, 4vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.name-highlight {
  background: linear-gradient(90deg, #9c4dff, #ff1493, #00d9ff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  letter-spacing: -0.02em;
  animation: nameGradient 3s ease infinite;
  background-size: 200% auto;
}

@keyframes nameGradient {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}

@keyframes cyberGlow {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.5)); }
  50% { filter: drop-shadow(0 0 15px rgba(255, 0, 255, 0.7)) drop-shadow(0 0 25px rgba(0, 255, 255, 0.5)); }
}

.intro {
  max-width: 560px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.85;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, #9c4dff, #ff1493);
  color: white;
  box-shadow: 0 0 20px rgba(156, 77, 255, 0.4), 0 8px 20px rgba(255, 20, 147, 0.2);
  border: none;
}

.button-primary:hover {
  background: linear-gradient(135deg, #b366ff, #ff3399);
  box-shadow: 0 0 30px rgba(156, 77, 255, 0.5), 0 12px 30px rgba(255, 20, 147, 0.3);
}

.button-secondary {
  border: 2px solid rgba(156, 77, 255, 0.6);
  color: #e7eefc;
  background: rgba(156, 77, 255, 0.1);
  box-shadow: 0 0 15px rgba(156, 77, 255, 0.2);
}

.button-secondary:hover {
  background: rgba(156, 77, 255, 0.2);
}

.hero-art {
  display: flex;
  justify-content: center;
}

.code-card {
  width: min(100%, 460px);
  border-radius: 24px;
  background: rgba(25, 10, 50, 0.6);
  border: 2px solid rgba(156, 77, 255, 0.4);
  box-shadow: 0 0 30px rgba(156, 77, 255, 0.3), 0 0 60px rgba(255, 20, 147, 0.15);
  overflow: hidden;
}

.code-card-header {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(80, 30, 120, 0.7);
  border-bottom: 1px solid rgba(156, 77, 255, 0.3);
}

.code-card-header span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-flex;
}

.code-card-header span:nth-child(1) { background: #ff5c5c; }
.code-card-header span:nth-child(2) { background: #ffbf4c; }
.code-card-header span:nth-child(3) { background: #4cd77a; }

pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  background: rgba(10, 5, 20, 0.5);
  color: #00ffff;
  line-height: 1.5;
}

.content {
  margin-top: 40px;
  display: grid;
  gap: 32px;
}

.glass-panel {
  padding: 32px;
  border-radius: 24px;
  background: rgba(40, 15, 80, 0.5);
  border: 2px solid rgba(156, 77, 255, 0.4);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 30px rgba(156, 77, 255, 0.2);
}

.about-section h2,
.projects-section h2 {
  margin-top: 0;
  font-size: 2rem;
}

.about-section p,
.about-section ul {
  max-width: 640px;
  color: var(--muted);
}

.info-list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.info-list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 0.95rem;
}

.info-list strong {
  color: #e2e8ff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.stat-item {
  padding: 16px;
  border-radius: 16px;
  background: rgba(80, 30, 120, 0.5);
  border: 1px solid rgba(156, 77, 255, 0.3);
  box-shadow: 0 0 20px rgba(156, 77, 255, 0.1);
}

.stat-item strong {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.stat-item span {
  color: var(--muted);
}

.projects-section {
  display: grid;
  gap: 24px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  padding: 24px;
  border-radius: 16px;
  background: rgba(40, 15, 80, 0.5);
  border: 1px solid rgba(156, 77, 255, 0.3);
  box-shadow: 0 0 20px rgba(156, 77, 255, 0.15);
  transition: all 0.3s ease;
}

.project-card:hover {
  border-color: rgba(255, 20, 147, 0.6);
  box-shadow: 0 0 30px rgba(156, 77, 255, 0.3), 0 0 40px rgba(255, 20, 147, 0.2);
}

.project-card h3 {
  margin: 0 0 12px;
}

.project-card p {
  margin: 0;
  color: var(--muted);
}

.footer-panel {
  margin-top: 40px;
  padding: 24px 32px;
  border-radius: 24px;
  background: rgba(40, 15, 80, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 2px solid rgba(156, 77, 255, 0.3);
  box-shadow: 0 0 30px rgba(156, 77, 255, 0.15);
}

.footer-panel p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Smooth transitions for interactive elements */
* {
  transition: color 0.3s ease, background-color 0.3s ease;
}

.button {
  position: relative;
}

.button:active {
  transform: scale(0.98);
}