@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --bg: #0c1114;
  --bg-alt: #12181d;
  --ink: #f3f5f7;
  --muted: #9aa6b2;
  --accent: #7bd3c9;
  --accent-2: #f2b96f;
  --link: #7aaef7;
  --card: rgba(255, 255, 255, 0.06);
  --stroke: rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% 0%, rgba(123, 211, 201, 0.15), transparent 55%),
    radial-gradient(900px 500px at 90% 10%, rgba(242, 185, 111, 0.12), transparent 50%),
    var(--bg);
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--accent-2);
}

.site-header, .site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-signup {
  max-width: 1100px;
  margin: 0 auto 40px;
  padding: 0 20px;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
}

.search {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 260px;
}

.search input {
  width: min(320px, 70vw);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(10, 16, 20, 0.8);
  color: var(--ink);
}

.search-results {
  margin-top: 8px;
  background: rgba(9, 13, 16, 0.95);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 8px;
  width: min(480px, 86vw);
  max-height: 320px;
  overflow: auto;
}

.search-result {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
}

.search-result:hover {
  background: rgba(123, 211, 201, 0.08);
}

.search-title {
  font-weight: 600;
}

.site-nav a {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: border-color .2s ease, color .2s ease;
}

.site-nav a:hover {
  border-color: rgba(123, 211, 201, 0.4);
  color: var(--accent);
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.hero {
  padding: 32px 0 20px;
}
.hero h1 {
  font-size: clamp(2rem, 3vw, 3.2rem);
  margin: 0 0 12px;
}
.hero p { color: var(--muted); margin: 0; max-width: 680px; }

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 28px;
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 18px;
  transition: transform .2s ease, border-color .2s ease;
  animation: rise .4s ease both;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(123, 211, 201, 0.4);
}

.meta {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.85rem;
  color: var(--muted);
}

.meta-list {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.meta-list li + li {
  margin-top: 0.35rem;
}

.meta-list strong {
  color: var(--ink);
  font-weight: 600;
}

.tag {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(123, 211, 201, 0.14);
  color: var(--accent);
  font-size: 0.75rem;
}

.post-title { margin: 10px 0 8px; }

.card-image {
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  margin-bottom: 12px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-image.fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.85rem;
}

.post-body img {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--stroke);
}

.image-fallback {
  padding: 24px;
  border-radius: 12px;
  border: 1px dashed var(--stroke);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  margin: 12px 0 18px;
}

.pagination {
  margin: 32px 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-link {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
}

.archive-year {
  margin-top: 28px;
}

.archive-list {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 6px;
}

.archive-weeks {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 16px;
}

.archive-week-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.archive-week .archive-list {
  padding-left: 14px;
  border-left: 1px solid var(--stroke);
  margin: 0;
}

.post-links {
  margin-top: 24px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
}

.post-links ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
