/* ===================================
   Articles Section — Custom Styles
   =================================== */

.articles {
  position: relative;
  padding: 10vw 0 14.81vw;
}

.articles__inner {
  position: relative;
  width: 91.6666666667vw;
  margin: 0 auto;
}

/* --- Article list --- */
.articles__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 48px;
}

.article-card {
  display: flex;
  align-items: baseline;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
  transition: background 0.3s;
}

.article-card:first-child {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.article-card:hover {
  background: rgba(0, 0, 0, 0.015);
}

.article-card__date {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 400;
  color: #a1a1aa;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  font-family: 'Inter', sans-serif !important;
  min-width: 100px;
}

.article-card__body {
  flex: 1;
  min-width: 0;
}

.article-card__title {
  font-size: 17px;
  font-weight: 600;
  color: #18181b;
  margin: 0 0 6px;
  line-height: 1.5;
}

.article-card__desc {
  font-size: 13px;
  color: #71717a;
  margin: 0;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__arrow {
  flex-shrink: 0;
  font-size: 14px;
  color: #a1a1aa;
  transition: color 0.3s, transform 0.3s;
  font-family: 'Inter', sans-serif !important;
}

.article-card:hover .article-card__arrow {
  color: #18181b;
  transform: translateX(4px);
}

/* ===================================
   Scroll-triggered animation states
   =================================== */

.article-text-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.33, 1, 0.68, 1),
              transform 0.7s cubic-bezier(0.33, 1, 0.68, 1);
}

.articles--visible .article-text-reveal {
  opacity: 1;
  transform: translateY(0);
}

.articles--visible .article-text-reveal:nth-child(1) { transition-delay: 0s; }
.articles--visible .article-text-reveal:nth-child(2) { transition-delay: 0.08s; }
.articles--visible .article-text-reveal:nth-child(3) { transition-delay: 0.16s; }
.articles--visible .article-text-reveal:nth-child(4) { transition-delay: 0.24s; }
.articles--visible .article-text-reveal:nth-child(5) { transition-delay: 0.32s; }

/* ===================================
   Article Detail Page
   =================================== */

.article-page {
  max-width: 1150px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.article-page__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #71717a;
  text-decoration: none;
  letter-spacing: 0.04em;
  margin-bottom: 48px;
  transition: color 0.3s;
  font-family: 'Inter', sans-serif;
}

.article-page__back:hover {
  color: #18181b;
}

.article-page__date {
  font-size: 13px;
  color: #a1a1aa;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  font-family: 'Inter', sans-serif;
  margin: 0 0 12px;
}

.article-page__title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  color: #18181b;
  line-height: 1.4;
  margin: 0 0 48px;
  letter-spacing: -0.01em;
}

/* --- Article body typography --- */
.article-page__body {
  font-size: 16px;
  line-height: 1.9;
  color: #3f3f46;
}

.article-page__body h2 {
  font-size: 1.4em;
  font-weight: 600;
  color: #18181b;
  margin: 2.5em 0 0.8em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.article-page__body h3 {
  font-size: 1.15em;
  font-weight: 600;
  color: #18181b;
  margin: 2em 0 0.6em;
}

.article-page__body h4,
.article-page__body h5,
.article-page__body h6 {
  font-size: 1em;
  font-weight: 600;
  color: #18181b;
  margin: 1.5em 0 0.5em;
}

.article-page__body p {
  margin: 0 0 1.5em;
}

.article-page__body ul,
.article-page__body ol {
  margin: 0 0 1.5em;
  padding-left: 1.5em;
}

.article-page__body li {
  margin-bottom: 0.4em;
}

.article-page__body blockquote {
  margin: 1.5em 0;
  padding: 1em 1.5em;
  border-left: 3px solid #e4e4e7;
  color: #71717a;
  background: rgba(0, 0, 0, 0.015);
}

.article-page__body blockquote p {
  margin: 0;
}

.article-page__body code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875em;
  background: rgba(0, 0, 0, 0.04);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.article-page__body pre {
  margin: 1.5em 0;
  padding: 1.2em 1.5em;
  background: #1e1e2e;
  color: #cdd6f4;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.875em;
  line-height: 1.6;
}

.article-page__body pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
  font-size: inherit;
}

.article-page__body a {
  color: #18181b;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s;
}

.article-page__body a:hover {
  color: #52525b;
}

.article-page__body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1.5em 0;
}

.article-page__body hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 2.5em 0;
}

/* --- Footer link --- */
.article-page__footer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center;
}

.article-page__footer a {
  font-size: 14px;
  font-weight: 500;
  color: #71717a;
  text-decoration: none;
  transition: color 0.3s;
  font-family: 'Inter', sans-serif;
}

.article-page__footer a:hover {
  color: #18181b;
}

/* ===================================
   Responsive: 768px and below
   =================================== */
@media screen and (max-width: 768px) {
  .article-card {
    flex-direction: column;
    gap: 8px;
    padding: 20px 0;
  }

  .article-card__date {
    min-width: auto;
  }

  .article-card__arrow {
    display: none;
  }

  .article-page {
    padding: 100px 20px 60px;
  }

  .article-page__body {
    font-size: 15px;
  }

  .article-page__body pre {
    padding: 1em;
    font-size: 0.8em;
  }
}
