/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:      #faf7f2;
  --white:      #ffffff;
  --ink:        #1a1a1a;
  --ink-soft:   #444;
  --ink-muted:  #888;
  --accent:     #C9A535;      /* temple gold */
  --accent-lt:  #f0e4b8;
  --accent-dk:  #a07e1e;
  --border:     #e5ddd4;
  --sb-bg:      #1B2A4A;      /* deep Cambodian indigo */
  --sb-fg:      #ede9e1;
  --sb-muted:   #6e7a9a;
  --sb-accent:  #C9A535;
  --green:      #6ee7b7;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;
  --r: 6px;
}

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

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: .875rem;
  line-height: 1.7;
}

/* ─────────────────────────────────────────
   SCROLL PROGRESS
───────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--sb-accent), #b5805a);
  z-index: 999;
  transition: width .08s linear;
}

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--sb-fg);
  padding: 4.5rem 2.5rem 0;

  background: linear-gradient(-42deg, #1B2A4A, #0f1f3a, #1a2a3a, #1B2A4A);
  background-size: 400% 400%;
  animation: gradShift 18s ease infinite;
}

@keyframes gradShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Khmer-inspired diagonal grid overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(201,165,53,.04) 0, rgba(201,165,53,.04) 1px, transparent 1px, transparent 14px),
    repeating-linear-gradient(-45deg, rgba(201,165,53,.04) 0, rgba(201,165,53,.04) 1px, transparent 1px, transparent 14px);
  pointer-events: none;
}

/* floating orbs */
.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.shape { position: absolute; border-radius: 50%; filter: blur(70px); }

.shape-1 {
  width: 520px; height: 520px;
  background: rgba(201,165,53,.16);
  top: -220px; left: -80px;
  animation: orb1 24s ease-in-out infinite alternate;
}
.shape-2 {
  width: 380px; height: 380px;
  background: rgba(80,60,180,.12);
  top: -100px; right: -60px;
  animation: orb2 30s ease-in-out infinite alternate;
}
.shape-3 {
  width: 280px; height: 280px;
  background: rgba(201,165,53,.08);
  bottom: 10px; left: 45%;
  animation: orb3 20s ease-in-out infinite alternate;
}

@keyframes orb1 { from { transform: translate(0,0); }   to { transform: translate(40px, 30px); } }
@keyframes orb2 { from { transform: translate(0,0); }   to { transform: translate(-30px,20px); } }
@keyframes orb3 { from { transform: translate(0,0); }   to { transform: translate(20px,-18px); } }

/* hero inner */
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding-bottom: 2.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.hero-left { flex: 1; }

.hero-label {
  font-size: .61rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sb-accent);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp .6s ease forwards .1s;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6.5vw, 4.2rem);
  font-weight: 300;
  letter-spacing: .02em;
  line-height: 1.06;
  color: var(--white);
  margin-bottom: .75rem;
  opacity: 0;
  animation: fadeUp .85s ease forwards .26s;
}

.hero-tagline {
  font-size: .875rem;
  font-weight: 300;
  color: var(--sb-muted);
  letter-spacing: .05em;
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp .7s ease forwards .42s;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--green);
  background: rgba(110,231,183,.08);
  border: 1px solid rgba(110,231,183,.22);
  border-radius: 2rem;
  padding: .3rem .9rem;
  margin-bottom: 1.6rem;
  opacity: 0;
  animation: fadeUp .65s ease forwards .58s;
}

.dot-live {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(110,231,183,.5); }
  50%       { box-shadow: 0 0 0 6px rgba(110,231,183,0); }
}

.contact-bar {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .38rem 1.3rem;
  opacity: 0;
  animation: fadeUp .65s ease forwards .72s;
}
.contact-bar li {
  display: flex; align-items: center; gap: .38rem;
  font-size: .77rem; color: var(--sb-fg); opacity: .72;
  transition: opacity .25s, color .25s; cursor: default;
}
.contact-bar li:hover { opacity: 1; color: var(--sb-accent); }
.contact-bar svg { width: 12px; height: 12px; fill: var(--sb-accent); flex-shrink: 0; }

/* Photo placeholder */
.photo-wrap {
  flex-shrink: 0;
  opacity: 0;
  animation: fadeUp .7s ease forwards .5s;
}

.photo-ring {
  width: 120px; height: 120px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--sb-accent), #b5805a);
  animation: ringGlow 3s ease-in-out infinite;
}

@keyframes ringGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,165,53,.35); }
  50%       { box-shadow: 0 0 0 8px rgba(201,165,53,.12); }
}

.photo-circle {
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,.06);
}

.photo-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 50%;
}

/* stats strip */
.stats-bar {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.07);
  background: rgba(0,0,0,.15);
  padding: 1.4rem 2rem;
  opacity: 0;
  animation: fadeUp .65s ease forwards .88s;
}

.stat { text-align: center; padding: 0 2.5rem; }

.stat-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--sb-accent);
  line-height: 1;
  margin-bottom: .28rem;
}

.stat-label {
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sb-muted);
}

.stat-div {
  width: 1px; height: 36px;
  background: rgba(255,255,255,.1);
  flex-shrink: 0;
}

/* ── Shared keyframe ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────
   SCROLL-TRIGGERED REVEALS
───────────────────────────────────────── */
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity .7s ease, transform .7s ease;
  transition-delay: var(--d, 0s);
}
.reveal-left  { transform: translateX(-32px); }
.reveal-right { transform: translateX(32px); }

.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ─────────────────────────────────────────
   LAYOUT
───────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  max-width: 1140px;
  margin: 0 auto;
}

/* ─────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────── */
.sidebar {
  background: var(--sb-bg);
  padding: 2.5rem 1.85rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;

  /* Khmer-inspired subtle crosshatch */
  background-image:
    repeating-linear-gradient(45deg, rgba(201,165,53,.025) 0, rgba(201,165,53,.025) 1px, transparent 1px, transparent 14px),
    repeating-linear-gradient(-45deg, rgba(201,165,53,.025) 0, rgba(201,165,53,.025) 1px, transparent 1px, transparent 14px);
}

.sidebar .section-title  { color: var(--sb-accent); border-color: rgba(201,165,53,.18); }
.sidebar .ti             { fill: var(--sb-accent); }
.body-text { color: var(--sb-fg); opacity: .76; font-size: .81rem; line-height: 1.8; }

/* ─────────────────────────────────────────
   SECTION TITLE
───────────────────────────────────────── */
.section-title {
  display: flex; align-items: center; gap: .48rem;
  font-family: var(--font-sans);
  font-size: .6rem; font-weight: 600; letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: .7rem; margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.ti { width: 14px; height: 14px; flex-shrink: 0; opacity: .85; }

/* ─────────────────────────────────────────
   SKILLS
───────────────────────────────────────── */
.skill-list { list-style: none; display: flex; flex-direction: column; gap: .82rem; }
.skill-list li { display: flex; flex-direction: column; gap: .27rem; }
.sn { font-size: .76rem; color: var(--sb-fg); opacity: .87; }
.sb { display: block; height: 3px; background: rgba(255,255,255,.07); border-radius: 2px; overflow: hidden; }
.sf { display: block; height: 100%; width: 0; border-radius: 2px; background: linear-gradient(90deg, var(--sb-accent), #b5805a); transition: width 1.15s cubic-bezier(.4,0,.2,1); }

/* ─────────────────────────────────────────
   LANGUAGES
───────────────────────────────────────── */
.lang-list { list-style: none; display: flex; flex-direction: column; gap: .65rem; }

.lang-list li {
  display: flex; align-items: center; justify-content: space-between;
}

.lang-name { font-size: .82rem; color: var(--sb-fg); opacity: .88; }

.lang-tag {
  font-size: .65rem; font-weight: 600; letter-spacing: .07em;
  color: var(--sb-bg);
  background: var(--sb-accent);
  border-radius: 2rem;
  padding: .15rem .55rem;
}

/* ─────────────────────────────────────────
   EDUCATION
───────────────────────────────────────── */
.edu-school { font-family: var(--font-serif); font-size: 1rem; font-weight: 500; color: var(--sb-fg); margin-bottom: .15rem; }
.edu-detail { font-size: .78rem; color: var(--sb-muted); margin-bottom: .1rem; }
.edu-year   { font-size: .72rem; color: var(--sb-accent); font-weight: 500; letter-spacing: .07em; }

/* ─────────────────────────────────────────
   PERSONAL
───────────────────────────────────────── */
.personal-list { list-style: none; display: flex; flex-direction: column; gap: .82rem; }
.personal-list li { display: flex; flex-direction: column; gap: .08rem; }
.pl { font-size: .61rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--sb-muted); }
.pv { font-size: .79rem; color: var(--sb-fg); opacity: .84; line-height: 1.5; }

/* ─────────────────────────────────────────
   MAIN CONTENT
───────────────────────────────────────── */
.main-content { padding: 2.5rem 2.5rem 3.5rem; background: var(--white); }

/* objective */
.objective {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  background: linear-gradient(135deg, #fdf8ec, #faf7f2);
  border: 1px solid var(--accent-lt);
  border-left: 4px solid var(--accent);
  border-radius: var(--r);
  padding: 1rem 1.2rem;
  margin-bottom: 2rem;
  font-size: .82rem;
  color: var(--ink-soft);
  line-height: 1.72;
}

.obj-icon {
  width: 18px; height: 18px;
  fill: var(--accent);
  flex-shrink: 0;
  margin-top: .15rem;
}

.objective strong { color: var(--ink); font-weight: 600; }

.exp-title { margin-bottom: 1.75rem; }

/* ─────────────────────────────────────────
   TIMELINE
───────────────────────────────────────── */
.timeline { position: relative; padding-left: 1.4rem; }

.timeline::before {
  content: '';
  position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent-lt), transparent 90%);
}

.timeline-item {
  position: relative;
  padding-left: 1.9rem;
  padding-bottom: 1.6rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.tdot {
  position: absolute;
  left: calc(-1.4rem);
  top: 8px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-lt);
  border: 2.5px solid var(--accent);
  transform: translateX(-50%) translateX(1px);
  transition: transform .3s, background .3s;
}

.tdot.active {
  background: var(--accent);
  animation: dotGlow 2.5s ease-in-out infinite;
}

@keyframes dotGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,165,53,.5); }
  50%       { box-shadow: 0 0 0 8px rgba(201,165,53,0); }
}

.tbody {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.05rem 1.2rem;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s;
}
.tbody:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.07); border-color: var(--accent-lt); }

.thead {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 1rem;
  margin-bottom: .5rem;
}

.jt {
  font-family: var(--font-serif); font-size: 1.05rem; font-weight: 500; color: var(--ink);
  margin-bottom: .1rem; transition: color .2s;
}
.tbody:hover .jt { color: var(--accent-dk); }

.co { font-size: .74rem; font-weight: 600; color: var(--accent); letter-spacing: .04em; }

.dbadge {
  flex-shrink: 0;
  font-size: .67rem; font-weight: 500; letter-spacing: .07em;
  color: var(--ink-muted);
  background: var(--accent-lt);
  border-radius: 2rem; padding: .2rem .72rem;
  white-space: nowrap; margin-top: .08rem;
  transition: background .25s, color .25s;
}
.tbody:hover .dbadge { background: var(--accent); color: var(--white); }

/* job bullet list */
.jbullets {
  padding-left: 1.1rem;
  margin-top: .1rem;
}
.jbullets li {
  font-size: .8rem; color: var(--ink-soft); line-height: 1.68;
  margin-bottom: .2rem;
  list-style-type: disc;
}
.jbullets li::marker { color: var(--accent); }

.ref-note {
  margin-top: 1.75rem;
  font-size: .75rem;
  color: var(--ink-muted);
  font-style: italic;
  letter-spacing: .03em;
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.site-footer {
  background: #0d1525;
  color: var(--sb-muted);
  text-align: center;
  padding: 1.1rem 1rem;
  font-size: .72rem;
  letter-spacing: .06em;
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { padding: 2rem 1.5rem; }
  .main-content { padding: 2rem 1.5rem; }
  .hero { padding: 3.5rem 1.5rem 0; }
  .hero-inner { flex-direction: column-reverse; align-items: center; text-align: center; }
  .contact-bar { justify-content: center; }
  .stat { padding: 0 1.25rem; }
  .thead { flex-direction: column; gap: .38rem; }
}

/* ─────────────────────────────────────────
   PRINT
───────────────────────────────────────── */
@media print {
  .scroll-progress { display: none !important; }
  .hero, .sidebar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .reveal-left, .reveal-right { opacity: 1 !important; transform: none !important; animation: none !important; }
  .sf { transition: none !important; }
  .hero-label, .hero-name, .hero-tagline, .hero-badge, .contact-bar, .stats-bar,
  .photo-wrap { opacity: 1 !important; animation: none !important; }
  body { font-size: 10pt; }
  .tbody { break-inside: avoid; }
}
