/* Renter-Friendly Smart Home Log — hand-rolled theme
   Palette: deep slate + warm white + deep teal */

:root {
  --charcoal: #15201e;
  --charcoal-2: #22332f;
  --ink: #2b241b;
  --paper: #fdfaf2;
  --cream: #f6efdd;
  --cream-2: #efe4c9;
  --accent: #0e7a6d;
  --accent-dark: #095a50;
  --muted: #7d7261;
  --line: #e3d8bf;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.075rem;
  line-height: 1.7;
}

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

img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Header ---------- */
.site-header {
  background: var(--charcoal);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .8rem;
  padding-bottom: .8rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--cream);
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: bold;
  letter-spacing: .01em;
}
.brand:hover { color: var(--cream); }
.brand-mark { color: var(--accent); font-size: .8rem; }
.main-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.main-nav a {
  color: var(--cream-2);
  text-decoration: none;
  font-family: var(--sans);
  font-size: .92rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.main-nav a:hover, .main-nav a.active { color: #fff; border-bottom: 2px solid var(--accent); }

/* ---------- Hero ---------- */
.hero {
  background-size: cover;
  background-position: center 60%;
  background-color: var(--charcoal-2);
}
.hero-overlay {
  background: linear-gradient(180deg, rgba(24,19,14,.62), rgba(24,19,14,.82));
  padding: 4.5rem 0 3.8rem;
}
.hero-inner h1 {
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  margin: 0 0 .6rem;
  letter-spacing: -.01em;
}
.hero-tag {
  color: var(--cream);
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  font-style: italic;
  margin: 0 0 1rem;
}
.hero-sub {
  color: #e8dfca;
  max-width: 640px;
  font-size: 1.05rem;
  margin: 0;
}

/* ---------- Sections & cards ---------- */
.section { padding: 2.8rem 1.25rem; }
.section-title {
  font-size: 1.7rem;
  margin: 0 0 1.5rem;
  padding-bottom: .5rem;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.6rem;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(43,36,27,.06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(43,36,27,.12); }
.card-media img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.card-meta, .post-meta {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.cat { color: var(--accent-dark); font-weight: 700; text-decoration: none; }
.cat:hover { color: var(--accent); }
.dot { margin: 0 .35rem; }
.card-title { font-size: 1.28rem; line-height: 1.3; margin: 0; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--accent-dark); }
.card-summary { margin: 0; color: #4c4436; font-size: .99rem; flex: 1; }
.read-more {
  font-family: var(--sans);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent-dark);
}

/* ---------- Category tiles ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
}
.cat-tile {
  background: var(--charcoal);
  color: var(--cream);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.cat-tile:hover { background: var(--charcoal-2); color: #fff; }
.cat-tile-name { font-size: 1.08rem; font-weight: bold; }
.cat-tile-count { font-family: var(--sans); font-size: .8rem; color: var(--cream-2); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- List pages ---------- */
.list-header { margin-bottom: 2rem; }
.list-kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  color: var(--accent-dark);
  margin: 0 0 .3rem;
  font-weight: 700;
}
.list-header h1 { font-size: 2.3rem; margin: 0; }
.list-desc { color: var(--muted); max-width: 620px; }
.empty-note { color: var(--muted); font-style: italic; }

/* ---------- Post ---------- */
.post { padding-top: 2.6rem; padding-bottom: 3rem; }
.post-header h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); line-height: 1.15; margin: .7rem 0 1.2rem; }
.post-hero { margin: 0 0 2rem; }
.post-hero img { border-radius: 10px; width: 100%; }
.post-hero figcaption { font-size: .9rem; color: var(--muted); font-style: italic; margin-top: .5rem; text-align: center; }
.post-body { font-size: 1.13rem; line-height: 1.8; }
.post-body h2 {
  font-size: 1.55rem;
  line-height: 1.25;
  margin: 2.4rem 0 .8rem;
  padding-bottom: .35rem;
  border-bottom: 2px solid var(--cream-2);
}
.post-body h3 { font-size: 1.25rem; margin: 1.8rem 0 .6rem; }
.post-body p { margin: 0 0 1.25rem; }
.post-body ul, .post-body ol { margin: 0 0 1.25rem; padding-left: 1.5rem; }
.post-body li { margin-bottom: .4rem; }
.post-body blockquote {
  margin: 1.6rem 0;
  padding: .8rem 1.2rem;
  border-left: 4px solid var(--accent);
  background: var(--cream);
  font-style: italic;
}
.post-body table { border-collapse: collapse; width: 100%; margin: 0 0 1.5rem; font-size: 1rem; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: left; }
.post-body th { background: var(--cream); font-family: var(--sans); font-size: .88rem; }
.post-footer { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.post-sign { font-style: italic; color: var(--muted); }
.post-cats { font-family: var(--sans); font-size: .9rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--charcoal);
  color: var(--cream-2);
  padding: 2.6rem 0;
  margin-top: 1rem;
  text-align: center;
}
.footer-brand { font-size: 1.3rem; font-weight: bold; color: #fff; margin: 0 0 .3rem; }
.footer-tag { font-style: italic; margin: 0 0 1rem; }
.footer-links { font-family: var(--sans); font-size: .95rem; }
.footer-links a { color: var(--cream); }
.footer-links a:hover { color: #fff; }
.footer-fine { font-size: .85rem; color: #a99c83; margin: 1rem 0 0; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .header-inner { justify-content: center; text-align: center; }
  .main-nav { justify-content: center; gap: 1rem; }
  .hero-overlay { padding: 3rem 0 2.6rem; }
  .section { padding: 2rem 1rem; }
  .post-body { font-size: 1.06rem; }
}
