.article-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: clamp(24px, 4vw, 40px);
  max-width: 1080px;
}

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

.article-head {
  display: grid;
  justify-items: start;
  gap: 12px;
  max-width: 52rem;
  margin: 0 auto clamp(24px, 4vw, 36px);
  padding-left: clamp(16px, 2.4vw, 24px);
  border-left: 4px solid var(--brand-primary);
  text-align: left;
}

.article-head h1 {
  max-width: 16em;
  margin: 0;
  color: var(--brand-primary);
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.006em;
  text-wrap: balance;
}

.article-head .date {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--text-muted);
  background: transparent;
  font-size: var(--font-size-xs);
  font-weight: 500;
}

.article-cover {
  max-width: 52rem;
  margin: 0 auto clamp(32px, 5vw, 48px);
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-soft);
}

.article-cover figcaption {
  margin-top: 10px;
  color: var(--text-subtle);
  font-size: var(--font-size-xs);
  text-align: center;
}

.article-body {
  max-width: 42rem;
  margin: 0 auto;
  color: var(--text-main);
  font-family: var(--font-reading);
  font-size: var(--font-size-reading);
  line-height: var(--line-height-reading);
  letter-spacing: 0.012em;
  overflow-wrap: anywhere;
}

.article-body p {
  margin: 0 0 1.3em;
  text-wrap: pretty;
}

.article-body h2,
.article-body h3 {
  margin: 2.2em 0 0.8em;
  color: var(--brand-primary);
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
}

.article-body h2 {
  font-size: 1.35rem;
}

.article-body h3 {
  font-size: 1.12rem;
}

.article-body blockquote {
  margin: 1.8em 0;
  padding: 16px 18px;
  border-left: 4px solid var(--brand-primary);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: var(--surface-muted);
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

.article-toc {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  padding: 16px;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-medium);
  background: var(--surface-muted);
}

.article-toc h3 {
  margin: 0 0 10px;
  color: var(--brand-primary);
  font-size: var(--font-size-sm);
}

.article-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-toc li {
  margin: 0;
}

.article-toc a {
  display: block;
  padding: 5px 0;
  color: var(--brand-primary);
  font-size: var(--font-size-sm);
  text-decoration: none;
}

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  width: 100%;
  height: 3px;
  background: var(--border-color);
}

.reading-progress-inner {
  width: 0;
  height: 100%;
  display: block;
  background: var(--brand-primary);
}

@media (max-width: 860px) {
  .article-main {
    display: block;
  }

  .article-toc {
    position: static;
    max-height: none;
    margin-bottom: 24px;
  }
}

@media (max-width: 600px) {
  .article-head {
    padding-left: 14px;
    border-left-width: 3px;
  }

  .article-head h1 {
    font-size: clamp(1.75rem, 8vw, 2.15rem);
  }

  .article-cover {
    margin-right: -4px;
    margin-left: -4px;
  }

  .article-cover img {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-medium);
  }

  .article-body {
    line-height: 1.8;
  }
}
