/* vedon.net theme — hand-written, no external assets. Light + dark. */

:root {
  --accent: #0e9384;         /* teal */
  --accent-strong: #0b7568;
  --accent-2: #4f46e5;       /* indigo, used in gradients */
  --bg: #ffffff;
  --bg-soft: #f6f8f8;
  --bg-code: #f3f4f6;
  --text: #1f2933;
  --text-soft: #52606d;
  --border: #e4e7eb;
  --header-bg: #10201f;
  --header-text: #e6f2f0;
  --max-width: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1615;
    --bg-soft: #16211f;
    --bg-code: #1b2826;
    --text: #e3e8e7;
    --text-soft: #9aa8a5;
    --border: #263533;
    --header-bg: #0b1110;
    --header-text: #e6f2f0;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
img { max-width: 100%; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; }
h1 { font-size: 2.1rem; margin: 0.5em 0; }
h2 { font-size: 1.5rem; margin-top: 2em; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.container.narrow { max-width: 820px; }
.site-main { min-height: 60vh; }

/* Code */
code, pre {
  font-family: ui-monospace, SFMono-Regular, "Cascadia Code", Consolas, Menlo, monospace;
  font-size: 0.9em;
}
code { background: var(--bg-code); padding: 0.15em 0.35em; border-radius: 4px; }
pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  line-height: 1.5;
}
pre code { background: none; padding: 0; }

table { border-collapse: collapse; width: 100%; margin: 1rem 0; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
th { background: var(--bg-soft); }
blockquote { border-left: 3px solid var(--accent); margin: 1rem 0; padding: 0.25rem 1rem; color: var(--text-soft); background: var(--bg-soft); border-radius: 0 8px 8px 0; }

/* Header */
.site-header {
  background: var(--header-bg);
  color: var(--header-text);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 60px; }
.brand { display: flex; align-items: center; gap: 0.5rem; color: var(--header-text); font-weight: 700; font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 1.1rem; margin-left: auto; }
.site-nav a { color: var(--header-text); opacity: 0.85; font-weight: 500; }
.site-nav a:hover, .site-nav a.active { opacity: 1; color: #fff; text-decoration: none; }
.site-nav a.active { color: var(--accent); }
.nav-github { display: inline-flex; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--header-text); font-size: 1.4rem; cursor: pointer; }

/* Hero */
.hero { text-align: center; padding: 4.5rem 1rem 3rem; }
.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3.1rem);
  max-width: 900px; margin: 0 auto 1rem;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero p { max-width: 720px; margin: 0 auto 2rem; font-size: 1.15rem; color: var(--text-soft); }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 0.7rem 1.4rem; border-radius: 8px;
  font-weight: 600; border: 1px solid var(--border);
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-secondary { background: var(--bg-soft); color: var(--text); }

/* Cards & feature grids */
.section { padding: 3rem 0; }
.section.alt { background: var(--bg-soft); }
.section h2 { text-align: center; margin: 0 0 0.5rem; font-size: 1.9rem; }
.section .section-sub { text-align: center; color: var(--text-soft); max-width: 720px; margin: 0 auto 2rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem;
}
.card h3 { margin: 0; font-size: 1.15rem; }
.card p { margin: 0; color: var(--text-soft); font-size: 0.95rem; }
.card code { font-size: 0.8rem; }
.card .card-link { margin-top: auto; font-weight: 600; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem 2rem; margin-top: 2rem; }
.feature h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--text-soft); font-size: 0.95rem; }

/* Language tabs on the homepage */
.code-tabs { max-width: 860px; margin: 2rem auto 0; text-align: left; }
.code-tabs .tab-buttons { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.code-tabs .tab-buttons button {
  border: 1px solid var(--border); border-bottom: none; background: var(--bg-soft);
  color: var(--text-soft); padding: 0.45rem 1rem; border-radius: 8px 8px 0 0;
  cursor: pointer; font-weight: 600; font-size: 0.9rem;
}
.code-tabs .tab-buttons button.active { background: var(--bg-code); color: var(--text); }
.code-tabs .tab-panel { display: none; }
.code-tabs .tab-panel.active { display: block; }
.code-tabs .tab-panel pre { margin: 0; border-radius: 0 8px 8px 8px; }

/* Docs layout */
.docs-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 2.5rem; padding-top: 1.5rem; padding-bottom: 3rem; }
.docs-sidebar {
  border-right: 1px solid var(--border);
  padding-right: 1rem;
  position: sticky; top: 76px;
  align-self: start;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}
.nav-section { margin-bottom: 1.25rem; }
.nav-section-title { font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-soft); margin-bottom: 0.4rem; }
.sidebar-nav ul { list-style: none; margin: 0; padding: 0; }
.sidebar-nav li a {
  display: block; padding: 0.25rem 0.6rem; border-radius: 6px;
  color: var(--text); font-size: 0.92rem;
}
.sidebar-nav li a:hover { background: var(--bg-soft); text-decoration: none; }
.sidebar-nav li a.active { background: var(--bg-soft); color: var(--accent-strong); font-weight: 600; }
.docs-content { min-width: 0; padding-bottom: 2rem; }
.docs-content h1 { margin-top: 0.5rem; }
.sidebar-toggle { display: none; }

.draft-banner {
  background: var(--bg-soft); border: 1px dashed var(--border);
  border-radius: 8px; padding: 0.6rem 1rem; margin: 1rem 0; font-size: 0.9rem; color: var(--text-soft);
}

/* Blog */
.post-meta { color: var(--text-soft); font-size: 0.9rem; margin-top: -0.5rem; }
.post-list { list-style: none; padding: 0; }
.post-list li { margin-bottom: 1.5rem; }
.post-list .post-title { font-size: 1.2rem; font-weight: 600; }

/* Footer */
.site-footer { background: var(--header-bg); color: var(--header-text); margin-top: 3rem; padding: 2.5rem 0 1rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; }
.site-footer h4 { margin: 0 0 0.6rem; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.7; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.3rem 0; }
.site-footer a { color: var(--header-text); opacity: 0.85; }
.site-footer a:hover { opacity: 1; }
.footer-bottom { margin-top: 2rem; font-size: 0.85rem; opacity: 0.6; }

/* Responsive */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--header-bg); padding: 0.5rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.5rem 0; }
  .docs-wrap { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; position: static; max-height: none; border-right: 0; }
  .docs-sidebar.open { display: block; }
  .sidebar-toggle {
    display: block; width: 100%; text-align: left; margin-bottom: 0.5rem;
    background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px;
    padding: 0.5rem 1rem; color: var(--text); cursor: pointer; font-size: 1rem;
  }
}
