:root {
  --bg: #0a0a0b;
  --surface: #141415;
  --surface-2: #1a1a1c;
  --border: #232326;
  --border-light: #2c2c30;
  --text: #ededef;
  --text-2: #a0a0a8;
  --text-3: #65656d;
  --accent: #5e6ad2;
  --accent-h: #7b84e0;
  --radius: 8px;
  --max-w: 720px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-h); }
img { max-width: 100%; height: auto; }

/* layout */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.wide { --max-w: 960px; }

/* nav */
.nav {
  display: flex; align-items: center; gap: 2px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.nav a {
  color: var(--text-2); font-size: 13px; font-weight: 500;
  padding: 6px 12px; border-radius: 6px;
  transition: color .15s, background .15s;
}
.nav a:hover, .nav a.active { color: var(--text); background: var(--surface-2); }
.nav .spacer { flex: 1; }
.nav .brand { color: var(--text); font-weight: 700; font-size: 14px; letter-spacing: -0.02em; margin-right: 16px; }

/* hero */
.hero { text-align: center; padding: 48px 0 40px; }
.hero h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 6px; }
.hero h1 a { color: var(--text); }
.hero h1 a:hover { color: var(--accent); }
.hero p { color: var(--text-3); font-size: 14px; }

/* section headings */
.sh { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

/* molecule / post list */
.item {
  display: grid; grid-template-columns: 140px 1fr; gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.item:last-child { border-bottom: none; }
.item-img {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  padding: 12px; min-height: 100px;
}
.item-img img { max-height: 80px; width: auto; }
.item h2 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.item h2 a { color: var(--text); }
.item h2 a:hover { color: var(--accent); }
.item p { color: var(--text-2); font-size: 13px; line-height: 1.6; }
.item .meta { color: var(--text-3); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.item .meta a { color: var(--text-3); }
.item .more { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 600; }

/* card grid */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 24px 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color .15s, background .15s;
  display: block; color: var(--text);
}
.card:hover { border-color: var(--border-light); background: var(--surface-2); color: var(--text); }
.card h3 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.card p { color: var(--text-2); font-size: 13px; }

/* blog article list (no image) */
.post-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.post-item:last-child { border-bottom: none; }
.post-item h2 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.post-item h2 a { color: var(--text); }
.post-item h2 a:hover { color: var(--accent); }
.post-item .meta { color: var(--text-3); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.post-item .meta a { color: var(--text-3); }
.post-item .excerpt { color: var(--text-2); font-size: 13px; margin-top: 6px; }
.post-item .more { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600; }

/* single post / molecule detail */
.article { padding: 40px 0 20px; }
.article h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.article .meta { color: var(--text-3); font-size: 12px; margin-bottom: 24px; }
.article .meta a { color: var(--text-3); }

/* prose content */
.prose h2 { font-size: 18px; font-weight: 600; margin: 28px 0 12px; color: var(--text); }
.prose h3 { font-size: 15px; font-weight: 600; margin: 20px 0 8px; color: var(--text); }
.prose p { color: var(--text-2); margin-bottom: 14px; font-size: 14px; line-height: 1.7; }
.prose ul, .prose ol { color: var(--text-2); font-size: 14px; padding-left: 20px; margin-bottom: 14px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--accent); }

/* molecule detail */
.mol-img {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin: 24px auto;
  max-width: 400px;
}
.mol-img img { max-height: 200px; }
.detail-section { margin-bottom: 24px; }
.detail-section h2 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.detail-section p { font-size: 14px; color: var(--text-2); }
.detail-section span { color: var(--text); font-weight: 600; }
.links { list-style: none; padding: 0; }
.links li { margin-bottom: 4px; }
.links a { font-size: 13px; word-break: break-all; }

/* pagination */
.pg { display: flex; align-items: center; gap: 8px; padding: 20px 0; margin-top: 8px; }
.pg span { color: var(--text-3); font-size: 13px; }
.pg a {
  display: inline-block; padding: 6px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--text-2);
}
.pg a:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-light); }

/* footer */
.footer {
  margin-top: 48px; padding: 20px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px; color: var(--text-3);
}
.footer a { color: var(--text-3); }
.footer .comment-note { margin-bottom: 12px; font-size: 12px; color: var(--text-3); }
.footer .comment-note a { color: var(--accent); }

/* about / contact */
.page-content { padding: 40px 0 20px; }
.page-content h1 { font-size: 24px; font-weight: 700; margin-bottom: 20px; letter-spacing: -0.02em; }
.page-content h2 { font-size: 17px; font-weight: 600; margin: 24px 0 10px; }
.page-content p { color: var(--text-2); font-size: 14px; margin-bottom: 12px; line-height: 1.7; }
.page-content ul { color: var(--text-2); font-size: 14px; padding-left: 20px; margin-bottom: 14px; }
.page-content li { margin-bottom: 6px; }

/* form */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 4px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: 14px;
  font-family: inherit;
  transition: border-color .15s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.btn-submit {
  display: inline-block; padding: 10px 20px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 600;
  border: none; border-radius: 6px; cursor: pointer;
  transition: background .15s;
}
.btn-submit:hover { background: var(--accent-h); }
