/* ===== ronnlof.com — shared stylesheet ===== */

:root {
  --text: #1c1c1a;
  --text-muted: #6b675f;
  --border: #ddd8cc;
  --bg: #faf8f3;
  --accent: #7a2a2a;
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  max-width: 640px;
  padding: 2rem 1.25rem 3rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
a:hover { border-bottom-color: var(--accent); }

h1, h2, h3 {
  margin: 1.2em 0 0.4em;
  line-height: 1.25;
  font-weight: 700;
}

p { margin: 0 0 1em; }

hr {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid var(--border);
}

/* ---- Masthead / Nav ---- */
.nav-wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 2.5rem;
}

.site-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  border-bottom: none;
  letter-spacing: 0.02em;
}

.site-nav a {
  color: var(--text-muted);
  border-bottom: none;
  font-size: 0.9rem;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--accent); }

.site-nav .sep {
  color: var(--border);
  margin: 0 0.4rem;
}

/* ---- Hero (home page) ---- */
.hero {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.hero-photo {
  flex: none;
  width: 84px;
  height: 84px;
  overflow: hidden;
  border: 2px solid var(--accent);
  background: var(--border);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.hero h1 { margin: 0 0 0.15em; font-size: 1.6rem; }

.hero .tagline { color: var(--text-muted); margin-bottom: 0; font-style: italic; }

.about-blurb { max-width: 560px; margin-bottom: 1.25rem; }

.hero-links a {
  margin-right: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.hero-links a:hover { border-bottom-color: var(--accent); }

/* ---- Sections ---- */
.section {
  padding: 2rem 0 0;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-heading h2 { margin-top: 0; margin-bottom: 0; }
.section-heading a { border-bottom: none; font-size: 0.9rem; }

/* ---- Gallery grid ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
}

.gallery-grid figure {
  margin: 0;
  aspect-ratio: 1 / 1;
  background: var(--bg);
}

.gallery-grid img { width: 100%; height: 100%; object-fit: cover; }

.placeholder-photo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
}

/* ---- Newsletter ---- */
.newsletter p { color: var(--text-muted); }
.newsletter p:last-child { font-size: 0.85rem; }

.newsletter-form {
  margin: 1rem 0 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.newsletter-form input[type="email"] {
  padding: 0.45rem 0.6rem;
  font-family: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  background: #fff;
  min-width: 220px;
}

.newsletter-form button {
  padding: 0.45rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  cursor: pointer;
}
.newsletter-form button:hover { opacity: 0.85; }

.newsletter-status {
  font-size: 0.9rem;
  min-height: 1.2em;
}

/* ---- Page header (non-home pages) ---- */
.page-header { margin-bottom: 1.5rem; }
.page-header h1 { margin-top: 0; }
.page-header p { color: var(--text-muted); margin-bottom: 0; }

/* ---- Blog list ---- */
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-card {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.post-card:first-child { padding-top: 0; }

.post-card .post-meta {
  flex: none;
  width: 6.5rem;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.post-card .post-title-line {
  flex: 1;
  min-width: 0;
}

.post-card h3 {
  display: inline;
  font-size: 1rem;
  font-weight: 400;
  margin: 0;
}
.post-card h3 a { border-bottom: none; color: var(--text); }
.post-card h3 a:hover { border-bottom: 1px solid var(--accent); }

.post-excerpt {
  display: block;
  margin: 0.2em 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---- Single post ---- */
.post-body { padding: 0; }
.post-body .post-meta {
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: none;
}
.back-link:hover { color: var(--accent); }

/* ---- About page ---- */
.about-body { padding: 0; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 1.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer p { margin: 0 0 0.4em; }

.site-footer .socials {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.site-footer .socials a {
  color: var(--text-muted);
  border-bottom: none;
  display: inline-flex;
}
.site-footer .socials a:hover { color: var(--accent); }
.site-footer .socials svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

/* ---- Utility ---- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { flex-direction: column; align-items: flex-start; }
  .post-card { flex-direction: column; gap: 0.15rem; }
  .post-card .post-meta { width: auto; }
}
