/* =====================================================
   THEAM RATANA — Professional Personal Website
   ===================================================== */

/* ---- TOKENS ---- */
:root {
  --navy:       #0d1b2a;
  --navy-2:     #1a2e44;
  --navy-3:     #243b55;
  --blue:       #1a6fdb;
  --blue-light: #3d8ef0;
  --gold:       #e2a829;
  --gold-light: #f5c842;
  --white:      #ffffff;
  --off-white:  #f5f7fa;
  --gray-100:   #eef1f6;
  --gray-200:   #d6dce8;
  --gray-500:   #7a8499;
  --gray-700:   #3d4557;
  --text:       #1a1f2e;
  --text-muted: #5c6478;
  --card-bg:    #ffffff;
  --maxw:       1120px;
  --radius-sm:  8px;
  --radius:     14px;
  --radius-lg:  22px;
  --shadow-sm:  0 1px 4px rgba(13,27,42,.06);
  --shadow:     0 4px 20px rgba(13,27,42,.10);
  --shadow-lg:  0 12px 48px rgba(13,27,42,.14);
  --trans:      0.28s cubic-bezier(.4,0,.2,1);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--off-white);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; }

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

/* ---- NAVBAR ---- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(13,27,42,0.0);
  transition: background var(--trans), box-shadow var(--trans), backdrop-filter var(--trans);
}
.navbar--scrolled {
  background: rgba(13,27,42,0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 2px 20px rgba(0,0,0,.18);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 32px;
  height: 66px; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  font-size: 22px; font-weight: 800; color: var(--white);
  letter-spacing: -.5px;
  background: linear-gradient(135deg, var(--blue-light), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  color: rgba(255,255,255,.78); font-size: 14px; font-weight: 500;
  padding: 7px 14px; border-radius: 8px;
  transition: color var(--trans), background var(--trans);
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,.10); }
.nav-cta {
  background: var(--blue) !important; color: var(--white) !important;
  padding: 8px 18px !important; border-radius: 8px !important;
}
.nav-cta:hover { background: var(--blue-light) !important; }
.menu-toggle {
  display: none; flex-direction: column; gap: 5px; padding: 8px;
}
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--trans); }

/* ---- HERO ---- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 50%, #0f2540 100%);
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.shape {
  position: absolute; border-radius: 50%;
  background: linear-gradient(135deg, rgba(26,111,219,.18), rgba(226,168,41,.10));
  filter: blur(60px);
}
.shape-1 { width: 700px; height: 700px; top: -200px; right: -200px; }
.shape-2 { width: 400px; height: 400px; bottom: 50px; left: -100px; background: linear-gradient(135deg, rgba(26,111,219,.12), transparent); }
.shape-3 { width: 300px; height: 300px; top: 50%; left: 40%; background: linear-gradient(135deg, rgba(226,168,41,.08), transparent); }

.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 64px;
  padding-top: 120px; padding-bottom: 80px;
}
.hero-eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px;
}
.hero-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(42px, 6vw, 72px); font-weight: 700; line-height: 1.08;
  color: var(--white); letter-spacing: -1px; margin-bottom: 12px;
}
.name-family {
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-tagline {
  font-size: 20px; font-weight: 500; color: rgba(255,255,255,.75); margin-bottom: 16px;
}
.highlight {
  color: var(--gold-light); font-weight: 700;
}
.hero-location {
  display: flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,.55); font-size: 14px; margin-bottom: 24px;
}
.hero-summary {
  font-size: 16px; line-height: 1.7; color: rgba(255,255,255,.70);
  max-width: 540px; margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
  transition: all var(--trans); white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: var(--white); box-shadow: 0 4px 18px rgba(26,111,219,.40);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(26,111,219,.55); }
.btn-outline {
  border: 1.5px solid rgba(255,255,255,.3); color: var(--white);
  background: rgba(255,255,255,.06); backdrop-filter: blur(8px);
}
.btn-outline:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.55); }
.btn-ghost {
  border: 1.5px solid rgba(255,255,255,.25); color: rgba(255,255,255,.85);
  background: transparent;
}
.btn-ghost:hover { background: rgba(255,255,255,.10); }

.hero-socials { display: flex; gap: 14px; }
.hero-socials a {
  color: rgba(255,255,255,.5); width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center;
  transition: all var(--trans);
}
.hero-socials a:hover { color: var(--white); border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.08); }

/* ---- HERO IMAGE ---- */
.hero-image-wrap {
  position: relative; flex-shrink: 0;
  width: 300px; height: 300px;
}
.hero-image-ring {
  position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid rgba(226,168,41,.35);
  animation: ring-spin 12s linear infinite;
}
.hero-image-ring::before {
  content: ''; position: absolute; inset: 8px; border-radius: 50%;
  border: 1px solid rgba(26,111,219,.25);
}
@keyframes ring-spin { to { transform: rotate(360deg); } }
.hero-avatar {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 4px solid rgba(255,255,255,.12);
  box-shadow: 0 20px 60px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.06);
}
.hero-badge {
  position: absolute; bottom: 10px; right: -16px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: var(--radius); padding: 10px 16px; text-align: center;
  box-shadow: 0 8px 24px rgba(226,168,41,.4);
  min-width: 80px;
}
.badge-value { display: block; font-size: 22px; font-weight: 800; color: var(--navy); line-height: 1; }
.badge-label { display: block; font-size: 11px; font-weight: 600; color: rgba(13,27,42,.7); margin-top: 2px; }

/* ---- STATS BAR ---- */
.stats-bar {
  position: relative; z-index: 2;
  background: rgba(255,255,255,.05); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 24px 0;
}
.stats-inner { display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap; }
.stat { text-align: center; padding: 0 48px; }
.stat-value { display: block; font-size: 30px; font-weight: 800; color: var(--white); letter-spacing: -1px; }
.stat-label { display: block; font-size: 12px; font-weight: 500; color: rgba(255,255,255,.5); margin-top: 4px; letter-spacing: .5px; text-transform: uppercase; }
.stat-divider { width: 1px; height: 44px; background: rgba(255,255,255,.12); flex-shrink: 0; }

/* ---- SECTION COMMONS ---- */
.section { padding: 96px 0; }
.section--tinted { background: var(--gray-100); }
.section--dark { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); }
.section-header { text-align: center; margin-bottom: 60px; }
.section-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--blue); margin-bottom: 12px;
}
.section-eyebrow--light { color: var(--gold); }
.section-title { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -.5px; color: var(--text); margin-bottom: 14px; }
.section--dark .section-title { color: var(--white); }
.section-subtitle { font-size: 17px; color: var(--text-muted); max-width: 560px; margin: 0 auto; }

/* ---- VENTURES ---- */
.ventures-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.venture-card {
  border-radius: var(--radius-lg); padding: 40px; position: relative; overflow: hidden;
  transition: transform var(--trans), box-shadow var(--trans);
}
.venture-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.venture-card--primary {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
  color: var(--white);
}
.venture-card--secondary {
  background: linear-gradient(135deg, #0f2540 0%, #1a3a5c 100%);
  color: var(--white);
}
.venture-card--primary::before, .venture-card--secondary::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.venture-logo-row { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.venture-icon {
  width: 60px; height: 60px; background: rgba(255,255,255,.10); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.15);
}
.venture-tag {
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold); background: rgba(226,168,41,.15); border: 1px solid rgba(226,168,41,.3);
  padding: 4px 12px; border-radius: 20px;
}
.venture-name { font-size: 24px; font-weight: 800; margin-bottom: 14px; color: var(--white); }
.venture-desc { font-size: 15px; color: rgba(255,255,255,.70); line-height: 1.7; margin-bottom: 24px; }
.venture-highlights { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.venture-highlights li {
  font-size: 14px; color: rgba(255,255,255,.65); padding-left: 18px; position: relative;
}
.venture-highlights li::before {
  content: '→'; position: absolute; left: 0; color: var(--gold); font-size: 12px;
}
.venture-status { font-size: 13px; font-weight: 600; color: var(--gold-light); }
.venture-status.active::before { content: '● '; }

/* ---- ABOUT ---- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.about-text p { color: var(--text-muted); font-size: 16px; line-height: 1.8; margin-bottom: 18px; }
.about-text strong { color: var(--text); font-weight: 700; }
.about-text em { color: var(--blue); font-style: italic; }
.about-langs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.lang-chip {
  font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 20px;
  background: var(--gray-100); border: 1px solid var(--gray-200); color: var(--text);
}
.section--tinted .lang-chip { background: var(--white); }
.about-values { display: flex; flex-direction: column; gap: 24px; }
.value-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--white); border-radius: var(--radius); padding: 20px;
  border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm);
}
.value-icon { font-size: 26px; flex-shrink: 0; margin-top: 2px; }
.value-item h4 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.value-item p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ---- TIMELINE ---- */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--blue), transparent); border-radius: 2px; }
.timeline-item { position: relative; margin-bottom: 48px; }
.timeline-dot {
  position: absolute; left: -31px; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--blue); border: 3px solid var(--off-white);
  box-shadow: 0 0 0 3px var(--blue);
}
.timeline-item--current .timeline-dot { background: var(--gold); box-shadow: 0 0 0 3px var(--gold), 0 0 16px rgba(226,168,41,.4); }
.timeline-content {
  background: var(--white); border-radius: var(--radius-lg); padding: 36px;
  border: 1px solid var(--gray-200); box-shadow: var(--shadow);
}
.timeline-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.timeline-role { font-size: 20px; font-weight: 800; color: var(--text); }
.timeline-company { font-size: 15px; color: var(--blue); font-weight: 600; margin-top: 4px; }
.timeline-badge {
  font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy); padding: 5px 14px; border-radius: 20px; flex-shrink: 0;
}
.timeline-desc { color: var(--text-muted); font-size: 15px; margin-bottom: 24px; }
.timeline-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 24px; }
.timeline-detail-grid h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-700); margin-bottom: 12px; }
.timeline-detail-grid ul li {
  font-size: 14px; color: var(--text-muted); padding-left: 16px; position: relative; margin-bottom: 6px;
}
.timeline-detail-grid ul li::before { content: '✓'; position: absolute; left: 0; color: var(--blue); font-size: 12px; font-weight: 700; }

/* ---- TECH TAGS ---- */
.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-tags span {
  font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 20px;
  background: rgba(26,111,219,.08); color: var(--blue); border: 1px solid rgba(26,111,219,.18);
}

/* ---- SKILLS ---- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill-card {
  background: var(--white); border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm);
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
}
.skill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(26,111,219,.3); }
.skill-icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(26,111,219,.10), rgba(26,111,219,.06));
  display: flex; align-items: center; justify-content: center;
  color: var(--blue); margin-bottom: 16px;
  border: 1px solid rgba(26,111,219,.15);
}
.skill-card h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.skill-card ul li { font-size: 13.5px; color: var(--text-muted); margin-bottom: 6px; padding-left: 14px; position: relative; }
.skill-card ul li::before { content: '·'; position: absolute; left: 3px; color: var(--blue); font-size: 16px; line-height: 1; top: -1px; }

/* ---- PROJECTS ---- */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project-card {
  background: var(--white); border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm);
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
  display: flex; flex-direction: column; gap: 12px;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(26,111,219,.3); }
.project-num { font-size: 36px; font-weight: 900; color: rgba(26,111,219,.12); letter-spacing: -2px; line-height: 1; }
.project-card h3 { font-size: 16px; font-weight: 700; color: var(--text); }
.project-card p { font-size: 14px; color: var(--text-muted); line-height: 1.7; flex: 1; }

/* ---- VISION ---- */
.vision-inner {
  display: grid; grid-template-columns: 1fr auto; gap: 64px; align-items: center;
}
.vision-title { font-size: clamp(22px, 3.5vw, 34px); font-weight: 800; color: var(--white); margin-bottom: 18px; }
.vision-body { font-size: 16px; color: rgba(255,255,255,.68); line-height: 1.8; margin-bottom: 24px; }
.vision-list { display: flex; flex-direction: column; gap: 10px; }
.vision-list li { font-size: 14px; color: rgba(255,255,255,.65); padding-left: 22px; position: relative; }
.vision-list li::before { content: '→'; position: absolute; left: 0; color: var(--gold); font-weight: 700; }
.vision-cta-box {
  background: rgba(255,255,255,.06); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-lg);
  padding: 36px; min-width: 300px; max-width: 340px;
  display: flex; flex-direction: column; gap: 14px;
}
.vision-cta-box h3 { font-size: 20px; font-weight: 800; color: var(--white); }
.vision-cta-box p { font-size: 14px; color: rgba(255,255,255,.65); line-height: 1.7; }

/* ---- CONTACT ---- */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.contact-grid--3 { grid-template-columns: repeat(3, 1fr); }
.contact-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 22px 20px; box-shadow: var(--shadow-sm);
  transition: all var(--trans);
}
.contact-card:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-3px); }
.contact-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm); flex-shrink: 0;
  background: rgba(26,111,219,.08); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.contact-card h4 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.contact-card p { font-size: 12px; color: var(--text-muted); }
.contact-arrow { margin-left: auto; color: var(--gray-200); font-size: 18px; transition: color var(--trans), transform var(--trans); }
.contact-card:hover .contact-arrow { color: var(--blue); transform: translateX(3px); }

/* ---- FOOTER ---- */
.footer {
  background: var(--navy); padding: 36px 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-logo {
  width: 44px; height: 44px; border-radius: var(--radius-sm); flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 900; color: var(--white); letter-spacing: -.5px;
}
.footer-name { font-size: 15px; font-weight: 700; color: var(--white); }
.footer-sub { font-size: 12px; color: rgba(255,255,255,.4); margin-top: 2px; }
.footer-copy { font-size: 13px; color: rgba(255,255,255,.3); }

/* ---- FADE-IN ANIMATION ---- */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.55s ease, transform 0.55s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ---- MOBILE NAV ---- */
@media (max-width: 768px) {
  .nav-links {
    display: none; flex-direction: column; gap: 4px;
    position: fixed; top: 66px; left: 0; right: 0;
    background: rgba(13,27,42,.97); padding: 20px 24px 28px;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .nav-open .nav-links { display: flex; }
  .menu-toggle { display: flex; }
  .nav-links a { padding: 12px 16px; font-size: 15px; border-radius: var(--radius-sm); }
  .nav-cta { text-align: center; }
  .container { padding: 0 20px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-top: 100px; padding-bottom: 0; gap: 40px; }
  .hero-text { order: 2; }
  .hero-image-wrap { order: 1; width: 200px; height: 200px; margin: 0 auto; }
  .hero-badge { right: -8px; bottom: 4px; }
  .hero-summary { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-location, .hero-socials { justify-content: center; }
  .stats-inner { gap: 0; }
  .stat { padding: 12px 20px; }
  .stat-divider { display: none; }
  .ventures-grid, .about-grid, .vision-inner { grid-template-columns: 1fr; }
  .vision-cta-box { min-width: 0; max-width: 100%; }
  .skills-grid, .projects-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid, .contact-grid--3 { grid-template-columns: 1fr 1fr; }
  .timeline-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .skills-grid, .projects-grid, .contact-grid, .contact-grid--3 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}
