.article-detail {
  color-scheme: light;
  color: #000015;
  background: #fff;
  --article-jump-height: 56px;
}

.article-detail > .projects-directory__inner {
  padding: 20px clamp(24px, 4.12vw, 78px) 56px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(290px, 1fr);
  align-items: start;
  gap: clamp(32px, 3.4vw, 64px);
  margin-top: 14px;
}

.article-content { min-width: 0; }

.article-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 0;
  color: #48585c;
  font-size: 14px;
}

.article-meta__category {
  padding: 5px 14px;
  border-radius: 18px;
  color: #003442;
  background: #e0ebed;
}

.article-meta__date::before {
  margin-right: 12px;
  color: #3a737c;
  content: "·";
}

.article-meta__time, .article-related small {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-meta__time svg, .article-related small svg {
  flex: none;
  color: #3a737c;
}

.article-author { display: flex; align-items: center; gap: 18px; margin: 18px 0 22px; }
.article-author__avatar { flex: 0 0 72px; width: 72px; height: 72px; overflow: hidden; border-radius: 50%; background: #e0ebed; }
.article-author__avatar img { width: 100%; height: 100%; object-fit: cover; }
.article-author__name { margin: 0; color: #3a737c; font-size: 16px; font-weight: 600; }
.article-author__name a:hover { text-decoration: underline; text-underline-offset: 4px; }
.article-author__role { margin: 4px 0 0; color: #48585c; font-size: 14px; }

.article-title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(46px, 3.12vw, 62px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.article-lead {
  max-width: 95ch;
  margin: 20px 0 24px;
  font-size: clamp(17px, 1.14vw, 20px);
  line-height: 1.47;
}

.article-cover {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 5.75;
  border-radius: 12px;
  background: #003442;
}

.article-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 29%; }

.article-jump {
  position: sticky;
  top: var(--header-height);
  z-index: 4;
  display: flex;
  min-height: var(--article-jump-height);
  margin-top: 12px;
  border-bottom: 1px solid #d9e1e3;
  background: #fff;
  overflow-x: auto;
  scrollbar-width: thin;
}

.article-jump ol, .article-toc ol, .article-related ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-jump ol {
  display: flex;
  gap: clamp(12px, 2.3vw, 44px);
  width: max-content;
}

.article-jump li { display: flex; }
.article-jump a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 2px 14px 0;
  border-bottom: 3px solid transparent;
  font-size: 15px;
  white-space: nowrap;
}

.article-jump a[aria-current] {
  border-bottom-color: #3a737c;
  color: #003442;
  font-weight: 600;
}

.article-jump a:hover, .article-toc a:hover { color: #3a737c; }
.article-jump a:focus-visible { outline-offset: -3px; }

.article-section {
  max-width: 80ch;
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid #d9e1e3;
  scroll-margin-top: var(--article-jump-height);
}

.article-section:first-of-type { margin-top: 0; border-top: 0; }

.article-section h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 1.8vw, 34px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.article-section p, .article-section ul, .article-section ol {
  margin: 0 0 16px;
  font-size: clamp(16px, 1.02vw, 18px);
  line-height: 1.55;
}

.article-section ul, .article-section ol { padding-left: 24px; }
.article-section li + li { margin-top: 8px; }
.article-section > :last-child { margin-bottom: 0; }

.article-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 28px;
  color: #3a737c;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  display: grid;
  gap: 16px;
  min-width: 0;
  max-height: calc(100dvh - var(--header-height) - 32px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.article-sidebar > * {
  padding: 20px clamp(18px, 1.85vw, 32px);
  border-radius: 10px;
  background: linear-gradient(120deg, #f2f7f8, #e0ebed);
}

.article-sidebar__offer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(120deg, #f2f7f8 16%, #d4e7ea 100%);
}

.article-sidebar__offer::before {
  position: absolute;
  z-index: -1;
  inset: 12% 0 0 50%;
  background: repeating-radial-gradient(ellipse at 100% 100%, transparent 0 10px, rgb(255 255 255 / 34%) 11px 12px), linear-gradient(135deg, transparent 12%, #629ba3);
  mask-image: linear-gradient(135deg, transparent 20%, #000 80%);
  content: "";
}

.article-sidebar__offer h2 {
  max-width: 12ch;
  margin: 0;
  font: 500 clamp(34px, 2.2vw, 40px) / 0.98 "Cormorant Garamond", Georgia, serif;
  letter-spacing: -0.02em;
}

.article-sidebar__offer p { max-width: 29ch; margin: 10px 0 14px; font-size: 15px; line-height: 1.4; }

.article-sidebar__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 48px;
  width: min(100%, 275px);
  padding: 8px 14px;
  border-radius: 8px;
  color: #fff;
  background: #3a737c;
  font-size: 17px;
  font-weight: 500;
}

.article-sidebar__cta img { flex: none; filter: brightness(0) invert(1); }
.article-sidebar__cta:hover { background: #305f66; }

.article-toc h2, .article-related h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.article-toc h2 { color: #305f66; }

.article-toc a {
  display: block;
  padding: 5px 0 5px 16px;
  border-left: 3px solid transparent;
  font-size: 14px;
  line-height: 1.45;
}

.article-toc a[aria-current] { border-left-color: #3a737c; color: #305f66; font-weight: 600; }

.article-related li + li { margin-top: 12px; padding-top: 12px; border-top: 1px solid #d9e1e3; }

.article-related a {
  display: grid;
  grid-template-columns: minmax(72px, 27%) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.article-related a:hover strong { color: #3a737c; text-decoration: underline; text-underline-offset: 3px; }
.article-related a > img { width: 100%; height: auto; aspect-ratio: 108 / 74; object-fit: cover; border-radius: 8px; }
.article-related strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.32; }
.article-related small { flex-wrap: wrap; margin-top: 6px; color: #48585c; font-size: 12px; }

.article-share { position: relative; flex: none; }
.article-share [hidden] { display: none; }
.article-share__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  color: #3a737c;
  font-size: 14px;
  line-height: 24px;
}
.article-share__trigger img { flex: none; }
.article-share__trigger:disabled { cursor: wait; }
.article-share__trigger:hover, .article-share__trigger[aria-expanded="true"] { border-color: #629ba3; background: #f2f7f8; }
.article-share__panel {
  position: absolute;
  z-index: 5;
  top: calc(100% + 10px);
  right: 0;
  width: min(296px, calc(100vw - 40px));
  padding: 16px;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(0 52 66 / 12%);
  overflow-y: auto;
}
.article-share__panel.is-above { top: auto; bottom: calc(100% + 10px); }
.article-share__panel h2 { margin: 0 0 12px; color: #626b6e; font-size: 14px; font-weight: 400; line-height: 22px; }
.article-share__note { margin: 0; color: #475569; font-size: 14px; line-height: 22px; }
.article-share__links { display: grid; gap: 4px; }
.article-share__links a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgb(0 0 0 / 18%);
  border-radius: 4px;
  font-size: 14px;
  line-height: 22px;
  text-align: left;
}
.article-share__links a { border-color: transparent; }
.article-share__links a:hover { border-color: #629ba3; background: #f2f7f8; }

.article-detail :focus-visible { outline-color: #3a737c; }

@media (prefers-reduced-motion: no-preference) {
  html:has(.article-detail-page) { scroll-behavior: smooth; }
}

@media (max-width: 1023px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-sidebar { position: relative; z-index: 5; max-height: none; overflow: visible; }
  .article-sidebar__cta { position: fixed; z-index: 5; right: 24px; bottom: max(16px, env(safe-area-inset-bottom)); box-shadow: 0 4px 16px rgb(0 52 66 / 20%); }
  .article-detail-page .site-footer__inner { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
}

@media (max-width: 639px) {
  .article-detail { --article-jump-height: 50px; }
  .article-detail > .projects-directory__inner { padding: 20px var(--mobile-gutter) 40px; }
  .article-meta { gap: 4px 8px; font-size: 13px; }
  .article-meta__date::before { margin-right: 6px; }
  .article-meta__category { padding-inline: 10px; }
  .article-share__trigger { width: 44px; padding: 8px; }
  .article-share__trigger span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .article-author { gap: 12px; margin: 18px 0 20px; }
  .article-author__avatar { flex-basis: 56px; width: 56px; height: 56px; }
  .article-title { font-size: clamp(37px, 8.8vw, 52px); text-wrap: wrap; }
  .article-lead { margin-block: 16px 20px; }
  .article-cover { aspect-ratio: 2.7; }
  .article-jump ol { gap: 12px; }
  .article-jump a { padding-inline: 6px; font-size: 14px; }
  .article-sidebar__cta { inset-inline: var(--mobile-gutter); width: auto; }
}
