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

:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --text: #1a1d26;
  --muted: #5c6478;
  --border: #e4e7ef;
  --accent: #025bfa;
  --accent-soft: #e8f1ff;
  --header-h: 64px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Be Vietnam Pro", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 920px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.brand img {
  width: 36px;
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  display: block;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
}

main {
  flex: 1;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.page-hero {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.page-hero .meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 32px 0 12px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 20px 0 8px;
}

.content p,
.content li {
  color: var(--text);
  margin-bottom: 12px;
}

.content ul,
.content ol {
  padding-left: 1.35rem;
  margin-bottom: 16px;
}

.content li {
  margin-bottom: 8px;
}

.content strong {
  font-weight: 600;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 8px;
}

.toc p {
  font-weight: 600;
  margin-bottom: 10px;
}

.toc ol {
  margin-bottom: 0;
}

.highlight {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 16px 0;
}

.highlight p:last-child {
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  list-style: none;
  margin-bottom: 12px;
}

@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 12px 16px;
    gap: 2px;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 12px 14px;
  }

  main {
    padding: 28px 16px 48px;
  }
}
