/* ============================================================
   STANDALONE BLOG CSS 
   No external dependencies required.
   ============================================================ */

@font-face {
  font-family: "eb garamond";
  src: url("../assets/fonts/eb-garamond.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../assets/fonts/ibm-plex-sans.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #FFFFFF;
  --text: #1A1C1E;
  --text-sec: #5F6368;
  --text-muted: #555;
  --accent: #f3007e;
  --border: rgba(0,0,0,0.08);

  --font-display: "eb garamond", serif;
  --font-body: "IBM Plex Sans", sans-serif;

  --space-sm: 0.75rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
}

html[data-theme="dark"] {
  --bg: #121417;
  --text: #f5f5f5;
  --text-muted: #aaa;
  --border: rgba(255,255,255,0.1);
}

/* --- Base & Reset --- */
* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

/* Sticky Footer Layout */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

main { flex: 1 0 auto; }

.wrapper {
  width: 100%; /* Take up all available width... */
  max-width: 920px; /* ...but stop at 920px */
  margin: 0 auto; /* Center it */
  padding: 0 var(--space-md); /* Give it breathing room on mobile */
}

.wrapper--reading {
  max-width: 800px;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  margin-top: 0;
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

/* --- Navigation --- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.nav-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

/* --- Blog List View --- */
.section { margin-bottom: 4rem; padding-top: var(--space-lg); }

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.post-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.post-date {
  font-size: 0.85rem;
  color: var(--text-sec);
}

.post-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
}

/* --- Article View --- */
.article-meta { font-size: 0.9rem; color: var(--text-sec); margin-bottom: 0.5rem; }
.article-author { font-size: 0.95rem; color: var(--text-sec); margin-bottom: 2rem; }
.article-content { line-height: 1.8; }
.article-content p { margin-bottom: 1.5rem; }


/* --- Footer --- */
footer {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

/* --- Theme Toggle SVG Styles --- */
.theme-toggle {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  
  /* Matches your nav-links style */
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
  
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: opacity 0.2s ease;
}
.theme-toggle:hover {
  opacity: 0.7;
  text-decoration: underline;
}


/* =========================
   Editorial Header
   ========================= */
.article-header {
  margin-top: var(--space-lg);
  margin-bottom: 2rem;
}

.header-meta-row {
  display: grid;
  /* Date, Title (flexible), Author */
  grid-template-columns: 100px 1fr 100px; 
  align-items: baseline;
  gap: var(--space-md);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border); /* This is page-wide line */
}

.article-date {
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-sec);
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin: 0;
  text-align: center;
  color: var(--text);
}

.article-author {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-style: italic;
  text-align: right;
  color: var(--text-sec);
}
/* Drop Cap Styling */
.article-content > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 4rem;
  float: left;
  line-height: 1;
  margin-right: 0.75rem;
  color: var(--text);
  font-weight: 700;
}
.article-content p {
  margin-bottom: 1.5rem;
  clear: both; /* Ensures each paragraph starts fresh if the drop-cap is tall */
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  .header-meta-row {
    grid-template-columns: 1fr; /* Stack everything */
    text-align: left;
    gap: 0.5rem;
  }
  
  .article-title, .article-author {
    text-align: left;
  }
  
  .article-date {
    order: -1; /* Keep date at top */
  }
}