:root {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --text: #18181b;
  --text-2: #52525b;
  --muted: #71717a;
  --faint: #a1a1aa;
  --dot: #d4d4d8;
  --dot-group: #b4b4ba;
  --badge-bg: #f1f1f3;
  --badge-bg-hover: #e9e9ec;
  --badge-border: #e1e1e5;
  --badge-text: #3f3f46;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 12px 32px rgba(0, 0, 0, .07);
  --header-h: 56px;
  --footer-h: 44px;
  --pad-y: 20px;
  --pad-x: 72px;
  --radius: 6px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  /* width of the 16:9 slide (declared on body so fullscreen overrides apply): limited by the stage width or by its height */
  --frame-w: min(100vw - 2 * var(--pad-x), (100dvh - var(--header-h) - var(--footer-h) - 2 * var(--pad-y)) * 16 / 9);
  --edge: calc((100vw - var(--frame-w)) / 2);
  /* 1 design px of the 1758px-wide Figma content area, scaled to the current slide width */
  --u: calc(var(--frame-w) / 1758);
  margin: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 4px; }

/* ---------- Top bar ---------- */
.topbar {
  flex: 0 0 var(--header-h);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 var(--edge);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}

.projects {
  display: flex;
  align-items: stretch;
  height: var(--header-h);
}

/* one section = optional badge + its project tabs */
.sec {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
.sec:first-child { padding-left: 0; }
.sec:first-child .proj:first-child { padding-left: 0; }
.sec:first-child .proj:first-child::after { left: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  margin-right: 4px;
  border-radius: 6px;
  border: 1px solid var(--badge-border);
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
button.badge:hover { background: var(--badge-bg-hover); color: var(--text); }
/* active section: black badge */
.sec.on .badge,
.dropdown-label .badge,
.dropdown-head.on .badge { background: var(--text); border-color: var(--text); color: #fff; }

.proj {
  position: relative;
  display: flex;
  align-items: center;
  align-self: stretch;
  padding: 0 10px;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: color .15s ease;
}
.proj::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s ease;
}
.proj:hover { color: var(--text-2); }
.proj[aria-current="true"] { color: var(--text); font-weight: 600; }
.proj[aria-current="true"]::after { transform: scaleX(1); }

@keyframes proj-enter {
  0%   { background: transparent; }
  30%  { background: #f4f4f5; }
  100% { background: transparent; }
}
.proj.enter { animation: proj-enter .7s ease; }

/* mobile dropdown (hidden on desktop) */
.dropdown { display: none; position: relative; }
.dropdown-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 500;
  color: var(--text);
  max-width: 52vw;
}
.dropdown-btn svg { color: var(--faint); flex: none; }
.dropdown-label { display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; }
.dropdown-label .badge { height: 20px; padding: 0 6px; margin: 0; font-size: 11px; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: none;
}
.dropdown[data-open="true"] .dropdown-menu { display: block; }
.dropdown-head { padding: 10px 8px 4px; }
.dropdown-head .badge { height: 20px; padding: 0 6px; margin: 0; font-size: 11px; }
.dropdown-sep { height: 1px; margin: 6px 4px; background: var(--line); }
.dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  text-align: left;
  font-weight: 500;
  color: var(--text-2);
}
.dropdown-item:hover { background: var(--bg); color: var(--text); }
.dropdown-item[aria-selected="true"] { background: var(--bg); color: var(--text); font-weight: 600; }

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: none;
}

.counter {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--muted);
  margin-right: 6px;
  white-space: nowrap;
}
.counter .sep { margin: 0 4px; color: var(--dot); }
.counter #cur { color: var(--text); font-weight: 500; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s ease, background .15s ease;
}
.btn:hover { border-color: var(--line-strong); background: #fafafa; }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  transition: border-color .15s ease, color .15s ease;
}
.btn-icon:hover { border-color: var(--line-strong); color: var(--text); }
.btn-icon[hidden], .btn[hidden] { display: none; }

/* ---------- Stage ---------- */
.stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

.slide {
  position: absolute;
  inset: var(--pad-y) var(--pad-x);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 16:9 frame sized to whatever is smaller: the stage width or the stage height */
.slide-frame {
  position: relative;
  width: var(--frame-w);
  aspect-ratio: 16 / 9;
}

.slide img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: slide-in .18s ease;
}
@keyframes slide-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.slide img.swap { animation: none; }

/* clickable link areas laid over the image (positions in % of the frame) */
.hotspots { position: absolute; inset: 0; pointer-events: none; }
.hotspot {
  position: absolute;
  display: block;
  pointer-events: auto;
  border-radius: 3px;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
}
.hotspot:hover, .hotspot:focus-visible {
  background: rgba(24, 24, 27, .06);
  box-shadow: 0 0 0 4px rgba(24, 24, 27, .06);
  outline: none;
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--faint);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  transition: color .15s ease, border-color .15s ease, transform .15s ease;
  z-index: 2;
}
.arrow:hover { color: var(--text); border-color: var(--line-strong); }
.arrow:active { transform: translateY(-50%) scale(.96); }
.arrow[disabled] { opacity: .3; cursor: default; pointer-events: none; }
.arrow.prev { left: 14px; }
.arrow.next { right: 14px; }

/* ---------- Pager ---------- */
.pager {
  flex: 0 0 var(--footer-h);
  height: var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dots {
  display: flex;
  align-items: center;
  justify-content: center;
}
/* section cluster: separated from the next one by a line */
.dot-sec {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  position: relative;
}
.dot-sec + .dot-sec::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 14px;
  margin-top: -7px;
  background: var(--line-strong);
}
/* project group inside a section: separated by a small gap only */
.dot-group {
  display: flex;
  align-items: center;
  gap: 4px;
}
.dot {
  position: relative;
  width: 8px;
  height: 20px;
  transition: width .2s ease;
}
.dot::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 50%;
  height: 6px;
  margin-top: -3px;
  border-radius: 3px;
  background: var(--dot);
  transition: background .15s ease;
}
.dot:hover::after { background: var(--faint); }
.dot-sec.on .dot::after { background: #c8c8cd; }
.dot.in-project::after { background: var(--dot-group) !important; }
.dot[aria-current="true"] { width: 20px; }
.dot[aria-current="true"]::after { background: var(--text) !important; }

.progress {
  display: none;
  width: min(60vw, 240px);
  height: 2px;
  background: var(--line);
  border-radius: 1px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0;
  background: var(--text);
  transition: width .2s ease;
}

/* ---------- Fullscreen ---------- */
:fullscreen body, body:fullscreen { background: var(--bg); }
.is-fullscreen .topbar,
.is-fullscreen .pager { display: none; }
.is-fullscreen { --header-h: 0px; --footer-h: 0px; --pad-y: 24px; }

/* ---------- Responsive ---------- */
/* set by app.js when the tabs do not fit inside the slide width */
.nav-tight .sec { padding: 0 14px; }
.nav-tight .sec:first-child { padding-left: 0; }
.nav-tight .proj { padding: 0 8px; }
.nav-tight .proj::after { left: 8px; right: 8px; }
.nav-tight .sec:first-child .proj:first-child { padding-left: 0; }
.nav-tight .sec:first-child .proj:first-child::after { left: 0; }
.nav-tight .badge { padding: 0 7px; font-size: 11.5px; }
.nav-compact .projects { display: none; }
.nav-compact .dropdown { display: block; }

@media (max-width: 720px) {
  :root { --header-h: 52px; --footer-h: 36px; --pad-y: 10px; --pad-x: 12px; }
  .topbar { gap: 8px; }
  .dropdown-btn { max-width: 100%; }
  .dropdown-btn { height: 32px; font-size: 13px; }
  .counter { font-size: 12px; margin-right: 2px; }
  .btn { height: 32px; padding: 0 10px; }
  .btn span { display: none; }
  .btn-icon { display: none; }
  .slide img { border-radius: 4px; }
  .arrow { width: 34px; height: 34px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(6px); }
  .arrow.prev { left: 6px; }
  .arrow.next { right: 6px; }
  .dots { display: none; }
  .progress { display: block; }
}

@media (max-height: 480px) {
  :root { --header-h: 48px; --footer-h: 28px; --pad-y: 8px; --pad-x: 60px; }
}


/* =========================================================
   Web pages (Intro / Career / Contents)
   Real web layouts on the page itself, aligned to the header edges.
   --u = 1 Figma px scaled to the current content width.
   ========================================================= */
body.is-web { background: #fff; }

/* first page: invite the visitor to press the next arrow */
.arrow.next.nudge {
  color: #fff;
  background: #0a0a0a;
  border-color: #0a0a0a;
  animation: nudge-x 2.4s cubic-bezier(.45, 0, .2, 1) 1.2s infinite;
}
.arrow.next.nudge::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid #0a0a0a;
  animation: nudge-ring 2.4s ease-out 1.2s infinite;
  pointer-events: none;
}
.arrow.next.nudge::after {
  content: attr(data-hint);
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 10px;
  border-radius: 6px;
  background: #0a0a0a;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.arrow.next.nudge:hover { animation: none; background: #2a2a2e; color: #fff; }
.arrow.next.nudge:hover::after { opacity: 1; }
@keyframes nudge-x {
  0%, 60%, 100% { transform: translateY(-50%) translateX(0); }
  70% { transform: translateY(-50%) translateX(5px); }
  80% { transform: translateY(-50%) translateX(0); }
  88% { transform: translateY(-50%) translateX(3px); }
}
@keyframes nudge-ring {
  0%, 55% { transform: scale(1); opacity: 0; }
  60% { opacity: .35; }
  100% { transform: scale(1.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .arrow.next.nudge, .arrow.next.nudge::before { animation: none; }
}
body.is-web .slide { display: none; }

.web {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-user-select: text;
  user-select: text;
  color: #0a0a0a;
}
.web::-webkit-scrollbar { display: none; }
.web[hidden] { display: none; }

.web-inner {
  width: var(--frame-w);
  min-height: 100%;
  margin: 0 auto;
  padding: calc(var(--u) * 36) 0 calc(var(--u) * 44);
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 56);
}

.web b { font-weight: 600; }
.web a { color: inherit; }

.meta {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--u) * 28);
  font-family: SUIT, var(--font);
  font-weight: 400;
  font-size: max(11px, calc(var(--u) * 19));
  letter-spacing: .02em;
  color: rgba(0, 0, 0, .5);
  white-space: nowrap;
}
.meta-dots { display: inline-flex; align-items: center; gap: calc(var(--u) * 10); }
.meta-dots i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

/* entrance: short, quiet rise, staggered by --i */
.web:not([hidden]) .reveal { animation: rise .8s cubic-bezier(.16, .8, .24, 1) both; animation-delay: calc(var(--i, 0) * 65ms + 30ms); }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .web:not([hidden]) .reveal { animation: none; }
}

/* ---------- Intro: hero ---------- */
.intro-top { display: flex; justify-content: flex-start; align-items: center; }
.intro-top .oy { display: block; width: calc(var(--u) * 250); height: auto; }

/* headline sits midway between the logo row and the principles */
.intro-hero {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: calc(var(--u) * 80);
}
.intro-headline { margin: 0; width: calc(var(--u) * 1003); flex: none; } /* 0.85 × 1180 */
.intro-headline img { display: block; width: 100%; height: auto; }

.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: calc(var(--u) * 48);
}
.principles li { border-top: 1px solid rgba(0, 0, 0, .1); padding-top: calc(var(--u) * 22); } /* same light rule as the Career labels */
/* number in a small outlined square, same language as the contents list in Figma */
.p-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max(28px, calc(var(--u) * 42));
  height: max(22px, calc(var(--u) * 30));
  padding: 0 6px;
  margin-bottom: calc(var(--u) * 20);
  border-radius: 4px;
  background: #0a0a0a;
  font-family: SUIT, var(--font);
  font-size: max(11px, calc(var(--u) * 17));
  font-weight: 500;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.principles h2 {
  margin: 0 0 calc(var(--u) * 10);
  font-size: max(15px, calc(var(--u) * 26));
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.02em;
}
.principles p {
  margin: 0;
  font-size: max(13px, calc(var(--u) * 20));
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.02em;
  color: rgba(0, 0, 0, .55);
  word-break: keep-all;
}

/* footer row has a fixed height so the block above can be lifted by exactly that much:
   the lowest line then sits where the divider used to be */
.web-intro { --foot-h: calc(var(--u) * 22 + 1px + max(13px, calc(var(--u) * 20)) * 1.4); }
.web-intro .web-inner { padding-bottom: calc(var(--u) * 44 + var(--foot-h) - 36px); } /* bottom block sits 36px lower */
.intro-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  height: var(--foot-h);
  margin-top: -8px; /* 8px closer to the principles */
  padding-top: calc(var(--u) * 22);
  border-top: 1px solid rgba(0, 0, 0, .1);
  line-height: 1.4;
}
.contact {
  display: flex;
  gap: calc(var(--u) * 36);
  font-style: normal;
  font-size: max(13px, calc(var(--u) * 20));
  letter-spacing: -0.01em;
  color: rgba(0, 0, 0, .55);
}
.contact span { color: #0a0a0a; font-weight: 500; }
.contact a {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 100% 100%;
  background-repeat: no-repeat;
  transition: background-size .35s cubic-bezier(.16, .8, .24, 1), color .2s ease;
}
.contact a:hover { color: #0a0a0a; background-size: 100% 1px; background-position: 0 100%; }
.intro-cta { display: flex; align-items: center; gap: calc(var(--u) * 28); }
/* ---------- cover title (Career / Contents) ---------- */
.cover-title { display: flex; flex-direction: column; gap: calc(var(--u) * 6); }
.cover-title.with-meta { flex-direction: row; justify-content: space-between; align-items: flex-end; }
.cover-title .oy { display: block; width: calc(var(--u) * 230); height: auto; margin: 0 0 calc(var(--u) * 6) calc(var(--u) * 8); }
.cover-title h1 {
  margin: 0;
  font-family: "Roboto Condensed", var(--font);
  font-style: italic;
  font-weight: 800;
  font-size: calc(var(--u) * 112);
  line-height: .92;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.cover-title .meta { padding-bottom: calc(var(--u) * 10); }

/* ---------- Career: three-column resume ---------- */
.career-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  column-gap: calc(var(--u) * 64);
  align-content: start;
  padding-top: calc(var(--u) * 12);
}
/* Baseline grid: every line and every gap is a whole number of body lines (--lh),
   so rows line up across the three columns. */
.web-career { --fs: max(12.5px, calc(var(--u) * 19.5)); --lh: calc(var(--fs) * 1.62); }
.career-col { display: flex; flex-direction: column; gap: var(--lh); }
.web-career .web-inner { gap: calc(var(--u) * 44); padding-bottom: calc(var(--u) * 28); }
.cv { font-size: var(--fs); line-height: var(--lh); letter-spacing: -0.015em; }
.cv-label {
  /* label → rule and rule → body: 7px each; the rest of the 2-line block goes above the label
     so rows keep lining up across the columns */
  margin: 0 0 7px;
  padding-top: calc(var(--lh) - 15px);
  padding-bottom: 7px;
  line-height: var(--lh);
  border-bottom: 1px solid rgba(0, 0, 0, .1); /* light divider under each section label */
  font-family: var(--font);
  font-size: max(11px, calc(var(--u) * 17));
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, .4);
}
.cv p { margin: 0; }
.cv b { font-weight: 600; color: #0a0a0a; }
.cv-sub { color: rgba(0, 0, 0, .6); }
.cv-item + .cv-item { margin-top: var(--lh); }
.cv-date { display: block; font-size: .92em; line-height: var(--lh); color: rgba(0, 0, 0, .42); font-variant-numeric: tabular-nums; }
.cv-dash { list-style: none; margin: 0; padding: 0; color: rgba(0, 0, 0, .62); }
.cv-dash li { position: relative; padding-left: 12px; }
.cv-dash li::before { content: ""; position: absolute; left: 0; top: .8em; width: 5px; height: 1px; background: currentColor; }
.cv-table { display: grid; grid-template-columns: auto 1fr; column-gap: calc(var(--u) * 26); row-gap: 0; margin: 0; }
.cv-table dt { color: rgba(0, 0, 0, .42); font-variant-numeric: tabular-nums; }
.cv-table dd { margin: 0; color: rgba(0, 0, 0, .8); }
.cv-table b.sb { margin-left: 4px; }
.cv-projects dd + dt, .cv-projects dd + dt + dd { margin-top: calc(var(--lh) * .5); }
/* the link chip takes exactly one line */
/* chip block = 1.5 lines and the gap to the next project = 0.5 line,
   so project titles stay on the shared baseline grid */
.cv-projects .pill { display: flex; width: max-content; margin: calc(var(--lh) * 1.5 - var(--pill-icon) - var(--pill-pad) * 2 - 2px) 0 2px; }
.cv-project p { color: rgba(0, 0, 0, .62); }
.cv-project b { margin-right: 6px; }
.pill {
  /* the icon circle gets the same space above, below and to its left */
  --pill-pad: 4px;
  --pill-icon: max(16px, min(calc(var(--u) * 24), calc(var(--lh, 24px) * .78)));
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  height: calc(var(--pill-icon) + var(--pill-pad) * 2);
  padding: 0 12px 0 var(--pill-pad);
  border-radius: 999px;
  background: rgba(0, 0, 0, .05);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .09); /* outline outside the chip, a touch darker than its fill */
  font-size: max(11.5px, calc(var(--u) * 16.5));
  font-weight: 500;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
/* ".web a { color: inherit }" is more specific than .pill, so scope the colors under .web */
.web .pill { color: rgba(0, 0, 0, .55); }
.web .pill:hover { background: #0a0a0a; color: #fff; box-shadow: 0 0 0 1px #0a0a0a; }
.pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--pill-icon);
  height: var(--pill-icon);
  border-radius: 50%;
  background: #a1a1aa; /* mid gray chip, white icon */
  transition: background .2s ease;
}
.pill:hover .pill-icon { background: rgba(255, 255, 255, .18); }
.pill-icon img { width: auto; height: 62%; transform: rotate(30deg); }

/* ---------- Contents: preview + index ---------- */
.toc-wrap {
  flex: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  column-gap: calc(var(--u) * 80);
  align-items: start;
  padding-top: calc(var(--u) * 12 + 15px); /* list + preview sit 15px lower under the title */
}
.toc-preview { margin: 0; }
.toc-preview-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg);
  /* soft lift so the slide separates from the white page */
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 2px 4px rgba(0, 0, 0, .04), 0 12px 28px rgba(0, 0, 0, .08);
}
.toc-preview-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .35s ease, transform .6s cubic-bezier(.16, .8, .24, 1);
}
.toc-preview-img img.out { opacity: 0; transform: scale(1.02); }
.toc-preview figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-family: SUIT, var(--font);
  font-size: max(11px, calc(var(--u) * 17));
  color: rgba(0, 0, 0, .45);
  font-variant-numeric: tabular-nums;
}
.toc-cat { font-family: var(--font); font-weight: 600; color: rgba(0, 0, 0, .7); }

.toc { display: flex; flex-direction: column; }
.toc-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: calc(var(--u) * 26);
  padding: calc(var(--u) * 20) 0;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
  transition: opacity .3s ease;
}
.toc-row:first-child { padding-top: 0; }
.toc-row:last-child { border-bottom: 0; }
.toc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  min-width: max(28px, calc(var(--u) * 42));
  height: max(22px, calc(var(--u) * 30));
  margin-top: calc(var(--u) * 4);
  padding: 0 6px;
  border-radius: 4px;
  background: #0a0a0a;
  font-family: SUIT, var(--font);
  font-size: max(11px, calc(var(--u) * 17));
  font-weight: 500;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.toc-body { display: flex; flex-direction: column; gap: calc(var(--u) * 4); min-width: 0; }
.toc-title {
  font-size: max(14px, calc(var(--u) * 24.5)); /* ~10% smaller than before (27) */
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  transition: transform .35s cubic-bezier(.16, .8, .24, 1);
}
.toc-tags {
  display: flex;
  gap: 8px;
  font-family: SUIT, var(--font);
  font-size: max(12px, calc(var(--u) * 18.5));
  color: rgba(0, 0, 0, .45);
}
.toc-tags i { font-style: normal; opacity: .6; }
.toc-go {
  display: flex;
  align-items: center;
  justify-content: center;
  width: max(32px, calc(var(--u) * 46));
  height: max(32px, calc(var(--u) * 46));
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .12);
  color: rgba(0, 0, 0, .4);
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.toc-go svg { transition: transform .35s cubic-bezier(.16, .8, .24, 1); }
/* dim the others while one row is hovered */
.toc:hover .toc-row:not(:hover) { opacity: .38; }
.toc-row:hover .toc-title { transform: translateX(4px); }
.toc-row:hover .toc-go,
.toc-row:focus-visible .toc-go { background: #0a0a0a; border-color: #0a0a0a; color: #fff; }
.toc-row:hover .toc-go svg { transform: translateX(2px); }

/* ---------- small screens: stack and scroll ---------- */
@media (max-width: 900px) {
  .principles { grid-template-columns: 1fr; row-gap: 20px; }
  .p-num { margin-bottom: 8px; }
  .career-grid { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .toc-wrap { grid-template-columns: 1fr; }
  .toc-preview { display: none; }
}
@media (max-width: 720px) {
  body.is-web .arrow { display: none; }
  .web-inner { gap: 32px; padding: 24px 0 40px; }
  .intro-top .oy { width: 120px; }
  .intro-hero { flex-direction: column; align-items: flex-start; gap: 20px; }
  .web-intro .web-inner { padding-bottom: 40px; }
  .intro-foot { height: auto; margin-top: 0; }
  .intro-headline { width: 85%; }
  .intro-foot { flex-direction: column; align-items: flex-start; }
  .contact { flex-direction: column; gap: 2px; }
  .intro-cta { flex-wrap: wrap; gap: 12px; }
  .cover-title .oy { width: 110px; }
  .cover-title h1 { font-size: 52px; }
  .cover-title.with-meta { flex-direction: column; align-items: flex-start; gap: 12px; }
  .career-grid { grid-template-columns: 1fr; }
  .career-col { gap: 28px; }
  .toc-row { column-gap: 12px; padding: 14px 0; }
}
