:root {
  --bg: #0b0d17;
  --bg2: #12162a;
  --card: #151a31;
  --line: #262d4f;
  --fg: #eef0ff;
  --muted: #9aa2c7;
  --a1: #7c5cff;
  --a2: #22d3ee;
  --a3: #f472b6;
  --live: #34d399;
  --beta: #fbbf24;
  --dev: #60a5fa;
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(124, 92, 255, .22), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(34, 211, 238, .14), transparent 60%),
    var(--bg);
  color: var(--fg);
  font: 16px/1.65 "Noto Sans Thai", "Leelawadee UI", "Segoe UI", Tahoma, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(11, 13, 23, .72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 19px; letter-spacing: .2px; }
.brand b { background: linear-gradient(90deg, var(--a1), var(--a2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top nav { display: flex; gap: 22px; }
.top nav a { text-decoration: none; color: var(--muted); font-size: 15px; }
.top nav a:hover { color: var(--fg); }

main { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

.hero { padding: clamp(56px, 10vw, 120px) 0 56px; text-align: center; }
.eyebrow { margin: 0 0 14px; color: var(--a2); font-size: 13px; letter-spacing: 3px; font-weight: 600; }
.hero h1 { margin: 0; font-size: clamp(34px, 6vw, 64px); line-height: 1.2; font-weight: 800; }
.grad { background: linear-gradient(90deg, var(--a1), var(--a2) 55%, var(--a3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 680px; margin: 20px auto 0; color: var(--muted); font-size: clamp(16px, 2vw, 19px); }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
  text-decoration: none; font-weight: 600; font-size: 15px;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--a2); }
.btn.primary { border: 0; background: linear-gradient(90deg, var(--a1), #5b7cff); color: #fff; box-shadow: 0 8px 24px rgba(124, 92, 255, .35); }
.btn.sm { padding: 8px 16px; font-size: 14px; }

.stats { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 860px; margin: 52px auto 0; padding: 0; }
.stats li { padding: 18px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(21, 26, 49, .6); }
.stats b { display: block; font-size: 32px; line-height: 1.1; }
.stats span { color: var(--muted); font-size: 13px; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
h2 { margin: 0; font-size: clamp(26px, 3.4vw, 36px); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: 14px; color: var(--muted); cursor: pointer;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
}
.chip:hover { color: var(--fg); }
.chip.active { color: #fff; border-color: transparent; background: linear-gradient(90deg, var(--a1), #5b7cff); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), var(--bg2));
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(124, 92, 255, .6); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.card[hidden] { display: none; }
.cover { width: 100%; aspect-ratio: 1200 / 630; height: auto; object-fit: cover; background: #0e1224; }
.cover.art { display: grid; place-items: center; position: relative; overflow: hidden; }
.cover.art span {
  font-weight: 800; font-size: clamp(30px, 4vw, 42px); line-height: 1.05; text-align: center;
  letter-spacing: 1px; color: rgba(255, 255, 255, .92); text-shadow: 0 4px 24px rgba(0, 0, 0, .35);
}
.cover.art img {
  position: absolute; inset: 0; margin: auto;
  height: 86%; width: auto; max-width: none; border-radius: 14px;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .4));
}
.cover.gala { background: linear-gradient(180deg, #7dd3fc, #bae6fd); }
.cover.remote { background: linear-gradient(135deg, #0f766e, #1e3a8a); }
.cover.remote img { height: 46%; border-radius: 0; }
.cover.pangya { background: linear-gradient(180deg, #38bdf8, #4ade80); }

.body { display: flex; flex-direction: column; gap: 10px; padding: 20px 20px 22px; flex: 1; }
.body h3 { margin: 0; font-size: 22px; }
.body p { margin: 0; color: var(--muted); font-size: 15px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; color: var(--muted); }
.status { padding: 2px 10px; border-radius: 999px; font-weight: 600; font-size: 12px; border: 1px solid currentColor; }
.status::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.status.live { color: var(--live); }
.status.beta { color: var(--beta); }
.status.dev { color: var(--dev); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; padding: 0; }
.tags li { font-size: 12.5px; padding: 3px 10px; border-radius: 8px; background: rgba(124, 92, 255, .12); color: #c9c2ff; }
.links { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

.timeline { padding: 96px 0 40px; }
.timeline ol { list-style: none; margin: 28px 0 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 0 0 22px 18px; }
.timeline li::before {
  content: ""; position: absolute; left: -30px; top: 7px; width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: 0 0 0 4px var(--bg);
}
.timeline time { color: var(--a2); font-weight: 600; font-size: 14px; }
.timeline li div { color: var(--muted); }
.timeline b { color: var(--fg); }

.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  max-width: 1240px; margin: 40px auto 0; padding: 28px clamp(16px, 4vw, 48px) 40px;
  border-top: 1px solid rgba(255, 255, 255, .06); color: var(--muted); font-size: 14px;
}

@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .top nav { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
}
