:root {
  --bg-color: #ddeedd;
  --text-color: #111111;
  --link-color: #111111;
  --header-color: #111111;
  --footer-color: #111111;
  --section-border: rgba(0, 0, 0, 0.1);
  --font-mono: "VCTR Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #3b3a30;
    --text-color: #eeeeee;
    --link-color: #eeeeee;
    --header-color: #eeeeee;
    --footer-color: #eeeeee;
    --section-border: rgba(255, 255, 255, 0.1);
  }
}

body {
  font-family: var(--font-mono);
  line-height: 1.5; /* Slightly tighter line height */
  max-width: 98%; /* Use almost full width */
  margin: 0; /* Left align everything */
  padding: 0.5rem 1rem; /* Significantly reduced padding */
  background-color: var(--bg-color);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Sticky-footer layout: main grows to fill, footer flows below content */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Main fills the space between header and footer.
   min-height: 0 lets it shrink so the home page can scroll columns internally. */
main {
  flex: 1 1 auto;
  min-height: 0;
}

footer {
  padding: 1rem 2rem;
  margin: 0;
  background-color: inherit;
  box-sizing: border-box;
}

header {
  padding: 0.5rem 0;
  font-family: var(--font-mono);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--section-border);
  padding-bottom: 0.3rem;
  margin-bottom: 0.6rem; /* Even tighter gap after nav */
}

nav > a:first-child {
  font-size: 1.4rem;
  font-style: italic;
  font-weight: normal;
  text-transform: lowercase;
  text-decoration: none;
}

.nav-links a {
  margin-left: 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-style: normal; /* Keep nav links normal */
}

main {
  padding: 0;
}

h1, h2, h3 {
  color: var(--header-color);
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0; /* Remove top margin for tighter layout */
}

h1 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 0.8rem;
  border-bottom: 1px solid var(--section-border);
  padding-bottom: 0.25rem;
  margin-bottom: 1rem;
}

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

  /* Plum wipe on hover. The background is a solid plum block anchored at the
     left edge whose width grows from 0 to 100% (left to right). Because
     nothing is painted at rest (size 0), there is no stray 1px bar at the
     link's left edge that the old two-tone-gradient trick left behind. */
  background-image: linear-gradient(#50394c, #50394c);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 0% 100%;

  /* Smoothly animate the wipe and the text color change */
  transition: background-size 0.3s ease, color 0.3s ease;
}

a:hover {
  /* Grow the plum background across the link (left to right) */
  background-size: 100% 100%;

  /* Change the text color to the background color */
  color: var(--bg-color);

  /* Keep the underline */
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.post-item:last-child {
  margin-bottom: 0;
}

.post-date {
  display: inline;
  font-size: 0.75rem;
  color: var(--footer-color);
  font-family: var(--font-mono);
  margin-right: 0.5rem;
}

section {
  margin: 0 0 0.75rem;
}

.scattered-thoughts .post-list {
  padding-left: 0;
}

.scattered-thoughts .post-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0;
  font-size: 0.82rem;
}

.scattered-thoughts .post-item::before {
  content: "⇝";
  display: inline-block;
  margin-right: 0.35rem;
  color: var(--link-color);
}

.scattered-thoughts .post-item a {
  text-decoration: none;
}

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

.clipping-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--section-border);
}

/* Separator lines between "Write anything" items, like the clippings column */
.give-me-10-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--section-border);
}

.clipping-meta {
  margin-bottom: 0.35rem;
}

.clipping-preview a {
  text-decoration: none;
}

.clipping-preview a:hover {
  text-decoration: underline;
}

/* Home Grid Layout */
.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  position: relative;
}

.home-grid > section {
  padding: 0 0.85rem;
}

@media (min-width: 600px) {
  .home-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-grid > section:not(:first-child) {
    border-left: 1px solid var(--section-border);
  }
}

@media (min-width: 800px) and (max-width: 999px) {
  .home-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

footer {
  text-align: left; /* Left align footer too */
  font-size: 0.75rem;
  color: var(--footer-color);
  border-top: 1px solid var(--section-border);
  padding-top: 1rem;
}

/* Single Post Styles */
article {
  max-width: 600px; /* Allow articles to be wider but still readable */
  margin: 0; /* Left align articles */
}

article h1 {
  text-transform: none;
  letter-spacing: normal;
  font-size: 1.75rem;
  margin-top: 1rem;
}

.post-tags {
  margin-top: 1rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--footer-color);
  display: inline-block;
}

hr {
  margin: 2rem 0;
}

.botanical-divider {
  text-align: center;         /* Centers the symbols on the page */
  margin: 3rem 0;           /* Adds spacious margin before and after the divider */
  font-size: 1.1rem;          /* Optional: Adjusts the size of the symbols */
  color: var(--text-color);   /* Keeps the color matching your text */
  white-space: nowrap;        /* Keeps the symbols grouped on a single line */
  letter-spacing: 1px;        /* Optional: Gives the characters a tiny bit of breathing room */
}

