@property --a {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  --bg: #0c0d14;
  --bg2: #11131d;
  --card: #161824;
  --card-elev: #1b1e2d;
  --line: #26293a;
  --line-strong: #343952;
  --text: #f1f0ea;
  --text-soft: #d2d1dc;
  --muted: #9c9eb3;
  --gold: #dbc66f;
  --gold-soft: rgba(219, 198, 111, 0.14);
  --mint: #79d2b4;
  --mint-soft: rgba(121, 210, 180, 0.14);
  --orange: #e09a4d;
  --indigo: #a7b0f0;
  --radius: 20px;
  --radius-sm: 14px;
  --max: 1180px;
  --font-sans: "Plus Jakarta Sans", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

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

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--text);
  color: #0c0d14;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.skip-link:focus {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(12, 13, 20, 0.76);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(38, 41, 58, 0.75);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.logo svg {
  width: 34px;
  height: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
}

.nav-links a {
  transition: color 0.16s ease;
  padding: 6px 2px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(22, 24, 36, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.lang-switch button[aria-pressed="true"] {
  background: rgba(241, 240, 234, 0.12);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(241, 240, 234, 0.14);
}

.lang-switch button:hover:not([aria-pressed="true"]) {
  color: var(--text-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-main {
  background: var(--text);
  color: #0c0d14;
  box-shadow: 0 8px 24px rgba(241, 240, 234, 0.08);
}

.btn-main:hover {
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(219, 198, 111, 0.18);
}

.btn-ghost {
  background: rgba(22, 24, 36, 0.65);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--mint);
  background: rgba(121, 210, 180, 0.08);
}

.nav .btn {
  padding: 9px 16px;
  font-size: 13.5px;
}

.menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(22, 24, 36, 0.85);
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-drawer {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(12, 13, 20, 0.96);
  padding: 16px 24px 20px;
}

.mobile-drawer.open {
  display: block;
}

.mobile-drawer ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.mobile-drawer a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 500;
}

.mobile-drawer a:hover {
  background: var(--card);
  color: var(--text);
}

/* Shared visual effects */
.spotlight {
  position: relative;
  overflow: hidden;
  --mx: 50%;
  --my: 50%;
}

.spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
  background: radial-gradient(380px circle at var(--mx) var(--my), rgba(219, 198, 111, 0.1), rgba(121, 210, 180, 0.05) 42%, transparent 72%);
}

.spotlight:hover::after {
  opacity: 1;
}

.beam {
  position: relative;
}

.beam::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  pointer-events: none;
  background: conic-gradient(from var(--a), transparent 0 70%, var(--gold) 82%, var(--mint) 93%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: beam 7.5s linear infinite;
}

@keyframes beam {
  to {
    --a: 360deg;
  }
}

/* Typography & Section Rhythm */
section {
  padding: 96px 0;
}

.alt {
  background: var(--bg2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--mint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 14px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--gold), var(--mint));
  border-radius: 2px;
}

h1,
h2,
h3 {
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.18;
  font-weight: 800;
  margin-top: 14px;
}

.sub {
  color: var(--muted);
  margin-top: 16px;
  max-width: 660px;
  font-size: 17px;
  line-height: 1.65;
}

.shine {
  background: linear-gradient(100deg, var(--gold) 0%, var(--gold) 34%, #fff6cf 49%, var(--mint) 64%, var(--mint) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 7s ease-in-out infinite;
}

@keyframes shine {
  0%,
  100% {
    background-position: 100% 0;
  }
  50% {
    background-position: 0 0;
  }
}

/* Subpage Document Layout */
.page-hero {
  position: relative;
  padding: 76px 0 56px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 50% 80% at 15% 0%, rgba(219, 198, 111, 0.1), transparent 65%),
    radial-gradient(ellipse 50% 80% at 85% 100%, rgba(121, 210, 180, 0.09), transparent 65%),
    var(--bg2);
}

.page-hero h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.14;
  font-weight: 800;
  margin-top: 14px;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--muted);
}

.doc-section {
  padding: 64px 0 96px;
}

.doc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}

.prose {
  display: grid;
  gap: 28px;
}

.prose-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}

.prose-card h2 {
  font-size: 22px;
  margin-top: 0;
  margin-bottom: 14px;
}

.prose-card h3 {
  font-size: 17px;
  margin-top: 18px;
  margin-bottom: 8px;
  color: var(--text);
}

.prose-card p {
  color: var(--text-soft);
  font-size: 15.5px;
  margin-top: 10px;
}

.prose-card p:first-of-type {
  margin-top: 0;
}

.prose-card ul {
  margin-top: 12px;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-size: 15.5px;
}

.prose-card a {
  color: var(--mint);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.side-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  position: sticky;
  top: 92px;
}

.side-card h3 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 16px;
}

.kv-list {
  display: grid;
  gap: 14px;
}

.kv-item {
  border-bottom: 1px solid rgba(38, 41, 58, 0.7);
  padding-bottom: 12px;
}

.kv-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.kv-item dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.kv-item dd {
  margin-top: 4px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}

/* Footer */
footer {
  padding: 64px 0 44px;
  border-top: 1px solid var(--line);
  background: #0a0b11;
  color: var(--muted);
  font-size: 14px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(38, 41, 58, 0.75);
}

.foot-brand p {
  margin-top: 14px;
  max-width: 310px;
  line-height: 1.65;
  color: var(--muted);
}

.foot-col h4 {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 14px;
}

.foot-col ul {
  list-style: none;
  display: grid;
  gap: 10px;
}

.foot-col a {
  color: var(--muted);
  transition: color 0.15s ease;
}

.foot-col a:hover {
  color: var(--mint);
}

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding-top: 24px;
  font-size: 13px;
}

.foot-bottom a {
  color: var(--text-soft);
}

.foot-bottom a:hover {
  color: var(--mint);
}

@media (max-width: 960px) {
  .doc-grid {
    grid-template-columns: 1fr;
  }
  .side-card {
    position: static;
  }
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .nav-links,
  .nav .cta-nav {
    display: none;
  }
  .menu-btn {
    display: inline-flex;
  }
  section {
    padding: 68px 0;
  }
  .foot-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .prose-card {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
