/* ==========================================================================
   post-page.css — single article (blog/post.html) typography and chrome
   ========================================================================== */

.post-shell { padding: var(--frame-pad); min-height: 100svh; }

.post-card {
  max-width: 920px; margin: 0 auto;
  background: var(--eb-white); border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

/* topbar (brown sticky band above the card) */
.post-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px; color: var(--eb-cream);
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.post-topbar a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 3px;
  background: rgba(254, 251, 246, 0.06);
  border: 1px solid rgba(254, 251, 246, 0.2);
  color: var(--eb-cream); text-decoration: none;
  transition: color .2s ease;
}
.post-topbar a:hover { color: var(--eb-white); }

/* Article header */
.post-header {
  background: var(--eb-skin);
  padding: 56px 56px 40px;
  border-bottom: 1px dashed rgba(93, 49, 54, .25);
}
@media (max-width: 700px) { .post-header { padding: 32px 22px 28px; } }

.post-header__lbl {
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--eb-light-brown); margin-bottom: 14px; display: block;
}
.post-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(32px, 4.5vw, 56px); line-height: 1.05;
  letter-spacing: -0.02em; color: var(--eb-dark-brown);
  margin: 0 0 24px;
}
.post-meta {
  display: flex; flex-wrap: wrap; gap: 22px;
  padding: 14px 0;
  border-top: 1px dashed rgba(93, 49, 54, .22);
  border-bottom: 1px dashed rgba(93, 49, 54, .22);
  margin-bottom: 18px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--eb-light-brown);
}
.post-meta span {
  display: inline-flex; align-items: center; gap: 6px;
}
.post-meta .post-category {
  background: var(--eb-dark-brown); color: var(--eb-white);
  padding: 3px 9px; border-radius: 3px;
  letter-spacing: 0.12em;
}
.post-meta i { display: none; } /* hide font-awesome icons inserted by JS */

.post-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 0;
}
.post-tag {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--eb-dark-brown);
  padding: 4px 9px; border-radius: 3px;
  border: 1px solid var(--eb-light-pink);
  background: var(--eb-white);
}

/* Article body */
.post-body {
  padding: 56px;
  background: var(--eb-white);
}
@media (max-width: 700px) { .post-body { padding: 32px 22px; } }

.post-content {
  font-family: var(--font-display); font-weight: 300;
  font-size: 16px; line-height: 1.75;
  color: var(--eb-text-dark);
  max-width: 720px; margin: 0 auto;
}
.post-content > *:first-child { margin-top: 0; }
.post-content > *:last-child { margin-bottom: 0; }

.post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5 {
  font-family: var(--font-display); font-weight: 700;
  color: var(--eb-dark-brown);
  letter-spacing: -0.015em; line-height: 1.2;
  margin: 2.6em 0 0.8em;
  scroll-margin-top: 60px;
}
.post-content h2 {
  font-size: clamp(26px, 2.4vw, 32px);
  border-bottom: 1px dashed rgba(93, 49, 54, .22);
  padding-bottom: 12px;
}
.post-content h3 { font-size: clamp(20px, 2vw, 24px); }
.post-content h4 { font-size: 18px; }
.post-content h5 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; font-family: var(--font-mono); color: var(--eb-light-brown); }

.post-content p {
  margin: 0 0 1.4em;
}

.post-content a {
  color: var(--eb-dark-brown);
  text-decoration: underline;
  text-decoration-color: var(--eb-light-pink);
  text-underline-offset: 0.16em;
  transition: text-decoration-color .2s ease;
}
.post-content a:hover { text-decoration-color: var(--eb-dark-brown); }

.post-content strong { color: var(--eb-deep-wine); font-weight: 700; }
.post-content em { font-style: italic; color: var(--eb-text-dark); }

.post-content ul, .post-content ol {
  margin: 0 0 1.4em;
  padding-left: 0;
  list-style: none;
}
.post-content ul li, .post-content ol li {
  position: relative;
  padding-left: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.7;
}
.post-content ul li::before {
  content: '▸';
  position: absolute; left: 0; top: 0;
  color: var(--eb-dark-brown); font-weight: 700;
}
.post-content ol {
  counter-reset: ol-counter;
}
.post-content ol li {
  counter-increment: ol-counter;
}
.post-content ol li::before {
  content: counter(ol-counter, decimal-leading-zero) ' /';
  position: absolute; left: 0; top: 0;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; color: var(--eb-light-brown);
  padding-top: 5px;
}
.post-content ol li { padding-left: 2.4em; }

.post-content blockquote {
  border-left: 3px solid var(--eb-dark-brown);
  background: var(--eb-skin);
  padding: 16px 22px;
  margin: 2em 0;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--eb-deep-wine);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.post-content blockquote p:last-child { margin-bottom: 0; }

.post-content hr {
  border: none;
  border-top: 1px dashed rgba(93, 49, 54, .22);
  margin: 3em auto;
  max-width: 360px;
}

.post-content img {
  max-width: 100%; height: auto;
  border-radius: var(--radius-sm);
  margin: 2em 0;
  display: block;
}

/* Inline code */
.post-content code {
  background: var(--eb-skin);
  color: var(--eb-deep-wine);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.88em;
  letter-spacing: 0;
}
/* Code block */
.post-content pre {
  background: var(--eb-deep-wine);
  border: 1px solid var(--eb-dark-brown);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  margin: 2em 0;
  overflow-x: auto;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.6;
  position: relative;
}
.post-content pre::before {
  content: 'CODE';
  position: absolute; top: 0; right: 0;
  padding: 4px 10px;
  background: var(--eb-dark-brown); color: var(--eb-cream);
  font-family: var(--font-mono); font-size: 8px; font-weight: 700;
  letter-spacing: 0.16em;
  border-bottom-left-radius: var(--radius-sm);
}
.post-content pre code {
  background: none;
  color: var(--eb-skin);
  padding: 0;
  border-radius: 0;
  font-size: 13px;
  display: block;
}

/* Tables (sometimes used in tech articles) */
.post-content table {
  width: 100%; border-collapse: collapse;
  margin: 2em 0;
  font-size: 14px;
}
.post-content th, .post-content td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px dashed rgba(93, 49, 54, .22);
}
.post-content th {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--eb-light-brown);
  border-bottom: 1px solid var(--eb-dark-brown);
}

/* highlight.js token color overrides — earth-tone palette on deep-wine background */
.post-content .hljs                              { background: transparent; color: var(--eb-skin); }
.post-content .hljs-comment, .hljs-quote         { color: var(--eb-light-brown); font-style: italic; }
.post-content .hljs-keyword, .hljs-selector-tag  { color: var(--eb-light-pink); font-weight: 600; }
.post-content .hljs-string, .hljs-doctag         { color: #f3b9b9; }
.post-content .hljs-number, .hljs-literal        { color: #f7d39c; }
.post-content .hljs-title, .hljs-section,
.post-content .hljs-name                          { color: var(--eb-cream); font-weight: 600; }
.post-content .hljs-built_in, .hljs-type          { color: #d8bfc1; }
.post-content .hljs-variable, .hljs-attr          { color: #efc9b1; }
.post-content .hljs-meta, .hljs-tag               { color: #c08a8c; }
.post-content .hljs-symbol, .hljs-bullet          { color: var(--eb-light-pink); }
.post-content .hljs-emphasis                      { font-style: italic; }
.post-content .hljs-strong                        { font-weight: 700; }
.post-content .hljs-deletion                      { background: rgba(252, 165, 165, .15); }
.post-content .hljs-addition                      { background: rgba(74, 222, 128, .12); }

/* Sharing buttons */
.post-share {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  padding: 24px 0;
  border-top: 1px dashed rgba(93, 49, 54, .22);
  border-bottom: 1px dashed rgba(93, 49, 54, .22);
  margin: 0 auto;
  max-width: 720px;
  font-family: var(--font-mono);
}
.post-share__lbl {
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--eb-light-brown);
  margin-right: 8px;
}
.post-share .share-btn {
  width: auto; height: auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: 3px;
  border: 1px solid var(--eb-light-pink);
  background: var(--eb-white);
  color: var(--eb-dark-brown);
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: all .2s ease;
}
.post-share .share-btn:hover {
  background: var(--eb-skin);
  border-color: var(--eb-dark-brown);
}
.post-share .share-btn i { display: none; } /* hide FA icons */
.post-share .share-btn::before {
  content: attr(data-label);
  font-family: var(--font-mono);
}
.post-share .share-twitter::before  { content: 'TWITTER ↗'; }
.post-share .share-linkedin::before { content: 'LINKEDIN ↗'; }
.post-share .share-facebook::before { content: 'FACEBOOK ↗'; }
.post-share .share-copy::before     { content: 'COPIA LINK ↗'; }

/* Post navigation */
.post-navigation {
  margin: 32px auto 0;
  max-width: 720px;
}
.post-navigation a, .nav-post {
  display: block;
  padding: 18px 22px;
  background: var(--eb-skin);
  border: 1px solid var(--eb-light-pink);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all .2s ease;
}
.post-navigation a:hover, .nav-post:hover {
  border-color: var(--eb-dark-brown);
  transform: translateY(-2px);
}
.nav-post-label {
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--eb-light-brown);
  margin-bottom: 6px;
}
.nav-post-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 18px; line-height: 1.2;
  color: var(--eb-dark-brown);
  letter-spacing: -0.01em;
}

/* Notification toast */
.post-notification {
  position: fixed;
  bottom: 30px; left: 50%; transform: translateX(-50%);
  background: var(--eb-dark-brown); color: var(--eb-white);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  z-index: 9000;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  animation: toastIn .3s var(--eb-ease-spring-pop, cubic-bezier(.34,1.56,.64,1));
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.notification-content {
  display: flex; align-items: center; gap: 12px;
}
.notification-close {
  background: transparent; border: none;
  color: var(--eb-cream); cursor: pointer;
  font-family: var(--font-mono); font-size: 14px; padding: 0;
}
.notification-close i { display: none; }
.notification-close::before { content: '×'; font-size: 18px; }

.post-notification.notification-success { background: var(--eb-success); }
.post-notification.notification-error   { background: var(--eb-deep-wine); }

/* Error states */
.post-error-state {
  text-align: center; padding: 60px 20px;
}
.post-error-state .error-content i { display: none; }
.post-error-state h3 {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 700;
  color: var(--eb-dark-brown); letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.post-error-state p {
  font-family: var(--font-display); font-weight: 300;
  font-size: 15px; color: var(--eb-subtitle);
  margin: 0 0 22px;
}
.error-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.error-actions .btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 3px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: transform .2s ease;
}
.error-actions .btn-primary {
  background: var(--eb-dark-brown); color: var(--eb-white); border: none;
}
.error-actions .btn-outline {
  background: transparent; color: var(--eb-dark-brown);
  border: 1px solid var(--eb-light-brown);
}
.error-actions .btn:hover { transform: translateY(-1px); }

@media print {
  body { background: white; }
  .post-shell { padding: 0; background: white; }
  .post-card { box-shadow: none; }
  .film-grain, .post-topbar, .post-share, .post-navigation, .footer, .back-to-top { display: none; }
}
