/* CSS Variables */
:root {
  --primary-color: #ffffff;
  --secondary-color: #ff6b35;
  --accent-color: #f8f9fa;
  --gray-color: #6c757d;
  --white: #212529;
  --orange-light: #ff8c42;
  --orange-dark: #e55a2b;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --primary-color: #1a1a2e;
  --secondary-color: #ff6b35;
  --accent-color: #16213e;
  --gray-color: #a8b2c1;
  --white: #ffffff;
  --orange-light: #ff8c42;
  --orange-dark: #e55a2b;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Kanit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--primary-color);
  color: var(--gray-color);
  line-height: 1.6;
  overflow-x: hidden;
  transition: var(--transition);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 107, 53, 0.1);
  transition: var(--transition);
}

[data-theme="dark"] .navbar {
  background: rgba(26, 26, 46, 0.95);
  border-bottom: 1px solid rgba(255, 107, 53, 0.1);
}

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

.nav-brand {
  font-size: 1.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--secondary-color), var(--orange-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.logo-text {
  color: var(--white);
  letter-spacing: -0.5px;
  font-weight: 800;
}

.text-secondary {
  color: var(--secondary-color);
}

.logo-accent {
  color: var(--secondary-color);
  letter-spacing: -0.5px;
  font-weight: 800;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.language-toggle {
  display: flex;
  background: rgba(255, 107, 53, 0.1);
  border-radius: 20px;
  padding: 2px;
  border: 1px solid rgba(255, 107, 53, 0.2);
}

.lang-btn {
  padding: 0.4rem 0.8rem;
  border: none;
  background: transparent;
  color: var(--gray-color);
  cursor: pointer;
  border-radius: 18px;
  transition: var(--transition);
  font-size: 0.75rem;
  font-weight: 600;
}

.lang-btn.active {
  background: var(--secondary-color);
  color: white;
  box-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
}

.theme-toggle {
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: rgba(255, 107, 53, 0.2);
  transform: scale(1.05);
}

.theme-icon {
  font-size: 1rem;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--gray-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--secondary-color);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: var(--transition);
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: 8px;
  cursor: pointer;
  padding: 0.75rem;
  gap: 4px;
}

.mobile-menu-toggle span {
  width: 22px;
  height: 2.5px;
  background: var(--secondary-color);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu-toggle:hover {
  background: rgba(255, 107, 53, 0.2);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(255, 140, 66, 0.05) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(1deg); }
  66% { transform: translate(-20px, 20px) rotate(-1deg); }
}

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

.hero-badge {
  color: var(--secondary-color);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.title-main {
  color: var(--white);
  display: block;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.title-accent {
  color: var(--secondary-color);
  display: block;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.4s forwards;
}

.hero-subtitle {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto 3rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.6s forwards;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.8s forwards;
}

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

/* Buttons */
.btn {
  padding: 1rem 2.5rem;
  border: 2px solid var(--secondary-color);
  background: transparent;
  color: var(--secondary-color);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--secondary-color);
  transition: var(--transition);
  z-index: -1;
}

.btn:hover::before {
  left: 0;
}

.btn:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--secondary-color);
  color: var(--primary-color);
}

.btn-primary::before {
  background: var(--white);
}

.btn-outline {
  border-color: var(--gray-color);
  color: var(--gray-color);
}

.btn-outline::before {
  background: var(--gray-color);
}

.btn-outline:hover {
  color: var(--white);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  opacity: 0;
  animation: fadeInUp 0.8s ease 1s forwards;
}

.scroll-text {
  color: var(--gray-color);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.scroll-arrow {
  width: 30px;
  height: 30px;
  border-right: 2px solid var(--secondary-color);
  border-bottom: 2px solid var(--secondary-color);
  transform: rotate(45deg);
  margin: 0 auto;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: rotate(45deg) translateY(0); }
  40% { transform: rotate(45deg) translateY(-10px); }
  60% { transform: rotate(45deg) translateY(-5px); }
}

/* Services Section */
.services {
  padding: 6rem 2rem;
  background: linear-gradient(180deg, var(--primary-color) 0%, #f8f9fa 100%);
}

[data-theme="dark"] .services {
  background: linear-gradient(180deg, var(--primary-color) 0%, #16213e 100%);
}

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

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

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--white);
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--gray-color);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

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

.service-card {
  background: rgba(255, 107, 53, 0.03);
  border: 1px solid rgba(255, 107, 53, 0.1);
  padding: 2.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

[data-theme="dark"] .service-card {
  background: rgba(255, 107, 53, 0.05);
  border: 1px solid rgba(255, 107, 53, 0.15);
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.05), transparent);
  transition: var(--transition);
}

.service-card:hover::before {
  left: 100%;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--secondary-color);
  box-shadow: 0 20px 40px rgba(255, 107, 53, 0.15);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(255, 107, 53, 0.2));
}

.service-card h3 {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--gray-color);
  line-height: 1.8;
}

/* Portfolio Section */
.portfolio {
  padding: 6rem 2rem;
  background: var(--primary-color);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.portfolio-card {
  background: rgba(255, 107, 53, 0.03);
  border: 1px solid rgba(255, 107, 53, 0.1);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

[data-theme="dark"] .portfolio-card {
  background: rgba(255, 107, 53, 0.05);
  border: 1px solid rgba(255, 107, 53, 0.15);
}

.portfolio-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.05), transparent);
  transition: var(--transition);
}

.portfolio-card:hover::before {
  left: 100%;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  border-color: var(--secondary-color);
  box-shadow: 0 20px 40px rgba(255, 107, 53, 0.15);
}

.portfolio-header {
  padding: 2rem 2rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 107, 53, 0.1);
}

.portfolio-icon {
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(255, 107, 53, 0.2));
  min-width: 60px;
  text-align: center;
}

.portfolio-header h3 {
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

.portfolio-content {
  padding: 1.5rem 2rem 2rem;
}

.portfolio-description {
  color: var(--gray-color);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.portfolio-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: rgba(255, 107, 53, 0.1);
  color: var(--secondary-color);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(255, 107, 53, 0.2);
}

[data-theme="dark"] .tech-tag {
  background: rgba(255, 107, 53, 0.15);
  border: 1px solid rgba(255, 107, 53, 0.25);
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  font-size: 0.9rem;
}

.portfolio-link:hover {
  color: var(--orange-light);
  transform: translateX(4px);
}

.portfolio-link i {
  font-size: 0.8rem;
  transition: var(--transition);
}

.portfolio-link:hover i {
  transform: translateX(2px);
}

/* About Section */
.about {
  padding: 6rem 2rem;
  background: var(--primary-color);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h2 {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1.5rem;
}

.about-text p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.stat-item {
  text-align: center;
  padding: 2rem;
  background: rgba(255, 107, 53, 0.03);
  border: 1px solid rgba(255, 107, 53, 0.1);
  border-radius: 12px;
  transition: var(--transition);
}

[data-theme="dark"] .stat-item {
  background: rgba(255, 107, 53, 0.05);
  border: 1px solid rgba(255, 107, 53, 0.15);
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(255, 107, 53, 0.1);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--gray-color);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Contact Section */
.contact {
  padding: 6rem 2rem;
  background: linear-gradient(180deg, var(--primary-color) 0%, #f8f9fa 100%);
}

[data-theme="dark"] .contact {
  background: linear-gradient(180deg, var(--primary-color) 0%, #16213e 100%);
}

.contact-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-content h2 {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1.5rem;
}

.contact-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 3rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.contact-icon {
  font-size: 2rem;
  color: var(--secondary-color);
  filter: drop-shadow(0 2px 4px rgba(255, 107, 53, 0.2));
}

.contact-item a,
.contact-item span {
  color: var(--gray-color);
  text-decoration: none;
  transition: var(--transition);
}

.contact-item a:hover {
  color: var(--secondary-color);
}

/* Footer */
.footer {
  background: var(--primary-color);
  padding: 2rem;
  text-align: center;
  border-top: 1px solid rgba(255, 107, 53, 0.1);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-brand {
  font-size: 1.2rem;
  font-weight: 700;
}

.footer p {
  color: var(--gray-color);
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }

  [data-theme="dark"] .nav-menu {
    background: rgba(26, 26, 46, 0.98);
  }

  .nav-menu.active {
    display: flex;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .contact-info {
    flex-direction: column;
    gap: 2rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .contact-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 1rem;
  }

  .hero {
    padding: 6rem 1rem 3rem;
  }

  .services,
  .about,
  .contact {
    padding: 4rem 1rem;
  }

  .service-card {
    padding: 2rem 1.5rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .portfolio-header {
    padding: 1.5rem 1.5rem 1rem;
  }

  .portfolio-content {
    padding: 1rem 1.5rem 1.5rem;
  }

  .portfolio-header h3 {
    font-size: 1.1rem;
  }
}
