/* ==========================================================================
   Blog Stylesheet — adriacidre.com
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  line-height: 1.75;
  color: #2e3440;
  background: linear-gradient(135deg, #ff7496 0%, #e8a0bf 25%, #c4b7d5 50%, #7ec8c8 75%, #56b4d3 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* --- Layout --- */
.blog-wrapper {
  max-width: 740px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.blog-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 8px;
  padding: 3rem 3.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* --- Header --- */
.blog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e5e5;
}

.blog-header-name a {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2e3440;
  text-decoration: none;
}

.blog-header-name a:hover {
  color: #ff7496;
}

.blog-header-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.blog-header-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-header-nav a:hover {
  color: #ff7496;
}

/* --- Typography --- */
.blog-content h1 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: #1a1a2e;
}

.blog-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: #1a1a2e;
}

.blog-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: #1a1a2e;
}

.blog-content h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #1a1a2e;
}

.blog-content p {
  margin-bottom: 1.25rem;
}

.blog-content a {
  color: #ff7496;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.blog-content a:hover {
  border-bottom-color: #ff7496;
}

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

.blog-content em {
  font-style: italic;
}

/* --- Lists --- */
.blog-content ul,
.blog-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.blog-content li {
  margin-bottom: 0.4rem;
}

.blog-content li > ul,
.blog-content li > ol {
  margin-top: 0.4rem;
  margin-bottom: 0;
}

/* --- Blockquotes --- */
.blog-content blockquote {
  border-left: 3px solid #ff7496;
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  color: #4a5568;
  background: #fdf2f4;
  border-radius: 0 4px 4px 0;
}

.blog-content blockquote p:last-child {
  margin-bottom: 0;
}

/* --- Inline Code --- */
.blog-content code {
  font-family: 'Source Code Pro', 'Fira Code', 'Consolas', monospace;
  font-size: 0.875em;
  background: #f3f4f6;
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: #d63384;
}

/* --- Code Blocks --- */
.blog-content pre {
  background: #1e2a32;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.blog-content pre code {
  font-family: 'Source Code Pro', 'Fira Code', 'Consolas', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: #adbac7;
}

/* --- Tables --- */
.blog-content .table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  -webkit-overflow-scrolling: touch;
}

.blog-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.blog-content thead th {
  background: #f8f9fa;
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
}

.blog-content tbody td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.blog-content tbody tr:hover {
  background: #fdf2f4;
}

/* --- Horizontal Rule --- */
.blog-content hr {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 2rem 0;
}

/* --- Post Metadata --- */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.post-meta-date {
  font-weight: 300;
}

.post-meta-series {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #fdf2f4;
  color: #ff7496;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s;
}

.post-meta-series:hover {
  background: #fce7ec;
}

.post-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.post-meta-tag {
  font-size: 0.78rem;
  color: #6b7280;
  background: #f3f4f6;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

/* --- Series Navigation Box --- */
.series-nav {
  background: #f8f9fa;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.series-nav-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.series-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.series-nav-list li {
  margin-bottom: 0.35rem;
}

.series-nav-list a {
  font-size: 0.92rem;
  color: #4a5568;
  text-decoration: none;
  transition: color 0.2s;
}

.series-nav-list a:hover {
  color: #ff7496;
}

.series-nav-list .current {
  font-weight: 600;
  color: #ff7496;
}

.series-nav-list .current::before {
  content: "\25B6\00a0";
  font-size: 0.7em;
}

.series-nav-list .upcoming {
  color: #b0b8c1;
  font-size: 0.92rem;
  font-style: italic;
}

/* --- Previous / Next Navigation --- */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
}

.post-nav a {
  font-size: 0.92rem;
  color: #ff7496;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.post-nav a:hover {
  opacity: 0.75;
}

.post-nav-prev::before {
  content: "\2190\00a0";
}

.post-nav-next::after {
  content: "\00a0\2192";
}

.post-nav-spacer {
  flex: 1;
}

/* --- Blog Listing --- */
.blog-listing-intro {
  margin-bottom: 2.5rem;
}

.blog-listing-intro h1 {
  font-size: 2rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 0.5rem;
}

.blog-listing-intro p {
  color: #4a5568;
  font-size: 1.05rem;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid #eee;
}

.post-list-item:first-child {
  padding-top: 0;
}

.post-list-item:last-child {
  border-bottom: none;
}

.post-list-date {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

.post-list-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.post-list-title a {
  color: #1a1a2e;
  text-decoration: none;
  transition: color 0.2s;
}

.post-list-title a:hover {
  color: #ff7496;
}

.post-list-excerpt {
  font-size: 0.95rem;
  color: #4a5568;
  line-height: 1.6;
}

/* --- Footer --- */
.blog-footer {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid #e5e5e5;
  font-size: 0.85rem;
  color: #9ca3af;
}

.blog-footer a {
  color: #6b7280;
  text-decoration: none;
}

.blog-footer a:hover {
  color: #ff7496;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .blog-wrapper {
    padding: 1rem 0.75rem 2rem;
  }

  .blog-card {
    padding: 2rem 1.5rem;
    border-radius: 6px;
  }

  .blog-content h1 {
    font-size: 1.65rem;
  }

  .blog-content h2 {
    font-size: 1.3rem;
  }

  .blog-content pre {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    border-radius: 0;
    padding: 1rem 1.5rem;
  }

  .blog-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .post-nav {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .blog-wrapper {
    padding: 0.5rem 0;
  }

  .blog-card {
    padding: 1.5rem 1rem;
    border-radius: 0;
    box-shadow: none;
  }

  .blog-content h1 {
    font-size: 1.45rem;
  }

  .blog-content pre {
    margin-left: -1rem;
    margin-right: -1rem;
    padding: 1rem;
    font-size: 0.8rem;
  }

  .series-nav {
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}
