/* =========================================================
   Design tokens — 참고자료가 오면 여기 값부터 바꾸면 됩니다.
   ========================================================= */
:root {
  --bg: #f6f5f2;
  --bg-elev: #ffffff;
  --fg: #16161a;
  --fg-muted: #5f5f6b;
  --line: #e2e0da;
  --accent: #6c5ce7;
  --accent-fg: #ffffff;

  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --radius: 16px;
  --container: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

:root[data-theme='dark'] {
  --bg: #0e0e12;
  --bg-elev: #17171d;
  --fg: #f2f2f5;
  --fg-muted: #9a9aa8;
  --line: #2a2a33;
  --accent: #a29bfe;
  --accent-fg: #0e0e12;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0e0e12;
    --bg-elev: #17171d;
    --fg: #f2f2f5;
    --fg-muted: #9a9aa8;
    --line: #2a2a33;
    --accent: #a29bfe;
    --accent-fg: #0e0e12;
  }
}

/* ========================= Base ========================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s var(--ease), color .4s var(--ease);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-fg); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* =================== Canvas layers =================== */
/* 전체 배경 캔버스 — body 배경 위, 콘텐츠 아래 */
.bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.canvas-hint { color: var(--fg-muted); font-size: .85rem; margin: 20px 0 0; }
.canvas-hint::before { content: '✦ '; color: var(--accent); }

/* =================== Scroll progress =================== */
.scroll-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 100;
  background: var(--accent);
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ===================== Custom cursor ==================== */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
  .cursor { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 200; }
  .cursor__dot, .cursor__ring {
    position: absolute; top: 0; left: 0; border-radius: 50%;
    transform: translate3d(-100px, -100px, 0);
  }
  .cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--fg); }
  .cursor__ring {
    width: 36px; height: 36px; margin: -18px 0 0 -18px;
    border: 1.5px solid var(--fg); opacity: .5;
    transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), opacity .3s, background-color .3s;
  }
  .cursor.is-hover .cursor__ring {
    width: 64px; height: 64px; margin: -32px 0 0 -32px;
    background: color-mix(in srgb, var(--accent) 20%, transparent); border-color: var(--accent); opacity: 1;
  }
  .cursor.is-down .cursor__ring { width: 24px; height: 24px; margin: -12px 0 0 -12px; }
}

/* ======================== Header ======================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; gap: 24px;
  padding-inline: var(--gutter);
  transition: transform .4s var(--ease), background-color .3s, backdrop-filter .3s;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
.logo { font-weight: 800; font-size: 1.25rem; text-decoration: none; letter-spacing: -.02em; }
.nav { margin-left: auto; }
.nav__list { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav__list a {
  position: relative; text-decoration: none; font-size: .95rem; color: var(--fg-muted);
  transition: color .2s;
}
.nav__list a::after {
  content: ''; position: absolute; left: 0; bottom: -4px; height: 2px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav__list a:hover, .nav__list a.is-active { color: var(--fg); }
.nav__list a:hover::after, .nav__list a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__toggle { display: none; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); transition: transform .5s var(--ease);
}
.theme-toggle:hover { transform: rotate(-30deg); }

@media (max-width: 760px) {
  .nav__toggle {
    display: grid; gap: 6px; width: 40px; height: 40px; place-content: center; position: relative; z-index: 2;
  }
  .nav__toggle span { display: block; width: 22px; height: 2px; background: var(--fg); transition: transform .3s var(--ease); }
  .nav__toggle[aria-expanded='true'] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav__toggle[aria-expanded='true'] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav__list {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; align-items: center; gap: 32px;
    background: var(--bg); clip-path: circle(0 at calc(100% - 80px) 36px);
    transition: clip-path .6s var(--ease);
  }
  .nav__list a { font-size: 1.6rem; color: var(--fg); }
  .nav.is-open .nav__list { clip-path: circle(150% at calc(100% - 80px) 36px); }
}

/* ========================= Hero ========================= */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  padding-bottom: clamp(88px, 12vh, 140px); overflow: hidden;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; } /* 파티클 텍스트는 높이 36% 지점에 그려짐 */
.hero__inner { position: relative; pointer-events: none; }
.hero__inner a { pointer-events: auto; }
.hero__eyebrow { color: var(--fg-muted); font-size: 1.1rem; margin: 0 0 12px; }
.hero__title {
  font-size: clamp(1.8rem, 4.4vw, 3.4rem); line-height: 1.1; letter-spacing: -.03em;
  font-weight: 800; margin: 0 0 16px; min-height: 1.1em;
}
.hero__role { color: var(--accent); }
.typer__caret {
  display: inline-block; width: .06em; height: .9em; margin-left: .06em; vertical-align: -.05em;
  background: currentColor; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero__lead { font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--fg-muted); max-width: 36ch; margin: 0 0 32px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }

.scroll-hint {
  position: absolute; left: 50%; bottom: 32px; translate: -50% 0;
  width: 26px; height: 42px; border: 2px solid var(--fg-muted); border-radius: 14px;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
  background: var(--fg-muted); animation: scrollHint 1.8s var(--ease) infinite;
}
@keyframes scrollHint { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ======================== Buttons ======================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; text-decoration: none;
  transition: background-color .25s, color .25s, border-color .25s;
}
.btn--primary { background: var(--fg); color: var(--bg); }
.btn--primary:hover { background: var(--accent); color: var(--accent-fg); }
.btn--ghost { border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--fg); }
.magnetic { will-change: transform; transition: transform .4s var(--ease); }

/* ======================= Sections ======================= */
.section { padding-block: clamp(80px, 14vw, 160px); }
.section__title {
  display: flex; align-items: baseline; gap: 16px;
  font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.03em; margin: 0 0 56px;
}
.section__num { font-size: .9rem; font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--delay, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ========================= About ======================== */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: start; }
.about__text { font-size: 1.15rem; color: var(--fg-muted); }
.about__text p:first-child { margin-top: 0; }
.about__stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.stat {
  padding: 24px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev);
}
.stat__value { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat__label { color: var(--fg-muted); font-size: .95rem; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; gap: 40px; } }

/* ======================== Skills ======================== */
.playground { margin-bottom: 40px; }
.playground__canvas {
  display: block; width: 100%; height: clamp(300px, 42vw, 440px);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-elev) 60%, transparent);
  touch-action: pan-y;
}
.playground__hint { margin-top: 12px; }
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.skill-group { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.skill-group h3 { margin: 0 0 20px; font-size: 1.1rem; }
.skill { margin-bottom: 14px; }
.skill:last-child { margin-bottom: 0; }
.skill__name { font-weight: 700; font-size: .98rem; }
.skill__note { margin: 2px 0 0; color: var(--fg-muted); font-size: .88rem; line-height: 1.5; }

/* ======================= Projects ======================= */

/* 무한 마퀴: 컨테이너 밖까지 화면 전체 폭으로 흐름 */
.projects {
  width: 100vw; margin-left: calc(50% - 50vw);
  overflow: hidden; overflow: clip;
  padding-block: 36px; /* 호버 확대 시 잘리지 않도록 */
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.projects.reveal.is-visible { transition: opacity .3s var(--ease), transform .9s var(--ease); }
.projects__track { display: flex; width: max-content; will-change: transform; }
.projects.is-dragging { cursor: grabbing; }
.projects.is-dragging .project { pointer-events: none; }
.project {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  flex: none; width: min(78vw, 340px); margin-right: 24px;
  position: relative; display: block; text-align: left; text-decoration: none;
  border-radius: var(--radius); overflow: hidden;
  background: var(--bg-elev); border: 1px solid var(--line);
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .5s var(--ease), opacity .4s, scale .5s var(--ease), box-shadow .4s, filter .4s;
  -webkit-user-drag: none;
}
.project:hover, .project:focus-visible { scale: 1.08; z-index: 2; box-shadow: 0 30px 60px -20px rgb(0 0 0 / .3); }
/* 하나에 집중하면 나머지는 살짝 물러남 */
.projects__track:has(.project:hover) .project:not(:hover) { opacity: .55; filter: saturate(.6); }
.project::after { /* 마우스를 따라오는 하이라이트 */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--mx) var(--my), rgb(255 255 255 / .18), transparent 40%);
}
.project:hover::after { opacity: 1; }
.project__thumb {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 10; background: var(--c); display: grid; place-items: center;
  color: #fff; font-size: 2rem; font-weight: 800; letter-spacing: -.03em;
}
.project__thumb canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.project__thumb span {
  position: relative; padding: 4px 14px; border-radius: 8px; max-width: 88%; text-align: center; line-height: 1.25;
  background: color-mix(in srgb, var(--c) 80%, transparent);
}
.project__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.project:hover .project__thumb img { transform: scale(1.06); }
.project__body { padding: 22px 24px 26px; transform: translateZ(30px); }
.project__meta { display: flex; justify-content: space-between; color: var(--fg-muted); font-size: .85rem; margin-bottom: 6px; }
.project__title { margin: 0 0 6px; font-size: 1.3rem; }
.project__summary { margin: 0 0 14px; color: var(--fg-muted); font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tags li { font-size: .78rem; padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }

.projects__footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.projects__footer .canvas-hint { margin: 0; }

/* ================== Portfolio (/projects) ================= */
.portfolio { padding-top: calc(var(--header-h) + clamp(40px, 8vw, 96px)); padding-bottom: 120px; min-height: 100svh; }
.portfolio__eyebrow { color: var(--accent); font-weight: 600; margin: 0 0 8px; }
.portfolio__title { font-size: clamp(2.4rem, 7vw, 4.4rem); letter-spacing: -.03em; line-height: 1.05; margin: 0 0 40px; }
.portfolio__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 28px; }
.portfolio__grid .project { width: auto; margin: 0; animation: vtIn .8s var(--ease) var(--delay, 0s) both; }
.portfolio__grid .project[hidden] { display: none; }
.portfolio__grid .project:hover, .portfolio__grid .project:focus-visible { scale: 1.04; }
.portfolio__grid:has(.project:hover) .project:not(:hover) { opacity: .55; filter: saturate(.6); }

/* ======================= Timeline ======================= */
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line);
}
.timeline::after { /* 스크롤 진행에 따라 채워지는 라인 */
  content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--accent);
  transform-origin: top; transform: scaleY(var(--p, 0));
}
.timeline__item { position: relative; padding-bottom: 48px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ''; position: absolute; left: -28px; top: 8px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.timeline__period { color: var(--accent); font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.timeline__title { margin: 4px 0 2px; font-size: 1.3rem; }
.timeline__org { color: var(--fg-muted); margin: 0 0 8px; }
.timeline__desc { margin: 0; color: var(--fg-muted); max-width: 60ch; }
.timeline__points { margin: 10px 0 0; padding-left: 18px; color: var(--fg-muted); max-width: 64ch; font-size: .95rem; }
.timeline__points li { margin-bottom: 4px; }
.subsection__title { margin: 72px 0 16px; font-size: 1.1rem; }
.education { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: var(--fg-muted); }
.education span { display: inline-block; min-width: 6.5em; color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ======================== Contact ======================= */
.section--contact { position: relative; text-align: center; isolation: isolate; }
.contact__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1;
  /* 가장자리를 흐리게 */
  mask-image: radial-gradient(ellipse at center, #000 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 75%);
}
.section--contact .section__title { justify-content: center; }
.contact__lead { color: var(--fg-muted); font-size: 1.15rem; margin: -24px 0 40px; }
.contact__email {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: clamp(1.5rem, 6vw, 3.8rem); font-weight: 800; letter-spacing: -.03em;
  overflow-wrap: anywhere;
}
.contact__email > span { background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 4px no-repeat; transition: background-size .5s var(--ease); }
.contact__email:hover > span { background-size: 100% 4px; }
.contact__hint { font-size: .85rem; font-weight: 500; color: var(--fg-muted); letter-spacing: 0; }
.socials { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; list-style: none; padding: 0; margin: 48px 0 0; }

.site-footer { padding-block: 32px; color: var(--fg-muted); font-size: .9rem; border-top: 1px solid var(--line); }

/* ================== Page transitions =================== */
/* 문서 간 View Transition: 카드 썸네일이 상세 페이지 히어로로 이어짐 */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: .7s; animation-timing-function: var(--ease); }
::view-transition-old(root) { animation: vtOut .4s var(--ease) both; }
::view-transition-new(root) { animation: vtIn .6s var(--ease) .1s both; }
@keyframes vtOut { to { opacity: 0; transform: scale(.98); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(24px); } }

/* 미지원 브라우저용: 클릭 지점에서 프로젝트 색이 퍼짐 */
.page-wipe {
  position: fixed; inset: 0; z-index: 300; pointer-events: none; background: var(--c);
  clip-path: circle(0 at var(--x) var(--y)); transition: clip-path .6s var(--ease);
}
.page-wipe.is-active { clip-path: circle(150% at var(--x) var(--y)); }

/* ===================== Project detail =================== */
.detail { padding-top: var(--header-h); min-height: 100svh; }
.detail__hero {
  view-transition-name: project-hero;
  position: relative; overflow: hidden; height: clamp(260px, 52vh, 560px);
  background: var(--c); display: grid; place-items: center;
  color: #fff; font-size: clamp(2rem, 6vw, 4rem); font-weight: 800; letter-spacing: -.03em;
}
.detail__hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.detail__hero span { position: relative; padding: 4px 18px; border-radius: 12px; background: color-mix(in srgb, var(--c) 80%, transparent); }
.detail__hero img { width: 100%; height: 100%; object-fit: cover; }
.detail__content { max-width: 820px; padding-block: 48px 120px; }
.detail__back { display: inline-block; margin-bottom: 32px; color: var(--fg-muted); text-decoration: none; transition: color .2s, transform .3s var(--ease); }
.detail__back:hover { color: var(--fg); transform: translateX(-4px); }
.detail__title { font-size: clamp(2.2rem, 6vw, 3.8rem); letter-spacing: -.03em; line-height: 1.1; margin: 4px 0 16px; }
.detail__lead { font-size: 1.25rem; margin: 0 0 24px; }
.detail__desc { color: var(--fg-muted); font-size: 1.05rem; margin: 0 0 32px; white-space: pre-line; }
.detail__links { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

/* 상세: 기간·소속·팀·담당·상태 */
.facts { display: grid; gap: 0; margin: 0 0 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.facts > div { display: grid; grid-template-columns: 6em 1fr; gap: 16px; padding: 12px 20px; }
.facts > div + div { border-top: 1px solid var(--line); }
.facts dt { color: var(--fg-muted); font-size: .9rem; }
.facts dd { margin: 0; font-size: .95rem; }
@media (max-width: 560px) { .facts > div { grid-template-columns: 1fr; gap: 2px; } }

.detail__section { margin-top: 56px; }
.detail__section h2 { font-size: 1.35rem; margin: 0 0 20px; letter-spacing: -.01em; }
.highlights { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.highlights li::marker { color: var(--accent); }
.cases { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: case; }
.case { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); counter-increment: case; }
.case h3 { margin: 0 0 14px; font-size: 1.08rem; }
.case h3::before { content: counter(case, decimal-leading-zero) '  '; color: var(--accent); font-variant-numeric: tabular-nums; }
.case dl { margin: 0; display: grid; gap: 10px; }
.case dl > div { display: grid; grid-template-columns: 3em 1fr; gap: 12px; }
.case dt { color: var(--accent); font-weight: 600; font-size: .9rem; }
.case dd { margin: 0; color: var(--fg-muted); font-size: .95rem; }
@media (max-width: 560px) { .case dl > div { grid-template-columns: 1fr; gap: 2px; } }

.detail__part { margin-top: 72px; padding-top: 32px; border-top: 2px solid var(--fg); }
.detail__part-title { font-size: clamp(1.6rem, 3.5vw, 2.1rem); letter-spacing: -.02em; margin: 0 0 8px; }
.detail__part-title small { margin-left: 12px; font-size: .9rem; font-weight: 600; color: var(--accent); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.detail__part-role { color: var(--fg-muted); margin: 0; }
.detail__part .detail__section { margin-top: 36px; }
.detail__part .detail__section h2 { font-size: 1.15rem; }
.detail__more { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 20px; }
.detail__more summary { cursor: pointer; font-weight: 600; width: fit-content; }
.detail__more summary:hover { color: var(--accent); }
.detail__more .detail__desc { margin: 20px 0 0; font-size: .95rem; }
.detail__pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 80px; padding-top: 32px; border-top: 1px solid var(--line); }
.detail__pager a {
  display: flex; flex-direction: column; gap: 4px; padding: 20px 24px; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius); font-weight: 700; font-size: 1.1rem;
  transition: border-color .25s, transform .4s var(--ease);
}
.detail__pager a:last-child { text-align: right; }
.detail__pager a:hover { border-color: var(--fg); transform: translateY(-3px); }
.detail__pager small { color: var(--fg-muted); font-weight: 500; font-size: .85rem; }
/* View Transition 미지원 시 등장 애니메이션 */
.no-vt .detail__hero { animation: heroIn .8s var(--ease) both; }
.no-vt .detail__content { animation: vtIn .8s var(--ease) .15s both; }
@keyframes heroIn { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }

/* ========================= Toast ======================== */
.toast {
  position: fixed; left: 50%; bottom: 32px; translate: -50% 0; z-index: 150;
  padding: 12px 20px; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: .95rem;
  opacity: 0; transform: translateY(20px); transition: opacity .3s, transform .4s var(--ease); pointer-events: none;
}
.toast.is-show { opacity: 1; transform: none; }

/* ==================== Reduced motion ==================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
  /* 자동 흐름 대신 가로 스크롤 */
  .projects { overflow-x: auto; mask-image: none; -webkit-mask-image: none; touch-action: auto; }
}
