:root{
  --bg:#ffffff;
  --surface:#faf7f7;
  --text:#141414;
  --muted:#5c5c5c;
  --border:rgba(0,0,0,.08);
  --accent:#d24a47;
  --accentSoft:rgba(210,74,71,.12);
  --shadow:0 12px 30px rgba(0,0,0,.06);
  --radius:18px;
  --max:1100px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:var(--bg);
  line-height:1.5;
}
a{color:inherit; text-decoration:none}
a:hover{opacity:.92}
.container{max-width:var(--max); margin:0 auto; padding:0 22px}
.nav{
  position:sticky; top:0; z-index:10;
  background:rgba(255,255,255,.78);
  backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--border);
}
.navbar{display:flex; align-items:center; justify-content:space-between; padding:14px 0; gap:14px}
.brand{display:flex; align-items:center; gap:10px}
.brand img{width:34px; height:34px; border-radius:10px}
.brand-title{font-weight:700; letter-spacing:.2px}
.brand-sub{font-size:12px; color:var(--muted); margin-top:2px}
.links{display:flex; gap:18px; flex-wrap:wrap}
.links a{font-size:14px; color:rgba(20,20,20,.86)}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 14px; border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  box-shadow:0 6px 16px rgba(0,0,0,.04);
}
.btn.primary{
  border-color:transparent;
  background:var(--accent);
  color:#fff;
  box-shadow:0 10px 20px rgba(214,61,57,.22);
}
.btn.ghost{
  background:transparent;
  box-shadow:none;
}
.hero{
  padding:48px 0 24px;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:26px;
  align-items:center;
}
.kicker{
  display:inline-flex;
  gap:8px; align-items:center;
  font-size:13px; color:rgba(20,20,20,.75);
  background:var(--accentSoft);
  padding:6px 10px;
  border-radius:999px;
}
.h1{font-size:44px; line-height:1.1; margin:14px 0 10px; letter-spacing:-.6px}
.lead{font-size:17px; color:rgba(20,20,20,.74); max-width:58ch}
.hero-actions{display:flex; gap:12px; flex-wrap:wrap; margin-top:18px}
.hero-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
}
.hero-card img{display:block; width:100%; height:auto}
.section{padding:30px 0}
.section-title{font-size:22px; margin:0 0 10px; letter-spacing:-.2px}
.section-sub{margin:0 0 16px; color:rgba(20,20,20,.72)}
.grid3{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:14px;
}
.card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  box-shadow:0 10px 24px rgba(0,0,0,.04);
}
.card h3{margin:0 0 8px; font-size:16px}
.card p{margin:0; color:rgba(20,20,20,.72); font-size:14px}
.split{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.media-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:0 10px 24px rgba(0,0,0,.04);
}
.media-card img{width:100%; height:auto; display:block}
.media-body{padding:14px 16px}
.meta{font-size:12px; color:rgba(20,20,20,.58)}
.tag{
  display:inline-flex; padding:4px 8px; border-radius:999px;
  border:1px solid rgba(214,61,57,.22);
  background:rgba(214,61,57,.08);
  font-size:12px; color:rgba(20,20,20,.72);
  margin-right:6px;
}
.footer{
  border-top:1px solid var(--border);
  padding:22px 0;
  margin-top:22px;
  color:rgba(20,20,20,.7);
  font-size:13px;
}
.form{
  display:grid; gap:12px;
}
.input, .textarea, .select{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  font-size:14px;
  background:#fff;
}
.textarea{min-height:140px; resize:vertical}
.small{font-size:12px; color:rgba(20,20,20,.64)}
.notice{
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(214,61,57,.18);
  background:rgba(214,61,57,.06);
  margin-bottom:14px;
}
.table{
  width:100%;
  border-collapse:collapse;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
}
.table th,.table td{
  padding:10px 12px;
  border-bottom:1px solid var(--border);
  font-size:14px;
  text-align:left;
}
.table th{background:rgba(0,0,0,.03); font-weight:650}
@media (max-width: 900px){
  .hero-grid{grid-template-columns:1fr}
  .grid3{grid-template-columns:1fr}
  .split{grid-template-columns:1fr}
  .h1{font-size:36px}
}

/* --- Subtle motion (kept professional) --- */
.btn, .card, .media-card, .hero-card, .links a{
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease, opacity .18s ease;
}

.btn:hover{ transform: translateY(-1px); }
.card:hover, .media-card:hover{ transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.08); }
.hero-card:hover{ transform: translateY(-1px); }

.links a{ padding:8px 10px; border-radius:10px; }
.links a:hover{ background: rgba(0,0,0,.03); opacity:1; }

/* reveal-on-scroll */
.reveal{ opacity:0; transform: translateY(10px); }
.reveal.is-visible{ opacity:1; transform:none; transition: opacity .5s ease, transform .5s ease; }

/* --- Mobile navigation --- */
.nav-toggle{
  display:none;
  width:44px; height:44px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  align-items:center; justify-content:center;
  gap:4px;
  cursor:pointer;
}
.nav-toggle span{
  display:block;
  width:18px; height:2px;
  background: rgba(20,20,20,.78);
  border-radius:999px;
}
@media (max-width: 900px){
  .navbar{ position:relative; }
  .links{
    display:none;
    position:absolute;
    top:60px; right:0;
    width:min(320px, 92vw);
    background:#fff;
    border:1px solid var(--border);
    border-radius:16px;
    box-shadow: var(--shadow);
    padding:10px;
    flex-direction:column;
    gap:6px;
  }
  body.nav-open .links{ display:flex; }
  .nav-toggle{ display:inline-flex; }
  .btn.primary.nav-cta{ display:none; } /* keep header clean on mobile */
}

/* --- Better readability on small screens --- */
@media (max-width: 520px){
  .container{ padding: 0 16px; }
  .h1{ font-size: 32px; }
  .lead{ font-size: 16px; }
}

/* tables on mobile (admin pages included) */
.table-wrap{ overflow-x:auto; border-radius:12px; border:1px solid var(--border); }
.table{ border:none; }
.table th,.table td{ white-space:nowrap; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .btn, .card, .media-card, .hero-card, .links a{ transition:none; }
  .reveal{ opacity:1; transform:none; }
}


/* --- Article typography (blog posts) --- */
.prose{
  font-size:17px;
  line-height:1.85;
  color: rgba(20,20,20,.86);
}
.prose p{ margin: 0 0 14px; }
.prose h1{ font-size: 34px; margin: 22px 0 10px; letter-spacing:-.4px; }
.prose h2{ font-size: 24px; margin: 22px 0 10px; letter-spacing:-.3px; }
.prose h3{ font-size: 19px; margin: 18px 0 8px; letter-spacing:-.2px; }
.prose h4{ font-size: 16px; margin: 16px 0 8px; letter-spacing:-.1px; }
.prose ul, .prose ol{ margin: 0 0 14px 22px; padding:0; }
.prose li{ margin: 6px 0; }
.prose code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.92em;
  background: rgba(0,0,0,.05);
  border: 1px solid rgba(0,0,0,.08);
  padding: 2px 6px;
  border-radius: 8px;
}
.prose a{
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* --- Comments --- */
.comments{ margin-top: 26px; }
.comment{
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,.03);
  margin-bottom: 12px;
}
.comment .meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-bottom: 6px;
}
.comment .name{ font-weight:650; color: rgba(20,20,20,.9); }
.comment .time{ font-size:12px; color: rgba(20,20,20,.58); }


#comments{ scroll-margin-top: 90px; }
