:root {
  --shell-bg: #fafafa;
  --shell-surface: #ffffff;
  --shell-text: #171717;
  --shell-muted: #666666;
  --shell-border: #e5e5e5;
  --shell-accent: #374151;
  --shell-width: 1120px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --shell-bg: #0a0a0a;
    --shell-surface: #141414;
    --shell-text: #f5f5f5;
    --shell-muted: #a3a3a3;
    --shell-border: #292929;
    --shell-accent: #d4d4d4;
  }
}

html[data-theme="light"] {
  --shell-bg: #fafafa;
  --shell-surface: #ffffff;
  --shell-text: #171717;
  --shell-muted: #666666;
  --shell-border: #e5e5e5;
  --shell-accent: #374151;
  color-scheme: light;
}

html[data-theme="dark"] {
  --shell-bg: #0a0a0a;
  --shell-surface: #141414;
  --shell-text: #f5f5f5;
  --shell-muted: #a3a3a3;
  --shell-border: #292929;
  --shell-accent: #d4d4d4;
  color-scheme: dark;
}

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  min-height: 64px;
  border-bottom: 1px solid var(--shell-border);
  background: color-mix(in srgb, var(--shell-bg) 88%, transparent);
  color: var(--shell-text);
  backdrop-filter: blur(14px);
}

.site-header-inner,
.site-footer-inner {
  width: min(calc(100% - 3rem), var(--shell-width));
  margin: 0 auto;
}

.site-header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-brand {
  color: inherit;
  font: 800 1.15rem/1 Inter, "Noto Sans KR", sans-serif;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a {
  color: var(--shell-muted);
  font: 600 0.9rem/1 Inter, "Noto Sans KR", sans-serif;
  text-decoration: none;
}

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

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45rem;
}

.site-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--shell-border);
  border-radius: 0.55rem;
  background: var(--shell-surface);
  color: var(--shell-text);
}

.site-nav-toggle span:not(.sr-only) {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  background: currentColor;
}

.site-footer {
  border-top: 1px solid var(--shell-border);
  background: var(--shell-bg);
  color: var(--shell-text);
}

.site-footer-inner {
  padding: 3rem 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 2rem;
  align-items: start;
}

.site-footer strong span,
.site-footer p,
.site-footer small {
  color: var(--shell-muted);
}

.site-footer p {
  margin: 0.35rem 0 0;
}

.site-footer small {
  grid-column: 1 / -1;
}

.site-footer-links {
  display: flex;
  gap: 1rem;
}

.site-footer a {
  color: inherit;
  text-underline-offset: 0.2rem;
}

:focus-visible {
  outline: 3px solid #60a5fa;
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .site-header-inner,
  .site-footer-inner {
    width: min(calc(100% - 2rem), var(--shell-width));
  }

  .site-nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    inset: 64px 0 auto;
    display: none;
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid var(--shell-border);
    background: var(--shell-bg);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.9rem 0.5rem;
  }

  .site-footer-inner {
    grid-template-columns: 1fr;
  }

  .site-footer small {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

