/* PoquitoTalk Editorial & HackerNoon Article Stylesheet */
:root {
  --bg-cream: #FAF8F5;
  --surface-card: #FFFFFF;
  --surface-secondary: #F3EFEA;
  --surface-code: #1A1C23;
  --text-main: #1A1208;
  --text-secondary: #5C4E3A;
  --text-muted: #7D6E5B;
  --border-light: rgba(150, 72, 36, 0.12);
  --border-subtle: #E8E2D9;
  --terracotta: #964824;
  --terracotta-light: #FD9A6F;
  --emerald: #059669;
  --emerald-bg: #ECFDF5;
  --indigo: #4F46E5;
  --indigo-bg: #EEF2FF;
  --amber: #D97706;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 16px 36px rgba(150, 72, 36, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-cream);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.75;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

/* Header & Nav */
.article-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 0;
}

.nav-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-wordmark {
  font-family: 'Lexend', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.brand-wordmark .brand-talk {
  color: var(--terracotta);
}

.nav-separator {
  color: var(--text-muted);
  font-size: 14px;
}

.nav-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--terracotta);
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-back-link:hover {
  color: #7A3515;
}

.nav-back-link svg {
  transition: transform 0.2s ease;
}

.nav-back-link:hover svg {
  transform: translateX(-3px);
}

.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-hn-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: #00EB7E;
  color: #000000;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.btn-hn-badge:hover {
  opacity: 0.9;
}

.btn-app-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 20px;
  background: var(--terracotta);
  color: #FFFFFF;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-app-link:hover {
  background: #803716;
  transform: translateY(-1px);
}

.btn-app-link svg {
  transition: transform 0.2s ease;
}

.btn-app-link:hover svg {
  transform: translateX(3px);
}

/* Article Shell */
.article-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

/* Article Header */
.article-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-subtle);
}

.article-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--terracotta);
  background: rgba(150, 72, 36, 0.08);
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 18px;
}

.article-title {
  font-family: 'Lexend', sans-serif;
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -1px;
  color: var(--text-main);
  margin-bottom: 20px;
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 14.5px;
}

.author-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border-light);
}

.author-handle {
  color: var(--terracotta);
}

.meta-divider {
  color: var(--border-subtle);
}

/* Article Content Body */
.article-content {
  font-size: 17.5px;
  color: var(--text-main);
  line-height: 1.82;
}

.article-content p {
  margin-bottom: 22px;
}

.article-content h2 {
  font-family: 'Lexend', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.5px;
  color: var(--text-main);
  margin-top: 44px;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--border-subtle);
}

.article-content h3 {
  font-family: 'Lexend', sans-serif;
  font-size: 1.32rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.3px;
  color: var(--text-main);
  margin-top: 32px;
  margin-bottom: 12px;
}

.article-content ul,
.article-content ol {
  margin-bottom: 24px;
  padding-left: 28px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content strong {
  font-weight: 700;
  color: #110B05;
}

.article-content a {
  color: var(--terracotta);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.article-content a:hover {
  color: #6E2F13;
}

.article-content hr {
  border: none;
  height: 1px;
  background: var(--border-subtle);
  margin: 40px 0;
}

/* Pull Quotes / Blockquotes */
.article-content blockquote {
  margin: 28px 0;
  padding: 18px 24px;
  background: #FFFDF9;
  border-left: 4px solid var(--terracotta);
  border-radius: 0 16px 16px 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02);
  color: var(--text-secondary);
  font-style: italic;
  font-size: 1.05rem;
}

.article-content blockquote p {
  margin-bottom: 0;
}

.article-content blockquote strong {
  color: var(--terracotta);
  font-style: normal;
}

/* Callouts */
.callout-box {
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: 18px;
  padding: 24px;
  margin: 32px 0;
  box-shadow: var(--shadow-card);
}

.callout-title {
  font-family: 'Lexend', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--text-main);
}

/* Code Blocks & Terminal Windows */
.code-window {
  margin: 28px 0;
  background: var(--surface-code);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #14161B;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-dot.red { background: #FF5F56; }
.code-dot.yellow { background: #FFBD2E; }
.code-dot.green { background: #27C93F; }

.code-lang-label {
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color: #8A92A6;
  font-weight: 600;
  text-transform: uppercase;
}

.btn-copy-code {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #C3CAD7;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-copy-code:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.65;
  color: #E2E8F0;
  background: var(--surface-code);
}

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
}

p code, li code {
  background: rgba(150, 72, 36, 0.08);
  color: #7A3515;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid rgba(150, 72, 36, 0.12);
}

/* ASCII Diagram Pre blocks */
pre.diagram-ascii {
  background: #111318;
  color: #A7F3D0;
  line-height: 1.35;
  font-size: 13px;
  border-radius: 12px;
}

/* Tables */
.table-wrapper {
  margin: 32px 0;
  overflow-x: auto;
  border-radius: 14px;
  border: 1.5px solid var(--border-subtle);
  background: #FFFFFF;
  box-shadow: var(--shadow-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 15px;
}

th {
  background: #F7F4EE;
  font-family: 'Lexend', sans-serif;
  font-weight: 700;
  color: var(--text-main);
  padding: 14px 18px;
  border-bottom: 2px solid var(--border-subtle);
}

td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

tr:nth-child(even) td {
  background: #FAF8F5;
}

/* Embedded Media / Images */
.article-media-container {
  margin: 36px 0;
  text-align: center;
}

.article-media-container img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1.5px solid var(--border-light);
  box-shadow: var(--shadow-card);
}

.article-media-caption {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 10px;
  font-weight: 500;
}

/* Article Author Bio Box */
.author-bio-card {
  margin-top: 56px;
  padding: 28px;
  background: #FFFFFF;
  border-radius: 20px;
  border: 1.5px solid var(--border-light);
  box-shadow: var(--shadow-card);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.bio-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--terracotta);
  flex-shrink: 0;
}

.bio-content h4 {
  font-family: 'Lexend', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-main);
}

.bio-text {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.bio-links {
  display: flex;
  gap: 14px;
  font-size: 13.5px;
  font-weight: 700;
}

/* Articles Hub Grid */
.hub-hero {
  text-align: center;
  max-width: 760px;
  margin: 32px auto 48px;
  padding: 0 16px;
}

.hub-hero h1 {
  font-family: 'Lexend', sans-serif;
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.15;
  color: var(--text-main);
  margin-bottom: 16px;
}

.hub-hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.articles-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 820px;
  margin: 0 auto;
}

.article-card {
  background: #FFFFFF;
  border-radius: 22px;
  border: 1.5px solid var(--border-light);
  padding: 32px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(150, 72, 36, 0.35);
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-tag {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--terracotta);
  background: rgba(150, 72, 36, 0.08);
  padding: 4px 10px;
  border-radius: 10px;
}

.card-read-time {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.card-title {
  font-family: 'Lexend', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.4px;
  color: var(--text-main);
  margin-bottom: 14px;
}

.card-excerpt {
  font-size: 15.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 22px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.card-author {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--terracotta);
  transition: transform 0.2s ease;
}

.article-card:hover .card-cta svg {
  transform: translateX(4px);
}

.card-cta svg {
  transition: transform 0.2s ease;
}

/* Footer */
.article-footer {
  text-align: center;
  padding: 48px 24px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 64px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.article-footer a {
  color: var(--terracotta);
  text-decoration: none;
  font-weight: 600;
}

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

@media (max-width: 640px) {
  .article-title {
    font-size: 1.75rem;
  }
  .article-shell {
    padding: 28px 16px 64px;
  }
  .article-card {
    padding: 22px;
  }
  .author-bio-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}
