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

:root {
  --black: #000000;
  --panel: #0b0b0b;
  --panel-2: #121212;
  --midnight: #081526;
  --line: rgba(121, 171, 255, 0.15);
  --line-strong: rgba(127, 211, 255, 0.42);
  --text: #e9eff8;
  --body: #c3cddc;
  --muted: #8a99af;
  --accent: #7fd3ff;
  --accent-2: #3a74ff;
  --glow: 0 0 16px rgba(90, 181, 255, 0.36);
  --radius: 10px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
  color-scheme: dark;
}

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

html {
  background: #000000;
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background:
    radial-gradient(1000px 620px at 72% -12%, rgba(17, 47, 92, 0.58), transparent 62%),
    radial-gradient(760px 520px at 8% 30%, rgba(8, 31, 62, 0.42), transparent 66%),
    #000000;
  color: var(--text);
  font-family: "Noto Sans KR", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16.5px;
  font-weight: 300;
  line-height: 1.76;
  letter-spacing: 0.012em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.58;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(145, 218, 255, 0.16) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 64%, rgba(99, 158, 255, 0.13) 0 1px, transparent 2px),
    radial-gradient(circle at 44% 82%, rgba(160, 225, 255, 0.10) 0 1px, transparent 2px);
  background-size: 181px 181px, 263px 263px, 331px 331px;
}

img,
svg,
video,
table,
pre {
  display: block;
  max-width: 100%;
}

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

menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

figure {
  margin: 0;
}

summary,
button {
  font: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
  line-height: 1.32;
  letter-spacing: 0.018em;
  text-wrap: balance;
}

h2,
h3 {
  color: #f3f8ff;
}

::selection {
  background: rgba(89, 176, 255, 0.34);
  color: #ffffff;
}

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

main div[id] {
  scroll-margin-top: 94px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--accent);
  color: #00101d;
  font-size: 16px;
  transition: top 0.2s ease;
}

.skip:focus {
  top: 0;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.74));
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
}

.masthead::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(112, 197, 255, 0.35), transparent);
  pointer-events: none;
}

.drawer {
  position: relative;
  justify-self: start;
  min-width: 0;
}

.drawer > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 16px;
  letter-spacing: 0.18em;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.drawer > summary::-webkit-details-marker {
  display: none;
}

.drawer > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.drawer[open] > summary::after {
  transform: rotate(-135deg) translateY(-1px);
}

.drawer > summary:hover {
  color: var(--accent);
  border-color: var(--line-strong);
  background: rgba(93, 178, 255, 0.06);
}

.drop {
  flex: none;
  width: 8px;
  height: 11px;
  border-radius: 60% 60% 55% 55% / 72% 72% 38% 38%;
  background: linear-gradient(180deg, #c4ecff, #3b89ff);
  box-shadow: var(--glow);
  transform: rotate(18deg);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1px;
  margin-left: 2px;
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 6px;
  color: #d7e0ec;
  font-size: 16px;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 5px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: #ffffff;
  background: rgba(110, 190, 255, 0.07);
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 8px;
  color: #f5f9ff;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-shadow: 0 0 14px rgba(121, 200, 255, 0.32);
}

.brand-mark {
  flex: none;
  width: 9px;
  height: 12px;
  border-radius: 60% 60% 55% 55% / 72% 72% 38% 38%;
  background: linear-gradient(180deg, #c7eeff, #3d8cff);
  box-shadow: var(--glow);
  transform: rotate(18deg);
}

.brand-mark-img {
  flex: none;
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
}

.contact {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dce7f5;
  font-size: 16px;
  letter-spacing: 0.14em;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.contact:hover,
.contact:focus-visible {
  color: #00101d;
  background: var(--accent);
  border-color: var(--accent);
}

.main {
  display: block;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  grid-template-rows: auto;
  align-items: center;
  column-gap: clamp(18px, 4vw, 48px);
  width: min(var(--max), calc(100% - 2 * var(--gutter)));
  min-height: clamp(330px, 45vh, 470px);
  margin: 0 auto;
  padding: clamp(22px, 4vh, 40px) 0 clamp(30px, 6vh, 56px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -12% 0 auto;
  z-index: -1;
  height: 84%;
  background: radial-gradient(ellipse at 62% 22%, rgba(22, 64, 128, 0.4), transparent 67%);
  filter: blur(10px);
  pointer-events: none;
}

.hero-copy {
  grid-area: 1 / 1;
  align-self: center;
  min-width: 0;
  max-width: 620px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.24em;
  background: rgba(36, 102, 176, 0.08);
  box-shadow: inset 0 0 18px rgba(68, 146, 255, 0.08);
}

.hero h1 {
  max-width: 15ch;
  margin: 0.48em 0 0;
  color: #ffffff;
  font-size: clamp(2rem, 5.5vw, 3.9rem);
  font-weight: 300;
  line-height: 1.17;
  letter-spacing: 0.014em;
  text-shadow: 0 0 20px rgba(105, 185, 255, 0.18);
  word-break: keep-all;
}

.lede {
  max-width: 38ch;
  margin: 1.1em 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.08rem);
  line-height: 1.8;
}

.hero-jump {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 1.2em;
  border-bottom: 1px solid var(--line-strong);
  color: var(--accent);
  font-size: 16px;
  letter-spacing: 0.12em;
}

.hero-jump::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.hero-jump:hover::after {
  transform: rotate(45deg) translate(3px, 1px);
}

.hero-fig {
  position: relative;
  grid-area: 1 / 2;
  overflow: hidden;
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 30% 25%, rgba(150, 220, 255, 0.24), transparent 13%),
    radial-gradient(circle at 68% 58%, rgba(68, 137, 255, 0.21), transparent 22%),
    linear-gradient(145deg, #0d1a2c, #06080d 62%, #000000);
  box-shadow: 0 28px 66px rgba(0, 0, 0, 0.82), 0 0 28px rgba(54, 132, 255, 0.13);
}

.hero-fig::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(0, 8, 20, 0.65));
  pointer-events: none;
}

.fig-a {
  z-index: 1;
  align-self: start;
  justify-self: start;
  width: 58%;
  aspect-ratio: 3 / 4;
  transform: rotate(-2.5deg);
}

.fig-b {
  z-index: 2;
  align-self: end;
  justify-self: end;
  width: 54%;
  aspect-ratio: 4 / 5;
  transform: rotate(2.5deg);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) brightness(0.9);
}

.tide {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 34% 30%, rgba(188, 236, 255, 0.42) 0 2px, transparent 3px),
    radial-gradient(circle at 58% 52%, rgba(126, 201, 255, 0.3) 0 3px, transparent 4px),
    radial-gradient(circle at 44% 72%, rgba(78, 151, 255, 0.24) 0 5px, transparent 6px),
    radial-gradient(circle at 76% 22%, rgba(140, 217, 255, 0.18) 0 2px, transparent 3px);
  background-size: 90px 90px, 130px 130px, 170px 170px, 110px 110px;
  opacity: 0.9;
}

.tide-b {
  transform: scaleX(-1) rotate(7deg);
}

.bead {
  position: absolute;
  right: 6%;
  top: 12%;
  width: 9px;
  height: 12px;
  border-radius: 60% 60% 55% 55% / 72% 72% 38% 38%;
  background: linear-gradient(180deg, #e0f7ff, #4a98ff);
  box-shadow: 0 0 18px rgba(106, 195, 255, 0.7);
  animation: bead-float 5.5s ease-in-out infinite;
}

@keyframes bead-float {
  0%,
  100% {
    transform: translateY(0) rotate(16deg);
  }
  50% {
    transform: translateY(-10px) rotate(16deg);
  }
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 254px;
  align-items: start;
  gap: clamp(24px, 4vw, 56px);
  width: min(var(--max), calc(100% - 2 * var(--gutter)));
  margin: clamp(18px, 4vh, 34px) auto 0;
  padding-top: clamp(12px, 2vh, 20px);
  border-top: 1px solid var(--line);
}

.prose {
  min-width: 0;
  counter-reset: chapter;
  overflow-wrap: anywhere;
}

.prose > div {
  position: relative;
  padding: clamp(30px, 4vw, 46px) 0 clamp(34px, 4vw, 50px) clamp(46px, 6vw, 72px);
  border-top: 1px solid var(--line);
}

.prose > div:first-child {
  border-top: 0;
  padding-top: clamp(22px, 3vw, 34px);
}

.prose > div::before {
  counter-increment: chapter;
  content: counter(chapter, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: clamp(34px, 4vw, 52px);
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.2em;
  opacity: 0.78;
  text-shadow: 0 0 12px rgba(111, 198, 255, 0.44);
}

.prose > div::after {
  content: "";
  position: absolute;
  left: 0;
  top: calc(clamp(34px, 4vw, 52px) + 24px);
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.prose > div > * {
  max-width: 70ch;
}

.prose h2 {
  margin: 0 0 0.9em;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 400;
  line-height: 1.4;
}

.prose h2 > span,
.rail h2 > span,
.foot h2 > span {
  display: inline-block;
  position: relative;
}

.prose h2 > span {
  padding-bottom: 0.32em;
}

.prose h2 > span::after,
.rail h2 > span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  box-shadow: var(--glow);
}

.prose h3 {
  margin: 1.7em 0 0.65em;
  font-size: 1.12rem;
  font-weight: 500;
  color: #edf5ff;
}

.prose p {
  margin: 0 0 1.15em;
  color: var(--body);
}

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.25em;
  color: var(--body);
}

.prose li {
  margin: 0.38em 0;
}

.prose li::marker {
  color: var(--accent);
}

.prose a {
  color: var(--accent);
  border-bottom: 1px solid rgba(127, 211, 255, 0.35);
}

.prose a:hover {
  border-bottom-color: var(--accent);
  box-shadow: 0 6px 0 -5px var(--accent);
}

.prose strong {
  color: #f2f7ff;
  font-weight: 500;
}

.prose blockquote {
  margin: 1.3em 0;
  padding: 0.2em 0 0.2em 1.1em;
  border-left: 2px solid var(--line-strong);
  color: #b8c6d9;
}

.prose code {
  padding: 0.12em 0.4em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #0b0f16;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.prose figure,
.prose aside {
  margin: 1.3em 0;
  max-width: 100%;
}

.prose figure img,
.prose aside img {
  width: 100%;
  height: auto;
}

.rail {
  position: sticky;
  top: 88px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(11, 20, 34, 0.92), rgba(7, 8, 11, 0.92));
  box-shadow: inset 0 1px 0 rgba(177, 224, 255, 0.04), 0 18px 50px rgba(0, 0, 0, 0.42);
}

.rail h2 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.22em;
}

.rail h2 > span {
  padding-bottom: 8px;
}

.rail-menu {
  display: grid;
  gap: 1px;
}

.rail-menu a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 4px;
  border-bottom: 1px solid rgba(122, 168, 240, 0.09);
  color: #c8d3e2;
  font-size: 16px;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.rail-menu a:hover,
.rail-menu a:focus-visible {
  padding-left: 9px;
  color: var(--accent);
}

.rail-back {
  margin: 14px 0 0;
  font-size: 15px;
}

.rail-back a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.rail-back a::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-left: 1px solid currentColor;
  border-top: 1px solid currentColor;
  transform: rotate(45deg);
}

.rail-back a:hover {
  color: var(--accent);
}

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 34px;
  width: min(var(--max), calc(100% - 2 * var(--gutter)));
  margin: clamp(52px, 9vh, 92px) auto 0;
  padding: 22px 0 38px;
  border-top: 1px solid var(--line);
}

.foot div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.foot h2 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.22em;
}

.foot p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  white-space: nowrap;
}

.foot-nav {
  justify-content: flex-end;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0 4px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 5px;
  color: #b6c3d4;
  font-size: 15px;
  transition: color 0.2s ease;
}

.foot-links a:hover,
.foot-links a:focus-visible {
  color: var(--accent);
}

.js .stagger > * {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js .stagger > .is-in {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .masthead {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .brand {
    font-size: 16px;
    letter-spacing: 0.18em;
  }

  .contact {
    padding: 0 12px;
  }

  .drawer > menu,
  .nav {
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    z-index: 60;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    width: min(80vw, 300px);
    max-height: calc(100vh - 100px);
    margin: 0;
    padding: 10px;
    overflow: auto;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: rgba(7, 12, 21, 0.985);
    box-shadow: 0 26px 64px rgba(0, 0, 0, 0.9);
  }

  .nav a {
    justify-content: flex-start;
    min-height: 46px;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    white-space: normal;
  }

  .nav a::after {
    display: none;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    row-gap: 12px;
    min-height: 0;
    padding-top: 24px;
  }

  .hero h1 {
    max-width: 18ch;
  }

  .hero-copy {
    grid-area: auto;
  }

  .fig-a {
    grid-area: auto;
    justify-self: start;
    align-self: start;
    width: 54%;
    max-width: 220px;
  }

  .fig-b {
    grid-area: auto;
    justify-self: end;
    align-self: end;
    width: 50%;
    max-width: 200px;
    margin-top: -12%;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .prose {
    order: 1;
  }

  .rail {
    position: static;
    order: 2;
  }

  .foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .foot-nav {
    justify-content: flex-start;
  }

  .foot-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 8.4vw, 2.4rem);
  }

  .prose > div {
    padding-left: 34px;
  }

  .prose > div::before {
    font-size: 12px;
  }

  .prose > div > * {
    max-width: 100%;
  }

  .rail {
    padding: 16px;
  }

  .foot {
    gap: 6px;
  }

  .foot div {
    display: block;
  }

  .foot h2 {
    margin-bottom: 4px;
  }

  .foot p {
    white-space: normal;
  }

  .foot-links a,
  .rail-menu a {
    min-height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .stagger > * {
    opacity: 1;
    transform: none;
  }
}

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