@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: rgba(0, 0, 0, 0.028);
  --surface-hover: rgba(0, 0, 0, 0.05);
  --border: rgba(0, 0, 0, 0.09);
  --border-hover: rgba(0, 0, 0, 0.2);
  --text: #14161a;
  --text-dim: #5b5f6a;
  --text-dimmer: #8a8e98;
  --accent: #0284c7;
  --accent-2: #7c3aed;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 980px; margin: 0 auto; padding: 0 24px; }

/* Ambient background wash */
body::before {
  content: "";
  position: fixed;
  top: -20%;
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(2, 132, 199, 0.07), rgba(124, 58, 237, 0.05) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

header.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
header.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}
header.site-header .brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
header.site-header nav a {
  margin-left: 28px;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
  position: relative;
}
header.site-header nav a:hover { color: var(--text); }
header.site-header nav a.active { color: var(--text); }

main { position: relative; z-index: 1; }

.hero { text-align: center; padding: 96px 24px 56px; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.22);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4rem);
  margin: 0 0 20px;
  letter-spacing: -0.03em;
  font-weight: 800;
  background: linear-gradient(180deg, #14161a 20%, #565b66);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  color: var(--text-dim);
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.1rem;
}
.hero .cta { margin-top: 36px; display: flex; gap: 14px; justify-content: center; }

.btn {
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.15s, opacity 0.15s, border-color 0.15s;
  display: inline-block;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, #181a1f, #383c44);
  color: #ffffff;
}
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--border-hover); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  max-width: 980px;
  margin: 24px auto 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--border);
}
.stats > div {
  background: #ffffff;
  text-align: center;
  padding: 32px 16px;
}
.stats .value {
  font-size: 2.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stats .label { color: var(--text-dim); font-size: 0.82rem; margin-top: 6px; }

section.block { padding: 72px 24px; }
section.block .block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}
section.block h2 { font-size: 1.7rem; margin: 0; letter-spacing: -0.01em; }
section.block .view-all { font-size: 0.85rem; color: var(--text-dim); transition: color 0.15s; }
section.block .view-all:hover { color: var(--accent); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.12);
}
.card img.logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  margin-bottom: 18px;
  background: #f7f8fa;
  border: 1px solid var(--border);
  padding: 4px;
}
.card h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 600; }
.card p { margin: 0; color: var(--text-dim); font-size: 0.9rem; }
.card.article img.thumb {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  margin: -26px -26px 18px;
  width: calc(100% + 52px);
}

/* Blog listing */
.blog-hero { text-align: center; padding: 72px 24px 40px; }
.blog-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3rem);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.blog-hero p { color: var(--text-dim); font-size: 1.05rem; margin: 0; }

.blog-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 40px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.blog-featured:hover { border-color: var(--border-hover); box-shadow: 0 16px 32px -16px rgba(0, 0, 0, 0.12); }
.blog-featured img, .blog-featured-noimg {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--surface);
}
.blog-featured-body h2 { font-size: 1.5rem; margin: 8px 0 10px; letter-spacing: -0.01em; }
.blog-featured-body p.meta { color: var(--text-dimmer); font-size: 0.82rem; margin: 0; }
.blog-featured-body p { color: var(--text-dim); font-size: 0.95rem; margin: 0 0 16px; }

.blog-list { display: flex; flex-direction: column; }
.blog-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  align-items: center;
  padding: 22px 8px;
  border-top: 1px solid var(--border);
  transition: background 0.15s;
}
.blog-list .blog-row:last-child { border-bottom: 1px solid var(--border); }
.blog-row:hover { background: var(--surface); }
.blog-row img, .blog-row-noimg {
  width: 160px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--surface);
}
.blog-row-body h3 { margin: 4px 0 6px; font-size: 1.08rem; font-weight: 600; letter-spacing: -0.01em; }
.blog-row-body p.meta { color: var(--text-dimmer); font-size: 0.8rem; margin: 0; }
.blog-row-body p { color: var(--text-dim); font-size: 0.9rem; margin: 0 0 10px; }
.blog-row-body .tags { margin: 0; }
.blog-row-body .tag { font-size: 0.7rem; padding: 3px 10px; }

@media (max-width: 640px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-row { grid-template-columns: 90px 1fr; gap: 14px; }
  .blog-row img, .blog-row-noimg { width: 90px; height: 70px; }
}

/* About page */
.about-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: center;
  padding: 80px 24px 40px;
}
.about-hero img {
  width: 220px;
  height: 220px;
  border-radius: 24px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.about-hero h1 {
  font-size: 2.4rem;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.about-hero p { color: var(--text-dim); font-size: 1.05rem; margin: 0 0 24px; }
.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
}
.social-row a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.social-row svg { width: 18px; height: 18px; }

.note-banner {
  max-width: 980px;
  margin: 0 auto 64px;
  padding: 16px 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text-dimmer);
  font-size: 0.85rem;
  text-align: center;
}

article.post-body { padding: 72px 24px; max-width: 720px; margin: 0 auto; }
article.post-body .meta { color: var(--text-dimmer); font-size: 0.85rem; }
article.post-body h1 { font-size: 2.3rem; margin: 12px 0 24px; letter-spacing: -0.02em; }
article.post-body .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
article.post-body .tag {
  font-size: 0.75rem;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
article.post-body p, article.post-body li { color: #383b42; }
article.post-body h2 { font-size: 1.4rem; margin-top: 2.2rem; letter-spacing: -0.01em; }
article.post-body a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(2, 132, 199, 0.35); }
article.post-body ul { padding-left: 1.3rem; }
article.post-body li { margin-bottom: 8px; }

footer.site-footer { border-top: 1px solid var(--border); padding: 40px 24px; margin-top: 40px; position: relative; z-index: 1; }
footer.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
footer.site-footer p { color: var(--text-dimmer); font-size: 0.82rem; margin: 0; }

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.2rem; }
  .about-hero { grid-template-columns: 1fr; text-align: center; padding-top: 56px; }
  .about-hero img { width: 160px; height: 160px; margin: 0 auto; }
  .social-row { justify-content: center; }
}
