/* style.css */

/* Web fonts: EB Garamond for all text, Great Vibes for the homepage title.
   @import must stay at the very top of this file. */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Great+Vibes&display=swap');

/* EB Garamond runs small, so scale every rem-based size up 12.5%
   (16px -> 18px base). Adjust this one value to resize the whole site. */
html {
  font-size: 112.5%;
}

/* Force the main font everywhere, except inside MathJax equations,
   which need their own math fonts to render correctly. */
*:not(mjx-container *) {
  font-family: var(--main-font) !important;
}

:root {
  --main-font: 'EB Garamond', Georgia, serif;
  --text-color: #333333;
  --bg-color: #EFE6D5; /* A very subtle light ivory with a tinge of warm tan */
  --link-color: #0056b3;
  --accent-color: #D4CBBB; /* A subtle, warm grayish-brown */
  --spacing: 1.5rem;
}

/* Force the font to apply to all text elements generated by Markdown */
body, p, h1, h2, h3, h4, h5, h6, li, a, span {
  font-family: var(--main-font);
}

body {
  font-family: var(--main-font);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  margin: 0;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center; 
}

/* The central column */
.container {
  width: 100%;
  max-width: 650px; /* Keeps line lengths comfortable for reading */
  text-align: left; /* Ensures text is ragged-right */
}

/* "Back to Home" link at the top of posts */
.home-link {
  text-align: center;
  margin-bottom: 2rem;
}

/* Small Great Vibes "Curiosity Indulged" link back to the homepage */
.home-link a {
  font-family: 'Great Vibes', cursive !important;
  font-size: 1.6rem; /* script fonts read small; this is about body-text size */
  color: var(--text-color);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

/* Typography & Layout */
h1.site-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  font-weight: normal;
}

/* Script-font title (homepage). !important is needed to beat the global font rule. */
h1.script-title {
  font-family: 'Great Vibes', cursive !important;
  font-size: 3.2rem; /* ~58px at the 112.5% root size */
}

/* Tagline under the homepage title; pulls the title's bottom margin in so they read as one unit. */
h1.site-title + .tagline {
  text-align: center;
  font-style: italic;
  opacity: 0.75;
  margin-top: -2.5rem;
  margin-bottom: 3rem;
}

h1.post-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 500; /* medium rather than full bold: lighter, more bookish */
  margin-bottom: 1rem;
  line-height: 1.2;
}

.post-meta {
  text-align: center;
  margin-bottom: var(--spacing);
}

.post-author {
  font-size: 1.1rem;
  margin: 0.2rem 0;
}

.post-date {
  font-style: italic;
  color: #666666;
  margin: 0.2rem 0;
}

hr {
  border: 0;
  height: 1px;
  background-color: var(--accent-color);
  margin: 2rem 0;
}

/* Index Page specific styles */
.post-item {
  margin-bottom: 2.5rem;
}

.post-item h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25; /* keeps wrapped titles together */
  margin-bottom: 0.2rem;
}

.post-item a {
  color: var(--link-color);
  text-decoration: none;
}

.post-item a:hover {
  text-decoration: underline;
}

.post-item .date {
  font-style: italic;
  color: #666666;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  display: block;
}

.post-item p {
  margin-top: 0.5rem;
}

/* Content Formatting */
.content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto; /* Centers images within the text */
}

.content a {
  color: var(--link-color);
}

/* Subscribe Button */
.subscribe-section {
  text-align: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--accent-color);
}

/* Update these rules in your style.css */

.subscribe-btn {
  font-family: var(--main-font);
  background-color: transparent; /* Remove solid background */
  color: var(--text-color); /* Matches regular text */
  border: 1px solid var(--text-color); /* Thin black border */
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px; /* Optional: you can set this to 0px for sharp corners */
}

.subscribe-btn:hover {
  background-color: #555555; /* Changes on hover */
  color: #ffffff; /* Text becomes white for contrast */
}

.email-input {
  font-family: var(--main-font);
  padding: 0.75rem;
  font-size: 1rem;
  border: none; /* Strip border */
  border-bottom: 1px solid var(--text-color); /* Keep only bottom line */
  border-radius: 0; /* Ensures no corners on the box itself */
  margin-right: 0.5rem;
  width: 60%;
  max-width: 300px;
  background-color: transparent; /* Makes background vanish */
}

.email-input:focus {
  outline: none;
  border-bottom-width: 2px; /* Bottom line thickens when user clicks */
}

.post-tags {
  text-align: center;
  margin-top: -0.5rem;
  margin-bottom: 2rem;
}

.post-tag {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--text-color);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.85rem;
  margin: 0 0.2rem;
}

.post-tag:hover {
  background-color: #cccccc;
}

.index-tags {
  margin-top: 0.2rem;
  margin-bottom: 0.8rem;
}

/* Change standard lines into classic asterisks inside the post text */
.content hr {
  border: none;
  background: transparent;
  margin: 3rem 0;
  text-align: center;
  overflow: visible; /* Forces the browser to show content outside the invisible line */
  display: block;
  height: 1.5rem; /* Gives the asterisks physical space to exist */
}

.content hr::after {
  content: "* * *";
  display: inline-block;
  font-size: 1.2rem;
  letter-spacing: 0.5rem;
  color: var(--text-color);
}
/* ---- Tag navigation (generated by build_site.py) ---- */

/* All tags, shown under the homepage title */
.tag-cloud {
  text-align: center;
  margin-top: -1.5rem;
  margin-bottom: 3rem;
  line-height: 2.2;
}

.tag-count {
  font-size: 0.75em;
  opacity: 0.6;
  margin-left: 0.15rem;
}

/* Tag / intersection pages */
.tag-filter {
  text-align: center;
  margin-top: -2rem;
  margin-bottom: 3rem;
  line-height: 2.2;
}

.post-tag.active-tag {
  background-color: var(--text-color);
  color: var(--bg-color);
  font-size: 1rem;
}

.post-tag.active-tag:hover {
  background-color: #555555;
}

.post-tag .remove {
  margin-left: 0.3rem;
  opacity: 0.7;
}

.narrow-tags {
  margin-top: 0.8rem;
}

.narrow-label {
  font-style: italic;
  color: #666666;
  margin-right: 0.4rem;
}

.post-item .post-tag {
  color: var(--text-color);
}
