:root {
  --bg-base: #ffffff;
  --bg-surface: #f5f8f8;
  --bg-elevated: #ffffff;
  --bg-hover: #e9f6f5;
  --border: #dde5e5;
  --border-strong: #b8caca;
  --text-primary: #16242a;
  --text-secondary: #46565c;
  --text-muted: #647277;
  --brand: #00ded1;
  --accent: #0e8b89;
  --accent-deep: #0b6e6c;
  --accent-subtle: rgba(0, 222, 209, 0.14);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(16, 40, 40, 0.08);
  --font-sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }

.shell { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

.site-header {
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--brand);
  box-shadow: inset 0 -10px 18px rgba(14, 139, 137, 0.28);
}

.nav-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.nav-links a { color: var(--text-secondary); font-weight: 650; }

.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 2.5rem;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--accent-deep);
  font-weight: 700;
  font-size: 0.9rem;
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; text-wrap: balance; }
h1 { max-width: 880px; margin: 1.2rem 0 1rem; font-size: clamp(2.5rem, 7vw, 5rem); }
h2 { margin: 0 0 1rem; font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { margin: 1.5rem 0 0.5rem; font-size: 1.35rem; }

.lede { max-width: 760px; color: var(--text-secondary); font-size: clamp(1.1rem, 2vw, 1.35rem); text-wrap: pretty; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  padding: 1rem 0 4rem;
}

.project-card, .panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.project-card { padding: 1.25rem; }
.project-card h2 { font-size: 1.45rem; margin-top: 0.75rem; }
.project-card p { color: var(--text-secondary); }

.meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.chip {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  background: var(--accent-subtle);
  color: var(--accent-deep);
  font-size: 0.85rem;
  font-weight: 700;
}

.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  gap: 1.25rem;
  padding: 2rem 0 4rem;
}

.toc { padding: 1rem; align-self: start; position: sticky; top: 1rem; }
.toc a { display: block; padding: 0.45rem 0; color: var(--text-secondary); font-weight: 650; }

.content { padding: clamp(1rem, 4vw, 2rem); overflow-wrap: anywhere; }
.content > *:first-child { margin-top: 0; }
.content p, .content li { color: var(--text-secondary); }
.content pre {
  overflow: auto;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: #102028;
  color: #e9ffff;
}
.content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.content table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; }
.content th, .content td { border: 1px solid var(--border); padding: 0.6rem; vertical-align: top; }
.content th { background: var(--bg-hover); text-align: left; color: var(--text-primary); }
.content blockquote { margin: 1rem 0; padding: 0.75rem 1rem; background: var(--bg-hover); border: 1px solid var(--border); border-radius: var(--radius-md); }

.footer { padding: 2rem 0; border-top: 1px solid var(--border); color: var(--text-muted); }

@media (max-width: 760px) {
  .nav { align-items: flex-start; flex-direction: column; padding: 1rem 0; }
  .doc-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
