/* ============================================================
   Random Thoughts — stylesheet
   All pages link to this file.
   ============================================================ */

:root {
  --cream: #f7f3ed;
  --paper: #faf8f4;
  --ink: #1a1612;
  --ink-light: #4a4540;
  --ink-faint: #9a9590;
  --accent: #8b3a2a;
  --accent-light: #c4714f;
  --rule: #e0d8cf;
  --max-width: 680px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 18px; scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Header ── */
header {
  background: var(--ink);
  color: var(--cream);
  padding: 3rem 2rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 40px,
    rgba(255,255,255,0.015) 40px,
    rgba(255,255,255,0.015) 41px
  );
}

.site-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 2.8rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  position: relative;
}

.site-title span {
  color: var(--accent-light);
}

.site-tagline {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(247,243,237,0.55);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
}

/* ── Nav ── */
nav {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 0 2rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

nav a {
  display: inline-block;
  padding: 0.9rem 0.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-light);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

nav a:hover,
nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Main layout ── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ── About strip (home page intro box) ── */
.about-strip {
  max-width: var(--max-width);
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

.about-box {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 1.2rem 1.5rem;
  font-size: 0.88rem;
  color: var(--ink-light);
  border-radius: 0 3px 3px 0;
}

.about-box strong {
  font-weight: 600;
  color: var(--ink);
}

/* ── Posts ── */
article {
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--rule);
  animation: fadeUp 0.5s ease both;
}

article:last-of-type {
  border-bottom: none;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

article:nth-child(2) { animation-delay: 0.1s; }
article:nth-child(3) { animation-delay: 0.2s; }

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.post-date {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.post-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(139,58,42,0.08);
  padding: 0.15rem 0.55rem;
  border-radius: 2px;
}

.post-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 1.1rem;
}

.post-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

.post-title a:hover {
  color: var(--accent);
}

.post-body p {
  margin-bottom: 1.1rem;
  color: var(--ink-light);
}

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

/* ── Photos ── */
.post-photo {
  margin: 1.5rem 0;
  border-radius: 3px;
  overflow: hidden;
  background: var(--rule);
}

.post-photo img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.post-photo:hover img {
  transform: scale(1.01);
}

.post-photo figcaption {
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
  color: var(--ink-faint);
  font-style: italic;
  background: var(--paper);
  border-top: 1px solid var(--rule);
}

.photo-placeholder {
  width: 100%;
  height: 320px;
  background: linear-gradient(135deg, #e8e0d5 0%, #d4c8b8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--ink-faint);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}

.photo-placeholder svg {
  opacity: 0.35;
}

/* ── Photo orientation classes ── */

/* Landscape — natural 3:2 crop, suits most outdoor/scene photos */
.post-photo.landscape img {
  height: 460px;
  width: 100%;
  object-fit: cover;
  object-position: center;
}

/* Portrait — controlled height so tall photos don't overwhelm the page */
.post-photo.portrait img {
  height: 800px;
  width: 100%;
  object-fit: cover;
  object-position: center;
}

/* ── Read more link ── */
.read-more {
  display: inline-block;
  margin-top: 1.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-light);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.read-more:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ── About page ── */
.page-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.page-body p {
  margin-bottom: 1.2rem;
  color: var(--ink-light);
}

.page-body p:last-child {
  margin-bottom: 0;
}

/* ── Footer ── */
footer {
  background: var(--ink);
  color: rgba(247,243,237,0.4);
  text-align: center;
  padding: 2rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

footer a {
  color: rgba(247,243,237,0.6);
  text-decoration: none;
}

/* ── Responsive ── */
@media (max-width: 520px) {
  .site-title { font-size: 2rem; }
  .post-title { font-size: 1.4rem; }
  nav { gap: 1.2rem; }
}
