/* ============================================
   Site-wide styles
   Edit the values in :root to change colors/fonts
   across the entire site in one place.
   ============================================ */

:root {
  /* ---- Colour theme: change these to restyle the whole site ---- */
  /* The page background is a seashore scene, top to bottom:
     white clouds, sky blue, deep ocean blue, sand, seagrass green. */
  --scene: linear-gradient(180deg,
    #ffffff 0%,
    #fbf8f1 5%,
    #e6ebe4 12%,
    #c3d4d2 24%,
    #8fadb2 36%,
    #5f8592 44%,
    #46697a 54%,
    #5f8592 62%,
    #a3bab4 67%,
    #e2d4b6 71%,
    #d5c19d 80%,
    #b3b28c 86%,
    #8f9873 92%,
    #6a7656 100%);
  /* faint paper grain laid over the scene for a weathered, vintage feel */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.27  0 0 0 0 0.18  0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --panel-bg: rgba(248, 241, 226, 0.94);   /* the reading panel: aged paper */
  --header-text: #34505a;
  --header-muted: #5a6f72;
  --footer-text: #f6f0e2;
  --color-text: #2e2a24;
  --color-muted: #665e50;
  --color-accent: #3f6a78;     /* links: weathered sea blue */
  --color-hover: #a5553a;      /* link hover, quote bar: faded rust */
  --color-border: #c4ab80;

  --font-body: Georgia, 'Times New Roman', serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --max-width: 48rem;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--grain), var(--scene);
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.65;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-hover);
  text-decoration-thickness: 2px;
}

main.wrap {
  flex: 1;
  width: calc(100% - 2rem);
  background: var(--panel-bg);
  border-radius: 14px;
  padding: 2.25rem 2.5rem 2.5rem;
  background-image: var(--grain);
  box-shadow: 0 6px 24px rgba(60, 50, 35, 0.22);
}

@media (max-width: 600px) {
  main.wrap { padding: 1.5rem 1.25rem 2rem; }
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Header / nav ---- */

header.site-header {
  padding: 2.5rem 0 1.5rem;
  margin-bottom: 2.5rem;
}

header.site-header .site-title {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
}

header.site-header .site-title a {
  color: var(--header-text);
  text-decoration: none;
}

header.site-header .tagline {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--header-muted);
  margin: 0 0 1rem;
}

nav.site-nav {
  font-family: var(--font-ui);
  font-size: 0.95rem;
}

nav.site-nav a {
  margin-right: 1.25rem;
  color: var(--header-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

nav.site-nav a:hover {
  color: var(--header-text);
  border-bottom-color: var(--header-text);
}

/* ---- Footer ---- */

footer.site-footer {
  margin-top: 2rem;
  padding: 2rem 0 3rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--footer-text);
}

/* ---- Landing page intro ---- */

.intro {
  margin-bottom: 3rem;
}

.intro h1 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

/* ---- Essay / article list ---- */

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

.essay-list li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.essay-list li:first-child {
  border-top: 1px solid var(--color-border);
}

.essay-list .essay-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.essay-list .essay-title a {
  text-decoration: none;
  color: var(--color-text);
}

.essay-list .essay-title a:hover {
  color: var(--color-hover);
}

.essay-list .essay-meta {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-top: 0.2rem;
}

.essay-list .essay-excerpt {
  margin-top: 0.4rem;
  color: var(--color-muted);
  font-size: 0.97rem;
}

/* ---- Single essay page ---- */

article.essay h1 {
  font-size: 2rem;
  line-height: 1.25;
  margin-bottom: 0.3rem;
}

article.essay .essay-meta {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 2.5rem;
}

article.essay p {
  margin: 1.3rem 0;
}

article.essay blockquote {
  margin: 1.5rem 0;
  padding-left: 1.2rem;
  border-left: 3px solid var(--color-hover);
  color: var(--color-muted);
  font-style: italic;
}

.back-link {
  display: inline-block;
  margin-top: 3rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
}

figure.portrait {
  margin: 2rem 0;
  max-width: 320px;
}

figure.portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(42, 40, 34, 0.25);
}

/* ---- Photo album (homepage) ---- */

.album {
  margin-top: 3.5rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.25rem 1.75rem;
  margin-top: 1.5rem;
}

.photo-grid figure {
  margin: 0;
}

.photo-grid img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 4px 14px rgba(42, 40, 34, 0.28);
}

.photo-grid figcaption {
  margin-top: 0.7rem;
}

.photo-grid .photo-place {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--color-muted);
}

.photo-grid .photo-quote {
  display: block;
  margin-top: 0.25rem;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .photo-grid { grid-template-columns: 1fr; }
}
