: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); }

/* ── Two-column layout (home) ── */
.page {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 24px;
  flex: 1;
}

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

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

/* ── Sidebar ── */
.sidebar { display: flex; flex-direction: column; gap: 14px; }
.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; }
.identity-name {
  font-family: var(--mono);
  color: var(--cyan);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 4px 0 0;
}
.identity-sub {
  font-family: var(--mono);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}
.identity-desc {
  font-family: var(--mono);
  color: var(--comment);
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}
.email-link {
  font-family: var(--mono);
  color: var(--purple);
  font-size: 13px;
  text-decoration: none;
}
.email-link:hover { color: var(--cyan); }
.email-link::before { content: '→ '; color: var(--comment); }
.side-block {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  width: 100%;
}
.side-label {
  color: var(--comment);
  font-family: var(--mono);
  font-size: 12px;
  margin-bottom: 8px;
}
.side-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  line-height: 1.85;
}
.side-block li::before { content: '· '; color: var(--comment); }

/* ── 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: '← '; }

/* ── 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;
}

/* ── 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 { grid-template-columns: 1fr; gap: 28px; padding: 24px 16px; }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
  .page-single, .page-post { padding: 24px 16px; }
  .footer-inner { padding: 8px 16px; }
}
