:root {
  /* Matched to index.html (GitHub-dark + accent blue) */
  --bg: #0d1117;
  --bg-deep: #010409;
  --surface: #161b22;
  --surface-2: #1c2128;
  --ink: #e6edf3;
  --ink-2: #c9d1d9;
  --muted: #8b949e;
  --line: #21262d;
  --line-2: #30363d;
  --accent: #5274f8;
  --accent-dark: #3651d4;
  --accent-light: rgba(79, 110, 247, 0.14);
  --accent-text: #7b93fa;
  --mint: rgba(16, 185, 129, 0.14);
  --mint-text: #34d399;
  --amber: rgba(245, 158, 11, 0.14);
  --amber-text: #fbbf24;
  --rose: rgba(239, 68, 68, 0.14);
  --rose-text: #f87171;
  --max: 1180px;
  --r: 14px;
  --r-sm: 8px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Inter", "Noto Sans Thai", Arial, sans-serif;
  line-height: 1.65;
  background:
    radial-gradient(circle at 15% 0%, rgba(82, 116, 248, 0.07), transparent 30rem),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

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

figure {
  margin: 0;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(82, 116, 248, 0.6);
  outline-offset: 4px;
}

.page-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-dark);
  box-shadow: 0 10px 24px rgba(82, 116, 248, 0.28);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
  overflow: visible;
}

.brand-mark .mark-back {
  fill: rgba(255, 255, 255, 0.16);
  stroke: rgba(255, 255, 255, 0.78);
  stroke-width: 1.7;
}

.brand-mark .mark-front {
  fill: rgba(255, 255, 255, 0.12);
  stroke: #ffffff;
  stroke-width: 2;
}

.brand-mark .mark-line {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.brand-mark .mark-dot {
  fill: #ffffff;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.nav-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: var(--r-sm);
  transition: background 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--surface);
  transform: translateY(-1px);
}

.nav-links .nav-primary {
  background: var(--accent-dark);
  color: #ffffff;
}

.nav-links .nav-primary:hover {
  background: var(--accent);
  color: #ffffff;
}

.hero {
  padding: clamp(56px, 8vw, 96px) 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(320px, 0.72fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.hero-grid > * {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 99px;
  background: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--ink);
  overflow-wrap: break-word;
}

h1 {
  max-width: 760px;
  margin-top: 18px;
  font-size: clamp(2.4rem, 7.5vw, 5.4rem);
  line-height: 1.02;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  line-height: 1.1;
  font-weight: 700;
}

h3 {
  font-size: 1.14rem;
  line-height: 1.3;
  font-weight: 600;
}

p {
  margin: 0;
  color: var(--muted);
}

.hero-copy {
  max-width: 700px;
  margin-top: 22px;
  font-size: 1.08rem;
  color: var(--ink-2);
}

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  padding: 0 18px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease);
}

.button:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 14px 32px rgba(1, 4, 9, 0.5);
}

.button.primary {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #ffffff;
}

.button.cobalt {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #ffffff;
}

.button.primary:hover,
.button.cobalt:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.button.ghost {
  background: transparent;
}

.proof-panel,
.resume-panel,
.study-shot,
.result-band {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(1, 4, 9, 0.45);
}

.proof-panel {
  padding: 18px;
}

.proof-image {
  overflow: hidden;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--bg);
}

.proof-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.proof-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

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

.proof-item strong {
  font-size: 1.35rem;
  color: var(--accent);
}

.proof-item span {
  max-width: 210px;
  text-align: right;
  color: var(--muted);
}

.section {
  padding: clamp(46px, 7vw, 80px) 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.55fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 26px;
}

.section-heading p {
  max-width: 58ch;
}

.resume-grid,
.study-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.resume-panel {
  padding: 24px;
}

.resume-panel h3,
.decision h3 {
  margin-bottom: 10px;
}

.tag-list,
.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag,
.skill {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: var(--r-sm);
  padding: 0 11px;
  background: var(--mint);
  color: var(--mint-text);
  font-size: 0.84rem;
  font-weight: 600;
}

.tag.alt,
.skill.alt {
  background: var(--amber);
  color: var(--amber-text);
}

.tag-accent { background: var(--accent-light); color: var(--accent); }
.tag-mint   { background: var(--mint); color: var(--mint-text); }
.tag-amber  { background: var(--amber); color: var(--amber-text); }
.tag-rose   { background: var(--rose); color: var(--rose-text); }
.tag-gray   { background: #21262d; color: #8b949e; }

.timeline {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--line);
}

.timeline-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  background: var(--surface);
}

.timeline-row strong {
  color: var(--ink);
}

.project-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-link {
  min-height: 118px;
  display: grid;
  align-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 180ms var(--ease);
}

.project-link:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(1, 4, 9, 0.5);
}

.project-link span {
  color: var(--muted);
  font-size: 0.92rem;
}

.case-hero {
  padding-bottom: 30px;
}

.study-shot {
  overflow: hidden;
  background: var(--surface);
}

.study-shot img {
  width: 100%;
  height: auto;
}

.study-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--line);
}

.study-meta div {
  padding: 16px;
  background: var(--surface);
}

.study-meta strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.study-meta span {
  color: var(--muted);
  font-size: 0.9rem;
}

.study-grid {
  align-items: start;
}

.study-block {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}

.study-block.featured {
  border-color: rgba(82, 116, 248, 0.45);
  background: linear-gradient(160deg, var(--accent-light), transparent 65%), var(--surface);
}

.study-block.featured h2,
.study-block.featured h3 {
  color: var(--ink);
}

.study-block.featured p,
.study-block.featured li {
  color: var(--ink-2);
}

.study-block.featured .eyebrow {
  color: var(--accent);
}

.study-block.featured .eyebrow::before {
  background: var(--accent);
}

.decision-list,
.practice-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.decision {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
}

.decision-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--accent-dark);
  color: #ffffff;
  font-weight: 700;
}

.result-band {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(280px, 0.42fr);
  gap: 24px;
  align-items: center;
  padding: clamp(24px, 4vw, 44px);
  background: linear-gradient(135deg, var(--accent-light), transparent 60%), var(--surface);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

/* ============================================================
   SHOWCASE PAGES — browser-chrome hero + icon-led content blocks
============================================================ */
.browser-frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(1, 4, 9, 0.45);
}

.browser-frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.browser-dot-red { background: #e0605c; }
.browser-dot-amber { background: #e0b95c; }
.browser-dot-green { background: #5cc27a; }

.browser-url {
  min-width: 0;
  margin-left: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.78rem;
  font-family: "SFMono-Regular", Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.showcase-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--accent-light);
  font-size: 1.15rem;
  line-height: 1;
}

.highlight-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
}

.highlight-list li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-2);
}

.highlight-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.footer-band {
  padding: 32px 0 48px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-grid,
  .section-heading,
  .resume-grid,
  .study-grid,
  .result-band {
    grid-template-columns: 1fr;
  }

  .study-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-strip {
    grid-template-columns: 1fr;
  }

  .result-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 24px, var(--max));
  }

  .nav-links a {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.84rem;
  }

  h1 {
    font-size: clamp(2.4rem, 13vw, 3.8rem);
  }

  .timeline-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .study-meta {
    grid-template-columns: 1fr;
  }

  .proof-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .proof-item span {
    text-align: left;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  html {
    background: #ffffff;
    color: #111111;
  }

  .topbar,
  .hero-actions,
  .footer-band,
  .button {
    display: none;
  }

  .hero {
    padding: 24px 0;
  }

  .section {
    padding: 18px 0;
  }

  .proof-panel,
  .resume-panel,
  .study-shot,
  .study-block,
  .result-band {
    box-shadow: none;
  }
}
