:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #f4f6f9;
  --card: #ffffff;
  --accent: var(--site-accent, #1b4f72);
  --accent-fg: #ffffff;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --radius: 16px;
  --max: 74rem;
  --ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 420px at 8% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
img { max-width: 100%; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus {
  left: 1rem; top: 1rem; z-index: 40;
  background: #fff; padding: .55rem .9rem; border-radius: 10px;
  box-shadow: var(--shadow);
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.35rem; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, #fff 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.header-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
  min-height: 4.35rem; position: relative;
}
.brand {
  text-decoration: none; color: inherit;
  display: flex; align-items: center; gap: .75rem; min-width: 0;
}
.brand-logo { height: 48px; width: auto; max-width: 220px; object-fit: contain; }
.brand-logo.solo { height: 56px; max-width: 240px; }
.brand-name { font-size: 1.05rem; letter-spacing: -.03em; margin: 0; font-weight: 750; }
.brand-tag { display: none; margin: .1rem 0 0; color: var(--muted); font-size: .78rem; font-weight: 500; }
@media (min-width: 720px) {
  .brand-tag { display: block; }
}
.nav-check { position: absolute; opacity: 0; width: 0; height: 0; }
.nav-burger {
  display: none; width: 42px; height: 42px; border-radius: 11px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  align-items: center; justify-content: center; flex-shrink: 0; margin-left: auto;
}
.nav-burger span, .nav-burger span::before, .nav-burger span::after {
  display: block; width: 16px; height: 1.5px; background: var(--ink); border-radius: 2px; position: relative;
}
.nav-burger span::before, .nav-burger span::after {
  content: ""; position: absolute; left: 0;
}
.nav-burger span::before { top: -5px; }
.nav-burger span::after { top: 5px; }
.nav-main {
  display: flex; flex-wrap: wrap; gap: .2rem; padding: 0; margin: 0; list-style: none;
}
.nav-main a {
  color: #334155; text-decoration: none; font-size: .875rem; font-weight: 600;
  padding: .42rem .72rem; border-radius: 999px;
}
.nav-main a:hover { background: color-mix(in srgb, var(--accent) 8%, #fff); color: var(--accent); }
.nav-main a[aria-current="page"] {
  background: var(--accent); color: var(--accent-fg);
}
@media (max-width: 1080px) {
  .nav-burger { display: inline-flex; }
  .header-bar nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: .7rem 1.35rem 1rem; box-shadow: var(--shadow);
  }
  .nav-check:checked ~ nav { display: block; }
  .nav-main { flex-direction: column; }
  .nav-main a { display: block; }
}

.crumbs {
  display: flex; flex-wrap: wrap; gap: .35rem .15rem; padding: 0;
  margin: 1.15rem 0 0; list-style: none;
  font-size: .8rem; color: var(--muted); font-weight: 500;
}
.crumbs li { display: flex; align-items: center; }
.crumbs li:not(:last-child)::after {
  content: "/"; margin: 0 .45rem; color: #cbd5e1; font-weight: 500;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 17.5rem;
  gap: 2.6rem; padding: 1.6rem 0 4.2rem; align-items: start;
}
.layout.sidebar-left { grid-template-columns: 17.5rem minmax(0, 1fr); }
.layout.sidebar-left > .aside { order: -1; }
.layout.layout-full { grid-template-columns: minmax(0, 46rem); }
@media (max-width: 900px) {
  .layout, .layout.sidebar-left, .layout.layout-full { grid-template-columns: 1fr; }
  .layout.sidebar-left > .aside { order: 0; }
}

.hero {
  margin: 0 0 2rem;
  padding: 1.5rem 1.6rem 1.65rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}
.eyebrow {
  margin: 0 0 .45rem; font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.hero h1 { margin: 0; font-size: clamp(1.7rem, 3.4vw, 2.35rem); letter-spacing: -.045em; line-height: 1.15; }
.lede { font-size: 1.12rem; max-width: 40rem; color: #475569; margin: .7rem 0 0; }
.lede a { font-weight: 600; text-decoration: none; }
.lede a:hover { text-decoration: underline; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin: 0 0 1rem;
}
.section-head h2 { margin: 0; font-size: 1.05rem; letter-spacing: -.02em; }

.post-list { display: grid; gap: 1rem; }
.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.post-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  box-shadow: var(--shadow);
}
.post-card .card-body { padding: 1.05rem 1.15rem 1.15rem; }
.post-card h2 { margin: 0 0 .35rem; font-size: 1.18rem; line-height: 1.3; letter-spacing: -.025em; }
.post-card h2 a, .related a { color: inherit; text-decoration: none; }
.post-card h2 a:hover { color: var(--accent); }
.post-card .excerpt { margin: 0; color: #475569; font-size: .95rem; }
.read-more {
  display: inline-flex; align-items: center; gap: .3rem;
  margin-top: .75rem; font-size: .82rem; font-weight: 700; text-decoration: none;
}
.read-more::after { content: "→"; }
.meta { font-size: .78rem; color: var(--muted); font-weight: 500; margin: 0 0 .45rem; }
.meta a { color: var(--accent); text-decoration: none; font-weight: 650; }
.card-cover { display: block; background: #e8eef4; }
.card-cover img {
  width: 100%; height: 180px; object-fit: cover; display: block;
}
.post-card.featured .card-cover img { height: 240px; }
@media (min-width: 720px) {
  .post-card.has-cover {
    display: grid; grid-template-columns: 13.5rem 1fr; align-items: stretch;
  }
  .post-card.has-cover .card-cover img { height: 100%; min-height: 160px; }
  .post-card.featured.has-cover { display: block; }
  .post-card.featured .card-cover img { height: 280px; }
  .post-card.featured h2 { font-size: 1.45rem; }
}

.article { max-width: 44rem; }
.article h1 { font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.18; letter-spacing: -.04em; margin: 0 0 .65rem; }
.article .body { font-size: 1.0625rem; line-height: 1.75; color: #1e293b; }
.article .body p { margin: 0 0 1.05rem; }
.article .body h2 { font-size: 1.28rem; letter-spacing: -.02em; margin: 1.9rem 0 .55rem; }
.article .body a { text-underline-offset: 3px; }
.toc {
  background: color-mix(in srgb, var(--accent) 5%, #fff);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 1rem 1.15rem; margin: 1.2rem 0 1.5rem;
}
.toc h2 { font-size: .72rem; margin: 0 0 .5rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.toc ol { margin: 0; padding-left: 1.15rem; }
.toc a { text-decoration: none; font-weight: 600; font-size: .92rem; }
.toc a:hover { text-decoration: underline; }
.related { margin-top: 2.2rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.related h2 { font-size: 1rem; margin: 0 0 .7rem; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.related li a { font-weight: 650; text-decoration: none; }
.related li a:hover { text-decoration: underline; }

.aside { position: sticky; top: 5.2rem; }
@media (max-width: 900px) {
  .aside { position: static; }
}
.aside .box {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.05rem 1.1rem; margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.aside h2 {
  font-size: .7rem; margin: 0 0 .7rem; text-transform: uppercase;
  letter-spacing: .12em; color: var(--muted); font-weight: 750;
}
.aside ul { margin: 0; padding-left: 1.05rem; }
.aside .box ul:not(.tag-cloud):not(.recent) a { text-decoration: none; font-weight: 600; color: var(--ink); }
.aside .box ul:not(.tag-cloud):not(.recent) a:hover { color: var(--accent); }
.aside .recent { padding-left: 0; list-style: none; }
.aside .recent li { margin: 0 0 .65rem; font-size: .9rem; line-height: 1.35; }
.aside .recent a { color: inherit; text-decoration: none; font-weight: 600; }
.aside .recent a:hover { color: var(--accent); }
.tag-cloud { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tag-cloud a, .tags a {
  font-size: .75rem; font-weight: 650; text-decoration: none;
  border: 1px solid var(--line); background: var(--paper);
  color: #334155; padding: .22rem .6rem; border-radius: 999px;
}
.tag-cloud a:hover, .tags a:hover { border-color: var(--accent); color: var(--accent); background: #fff; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: .55rem 0 1rem; }

.article .body .inline-img { float: right; width: min(220px, 42%); margin: .15rem 0 1rem 1rem; }
.article .body .inline-img img {
  width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--line); background: #fff;
}
.article .body .inline-img figcaption { font-size: .72rem; color: var(--muted); margin-top: .35rem; line-height: 1.35; }
@media (max-width: 640px) {
  .article .body .inline-img { float: none; width: min(280px, 100%); margin: 0 0 1rem; }
}
.article .body::after { content: ""; display: block; clear: both; }

.cover { margin: 0 0 1.4rem; }
.cover img {
  width: 100%; height: auto; max-height: 420px; object-fit: cover; display: block;
  border-radius: 18px; border: 1px solid var(--line);
}
.byline {
  display: flex; gap: .95rem; align-items: flex-start;
  margin: 2rem 0 0; padding: 1.1rem 1.15rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: .92rem;
}
.byline img { width: 56px; height: 56px; object-fit: cover; border-radius: 50%; }
.byline-name { margin: 0 0 .25rem; font-weight: 750; }
.byline-name a { color: inherit; text-decoration: none; }
.byline-name a:hover { color: var(--accent); }
.faq { margin: 2rem 0 0; }
.faq h2 { font-size: 1.15rem; margin: 0 0 .7rem; }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: .15rem 1rem; margin-bottom: .5rem;
}
.faq summary { cursor: pointer; font-weight: 650; padding: .7rem 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--muted); font-weight: 500; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 .9rem; color: #475569; }
.author-head {
  display: flex; gap: 1.1rem; align-items: flex-start; margin: 0 0 1.4rem;
  padding: 1.2rem 1.25rem; background: var(--card); border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px); box-shadow: var(--shadow);
}
.author-head h1 { margin: 0; font-size: 1.7rem; letter-spacing: -.03em; }
.author-avatar { width: 84px; height: 84px; object-fit: cover; border-radius: 50%; }

.page-head { margin: 0 0 1.25rem; }
.page-head h1 { margin: 0 0 .35rem; font-size: clamp(1.55rem, 2.6vw, 2rem); letter-spacing: -.035em; }
.contact-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.05rem 1.2rem; margin: 0 0 1.4rem;
  display: grid; grid-template-columns: 6.2rem 1fr; gap: .4rem .9rem; font-size: .92rem;
}
.contact-card dt { color: var(--muted); margin: 0; font-weight: 650; }
.contact-card dd { margin: 0; }
.pager { display: flex; gap: .6rem; margin-top: 1.6rem; }
.pager a {
  display: inline-flex; padding: .5rem .9rem; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; text-decoration: none; font-weight: 650; font-size: .88rem;
}
.pager a:hover { border-color: var(--accent); }
.empty { color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--line); background: #fff;
  padding: 2rem 0 2.4rem; font-size: .88rem; color: var(--muted);
}
.footer-grid { display: grid; gap: 1.4rem; }
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr; align-items: start; }
}
.nav-foot { display: flex; flex-wrap: wrap; gap: .35rem 1rem; list-style: none; margin: 0; padding: 0; }
.nav-foot a { color: #334155; text-decoration: none; font-weight: 600; }
.nav-foot a:hover { color: var(--accent); }
.foot-contact a { color: var(--accent); text-decoration: none; font-weight: 600; }
.footer-copy { margin: .8rem 0 0; }
.not-found { padding: 2rem 0 4rem; max-width: 40rem; }
.not-found .btn-home {
  display: inline-flex; margin: 1rem 0 1.6rem; padding: .55rem 1rem;
  background: var(--accent); color: #fff; border-radius: 999px; text-decoration: none; font-weight: 700;
}
