:root {
  --bg: #F2F5F9;
  --card: #fff;
  --ink: #0F1B2D;
  --muted: #5B6778;
  --line: #DCE3EC;
  --brand: #2F5BFF;
  --accent: #FFB020;
  --r: 14px;
}

@media(prefers-color-scheme: dark) {
  :root {
    --bg: #0C1422;
    --card: #131E31;
    --ink: #E8EEF7;
    --muted: #9AA8BC;
    --line: #22314A;
    --brand: #7C9BFF;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 "Bricolage Grotesque", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 22px;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.logo {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.03em;
}

.logo:before {
  content: "";
  display: inline-block;
  width: .7em;
  height: .7em;
  background: var(--brand);
  border-radius: 50% 50% 50% 0;
  margin-right: .35em;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 20px;
  font-weight: 500;
}

nav a:hover, nav a[aria-current] {
  color: var(--ink);
  box-shadow: 0 3px 0 var(--accent);
}

h1, h2, h3 {
  line-height: 1.12;
  letter-spacing: -.025em;
  margin: 0 0 .5em;
}

h1 {
  font-size: clamp(2.3rem, 6vw, 4rem);
  font-weight: 800;
}

h2 {
  font-size: 1.7rem;
}

h3 {
  font-size: 1.2rem;
}

.hero {
  padding: 56px 0 40px;
}

.hero p {
  max-width: 34em;
  color: var(--muted);
  font-size: 1.15rem;
}

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.flow {
  display: flex;
  align-items: center;
  margin: 34px 0 0;
  flex-wrap: wrap;
  gap: 6px 0;
}

.flow span {
  background: var(--card);
  border: 1.5px solid var(--line);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
}

.flow .ai {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.flow i {
  width: 44px;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 7px, transparent 7px 14px);
  background-size: 14px 3px;
  animation: dash 1s linear infinite;
}

@keyframes dash {
  to {
    background-position: 14px 0;
  }
}

@media(prefers-reduced-motion: reduce) {
  .flow i {
    animation: none;
  }
}

section {
  padding: 30px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.post {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.post h3 a {
  color: var(--ink);
  text-decoration: none;
}

.post h3 a:hover {
  color: var(--brand);
}

.post p {
  color: var(--muted);
  margin: 0;
  flex: 1;
}

.meta {
  font-size: .88rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.tag {
  color: var(--brand);
  font-weight: 700;
}

.prose {
  max-width: 680px;
  margin: 0 auto;
  padding: 30px 22px 60px;
  font-family: Literata, Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.75;
}

.prose h1 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(2rem, 5vw, 2.9rem);
}

.prose h2, .prose h3 {
  font-family: "Bricolage Grotesque", sans-serif;
  margin-top: 1.6em;
}

.prose pre {
  background: #0F1B2D;
  color: #E8EEF7;
  padding: 16px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: .9rem;
  line-height: 1.5;
}

.prose code {
  font-size: .9em;
}

.prose img {
  max-width: 100%;
  border-radius: 10px;
}

.prose blockquote {
  margin: 1.4em 0;
  padding-left: 18px;
  border-left: 4px solid var(--accent);
  color: var(--muted);
}

/* Hero banner: sits inside .prose, same column as the article text */
.hero-banner {
  margin: 0 0 32px;
}

.hero-banner img {
  width: 100%;
  height: auto;       /* show the whole image, no cropping */
  display: block;
  border-radius: var(--r);
  background: var(--line);
}



/* Optional: let the banner extend slightly past the text column on desktop.
   Delete this block if you want it exactly as wide as the text. */


.hero-banner figcaption {
  text-align: center;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: .9rem;
  line-height: 1.4;
  color: var(--muted);
  margin-top: 10px;
}
/* Inline images inside the article */
.prose figure {
  margin: 2em 0;
}

.prose figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r);
  background: var(--line);
}

.prose figure figcaption {
  text-align: center;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: .9rem;
  line-height: 1.4;
  color: var(--muted);
  margin-top: 10px;
}

/* Optional: smaller centered image (screenshots, diagrams) */
.prose figure.small {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.ad {
  margin: 28px 0;
  min-height: 90px;
  text-align: center;
}

form {
  display: grid;
  gap: 14px;
  max-width: 520px;
  font-family: "Bricolage Grotesque", sans-serif;
}

label {
  font-weight: 600;
  display: grid;
  gap: 6px;
}

input, textarea {
  font: inherit;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
}

footer {
  border-top: 1px solid var(--line);
  margin-top: 50px;
  padding: 30px 0;
  color: var(--muted);
  font-size: .95rem;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

footer a {
  color: var(--muted);
  margin-right: 16px;
}