@import url("https://fonts.googleapis.com/css2?family=Taprom&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
  --primary-color: #2563eb;
  --secondary-color: #10b981;
  --accent-color: #f59e0b;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --border-color: #e5e7eb;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --bg-base-code :linear-gradient(135deg, #8e2de2, #4a00e0);
}

[data-theme="dark"] {
  --primary-color: #3b82f6;
  --secondary-color: #10b981;
  --accent-color: #fbbf24;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --border-color: #334155;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

.khmer-font {
  font-family: "Battambang", sans-serif; /* for Khmer text */
}

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

.section {
  padding: 5rem 0;
  position: relative;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
  width: 100%;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 2px;
}

.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
}

[data-theme="dark"] .stars-container {
  opacity: 1;
}

.moon {
  position: fixed;
  top: 100px;
  right: 100px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at 30% 30%, #fbbf24, #f59e0b);
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(251, 191, 36, 0.6);
  opacity: 0;
  transform: translateY(-50px);
  transition: all 0.5s ease;
  z-index: 1;
  pointer-events: none;
}

[data-theme="dark"] .moon {
  opacity: 1;
  transform: translateY(0);
}

.moon::before {
  content: "";
  position: absolute;
  top: 15px;
  right: 10px;
  width: 20px;
  height: 20px;
  background: rgba(249, 250, 251, 0.1);
  border-radius: 50%;
}

.moon::after {
  content: "";
  position: absolute;
  bottom: 20px;
  left: 25px;
  width: 12px;
  height: 12px;
  background: rgba(249, 250, 251, 0.08);
  border-radius: 50%;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: var(--transition);
}

[data-theme="dark"] .navbar {
  background: rgba(15, 23, 42, 0.95);
}

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

.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  cursor: pointer;
}

.brand-text {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: var(--transition);
  padding: 0.5rem 0;
}

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

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

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

.theme-toggle,
.lang-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  color: var(--text-primary);
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
}

.sun-icon,
.moon-icon {
  font-size: 1.2rem;
  transition: var(--transition);
}

[data-theme="light"] .moon-icon {
  display: none;
}

[data-theme="dark"] .sun-icon {
  display: none;
}

.theme-toggle:hover,
.lang-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.tech-icons img {
  width: 60px;
  margin-left: 20px;
}
.tech-icons{
  margin-left: 60px;
  margin-top: 20px;
}

.hero-text {
  animation: fadeInLeft 1s ease;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.name-highlight {
  /* background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); */
  background: linear-gradient(135deg, #8e2de2, #4a00e0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, #8e2de2, #4a00e0);
  color: white;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

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

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

.hero-image {
  animation: fadeInRight 1s ease;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.profile-card {
  position: relative;
}
.profile-image {
  width: 90%;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  animation: float 6s ease-in-out infinite;
}

.profile-image img {
  width: 100%; /* fit parent */
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

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

.about-section {
  background: var(--bg-secondary);
}

.about-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.personal-info {
  display: grid;
  gap: 1rem;
}

.info-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.info-label {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 150px;
}

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

.about-stats {
  display: grid;
  gap: 1.5rem;
}

.stat-card {
  background: var(--bg-primary);
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

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

.stat-number:hover {
  background: linear-gradient(135deg, #8e2de2, #4a00e0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.skills-category {
  margin-bottom: 3rem;
}

.category-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

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

.skill-card {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.skill-icon img {
  width: 35px;
  margin-bottom: 0.75rem;
}

.skill-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.skill-bar {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  width: var(--progress);
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 4px;
  animation: fillBar 1.5s ease forwards;
}

@keyframes fillBar {
  from {
    width: 0;
  }
  to {
    width: var(--progress);
  }
}

.tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.tool-badge {
  background: var(--bg-secondary);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-weight: 500;
  color: var(--text-primary);
  transition: var(--transition);
}

.tool-badge:hover {
  background: linear-gradient(135deg, #8e2de2, #4a00e0);
  color: white;
  transform: translateY(-2px);
}

.experience-section {
  background: var(--bg-secondary);
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(
    180deg,
    var(--primary-color),
    var(--secondary-color)
  );
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 2rem;
}

.timeline-marker {
  position: absolute;
  left: -2.5rem;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 4px solid var(--bg-secondary);
  box-shadow: 0 0 0 4px var(--primary-color);
}

.timeline-content {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.timeline-content:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgb(255, 173, 66);
}

.timeline-date {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, #8e2de2, #4a00e0);
  color: white;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.timeline-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.timeline-company {
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 1rem;
}

.timeline-description {
  color: var(--text-secondary);
  line-height: 1.6;
}

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

.project-card {
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgb(229, 229, 229);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.project-image {
  position: relative;
  height: 200px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  overflow: hidden;
}
.project-image img {
  width: 100%;
}
.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-links {
  display: flex;
  gap: 1rem;
  font-size: 12px;
}

.project-link {
  padding: 0.75rem 1.5rem;
  background: white;
  color: var(--primary-color);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.project-link:hover {
  background: var(--bg-base-code);
  color: white;
  transform: scale(1.05);
}

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

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

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.25rem 0.75rem;
  background: var(--bg-base-code);
  color: white;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
}
.fa-github{
  font-size: 18px;
}
.contact-section {
  background: var(--bg-secondary);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-details {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-icon {
  font-size: 1.5rem;
  background: linear-gradient(135deg, #8e2de2, #4a00e0);

  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}

.contact-text {
  flex: 1;
}

.contact-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  display: block;
}

.contact-text a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.contact-text a:hover {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 50px;
  height: 50px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.contact-form-wrapper {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.contact-form {
  display: grid;
  gap: 1.5rem;
}

.form-group {
  display: grid;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  padding: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .profile-image-wrapper {
    width: 300px;
    height: 300px;
  }

  .profile-image::before {
    font-size: 8rem;
  }

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

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

  .moon {
    right: 50px;
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--bg-primary);
    flex-direction: column;
    padding: 2rem;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.active {
    left: 0;
  }

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

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

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

  .profile-image-wrapper {
    width: 250px;
    height: 250px;
  }

  .profile-image::before {
    font-size: 6rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    padding-left: 2rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .moon {
    right: 20px;
    top: 80px;
    width: 50px;
    height: 50px;
  }
}

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

  .section {
    padding: 3rem 0;
  }

  .hero-title {
    font-size: 1.75rem;
    margin-top: 55px;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .hero-content {
    flex-direction: column-reverse;
    display: flex;
  }
  .hero-image {
    margin-top: 20px;
    margin-bottom: -70px;
  }
  .profile-image-wrapper {
    width: 250px;
    height: 250px;
    margin-left: 35px;
  }
  .timeline-content {
    margin-left: -30px;
  }
  .tech-icons img {
  width: 40px;
  margin: 0;;
}
.tech-icons{
  margin-top: 10px;
  margin-left: -20px;
}
}
