/* =========================
   Karsten's Blog — Coffeehouse Theme
   ========================= */

:root{
  --bg: #fbf6ee;           /* latte foam */
  --surface: #ffffff;      /* cards */
  --surface-2: #fff7ec;    /* warm highlight */
  --text: #2b1b12;         /* espresso */
  --muted: #6b4b3a;        /* mocha */
  --accent: #b66a2a;       /* caramel */
  --accent-2: #d8a45a;     /* honey */
  --border: rgba(43, 27, 18, 0.14);

  --radius: 18px;
  --shadow: 0 14px 40px rgba(43, 27, 18, 0.10);
  --shadow-soft: 0 10px 24px rgba(43, 27, 18, 0.08);
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(216,164,90,0.22), transparent 60%),
    radial-gradient(900px 500px at 88% 0%, rgba(182,106,42,0.18), transparent 55%),
    radial-gradient(700px 450px at 40% 110%, rgba(43,27,18,0.10), transparent 60%),
    var(--bg);
  line-height: 1.55;
}

a{ color: inherit; }
.container{
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
}

/* Header / Nav */
.site-header{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(251, 246, 238, 0.78);
  border-bottom: 1px solid var(--border);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
}
.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-badge{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.85), rgba(255,255,255,0) 52%),
    linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: var(--shadow-soft);
}
.brand h1{
  font-size: 18px;
  margin: 0;
  letter-spacing: 0.2px;
}
.brand small{
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}

.nav{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a{
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
}
.nav a:hover{
  background: rgba(255,255,255,0.7);
  border-color: var(--border);
  color: var(--text);
}
.nav a[aria-current="page"]{
  background: rgba(182,106,42,0.12);
  border-color: rgba(182,106,42,0.25);
  color: var(--text);
}

/* Layout blocks */
main{ padding: 28px 0 54px; }
.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.hero{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: center;
}
@media (max-width: 860px){
  .hero{ grid-template-columns: 1fr; }
}

.kicker{
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.6);
  color: var(--muted);
  font-size: 12px;
}
.title{
  margin: 10px 0 8px;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.15;
}
.subtitle{
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 16px;
}

.button-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.75);
}
.btn:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.btn.primary{
  border-color: rgba(182,106,42,0.25);
  background: linear-gradient(135deg, rgba(216,164,90,0.35), rgba(182,106,42,0.22));
}

.hero-media{
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.hero-media img{
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
}
@media (max-width: 860px){
  .hero-media img{ height: 260px; }
}

.section{
  margin-top: 18px;
}
.section h2{
  margin: 0 0 10px;
  font-size: 18px;
}
.grid3{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px){
  .grid3{ grid-template-columns: 1fr; }
}

.mini-card{
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  overflow: hidden;
}
.mini-card img{
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
  display: block;
}
.mini-card h3{
  margin: 10px 0 6px;
  font-size: 16px;
}
.mini-card p{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.post-meta{
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}
.post-title{
  margin: 8px 0 10px;
  font-size: 26px;
  line-height: 1.2;
}
.post-body p{ margin: 0 0 12px; }

.post-figure{
  margin: 14px 0;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.post-figure img{
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}
.post-figure figcaption{
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255,255,255,0.8);
  border-top: 1px solid var(--border);
}

.footer{
  padding: 22px 0;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.55);
}
.footer small{ display: block; }
