/* Decent Site — modern default theme (plain HTML, minimal JS) */
:root {
  color-scheme: light;
  --bg0: #f4f6f8;
  --bg1: #eef2f7;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;
  --accent: #0d9488;
  --accent-deep: #0f766e;
  --accent-soft: rgba(13, 148, 136, 0.12);
  --border: rgba(15, 23, 42, 0.08);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.06);
  --radius: 16px;
  --radius-sm: 12px;
  --content: 42rem;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.65;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(13, 148, 136, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(59, 130, 246, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  background-attachment: fixed;
}

a {
  color: var(--accent-deep);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--accent); }

.wrap {
  width: min(calc(100% - 2rem), calc(var(--content) + 4rem));
  margin: 0 auto;
  padding: 1.5rem 0 3.5rem;
}

/* —— Header —— */
header.site {
  position: sticky;
  top: 0.75rem;
  z-index: 10;
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

header.site h1 {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
header.site h1 a {
  color: inherit;
  text-decoration: none;
}
header.site h1 a:hover { color: var(--accent-deep); }

.tagline {
  color: var(--muted);
  margin: 0.35rem 0 0.9rem;
  font-size: 0.95rem;
  max-width: 36rem;
}

nav[aria-label="Main"] ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

nav[aria-label="Main"] a {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
nav[aria-label="Main"] a:hover {
  background: var(--accent-soft);
  border-color: rgba(13, 148, 136, 0.2);
  color: var(--accent-deep);
  text-decoration: none;
}

/* —— Main article —— */
main {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 3vw, 2rem);
}

article > h1:first-child {
  margin: 0 0 0.5rem;
  font-size: clamp(1.65rem, 3.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
}

/* Prose */
article h2 {
  margin: 2rem 0 0.65rem;
  font-size: 1.3rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
article h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}
article p { margin: 0 0 1rem; }
article ul, article ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
article li { margin: 0.25rem 0; }
article li::marker { color: var(--accent); }
article blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #134e4a;
}
article blockquote p:last-child { margin-bottom: 0; }
article code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.35em;
}
article pre {
  overflow-x: auto;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin: 1.25rem 0;
  font-size: 0.88rem;
  line-height: 1.5;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
article pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
article strong { font-weight: 700; }

article img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: block;
  margin: 1rem 0 1.25rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

/* —— Post index —— */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: grid;
  gap: 0.85rem;
}
.post-list li {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.post-list li:hover {
  border-color: rgba(13, 148, 136, 0.35);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.08);
  transform: translateY(-1px);
}
.post-list a {
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.post-list a:hover { color: var(--accent-deep); }
.post-list .meta { margin: 0.25rem 0 0.4rem; }
.post-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* —— Footer —— */
footer.site {
  margin-top: 1.5rem;
  padding: 1rem 0.25rem 0;
  color: var(--faint);
  font-size: 0.85rem;
  text-align: center;
}
footer.site p { margin: 0; }
footer.site .feeds {
  margin-top: 0.35rem;
}
footer.site .feeds a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
footer.site .feeds a:hover { color: var(--accent-deep); }

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border: 1px solid rgba(13, 148, 136, 0.2);
}

@media (max-width: 560px) {
  header.site { top: 0.5rem; padding: 0.85rem 1rem; }
  main { padding: 1.1rem; border-radius: var(--radius-sm); }
  nav[aria-label="Main"] a { padding: 0.35rem 0.6rem; font-size: 0.85rem; }
}
