@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --bg:        #e8e5de;
  --card:      #f2efe8;
  --card-2:    #ebe8e1;
  --ink:       #0f0f0f;
  --ink-soft:  #3b3b3b;
  --muted:     #8a8680;
  --rule:      #c9c5bc;
  --accent:    #c03010;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --dot-size: 0.4px;
  --dot-spacing: 8px;
  --dot-alpha: 0.12;
}
html[data-theme="dark"] {
  --bg:       #0e0e0d;
  --card:     #2e2e2e;
  --card-2:   #272727;
  --ink:      #ece8de;
  --ink-soft: #d4cfc2;
  --muted:    #a8a398;
  --rule:     #3a3a38;
  --dot-alpha: 0.16;
  --accent:   #d94218;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100vh; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(0,0,0,var(--dot-alpha)) var(--dot-size), transparent calc(var(--dot-size) + 0.4px));
  background-size: var(--dot-spacing) var(--dot-spacing);
  z-index: 0;
}
html[data-theme="dark"] body::before {
  background-image: radial-gradient(rgba(255,255,255,var(--dot-alpha)) var(--dot-size), transparent calc(var(--dot-size) + 0.4px));
}

/* ---- Header ---- */
header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px;
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.header-left { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent);
  display: grid; place-items: center;
  color: #fff; font-family: var(--serif); font-size: 18px; font-style: italic; line-height: 1;
  flex-shrink: 0;
}
.header-name { font-weight: 700; letter-spacing: .02em; font-size: 13px; }
.header-role { font-size: 11px; color: var(--muted); margin-left: 6px; }
.header-right { display: flex; align-items: center; gap: 14px; }
.header-clock { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.header-btn {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-family: var(--mono); color: var(--muted);
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--rule);
  background: transparent; cursor: pointer;
  letter-spacing: .06em; font-weight: 600;
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.header-btn:hover { color: var(--ink); border-color: var(--ink); }

/* ---- Hero banner ---- */
.hero-banner {
  position: relative; z-index: 1;
  padding: 72px 40px 64px;
}
.hero-eyebrow {
  font-size: 10px; letter-spacing: .14em; font-weight: 700;
  opacity: 0.6; margin-bottom: 16px;
  text-transform: uppercase;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(40px, 7vw, 72px);
  font-style: italic;
  line-height: 1.02;
  letter-spacing: -.02em;
  margin-bottom: 24px;
  max-width: 700px;
}
.hero-desc {
  font-size: 15px; line-height: 1.6;
  opacity: 0.75; max-width: 560px;
  margin-bottom: 28px;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 10px; letter-spacing: .06em; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid currentColor;
  opacity: 0.65;
}

/* ---- Page layout ---- */
.page {
  position: relative; z-index: 1;
  max-width: 1020px;
  margin: 0 auto;
  padding: 60px 40px 100px;
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 60px;
  align-items: start;
}

/* ---- Main content ---- */
.main section { margin-bottom: 52px; }
.section-label {
  font-size: 10px; letter-spacing: .14em; font-weight: 700;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 16px;
}
.main h2 {
  font-family: var(--serif);
  font-size: 28px; font-style: italic;
  line-height: 1.15; letter-spacing: -.01em;
  margin-bottom: 16px;
}
.main p { color: var(--ink-soft); margin-bottom: 16px; line-height: 1.75; }
.main ul, .main ol {
  color: var(--ink-soft);
  padding-left: 20px;
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 16px;
}
.main li { line-height: 1.65; }
.main hr { border: none; border-top: 1px solid var(--rule); margin: 40px 0; }
.main blockquote {
  border-left: 3px solid var(--accent);
  padding: 14px 20px;
  margin: 28px 0;
  font-family: var(--serif);
  font-size: 20px; font-style: italic;
  color: var(--ink-soft);
}

/* ---- Image ---- */
.cs-img { width: 100%; border-radius: 14px; display: block; margin: 28px 0; }
.cs-img-caption { font-size: 11px; color: var(--muted); text-align: center; margin-top: -20px; margin-bottom: 28px; }
.cs-img-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0; }
.cs-img-grid img { width: 100%; border-radius: 10px; display: block; }

/* ---- Placeholder (fill-in areas) ---- */
.placeholder {
  border: 1.5px dashed var(--rule);
  border-radius: 12px;
  padding: 32px 24px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  margin-bottom: 16px;
}

/* ---- Sidebar ---- */
.sidebar { position: sticky; top: 88px; }
.meta-card {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  display: flex; flex-direction: column; gap: 20px;
}
.meta-item {}
.meta-label {
  font-size: 9px; letter-spacing: .14em; font-weight: 700;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 6px;
}
.meta-value { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.meta-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.meta-tag {
  font-size: 10px; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--ink-soft); background: var(--card-2);
}

/* ---- Next/prev nav ---- */
.cs-nav {
  position: relative; z-index: 1;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px 40px;
  gap: 16px;
}
.cs-nav a {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .08em; font-weight: 600;
  color: var(--muted); text-decoration: none;
  transition: color .15s;
}
.cs-nav a:hover { color: var(--ink); }
.cs-nav-label { font-size: 12px; color: var(--ink); font-weight: 600; margin-top: 2px; }

@media (max-width: 700px) {
  header { padding: 16px 20px; }
  .hero-banner { padding: 48px 20px 40px; }
  .page { grid-template-columns: 1fr; padding: 36px 20px 60px; gap: 40px; }
  .sidebar { position: static; }
  .cs-nav { padding: 24px 20px; }
  .cs-img-grid { grid-template-columns: 1fr; }
}
