/* ===== VARIABLES ===== */
:root {
  /* Light Mode */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f8fa;
  --text-primary: #333333;
  --text-secondary: #666666;
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --card-bg: #ffffff;
  --card-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  --border-color: #e5e7eb;
  --progress-bg: #e5e7eb;
  --header-bg: rgba(255, 255, 255, 0.95);
  --footer-bg: #f5f8fa;
  /* UI Elements */
  --btn-text: #ffffff;
  --form-bg: #ffffff;
  --form-border: #e5e7eb;
  /* Transitions */
  --transition: all 0.3s ease;
}
/* Dark Mode Colors */
.dark-mode {
  --bg-primary: #121212;
  --bg-secondary: #1f1f1f;
  --text-primary: #f5f5f5;
  --text-secondary: #b3b3b3;
  --accent-color: #3b82f6;
  --accent-hover: #60a5fa;
  --card-bg: #1f1f1f;
  --card-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
  --border-color: #333333;
  --progress-bg: #333333;
  --header-bg: rgba(18, 18, 18, 0.95);
  --footer-bg: #1f1f1f;
  /* UI Elements */
  --btn-text: #ffffff;
  --form-bg: #1f1f1f;
  --form-border: #333333;
}
/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Kanit', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: var(--transition);
}
a {
  text-decoration: none;
  color: var(--accent-color);
  transition: var(--transition);
}
a:hover {
  color: var(--accent-hover);
}
ul {
  list-style: none;
}
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  color: var(--text-primary);
}
.section-title::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 3px;
  background-color: var(--accent-color);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}
section {
  padding: 80px 0;
}
/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 12px 25px;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  border: none;
}
.btn-primary {
  background-color: var(--accent-color);
  color: var(--btn-text);
}
.btn-primary:hover {
  background-color: var(--accent-hover);
  color: var(--btn-text);
}
.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 2px solid var(--accent-color);
}
.btn-outline:hover {
  background-color: var(--accent-color);
  color: var(--btn-text);
}
/* ===== HEADER ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--header-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  backdrop-filter: blur(10px);
}
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}
.logo h1 {
  font-size: 1.8rem;
  font-weight: 700;
}
.logo span {
  color: var(--accent-color);
}
nav ul {
  display: flex;
}
nav ul li {
  margin-left: 30px;
}
nav ul li a {
  color: var(--text-primary);
  font-weight: 400;
  position: relative;
}
nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  bottom: -5px;
  left: 0;
  transition: var(--transition);
}
nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}
.theme-toggle {
  margin-left: 20px;
}
#theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-primary);
  transition: var(--transition);
}
.dark-mode .fa-moon,
.light-mode .fa-sun {
  display: none;
}
.dark-mode .fa-moon {
  display: none;
}
.light-mode .fa-moon {
  display: block;
}
.dark-mode .fa-sun {
  display: block;
  color: #ffd24d;
}
.menu-toggle {
  display: none;
}
/* ===== HERO SECTION ===== */
.hero {
  padding-top: 150px;
  padding-bottom: 100px;
}
.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hero-content {
  flex: 1;
}
.hero-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.hero-content h2 span {
  color: var(--accent-color);
  position: relative;
  display: inline-block;
}
.hero-content h2 span::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 8px;
  background-color: rgba(59, 130, 246, 0.2);
  bottom: 5px;
  left: 0;
  z-index: -1;
}
.hero-content h3 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 15px;
  color: var(--text-secondary);
}
.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  max-width: 500px;
}
.hero-btns {
  margin-bottom: 30px;
}
.hero-btns .btn {
  margin-right: 15px;
}
.social-links {
  display: flex;
}
.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--bg-secondary);
  border-radius: 50%;
  margin-right: 15px;
  color: var(--text-primary);
  font-size: 1.2rem;
  transition: var(--transition);
}
.social-links a:hover {
  background-color: var(--accent-color);
  color: white;
  transform: translateY(-3px);
}
.hero-image {
  flex: 1;
  text-align: center;
}
.hero-image img {
  max-width: 400px;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
}
/* ===== ABOUT SECTION ===== */
.about {
  background-color: var(--bg-secondary);
}
.about-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.about-text {
  flex: 1;
}
.about-text p {
  margin-bottom: 20px;
  font-size: 1.1rem;
}
.about-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}
.info-item h4 {
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--accent-color);
}
/* ===== SKILLS SECTION ===== */
.skills-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.skill-category h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--accent-color);
}
.skill-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}
.skill-item {
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}
.skill-item:hover {
  transform: translateY(-5px);
}
.skill-icon {
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 15px;
}
.skill-item h4 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 10px;
}
.skill-progress {
  height: 8px;
  background-color: var(--progress-bg);
  border-radius: 10px;
  overflow: hidden;
}
.skill-progress .progress {
  height: 100%;
  background-color: var(--accent-color);
  border-radius: 10px;
}
/* ===== SHOWCASE SECTION ===== */
.showcase {
  background-color: var(--bg-primary);
}
.video-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  align-items: center;
  margin-top: 20px;
}
#showcase-video {
  width: 100%;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  background-color: var(--card-bg);
  transition: var(--transition);
}
.video-description {
  padding: 20px;
  background-color: var(--card-bg);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  height: fit-content;
}
.video-description h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--accent-color);
}
.video-description p {
  color: var(--text-secondary);
  line-height: 1.7;
}
@media screen and (max-width: 992px) {
  .video-container {
    grid-template-columns: 1fr;
  }
  #showcase-video {
    margin-bottom: 20px;
  }
}
/* ===== PROJECTS SECTION ===== */
.projects {
  background-color: var(--bg-secondary);
}
.projects-filter {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.filter-btn {
  background: none;
  border: none;
  padding: 8px 20px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  margin: 0 5px 10px;
  border-radius: 20px;
}
.filter-btn:hover,
.filter-btn.active {
  background-color: var(--accent-color);
  color: white;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}
.project-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}
.project-card:hover {
  transform: translateY(-10px);
}
.project-img {
  overflow: hidden;
  height: 200px;
}
.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.project-card:hover .project-img img {
  transform: scale(1.05);
}
.project-content {
  padding: 20px;
}
.project-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.project-content p {
  margin-bottom: 15px;
  color: var(--text-secondary);
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 15px;
}
.project-tags span {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--accent-color);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  margin-right: 10px;
  margin-bottom: 5px;
}
.project-links {
  display: flex;
}
.project-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  background-color: var(--bg-secondary);
  border-radius: 50%;
  margin-right: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
}
.project-links a:hover {
  background-color: var(--accent-color);
  color: white;
}
/* ===== CONTACT SECTION ===== */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.contact-item {
  display: flex;
  align-items: flex-start;
}
.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: rgba(59, 130, 246, 0.1);
  border-radius: 50%;
  margin-right: 15px;
  color: var(--accent-color);
  font-size: 1.3rem;
}
.contact-text h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 5px;
}
.contact-text p {
  color: var(--text-secondary);
}
.contact-form {
  background-color: var(--form-bg);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--form-border);
  border-radius: 5px;
  background-color: var(--form-bg);
  color: var(--text-primary);
  font-family: 'Kanit', sans-serif;
  font-size: 1rem;
  transition: var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}
.contact-form .btn {
  width: 100%;
}
/* ===== FOOTER ===== */
footer {
  background-color: var(--footer-bg);
  padding: 50px 0 20px;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.footer-logo h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 5px;
}
.footer-logo span {
  color: var(--accent-color);
}
.footer-logo p {
  color: var(--text-secondary);
}
.footer-social {
  display: flex;
  gap: 15px;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(59, 130, 246, 0.1);
  border-radius: 50%;
  color: var(--accent-color);
  font-size: 1.2rem;
  transition: var(--transition);
}
.footer-social a:hover {
  background-color: var(--accent-color);
  color: white;
  transform: translateY(-3px);
}
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}
.footer-bottom p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
/* ===== RESPONSIVE DESIGN ===== */
@media screen and (max-width: 992px) {
  .hero .container {
    flex-direction: column;
    text-align: center;
  }
  .hero-content {
    margin-bottom: 50px;
  }
  .hero-content p {
    margin: 0 auto 30px;
  }
  .social-links {
    justify-content: center;
  }
  .skills-container {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  .contact-container {
    grid-template-columns: 1fr;
  }
  .about-info {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media screen and (max-width: 768px) {
  header .container {
    position: relative;
  }
  nav {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--header-bg);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
  }
  nav.active {
    height: 300px;
    padding: 20px 0;
  }
  nav ul {
    flex-direction: column;
    align-items: center;
  }
  nav ul li {
    margin: 15px 0;
  }
  .menu-toggle {
    display: block;
  }
  #menu-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-primary);
  }
  .hero-image img {
    max-width: 90%;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .skill-items {
    grid-template-columns: 1fr;
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  .footer-logo {
    margin-bottom: 20px;
  }
}
@media screen and (max-width: 576px) {
  .section-title {
    font-size: 1.8rem;
  }
  .hero-content h2 {
    font-size: 2rem;
  }
  .hero-content h3 {
    font-size: 1.3rem;
  }
  .about-info {
    grid-template-columns: 1fr;
  }
  .project-card {
    max-width: 100%;
  }
}