/* ===========================
   Jay's Travel Log — main.css
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300;1,400&family=DM+Mono:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --cream: #f7f3ea;
  --cream-dark: #ede8db;
  --cream-mid: #f0ebe0;
  --teal: #1a4150;
  --teal-light: #255e72;
  --teal-muted: #4a7d8f;
  --gold: #b07e1a;
  --gold-light: #d4a030;
  --ink: #252320;
  --ink-light: #5a5450;
  --border: #d5ccb8;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;
  --max-width: 740px;
  --radius: 2px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.main-content {
  flex: 1;
  padding: 2.75rem 0 5rem;
}

/* ---- Header ---- */
.site-header {
  background-color: var(--teal);
  padding: 2.25rem 0 2rem;
  position: relative;
  overflow: hidden;
}

/* Subtle texture overlay */
.site-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 50%, rgba(176,126,26,0.08) 0%, transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.04) 0%, transparent 50%);
  pointer-events: none;
}

.site-header .container {
  position: relative;
  z-index: 1;
}

.site-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.site-title:hover {
  color: #fff;
}

.site-tagline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(247, 243, 234, 0.55);
  margin-top: 0.4rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Gold rule below header */
.header-rule {
  height: 2px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 40%, transparent 100%);
}

/* ---- Post List ---- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-card {
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.post-card:first-child {
  padding-top: 0;
}

.post-card-inner {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

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

.post-card-thumb {
  flex-shrink: 0;
  width: 110px;
  height: 80px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.post-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-location {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-light);
  letter-spacing: 0.04em;
}

.post-location::before {
  content: "· ";
  color: var(--border);
}

.post-title {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.55rem;
}

.post-title a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.15s;
}

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

.post-summary {
  color: var(--ink-light);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.65;
}

.read-more {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.15s;
}

.read-more:hover {
  color: var(--gold-light);
}

.no-posts {
  font-style: italic;
  color: var(--ink-light);
  padding: 2rem 0;
}

/* ---- Single Post ---- */
.post-hero {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 2.25rem;
  border: 1px solid var(--border);
}

.post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-height: 420px;
}

.post-single .post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-single .post-title {
  font-size: 2.2rem;
  color: var(--teal);
  margin-top: 0.5rem;
  font-style: italic;
}

.post-content {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.07rem;
  line-height: 1.9;
  color: var(--ink);
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--teal);
  margin: 2.25rem 0 0.75rem;
}

.post-content h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--teal);
  margin: 1.75rem 0 0.5rem;
}

.post-content blockquote {
  border-left: 2px solid var(--gold);
  margin: 2rem 0;
  padding: 0.75rem 1.5rem;
  color: var(--ink-light);
  font-style: italic;
  background: var(--cream-mid);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--cream-dark);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

.post-content img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  margin: 1.75rem auto;
  border: 1px solid var(--border);
}

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.post-content li {
  margin-bottom: 0.4rem;
}

.post-content hr {
  border: none;
  text-align: center;
  margin: 2.5rem 0;
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 0.5em;
}

.post-content hr::after {
  content: "· · ·";
}

.post-nav {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.back-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--teal);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.15s;
}

.back-link:hover {
  color: var(--gold);
}

/* ---- Section Title ---- */
.section-title {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  color: var(--teal);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  font-style: italic;
}

/* ---- 404 Page ---- */
.error-page {
  text-align: center;
  padding: 5rem 0;
}

.error-code {
  font-family: var(--font-heading);
  font-size: 5rem;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 1rem;
  font-style: italic;
}

.error-message {
  color: var(--ink-light);
  font-style: italic;
  margin-bottom: 2rem;
}

/* ---- Footer ---- */
.site-footer {
  background-color: var(--cream-dark);
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
}

.footer-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-light);
  letter-spacing: 0.07em;
  text-align: center;
  opacity: 0.7;
}

/* ---- Responsive ---- */
@media (min-width: 600px) {
  .site-title {
    font-size: 2.5rem;
  }

  .post-single .post-title {
    font-size: 2.7rem;
  }

  .post-card-thumb {
    width: 130px;
    height: 95px;
  }
}
