/* post.css - Beautiful, readable single blog post styles */

.post-container {
  max-width: 780px;
  margin: 40px auto 60px;
  padding: 0 20px;
}

.post-header {
  margin-bottom: 30px;
}

.post-title {
  font-size: 2.35rem;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-color);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted-color);
  font-size: 0.95rem;
}

.post-hero {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  margin-bottom: 35px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.post-content {
  font-size: 1.05rem;
  line-height: 1.85;
  overflow-wrap: break-word;
  word-break: break-word;
}

.post-content p {
  margin-bottom: 1.35em;
  text-align: justify;
}

.post-content h2 {
  font-size: 1.55rem;
  margin: 2.1em 0 0.9em;
  font-weight: 600;
  color: var(--text-color);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
}

.post-content figure {
  margin: 2.4em 0;
  text-align: center;
}

.post-content figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.post-content figcaption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--muted-color);
  font-style: italic;
}

.post-footer {
  margin-top: 50px;
  padding-top: 25px;
  border-top: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.post-footer a {
  color: var(--accent-color);
}

@media (max-width: 600px) {
  .post-container {
    margin: 25px auto 40px;
    padding: 0 16px;
  }
  
  .post-title {
    font-size: 1.9rem;
  }
  
  .post-content {
    font-size: 1rem;
  }
}

/* Prevent content overflow */

.post-content iframe,
.post-content video,
.post-content table,
.post-content pre,
.post-content code {
  max-width: 100%;
}

.post-content table,
.post-content pre {
  overflow-x: auto;
}

.post-content hr {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.post-content img,
.post-hero {
  max-width: 100%;
  height: auto;
}


/* ===== References Section ===== */

.references{
    margin:50px 0 25px;
    padding:20px;
    background:#faffc8c4;
    border:1px solid #e5e7eb;
    border-left:5px solid #dc2626;
}

.references h2{
    margin:0 0 16px;
    font-size:1.20rem;
    font-weight:700;
    color:#111827;
}

.references ol{
    margin:0;
    padding-left:22px;
}

.references li{
    margin-bottom:12px;
    color:#111926;
    line-height:1.8;
    font-size:0.7rem;
}

.references li:last-child{
    margin-bottom:0;
}

.references em{
    font-style:italic;
    color:#111827;
}

.reference-note{
    margin-top:18px;
    padding:14px 16px;
    background:#fff;
    border-left:4px solid #ef4444;
    border-radius:8px;
    color:#4b5563;
    font-size:.95rem;
    line-height:1.7;
}

.reference-note strong{
    color:#111827;
}

/* Dark Mode */

@media (prefers-color-scheme: dark){

    .references{
        background:#1f293788;
        border-color:#374151;
    }

    .references h2,
    .references em,
    .reference-note strong{
        color:#f9fafb;
    }

    .references li,
    .reference-note{
        color:#d1d5db;
    }

    .reference-note{
        background:#111827;
    }
}