:root {
  --ink: #111827;
  --muted: #4b5563;
  --line: #d7dbe1;
  --line-soft: #e8ebf0;
  --bg: #ffffff;
  --surface: #f8f9fb;
  --surface-2: #fbfcfe;
  --blue: #374151;
  --blue-soft: #f1f5f9;
  --surface-hover: #f7f7f4;
  --surface-hover-edge: #e6e6df;
  --section-shadow: 0 10px 25px -18px rgba(15, 23, 42, 0.18);
  --page-shadow: 0 20px 50px -35px rgba(15, 23, 42, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(160% 140% at 0% 0%, #f5f7fb 0%, transparent 52%),
    radial-gradient(180% 120% at 100% 100%, #f1f5fb 0%, transparent 52%),
    var(--bg);
  line-height: 1.7;
}

.container {
  width: min(1040px, 92vw);
  margin: 0 auto;
}

.site-shell {
  min-height: 100vh;
  display: grid;
  width: min(1240px, 94vw);
  margin: 0 auto;
  grid-template-columns: clamp(190px, 22vw, 230px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  padding: 1.5rem 2.5vw 0;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 0.9rem;
  box-shadow: var(--page-shadow);
  justify-content: center;
  overflow: hidden;
}

.sidebar {
  position: sticky;
  top: 1rem;
  padding-right: 0.25rem;
  border-right: 1px solid var(--line);
  justify-self: end;
  width: 100%;
}

.sidebar .brand {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.02rem;
}

.nav-links a {
  display: block;
  padding: 0.48rem 0 0.48rem 0.65rem;
  color: #334155;
  text-decoration: none;
  font-size: 0.83rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  transition: background 180ms ease, color 180ms ease;
}

.nav-links a:hover {
  color: #0f172a;
  background: var(--surface-hover);
  border-color: var(--surface-hover-edge);
}

.nav-links a:focus-visible {
  outline: 2px solid #cbd5e1;
  outline-offset: -2px;
}

.content-shell {
  width: min(860px, 100%);
  margin: 0 0 2.5rem;
  padding: 0 0 0.2rem;
}

.content-section {
  padding: 1.2rem 1rem;
  margin: 0 0 1.1rem;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 0.75rem;
  box-shadow: var(--section-shadow);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 220ms ease;
}

.content-section:hover {
  background: var(--surface-hover);
  border-color: var(--surface-hover-edge);
  box-shadow: 0 14px 34px -24px rgba(15, 23, 42, 0.28);
}

.content-section + .content-section {
  margin-top: 0.85rem;
}

.site-footer {
  grid-column: 1 / -1;
  margin-top: 1rem;
  padding: 1rem 0 1.4rem;
  border-top: 1px solid var(--line);
  background: #ffffff;
  color: #334155;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 1.1rem;
  align-items: start;
}

.hero-photo {
  width: 180px;
  aspect-ratio: 1 / 1;
  border-radius: 0.5rem;
  object-fit: cover;
  border: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: #334155;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

h1,
h2,
h3 {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.55rem;
  font-size: clamp(2.05rem, 5vw, 2.75rem);
  line-height: 1.1;
}

h2 {
  margin: 0 0 0.95rem;
  font-size: 1.65rem;
  line-height: 1.24;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--blue-soft);
}

h3 {
  margin: 0 0 0.3rem;
  font-size: 1.14rem;
  line-height: 1.3;
}

p {
  margin: 0 0 0.8rem;
  max-width: 68ch;
}

.lead {
  color: #1e293b;
  font-size: 1.13rem;
  margin-bottom: 0.6rem;
  max-width: 58ch;
}

.meta-line,
.meta {
  font-family: "Source Code Pro", "SFMono-Regular", Menlo, monospace;
}

.meta-line {
  color: #64748b;
  margin: 0;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.meta {
  color: #64748b;
  margin-bottom: 0.2rem;
  font-size: 0.86rem;
}

.compact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.compact-list li {
  position: relative;
  padding-left: 1rem;
}

.compact-list li::before {
  content: "•";
  color: var(--blue);
  position: absolute;
  left: 0;
}

.entry {
  margin: 0;
  padding: 0 0 0.95rem;
}

.entry + .entry {
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line-soft);
}

.entry:last-child {
  padding-bottom: 0;
}

.entry p {
  margin-bottom: 0.42rem;
}

.entry a {
  color: #1f2937;
}

.feature-entry h3 a,
.text-link {
  color: #111827;
  text-decoration: underline;
  text-decoration-color: #cbd5e1;
  text-underline-offset: 0.18em;
}

.feature-entry h3 a:hover,
.text-link:hover {
  color: #374151;
  text-decoration-color: #64748b;
}

.article-shell {
  grid-template-columns: clamp(190px, 21vw, 230px) minmax(0, 940px);
}

.article-content {
  width: min(940px, 100%);
}

.article-page {
  padding: clamp(1.2rem, 3vw, 2.2rem);
  background: #fff;
}

.article-page:hover {
  background: #fff;
}

.article-page h1 {
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0;
}

.article-page code {
  padding: 0.08rem 0.28rem;
  border-radius: 0.25rem;
  background: #eef2f7;
  font-family: "Source Code Pro", "SFMono-Regular", Menlo, monospace;
  font-size: 0.9em;
}

.article-page p,
.article-list {
  max-width: 720px;
  font-size: 1rem;
}

.article-hero {
  margin-bottom: 1.2rem;
}

.subtitle {
  color: #334155;
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  line-height: 1.55;
  max-width: 720px;
  margin-bottom: 0.65rem;
}

.note-box,
.summary-box {
  border: 1px solid var(--line-soft);
  border-radius: 0.55rem;
  background: #f8fafc;
}

.note-box {
  margin: 1.2rem 0 1.7rem;
  padding: 0.9rem 1rem;
}

.note-box p {
  margin: 0;
  color: #334155;
  font-size: 0.96rem;
}

.article-section {
  margin-top: 2.25rem;
}

.article-section h2 {
  margin-top: 0;
  font-size: 1.45rem;
}

.summary-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0.95rem 0 1.1rem;
  max-width: 760px;
  overflow: hidden;
}

.summary-box div {
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid var(--line-soft);
}

.summary-box div:nth-child(odd) {
  border-right: 1px solid var(--line-soft);
}

.summary-box div:nth-last-child(-n + 1) {
  border-bottom: 0;
}

.summary-wide {
  grid-column: 1 / -1;
  border-right: 0 !important;
}

.summary-label,
.summary-value {
  display: block;
}

.summary-label {
  margin-bottom: 0.22rem;
  color: #64748b;
  font-family: "Source Code Pro", "SFMono-Regular", Menlo, monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.summary-value {
  color: #1e293b;
  font-size: 0.96rem;
  line-height: 1.45;
}

.article-figure {
  margin: 1rem 0;
  border: 1px solid var(--line-soft);
  border-radius: 0.5rem;
  background: #fff;
  overflow: hidden;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.article-figure figcaption {
  padding: 0.78rem 0.9rem;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.55;
  border-top: 1px solid var(--line-soft);
}

.compact-figure {
  max-width: 760px;
}

.contact-sheet-figure {
  max-width: 620px;
}

.article-list {
  margin: 0.2rem 0 0;
  padding-left: 1.1rem;
}

.article-list li {
  margin-bottom: 0.55rem;
}

.contact-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.contact-form label {
  display: block;
}

.contact-form input,
.contact-form textarea {
  margin-top: 0.35rem;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  padding: 0.62rem;
  font: inherit;
  font-size: 0.96rem;
  background: #fff;
}

.contact-form button {
  width: max-content;
  border: 0;
  border-radius: 0.35rem;
  background: var(--blue);
  color: #fff;
  padding: 0.65rem 1rem;
  font: inherit;
  font-weight: 700;
}

.contact-form button:hover {
  background: #1f2937;
}

.footer-inner {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.site-footer a {
  color: #374151;
}

@media (max-width: 760px) {
  .site-shell {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0.9rem 1rem 0;
  }

  .sidebar {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: 0.7rem;
    margin-bottom: 0.5rem;
  }

  .sidebar .brand {
    margin-bottom: 0.45rem;
  }

  .nav-links {
    width: 100%;
    max-width: 520px;
  }

  .nav-links a {
    border-bottom: 1px solid var(--line);
  }

  .content-shell {
    width: 100%;
    margin: 0 0 2rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .hero-photo {
    width: 160px;
    justify-self: start;
  }

  .article-page h1 {
    max-width: 100%;
  }

  .article-page {
    padding: 1rem;
  }

  .summary-box,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .summary-box div,
  .summary-box div:nth-child(odd) {
    border-right: 0;
  }

  .summary-box div:last-child {
    border-bottom: 0;
  }

  .feature-card img {
    aspect-ratio: auto;
  }
}
