/**
 * public/css/style.css
 * Purpose: Public-site styling for NextlyTools — homepage, tools, blog,
 *          DNS results, footer, etc.  Fully responsive: mobile, tablet, desktop.
 */

/* ===== Design tokens — Light mode (default) ===== */
:root {
  --bg: #ffffff;
  --bg-alt: #f7f8fb;
  --bg-soft: #f0f4ff;
  --surface: #ffffff;
  --text: #0c1220;
  --text-soft: #4a5168;
  --muted: #7b8294;
  --border: #e6e8ee;
  --primary: #2761ff;
  --primary-soft: #e9efff;
  --accent: #16c79a;
  --danger: #e2474c;
  --warning: #f59e0b;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 12px 32px rgba(15, 23, 42, .08);
  --shadow-lg: 0 28px 60px -20px rgba(39, 97, 255, .35);
  --max: 1180px;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Menlo", monospace;
}

/* ===== Dark mode ===== */
[data-theme="dark"] {
  --bg: #0f1929;
  --bg-alt: #162236;
  --bg-soft: #0f1929;
  --surface: #0f1929;
  --text: #e2e8f5;
  --text-soft: #94a3b8;
  --muted: #64748b;
  --border: #1e3050;
  --primary: #60a5fa;
  --primary-soft: #1a2d4a;
  --accent: #34d399;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow: 0 8px 28px rgba(0,0,0,.5);
  --shadow-lg: 0 24px 56px -16px rgba(96,165,250,.25);
}

/* Theme transition — applied only while the user is toggling */
.theme-transition,
.theme-transition *,
.theme-transition *::before,
.theme-transition *::after {
  transition:
    background-color .25s ease,
    border-color .2s ease,
    color .15s ease,
    box-shadow .2s ease !important;
}

/* ===== Dark mode overrides for specific components ===== */
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] .site-header { background: rgba(15,25,41,.92); }
[data-theme="dark"] .card { background: var(--bg-alt); }
[data-theme="dark"] .home-blog-card { background: var(--bg-alt); }
[data-theme="dark"] .blog-card { background: var(--bg-alt); }
[data-theme="dark"] .results { background: var(--bg-alt); }
[data-theme="dark"] .results-head { background: var(--bg); }
[data-theme="dark"] .rec-table th { background: var(--bg); }
[data-theme="dark"] .chip { background: var(--bg-alt); }
[data-theme="dark"] .chip:hover { background: var(--primary-soft); }
[data-theme="dark"] .contact-form-wrap { background: var(--bg-alt); }
[data-theme="dark"] .contact-info-card { background: var(--bg-alt); }
[data-theme="dark"] .lookup-row { background: var(--bg-alt); }
[data-theme="dark"] .hero-lookup { background: var(--bg-alt); }
[data-theme="dark"] .hero-lookup select { background: var(--bg); color: var(--text); }
[data-theme="dark"] .lookup-row select { background: var(--bg); color: var(--text); }
[data-theme="dark"] .cf-input { background: var(--bg-alt); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .hero {
  background:
    radial-gradient(900px 500px at 80% -20%, rgba(96,165,250,.12), transparent 60%),
    radial-gradient(700px 400px at -10% 120%, rgba(52,211,153,.1), transparent 60%),
    linear-gradient(180deg, #0f1929 0%, #101e34 100%);
}
[data-theme="dark"] .section-alt { background: var(--bg-alt); }
[data-theme="dark"] .blog-card-img-placeholder { background: linear-gradient(135deg,#162236 0%,#1e3050 100%); }
[data-theme="dark"] .home-blog-card-img-ph { background: linear-gradient(135deg,#162236 0%,#1e3050 100%); }
[data-theme="dark"] .page-header { background: var(--bg-alt); }
[data-theme="dark"] .nav-links a.cta { background: var(--primary); }

/* ===== Topics dropdown nav ===== */
.nav-dropdown-wrap {
  position: relative;
}
.nav-dropdown-wrap > a {
  display: inline-flex; align-items: center; gap: 4px;
}
.nav-caret {
  transition: transform .18s;
  flex-shrink: 0;
}
.nav-dropdown-wrap:hover .nav-caret,
.nav-dropdown-wrap:focus-within .nav-caret { transform: rotate(180deg); }

.nav-dropdown {
  position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  min-width: 220px; padding: 6px; list-style: none; margin: 0;
  opacity: 0; pointer-events: none; visibility: hidden;
  transition: opacity .15s, visibility .15s, transform .15s;
  transform: translateX(-50%) translateY(-4px);
  z-index: 200;
}
.nav-dropdown-wrap:hover .nav-dropdown,
.nav-dropdown-wrap:focus-within .nav-dropdown {
  opacity: 1; pointer-events: auto; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown li { list-style: none; }
.nav-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: .87rem; color: var(--text-soft); font-weight: 500;
  text-decoration: none;
}
.nav-dropdown a:hover { background: var(--bg-alt); color: var(--text); }
.nav-dropdown-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}

/* Mobile: dropdown becomes a flat sub-list */
@media (max-width: 720px) {
  .nav-dropdown {
    position: static; transform: none;
    box-shadow: none; border: none;
    background: transparent; padding: 0 0 4px 20px;
    opacity: 1; visibility: visible; pointer-events: auto;
  }
  .nav-dropdown-wrap > a .nav-caret { display: none; }
  .nav-dropdown a { font-size: .84rem; padding: 7px 10px; }
}

/* Theme toggle button */
.nav-controls {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: transparent; border: 1px solid var(--border);
  cursor: pointer; color: var(--text-soft); transition: all .15s;
  padding: 0; flex-shrink: 0;
}
.theme-toggle:hover { background: var(--bg-alt); color: var(--text); border-color: var(--primary); }
.theme-icon-sun  { display: none; }
.theme-icon-moon { display: block; }
[data-theme="dark"] .theme-icon-sun  { display: block; }
[data-theme="dark"] .theme-icon-moon { display: none; }

/* Updated brand mark — uses SVG */
.brand-mark-svg { border-radius: 9px; display: block; flex-shrink: 0; }

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3, h4 { color: var(--text); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 4.5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.3rem, 2.8vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--text-soft); }
.lede { font-size: 1.1rem; color: var(--text-soft); max-width: 70ch; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--font-mono); font-size: .9rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ===== Layout ===== */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; }
@media (max-width: 480px) { .container { padding: 0 16px; } }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 12px;
}
.nav-controls {
  display: flex; align-items: center; gap: 8px;
  /* on desktop, nav-controls sits between brand and nav-links */
}
@media (min-width: 721px) {
  .nav-controls { order: 3; }
  .nav-links    { order: 2; }
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; color: var(--text); text-decoration: none; flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.brand.small .brand-mark { width: 22px; height: 22px; border-radius: 6px; }
.brand-text { font-size: 1.05rem; letter-spacing: -.01em; }

/* Desktop nav */
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--text-soft); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--text); font-weight: 600; }
.nav-links a.cta {
  background: var(--text); color: #fff; padding: 8px 16px; border-radius: 999px;
  font-weight: 600; font-size: .88rem;
}
.nav-links a.cta:hover { background: var(--primary); text-decoration: none; }

/* Hamburger button (mobile only) */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; background: none; border: none; cursor: pointer;
  padding: 8px; border-radius: 8px; width: 40px; height: 40px;
  transition: background .15s;
}
.nav-toggle:hover { background: var(--bg-alt); }
.nav-toggle span {
  display: block; height: 2px; width: 22px;
  background: var(--text); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
  transform-origin: center;
}
.nav-toggle-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle-active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; flex-direction: column; align-items: stretch;
    position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 16px 24px 20px; gap: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
  }
  .nav-links.nav-open { display: flex; }
  .nav-links a {
    padding: 10px 8px; border-radius: 8px;
    font-size: 1rem; color: var(--text-soft);
  }
  .nav-links a.cta {
    margin-top: 8px; text-align: center;
    padding: 12px; border-radius: 12px;
  }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer; transition: all .15s ease;
  background: var(--bg-alt); color: var(--text); text-decoration: none;
  white-space: nowrap; min-height: 44px;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #1f4ee0; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c33b3f; }
.btn-sm { padding: 8px 14px; font-size: .85rem; min-height: 36px; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ===== Hero ===== */
.hero {
  background:
    radial-gradient(900px 500px at 80% -20%, rgba(39,97,255,.18), transparent 60%),
    radial-gradient(700px 400px at -10% 120%, rgba(22,199,154,.16), transparent 60%),
    linear-gradient(180deg, #fdfdff 0%, #f4f6fb 100%);
  padding: clamp(64px, 10vw, 120px) 0 clamp(48px, 7vw, 80px);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 { max-width: 20ch; margin-left: auto; margin-right: auto; }
.hero .lede { margin: 0 auto 32px; font-size: 1.15rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 36px; }

.hero-lookup {
  display: flex; gap: 8px; max-width: 720px; margin: 0 auto;
  background: #fff; padding: 8px; border-radius: 999px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.hero-lookup input[name="domain"] {
  flex: 1; min-width: 0; padding: 12px 18px; border: 0; outline: 0;
  font-size: 1rem; background: transparent; min-height: 44px;
}
.hero-lookup select {
  border: 0; background: var(--bg-alt); padding: 0 14px; border-radius: 999px;
  font-size: .9rem; font-weight: 600; color: var(--text); outline: 0; min-height: 44px;
}
.hero-lookup .btn-primary { padding: 12px 22px; }

@media (max-width: 640px) {
  .hero-lookup { flex-wrap: wrap; border-radius: 20px; padding: 10px; gap: 8px; }
  .hero-lookup input[name="domain"] { width: 100%; flex-basis: 100%; }
  .hero-lookup select { flex: 1; }
  .hero-lookup .btn-primary { flex: 1; width: 100%; }
}

/* ===== Sections ===== */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 28px; gap: 16px; flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.link { font-weight: 600; }
.cat-heading { margin-top: 36px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.cat-heading:first-child { margin-top: 0; }

/* ===== Grid ===== */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ===== Cards ===== */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); display: block;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card h3, .card h4 { margin-top: 6px; }
.card-link { color: inherit; text-decoration: none; }
.card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d4dafd; text-decoration: none; }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--primary); background: var(--primary-soft);
  padding: 4px 10px; border-radius: 999px;
}
.tag.small { font-size: .68rem; }
.meta-row { margin-top: 12px; }

/* ===== Page header ===== */
.page-header {
  padding: clamp(40px, 7vw, 72px) 0 clamp(24px, 4vw, 44px);
  border-bottom: 1px solid var(--border); background: var(--bg-alt);
}
.crumbs { color: var(--muted); font-size: .88rem; margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }

/* ===== DNS tool ===== */
.lookup-form { margin-bottom: 24px; }
.lookup-row {
  display: flex; gap: 8px; background: #fff;
  border: 1px solid var(--border); border-radius: 999px; padding: 8px;
  box-shadow: var(--shadow-sm); flex-wrap: wrap; align-items: center;
}
.lookup-row input {
  flex: 1; min-width: 180px; border: 0; outline: 0;
  padding: 10px 16px; font-size: 1rem; background: transparent; min-height: 44px;
}
.lookup-row select {
  border: 0; outline: 0; padding: 0 14px; border-radius: 999px;
  background: var(--bg-alt); font-weight: 600; color: var(--text); min-height: 44px;
}
@media (max-width: 580px) {
  .lookup-row { border-radius: 18px; }
  .lookup-row input { flex-basis: 100%; }
  .lookup-row select { flex: 1; }
  .lookup-row .btn { flex: 1; }
}

.record-pill {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  background: var(--text); color: #fff; font-weight: 700; font-size: .78rem; letter-spacing: .04em;
}
.record-pill.small { padding: 3px 8px; font-size: .7rem; }

.results {
  margin-top: 24px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.results-head {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 16px 22px; background: var(--bg-alt); border-bottom: 1px solid var(--border);
}
.results-head h2 { margin: 0; font-size: 1.1rem; }
.group-heading {
  padding: 16px 22px 6px; display: flex; align-items: center; gap: 10px;
  font-size: .95rem; margin: 0;
}

.rec-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rec-table th, .rec-table td { padding: 11px 22px; text-align: left; border-top: 1px solid var(--border); }
.rec-table th {
  font-weight: 600; color: var(--muted); background: #fbfcfd;
  font-size: .76rem; text-transform: uppercase; letter-spacing: .05em;
}
.rec-table td.mono { word-break: break-all; }

.whois { margin: 0; padding: 22px; background: #0b1020; color: #cad4ec; font-size: .84rem; line-height: 1.5; overflow-x: auto; white-space: pre-wrap; }

.alert {
  padding: 14px 18px; border-radius: 12px; background: var(--bg-alt);
  border: 1px solid var(--border); margin: 0;
}
.alert-error { background: #fdecec; border-color: #f5c2c2; color: #8b1f24; }
.empty-hint { padding: 32px 22px; text-align: center; }

.chip-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.chip {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; color: var(--text); font-size: .88rem;
  transition: all .12s ease; text-decoration: none; min-height: 44px;
}
.chip:hover { text-decoration: none; border-color: var(--primary); transform: translateY(-1px); background: var(--primary-soft); }
.chip strong { display: inline-block; min-width: 54px; color: var(--primary); font-family: var(--font-mono); font-size: .83rem; }
.chip span { color: var(--muted); font-size: .8rem; }
.chip-active { border-color: var(--primary); background: var(--primary-soft); }
.chip-active span, .chip-active strong { color: var(--primary); }

/* ===== Blog Listing ===== */
.blog-hero {
  padding: clamp(56px, 8vw, 96px) 0 clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--border);
}
.blog-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 10px 0 12px; }
.blog-hero .eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
.blog-hero .lede { color: var(--muted); max-width: 540px; font-size: 1rem; }
.blog-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 48px 0;
}
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .blog-grid { grid-template-columns: 1fr; padding: 32px 0; } }

.blog-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.blog-card-img-wrap {
  display: block; width: 100%; height: 196px; overflow: hidden; flex-shrink: 0;
}
.blog-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.blog-card:hover .blog-card-img-wrap img { transform: scale(1.04); }
.blog-card-img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8edf8 100%);
  display: flex; align-items: center; justify-content: center;
}

.blog-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.blog-card-date { font-size: .78rem; }
.blog-card-title { font-size: 1.02rem; font-weight: 700; line-height: 1.4; margin: 0; }
.blog-card-title a { color: var(--text); text-decoration: none; }
.blog-card-title a:hover { color: var(--primary); }
.blog-card-excerpt {
  font-size: .88rem; line-height: 1.55; margin: 0; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card-read {
  margin-top: auto; padding-top: 12px; font-size: .83rem; font-weight: 600;
  color: var(--primary); text-decoration: none; letter-spacing: .01em;
}
.blog-card-read:hover { text-decoration: underline; }

/* ===== Homepage blog cards ===== */
.home-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .home-blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .home-blog-grid { grid-template-columns: 1fr; } }

.home-blog-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  text-decoration: none; color: inherit; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.home-blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.home-blog-card-img { width: 100%; height: 180px; overflow: hidden; flex-shrink: 0; }
.home-blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.home-blog-card:hover .home-blog-card-img img { transform: scale(1.04); }
.home-blog-card-img-ph {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  display: flex; align-items: center; justify-content: center;
}
.home-blog-card-img-ph svg { opacity: .22; }
.home-blog-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.home-blog-card-body h3 { font-size: .98rem; font-weight: 700; line-height: 1.4; margin: 4px 0 0; }
.home-blog-card-body p {
  font-size: .86rem; color: var(--muted); line-height: 1.5; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.home-blog-card-read { font-size: .8rem; font-weight: 600; color: var(--primary); margin-top: auto; padding-top: 10px; }

/* ===== Article / prose ===== */
.article { padding: clamp(36px, 6vw, 72px) 0; }
.prose { font-size: 1.02rem; line-height: 1.78; color: var(--text-soft); }
.prose h2 { margin-top: 1.8em; color: var(--text); font-size: 1.45rem; }
.prose h3 { margin-top: 1.5em; color: var(--text); font-size: 1.15rem; }
.prose p { margin: 0 0 1.05em; }
.prose ul, .prose ol { padding-left: 22px; margin: .7em 0; }
.prose li { margin: .35em 0; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { font-weight: 700; color: var(--text); }
.prose blockquote {
  border-left: 3px solid var(--primary); margin: 1.5em 0; padding: .75em 1.2em;
  background: var(--bg-alt); border-radius: 0 10px 10px 0; color: var(--muted); font-style: italic;
}
.prose table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 1.2em 0; overflow-x: auto; display: block; }
.prose th, .prose td { border: 1px solid var(--border); padding: .5em .85em; text-align: left; }
.prose th { background: var(--bg-alt); font-weight: 600; }
.prose code {
  background: #f1f3fa; color: #1e3a5f; font-family: var(--font-mono);
  padding: 2px 7px; border-radius: 6px; font-size: .86em; border: 1px solid #e3e8f0; white-space: nowrap;
}
.prose-img { max-width: 100%; border-radius: 10px; margin: 1em auto; display: block; border: 1px solid var(--border); }
.related { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); }

/* Post cover */
.post-cover {
  width: 100%; max-height: 420px; object-fit: cover;
  border-radius: var(--radius); margin: 24px 0 32px; border: 1px solid var(--border);
}

/* ===== Code blocks (terminal style) ===== */
.code-block {
  background: #0f172a; border-radius: 12px; margin: 1.5em 0;
  overflow: hidden; border: 1px solid #1e293b; box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.code-block-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 16px; background: #1e293b; border-bottom: 1px solid #334155;
}
.code-lang {
  font-family: var(--font-mono); font-size: .73rem;
  color: #7dd3fc; text-transform: lowercase; letter-spacing: .05em;
}
.code-copy-btn {
  background: transparent; border: 1px solid #334155;
  color: #94a3b8; font-size: .73rem; padding: 4px 12px;
  border-radius: 6px; cursor: pointer; font-family: inherit; transition: all .15s;
}
.code-copy-btn:hover { color: #fff; border-color: #64748b; background: rgba(255,255,255,.06); }
.code-block pre { margin: 0; padding: 18px 20px; overflow-x: auto; }
.code-block pre code {
  background: transparent; padding: 0; border: 0; border-radius: 0;
  color: #e2e8f0; font-family: var(--font-mono); font-size: .875rem; line-height: 1.65;
}

/* ===== Footer ===== */
.site-footer { background: #0b1020; color: #cad4ec; margin-top: 60px; }
.site-footer h4 { color: #fff; font-size: .88rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.site-footer .brand-text, .site-footer p, .site-footer .muted { color: #cad4ec; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: #cad4ec; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px;
  padding: 56px 24px 32px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; padding: 40px 16px 24px; } }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 18px 24px; font-size: .85rem; }

/* ===== Newsletter band ===== */
.newsletter-band { background: linear-gradient(135deg, #1a2fff 0%, #0e9f6e 100%); padding: 3.5rem 0; }
.newsletter-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center;
}
@media (max-width: 800px) { .newsletter-inner { grid-template-columns: 1fr; gap: 1.5rem; } }
.newsletter-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: rgba(255,255,255,.2); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px;
}
.newsletter-copy h3 { color: #fff; font-size: 1.5rem; margin: 0 0 .5rem; }
.newsletter-copy p { color: rgba(255,255,255,.8); margin: 0; font-size: 1rem; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-input-row {
  display: flex; gap: 0;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  border-radius: 14px; padding: 6px; backdrop-filter: blur(4px);
}
.newsletter-input-row input[type="email"] {
  flex: 1; min-width: 0; padding: 10px 16px;
  background: transparent; border: 0; outline: 0;
  color: #fff; font-size: 1rem; font-family: inherit; min-height: 44px;
}
.newsletter-input-row input[type="email"]::placeholder { color: rgba(255,255,255,.55); }
.btn-white {
  background: #fff; color: #1a2fff; border: 0; border-radius: 10px;
  font-weight: 700; padding: 10px 22px; cursor: pointer; white-space: nowrap;
  font-size: .95rem; transition: background .15s; min-height: 44px;
}
.btn-white:hover { background: #f0f0ff; }
.newsletter-note { color: rgba(255,255,255,.55); font-size: .78rem; margin: 0; }

/* ===== Contact page ===== */
.contact-hero {
  background: linear-gradient(180deg, #f4f6fb 0%, #fff 100%);
  padding: clamp(40px, 7vw, 72px) 0 clamp(20px, 4vw, 36px);
  border-bottom: 1px solid var(--border);
}
.contact-layout {
  display: grid; grid-template-columns: 300px 1fr; gap: 36px;
  align-items: start; padding-top: 2rem; padding-bottom: 4rem;
}
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .contact-layout { gap: 20px; } }

.contact-info { display: grid; gap: 14px; }
.contact-info-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm);
}
.contact-icon { font-size: 1.4rem; margin-bottom: 8px; }
.contact-info-card h3 { font-size: 1rem; margin: 0 0 6px; }
.contact-info-card p { font-size: .9rem; margin: 0; color: var(--text-soft); }
.contact-topics { padding-left: 1.1rem; margin: 4px 0 0; }
.contact-topics li { font-size: .88rem; color: var(--text-soft); margin: 4px 0; }
.contact-form-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); }
@media (max-width: 480px) { .contact-form-wrap { padding: 20px 16px; } }
.contact-form { display: grid; gap: 18px; }
.cf-row { display: grid; gap: 14px; }
.cf-row-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .cf-row-2 { grid-template-columns: 1fr; } }
.cf-field { display: grid; gap: 6px; }
.cf-label { font-size: .88rem; font-weight: 600; color: var(--text); }
.cf-req { color: var(--danger); }
.cf-input {
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: 11px 14px; font: inherit; font-size: 1rem; color: var(--text);
  width: 100%; background: #fdfdff; transition: border-color .15s, box-shadow .15s;
  min-height: 44px;
}
.cf-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(39,97,255,.12); }
.cf-textarea { resize: vertical; min-height: 160px; }
.cf-actions { display: flex; justify-content: flex-end; }

/* ===== Flash messages ===== */
.flash { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: .95rem; }
.flash-success { background: #e7f8ee; color: #1a6e3b; border: 1px solid #b8e4c9; }
.flash-error { background: #fdecea; color: #a61b1b; border: 1px solid #f3c6c2; }

/* ===== Prose narrow pages ===== */
.container.narrow { max-width: 720px; }
.page-head { margin-bottom: 2rem; }
.page-head .lede { color: #5b667a; max-width: 580px; }
