@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Noto+Sans+Thai:wght@400;500;600;700&display=swap");

:root {
  --bg: #f4f8f1;
  --surface: #ffffff;
  --surface-soft: #edf6e9;
  --ink: #10291c;
  --soft: #3a5b46;
  --muted: #728478;
  --green: #087443;
  --green-dark: #043c26;
  --green-mid: #35a466;
  --pale: #dff3d8;
  --lime: #d9f276;
  --blue: #328fca;
  --purple: #7666d0;
  --red: #bb5145;
  --yellow: #c39120;
  --line: #cfe2d0;
  --line-dark: #9fc2a5;
  --dark: #082d1d;
  --max: 1180px;
  --radius: 17px;
  --shadow: 0 24px 65px rgba(24, 82, 42, .1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: "Manrope", "Noto Sans Thai", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: #fff;
  background: var(--green);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img,
svg {
  display: block;
}

.container {
  width: min(calc(100% - 64px), var(--max));
  margin-inline: auto;
}

.background-blur {
  position: fixed;
  z-index: -1;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(8px);
}

.blur-one {
  top: 20%;
  left: -180px;
  background: rgba(217, 242, 118, .2);
}

.blur-two {
  right: -170px;
  bottom: 12%;
  background: rgba(185, 229, 189, .22);
}

/* Navigation */

.top-nav {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 50;
  width: fit-content;
  max-width: calc(100% - 30px);
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 7px;
  border: 1px solid rgba(159, 195, 165, .9);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 16px 45px rgba(24, 82, 42, .13);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
}

.top-nav a {
  min-height: 41px;
  display: inline-flex;
  align-items: center;
  padding: 0 17px;
  border-radius: 999px;
  color: var(--soft);
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
  transition: .22s ease;
}

.top-nav a:hover,
.top-nav a.active {
  color: #fff;
  background: var(--green);
  box-shadow: 0 7px 18px rgba(8, 116, 67, .2);
  transform: translateY(-1px);
}

/* Shared */

.eyebrow {
  color: var(--green);
  font-family: "DM Mono", monospace;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.section {
  padding: 120px 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 50px;
  margin-bottom: 47px;
}

.section-heading h2,
.page-header h1,
.not-found h1 {
  margin-top: 14px;
  font-size: clamp(2.8rem, 5vw, 5.8rem);
  line-height: .92;
  letter-spacing: -.08em;
  font-weight: 800;
}

.section-heading h2 em,
.page-header h1 em,
.not-found h1 em,
.home-cta h2 em,
.hero-copy h1 em {
  color: var(--green);
  font-style: normal;
}

.section-heading > p {
  max-width: 410px;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.9;
}

.heading-link {
  color: var(--green);
  font-family: "DM Mono", monospace;
  font-size: .69rem;
  white-space: nowrap;
}

.heading-link:hover {
  text-decoration: underline;
}

.button {
  min-height: 49px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 0 19px;
  border: 1px solid var(--line-dark);
  border-radius: 9px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 9px 22px rgba(28, 83, 43, .08);
  font-size: .77rem;
  font-weight: 800;
  transition: .25s ease;
}

.button:hover {
  border-color: var(--green);
  box-shadow: 0 15px 30px rgba(28, 83, 43, .14);
  transform: translateY(-4px);
}

.button-primary {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.button-primary:hover {
  color: #fff;
  background: var(--green-dark);
}

.button-ghost {
  background: rgba(255, 255, 255, .42);
}

/* Home hero */

.home-hero {
  position: relative;
  min-height: 850px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 150px 0 90px;
  background:
    radial-gradient(circle at 78% 34%, rgba(215, 242, 151, .9), transparent 26%),
    linear-gradient(135deg, #f8fcf5 0%, #eaf6e6 58%, #d8efd5 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: .34;
  background-image:
    linear-gradient(rgba(93, 155, 103, .25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 155, 103, .25) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 84%);
  mask-image: linear-gradient(to bottom, #000, transparent 84%);
}

.hero-light {
  position: absolute;
  border-radius: 50%;
  filter: blur(5px);
  pointer-events: none;
}

.hero-light-one {
  top: 80px;
  left: -180px;
  width: 350px;
  height: 350px;
  background: rgba(217, 242, 118, .5);
}

.hero-light-two {
  right: -150px;
  bottom: 10px;
  width: 350px;
  height: 350px;
  background: rgba(169, 224, 178, .5);
}

.home-hero-inner {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 64px), var(--max));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  align-items: center;
  gap: 72px;
  margin-inline: auto;
}

.availability {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
  padding: 8px 13px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(255, 255, 255, .58);
  font-family: "DM Mono", monospace;
  font-size: .64rem;
}

.availability i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-mid);
  box-shadow: 0 0 0 5px rgba(53, 164, 102, .14);
}

.hero-copy h1 {
  margin-top: 18px;
  font-size: clamp(4rem, 8vw, 8.6rem);
  line-height: .86;
  letter-spacing: -.1em;
  font-weight: 800;
}

.hero-description {
  max-width: 640px;
  margin-top: 30px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.9;
}

.hero-description strong {
  color: var(--green-dark);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 54px;
}

.hero-facts div {
  padding-left: 14px;
  border-left: 2px solid var(--green);
}

.hero-facts strong,
.hero-facts span {
  display: block;
}

.hero-facts strong {
  font-size: 1.04rem;
}

.hero-facts span {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .61rem;
}

.hero-object {
  position: relative;
  width: 510px;
  max-width: 100%;
  min-height: 510px;
  justify-self: end;
}

.object-ring {
  position: absolute;
  border: 1px solid rgba(23, 131, 79, .28);
  border-radius: 50%;
}

.ring-a {
  width: 510px;
  height: 510px;
}

.ring-b {
  top: 60px;
  left: 60px;
  width: 390px;
  height: 390px;
}

.ring-c {
  top: 115px;
  left: 115px;
  width: 280px;
  height: 280px;
  border-style: dashed;
}

.object-card {
  position: absolute;
  top: 38px;
  left: 88px;
  z-index: 2;
  width: 325px;
  min-height: 410px;
  padding: 27px;
  border: 1px solid rgba(117, 172, 126, .9);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(222, 243, 215, .9));
  box-shadow: 25px 30px 75px rgba(20, 89, 39, .2);
  transform: rotate(-6deg);
}

.object-card-top,
.object-data {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.object-card-top,
.object-data,
.object-card p {
  font-family: "DM Mono", monospace;
}

.object-card-top {
  color: var(--muted);
  font-size: .6rem;
}

.object-card-top b {
  color: var(--green-mid);
  font-size: .56rem;
  font-weight: 500;
}

.object-card-top i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--green-mid);
}

.object-symbol {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  margin: 56px auto 27px;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  box-shadow: 14px 14px 0 var(--lime);
  font-family: "DM Mono", monospace;
  font-size: 2.2rem;
}

.object-card h2 {
  color: var(--green-dark);
  font-size: 1.38rem;
}

.object-card > p {
  margin-top: 4px;
  color: var(--muted);
  font-size: .64rem;
}

.object-line {
  height: 1px;
  margin: 24px 0 18px;
  background: var(--line);
}

.object-data {
  font-size: .61rem;
}

.object-data small,
.object-data strong {
  display: block;
}

.object-data small {
  margin-bottom: 4px;
  color: var(--muted);
}

.object-data strong {
  color: var(--soft);
  font-weight: 500;
}

.hero-chip {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid var(--line-dark);
  border-radius: 11px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 17px 35px rgba(25, 86, 40, .15);
  backdrop-filter: blur(12px);
  font-family: "DM Mono", monospace;
}

.chip-one {
  top: 72px;
  right: -8px;
}

.chip-two {
  right: 0;
  bottom: 32px;
}

.hero-chip b {
  color: var(--green);
  font-size: 1.2rem;
}

.hero-chip small,
.hero-chip strong {
  display: block;
}

.hero-chip small {
  color: var(--muted);
  font-size: .55rem;
}

.hero-chip strong {
  color: var(--green-dark);
  font-size: .62rem;
  font-weight: 500;
}

.hero-scroll {
  position: absolute;
  right: 0;
  bottom: 31px;
  left: 0;
  z-index: 3;
  width: min(calc(100% - 64px), var(--max));
  display: flex;
  align-items: center;
  gap: 13px;
  margin-inline: auto;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .6rem;
  text-transform: uppercase;
}

.hero-scroll i {
  width: 80px;
  height: 1px;
  background: var(--line-dark);
}

.hero-scroll span:last-child {
  margin-left: auto;
}

/* Home sections */

.home-section {
  padding: 120px 0;
  border-bottom: 1px solid var(--line);
}

.tinted-section {
  background:
    radial-gradient(circle at 90% 15%, rgba(217, 242, 118, .35), transparent 22rem),
    #eaf4e5;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 800px;
}

.content-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: .3s ease;
}

.content-card:hover {
  border-color: var(--line-dark);
  box-shadow: 0 28px 75px rgba(25, 89, 44, .16);
  transform: translateY(-7px);
}

.item-visual {
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.item-visual img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-noise {
  position: absolute;
  inset: 0;
  opacity: .28;
  background-image:
    linear-gradient(rgba(8, 116, 67, .45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 116, 67, .45) 1px, transparent 1px);
  background-size: 30px 30px;
}

.visual-mint {
  color: var(--green-dark);
  background: linear-gradient(135deg, #d9f4d3, #82c78c);
}

.visual-blue {
  color: #083d63;
  background: linear-gradient(135deg, #cbe9f1, #70afd0);
}

.visual-purple {
  color: #fff;
  background: linear-gradient(135deg, #6e63bf, #b3a8f2);
}

.visual-dark {
  color: var(--lime);
  background: linear-gradient(135deg, #082d1d, #1c7348);
}

.visual-red {
  color: #fff;
  background: linear-gradient(135deg, #5b2220, #c35a4d);
}

.visual-yellow {
  color: #60480b;
  background: linear-gradient(135deg, #f5e7a9, #d6ad46);
}

.visual-orbit {
  position: absolute;
  width: 180px;
  height: 180px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: .45;
  transform: rotate(35deg) skewX(-20deg);
}

.visual-orbit-two {
  width: 120px;
  height: 245px;
  transform: rotate(-52deg) skewX(-20deg);
}

.visual-label {
  position: absolute;
  top: 19px;
  left: 21px;
  font-family: "DM Mono", monospace;
  font-size: .58rem;
  font-weight: 500;
}

.item-visual > strong {
  position: relative;
  z-index: 1;
  max-width: 76%;
  text-align: center;
  font-family: "DM Mono", monospace;
  font-size: clamp(1.35rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1.05;
}

.item-visual > small {
  position: absolute;
  right: 20px;
  bottom: 16px;
  font-family: "DM Mono", monospace;
  font-size: .6rem;
}

.content-card-body {
  padding: 25px 27px 28px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--green);
  font-family: "DM Mono", monospace;
  font-size: .64rem;
  text-transform: uppercase;
}

.card-meta b {
  color: var(--green-mid);
  font-weight: 500;
}

.content-card h3 {
  margin: 20px 0 12px;
  font-size: 1.12rem;
  line-height: 1.32;
  letter-spacing: -.035em;
}

.content-card p {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.8;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}

.tag-list span,
.detail-tags span {
  padding: 5px 8px;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  color: var(--soft);
  background: #f7fbf5;
  font-family: "DM Mono", monospace;
  font-size: .59rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 23px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .61rem;
}

.card-footer a {
  color: var(--green);
}

.card-footer a:hover {
  text-decoration: underline;
}

.home-cta {
  padding: 120px 0;
  background:
    radial-gradient(circle at 80% 50%, rgba(217, 242, 118, .25), transparent 20rem),
    var(--dark);
}

.home-cta-inner {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.home-cta h2 {
  margin: 15px 0 30px;
  color: #fff;
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: .9;
  letter-spacing: -.09em;
}

/* Collection pages */

.collection-page {
  min-height: 100vh;
  padding: 160px 0 120px;
}

.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  align-items: end;
  gap: 70px;
  margin-bottom: 47px;
}

.page-header h1 {
  margin-top: 17px;
}

.page-header-side {
  justify-self: end;
}

.page-header-side > p {
  max-width: 420px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.9;
}

.page-count {
  display: inline-block;
  margin-top: 23px;
  color: var(--green);
  font-family: "DM Mono", monospace;
  font-size: .66rem;
}

.collection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.collection-search {
  width: 310px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--green);
  background: var(--surface);
  box-shadow: 0 7px 20px rgba(25, 78, 40, .05);
}

.collection-search:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(8, 116, 67, .1);
}

.collection-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: .77rem;
}

.collection-search input::placeholder {
  color: #91a096;
}

.collection-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.collection-filter {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: var(--surface);
  font-size: .68rem;
  transition: .2s ease;
}

.collection-filter:hover,
.collection-filter.active {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.collection-result {
  min-height: 20px;
  margin: 15px 0;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .65rem;
}

.collection-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.empty-state {
  padding: 55px 20px;
  color: var(--muted);
  text-align: center;
}

.is-hidden {
  display: none !important;
}

/* Detail pages */

.detail-page {
  min-height: 100vh;
  padding: 150px 0 120px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 38px;
  color: var(--green);
  font-family: "DM Mono", monospace;
  font-size: .68rem;
}

.back-link:hover {
  text-decoration: underline;
}

.detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(350px, .9fr);
  align-items: center;
  gap: 70px;
  padding-bottom: 65px;
  border-bottom: 1px solid var(--line);
}

.detail-header h1 {
  max-width: 790px;
  margin-top: 17px;
  font-size: clamp(2.7rem, 6vw, 6.7rem);
  line-height: .92;
  letter-spacing: -.085em;
}

.detail-header-copy > p:not(.eyebrow) {
  max-width: 600px;
  margin-top: 25px;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.9;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 27px;
}

.detail-meta span {
  padding: 7px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  color: var(--green);
  background: var(--pale);
  font-family: "DM Mono", monospace;
  font-size: .61rem;
}

.detail-visual-wrap {
  width: 100%;
}

.detail-visual-wrap .item-visual {
  min-height: 390px;
  border-radius: 21px;
  box-shadow: var(--shadow);
}

.detail-visual-wrap .item-visual > strong {
  font-size: clamp(1.8rem, 4vw, 3.5rem);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 100px;
  padding-top: 65px;
}

.detail-main {
  max-width: 760px;
}

.detail-section {
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}

.detail-section:first-child {
  padding-top: 0;
}

.detail-section h2 {
  margin-top: 12px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -.06em;
}

.detail-description > p:last-of-type {
  margin-top: 20px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.95;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.detail-facts div {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.detail-facts span,
.detail-facts strong {
  display: block;
}

.detail-facts span {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .59rem;
}

.detail-facts strong {
  margin-top: 5px;
  color: var(--soft);
  font-size: .78rem;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.detail-tags span {
  padding: 8px 11px;
  font-size: .66rem;
}

.detail-list {
  display: grid;
  gap: 9px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
}

.detail-list li {
  position: relative;
  padding: 13px 15px 13px 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--soft);
  background: var(--surface-soft);
  font-size: .79rem;
}

.detail-list li::before {
  content: "↗";
  position: absolute;
  left: 14px;
  color: var(--green);
  font-family: "DM Mono", monospace;
}

.result-list {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.result-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.result-list strong {
  color: var(--green);
  font-family: "DM Mono", monospace;
  font-size: .72rem;
}

.result-list span {
  color: var(--soft);
  font-size: .8rem;
  font-weight: 700;
}

.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-family: "DM Mono", monospace;
  font-size: .68rem;
  transition: .2s ease;
}

.inline-link:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
}

.detail-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
}

.sidebar-card {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 9px 24px rgba(25, 78, 40, .05);
}

.sidebar-card span,
.sidebar-card strong,
.sidebar-card small,
.sidebar-card a {
  display: block;
}

.sidebar-card span {
  color: var(--green);
  font-family: "DM Mono", monospace;
  font-size: .58rem;
  text-transform: uppercase;
}

.sidebar-card strong,
.sidebar-card a {
  margin-top: 8px;
  color: var(--soft);
  font-size: .82rem;
}

.sidebar-card small {
  margin-top: 7px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .61rem;
}

.sidebar-card a {
  color: var(--green);
}

/* 404 */

.not-found {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 150px 0 100px;
}

.not-found > .container > p:not(.eyebrow) {
  margin: 25px 0 30px;
  color: var(--muted);
}

/* Footer */

.site-footer {
  padding: 32px 0;
  background: var(--bg);
}

.footer-inner {
  width: min(calc(100% - 64px), var(--max));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-inline: auto;
}

.footer-kicker {
  color: var(--green);
  font-family: "DM Mono", monospace;
  font-size: .65rem;
}

.footer-inner p {
  margin-top: 5px;
  color: var(--muted);
  font-size: .7rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  color: var(--soft);
  font-family: "DM Mono", monospace;
  font-size: .65rem;
}

.footer-links a:hover {
  color: var(--green);
}

/* Reveal */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity .7s ease,
    transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */

@media (max-width: 1050px) {
  .home-hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(390px, .85fr);
    gap: 38px;
  }

  .hero-object {
    transform: scale(.88);
    transform-origin: center;
    margin-right: -45px;
  }

  .content-grid,
  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-header {
    gap: 45px;
  }
}

@media (max-width: 850px) {
  .container,
  .home-hero-inner,
  .hero-scroll,
  .footer-inner {
    width: min(calc(100% - 44px), var(--max));
  }

  .home-hero {
    min-height: auto;
    padding-bottom: 80px;
  }

  .home-hero-inner,
  .page-header,
  .detail-header {
    grid-template-columns: 1fr;
  }

  .home-hero-inner {
    gap: 48px;
  }

  .hero-object {
    width: 510px;
    max-width: 100%;
    justify-self: start;
    margin-right: 0;
    transform: none;
  }

  .page-header {
    gap: 25px;
  }

  .page-header-side {
    justify-self: start;
  }

  .collection-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .collection-search {
    width: 100%;
  }

  .collection-filters {
    justify-content: flex-start;
  }

  .detail-header {
    gap: 45px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .detail-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  html {
    scroll-padding-top: 78px;
  }

  .container,
  .home-hero-inner,
  .hero-scroll,
  .footer-inner {
    width: min(calc(100% - 30px), var(--max));
  }

  .top-nav {
    top: 13px;
    width: calc(100% - 30px);
    justify-content: flex-end;
    padding: 6px 8px;
  }

  .top-nav a {
    display: none;
  }

  .top-nav a.active {
    display: inline-flex;
  }

  .top-nav::after {
    content: "Menu";
    min-height: 41px;
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    border-radius: 999px;
    color: var(--green);
    font-family: "DM Mono", monospace;
    font-size: .64rem;
  }

  .top-nav:hover {
    border-radius: 16px;
  }

  .top-nav:hover a {
    display: inline-flex;
    justify-content: space-between;
    border-radius: 9px;
  }

  .top-nav:hover {
    flex-direction: column;
    align-items: stretch;
    width: min(280px, calc(100% - 30px));
    border-radius: 16px;
  }

  .top-nav:hover::after {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 120px 0 70px;
  }

  .hero-copy h1 {
    font-size: clamp(3.5rem, 17vw, 5.8rem);
  }

  .hero-description {
    font-size: .84rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .hero-facts {
    gap: 17px;
    margin-top: 42px;
  }

  .hero-object {
    min-height: 405px;
    transform: scale(.76);
    transform-origin: left top;
    margin-bottom: -95px;
  }

  .hero-scroll {
    display: none;
  }

  .section,
  .home-section {
    padding: 82px 0;
  }

  .section-heading {
    display: block;
    margin-bottom: 36px;
  }

  .section-heading > p,
  .heading-link {
    display: block;
    margin-top: 22px;
  }

  .content-grid,
  .compact-grid,
  .collection-grid {
    grid-template-columns: 1fr;
  }

  .item-visual {
    min-height: 185px;
  }

  .content-card-body {
    padding: 24px 22px 27px;
  }

  .collection-page,
  .detail-page {
    padding-top: 120px;
  }

  .page-header h1,
  .detail-header h1,
  .not-found h1 {
    font-size: clamp(2.8rem, 14vw, 5.2rem);
  }

  .detail-visual-wrap .item-visual {
    min-height: 290px;
  }

  .detail-layout {
    padding-top: 40px;
  }

  .detail-section h2 {
    font-size: 2rem;
  }

  .detail-facts,
  .detail-sidebar {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

.cursor-orb {
  position: fixed;
  z-index: 100;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  pointer-events: none;
  opacity: .12;
  filter: blur(55px);
  background: var(--lime);
  transform: translate(-50%, -50%);
  transition:
    left .12s linear,
    top .12s linear;
}

.content-card,
.object-card,
.hero-chip,
.sidebar-card {
  position: relative;
}

.content-card::after,
.object-card::after,
.hero-chip::after,
.sidebar-card::after {
  content: "";
  position: absolute;
  top: var(--mouse-y, -100px);
  left: var(--mouse-x, -100px);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle,
    rgba(217, 242, 118, .2),
    transparent 70%
  );
  transform: translate(-50%, -50%);
  transition: opacity .2s ease;
}

.content-card:hover::after,
.object-card:hover::after,
.hero-chip:hover::after,
.sidebar-card:hover::after {
  opacity: 1;
}

/* =========================================================
   THONDON PORTFOLIO ARCHIVE
   Data-first interface
   ========================================================= */

:root {
  --archive-bg: #f2f4ef;
  --archive-surface: #ffffff;
  --archive-ink: #122019;
  --archive-muted: #68736c;
  --archive-line: #d6ddd7;
  --archive-line-dark: #b8c3bb;
  --archive-green: #0c6741;
  --archive-green-dark: #0b3625;
  --archive-blue: #285f83;
  --archive-purple: #625594;
  --archive-red: #945146;
  --archive-yellow: #7d651d;
}

/* Remove previous landing-page decorations */

.background-blur {
  display: none;
}

/* ---------- Header without personal logo ---------- */

.archive-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--archive-line);
  background: rgba(247, 249, 245, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.archive-header-inner {
  width: min(calc(100% - 64px), var(--max));
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-inline: auto;
}

.archive-nav {
  min-width: 0;
  display: flex;
  align-items: stretch;
  align-self: stretch;
}

.archive-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 17px;
  color: var(--archive-muted);
  font-size: 0.69rem;
  font-weight: 700;
  white-space: nowrap;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.archive-nav a::after {
  content: "";
  position: absolute;
  right: 17px;
  bottom: -1px;
  left: 17px;
  height: 2px;
  background: var(--archive-green);
  opacity: 0;
  transform: scaleX(0.5);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.archive-nav a:hover,
.archive-nav a.active {
  color: var(--archive-green);
  background: rgba(12, 103, 65, 0.04);
}

.archive-nav a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.archive-nav a > span {
  color: #94a097;
  font-family: "DM Mono", monospace;
  font-size: 0.5rem;
  font-weight: 400;
}

.archive-nav a.active > span {
  color: var(--archive-green);
}

.archive-header-status {
  display: flex;
  align-items: center;
  justify-self: auto;
  gap: 10px;
}

.archive-header-status > i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #28a768;
  box-shadow: 0 0 0 4px rgba(40, 167, 104, 0.12);
}

.archive-header-status small,
.archive-header-status strong {
  display: block;
}

.archive-header-status small {
  color: var(--archive-muted);
  font-family: "DM Mono", monospace;
  font-size: 0.49rem;
}

.archive-header-status strong {
  margin-top: 1px;
  color: var(--archive-green);
  font-size: 0.68rem;
}

/* ป้องกัน style จาก navbar รุ่นเก่าปะปน */

.top-nav,
.archive-brand {
  display: none !important;
}


/* ---------- Archive home ---------- */

.archive-home {
  min-height: 100vh;
  padding: 74px 0 110px;
  background:
    linear-gradient(rgba(18, 32, 25, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 32, 25, 0.026) 1px, transparent 1px),
    var(--archive-bg);
  background-size: 42px 42px;
}

.archive-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  align-items: end;
  gap: 80px;
  padding-bottom: 54px;
  border-bottom: 1px solid var(--archive-line-dark);
}

.archive-system-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--archive-green);
  font-family: "DM Mono", monospace;
  font-size: 0.59rem;
  letter-spacing: 0.09em;
}

.archive-system-label i {
  width: 32px;
  height: 1px;
  background: var(--archive-line-dark);
}

.archive-overview h1 {
  margin-top: 22px;
  color: var(--archive-ink);
  font-size: clamp(4rem, 9vw, 8.5rem);
  font-weight: 800;
  line-height: 0.84;
  letter-spacing: -0.095em;
}

.archive-overview-meta {
  padding-left: 26px;
  border-left: 1px solid var(--archive-line-dark);
}

.archive-overview-meta dl {
  display: grid;
}

.archive-overview-meta dl > div {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--archive-line);
}

.archive-overview-meta dl > div:first-child {
  padding-top: 0;
}

.archive-overview-meta dl > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.archive-overview-meta dt {
  color: var(--archive-muted);
  font-family: "DM Mono", monospace;
  font-size: 0.55rem;
  text-transform: uppercase;
}

.archive-overview-meta dd {
  min-width: 0;
  color: var(--archive-ink);
  font-size: 0.75rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* ---------- Shared archive sections ---------- */

.archive-directory,
.archive-records {
  padding-top: 62px;
}

.archive-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 20px;
}

.archive-section-header > div {
  display: flex;
  align-items: center;
  gap: 13px;
}

.archive-section-index {
  color: var(--archive-green);
  font-family: "DM Mono", monospace;
  font-size: 0.57rem;
}

.archive-section-header h2 {
  color: var(--archive-ink);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.archive-section-header p {
  color: var(--archive-muted);
  font-family: "DM Mono", monospace;
  font-size: 0.56rem;
}

/* ---------- Directory ---------- */

.archive-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.archive-directory-card {
  --directory-accent: var(--archive-green);

  position: relative;
  min-width: 0;
  min-height: 288px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--archive-line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 35px rgba(31, 57, 42, 0.055);
  isolation: isolate;
  transition:
    border-color 0.24s ease,
    box-shadow 0.24s ease,
    transform 0.24s ease;
}

.archive-directory-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -100px;
  right: -100px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: var(--directory-accent);
  opacity: 0.055;
  transition:
    opacity 0.24s ease,
    transform 0.24s ease;
}

.archive-directory-card:hover {
  border-color: var(--directory-accent);
  box-shadow: 0 21px 48px rgba(31, 57, 42, 0.1);
  transform: translateY(-5px);
}

.archive-directory-card:hover::before {
  opacity: 0.1;
  transform: scale(1.15);
}

.directory-projects {
  --directory-accent: var(--archive-green);
}

.directory-competitions {
  --directory-accent: var(--archive-blue);
}

.directory-credentials {
  --directory-accent: var(--archive-purple);
}

.directory-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: var(--directory-accent);
  font-family: "DM Mono", monospace;
  font-size: 0.56rem;
}

.directory-card-top b {
  font-size: 0.72rem;
  font-weight: 500;
}

.directory-card-icon {
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  margin-top: 38px;
  border: 1px solid color-mix(
    in srgb,
    var(--directory-accent) 30%,
    var(--archive-line)
  );
  border-radius: 8px;
  color: var(--directory-accent);
  background: color-mix(
    in srgb,
    var(--directory-accent) 7%,
    #ffffff
  );
}

.directory-card-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.directory-card-copy {
  margin-top: 20px;
}

.directory-card-copy h3 {
  color: var(--archive-ink);
  font-size: 1.13rem;
  letter-spacing: -0.035em;
}

.directory-card-copy p {
  max-width: 270px;
  margin-top: 7px;
  color: var(--archive-muted);
  font-size: 0.72rem;
  line-height: 1.65;
}

.directory-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--archive-line);
  color: var(--directory-accent);
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
}

.directory-card-action b {
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.archive-directory-card:hover .directory-card-action b {
  transform: translate(3px, -3px);
}

/* ---------- Record table ---------- */

.archive-record-table {
  overflow: hidden;
  border: 1px solid var(--archive-line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 35px rgba(31, 57, 42, 0.045);
}

.archive-record-head,
.archive-record-row {
  display: grid;
  grid-template-columns:
    46px
    105px
    minmax(250px, 1fr)
    110px
    150px
    24px;
  align-items: center;
  gap: 14px;
}

.archive-record-head {
  min-height: 42px;
  padding: 0 17px;
  border-bottom: 1px solid var(--archive-line-dark);
  color: var(--archive-muted);
  background: #e8ede8;
  font-family: "DM Mono", monospace;
  font-size: 0.51rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.archive-record-row {
  min-height: 76px;
  padding: 12px 17px;
  border-bottom: 1px solid var(--archive-line);
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.archive-record-row:last-child {
  border-bottom: 0;
}

.archive-record-row:hover {
  background: #f1f6ef;
}

.archive-record-index,
.archive-record-year {
  color: var(--archive-muted);
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
}

.archive-record-type {
  width: fit-content;
  padding: 5px 7px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-family: "DM Mono", monospace;
  font-size: 0.5rem;
  white-space: nowrap;
}

.archive-record-type-project {
  color: var(--archive-green);
  background: rgba(12, 103, 65, 0.05);
}

.archive-record-type-competition {
  color: var(--archive-blue);
  background: rgba(40, 95, 131, 0.05);
}

.archive-record-type-credential {
  color: var(--archive-purple);
  background: rgba(98, 85, 148, 0.05);
}

.archive-record-main {
  min-width: 0;
}

.archive-record-main strong,
.archive-record-main small {
  display: block;
}

.archive-record-main strong {
  color: var(--archive-ink);
  font-size: 0.76rem;
  line-height: 1.35;
}

.archive-record-main small {
  margin-top: 4px;
  color: var(--archive-muted);
  font-family: "DM Mono", monospace;
  font-size: 0.52rem;
}

.archive-record-status {
  color: var(--archive-muted);
  font-size: 0.66rem;
  font-weight: 600;
}

.archive-record-arrow {
  color: var(--archive-green);
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  transition: transform 0.2s ease;
}

.archive-record-row:hover .archive-record-arrow {
  transform: translate(2px, -2px);
}

/* ---------- Summary cards ---------- */

.archive-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 62px;
  border: 1px solid var(--archive-line);
  background: var(--archive-line);
}

.archive-summary-card {
  min-width: 0;
  min-height: 205px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: #ffffff;
}

.summary-card-label {
  color: var(--archive-muted);
  font-family: "DM Mono", monospace;
  font-size: 0.54rem;
  text-transform: uppercase;
}

.archive-summary-card > strong {
  margin-top: 25px;
  color: var(--archive-green);
  font-family: "DM Mono", monospace;
  font-size: 2.3rem;
  font-weight: 500;
  line-height: 1;
}

.archive-summary-card > p {
  margin-top: 11px;
  color: var(--archive-muted);
  font-size: 0.67rem;
  line-height: 1.6;
}

.archive-summary-card > a {
  margin-top: auto;
  color: var(--archive-green);
  font-family: "DM Mono", monospace;
  font-size: 0.56rem;
  overflow-wrap: anywhere;
}

.archive-summary-card > a:hover {
  text-decoration: underline;
}

.archive-contact-card {
  color: #ffffff;
  background: var(--archive-green-dark);
}

.archive-contact-card .summary-card-label,
.archive-contact-card > p {
  color: rgba(255, 255, 255, 0.6);
}

.archive-contact-card > strong,
.archive-contact-card > a {
  color: var(--lime);
}

/* ---------- Collection page refinements ---------- */

.collection-page {
  padding-top: 78px;
  background: var(--archive-bg);
}

.page-header {
  padding: 45px 0 42px;
  border-bottom: 1px solid var(--archive-line-dark);
}

.page-header h1 {
  font-size: clamp(3.2rem, 7vw, 6.8rem);
}

.collection-toolbar {
  margin-top: 34px;
}

.content-card {
  border-radius: 5px;
  box-shadow: 0 12px 35px rgba(31, 57, 42, 0.06);
}

.content-card:hover {
  transform: translateY(-4px);
}

.item-visual {
  min-height: 175px;
}

.content-card-body {
  padding: 22px;
}

/* ---------- Detail page refinements ---------- */

.detail-page {
  padding-top: 64px;
  background: var(--archive-bg);
}

.detail-header {
  padding-bottom: 52px;
}

.detail-header h1 {
  font-size: clamp(2.8rem, 6vw, 6.2rem);
}

.detail-visual-wrap .item-visual {
  min-height: 340px;
  border-radius: 5px;
}

/* ---------- Archive footer ---------- */

.archive-footer {
  border-top: 1px solid var(--archive-line);
  background: #e7ece7;
}

.archive-footer-inner {
  width: min(calc(100% - 64px), var(--max));
  min-height: 108px;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto auto;
  align-items: center;
  gap: 40px;
  margin-inline: auto;
}

.archive-footer-identity {
  display: flex;
  align-items: center;
  gap: 11px;
}

.archive-footer-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #ffffff;
  background: var(--archive-green-dark);
  font-family: "DM Mono", monospace;
  font-size: 0.63rem;
}

.archive-footer-identity strong,
.archive-footer-identity small {
  display: block;
}

.archive-footer-identity strong {
  font-size: 0.72rem;
}

.archive-footer-identity small {
  margin-top: 3px;
  color: var(--archive-muted);
  font-family: "DM Mono", monospace;
  font-size: 0.51rem;
}

.archive-footer-meta {
  display: flex;
  gap: 18px;
  color: var(--archive-muted);
  font-family: "DM Mono", monospace;
  font-size: 0.51rem;
}

.archive-footer-links {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  color: var(--archive-green);
  font-family: "DM Mono", monospace;
  font-size: 0.55rem;
}

/* Hide old footer if rendered accidentally */

.site-footer {
  display: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .archive-header-inner {
    width: min(calc(100% - 44px), var(--max));
    min-height: 62px;
  }

  .archive-header-status {
    display: none;
  }

  .archive-nav {
    width: 100%;
    justify-content: center;
  }

  .archive-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-footer-inner {
    grid-template-columns: minmax(220px, 1fr) auto;
  }

  .archive-footer-meta {
    display: none;
  }
}

@media (max-width: 820px) {
  .archive-header-inner {
    width: 100%;
    min-height: auto;
    display: block;
  }

  .archive-nav {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0 15px;
    scrollbar-width: none;
  }

  .archive-nav::-webkit-scrollbar {
    display: none;
  }

  .archive-nav a {
    min-height: 54px;
    padding: 0 13px;
  }
  
    .archive-nav a::after {
    right: 13px;
    left: 13px;
  }

  .archive-home {
    padding-top: 52px;
  }

  .archive-overview {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .archive-overview-meta {
    padding-top: 23px;
    padding-left: 0;
    border-top: 1px solid var(--archive-line);
    border-left: 0;
  }

  .archive-directory-grid {
    grid-template-columns: 1fr;
  }

  .archive-directory-card {
    min-height: 250px;
  }

  .archive-record-head {
    display: none;
  }

  .archive-record-row {
    grid-template-columns: 34px 92px minmax(0, 1fr) 20px;
    gap: 10px;
  }

  .archive-record-year,
  .archive-record-status {
    display: none;
  }

  .archive-footer-inner {
    width: min(calc(100% - 30px), var(--max));
  }
}

@media (max-width: 620px) {
  .archive-header-inner {
    min-height: 56px;
  }

  .archive-nav {
    justify-content: flex-start;
    padding: 0 10px;
  }

  .archive-nav a {
    min-height: 50px;
    padding: 0 11px;
    font-size: 0.64rem;
  }

  .archive-nav a > span {
    display: none;
  }

  .archive-nav a::after {
    right: 11px;
    left: 11px;
  }

  .archive-overview h1 {
    font-size: clamp(3.7rem, 20vw, 6rem);
  }

  .archive-overview-meta dl > div {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .archive-section-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .archive-section-header p {
    padding-left: 24px;
  }

  .archive-record-row {
    min-height: 87px;
    grid-template-columns: 28px minmax(0, 1fr) 18px;
    gap: 10px;
    padding: 12px 13px;
  }

  .archive-record-type {
    display: none;
  }

  .archive-record-main strong {
    font-size: 0.71rem;
  }

  .archive-record-main small {
    font-size: 0.49rem;
  }

  .archive-summary-grid {
    grid-template-columns: 1fr;
  }

  .archive-summary-card {
    min-height: 185px;
  }

  .archive-footer-inner {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    padding: 25px 0;
  }

  .archive-footer-links {
    justify-content: flex-start;
  }
}

/* Credential links */

.credential-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 12px 13px;
  border: 1px solid rgba(98, 85, 148, 0.22);
  border-radius: 5px;
  color: var(--archive-purple);
  background: rgba(241, 238, 255, 0.72);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.credential-link:hover {
  border-color: var(--archive-purple);
  background: rgba(233, 229, 255, 0.95);
  transform: translateY(-2px);
}

.credential-link span {
  min-width: 0;
}

.credential-link small,
.credential-link strong {
  display: block;
}

.credential-link small {
  color: var(--archive-muted);
  font-family: "DM Mono", monospace;
  font-size: 0.5rem;
  text-transform: uppercase;
}

.credential-link strong {
  margin-top: 3px;
  color: var(--archive-purple);
  font-size: 0.68rem;
}

.credential-link > b {
  flex: 0 0 auto;
  font-family: "DM Mono", monospace;
  font-size: 0.8rem;
}

.credential-verify-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding: 16px 18px;
  border: 1px solid var(--archive-purple);
  border-radius: 5px;
  color: #ffffff;
  background: var(--archive-purple);
  box-shadow: 0 10px 24px rgba(98, 85, 148, 0.16);
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.credential-verify-button:hover {
  color: #ffffff;
  background: #514681;
  box-shadow: 0 15px 30px rgba(98, 85, 148, 0.22);
  transform: translateY(-3px);
}

.credential-verify-button small,
.credential-verify-button strong {
  display: block;
}

.credential-verify-button small {
  color: rgba(255, 255, 255, 0.66);
  font-family: "DM Mono", monospace;
  font-size: 0.55rem;
  text-transform: uppercase;
}

.credential-verify-button strong {
  margin-top: 4px;
  font-size: 0.82rem;
}

.credential-verify-button > b {
  font-family: "DM Mono", monospace;
  font-size: 1rem;
}

/* Credential gallery */

.detail-gallery-section {
  overflow: hidden;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.detail-gallery-item {
  min-width: 0;
}

.gallery-open {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--archive-line, var(--line));
  border-radius: 5px;
  background: #eef2ed;
  cursor: zoom-in;
}

.gallery-open img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
  transition: transform 0.25s ease;
}

.gallery-open:hover img {
  transform: scale(1.025);
}

.gallery-open > span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #ffffff;
  background: rgba(11, 54, 37, 0.88);
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
}

.detail-gallery-item figcaption {
  margin-top: 8px;
  color: var(--archive-muted, var(--muted));
  font-family: "DM Mono", monospace;
  font-size: 0.56rem;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 64px 24px 24px;
  background: rgba(8, 22, 15, 0.94);
  backdrop-filter: blur(10px);
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox img {
  max-width: min(1200px, 100%);
  max-height: calc(100vh - 88px);
  object-fit: contain;
}

.gallery-lightbox-close {
  position: fixed;
  top: 18px;
  right: 20px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.4rem;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 620px) {
  .detail-gallery {
    grid-template-columns: 1fr;
  }
}

/* Image cover cards */

.item-visual-banner {
  min-height: 200px;
  background-color: #e6ece7;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.detail-visual-wrap .item-visual-banner {
  min-height: 390px;
  border-radius: 5px;
}

.item-visual-banner::after {
  content: none;
}

.item-visual-banner + .content-card-body {
  border-top: 0;
}

/* Image cover with automatic fallback */

.item-visual-media {
  position: relative;
  display: block;
  min-height: 200px;
  overflow: hidden;
  background: #e6ece7;
}

.item-cover-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #e6ece7;
}

.item-cover-fallback {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.item-cover-fallback[hidden] {
  display: none;
}

.item-cover-fallback .item-visual-fallback {
  min-height: 100%;
  height: 100%;
}

.item-visual-fallback {
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.detail-visual-wrap .item-visual-media,
.detail-visual-wrap .item-visual-fallback {
  min-height: 390px;
}

.detail-visual-wrap .item-cover-fallback,
.detail-visual-wrap .item-cover-fallback .item-visual-fallback {
  height: 100%;
}

@media (max-width: 650px) {
  .item-visual-media {
    min-height: 185px;
  }

  .detail-visual-wrap .item-visual-media,
  .detail-visual-wrap .item-visual-fallback {
    min-height: 290px;
  }
}

/* =========================================================
   Certified and badge collection
   ========================================================= */

.badges-collection-page {
  min-height: 100vh;
  padding: 78px 0 120px;
  background: var(--archive-bg);
}

.credential-group {
  padding-top: 62px;
}

.credential-group + .credential-group {
  margin-top: 72px;
  padding-top: 62px;
  border-top: 1px solid var(--archive-line-dark);
}

.credential-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
}

.credential-group-header > div {
  display: flex;
  align-items: center;
  gap: 13px;
}

.credential-group-index {
  color: var(--archive-green);
  font-family: "DM Mono", monospace;
  font-size: 0.57rem;
}

.credential-group-header h2 {
  color: var(--archive-ink);
  font-size: 1.05rem;
  letter-spacing: -0.025em;
}

.credential-group-header p {
  color: var(--archive-muted);
  font-family: "DM Mono", monospace;
  font-size: 0.56rem;
}

.certified-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 900px;
}

.certified-card .item-visual {
  min-height: 220px;
}

.certified-card-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.certified-card-facts span {
  padding: 5px 8px;
  border: 1px solid var(--archive-line-dark);
  border-radius: 3px;
  color: var(--archive-green);
  background: rgba(12, 103, 65, 0.045);
  font-family: "DM Mono", monospace;
  font-size: 0.55rem;
}

/* Badge area */

.badge-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.badge-tile {
  min-width: 0;
  border: 1px solid var(--archive-line);
  border-radius: 5px;
  background: var(--archive-surface);
  box-shadow: 0 10px 28px rgba(31, 57, 42, 0.055);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

.badge-tile:hover {
  border-color: var(--archive-green);
  box-shadow: 0 20px 42px rgba(31, 57, 42, 0.12);
  transform: translateY(-5px);
}

.badge-tile-link {
  display: block;
  padding: 12px;
}

.badge-tile-image,
.badge-tile-missing {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 3px;
  background: #edf1ec;
}

.badge-tile-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #ffffff;
  transition: transform 0.25s ease;
}

.badge-tile:hover .badge-tile-image img {
  transform: scale(1.035);
}

.badge-tile-missing {
  display: grid;
  place-items: center;
  padding: 15px;
  border: 1px dashed var(--archive-line-dark);
  color: var(--archive-muted);
  text-align: center;
  font-family: "DM Mono", monospace;
  font-size: 0.53rem;
}

.badge-tile-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  color: var(--archive-green);
  font-family: "DM Mono", monospace;
  font-size: 0.54rem;
}

.badge-tile-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-tile-meta b {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 400;
}

.badge-tile h3 {
  min-height: 43px;
  margin-top: 8px;
  color: var(--archive-ink);
  font-size: 0.73rem;
  line-height: 1.45;
  letter-spacing: -0.025em;
}

/* ถ้าภาพ badge โหลดไม่ได้ ให้ไม่เหลือ broken-image icon */

.badge-tile-image img {
  font-family: "DM Mono", monospace;
  font-size: 0.5rem;
}

@media (max-width: 1050px) {
  .badge-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .certified-grid {
    grid-template-columns: 1fr;
  }

  .badge-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .credential-group-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .badge-tile-link {
    padding: 9px;
  }

  .badge-tile h3 {
    min-height: 0;
    font-size: 0.68rem;
  }
}
