/* Article Page Styles
   Styles for article pages (kubernetes.html, ai.html, etc.)
*/

main {
  padding: 40px 0;
}

/* ===== PAGE HEADER ===== */

.page-header {
  width: 100%;
  max-width: 800px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-strong);
  opacity: 0;
  animation: fadeUp 0.8s ease-out 0.2s forwards;
}

.page-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 36px;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--ink-dim);
  font-style: italic;
}

/* ===== ARTICLE ===== */

article {
  width: 100%;
  max-width: 800px;
  margin-bottom: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--line);
}

article:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

/* Article header */
.article-header {
  display: grid;
  gap: 20px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line-strong);
  opacity: 0;
  animation: fadeUp 0.8s ease-out 0.2s forwards;
}

.article-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-tag {
  color: var(--accent);
  background: rgba(216, 255, 90, 0.1);
  padding: 4px 10px;
  border-radius: 2px;
}

.article-date {
  color: var(--ink-dim);
}

.article-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.article-excerpt {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-dim);
}

/* Article content */
.article-content {
  display: grid;
  gap: 24px;
  opacity: 0;
  animation: fadeUp 1s ease-out 0.4s forwards;
}

.article-content p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
}

.article-content h2 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.3;
  color: var(--ink);
  margin-top: 20px;
}

.article-content h3 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
  color: var(--ink);
  margin-top: 16px;
}

.article-content ul {
  list-style: none;
  padding-left: 0;
}

.article-content ul li {
  padding-left: 24px;
  position: relative;
  margin-bottom: 12px;
  line-height: 1.8;
}

.article-content ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.article-content ol {
  padding-left: 24px;
  list-style-position: outside;
}

.article-content ol li {
  padding-left: 8px;
  margin-bottom: 12px;
  line-height: 1.8;
}

.article-content ol li::marker {
  color: var(--accent);
  font-weight: 500;
}

.article-content strong {
  color: var(--accent);
  font-weight: 500;
}

/* Inline code */
.article-content code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(235, 231, 221, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--accent);
  border: 1px solid var(--line-strong);
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* Code blocks - modern technical blog styling */
.article-content pre {
  background: rgba(14, 15, 13, 0.85);
  border: 1px solid rgba(235, 231, 221, 0.15);
  border-radius: 6px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 24px 0;
  position: relative;
  transition: all 0.3s cubic-bezier(0.7, 0, 0.3, 1);
}

.article-content pre:hover {
  background: rgba(14, 15, 13, 0.95);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(216, 255, 90, 0.12);
}

.article-content pre code {
  font-family: 'JetBrains Mono', monospace;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(235, 231, 221, 0.95);
  display: block;
  letter-spacing: -0.01em;
}

/* Code block with language label */
.article-content pre[class*="language-"]::before {
  content: attr(data-language);
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.article-content pre[class*="language-"]:hover::before {
  opacity: 1;
}

.article-content blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 20px;
  color: var(--ink-dim);
  font-style: italic;
  margin: 12px 0;
}

/* ===== CERTIFICATION PROGRESS ===== */

.cert-progress {
  width: 100%;
  max-width: 800px;
  border: 1px solid var(--line-strong);
  padding: 24px;
  background: rgba(235, 231, 221, 0.02);
  margin-bottom: 40px;
}

.cert-progress-header {
  margin-bottom: 20px;
}

.cert-progress-header h3 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 4px;
}

.cert-subtitle {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.cert-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 16px;
}

.cert-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border: 1px solid var(--line);
  background: rgba(235, 231, 221, 0.02);
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
  opacity: 0.3;
}

.cert-badge.earned {
  opacity: 1;
  border-color: var(--accent);
  background: rgba(216, 255, 90, 0.05);
  text-decoration: none;
  color: inherit;
}

.cert-badge.earned:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(216, 255, 90, 0.15);
}

.badge-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  opacity: 0.3;
  filter: grayscale(100%);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.cert-badge.earned .badge-logo {
  opacity: 1;
  filter: grayscale(0%);
}

.badge-icon {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-dim);
}

.cert-badge.earned .badge-icon {
  color: var(--accent);
}

.badge-name {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-align: center;
  line-height: 1.4;
}

.cert-badge.earned .badge-name {
  color: var(--ink);
}

/* ===== BACK LINK ===== */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  padding: 12px 0;
  transition: color 0.3s ease;
  opacity: 0;
  animation: fadeUp 1s ease-out 0.6s forwards;
}

.back-link:hover {
  color: var(--accent);
}

.back-link .arrow {
  transition: transform 0.3s ease;
}

.back-link:hover .arrow {
  transform: translateX(-4px);
}

/* ===== BLOG OVERVIEW ===== */

.blog-overview {
  width: 100%;
  max-width: 800px;
  margin-bottom: 40px;
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(235, 231, 221, 0.02);
  opacity: 0;
  animation: fadeUp 1s ease-out 0.3s forwards;
}

.blog-overview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.blog-overview-title {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.blog-overview-divider {
  height: 1px;
  flex: 1;
  background: var(--line);
}

.blog-overview-list {
  display: grid;
  gap: 8px;
}

.blog-overview-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(235, 231, 221, 0.02);
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.7, 0, 0.3, 1);
  position: relative;
}

.blog-overview-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s cubic-bezier(0.7, 0, 0.3, 1);
}

.blog-overview-item:hover {
  background: rgba(235, 231, 221, 0.04);
  border-color: var(--line);
  padding-left: 20px;
}

.blog-overview-item:hover::before {
  transform: scaleY(1);
}

.blog-overview-item.active {
  background: rgba(216, 255, 90, 0.05);
  border-color: var(--accent);
}

.blog-overview-tag {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(216, 255, 90, 0.08);
  padding: 2px 8px;
  border-radius: 2px;
  white-space: nowrap;
}

.blog-overview-item-title {
  font-size: 13px;
  color: var(--ink);
  flex: 1;
  transition: color 0.3s ease;
}

.blog-overview-item:hover .blog-overview-item-title {
  color: var(--accent);
}

/* ===== BACK TO TOP BUTTON ===== */

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.7, 0, 0.3, 1);
  z-index: 100;
  font-size: 20px;
  color: var(--ink-dim);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--bg);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(216, 255, 90, 0.15);
}

/* ===== ARTICLE ACTIONS ===== */

.article-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  margin-top: 40px;
  border-top: 1px solid var(--line-strong);
  opacity: 0;
  animation: fadeUp 1s ease-out 0.6s forwards;
}

.share-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.share-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

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

.share-btn {
  padding: 8px 16px;
  background: rgba(235, 231, 221, 0.02);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.7, 0, 0.3, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.share-btn:hover {
  background: rgba(235, 231, 221, 0.04);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.share-btn.copied {
  background: rgba(216, 255, 90, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.back-to-top-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  padding: 8px 16px;
  background: rgba(235, 231, 221, 0.02);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.7, 0, 0.3, 1);
}

.back-to-top-link:hover {
  background: rgba(235, 231, 221, 0.04);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.back-to-top-link .arrow {
  transition: transform 0.3s ease;
}

.back-to-top-link:hover .arrow {
  transform: translateY(-2px);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 720px) {
  .cert-badges {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
  }

  .cert-badge {
    padding: 12px 8px;
  }

  .back-to-top {
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
  }

  .article-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .share-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
  }

  .share-buttons {
    width: 100%;
    flex-wrap: wrap;
  }

  .share-btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }

  .back-to-top-link {
    width: 100%;
    justify-content: center;
  }

  .blog-overview {
    padding: 16px;
  }

  .blog-overview-item {
    padding: 10px 12px;
  }

  .blog-overview-item:hover {
    padding-left: 16px;
  }
}
