@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');
:root{
  --blue:#3bb1ff;
  --red:#ff5252;
  --ink:#000;
  --paper:#fbf7ef;
  --bd:4px solid #000;
  --sh:6px 6px 0 #000;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--paper);
  color:#0a0a0a;
  font-family:'Noto Sans KR',system-ui,-apple-system,'PingFang SC','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.75;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;height:auto;display:block}
a{color:inherit}
:focus-visible{outline:4px solid var(--red);outline-offset:3px}
h1,h2,h3,h4{line-height:1.25;margin:0;font-weight:700;letter-spacing:-.4px;word-break:break-word}

/* ---------- 左侧固定导航 ---------- */
.rail{
  position:fixed;
  top:0;left:0;bottom:0;
  width:238px;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:18px 14px 22px;
  background:#fff;
  border-right:var(--bd);
  overflow-y:auto;
  z-index:40;
}
.mark{
  width:50px;height:50px;
  flex:0 0 auto;
  display:grid;place-items:center;
  background:var(--blue);
  border:3px solid #000;
  border-radius:4px;
  box-shadow:4px 4px 0 #000;
  text-decoration:none;
  font-weight:700;
  font-size:23px;
  color:#000;
  transition:transform .12s ease,box-shadow .12s ease,background .12s ease;
}
.mark:hover,.mark:focus-visible{background:var(--red);transform:translate(-2px,-2px);box-shadow:6px 6px 0 #000}
.rail-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.pill{
  display:flex;align-items:center;
  min-height:44px;
  padding:9px 14px;
  font-size:16px;
  font-weight:700;
  line-height:1.35;
  text-decoration:none;
  color:#000;
  background:#fff;
  border:3px solid #000;
  border-radius:999px;
  box-shadow:3px 3px 0 #000;
  transition:transform .12s ease,box-shadow .12s ease,background .12s ease;
}
.pill:hover,.pill:focus-visible{background:var(--blue);transform:translate(-2px,-2px);box-shadow:5px 5px 0 #000}
.pill-cta{background:var(--red);margin-top:auto;justify-content:center;text-align:center}
.pill-cta:hover,.pill-cta:focus-visible{background:#000;color:#fff}

/* ---------- 主区 ---------- */
.page{margin-left:238px;padding-bottom:20px}

.hero{
  min-height:70vh;
  display:grid;
  grid-template-columns:1.02fr .98fr;
  gap:clamp(18px,3vw,40px);
  align-items:center;
  padding:clamp(24px,4vw,54px) clamp(18px,4vw,54px);
  border-bottom:var(--bd);
  background-color:var(--blue);
  background-image:radial-gradient(rgba(0,0,0,.22) 1.7px,transparent 1.7px);
  background-size:17px 17px;
}
.hero-fig{
  margin:0;
  position:relative;
  border:var(--bd);
  border-radius:4px;
  box-shadow:9px 9px 0 #000;
  background:#fff;
  overflow:hidden;
  aspect-ratio:4/3;
  display:grid;
  place-items:center;
  will-change:transform;
}
.hero-img{width:100%;height:100%;object-fit:cover}
.hero-stamp{
  font-size:clamp(30px,4vw,54px);
  font-weight:700;
  letter-spacing:2px;
  padding:18px 22px;
  background:var(--red);
  border:3px solid #000;
  border-radius:4px;
  box-shadow:5px 5px 0 #000;
  transform:rotate(-4deg);
}
.hero-copy{text-align:right}
.hero-copy h1{
  font-size:clamp(30px,4.4vw,56px);
  letter-spacing:-1px;
  margin:0 0 16px;
}
.hero-desc{
  display:inline-block;
  margin:0;
  max-width:34ch;
  padding:12px 16px;
  font-size:16px;
  line-height:1.7;
  font-weight:500;
  text-align:left;
  background:#fff;
  border:3px solid #000;
  border-radius:4px;
  box-shadow:5px 5px 0 #000;
}

/* ---------- 目录 + 正文 ---------- */
.work{
  display:grid;
  grid-template-columns:216px minmax(0,1fr);
  gap:clamp(16px,2.4vw,30px);
  align-items:start;
  max-width:1220px;
  padding:clamp(22px,3.4vw,42px) clamp(16px,3vw,42px) 10px;
}
.toc{
  position:sticky;
  top:20px;
  background:#fff;
  border:var(--bd);
  border-radius:4px;
  box-shadow:6px 6px 0 #000;
  padding:16px 14px;
  backdrop-filter:blur(5px);
}
.toc h2{font-size:20px;margin:0 0 6px}
.toc .subtitle{
  margin:0 0 14px;
  font-size:16px;
  font-weight:400;
  line-height:1.65;
  color:#3a3a3a;
  padding-bottom:12px;
  border-bottom:3px solid var(--blue);
}
.toc-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:7px}
.toc-list a{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:40px;
  padding:7px 8px;
  font-size:16px;
  font-weight:700;
  line-height:1.4;
  text-decoration:none;
  border:2px solid #000;
  border-radius:4px;
  background:#fff;
  transition:background .12s ease,transform .12s ease;
}
.toc-list a:hover,.toc-list a:focus-visible{background:var(--blue);transform:translateX(3px)}
.num{
  flex:0 0 auto;
  width:24px;height:24px;
  display:grid;place-items:center;
  font-size:14px;
  font-weight:700;
  color:#fff;
  background:#000;
  border-radius:4px;
}
.toc-txt{min-width:0}

.prose{min-width:0}
.prose > section{
  background:#fff;
  border:var(--bd);
  border-radius:4px;
  box-shadow:7px 7px 0 #000;
  padding:clamp(18px,3vw,32px);
  margin:0 0 30px;
  scroll-margin-top:96px;
  backdrop-filter:blur(5px);
}
.prose > section:nth-child(odd){box-shadow:7px 7px 0 var(--blue)}
.prose > section:nth-child(even){box-shadow:7px 7px 0 var(--red)}
.prose h2{
  font-size:clamp(21px,2.5vw,29px);
  margin:0 0 14px;
  padding-bottom:10px;
  border-bottom:4px solid var(--blue);
}
.prose h3{font-size:19px;margin:22px 0 8px}
.prose p{margin:0 0 14px}
.prose ul,.prose ol{margin:0 0 16px;padding-left:22px}
.prose li{margin:0 0 8px}
.prose a{color:#000;font-weight:700;text-decoration:none;border-bottom:3px solid var(--red);padding-bottom:1px}
.prose a:hover,.prose a:focus-visible{background:var(--red);color:#fff}
.prose strong{background:var(--blue);padding:1px 4px;border-radius:3px}
.prose blockquote{
  margin:0 0 16px;
  padding:12px 16px;
  background:#fff;
  border:3px solid #000;
  border-left:9px solid var(--red);
  border-radius:4px;
  box-shadow:4px 4px 0 #000;
}
.prose blockquote p:last-child{margin:0}
.prose figure{
  margin:0 0 18px;
  padding:10px;
  background:#f6f2e8;
  border:3px solid #000;
  border-radius:4px;
  box-shadow:4px 4px 0 #000;
}
.prose figure img{border-radius:4px}
.prose figcaption{font-size:16px;margin-top:8px;color:#3a3a3a}
.prose table{width:100%;border-collapse:collapse;margin:0 0 18px;font-size:16px}
.prose th,.prose td{border:2px solid #000;padding:8px 10px;text-align:left}
.prose th{background:var(--blue)}
.prose pre{overflow-x:auto;border:3px solid #000;padding:10px;background:#fff}
.prose code{font-size:15px}

/* 滚动揭示 */
.js .prose > section{opacity:0;transform:translateY(18px);transition:opacity .45s ease,transform .45s ease}
.js .prose > section.seen{opacity:1;transform:none}

/* ---------- 页脚 ---------- */
.foot{
  margin-left:238px;
  margin-top:26px;
  background:#000;
  color:#fff;
  border-top:var(--bd);
  padding:34px clamp(16px,3vw,42px) 20px;
}
.foot-cols{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:clamp(16px,3vw,36px);
  max-width:1120px;
}
.foot-col dl{margin:0}
.foot-col dt{
  font-size:16px;
  font-weight:700;
  color:var(--blue);
  padding-bottom:8px;
  margin-bottom:10px;
  border-bottom:2px solid #3a3a3a;
  letter-spacing:1px;
}
.foot-col dd{
  margin:0 0 4px;
  font-size:16px;
  line-height:1.6;
}
.foot-col a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:4px 0;
  color:#fff;
  text-decoration:none;
  border-bottom:2px solid transparent;
}
.foot-col a:hover,.foot-col a:focus-visible{color:#000;background:var(--blue);border-bottom-color:var(--red)}
.foot-base{
  margin-top:26px;
  padding-top:16px;
  border-top:2px dashed #4a4a4a;
  text-align:center;
}
.foot-base p{margin:0;font-size:16px;color:#cfcfcf}

/* ---------- 窄屏 ---------- */
@media (max-width:880px){
  body{padding-top:74px}
  .rail{
    top:0;left:0;right:0;bottom:auto;
    width:auto;height:auto;
    flex-direction:row;
    align-items:center;
    gap:9px;
    padding:10px 12px;
    border-right:0;
    border-bottom:var(--bd);
    overflow-x:auto;
    overflow-y:hidden;
  }
  .mark{width:44px;height:44px;font-size:20px}
  .rail-list{flex-direction:row;gap:9px}
  .pill{white-space:nowrap;min-height:44px;padding:9px 14px}
  .pill-cta{margin-top:0;margin-left:auto}
  .page,.foot{margin-left:0}
  .hero{
    grid-template-columns:1fr;
    min-height:0;
    gap:18px;
    padding-top:22px;
    padding-bottom:28px;
  }
  .hero-copy{order:1;text-align:left}
  .hero-copy h1{font-size:clamp(27px,8vw,38px)}
  .hero-fig{order:2;max-height:38vh;aspect-ratio:16/10}
  .work{grid-template-columns:1fr;padding-top:20px}
  .toc{position:static;order:-1}
  .toc-list{flex-direction:row;flex-wrap:wrap}
  .toc-list li{flex:1 1 44%}
  .toc-list a{width:100%}
  .prose > section{scroll-margin-top:86px;box-shadow:5px 5px 0 #000!important}
  .foot-cols{grid-template-columns:1fr}
}
@media (max-width:420px){
  .hero-desc{max-width:none;display:block}
  .toc-list li{flex:1 1 100%}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{transition-duration:.01ms!important;animation-duration:.01ms!important}
}

button[aria-expanded]{min-width:44px;min-height:44px}
