/* =========================
   Navy-Gold (White) Theme
   ========================= */
:root{
  --navy:#0b1a33;
  --navy2:#0f2447;
  --gold:#c8a64b;

  --bg:#ffffff;
  --panel:#ffffff;
  --panel2:#f6f8fc;

  --text: var(--navy);
  --muted:#52627a;
  --line:#e3e8f0;

  --accent: var(--gold);
  --accent2: var(--navy);

  --shadow: 0 10px 30px rgba(11,26,51,.12);
  --radius: 18px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans Thai", sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 10% 0%, rgba(200,166,75,.22), transparent 60%),
    radial-gradient(1100px 650px at 90% 10%, rgba(11,26,51,.14), transparent 62%),
    radial-gradient(900px 560px at 50% 55%, rgba(200,166,75,.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(255,255,255,.96) 35%, rgba(255,255,255,1) 100%);
  background-attachment: fixed;
}

a{ color:inherit; text-decoration:none; }

.container{ width:min(1120px, 92vw); margin-inline:auto; }
.narrow{ width:min(860px, 92vw); margin-inline:auto; }

.small{ font-size:12px; color:var(--muted); }
.muted{ margin:0; color:var(--muted); }

.divider{
  height:1px;
  background: var(--line);
  margin:14px 0;
}

/* =========================
   Topbar
   ========================= */
.topbar{
  position:sticky; top:0; z-index:20;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.85);
  border-bottom:1px solid var(--line);
}

.topbar-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 0;
}

.brand{
  display:flex; align-items:center; gap:10px;
  font-weight:800; letter-spacing:.2px;
  color: var(--navy);
}

.brand-dot{
  width:12px; height:12px; border-radius:999px;
  background: linear-gradient(135deg, var(--gold), var(--navy));
  box-shadow: 0 0 0 4px rgba(200,166,75,.18);
}

.nav{ display:flex; gap:16px; }
.nav a{
  font-size:14px; color:var(--muted);
  padding:8px 10px; border-radius:999px;
}
.nav a:hover{ background: rgba(11,26,51,.06); color:var(--navy); }

.nav-toggle{
  display:none;
  border:1px solid rgba(11,26,51,.18);
  background: rgba(255,255,255,.6);
  color:var(--navy);
  border-radius:12px;
  padding:8px 10px;
}

/* =========================
   Hero
   ========================= */
.hero{
  padding:64px 0 36px;
  text-align:center;
}

.hero-grid{
  display:grid;
  grid-template-columns: 1.6fr .9fr;
  gap:22px;
  align-items:start;
  justify-items:center;
}

.badge{
  display:inline-block;
  padding:6px 10px;
  border:1px solid rgba(11,26,51,.16);
  background: rgba(11,26,51,.03);
  border-radius:999px;
  color:var(--muted);
  font-size:12px;
  margin:0 0 14px;
}

.title{
  font-size: clamp(28px, 3.3vw, 42px);
  line-height:1.12;
  margin:0 0 10px;
  color: var(--navy);
  font-weight: 900;
  letter-spacing: .2px;
}

.subtitle{
  font-size:16px;
  color:var(--muted);
  margin:0 auto 18px;
  max-width: 70ch;
  position: relative;
  padding-bottom: 22px;
}

.subtitle::after{
  content:"";
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:0;
  width:min(1120px, 92vw);
  height:1px;
  background: var(--line);
}

.gold{
  color: var(--gold);
}

.cta-row{
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
  margin: 16px 0 18px;
}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius: 14px;
  border:1px solid rgba(11,26,51,.18);
  background: rgba(255,255,255,.65);
  color:var(--navy);
  font-weight:700;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover{ transform: translateY(-1px); background: rgba(11,26,51,.06); }

.btn.primary{
  border-color: rgba(200,166,75,.75);
  background: linear-gradient(135deg, rgba(200,166,75,.95), rgba(200,166,75,.65));
  color: var(--navy);
}

.btn.ghost{
  border-color: rgba(11,26,51,.22);
  background: rgba(255,255,255,.5);
}

.btn.block{ width:100%; }

.meta{
  display:grid; gap:10px;
  border-top:1px dashed rgba(82,98,122,.35);
  padding-top:14px;
  justify-content:center;
}

.meta-item{ display:flex; gap:10px; align-items:flex-start; }
.meta-k{
  width:70px;
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.12em;
}
.meta-v{ color:var(--navy); font-size:14px; }

.hero-card{
  border:1px solid var(--line);
  background: rgba(255,255,255,.85);
  border-radius: var(--radius);
  padding:18px;
  box-shadow: var(--shadow);
  width: 100%;
}

.quicklinks{ list-style:none; padding:0; margin:12px 0 0; display:grid; gap:10px; }
.quicklinks a{ color:var(--muted); }
.quicklinks a:hover{ color:var(--navy); }

/* =========================
   Sections + Headings
   ========================= */
.section{ padding:56px 0; background: transparent; }

.section.alt{
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}

.section-head{ margin-bottom:18px; }
.section-head.center{ text-align: center; }
.h2{ font-size: 26px; margin:0 0 6px; color: var(--navy); font-weight: 900; }
.lead{ margin:0; color:var(--muted); }

.grid3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:16px;
}
.grid2{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:16px;
}

.card{
  border:1px solid var(--line);
  background: rgba(255,255,255,.88);
  border-radius: var(--radius);
  padding:18px;
  box-shadow: var(--shadow);
  text-align: left;
}

.prose{
  text-align: left;
}

.prose p,
.prose li,
.prose h3,
.prose h4{
  text-align: left;
}

.h3{ margin:0 0 8px; font-size:18px; color: var(--navy); font-weight: 800; }

.pill{
  display:inline-block;
  font-size:12px;
  color: var(--navy);
  border:1px solid rgba(11,26,51,.18);
  padding:4px 10px;
  border-radius:999px;
  background: rgba(11,26,51,.04);
  margin:0 0 10px;
}

.card-actions{ display:flex; gap:12px; margin-top:12px; }
.link{ color: rgba(11,26,51,.85); font-weight:800; font-size:14px; }
.link:hover{ color: var(--gold); }

/* =========================
   Prose / Abstract
   ========================= */
.prose p{
  color: var(--navy);
  line-height:1.8;
  margin: 0 0 14px;
}
.prose p:last-child{ margin-bottom:0; }

.abstract-section{
  padding: 40px 0;
}
.abstract-title{
  text-align: center;
  margin: 0 0 22px 0;
}
.abstract-body{
  width: min(1100px, 92vw);
  margin: 0 auto;
}
.abstract-body p{
  margin: 0 0 18px 0;
  text-align: justify;
  text-justify: inter-word;
  text-indent: 2em;
  line-height: 1.8;
  hyphens: auto;
}

/* =========================
   Workflow timeline
   ========================= */
.timeline{ display:grid; gap:14px; margin-top: 18px; }

.step{
  display:grid;
  grid-template-columns: 46px 1fr;
  gap:12px;
  align-items:start;
  padding:14px;
  border-radius: var(--radius);
  border:1px solid var(--line);
  background: rgba(255,255,255,.88);
}

.step-no{
  width:38px; height:38px;
  border-radius:12px;
  display:grid; place-items:center;
  font-weight:900;
  background: rgba(200,166,75,.22);
  border:1px solid rgba(200,166,75,.45);
  color: var(--navy);
}

.bullets{ margin:10px 0 0; padding-left:18px; color:var(--navy); }
.bullets li{ margin:8px 0; }

.tags{ display:flex; flex-wrap:wrap; gap:10px; margin-top: 10px; }
.tag{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(11,26,51,.18);
  background: rgba(11,26,51,.04);
  color: var(--muted);
}

.figure{
  width:100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: var(--radius);
  border:1px solid var(--line);
  background: rgba(11,26,51,.03);
  margin: 10px 0 18px;
}

/* =========================
   Developers profiles (4 in a row)
   ========================= */
#developers .container{
  width: min(1400px, 92vw);
}

#developers .section-head{
  text-align: center;
}

.profiles{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.profile{
  text-align: center;
  padding: 8px 6px;
}

.profile-avatar{
  width: 130px;
  height: 130px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  margin: 0 auto 12px;
  border: 6px solid rgba(11,26,51,.08);
  box-shadow: 0 18px 40px rgba(11,26,51,.12);
}

.profile-role{
  margin: 0 0 8px;
  font-weight: 900;
  font-size: 18px;
  color: var(--gold);
  letter-spacing: .2px;
}

.profile-name{
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.25;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.profile-sub{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.profile-links{
  margin-top: 10px;
}

.profile-links a{
  color: var(--gold);
  font-weight: 900;
  text-decoration: none;
}
.profile-links a:hover{
  color: var(--navy);
  text-decoration: underline;
}

/* =========================
   Main Content icon grid
   ========================= */
.icon-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
  justify-items: center;
  margin-top: 26px;
  width: min(900px, 100%);
  margin-inline: auto;
}

.icon-card{
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 10px 6px;
}

.icon-img{
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 14px;
  background: #fff;
  border: 6px solid rgba(11,26,51,.08);
  box-shadow: 0 18px 40px rgba(11,26,51,.12);
  padding: 6px;
}

.icon-title{
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
  color: var(--gold);
}

.icon-sub{
  margin: 0;
  font-size: 18px;
  color: var(--muted);
  line-height: 1.35;
}

.icon-card:hover .icon-title{
  text-decoration: underline;
}

/* =========================
   Poster Section
   ========================= */
.poster-container{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin-top: 26px;
}

.poster-image{
  width: auto;
  max-width: min(1200px, 90vw);
  max-height: 90vh;
  height: auto;
  display: block;
  margin-inline: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* =========================
   Certificate Section
   ========================= */
.certificate-container{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin-top: 26px;
}

.certificate-image{
  width: auto;
  max-width: min(450px, 45vw);
  max-height: 45vh;
  height: auto;
  display: block;
  margin-inline: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* =========================
   Video Section
   ========================= */
.video-container{
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

.intro-video{
  width: 100%;
  max-width: min(900px, 90vw);
  max-height: 90vh;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* =========================
   Footer
   ========================= */
.footer{
  border-top:1px solid var(--line);
  padding:22px 0;
  background: transparent;
}
.footer-inner{ display:flex; justify-content:space-between; align-items:center; gap:12px; }

/* =========================
   Responsive
   ========================= */
@media (max-width: 900px){
  .hero-grid{ grid-template-columns: 1fr; }
  .grid3{ grid-template-columns: 1fr; }
  .grid2{ grid-template-columns: 1fr; }

  .nav{ display:none; }
  .nav-toggle{ display:inline-flex; }

  .nav.open{
    display:flex;
    position:absolute;
    top:56px; right:4vw;
    flex-direction:column;
    background: rgba(255,255,255,.96);
    border:1px solid var(--line);
    border-radius: 16px;
    padding:10px;
    min-width: 220px;
  }

  .icon-grid{ grid-template-columns: 1fr; gap: 22px; }

  .poster-image,
  .certificate-image,
  .intro-video{
    max-width: 95vw;
    max-height: 80vh;
  }
}

@media (max-width: 1200px){
  .profiles{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

  .poster-image,
  .certificate-image,
  .intro-video{
    max-height: 70vh;
  }
}