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

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a1f35;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --border-color: #1e293b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 70px; /* Height of nav */
}

html {
  scroll-behavior: smooth;
}

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

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  height: 60px;
  min-height: 60px;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-cyan);
  text-decoration: none;
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--accent-cyan);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  transition: background 0.2s;
}

.mobile-menu-btn span {
  width: 28px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  margin: 0;
  display: block;
  transition: transform 0.3s cubic-bezier(.4,2,.6,1), opacity 0.3s cubic-bezier(.4,2,.6,1);
  position: relative;
}

/* Hamburger to X animation - fix for full X */
.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translateY(9px);
}
.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-9px);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem;
  z-index: 999;
}

.mobile-menu.active {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem;
  transition: color 0.3s;
}

.mobile-menu a:hover {
  color: var(--accent-cyan);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 50px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(6, 182, 212, 0.2);
  border: 1px solid var(--accent-cyan);
  border-radius: 50px;
  color: var(--accent-cyan);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  animation: fadeInDown 1s ease-out;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-highlight {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.btn {
  padding: 0.875rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-block;
}

.btn-primary {
  background: var(--accent-cyan);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: #0891b2;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--accent-cyan);
}

.btn-secondary:hover {
  background: rgba(6, 182, 212, 0.1);
  transform: translateY(-2px);
}

/* Sections */
.section {
  padding: 80px 20px;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* About Section */
.about {
  background: var(--bg-secondary);
}

.about-intro {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  line-height: 1.8;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.skill-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
  will-change: transform, opacity;
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-cyan);
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.2);
}

.skill-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.skill-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--accent-cyan);
}

.skill-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Stats Section */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.stat-card {
  background: var(--bg-card);
  padding: 2.5rem 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  text-align: center;
  transition: all 0.3s;
  will-change: transform, opacity;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-green);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
}

.stat-number {
  font-size: 3rem;
  font-weight: bold;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Projects Section */
.projects {
  background: var(--bg-secondary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.3s;
  will-change: transform, opacity;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-cyan);
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.2);
}

.project-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-content {
  padding: 1.5rem;
}

.project-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(6, 182, 212, 0.2);
  color: var(--accent-cyan);
  border-radius: 50px;
  font-size: 0.75rem;
  margin-bottom: 1rem;
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.project-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.project-link:hover {
  color: var(--accent-green);
}

/* Contact Section */
.social-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  text-decoration: none;
  transition: all 0.3s;
  will-change: transform, opacity;
}

.social-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-cyan);
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.2);
}

.social-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 182, 212, 0.2);
  border-radius: 12px;
  color: var(--accent-cyan);
}

.social-icon svg {
  width: 28px;
  height: 28px;
}

.social-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.social-handle {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Server Status Section */
.server-status {
  background: var(--bg-card);
  border-radius: 12px;
  margin-bottom: 2rem;
}

#mcServerStatus {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-primary);
  padding: 1.5rem 0;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Glowing RGB animation for server IP */
@keyframes rgbGlow {
  0%   { color: #ff0059; text-shadow: 0 0 8px #ff0059, 0 0 16px #ff0059; }
  20%  { color: #fffb00; text-shadow: 0 0 8px #fffb00, 0 0 16px #fffb00; }
  40%  { color: #00ff94; text-shadow: 0 0 8px #00ff94, 0 0 16px #00ff94; }
  60%  { color: #00c3ff; text-shadow: 0 0 8px #00c3ff, 0 0 16px #00c3ff; }
  80%  { color: #a100ff; text-shadow: 0 0 8px #a100ff, 0 0 16px #a100ff; }
  100% { color: #ff0059; text-shadow: 0 0 8px #ff0059, 0 0 16px #ff0059; }
}

.server-ip-glow {
  animation: rgbGlow 3s linear infinite;
  font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 8px;
  }
  .section {
    padding: 32px 8px;
  }
  .hero {
    padding: 60px 8px 24px;
    min-height: 60vh;
  }
  .skills-grid,
  .stats-grid,
  .projects-grid,
  .social-links {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .skill-card,
  .stat-card,
  .project-card,
  .social-card {
    padding: 1rem;
    font-size: 0.95rem;
  }
  .project-image {
    height: 120px;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-description {
    font-size: 1rem;
  }
  .section-title {
    font-size: 1.5rem;
  }
  .hero-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
  .btn {
    width: 100%;
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
    padding: 0;
    background: none;
    border: none;
    z-index: 1001;
  }
  .mobile-menu-btn span {
    width: 28px;
    height: 3px;
    margin: 0;
    background: var(--text-primary);
    border-radius: 2px;
    display: block;
    transition: transform 0.3s cubic-bezier(.4,2,.6,1), opacity 0.3s cubic-bezier(.4,2,.6,1);
  }
  .mobile-menu {
    display: none;
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0.5rem 2rem 0.5rem;
    z-index: 999;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    min-height: 40vh;
  }
  .mobile-menu.active {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeInDown 0.3s;
  }
  .mobile-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.25rem;
    padding: 1rem 0;
    border-radius: 8px;
    text-align: center;
    background: rgba(6, 182, 212, 0.08);
    transition: background 0.2s, color 0.2s;
  }
  .mobile-menu a:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 4px;
  }
  .section {
    padding: 18px 4px;
  }
  .hero {
    padding: 32px 4px 12px;
    min-height: 50vh;
  }
  .project-image {
    height: 80px;
  }
  .hero-title {
    font-size: 1.3rem;
  }
  .stat-number {
    font-size: 1.5rem;
  }
}

.server-status .section-header,
.contact .section-header {
  display: none;
}
.server-status,
.contact {
  margin-bottom: 2rem;
  padding: 32px 0;
  background: var(--bg-card);
  border-radius: 12px;
}

/* Minecraft skin image in About section */
.about-skin {
  display: block;
  margin: 0 auto 1.5rem auto;
  max-width: 500px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  background: var(--bg-card);
  object-fit: contain;
  padding: 8px;
}

