/* ============================================
   Sochetra Oeun - Portfolio Styles
   A warm, professional dark theme
   ============================================ */

:root {
  /* Color palette - green on deep slate */
  --bg-primary: #0f1419;
  --bg-secondary: #1a2332;
  --bg-card: #1e2a3a;
  --bg-elevated: #253344;

  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent: #22c55e;
  --accent-hover: #4ade80;
  --accent-muted: rgba(34, 197, 94, 0.2);

  --border: rgba(148, 163, 184, 0.12);
  --border-hover: rgba(34, 197, 94, 0.4);

  /* Typography */
  --font-sans: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Spacing */
  --section-padding: 6rem 0;
  --container-max: 1100px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

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

/* ============================================
   Navigation
   ============================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: rgba(15, 20, 25, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition-smooth);
}

.nav-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-smooth);
}

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-fast);
}

/* ============================================
   Hero Section
   ============================================ */

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

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, var(--accent) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: linear-gradient(225deg, #3b82f6 0%, transparent 70%);
  bottom: -50px;
  left: -50px;
  animation-delay: -10s;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, -30px) scale(1.05);
  }
}

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

.hero-greeting {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  animation: fadeInUp 0.8s ease forwards;
}

.hero-name {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.25rem;
  background: linear-gradient(
    135deg,
    var(--text-primary) 0%,
    var(--text-secondary) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease 0.1s forwards;
  opacity: 0;
}

.hero-title {
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.8s ease 0.3s forwards;
  opacity: 0;
}

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

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

.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: all var(--transition-smooth);
  cursor: pointer;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
}

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

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

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scaleY(0.5);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* ============================================
   Section Styles
   ============================================ */

.section {
  padding: var(--section-padding);
}

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

.section-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.title-num {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
}

/* ============================================
   About Section
   ============================================ */

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

.about-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 4rem;
  align-items: start;
}

.about-image .image-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.about-image .image-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent);
  border-radius: 12px;
  margin: 12px;
  z-index: 1;
  pointer-events: none;
}

.about-image img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

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

.about-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.detail-row {
  display: flex;
  gap: 1rem;
  align-items: baseline;
}

.detail-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  min-width: 80px;
}

.detail-value a {
  color: var(--text-primary);
}

.detail-value a:hover {
  color: var(--accent);
}

.about-traits h4,
.about-hobbies h4 {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.about-traits ul {
  list-style: none;
  margin-bottom: 2rem;
}

.about-traits li {
  padding: 0.35rem 0;
  padding-left: 1.25rem;
  position: relative;
  color: var(--text-secondary);
}

.about-traits li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

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

.hobby-tags span {
  padding: 0.4rem 0.9rem;
  background: var(--bg-elevated);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.hobby-tags span:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================
   Experience / Timeline
   ============================================ */

.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 0.25rem;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-content {
  background: var(--bg-card);
  padding: 1.5rem 1.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all var(--transition-smooth);
}

.timeline-content:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.timeline-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.timeline-content .company {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.timeline-content ul {
  list-style: none;
}

.timeline-content li {
  padding: 0.25rem 0;
  padding-left: 1.25rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.timeline-content li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ============================================
   Skills Section
   ============================================ */

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

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.skill-card {
  background: var(--bg-card);
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all var(--transition-smooth);
}

.skill-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.skill-name {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.skill-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 3px;
  width: 0;
  transition: width 1s ease;
}

.skill-level {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.courses-section h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

.course-card {
  background: var(--bg-card);
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.course-card h4 {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.course-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   Education Section
   ============================================ */

.education-timeline {
  margin-bottom: 2.5rem;
}

.edu-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.edu-item:last-child {
  border-bottom: none;
}

.edu-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
}

.edu-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.edu-school {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.languages h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.lang-tags {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.lang-tag {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border-radius: 8px;
  font-size: 0.9rem;
  border: 1px solid var(--border);
}

.lang-tag.fluent {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================
   Contact Section
   ============================================ */

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

.contact-intro {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text-primary);
  transition: all var(--transition-smooth);
  max-width: 400px;
}

.contact-link:hover {
  border-color: var(--accent);
  transform: translateX(6px);
}

.contact-icon {
  font-size: 1.25rem;
  width: 2rem;
  text-align: center;
}

.contact-address {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

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

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    max-width: 280px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    border-left: 1px solid var(--border);
    transition: right var(--transition-smooth);
  }

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

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

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

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

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-marker {
    left: -1.5rem;
    width: 10px;
    height: 10px;
  }

  .edu-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

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

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

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