:root {
--bg: #0f1220;
--panel: #151935;
--text: #e7e9f3;
--muted: #aeb3c9;
--brand: #7aa2ff;
--brand-2: #8ef0d1;
--accent: #ffd580;
--radius: 16px;
--shadow: 0 10px 30px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
margin: 0;
font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
background: radial-gradient(1200px 800px at 10% -10%, rgba(122,162,255,.15), transparent),
radial-gradient(1000px 700px at 110% 10%, rgba(142,240,209,.08), transparent),
var(--bg);
color: var(--text);
}


/* Header / Nav */
.site-header { position: sticky; top: 0; z-index: 100; backdrop-filter: saturate(120%) blur(8px); background: rgba(15,18,32,.6); border-bottom: 1px solid rgba(255,255,255,.06); }
.nav-wrap { max-width: 1100px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; letter-spacing: 0.2px; }
.logo-emoji { filter: drop-shadow(0 6px 10px rgba(122,162,255,.35)); }
.nav-toggle { display: none; }
.site-nav { display: flex; gap: 14px; }
.nav-link { text-decoration: none; color: var(--muted); padding: 8px 10px; border-radius: 10px; }
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav-link.active { color: var(--bg); background: linear-gradient(120deg, var(--brand), var(--brand-2)); font-weight: 600; }


@media (max-width: 820px) {
.nav-toggle { display: inline-flex; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.08); color: var(--text); border: 0; }
.site-nav { position: absolute; right: 20px; top: 56px; display: none; flex-direction: column; background: var(--panel); padding: 10px; border-radius: 12px; box-shadow: var(--shadow); }
.site-nav.open { display: flex; }
}


/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: center; padding-top: 10px; }
.hero-content h1 { font-size: clamp(28px, 5vw, 56px); margin: 0 0 10px; letter-spacing: 0.2px; }
.tagline { color: var(--muted); font-size: clamp(15px, 2.2vw, 18px); margin: 0 0 18px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); text-decoration: none; color: var(--text); background: rgba(255,255,255,.04); }
.btn.primary { border: 0; background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: var(--bg); font-weight: 700; }


.hero-aside { position: relative; height: 220px; }
.orb { position: absolute; inset: auto; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff, rgba(255,255,255,.3) 35%, rgba(255,255,255,0) 60%), linear-gradient(140deg, var(--brand), var(--brand-2)); filter: blur(.2px) drop-shadow(0 12px 30px rgba(122,162,255,.3)); animation: float 6s ease-in-out infinite; opacity: .9; }
.orb:nth-child(1) { left: 14%; top: 10%; }
.orb:nth-child(2) { left: 55%; top: 30%; animation-delay: .8s; width: 80px; height: 80px; }
.orb:nth-child(3) { left: 35%; top: 62%; animation-delay: 1.6s; width: 60px; height: 60px; }
@keyframes float { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-10px) } }


.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card h2 { margin-top: 0; font-size: 22px; }
.card p { color: var(--muted); }
.card-link { display: inline-block; margin-top: 6px; text-decoration: none; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.06); color: var(--text); }
.card-link:hover { background: rgba(255,255,255,.1); }


@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } .cards { grid-template-columns: 1fr; } }


.panel { display: grid; grid-template-columns: 1.3fr .7fr; gap: 22px; align-items: start; margin-top: 34px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); padding: 18px; }
.panel--alt { background: rgba(255,255,255,.02); }
.callout { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); padding: 12px; border-radius: 12px; }
/* Footer */
.site-footer {
  margin-top: 60px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  backdrop-filter: blur(6px);
  color: var(--muted);
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 20px;
}

.footer-grid strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.footer-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.footer-grid h4 {
  color: var(--text);
  font-size: 15px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 4px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin: 8px 0;
}

.footer-grid a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
}

.footer-grid a:hover {
  color: var(--brand-2);
  transform: translateX(3px);
}

.legal {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 14px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: rgba(0,0,0,.2);
}
/* Mini-feed buttons */
.mini-buttons {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn.small {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--text);
  text-decoration: none;
  transition: all .2s ease;
}

.btn.small:hover {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: var(--bg);
  transform: translateY(-1px);
}

/* Optional: style injected blog links as buttons too */
#latest-posts a {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--brand-2);
  text-decoration: none;
  transition: all .2s ease;
}

#latest-posts a:hover {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: var(--bg);
  transform: translateY(-1px);
}
/* Inline buttons for latest posts */
.btn.small.inline {
  display: inline-block;
  width: 100%;
  text-align: left;
  font-weight: 500;
  margin-bottom: 6px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--brand-2);
  transition: all .2s ease;
}

.btn.small.inline:hover {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: var(--bg);
  transform: translateY(-1px);
}

#latest-posts {
  list-style: none;
  margin: 0;
  padding: 0;
}

#latest-posts li {
  margin: 4px 0;
}
/* === Disasters story layout === */
.story-post {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: var(--shadow);
  margin-top: 30px;
  line-height: 1.7;
  font-size: 17px;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}
.story-post p {
  color: var(--muted);
  margin: 16px 0;
}
.story-post .intro {
  font-size: 18px;
  color: var(--text);
}
.story-post .outro {
  font-style: italic;
  color: var(--brand-2);
}
.story-post blockquote {
  border-left: 3px solid var(--brand);
  background: rgba(255,255,255,.04);
  padding: 10px 16px;
  border-radius: 6px;
  color: var(--text);
  font-style: italic;
  margin: 20px 0;
}
.story-panel {
  margin: 18px 0;
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.story-panel.bad {
  background: rgba(255,0,0,.08);
  border-color: rgba(255,0,0,.25);
}
.story-panel h3 {
  margin-top: 0;
  color: var(--text);
}
.story-panel ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.story-panel li {
  margin: 6px 0;
}

.story-post pre {
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 12px;
  overflow-x: auto;
}
.story-post code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--brand-2);
}

/* Make the final panels blend with home design */
.tldr-box, .myth-box, .panelish, .takeaways {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 20px;
}
.takeaways {
  text-align: center;
  font-size: 18px;
  color: var(--text);
}
.takeaways p {
  margin: 0;
}
/* === About page niceties (matches front-page vibe) === */
.about-hero {
  align-items: center;
}
.portrait-wrap {
  position: relative;
  width: 100%;
  max-width: 240px;         /* prevents it from getting too big */
  margin: 0 auto;
  border-radius: 50%;       /* makes it circular */
  padding: 6px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  overflow: hidden;         /* keeps the image clipped within the circle */
}

.portrait {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 50%;
  object-fit: cover;        /* ensures nice cropping */
  max-height: 240px;        /* extra safety for non-square images */
}
/* fun tech “chips” */
.chips {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--text);
}

/* Panels & lists reuse your existing aesthetic */
.panelish { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); padding: 12px; }
.emoji-list { list-style: none; margin: 0; padding: 0; }
.emoji-list li { margin: 8px 0; }

/* Make the hero grid behave nicely with the portrait */
@media (max-width: 900px) {
  .about-hero { grid-template-columns: 1fr; }
  .portrait-wrap { margin-top: 12px; }
}
/* side-by-side code panels where space allows */
.cmd-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 900px) {
  .cmd-grid { grid-template-columns: 1fr 1fr; }
}

/* lighten up pre/code readability a touch here too */
pre {
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 12px;
  overflow: auto;
}

/* small enhancements so this page mirrors the front-page polish */
.panelish h3, .panelish h4 { margin-top: 0; }
/* Make steps a touch roomier on this page */
#flows .steps li { margin: 12px 0; }

/* Keep pre/code comfortable for long reading */
#recipes pre, #snippets pre {
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 12px;
  overflow: auto;
}
/* === Blog niceties === */
.post.readable {
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  max-width: 820px;
  margin: 18px auto 28px;
}
.post-header h1 { margin-bottom: 6px; }
.post-meta { color: var(--muted); margin-top: 0; }

.post-body h1, .post-body h2, .post-body h3 { margin-top: 16px; }
.post-body p { color: var(--muted); line-height: 1.7; }
.post-body a { color: var(--brand-2); }
.post-body ul { margin: 10px 0 10px 18px; }
.post-body li { margin: 6px 0; }

.post-footer { margin-top: 12px; }

pre {
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 12px;
  overflow: auto;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
}
/* Blog intro box */
.intro-box {
  max-width: 820px;
  margin: 20px auto 40px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.intro-box h2 {
  margin-top: 0;
}
.intro-box p {
  color: var(--muted);
  line-height: 1.7;
}
.logo-img {
  height: 40px;
  width: auto;
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 4px;
}
.logo-text {
  font-weight: 700;
  font-size: 1.1rem;
  vertical-align: middle;
}
/* Contact page styling */
.contact-cards {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.email-obfuscated,
.contact-phone {
  font-weight: 600;
  font-size: 1rem;
  color: var(--brand-2);
  margin-top: 6px;
  user-select: all;
}

.email-obfuscated a {
  text-decoration: none;
  color: var(--brand-2);
}

.email-obfuscated a:hover {
  color: var(--brand);
  text-decoration: underline;
}

