/* ==========================================================================
   PLAY NEW - Article Page Styles
   ========================================================================== */

/* -------------------------------------------------------------------------
   Article Layout - Centered in Grid
   ------------------------------------------------------------------------- */

.article-wrapper {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.article-main {
  grid-column: 4 / 10;
}

/* -------------------------------------------------------------------------
   Article Header
   ------------------------------------------------------------------------- */

.article-header {
  margin-bottom: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--color-border);
}

.article-meta {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 16px;
}

.article-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 16px;
}

.article-subtitle {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

/* -------------------------------------------------------------------------
   Article Content - Monospaced
   ------------------------------------------------------------------------- */

.article-content {
  font-family: var(--font-mono);
}

/* Entry animation for article page */
.article-header {
  opacity: 0;
  transform: translateY(20px);
  animation: fade-up 0.6s ease 0.2s forwards;
}

.article-main > .article-content {
  opacity: 0;
  transform: translateY(20px);
  animation: fade-up 0.6s ease 0.4s forwards;
}

/* Skip animation for revisiting users */
.revisit .article-header,
.revisit .article-main > .article-content {
  opacity: 1;
  transform: none;
  animation: none;
}

.article-content h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.article-content h3 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  scroll-margin-top: 2rem;
}

.article-content h4 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 0;
  list-style: none;
}

.article-content ul li,
.article-content ol li {
  padding-left: 1.5em;
  position: relative;
}

.article-content ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: rgba(0, 0, 0, 0.35);
}

.article-content ol {
  counter-reset: list-counter;
}

.article-content ol li::before {
  counter-increment: list-counter;
  content: counter(list-counter) '.';
  position: absolute;
  left: 0;
  color: rgba(0, 0, 0, 0.35);
  font-size: 0.875em;
}

.article-content li {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.article-content ol ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.article-content li a {
  text-decoration: none;
}

.article-content li a:hover {
  text-decoration: underline;
}

.article-content blockquote {
  border-left: 2px solid var(--color-text);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: normal;
  color: var(--color-text);
}

.article-content strong {
  font-weight: 600;
}

.article-content .article-closing {
  margin-top: 3rem;
}

/* -------------------------------------------------------------------------
   Sharing
   ------------------------------------------------------------------------- */

.article-share {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.share-label {
  color: rgba(0, 0, 0, 0.5);
}

.share-links {
  display: flex;
  gap: 8px;
}

.share-link {
  color: var(--color-text);
  text-decoration: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.share-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
  border-color: var(--color-text);
}

/* -------------------------------------------------------------------------
   Related Articles
   ------------------------------------------------------------------------- */

.article-related {
  margin-top: 64px;
}

.related-title {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 16px;
}

.related-list {
  display: flex;
  flex-direction: column;
}

.related-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.related-item:first-child {
  border-top: 1px solid var(--color-border);
}

.related-item:hover {
  opacity: 0.6;
}

.related-item-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.related-item-title::after {
  content: '→';
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.related-item:hover .related-item-title::after {
  opacity: 1;
  transform: translateX(0);
}

.related-item-date {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.5);
}

/* -------------------------------------------------------------------------
   Article Footer / Back Link
   ------------------------------------------------------------------------- */

.article-footer {
  margin-top: 64px;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-text);
  text-decoration: none;
}

.article-back span {
  text-decoration: none;
}

.article-back:hover span {
  text-decoration: underline;
}


/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

@media (max-width: 1023px) {
  .article-main {
    grid-column: 1 / -1;
  }

  .article-header {
    margin-bottom: 40px;
    padding-bottom: 16px;
  }

  .article-title {
    font-size: clamp(2.5rem, 9vw, 3.5rem);
  }

  .article-share {
    margin-top: 40px;
  }

  .share-link {
    width: 48px;
    height: 48px;
    font-size: 1.125rem;
  }

  .article-related {
    margin-top: 48px;
  }

  .related-item {
    flex-direction: column;
    gap: 4px;
  }

  .related-item-title {
    font-size: 1rem;
  }

  .related-item-date {
    font-size: 0.8125rem;
  }

  .article-footer {
    margin-top: 48px;
  }
}

@media (max-width: 767px) {
  .article-subtitle {
    font-size: 1rem;
  }
}

