:root {
  --bg: #282a36;
  --surface: #21222c;
  --line: #44475a;
  --text: #f8f8f2;
  --comment: #6272a4;
  --yellow: #f1fa8c;
  --green: #50fa7b;
  --purple: #bd93f9;
  --cyan: #8be9fd;
  --pink: #ff79c6;
  --orange: #ffb86c;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --sans: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Header ── */
header {
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  background: var(--surface);
}
.header-inner {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: stretch;
  height: 44px;
}
.logo {
  display: flex;
  align-items: center;
  color: var(--cyan);
  font-weight: 700;
  margin-right: 32px;
  letter-spacing: 0.5px;
  text-decoration: none;
}
.logo:hover { color: var(--text); }
nav { display: flex; }
nav a {
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: background 0.1s;
}
nav a:hover { background: var(--line); }
nav a.active { color: var(--pink); border-bottom-color: var(--pink); }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--comment);
  background: var(--surface);
  margin-top: auto;
}
.footer-inner {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer a { color: var(--comment); text-decoration: none; }
footer a:hover { color: var(--cyan); }

/* ── Single-column layout (home, blog list, about, advisory, products) ── */
.page-single {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 24px;
  flex: 1;
}
.page-single > .avatar { margin-bottom: 24px; }

/* ── Blog post layout ── */
.page-post {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 24px;
  flex: 1;
}

/* ── Avatar ── */
.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid var(--line);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Blog feed (home) ── */
.feed { min-width: 0; }
.post {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.post:last-of-type { border-bottom: none; }
.post-title {
  display: block;
  color: var(--yellow);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
  line-height: 1.5;
  transition: color 0.1s;
}
.post-title:hover { color: var(--cyan); }
.post-excerpt {
  color: var(--comment);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}
.post-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--comment);
  margin-top: 6px;
}
.more {
  display: inline-block;
  margin-top: 28px;
  color: var(--purple);
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.1s;
}
.more:hover { color: var(--cyan); }
.more::before { content: '→ '; }

/* ── Blog list page ── */
.post-list .post { padding: 20px 0; }
.post-list .post-title { font-size: 16px; }

/* ── Blog post page ── */
.post-header { margin-bottom: 40px; }
.post-header h1 {
  font-family: var(--mono);
  color: var(--yellow);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 12px;
}
.post-header .post-meta { margin-top: 0; }
.post-body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}
.post-body h2 {
  font-family: var(--mono);
  color: var(--cyan);
  font-size: 17px;
  margin: 40px 0 12px;
}
.post-body h3 {
  font-family: var(--mono);
  color: var(--purple);
  font-size: 15px;
  margin: 28px 0 10px;
}
.post-body p { margin: 0 0 20px; }
.post-body a { color: var(--purple); }
.post-body a:hover { color: var(--cyan); }
.post-body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}
.post-body code {
  font-family: var(--mono);
  background: var(--surface);
  color: var(--green);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 14px;
}
.post-body pre {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 20px;
  overflow-x: auto;
  margin: 0 0 24px;
}
.post-body pre code { background: none; padding: 0; }
.post-back {
  display: inline-block;
  margin-bottom: 32px;
  color: var(--comment);
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
}
.post-back:hover { color: var(--cyan); }
.post-back::before { content: '← '; }

/* ── Blog post hero image ── */
.post-hero {
  margin: 0 0 36px;
}
.post-hero img {
  width: 50%;
  height: auto;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--line);
}
.post-hero figcaption {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--comment);
  text-align: center;
  margin-top: 10px;
}

/* ── In-body figure (post images) ── */
.post-body figure {
  margin: 24px 0;
  text-align: center;
}
.post-body figure img {
  max-width: 200px;
  width: 100%;
  height: auto;
  display: inline-block;
  border: 1px solid var(--line);
}
.post-body figcaption {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--comment);
  margin-top: 8px;
}

/* ── Aside / term note ── */
.post-body .note {
  border-left: 2px solid var(--purple);
  background: var(--surface);
  padding: 12px 16px;
  margin: 4px 0 24px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--comment);
}
.post-body .note b { color: var(--cyan); font-weight: 700; }
.post-body .note a { color: var(--purple); }

/* ── Static pages (about, advisory, products) ── */
.page-title {
  font-family: var(--mono);
  color: var(--cyan);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.section {
  margin-bottom: 48px;
}
.section h2 {
  font-family: var(--mono);
  color: var(--yellow);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin: 0 0 16px;
}
.section p {
  color: var(--text);
  line-height: 1.75;
  margin: 0 0 12px;
}
.section a { color: var(--purple); text-decoration: none; }
.section a:hover { color: var(--cyan); }

/* ── Products grid ── */
.product-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.product-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color 0.1s;
}
.product-card:hover { border-color: var(--purple); }
.product-card img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
}
.product-info { flex: 1; min-width: 0; }
.product-name {
  font-family: var(--mono);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  display: block;
}
.product-desc {
  font-family: var(--mono);
  color: var(--comment);
  font-size: 13px;
  display: block;
  margin-top: 3px;
}
.product-badge {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--comment);
  border: 1px solid var(--line);
  padding: 2px 8px;
  flex-shrink: 0;
}

/* ── Error pages (404 etc.) ── */
.error-code {
  font-family: var(--mono);
  color: var(--yellow);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  margin: 0 0 32px;
}
.error-body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}
.error-body p { margin: 0 0 12px; }
.error-links {
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 14px;
}
.error-links a {
  display: block;
  color: var(--purple);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.1s;
}
.error-links a:hover { color: var(--cyan); }
.error-links a::before { content: '→ '; }

/* ── Responsive ── */
@media (max-width: 760px) {
  .header-inner { padding: 0 16px; height: auto; flex-wrap: wrap; }
  .logo { margin-right: 0; padding: 12px 0; width: 100%; }
  nav { width: 100%; overflow-x: auto; }
  .page-single, .page-post { padding: 24px 16px; }
  .post-body figure img { max-width: 150px; }
  .footer-inner { padding: 8px 16px; }
}
