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

html {
  scroll-behavior: smooth;
}

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-primary: #1a1a1a;
  --text-secondary: #6c757d;
  --accent: #0066cc;
  --accent-hover: #0052a3;
  --border: #e9ecef;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Dark Mode Toggle (Hidden Checkbox) */
.dark-mode-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Dark Mode Styles */
.dark-mode-toggle:checked ~ body,
.dark-mode-toggle:checked ~ * {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --accent: #4d9fff;
  --accent-hover: #3d8fee;
  --border: #404040;
}

.dark-mode-toggle:checked ~ header,
.dark-mode-toggle:checked ~ main,
.dark-mode-toggle:checked ~ footer {
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* Theme Toggle Icons */
.theme-icon-dark {
  display: none;
}

.dark-mode-toggle:checked ~ header .theme-icon-light {
  display: none;
}

.dark-mode-toggle:checked ~ header .theme-icon-dark {
  display: inline;
}

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

/* Header */
header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 100;
  backdrop-filter: blur(10px);
  transition: background 0.3s ease, border-color 0.3s ease;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  transition: color 0.3s ease;
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.theme-toggle-label {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.theme-toggle-label:hover {
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  padding: 100px 0;
  text-align: center;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 30px;
  transition: color 0.3s ease;
}

.cta-button {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.cta-button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 102, 204, 0.2);
}

/* Sections */
section {
  padding: 80px 0;
}

.section-title {
  font-size: 36px;
  text-align: center;
  margin-bottom: 15px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 18px;
  margin-bottom: 50px;
  transition: color 0.3s ease;
}

.services {
  background: var(--bg-secondary);
  transition: background 0.3s ease;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--bg-primary);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.service-card:nth-child(1) {
  animation-delay: 0.1s;
}

.service-card:nth-child(2) {
  animation-delay: 0.2s;
}

.service-card:nth-child(3) {
  animation-delay: 0.3s;
}

.service-card:nth-child(4) {
  animation-delay: 0.4s;
}

.service-card:nth-child(5) {
  animation-delay: 0.5s;
}

.service-card:nth-child(6) {
  animation-delay: 0.6s;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
  font-size: 40px;
  margin-bottom: 15px;
}

.service-card h3 {
  font-size: 22px;
  margin-bottom: 15px;
}

.service-card p {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

/* Portfolio Section */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.portfolio-item {
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.portfolio-item:nth-child(1) {
  animation-delay: 0.1s;
}

.portfolio-item:nth-child(2) {
  animation-delay: 0.2s;
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.portfolio-image {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  overflow: hidden;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image img {
  transform: scale(1.05);
}

.portfolio-content {
  padding: 25px;
}

.portfolio-content h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.portfolio-content p {
  color: var(--text-secondary);
  margin-bottom: 15px;
  font-size: 15px;
  transition: color 0.3s ease;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portfolio-tags span {
  background: var(--accent);
  color: white;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.3s ease;
}

/* Testimonials Section */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.testimonial-card {
  background: var(--bg-primary);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.testimonial-card:nth-child(1) {
  animation-delay: 0.1s;
}

.testimonial-card:nth-child(2) {
  animation-delay: 0.2s;
}

.testimonial-card:nth-child(3) {
  animation-delay: 0.3s;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.testimonial-stars {
  font-size: 20px;
  margin-bottom: 15px;
}

.testimonial-text {
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 20px;
  line-height: 1.8;
  transition: color 0.3s ease;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.testimonial-author strong {
  color: var(--text-primary);
  font-size: 16px;
  transition: color 0.3s ease;
}

.testimonial-author span {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.3s ease;
}

/* About Section */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-content p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  transition: color 0.3s ease;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.skill-tag {
  background: var(--accent);
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.skill-tag:nth-child(1) {
  animation-delay: 0.1s;
}
.skill-tag:nth-child(2) {
  animation-delay: 0.15s;
}
.skill-tag:nth-child(3) {
  animation-delay: 0.2s;
}
.skill-tag:nth-child(4) {
  animation-delay: 0.25s;
}
.skill-tag:nth-child(5) {
  animation-delay: 0.3s;
}
.skill-tag:nth-child(6) {
  animation-delay: 0.35s;
}
.skill-tag:nth-child(7) {
  animation-delay: 0.4s;
}

.skill-tag:hover {
  transform: translateY(-3px);
}

/* Contact Section */
.contact-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.contact-card {
  background: var(--bg-primary);
  padding: 40px 30px;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-align: center;
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.contact-icon {
  font-size: 50px;
  margin-bottom: 20px;
}

.contact-card h3 {
  font-size: 24px;
  margin-bottom: 15px;
}

.contact-card p {
  color: var(--text-secondary);
  margin-bottom: 25px;
  line-height: 1.8;
  transition: color 0.3s ease;
}

.contact-button {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
}

.discord-button {
  background: #5865f2;
  color: white;
}

.discord-button:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(88, 101, 242, 0.3);
}

.email-button {
  background: var(--accent);
  color: white;
}

.email-button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 102, 204, 0.3);
}

/* Footer */
footer {
  background: var(--bg-secondary);
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  transition: all 0.3s ease;
}

footer p {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-links {
    gap: 15px;
    font-size: 14px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 18px;
  }

  .section-title {
    font-size: 28px;
  }

  .portfolio-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}
