/* * SHARED BLOG STYLES (blog.css)
 * Apply this to all blog post pages.
 */

:root {
  --content-width: 760px;
  --color-text-dark: #2c3e50;
  --color-text-body: #34495e;
  --color-text-light: #7f8c8d;
  --color-link: #3498db;
  --color-link-hover: #2980b9;
  --color-divider: #ecf0f1;
  --color-bg-code: #f7f9fa;
  --color-code-text: #c7254e;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Menlo', 'Monaco', 'Consolas', 'Courier New', monospace;
}

body {
  font-family: var(--font-sans);
  line-height: 1.7; /* Slightly looser for long-form reading */
  color: var(--color-text-body);
  background-color: #ffffff;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
}

/* Background images - subtle, fixed at bottom corners */
body::before {
  content: '';
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background-image: url('/blog/assets/background.png');
  background-size: 400px auto;
  background-position: bottom left;
  background-repeat: no-repeat;
  opacity: 0.12;
  pointer-events: none;
  z-index: -1;
}

body::after {
  content: '';
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background-image: url('/blog/assets/background-2.png');
  background-size: 400px auto;
  background-position: bottom right;
  background-repeat: no-repeat;
  opacity: 0.12;
  pointer-events: none;
  z-index: -1;
}

/* --- LAYOUT --- */
.wrapper {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- HEADER (Consistent with Index) --- */
.site-header {
  border-bottom: 1px solid var(--color-divider);
  padding: 40px 0 20px 0;
  margin-bottom: 40px;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text-dark);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  gap: 15px;
  float: right;
  margin-top: 5px;
}

.page-link {
  color: var(--color-text-dark);
  font-weight: 500;
  text-decoration: none;
  font-size: 0.95rem;
}

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

/* --- TYPOGRAPHY & CONTENT --- */

h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-dark);
  margin-top: 2em;
  margin-bottom: 0.8em;
  line-height: 1.3;
  font-weight: 700;
}

h1 {
  font-size: 2.2rem;
  letter-spacing: -0.03em;
  margin-top: 0; /* No top margin for the main title */
  border-bottom: none;
}

h2 {
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-divider);
}

h3 {
  font-size: 1.4rem;
}

p {
  margin-bottom: 1.5em;
  font-size: 1.05rem; /* Slightly larger body text for reading comfort */
}

a {
  color: var(--color-link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}

a:hover {
  color: var(--color-link-hover);
  border-bottom-color: var(--color-link-hover);
}

/* --- TABLES (Slick & Clean) --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  font-size: 0.95rem;
  border-radius: 6px;
  overflow: hidden; /* For rounded corners */
  border: 1px solid var(--color-divider);
}

thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid var(--color-divider);
}

th {
  text-align: left;
  padding: 12px 15px;
  font-weight: 600;
  color: var(--color-text-dark);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--color-divider);
  vertical-align: top;
}

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

tr:nth-child(even) {
  background-color: #fcfcfc; /* Very subtle stripe */
}

/* --- CODE BLOCKS --- */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--color-code-text);
  background-color: var(--color-bg-code);
  padding: 2px 5px;
  border-radius: 4px;
}

pre {
  background-color: #f1f3f5;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 30px 0;
  border: 1px solid var(--color-divider);
}

pre code {
  color: #333;
  background-color: transparent;
  padding: 0;
  font-size: 0.9em;
}

/* --- BLOCKQUOTES --- */
blockquote {
  border-left: 4px solid var(--color-link);
  margin: 30px 0;
  padding-left: 20px;
  color: var(--color-text-light);
  font-style: italic;
  background-color: #f9fbfd;
  padding: 15px 20px;
  border-radius: 0 6px 6px 0;
}

/* --- LISTS --- */
ul, ol {
  padding-left: 25px;
  margin-bottom: 1.5em;
}

li {
  margin-bottom: 0.5em;
}

/* --- FOOTER --- */
.site-footer {
  border-top: 1px solid var(--color-divider);
  padding: 40px 0;
  margin-top: 60px;
  font-size: 0.9rem;
  color: var(--color-text-light);
  text-align: center;
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
  h1 { font-size: 1.8rem; }
  .wrapper { padding: 0 15px; }
  table { display: block; overflow-x: auto; }
}
