:root {
  --bg: #1a1a1a;
  --text: #e4e4e4;
  --text-muted: #999;
  --text-muted-light: #888;
  --border: #333;
  --border-light: #2a2a2a;
  --link: #ddd;
  --link-list: #e4e4e4;
}

[data-theme="light"] {
  --bg: #f4ecd8;
  --text: #3a3226;
  --text-muted: #888;
  --text-muted-light: #999;
  --border: #ddd;
  --border-light: #eee;
  --link: #333;
  --link-list: #222;
}

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

a:visited {
  color: inherit;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background 0.2s ease, color 0.2s ease;
}

.page-wrapper {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
}

/*
HOMEPAGE SPECIFIC CSS
*/

/*
Automatic first-line indent per paragraph, no manual formatting needed 
in the Markdown source.
*/
.home-text p {
  text-indent: 1.5em;
  margin-bottom: 0;
}
/*
There might be a print standard that the first paragraph
under a title shouldn't be indented. This looks weird, but
in case I need it for something later, here it is.

.home-text p:first-child {
  text-indent: 0;
}
*/

/*
SIDEBAR SPECIFIC CSS
*/
.sidebar {
  flex: 0 0 225px;
  padding: 2rem 1rem;
  border-right: 1px solid var(--border);
  text-align: center;
}

.sidebar h2 {
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.sidebar ul {
  list-style: none;
  font-size: 1.75rem;

  padding: 0;
}

.sidebar li {
  margin-bottom: 0.5rem;
}

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

.sidebar a:hover {
  text-decoration: underline;
}

main {
  flex: 1;
  padding: 2rem;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.date {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0;
}

/*
ESSAY SPECIFIC CSS
*/
.essay-text {
  font-size: 1.05rem;
}

/*
Traditional word-processor-style paragraph indenting.
Each paragraph's first line indents automatically — this replaces
manual formatting (tabs, spans, etc.) entirely. Author writes plain
Markdown paragraphs; this CSS rule does 100% of the visual work.
*/
.essay-text p {
  text-indent: 1.5em;
  margin-bottom: 0;  /* indent replaces the paragraph gap, matching print convention */
}

/*
Exception: the paragraph right after the title/date shouldn't be
indented — only paragraphs that follow another paragraph should be.
*/
.essay-text p:first-child {
  text-indent: 0;
}

/*
QUOTE SPECIFIC CSS
*/
.quote-text {
  font-style: italic;
}

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

.quote-list a {
  text-decoration: none;
  color: var(--link-list);
  font-size: 1.1rem;
}

/*
POEM SPECIFIC CSS
*/
.poem-text {
  font-family: inherit;
  font-size: 1.1rem;
}
.poem-text p {
  margin-bottom: 0.0rem;
}

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

.poem-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.3rem 0.25rem;
  border-bottom: 1px solid var(--border-light);
}

.poem-list a {
  text-decoration: none;
  color: var(--link-list);
  font-size: 1.1rem;
}

.poem-list a:hover {
  text-decoration: underline;
}

.poem-list .date {
  font-size: 0.85rem;
  color: var(--text-muted-light);
  white-space: nowrap;
  margin-left: 1rem;
}

.poem-body {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.poem-body img {
  max-width: 300px;
  width: 100%;
  height: auto;
  flex-shrink: 0;
}

/*
DARK MODE / THEME TOGGLE
*/
#theme-toggle {
  margin-top: 1.5rem;
  padding: 0.4rem 0.8rem;
  font-family: inherit;
  font-size: 0.85rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
}

#theme-toggle:hover {
  border-color: var(--text-muted);
}

/* NAV TOGGLE (HIDDEN BY DEFAULT ON DESKTOP) */
#nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.5rem;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  border-radius: 4px;
}

/*
Consider organizing into desktop above? Mobile below?
*/

/*
FOR SCREENS LESS THAN 768px (MOBILE, USUALLY)
*/
@media (max-width: 768px) {
  .poem-body {
    flex-direction: column;
  }

  #nav-toggle {
    display: block;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 20;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 250px;
    background: var(--bg);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 15;
    overflow-y: auto;
    text-align: center;
    padding: 2rem 1rem;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  main {
    padding: 1.5rem 1rem;
  }
}



