@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
  --mint: #99ffcc;
  --neon: #00ff41;
  --ink: #001e3c;
  --paper: #f2fff9;
  --card: #ffffff;
  --text: #0a2c3f;
  --soft: rgba(0, 30, 60, 0.62);
  --line: rgba(0, 30, 60, 0.14);
  --r: 4px;
  --pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: 'Noto Sans KR', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
  max-width: 100%;
}

section { scroll-margin-top: 96px; }

a { color: inherit; }

img, svg, video, iframe, canvas { max-width: 100%; }

img { height: auto; }

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 90;
  background: var(--ink);
  color: var(--mint);
  padding: 12px 18px;
  border-radius: var(--pill);
  text-decoration: none;
  transition: top .2s ease;
}
.skip:focus { top: 12px; }

/* ---------- 头部：角落图标 + 左侧胶囊菜单 ---------- */

.masthead { position: fixed; inset: 0 auto auto 0; z-index: 80; }

.mark {
  position: fixed;
  left: 22px;
  top: 22px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--neon);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 255, 65, .45), 0 10px 26px rgba(0, 30, 60, .35);
  transition: box-shadow .3s ease, transform .3s ease;
}
.mark:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--neon), 0 14px 30px rgba(0, 30, 60, .4); }
.mark-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mark-txt { line-height: 1; }

.menu { position: fixed; left: 22px; top: 88px; z-index: 85; }

.menu summary {
  list-style: none;
  cursor: pointer;
  width: 46px;
  min-height: 46px;
  padding: 11px 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  border-radius: var(--pill);
  background: linear-gradient(160deg, var(--mint), #62f0b0);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(0, 30, 60, .22);
  transition: transform .25s ease, box-shadow .25s ease;
  user-select: none;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0, 30, 60, .3); }
.menu summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.bars { display: grid; gap: 3px; width: 17px; }
.bars i { display: block; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .3s ease, opacity .3s ease; }
.st { font-size: 16px; line-height: 1; letter-spacing: .06em; }

.menu[open] .bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu[open] .bars i:nth-child(2) { opacity: 0; }
.menu[open] .bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.menu menu {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 170px);
  max-width: calc(100vw - 44px);
  overflow-y: auto;
  overflow-x: hidden;
  animation: slidein .32s cubic-bezier(.2, .7, .3, 1);
}

@keyframes slidein {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

.menu menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--pill);
  background: var(--ink);
  color: #e6fff3;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 30, 60, .28);
  transition: background .22s ease, color .22s ease, transform .22s ease;
}
.menu menu a:hover,
.menu menu a:focus-visible { background: var(--neon); color: var(--ink); transform: translateX(4px); }

/* ---------- 框架 ---------- */

.shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 0 92px;
}

main { min-width: 0; width: 100%; }
.wrap { min-width: 0; max-width: 100%; }

.rail {
  position: sticky;
  top: 100px;
  padding-top: 6px;
  min-width: 0;
}

.eyebrow {
  display: block;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .18em;
  line-height: 1.5;
  color: #0a7d5a;
  margin: 0 0 4px;
}

.rail-h {
  font-size: 20px;
  line-height: 1.5;
  margin: 0 0 14px;
  color: var(--ink);
  letter-spacing: .02em;
}

.rail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 13px;
  border-radius: var(--r);
  border-left: 3px solid var(--mint);
  background: var(--card);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  overflow-wrap: break-word;
  box-shadow: 0 2px 10px rgba(0, 30, 60, .07);
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.rail-list a:hover,
.rail-list a:focus-visible {
  border-left-color: var(--neon);
  box-shadow: 0 10px 22px rgba(0, 30, 60, .16);
  transform: translateY(-1px);
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(30px, 5vw, 64px) clamp(22px, 5vw, 56px) clamp(64px, 7vw, 96px);
  border-radius: 0 0 48px 48px;
  color: #f0fff8;
  background:
    radial-gradient(120% 90% at 82% 4%, #0a4b6b 0%, #012a49 46%, #00121f 100%);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .4;
  filter: saturate(1.15) contrast(1.05);
  z-index: 0;
}

.blob {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  filter: blur(44px);
  opacity: .5;
  background: radial-gradient(circle at 40% 40%, rgba(0, 255, 65, .85), rgba(153, 255, 204, .1) 70%);
  border-radius: 48% 52% 60% 40% / 52% 46% 54% 48%;
  animation: breathe 13s ease-in-out infinite;
}
.b1 { width: 260px; height: 260px; left: -70px; top: 12%; }
.b2 {
  width: 200px; height: 200px; right: 6%; top: 22%;
  animation-delay: -6s;
  background: radial-gradient(circle at 60% 40%, rgba(153, 255, 204, .8), rgba(0, 255, 65, .08) 70%);
}

@keyframes breathe {
  0%, 100% { transform: scale(1) translate(0, 0); border-radius: 48% 52% 60% 40% / 52% 46% 54% 48%; }
  50% { transform: scale(1.18) translate(10px, -14px); border-radius: 58% 42% 46% 54% / 44% 58% 42% 56%; }
}

.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 12px;
  z-index: 2;
  background: linear-gradient(90deg, var(--mint), var(--neon) 55%, var(--mint));
}

.hero-in {
  position: relative;
  z-index: 3;
  max-width: 620px;
  min-width: 0;
  text-align: right;
  animation: rise .9s cubic-bezier(.2, .7, .3, 1) both;
}

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

.hero .eyebrow { color: var(--mint); }

.hero h1 {
  font-size: clamp(32px, 5.6vw, 64px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 6px 0 18px;
  overflow-wrap: break-word;
  text-shadow: 0 2px 26px rgba(0, 20, 35, .5);
}

.hero-sub {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(230, 255, 243, .86);
  font-weight: 300;
  overflow-wrap: break-word;
}

/* ---------- 正文 ---------- */

.body { padding: clamp(40px, 6vw, 78px) 0 20px; }

.prose {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
  max-width: 44em;
  min-width: 0;
  overflow-wrap: break-word;
}

.prose section {
  margin-top: 46px;
  padding-top: 34px;
  border-top: 1px dashed var(--line);
}
.prose section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.prose small {
  display: block;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1.5;
  color: #0a7d5a;
}

.prose h2 {
  font-size: clamp(23px, 3.4vw, 30px);
  line-height: 1.32;
  font-weight: 700;
  color: var(--ink);
  margin: 2px 0 16px;
  letter-spacing: -.005em;
  overflow-wrap: break-word;
}
.prose small + h2 { margin-top: 2px; }

.prose h3 {
  font-size: 20px;
  line-height: 1.45;
  color: var(--ink);
  margin: 30px 0 12px;
  overflow-wrap: break-word;
}
.prose small + h3 { margin-top: 2px; }

.prose p { margin: 0 0 1.1em; overflow-wrap: break-word; }

.prose a {
  color: #046f52;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: break-word;
}
.prose a:hover { color: #00a86b; }

.prose ul, .prose ol { padding-left: 1.35em; margin: 0 0 1.1em; }
.prose li { margin: .35em 0; overflow-wrap: break-word; }

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.3em 0;
  border-radius: var(--r);
  box-shadow: 0 12px 30px rgba(0, 30, 60, .14);
}

.prose blockquote {
  margin: 1.4em 0;
  padding: .6em 1.1em;
  max-width: 100%;
  border-left: 4px solid var(--neon);
  border-radius: 0 var(--r) var(--r) 0;
  background: #e9fff5;
  color: var(--ink);
  overflow-wrap: break-word;
}

.prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  margin: 1.2em 0;
  overflow-x: auto;
  overflow-y: hidden;
}
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.prose th { background: #e9fff5; color: var(--ink); }

.prose pre {
  margin: 1.2em 0;
  padding: 14px 16px;
  max-width: 100%;
  overflow-x: auto;
  background: #e6f7ee;
  border-radius: var(--r);
  font-size: 15px;
  line-height: 1.6;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  background: #e6f7ee;
  padding: 1px 5px;
  border-radius: var(--r);
  overflow-wrap: break-word;
}
.prose pre code { background: none; padding: 0; white-space: pre; }

.prose iframe,
.prose video { display: block; max-width: 100%; }

/* ---------- 页脚 ---------- */

footer {
  margin-top: clamp(56px, 8vw, 96px);
  padding: 56px clamp(20px, 6vw, 72px) 28px;
  background: var(--ink);
  color: #cbeee0;
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1fr;
  gap: 30px;
  align-items: start;
  border-radius: 40px 40px 0 0;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

footer p { margin: 0; min-width: 0; }

.f-brand { display: flex; align-items: center; gap: 10px; color: #eafff4; }
.fmark {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--pill);
  background: var(--neon);
  color: var(--ink);
  font-weight: 700;
  overflow: hidden;
  flex: 0 0 auto;
}
.fmark .mark-img { width: 100%; height: 100%; object-fit: cover; }
.f-brand strong { font-weight: 500; letter-spacing: .02em; }

.f-sub { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.sub-mail {
  flex: 1 1 140px;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(153, 255, 204, .35);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .06);
  color: #eafff4;
  font: inherit;
  font-size: 16px;
}
.sub-mail::placeholder { color: rgba(203, 238, 224, .6); }
.sub-mail:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }

.sub-btn {
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--pill);
  background: var(--neon);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.sub-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 255, 65, .3); }

.f-links { display: flex; flex-wrap: wrap; gap: 4px 16px; min-width: 0; }
.f-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #a9e8cd;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.f-links a:hover { color: var(--mint); border-bottom-color: var(--mint); }

footer small {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 16px;
  color: rgba(203, 238, 224, .72);
  border-top: 1px solid rgba(153, 255, 204, .18);
  padding-top: 20px;
  margin-top: 6px;
}

/* ---------- 滚动显现 ---------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 断点 ---------- */

@media (max-width: 860px) {
  .shell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 18px;
    width: 100%;
    max-width: 100%;
  }
  main { order: 1; width: 100%; min-width: 0; }
  .wrap { width: 100%; max-width: 100%; }
  .rail {
    order: 2;
    width: 100%;
    min-width: 0;
    position: static;
    margin-top: 44px;
    padding-top: 28px;
    border-top: 1px dashed var(--line);
  }

  .mark { left: 16px; top: 16px; }
  .menu { left: auto; right: 16px; top: 16px; }
  .menu summary { width: auto; min-width: 46px; grid-auto-flow: column; align-items: center; gap: 8px; padding: 11px 14px; }
  .st { font-size: 16px; }
  .menu menu { justify-items: end; max-width: calc(100vw - 32px); }

  .hero {
    padding: 96px 20px 46px;
    min-height: 100svh;
    width: 100%;
    max-width: 100%;
    border-radius: 0 0 28px 28px;
  }
  .hero-in { max-width: 100%; width: 100%; }
  .blob { filter: blur(38px); }
  .b1 { width: 170px; height: 170px; left: -60px; }
  .b2 { width: 130px; height: 130px; right: 4%; }

  .prose { max-width: none; width: 100%; }

  footer {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    border-radius: 26px 26px 0 0;
    padding: 42px 20px 24px;
    width: 100%;
    max-width: 100%;
  }
  .f-links { gap: 0 18px; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 30px; }
  .hero { padding-left: 16px; padding-right: 16px; }
}

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

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