/* =========================================================
   Bea Hana, light education theme
   Palette: 3 accents only (leaf green, sky blue, warm tan) + neutrals
   ========================================================= */

:root {
  --bg:      #f7f4ea;
  --bg-2:    #efeade;
  --surface: #ffffff;
  --ink:     #182620;
  --muted:   #596a60;
  --faint:   #87948a;
  --line:    rgba(24, 38, 32, 0.12);
  --line-2:  rgba(24, 38, 32, 0.22);

  /* the only three colours, matched to the EcoSim icon */
  --c1: #3f9a2b;   /* leaf green  */
  --c2: #1c8ad6;   /* sky blue    */
  --c3: #c9a63a;   /* warm tan    */

  --c1-soft: rgba(63, 154, 43, 0.14);
  --c2-soft: rgba(28, 138, 214, 0.14);
  --c3-soft: rgba(201, 166, 58, 0.20);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --maxw: 1100px;
  --header-h: 75px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--c2-soft); }

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

h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }

/* ---------- background: local batik motif + soft colour ---------- */

.accent-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 60;
  background: linear-gradient(90deg,
    var(--c1) 0 33.33%,
    var(--c2) 33.33% 66.66%,
    var(--c3) 66.66% 100%);
}

.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%233F9A2B' stroke-width='1.3'%3E%3Cellipse cx='48' cy='20' rx='10' ry='16'/%3E%3Cellipse cx='48' cy='76' rx='10' ry='16'/%3E%3Cellipse cx='20' cy='48' rx='16' ry='10'/%3E%3Cellipse cx='76' cy='48' rx='16' ry='10'/%3E%3C/g%3E%3Ccircle cx='48' cy='48' r='2.6' fill='%231C8AD6'/%3E%3C/svg%3E");
  background-size: 96px 96px;
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 620px at 90% -8%, rgba(51, 168, 219, 0.20), transparent 62%),
    radial-gradient(820px 620px at 2% 6%, rgba(92, 184, 60, 0.16), transparent 60%),
    radial-gradient(760px 540px at 62% 104%, rgba(209, 181, 132, 0.18), transparent 62%);
}

.progress {
  position: fixed;
  top: 3px; left: 0;
  height: 2px; width: 0%;
  z-index: 60;
  background: var(--c1);
  transition: width 0.1s linear;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
main, .site-footer { position: relative; z-index: 2; }

/* ---------- header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.site-header.is-scrolled,
.site-header.is-solid {
  background: rgba(247, 244, 234, 0.86);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(24, 38, 32, 0.05);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 74px; }

.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--serif); font-size: 1.06rem; font-weight: 600; }
.brand-mark { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--c1-soft); color: var(--c1); }
.brand-mark svg { width: 19px; height: 19px; }

.nav { display: flex; align-items: center; gap: 30px; }

.nav-link { position: relative; font-size: 0.93rem; color: var(--muted); padding: 6px 0; transition: color 0.25s var(--ease); }
.nav-link::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; border-radius: 2px;
  background: var(--c2);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--ink); }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.lang-toggle:hover { border-color: var(--line-2); color: var(--ink); box-shadow: 0 4px 14px rgba(27, 42, 40, 0.06); }
.lang-sep { color: var(--faint); }
.lang-opt.is-active { color: var(--c1); font-weight: 600; }

/* --- header floats over the photo: light text until scrolled --- */
.site-header:not(.is-scrolled):not(.is-solid) .brand { color: #fff; }
.site-header:not(.is-scrolled):not(.is-solid) .brand-mark { background: rgba(255, 255, 255, 0.18); color: #fff; }
.site-header:not(.is-scrolled):not(.is-solid) .nav-link { color: rgba(255, 255, 255, 0.80); }
.site-header:not(.is-scrolled):not(.is-solid) .nav-link:hover,
.site-header:not(.is-scrolled):not(.is-solid) .nav-link.is-active { color: #fff; }
.site-header:not(.is-scrolled):not(.is-solid) .nav-link::after { background: #fff; }
.site-header:not(.is-scrolled):not(.is-solid) .lang-toggle {
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.42);
}
.site-header:not(.is-scrolled):not(.is-solid) .lang-toggle:hover { color: #fff; border-color: #fff; box-shadow: none; }
.site-header:not(.is-scrolled):not(.is-solid) .lang-opt.is-active { color: #fff; }
.site-header:not(.is-scrolled):not(.is-solid) .lang-sep { color: rgba(255, 255, 255, 0.5); }

/* ---------- hero ---------- */

.banner {
  position: relative;
  min-height: 100svh;
  min-height: 100lvh;
  display: flex;
  align-items: center;
  padding: 132px 0 96px;
  overflow: hidden;
}

.banner-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 50%;
  filter: saturate(0.88) contrast(1.03) brightness(0.98);
}

.banner-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 38, 48, 0.55) 0%, rgba(11, 38, 48, 0.20) 34%, rgba(11, 38, 48, 0.74) 76%, rgba(11, 38, 48, 0.92) 100%),
    linear-gradient(90deg, rgba(11, 38, 48, 0.72) 0%, rgba(11, 38, 48, 0.30) 55%, rgba(11, 38, 48, 0.05) 100%);
}

.banner-inner { position: relative; z-index: 2; max-width: 780px; color: #fff; }

.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c1);
  background: var(--c1-soft);
  border: 1px solid rgba(58, 138, 43, 0.22);
  border-radius: 999px;
  padding: 6px 15px;
  margin-bottom: 24px;
}

.badge-photo {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.banner-name { font-size: clamp(1.8rem, 5vw, 3.1rem); line-height: 1.12; margin: 0 0 12px; color: #fff; }

.banner-role { font-size: clamp(1.02rem, 2.2vw, 1.24rem); color: rgba(255, 255, 255, 0.92); margin: 0 0 16px; font-weight: 500; }

.banner-tag { max-width: 600px; color: rgba(255, 255, 255, 0.82); margin: 0 0 30px; }

.banner-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-bottom: 30px; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.btn-primary { background: var(--c1); color: #fff; box-shadow: 0 8px 20px rgba(58, 138, 43, 0.24); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(58, 138, 43, 0.30); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--c2); box-shadow: 0 8px 20px rgba(51, 168, 219, 0.22); }

.btn-glass {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.btn-glass:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.22); border-color: #fff; }

.banner-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 26px; margin: 0; padding: 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.82); }
.banner-facts li { display: inline-flex; align-items: center; gap: 9px; }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-1 { background: var(--c1); }
.dot-2 { background: var(--c2); }
.dot-3 { background: var(--c3); }

/* ---------- sections ---------- */

.section { padding: 84px 0; scroll-margin-top: calc(var(--header-h) + 16px); }
.section-tight { padding-top: 20px; }

.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 44px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.section-index { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.2em; color: var(--c2); }
.section-title { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }

/* ---------- about ---------- */

.about-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: start; }

.lead { font-family: var(--serif); font-size: clamp(1.18rem, 2.3vw, 1.42rem); line-height: 1.55; margin: 0 0 18px; }
.body { color: var(--muted); margin: 0 0 40px; }

.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }

.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 22px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.info-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(27, 42, 40, 0.07); border-color: var(--line-2); }

.info-icon { width: 42px; height: 42px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.info-icon svg { width: 21px; height: 21px; }
.icon-1 { background: var(--c1-soft); color: var(--c1); }
.icon-2 { background: var(--c2-soft); color: #15719f; }
.icon-3 { background: var(--c3-soft); color: var(--c3); }

.info-title { font-size: 1.08rem; margin-bottom: 7px; }
.info-text { color: var(--muted); font-size: 0.9rem; margin: 0; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 26px; }

.panel-title {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 400;
  margin: 0 0 18px;
}

.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 0.93rem; }
.check-list li:first-child { border-top: 0; padding-top: 0; }
.check { flex: none; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%; background: var(--c1-soft); position: relative; }
.check::after {
  content: ""; position: absolute; left: 6px; top: 4px;
  width: 5px; height: 9px;
  border-right: 2px solid var(--c1);
  border-bottom: 2px solid var(--c1);
  transform: rotate(42deg);
}

/* ---------- lanyard ID badge ---------- */

.about-main .panel { margin-top: 22px; }

.lanyard {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto 26px;
  max-width: 320px;
}

.lanyard-drop {
  transform: translateY(-135%) rotate(5deg);
  opacity: 0;
  transition: transform 1.15s cubic-bezier(0.22, 1.25, 0.36, 1), opacity 0.55s ease;
}
.lanyard.is-in .lanyard-drop { transform: none; opacity: 1; }

.lanyard-swing {
  transform-origin: 50% 0%;
  transform: rotate(var(--swing, 0deg));
  perspective: 900px;
  will-change: transform;
}

.lanyard-strap { display: block; width: 240px; height: 92px; }

.id-card {
  position: relative;
  width: 240px;
  margin: -6px auto 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 26px 44px rgba(24, 38, 32, 0.22), 0 6px 14px rgba(24, 38, 32, 0.12);
  transform: rotateY(var(--tilt, 0deg));
}

.id-photo { display: block; width: 100%; height: 250px; object-fit: cover; object-position: center 30%; }

.id-info { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px 16px; }
.id-name { font-family: var(--serif); font-size: 1.14rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.id-role { font-size: 0.78rem; color: var(--muted); }
.id-line {
  margin-top: 8px;
  height: 18px;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 4px);
  opacity: 0.26;
}

/* ---------- 3D lanyard demo ---------- */

#stage3d {
  position: relative;
  width: 100%;
  height: min(72vh, 640px);
  min-height: 420px;
  border-radius: 18px;
  overflow: hidden;
  touch-action: none;
  background: transparent;
}
#stage3d canvas { display: block; width: 100% !important; height: 100% !important; }

#stage3d.stage-inline {
  height: min(62vh, 540px);
  min-height: 380px;
  border-radius: 14px;
  background: transparent;
}

.demo-note { color: var(--muted); font-size: 0.9rem; margin: 18px 0 0; max-width: 680px; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 18px 0 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.stat { background: var(--surface); padding: 20px 12px; text-align: center; }
.stat dt { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.stat dd { margin: 0; font-family: var(--serif); font-size: 1.8rem; font-weight: 600; color: var(--c1); line-height: 1; }
.stat .suffix { color: var(--c2); font-size: 1.2rem; }

/* ---------- CTA ---------- */

.cta-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--c2);
  border-radius: 16px;
  padding: 38px 36px;
  box-shadow: 0 18px 40px rgba(27, 42, 40, 0.06);
}
.cta-title { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 8px; }
.cta-text { color: var(--muted); margin: 0; max-width: 520px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 13px; }

/* ---------- page head (project page) ---------- */

.page-head { padding: 150px 0 24px; }
.page-title { font-size: clamp(2.1rem, 5.5vw, 3.2rem); margin: 14px 0 14px; }
.page-lead { color: var(--muted); max-width: 620px; margin: 0; }

/* ---------- project cards ---------- */

.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 24px 22px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: 0 18px 38px rgba(27, 42, 40, 0.08); border-color: var(--line-2); }

.card-thumb { width: 52px; height: 52px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.card-thumb svg { width: 25px; height: 25px; }
.thumb-1, .thumb-4 { background: var(--c1-soft); color: var(--c1); }
.thumb-2, .thumb-5 { background: var(--c2-soft); color: #15719f; }
.thumb-3, .thumb-6 { background: var(--c3-soft); color: var(--c3); }

.card-title { font-size: 1.24rem; margin-bottom: 10px; }
.card-desc { color: var(--muted); font-size: 0.91rem; margin: 0 0 18px; flex: 1; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; padding: 0; margin: 0 0 20px; }
.tags li {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--c1);
  background: var(--c1-soft);
  border-radius: 6px;
  padding: 3px 9px;
}

.card-link { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-size: 0.85rem; color: var(--faint); }
.card-link svg { width: 15px; height: 15px; }
.card-link.is-live { color: var(--accent, var(--c1)); font-weight: 500; }
.card-link.is-live svg { transition: transform 0.3s var(--ease); }
.placeholder-note { text-align: center; color: var(--faint); font-size: 0.82rem; margin: 34px 0 0; font-style: italic; }

/* ---------- game cards (project page) ---------- */

.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 24px; }

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  animation: cardIn 0.55s var(--ease) both;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.game-card:hover, .game-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 18px 38px rgba(27, 42, 40, 0.10);
  border-color: var(--line-2);
  outline: none;
}
.game-card:focus-visible { box-shadow: 0 0 0 3px var(--c2-soft), 0 18px 38px rgba(27, 42, 40, 0.10); }
.game-card:hover .game-cover img { transform: scale(1.045); }
.game-card:hover .card-link.is-live svg { transform: translateX(4px); }

.game-cover { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--bg-2); }
.game-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.55s var(--ease); }
.game-flag {
  position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px);
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.04em;
  color: #fff; background: rgba(11, 38, 48, 0.66);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border-radius: 999px; padding: 4px 11px;
}

.game-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.game-body .card-title { font-size: 1.35rem; margin-bottom: 8px; letter-spacing: 0.02em; }
.game-body .card-desc { margin: 0 0 18px; }
.game-body .card-link { margin-top: auto; }

@keyframes cardIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- detail tiap game (1 halaman, anchor scroll) ---------- */

.game-details { display: block; }

.game-detail {
  padding: 40px 0 88px;
  scroll-margin-top: calc(var(--header-h) + 20px);
  transition: background 0.6s var(--ease);
}
.game-detail + .game-detail { border-top: 1px solid var(--line); padding-top: 84px; }

/* kilau halus saat bagian ini dituju */
.game-detail:target { background: linear-gradient(180deg, rgba(0, 0, 0, 0), var(--bg-2) 20%, rgba(0, 0, 0, 0)); }

.gd-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 48px;
  align-items: center;
}

.gd-media {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
  box-shadow: 0 22px 44px rgba(27, 42, 40, 0.10);
  transition: box-shadow 0.5s var(--ease);
}
.gd-media img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.game-detail:target .gd-media {
  box-shadow: 0 0 0 3px rgba(30, 143, 199, 0.22), 0 22px 44px rgba(27, 42, 40, 0.12);
}

/* gambar di sisi kanan untuk game genap, biar ritmis */
.game-detail:nth-of-type(even) .gd-media { order: 2; }

.gd-body { max-width: 580px; }

.game-genre {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent, var(--c2));
  background: var(--c2-soft);
  border-radius: 999px;
  padding: 5px 13px;
  margin-bottom: 14px;
}

.gd-title { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 4px 0 14px; letter-spacing: 0.02em; }
.gd-desc { color: var(--muted); margin: 0 0 20px; white-space: pre-line; }
.gd-body .tags { margin-bottom: 26px; }

.gd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.game-download { align-self: flex-start; }
.game-download:not(.is-disabled) { background: var(--accent, var(--c1)); }
.game-download:not(.is-disabled):hover { box-shadow: 0 12px 26px rgba(24, 38, 32, 0.18); }
.game-download.is-disabled { background: var(--faint); box-shadow: none; cursor: not-allowed; opacity: 0.8; }

.gd-top { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--muted); transition: color 0.25s var(--ease); }
.gd-top svg { width: 16px; height: 16px; }
.gd-top:hover { color: var(--ink); }

@media (max-width: 880px) {
  .game-detail { padding: 24px 0 66px; }
  .game-detail + .game-detail { padding-top: 60px; }
  .gd-inner { grid-template-columns: 1fr; gap: 26px; }
  .game-detail:nth-of-type(even) .gd-media { order: 0; }
  .gd-body { max-width: none; }
}

@media (max-width: 620px) {
  .game-download, .gd-actions { width: 100%; }
  .game-download { justify-content: center; }
}

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 54px 0 40px; margin-top: 40px; background: var(--bg-2); }
.footer-inner { display: grid; gap: 22px; }
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.footer-note { color: var(--muted); font-size: 0.88rem; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 12px 26px; }
.footer-link { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 0.89rem; transition: color 0.25s var(--ease); }
.footer-link svg { width: 17px; height: 17px; color: var(--c1); }
.footer-link:hover { color: var(--ink); }
.footer-base {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-top: 20px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.04em; color: var(--faint);
}
.footer-dot { color: var(--line-2); }
.footer-credit { font-size: 0.72rem; color: var(--faint); margin: 8px 0 0; }

/* ---------- reveal ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.75s var(--ease), transform 0.75s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .section { padding: 68px 0; }
  .banner { padding: 116px 0 84px; }
}

@media (max-width: 620px) {
  :root { --header-h: 65px; }
  body { font-size: 16px; }
  .container { padding: 0 20px; }
  .brand-text { display: none; }
  .nav { gap: 20px; }
  .header-inner { height: 64px; }
  .banner { padding: 104px 0 72px; }
  .banner-media { background-position: center 42%; }
  .lanyard { max-width: 250px; }
  .lanyard-strap { width: 200px; height: 78px; }
  .id-card { width: 200px; }
  .id-photo { height: 208px; }
  .stats { grid-template-columns: 1fr; }
  .cta-card { padding: 28px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ about extra: Projects / Journey / Publications / Teaching ============ */

.proj-list { display: grid; gap: 14px; }
.proj-item { display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding: 26px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); }
.proj-item:hover { transform: translateY(-2px); border-color: var(--c1); box-shadow: 0 14px 34px rgba(24,38,32,.08); }
.proj-no { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; color: var(--c1); line-height: 1.1; }
.proj-status { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--c1); }
.proj-title { font-family: var(--serif); font-size: 1.35rem; margin: 6px 0 8px; }
.proj-desc { color: var(--muted); margin: 0; }
.proj-tags { margin: 14px 0 0; font-size: .8rem; color: var(--faint); letter-spacing: .02em; }

.tl { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 46px; position: relative; }
.tl::before { content: ""; position: absolute; top: 19px; left: 6%; right: 6%; height: 1px; background: var(--line-2); }
.tl-item { position: relative; text-align: center; padding: 0 6px; }
.tl-num { display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 16px; border-radius: 50%; background: var(--c1); color: #fff; font-weight: 700; position: relative; z-index: 1; }
.tl-title { display: block; font-weight: 700; }
.tl-desc { display: block; color: var(--muted); font-size: .88rem; margin-top: 6px; line-height: 1.55; }

.pub-list { border-top: 1px solid var(--line); }
.pub-item { display: grid; grid-template-columns: 140px 1fr; gap: 22px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.pub-year { font-size: .8rem; letter-spacing: .06em; color: var(--c1); font-weight: 700; }
.pub-title { font-family: var(--serif); font-size: 1.12rem; margin: 0; }
.pub-meta { color: var(--muted); font-size: .86rem; margin: 6px 0 0; }
.pub-note { margin-top: 22px; font-size: .82rem; color: var(--faint); }
.pub-note a, .text-link { color: var(--c1); font-weight: 700; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s var(--ease); }
.pub-note a:hover, .text-link:hover { border-color: currentColor; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 30px 0 34px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.metric b { display: block; font-family: var(--serif); font-size: 1.55rem; font-weight: 600; color: var(--c1); line-height: 1.1; }
.metric span { display: block; margin-top: 6px; font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

.teach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.teach-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.teach-card h3 { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 10px; }
.teach-card p { color: var(--muted); margin: 0; }

.section-alt { background: var(--bg-2); }

@media (max-width: 900px) {
  .proj-item { grid-template-columns: 46px 1fr; padding: 20px; }
  .tl { grid-template-columns: 1fr; gap: 22px; }
  .tl::before { display: none; }
  .tl-item { display: grid; grid-template-columns: 38px 1fr; gap: 13px; text-align: left; padding: 0; }
  .tl-num { margin: 0; }
  .pub-item { grid-template-columns: 1fr; gap: 6px; }
  .teach-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric b { font-size: 1.3rem; }
}

.section-lead { margin: 14px 0 0; color: var(--muted); max-width: 660px; }
