:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg-alt: #eef2f8;
  --panel: #ffffff;
  --text: #0d1321;
  --muted: #4b5563;
  --accent: #0c7cff;
  --accent-weak: #cfe5ff;
  --border: #d9e2ef;
  --bg-top: #ffffff;
  --header-bg: rgba(245, 247, 251, 0.92);
  --footer-bg: #f1f4f9;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b0f17;
    --bg-alt: #121826;
    --panel: #151c2b;
    --text: #f2f5ff;
    --muted: #c3cad6;
    --accent: #8bb8ff;
    --accent-weak: #1a2a44;
    --border: #243049;
    --bg-top: #0f1522;
    --header-bg: rgba(11, 15, 23, 0.92);
    --footer-bg: #0f1522;
  }
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg-alt: #eef2f8;
  --panel: #ffffff;
  --text: #0d1321;
  --muted: #4b5563;
  --accent: #0c7cff;
  --accent-weak: #cfe5ff;
  --border: #d9e2ef;
  --bg-top: #ffffff;
  --header-bg: rgba(245, 247, 251, 0.92);
  --footer-bg: #f1f4f9;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0f17;
  --bg-alt: #121826;
  --panel: #151c2b;
  --text: #f2f5ff;
  --muted: #c3cad6;
  --accent: #8bb8ff;
  --accent-weak: #1a2a44;
  --border: #243049;
  --bg-top: #0f1522;
  --header-bg: rgba(11, 15, 23, 0.92);
  --footer-bg: #0f1522;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: radial-gradient(circle at top left, var(--bg-top) 0%, var(--bg) 60%);
  line-height: 1.6;
}

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

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

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.brand-name {
  letter-spacing: 0.3px;
}

.nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: var(--muted);
}

.nav a {
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  border-bottom-color: var(--accent);
}

.theme-toggle {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.hero {
  padding: 80px 0 60px;
}

.hero-inner {
  display: grid;
  gap: 36px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

.eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(2.2rem, 2vw + 1.6rem, 3.4rem);
  line-height: 1.1;
  margin: 0 0 20px;
}

h2 {
  font-size: clamp(1.6rem, 1.2vw + 1.2rem, 2.3rem);
  margin: 0 0 20px;
}

h3 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 640px;
}

.hero-actions {
  margin: 28px 0 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  border: 1px solid var(--accent);
}

.btn.ghost {
  background: transparent;
  color: var(--accent);
}

.meta {
  color: var(--muted);
  margin-top: 8px;
}

.hero-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(13, 19, 33, 0.08);
}

.mono {
  font-family: var(--mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 10px;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.section {
  padding: 60px 0;
}

.section.alt {
  background: var(--bg-alt);
}

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

.post-list {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.post-meta {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.post-title a {
  color: inherit;
}

.post-title a:hover {
  color: var(--accent);
}

.post-detail {
  max-width: 760px;
}

.text-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  font-weight: 600;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-weak);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.pill-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pill-row span {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-weak);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
}

.note {
  margin-top: 18px;
  color: var(--muted);
}

.contact-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.contact-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  background: var(--panel);
  display: grid;
  gap: 4px;
}

.legal .legal-block {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  background: var(--footer-bg);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 14px;
}

@media (max-width: 720px) {
  .nav {
    gap: 10px;
  }

  .hero {
    padding-top: 60px;
  }
}
