@import url('//fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400&family=Lora:ital,wght@0,400;0,700;1,400&family=Playfair+Display+SC:wght@400;900&display=swap');

/* =========================
   general
   ========================= */
:root {
  --bg-color: #fafafa;                 /* softer page background */
  --code-bg-color: #f4f4f4;
  --text-color: #212121;
  --secondary-color: #808080;
  --tertiary-color: #b0b0b0;

  --link-color: #b5c8cf;
  --link-hover-color: #618794;
  --link-bg-color: #dae4e7;
  --selection-color: #dae4e7;

  --accent-color: #FF6B00;             /* Penguin-ish orange */

  --body-stack: "Lora", "Georgia", "Times New Roman", serif;
  --secondary-stack: "Lato", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "Verdana", sans-serif;
  --title-stack: "Playfair Display SC", "Georgia", serif;

  /* Pro responsive widths */
  --gutter: 4vw;
  --wrapper-max: 1200px;               /* overall container width on desktop */
  --measure-prose: 72ch;               /* ideal post reading width */
  --measure-page: 1000px;              /* wider pages (About, etc.) */
}

html { height: 100%; }

body {
  background: var(--bg-color);
  color: var(--text-color);
  font-family: var(--body-stack);
  font-size: 16px;
  font-size: clamp(16px, 2.4vw, 21px);
  margin: auto;
  min-height: 100%;
  position: relative;
  width: 100%;
}

/* wrapper */
#wrapper {
  background: none;
  border: none;
  box-sizing: border-box;
  display: block;
  margin: 3rem auto 10rem auto;
  max-width: 100%;
  padding: 1em;

  /* CHANGED:
     Was: width: 32em; (too narrow on desktop)
     Now: responsive width with a desktop cap */
  width: min(calc(100vw - (var(--gutter) * 2)), 32em);
}

/* On desktop, widen the wrapper (this is the main fix) */
@media (min-width: 1000px) {
  #wrapper {
    width: min(calc(100vw - (var(--gutter) * 2)), var(--wrapper-max));
  }
}

@media all and (max-width:760px) { #wrapper { margin-top: 3rem; } }
@media all and (max-width:520px) { #wrapper { margin-top: 1rem; } }

/* =========================
   header
   ========================= */
#header {
  border-bottom: solid 1px var(--secondary-color);
  line-height: 0.6em;
  padding: 0.25em 0;
  position: relative; /* needed for orange line below */
}

/* Orange accent line under the header divider */
#header::after {
  content: "";
  display: block;
  height: 1px;
  background: var(--accent-color);
  margin-top: 6px;
}

#title {
  font-family: var(--title-stack);
  font-size: 2em;
  font-weight: 900;
  letter-spacing: 0.05em;
  margin: 1em 0;
  text-align: center;
}

#header nav {
  margin: 2em 0;
  text-align: center;
}

.nav-link, .nav-spacer, .article-more-link {
  font-family: var(--secondary-stack);
  color: var(--secondary-color);
}

.nav-spacer {
  margin: 0 0.5em;
  color: var(--accent-color); /* Home × Archives */
}

/* =========================
   posts
   ========================= */
.article {
  border-bottom: solid 1px var(--secondary-color);
  margin: 2em 0;
  padding-bottom: 1em;
}

.article-header {
  margin-bottom: 1.75em;
  text-align: center;
}

.article-title {
  font-family: var(--title-stack);
  font-size: 2em;
  font-weight: normal;
  letter-spacing: 0.05em;
  margin-bottom: .25em;
}

.article-entry {
  line-height: 1.7;      /* nicer reading */
  margin-bottom: 1em;
  overflow: visible;
}

.article-entry p {
  margin-bottom: 1.3em;  /* nicer paragraph spacing */
}

.article-category {
  line-height: 1.5;
}

.article-meta,
.archive-article-date,
.article-nav,
.page-nav,
.article-footer,
.archive-article-word-count {
  color: var(--secondary-color);
  font-family: var(--secondary-stack);
  font-size: 0.9em;
  height: auto;
  line-height: inherit;
  margin: 0;
  padding: 0;
}

@media all and (max-width:760px) {
  .article-meta,
  .archive-article-date,
  .article-nav,
  .page-nav,
  .article-footer,
  .archive-article-word-count {
    font-size: 1em;
  }
}

/* meta separator × (date × words × minutes) */
.meta-sep { color: var(--accent-color); }

/* =========================
   archive
   ========================= */
.archives-wrap {
  margin: 0.25rem 0;
  position: relative;
  top: 0.5rem;
}

@media all and (max-width:620px) {
  .archives-wrap { margin-left: 1rem; }
}

.month {
  color: var(--secondary-color);
  cursor: pointer;
  font-family: var(--secondary-stack);
}

.hidden, .hidden-input {
  display: none;
  margin-bottom: 1em;
}

.hidden-input ~ .month::before {
  content: "+ ";
  position: absolute;
  left: -1em;
}

.hidden-input:checked ~ .month::before { content: "– "; }
.hidden-input:checked ~ .hidden { display: block; }

.archive-article {
  margin: 0.25em 0;
  position: relative;
}

.archive-article-header {
  align-items: center;
  display: inline-flex;
}

.archive-article-date {
  position: absolute;
  right: calc(100% - 1.5em);
}

.archive-article-title { margin-right: 0.5em; }

.archive-article-title {
  font: inherit;
  left: 2em;
  letter-spacing: 0;
  margin: 0;
  max-width: calc(100vw - 6rem);
  position: relative;
  text-align: left;
  text-decoration: none;
  text-transform: none;
}

/* =========================
   nav (older/newer)
   ========================= */
.article-nav {
  display: flex;
  margin: 2em 0;
}

#article-nav-older, #article-nav-newer { flex-basis: 50%; }
#article-nav-newer { order: 1; text-align: right; }

/* =========================
   pagination
   ========================= */
.page-nav {
  margin: 1em 0;
  text-align: center;
}

.page-number, .space, .extend {
  font-size: 1.3em;
  margin: 0 0.4em;
}

.current { color: var(--text-color); }

/* =========================
   typography
   ========================= */
a {
  color: inherit;
  text-decoration: none;
}

p, ul, ol, h1, h2, h3, h4, h5, h6 { margin: 0 0 1rem 0; }
ul, ol { padding-left: 1em; }

h1, h2, h3, h4, h5, h6 {
  font-weight: normal;
  letter-spacing: 0.1em;
  text-align: center;
  text-decoration: none;
}

h1, h2 {
  font-size: 2em;
  letter-spacing: 0;
  margin-top: 2rem;
}

h2 { font-size: 1.5em; }

h3, h4, h5, h6 {
  font-size: 1em;
  font-weight: bold;
  margin-top: 1.5rem;
  text-transform: uppercase;
}

h4, h5, h6 {
  font-size: 0.9em;
  margin-top: 1rem;
}

blockquote {
  display: block;
  margin: 0 0 1em;
  padding-left: .75rem;
  border-left: 1px solid var(--tertiary-color);
}

.article .article-entry blockquote footer, .caption {
  color: var(--secondary-color);
  display: block;
  text-align: center;
}

.article .article-entry blockquote footer cite:before { content: " — "; }

.pullquote {
  border: 0;
  color: var(--secondary-color);
  font-size: 1.2em;
  font-family: var(--secondary-stack);
  margin: 0;
  width: 40%;
}

.pullquote p { margin: 0; }

.pullquote.left {
  float: left;
  padding: 1em 1em 1em 0;
  text-align: left;
}

.pullquote.right {
  float: right;
  padding: 0 1em 1em 1em;
  text-align: right;
}

.caption {
  color: #aeb4b9;
  display: block;
  font-size: 0.8em;
  text-align: center;
}

.katex { font-size: 1.1em; }

/* normal links inside article body get underline via border */
.article-entry a {
  -webkit-transition-duration: .3s;
  -webkit-transition-property: border-bottom;
  border-bottom: 3px solid var(--link-color);
  transition-duration: .3s;
  transition-property: border-bottom;
}

.article-entry a:hover {
  -webkit-transition-duration: .3s;
  -webkit-transition-property: border-bottom;
  border-bottom: 3px solid var(--link-hover-color);
  transition-duration: .3s;
  transition-property: border-bottom;
}

/* link hover background */
#title a, .article-title a, a.nav-link, .archive-article-title a,
.article-nav a, a.page-number, a.extend, .month, .article-footer a,
.article-category a, .article-tag a, .article-more-link a {
  -webkit-transition-duration: .3s;
  -webkit-transition-property: background;
  transition-duration: .3s;
  transition-property: background;
}

#title a:hover, .article-title a:hover, a.nav-link:hover, .archive-article-title a:hover,
.article-nav a:hover, a.page-number:hover, a.extend:hover, .month:hover, .article-footer a:hover,
.article-category a:hover, .article-tag a:hover, .article-more-link a:hover {
  -webkit-transition-duration: .3s;
  -webkit-transition-property: background;
  background: var(--link-bg-color);
  transition-duration: .3s;
  transition-property: background;
}

/* category/tags */
.article-category, .article-tag {
  color: var(--secondary-color);
  font-family: var(--secondary-stack);
  margin-top: 2em;
}

/* =========================
   read-more ("...")
   ========================= */
.article-more-link {
  margin-bottom: 1.1em;
  text-align: center;
  text-transform: none;     /* no forced uppercase */
  letter-spacing: 0;        /* nicer for dots */
}

/* bigger dots, no underline/line */
.article-more-link a {
  color: var(--accent-color);
  background: transparent;
  text-decoration: none;
  border: none;
  box-shadow: none;
  font-size: 1.8em;         /* tweak: 1.6em–2.2em */
  line-height: 1;
  display: inline-block;
}

/* =========================
   miscellaneous
   ========================= */
img {
  box-sizing: border-box;
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

a img {
  -webkit-transition-duration: .3s;
  -webkit-transition-property: border;
  border: 3px solid var(--bg-color);
  transition-duration: .3s;
  transition-property: border;
}

a img:hover {
  -webkit-transition-duration: .3s;
  -webkit-transition-property: border;
  border: 3px solid var(--secondary-color);
  transition-duration: .3s;
  transition-property: border;
}

.article-gallery img, table { margin: 1em auto; }

td, th, table caption, table td, table th {
  border-bottom: 1px solid var(--tertiary-color);
  padding: 0.25em;
}

.video-container {
  position: relative;
  padding-top: 56.25%;
  margin-bottom: 1em;
  height: 0;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin-top: 0;
}

::selection { background-color: var(--selection-color); }

/* settings widget */
#settings-container {
  background: var(--tertiary-color);
  bottom: 0;
  position: fixed;
  right: 0;
}

#sans-font, #dark-mode {
  cursor: pointer;
  float: right;
  padding: 0.5em;
}

/* Kill the tiny line under the "..." and make dots bigger */
.article-more-link a {
  border-bottom: 0 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  background-image: none !important;

  font-size: 2.4em !important;   /* noticeably bigger */
  line-height: 1 !important;
  display: inline-block;
}

/* ============================
   Pro responsive content widths
   (Optional: keep pages slightly wider than posts)
   ============================ */

/* Posts: keep comfortable measure even when wrapper is wide */
@media (min-width: 1000px) {
  #content .article-entry {
    max-width: min(calc(100vw - (var(--gutter) * 2)), var(--measure-prose));
    margin-left: auto;
    margin-right: auto;
  }

  /* Pages (About, etc.) a bit wider */
  body.page #content .article-entry {
    max-width: min(calc(100vw - (var(--gutter) * 2)), var(--measure-page));
  }
}
pre.poem{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;

  margin-left: auto !important;
  margin-right: auto !important;
  display: table;      /* makes it shrink-to-fit, so centering works */
  text-align: left;

  white-space: pre;
  overflow: visible;
  tab-size: 4;
}
.ascii{
  font-family: Courier, monospace;
}
pre.poem {
  white-space: pre;
}
@media (max-width: 600px) {
  pre.poem {
    font-size: clamp(0.72rem, 2.6vw, 0.95rem);
  }
}
@media (max-width: 600px) {
  pre.poem {
    /* keep exact formatting */
    white-space: pre !important;
    }
}
pre.poem.poem-center{
  display: block !important;     /* override display: table */
  width: 100% !important;        /* give it real width to center within */
  text-align: center !important; /* center the lines */
}

.poem {
  text-align: left;
  margin: 0 auto;
  max-width: 42rem;
  line-height: 1.6;
}

.poem{
  white-space: pre-wrap;
}