/* Modern Portfolio Variables & Reset */
:root {
  /* Colors */
  --primary-color: #ffd400; /* Vibrant Gold */
  --secondary-color: #2c3e50; /* Dark Slate Blue */
  --accent-color: #3498db; /* Bright Blue */
  --text-color: #333333; /* Dark Gray for text */
  --light-text: #f5f5f5; /* Off-white for dark backgrounds */
  --bg-color: #ffffff; /* White background */
  --bg-alt: #f8f9fa; /* Light Gray for alternating sections */
  --dark-bg: #1a252f; /* Dark background for footer/hero */

  /* Spacing */
  --section-padding: 80px 0;
  --container-width: 1100px;

  /* Transitions */
  --transition: all 0.3s ease;
}

/* Reset & Basics */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Outfit", "Sarabun", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  overflow-x: hidden;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h2.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--secondary-color);
  position: relative;
}

h2.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

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

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

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  margin-left: 10px;
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--dark-bg);
}

/* Header & Navigation */
header {
  background-color: rgba(26, 37, 47, 0.95);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

nav {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 1px;
}

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

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  color: var(--light-text);
  font-weight: 500;
  font-size: 1rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

.btn-contact {
  border: 2px solid var(--primary-color);
  padding: 8px 20px;
  border-radius: 4px;
}

.btn-contact:hover {
  background-color: var(--primary-color);
  color: var(--dark-bg) !important;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  transition: var(--transition);
  background-color: var(--light-text);
}

/* Hero Section */
.hero {
  padding: 160px 0 100px;
  background-color: var(--dark-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--light-text);
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-content {
  flex: 1;
  padding-right: 50px;
}

.greeting {
  font-size: 1.2rem;
  color: var(--primary-color);
  font-weight: 600;
  display: block;
  margin-bottom: 10px;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 10px;
  line-height: 1.1;
}

.typing-text {
  font-size: 2rem;
  color: #a0aab5;
  margin-bottom: 20px;
  font-weight: 500;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #bdc3c7;
  max-width: 500px;
}

.hero-content strong {
  color: var(--primary-color);
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.image-wrapper {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  border: 5px solid var(--primary-color);
  overflow: hidden;
  box-shadow: 0 0 30px rgba(255, 212, 0, 0.2);
  position: relative;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* About Section */
.section {
  padding: var(--section-padding);
}

.about-content {
  display: flex;
  justify-content: center;
  text-align: center;
}

.about-text {
  max-width: 800px;
  font-size: 1.1rem;
}

.about-text p {
  margin-bottom: 20px;
}

/* Skills Section */
.skills {
  background-color: var(--bg-alt);
}

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

.skill-card {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  text-align: center;
}

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

.skill-icon {
  font-size: 48px !important;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.skill-card h3 {
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.skill-card ul li {
  margin-bottom: 10px;
  color: #666;
}

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

.project-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  border: 1px solid #eee;
}

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

.project-image {
  height: 200px;
  overflow: hidden;
  background-color: #f0f0f0;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.project-content {
  padding: 25px;
}

.project-content h3 {
  font-size: 1.25rem;
  margin-bottom: 5px;
  color: var(--secondary-color);
}

.project-role {
  display: block;
  font-size: 0.9rem;
  color: var(--accent-color);
  margin-bottom: 15px;
  font-weight: 600;
}

.project-content p {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-stack span {
  font-size: 0.8rem;
  background-color: var(--bg-alt);
  padding: 5px 10px;
  border-radius: 20px;
  color: var(--secondary-color);
  font-weight: 500;
}

/* Experience Section */
.experience {
  background-color: var(--bg-alt);
}

.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.timeline::after {
  content: "";
  position: absolute;
  width: 2px;
  background-color: var(--secondary-color);
  top: 0;
  bottom: 0;
  left: 20px;
  margin-left: -1px;
}

.timeline-item {
  padding-left: 50px;
  position: relative;
  margin-bottom: 50px;
}

.timeline-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  background-color: var(--primary-color);
  border: 4px solid white;
  border-radius: 50%;
  left: 20px;
  top: 5px;
  transform: translateX(-50%);
  z-index: 1;
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.3);
}

.timeline-date {
  font-size: 0.9rem;
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 5px;
}

.timeline-content h3 {
  font-size: 1.25rem;
  color: var(--secondary-color);
  margin-bottom: 5px;
}

.timeline-content h4 {
  font-size: 1rem;
  color: #666;
  font-weight: 500;
  margin-bottom: 15px;
}

/* Contact Section */
.contact-wrapper {
  display: flex;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.contact-info {
  flex: 1;
  background-color: var(--secondary-color);
  padding: 50px;
  color: white;
}

.contact-info h3 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.contact-info p {
  color: #bdc3c7;
  margin-bottom: 40px;
}

.info-item {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.info-item span {
  font-size: 24px;
  margin-right: 15px;
  color: var(--primary-color);
}

.social-links {
  margin-top: 50px;
}

.social-links a {
  display: inline-block;
  margin-right: 20px;
  color: white;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 2px;
}

.contact-form {
  flex: 1.5;
  padding: 50px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
}

/* Footer */
footer {
  background-color: var(--dark-bg);
  padding: 30px 0;
  text-align: center;
  color: #7f8c8d;
  font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 991px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .image-wrapper {
    width: 280px;
    height: 280px;
  }

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

@media (max-width: 768px) {
  .hamburger {
    display: block;
    z-index: 1001;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background-color: var(--dark-bg);
    flex-direction: column;
    justify-content: center;
    transition: 0.4s;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    margin: 20px 0;
  }

  .nav-links li a {
    font-size: 1.2rem;
  }

  .hero-container {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-content {
    padding-right: 0;
    margin-top: 40px;
  }

  .hero-content p {
    margin: 0 auto 30px;
  }

  h2.section-title {
    font-size: 2rem;
  }
}
