/* ==========================================================================
   Design tokens
   ========================================================================== */
:root{
  /* Canvas */
  --stage-w: 1280px;
  --stage-h: 720px;

  /* Dark surface (default) */
  --bg: #12141a;
  --bg-raised: #181b23;
  --ink: #f4efe6;
  --ink-dim: #b7b9c3;
  --ink-faint: #8b8e9b;
  --line: rgba(244,239,230,0.12);
  --line-strong: rgba(244,239,230,0.22);

  /* Accent triad */
  --amber: #dda15e;
  --amber-ink: #2a1d0d;
  --coral: #ef7f5b;
  --coral-ink: #3a1408;
  --teal: #5fc3ba;
  --teal-ink: #072421;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-jp: "Noto Sans JP", "Inter", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  /* Spacing (8px rhythm) */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-6: 48px;
  --sp-8: 64px;
  --sp-12: 96px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after{ box-sizing: border-box; }
html, body{
  height: 100%;
  margin: 0;
  background: #05060a;
  overflow: hidden;
}
body{
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
ul, dl, dd, blockquote, figure, table{ margin: 0; padding: 0; }
ul{ list-style: none; }
table{ border-collapse: collapse; width: 100%; }
img{ max-width: 100%; display: block; }
button{ font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
code{ font-family: var(--font-mono); }

/* ==========================================================================
   Stage — fixed 16:9 canvas, scaled to fit viewport
   ========================================================================== */
.deck{
  position: relative;
  width: 100vw;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stage{
  position: relative;
  width: var(--stage-w);
  height: var(--stage-h);
  flex: 0 0 auto;
  transform: scale(var(--scale, 1));
  transform-origin: center center;
}

/* ==========================================================================
   Slide base
   ========================================================================== */
.slide{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.slide.is-active{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.slide--dark{
  background: var(--bg);
  color: var(--ink);
}

.slide__inner{
  position: relative;
  z-index: 2;
  height: 100%;
  padding: var(--sp-6) var(--sp-8) var(--sp-4);
  display: flex;
  flex-direction: column;
}
.slide__inner--center{
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Enter motion: each direct child of slide__inner rises + fades in, staggered */
.slide.is-active .slide__inner > *{
  animation: rise 620ms var(--ease-out) both;
}
.slide.is-active .slide__inner > *:nth-child(1){ animation-delay: 40ms; }
.slide.is-active .slide__inner > *:nth-child(2){ animation-delay: 100ms; }
.slide.is-active .slide__inner > *:nth-child(3){ animation-delay: 160ms; }
.slide.is-active .slide__inner > *:nth-child(4){ animation-delay: 220ms; }
.slide.is-active .slide__inner > *:nth-child(5){ animation-delay: 280ms; }
.slide.is-active .slide__inner > *:nth-child(6){ animation-delay: 320ms; }
.slide.is-active .slide__inner > *:nth-child(7){ animation-delay: 360ms; }

@keyframes rise{
  from{ opacity: 0; transform: translateY(14px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* Ambient glows (used sparingly) */
.glow{
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.glow--warm{
  width: 520px; height: 520px;
  top: -180px; right: -140px;
  background: radial-gradient(circle, rgba(239,127,91,0.28), transparent 70%);
}
.glow--teal{
  width: 460px; height: 460px;
  bottom: -200px; right: -100px;
  background: radial-gradient(circle, rgba(95,195,186,0.18), transparent 70%);
}

/* ==========================================================================
   Type
   ========================================================================== */
.display{
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.display--xl{ font-size: clamp(58px, 7.6vw, 100px); font-weight: 500; }
.display--lg{ font-size: clamp(38px, 4.6vw, 58px); margin-bottom: var(--sp-4); }

.kicker{
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 var(--sp-2);
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.jp{
  font-family: var(--font-jp);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-faint);
}

.eyebrow{
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.eyebrow-row{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.corp{
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink-dim);
}

.role{
  font-family: var(--font-body);
  font-size: 26px;
  font-weight: 600;
  color: var(--amber);
  margin: var(--sp-2) 0 0;
}

.lede{
  font-size: 21px;
  color: var(--ink-dim);
  max-width: 48ch;
  margin: var(--sp-3) 0 0;
  line-height: 1.55;
}
.lede--accent{ color: var(--ink); font-size: 25px; font-weight: 500; }
.lede-jp{
  font-family: var(--font-jp);
  font-size: 17px;
  color: var(--ink-faint);
  margin: var(--sp-1) 0 0;
}

.body-lg{ font-size: 22px; line-height: 1.55; margin: 0 0 var(--sp-2); }
.body-md{ font-size: 19px; line-height: 1.6; color: var(--ink-dim); margin: 0 0 var(--sp-1); }
.muted{ color: var(--ink-dim); }
.accent-text{ color: var(--teal); }
.intro-line{ max-width: 76ch; color: var(--ink-dim); }

.hr{
  height: 1px;
  background: var(--line);
  margin: var(--sp-4) 0 var(--sp-2);
}
.footline{
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.footnote{
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
  font-size: 18px;
  color: var(--ink-dim);
  max-width: 92ch;
}

.callout-line{
  margin-top: var(--sp-4);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 23px;
  color: var(--ink-dim);
}

/* ==========================================================================
   Tags & pills
   ========================================================================== */
.tag{
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.tag--teal{ background: var(--teal); color: var(--teal-ink); margin-bottom: var(--sp-2); }

.pill{
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill--teal{ background: rgba(95,195,186,0.16); color: var(--teal); }
.pill--coral{ background: rgba(239,127,91,0.18); color: var(--coral); }
.pill--muted{ background: rgba(244,239,230,0.08); color: var(--ink-dim); }
.pill-row{ display: flex; gap: 10px; margin: 0 0 var(--sp-3); }

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.split{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  margin-top: var(--sp-4);
}
.split--wide{ grid-template-columns: 1.3fr 0.8fr; }
.split--date{ grid-template-columns: 0.6fr 1fr; align-items: center; }
.split__side--grow{ display: flex; flex-direction: column; justify-content: center; }

/* ==========================================================================
   Title slide portrait
   ========================================================================== */
.title-layout{
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--sp-8);
  margin-top: var(--sp-4);
}
.portrait-frame{
  width: 210px;
  height: 210px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--line-strong);
  box-shadow: 0 0 0 10px rgba(221,161,94,0.06);
}
.portrait-frame img{ width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   Role table (Early Career slide)
   ========================================================================== */
.role-table{ margin-top: var(--sp-3); }
.role-table td{
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
  vertical-align: middle;
}
.role-table__date{
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink-faint);
  white-space: nowrap;
  width: 220px;
}
.role-table__role{ font-weight: 500; }
.role-table__highlight .role-table__role{ color: var(--amber); font-weight: 600; }
.role-table__co{ color: var(--ink-dim); text-align: right; font-size: 16.5px; }
.role-table__role em{ font-style: normal; color: var(--ink-faint); font-weight: 400; }

/* ==========================================================================
   Card grids
   ========================================================================== */
.card-grid{
  display: grid;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  flex: 1;
  min-height: 0;
}
.card-grid--4{ grid-template-columns: repeat(4, 1fr); }
.card-grid--3{ grid-template-columns: repeat(3, 1fr); }
.card-grid--2{ grid-template-columns: repeat(2, 1fr); }

.mini-card{
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
  background: rgba(244,239,230,0.02);
}
.mini-card--tall{ display: flex; flex-direction: column; gap: 8px; }
.mini-card--accent{ border-color: rgba(239,127,91,0.4); background: rgba(239,127,91,0.05); }
.mini-card h3{
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--ink);
}
.mini-card__note{ color: var(--ink-faint); font-weight: 400; font-size: 15.5px; }
.mini-card__role{ font-size: 15.5px; color: var(--amber); margin: 0; }
.mini-card__co{ font-size: 15px; color: var(--ink-dim); margin: 0; }
.mini-card__date{ font-family: var(--font-mono); font-size: 14px; color: var(--ink-faint); margin: 0; }
.mini-card__desc{ font-size: 17px; color: var(--ink-dim); line-height: 1.5; margin: 0; flex: 1; }

/* ==========================================================================
   Fact list (O2O slide)
   ========================================================================== */
.fact-list div{
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.fact-list div:last-child{ border-bottom: none; }
.fact-list dt{
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 5px;
}
.fact-list dd{ font-size: 20px; font-weight: 500; margin: 0; color: var(--amber); }
.fact-list dd.fact-list__status{ color: var(--teal); }

.big-date{
  font-family: var(--font-display);
  font-size: 74px;
  font-weight: 500;
  line-height: 1;
  color: var(--amber);
  margin: 0 0 10px;
}
.big-date__year{ display: block; font-size: 25px; color: var(--ink-dim); font-weight: 400; margin-top: 4px; }

/* ==========================================================================
   Games (Unity) art placeholders
   ========================================================================== */
.game-card{
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.game-card__art{
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
}
.game-card__art::after{
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(244,239,230,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,239,230,0.06) 1px, transparent 1px);
  background-size: 18px 18px;
}
.game-card__art--photo::after{ display: none; }
.game-card__art--photo img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.game-card h3{ font-size: 17px; font-weight: 600; margin: var(--sp-2) var(--sp-2) 2px; }
.game-card .mini-card__desc{ margin: 0 var(--sp-2) var(--sp-2); }
.game-card .mini-card__date{ margin: 0 var(--sp-2) var(--sp-2); }

/* ==========================================================================
   Life outside work
   ========================================================================== */
.life-grid{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  flex: 1;
}
.life-card{
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-2) 16px 16px;
  background: rgba(244,239,230,0.02);
  display: flex;
  flex-direction: column;
}
.life-card__icon{
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--icon-color);
  background: color-mix(in srgb, var(--icon-color) 16%, transparent);
  margin-bottom: 12px;
}
.life-card__icon svg{ width: 21px; height: 21px; }
.life-card h3{ font-size: 18px; font-weight: 600; margin: 0 0 6px; }
.life-card__en{ font-size: 15px; color: var(--ink-dim); line-height: 1.45; margin: 0 0 8px; }
.life-card__jp{ font-family: var(--font-jp); font-size: 13.5px; color: var(--ink-faint); margin: auto 0 0; }

/* ==========================================================================
   Closing slide
   ========================================================================== */
.slide--closing .kicker{ justify-content: center; }
.dot{ position: absolute; border-radius: 50%; z-index: 1; }
.dot--coral{ width: 12px; height: 12px; background: var(--coral); top: 22%; left: 26%; }
.dot--amber{ width: 8px; height: 8px; background: var(--amber); top: 34%; right: 20%; }
.dot--teal{ width: 10px; height: 10px; background: var(--teal); bottom: 20%; right: 30%; }

/* ==========================================================================
   Question form
   ========================================================================== */
.question-form{
  margin-top: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: 560px;
}
.form-field{
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-label{
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}
.form-input{
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink);
  background: rgba(244,239,230,0.03);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  resize: vertical;
}
.form-input::placeholder{ color: var(--ink-faint); }
.form-input:focus-visible{ outline: 2px solid var(--coral); outline-offset: 1px; border-color: var(--coral); }
.form-textarea{ min-height: 100px; }
.form-submit{
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--coral);
  color: var(--coral-ink);
  font-size: 15px;
  font-weight: 600;
  transition: transform 160ms var(--ease-out), filter 160ms;
}
.form-submit:hover{ filter: brightness(1.08); }
.form-submit:active{ transform: scale(0.97); }
.form-submit:focus-visible{ outline: 2px solid var(--teal); outline-offset: 2px; }

/* ==========================================================================
   Chrome (nav bar)
   ========================================================================== */
.chrome{
  position: fixed;
  right: 14px;
  bottom: 14px;
  left: auto;
  transform: none;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  width: auto;
}
.progress-track{
  width: 120px;
  height: 2px;
  background: rgba(244,239,230,0.14);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar{
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, var(--coral), var(--amber));
  border-radius: 999px;
  transition: width 420ms var(--ease-out);
}
.chrome__row{
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(18,20,26,0.72);
  border: 1px solid rgba(244,239,230,0.12);
  backdrop-filter: blur(14px);
  border-radius: 999px;
  padding: 4px 6px;
}
.icon-btn{
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--ink-dim);
  transition: background 160ms, color 160ms;
}
.icon-btn:hover{ background: rgba(244,239,230,0.1); color: var(--ink); }
.icon-btn:disabled{ opacity: 0.35; cursor: not-allowed; }
.icon-btn:disabled:hover{ background: none; color: var(--ink-dim); }
.icon-btn:focus-visible{ outline: 2px solid var(--coral); outline-offset: 2px; }
.icon-btn svg{ width: 13px; height: 13px; }
.counter{
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-dim);
  min-width: 48px;
  text-align: center;
}
.chrome__divider{ width: 1px; height: 14px; background: var(--line-strong); margin: 0 1px; }

/* ==========================================================================
   Presenter notes drawer
   ========================================================================== */
.notes-drawer{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  background: rgba(8,9,13,0.96);
  border-top: 1px dashed rgba(244,239,230,0.3);
  backdrop-filter: blur(10px);
  padding: 18px clamp(20px, 6vw, 80px) 22px;
  transform: translateY(100%);
  transition: transform 260ms var(--ease-out);
}
.notes-drawer:not([hidden]){ transform: translateY(0); }
.notes-drawer[hidden]{ display: block; }
.notes-drawer__head{
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 10px;
}
.notes-drawer__body{
  font-size: 17px;
  color: var(--ink-dim);
  line-height: 1.6;
  max-width: 900px;
}
.notes-drawer__body ul{ padding-left: 0; }
.notes-drawer__body li{
  padding-left: 20px;
  position: relative;
  margin-bottom: 4px;
}
.notes-drawer__body li::before{
  content: "\2022";
  position: absolute; left: 0; color: var(--ink-faint);
}

/* ==========================================================================
   Hint
   ========================================================================== */
.hint{
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-faint);
  opacity: 0.7;
  pointer-events: none;
  transition: opacity 400ms;
}
.hint.is-hidden{ opacity: 0; }
kbd{
  font-family: var(--font-mono);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
}

/* ==========================================================================
   Responsive scaling fallback for very small viewports (rehearsal on phone)
   ========================================================================== */
@media (max-width: 480px){
  .hint{ display: none; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce){
  .slide.is-active .slide__inner > *{ animation: none !important; opacity: 1 !important; transform: none !important; }
  .progress-bar, .notes-drawer{ transition: none !important; }
}

/* ==========================================================================
   Print (one slide per page)
   ========================================================================== */
@media print{
  html, body{ overflow: visible; height: auto; background: #fff; }
  .chrome, .hint, .notes-drawer{ display: none !important; }
  .deck{ height: auto; display: block; }
  .stage{
    position: static;
    transform: none !important;
    width: auto; height: auto;
  }
  .slide{
    position: relative;
    opacity: 1 !important;
    visibility: visible !important;
    page-break-after: always;
    width: var(--stage-w);
    height: var(--stage-h);
  }
  .slide .slide__inner > *{ animation: none !important; opacity: 1 !important; transform: none !important; }
}
