* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --bg: #f6f7f4;
  --bg-soft: #eef1e6;
  --text: #1e1e1e;
  --accent: #3f6c2a;
  --card: #ffffffcc;
  --blur: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111;
    --bg-soft: #1a1a1a;
    --text: #f2f2f2;
    --accent: #8bcf6a;
    --card: #1f1f1fcc;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
a {
  color: inherit;
}

img, pre,blockquote,form,fieldset {
  max-width: 100%;
  padding: 1em;
}
.post-content :not(.more) a {
  color: var(--accent);
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  background: linear-gradient(120deg, var(--bg), var(--bg-soft));
  color: var(--text);
  line-height: 1.6;
}

/* layout */

.layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: 100vh;
}

/* hero */

.hero {
  padding: 70px 50px;
  position: sticky;
  top: 0;
  margin-bottom:auto;
  backdrop-filter: blur(var(--blur));
}

.hero h1 {
  font-size: 42px;
  margin-bottom: 12px;
  color: var(--accent);
}

.hero p {
  opacity: 0.7;
  margin-bottom: 30px;
}

.menu a {
  display: block;
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
  transition: 0.25s;
}

.menu a:hover {
  transform: translateX(6px);
  opacity: 0.7;
}

/* masonry grid */

.posts {
  padding: 60px;
  columns: 350px;
  column-gap: 30px;
}
body:is(:not(.mode-home, .mode-tag, .mode-archive, .mode-categorie)) .posts {
  columns: initial;
  margin:auto auto auto 0;
}
.post {
  break-inside: avoid;
  margin-bottom: 30px;
  background: var(--card);
  backdrop-filter: blur(var(--blur));
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: 0.3s;
}

.post:hover {
  transform: translateY(-5px);
}

.post img {
  width: 100%;
  display: block;
}

.post-content {
  padding: 26px;
}

.post h2 {
  font-size: 22px;
  margin-bottom: 10px;
}

.post p {
  opacity: 0.75;
  margin-bottom: 16px;
}

.button {
  display: inline-block;
  padding: 9px 16px;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
}

/* article  */

.article {
  max-width: 780px;
  margin: auto;
  background: var(--card);
  backdrop-filter: blur(var(--blur));
  padding: 60px;
  border-radius: 18px;
}

.article h1 {
  margin-bottom: 16px;
}

/* footer */

footer {
  text-align: center;
  padding: 40px;
  opacity: 0.7;
}

/* mobile */

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

  .hero {
    height: auto;
  }

  .posts {
    columns: 1;
    padding: 40px 20px;
  }
}
