/* ─── Design tokens ─────────────────────────────────────────────────────── */
:root {
    --bg: #0b0d12;
    --surface: #141821;
    --surface-2: #1c212d;
    --border: #283042;
    --text: #e6e9ef;
    --muted: #9aa3b2;
    --accent: #6366f1;
    --accent-2: #22d3ee;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --max: 1080px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
[data-theme="light"] {
    --bg: #f7f8fb;
    --surface: #ffffff;
    --surface-2: #f0f2f7;
    --border: #e2e6ee;
    --text: #1a1f2b;
    --muted: #5b6473;
    --shadow: 0 10px 30px rgba(20, 30, 60, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

/* ─── Header / nav ──────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 1.25rem; }
.nav-links a { color: var(--muted); font-size: 0.95rem; transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.theme-toggle {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    width: 36px; height: 36px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    font-weight: 600; font-size: 0.92rem;
    border: 1px solid transparent;
    cursor: pointer; transition: transform 0.1s, background 0.15s, border 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }

/* ─── Hero ──────────────────────────────────────────────────────────────── */
.hero { padding: 6rem 0 4rem; }
.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1.1; margin: 0 0 1rem;
    letter-spacing: -0.03em;
    background: linear-gradient(120deg, var(--text), var(--accent-2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.headline { font-size: 1.25rem; color: var(--muted); margin: 0 0 1.5rem; }
.hero .socials { display: flex; gap: 1rem; margin-top: 1.5rem; }
.hero .socials a { color: var(--muted); }
.hero .socials a:hover { color: var(--accent); }

/* ─── Sections ──────────────────────────────────────────────────────────── */
.section { padding: 3rem 0; }
.section h2 { font-size: 1.6rem; letter-spacing: -0.02em; margin: 0 0 1.5rem; }
.section-eyebrow { color: var(--accent); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* ─── Cards grid ────────────────────────────────────────────────────────── */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
    transition: transform 0.15s, border 0.15s, box-shadow 0.15s;
    display: flex; flex-direction: column; gap: 0.6rem;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.card h3 { margin: 0; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.card .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; }
.tag {
    font-size: 0.75rem; color: var(--muted);
    background: var(--surface-2); border: 1px solid var(--border);
    padding: 0.15rem 0.55rem; border-radius: 999px;
}

/* ─── Tool cards (dashboard) ────────────────────────────────────────────── */
.tool-card { align-items: flex-start; }
.tool-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center; font-size: 1.4rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.dash-header { padding: 3rem 0 1rem; }
.dash-header h1 { margin: 0 0 0.25rem; font-size: 2rem; letter-spacing: -0.02em; }
.dash-header p { color: var(--muted); margin: 0; }
.cat-title { font-size: 1.1rem; color: var(--muted); margin: 2rem 0 1rem; }

/* ─── Forms ─────────────────────────────────────────────────────────────── */
.form { display: grid; gap: 0.9rem; max-width: 520px; }
.form input, .form textarea {
    width: 100%; padding: 0.7rem 0.9rem;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 10px;
    font-family: inherit; font-size: 0.95rem;
}
.form textarea { min-height: 130px; resize: vertical; }

/* ─── Flash messages ────────────────────────────────────────────────────── */
.flash { padding: 0.8rem 1rem; border-radius: 10px; margin-top: 1rem; border: 1px solid var(--border); }
.flash-success { border-color: #1f9d55; background: rgba(31, 157, 85, 0.12); }
.flash-error { border-color: #e3342f; background: rgba(227, 52, 47, 0.12); }

/* ─── Footer ────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); margin-top: 4rem; padding: 2rem 0; color: var(--muted); font-size: 0.9rem; }

/* ─── Empty state ───────────────────────────────────────────────────────── */
.empty {
    text-align: center; padding: 4rem 1rem; color: var(--muted);
    border: 1px dashed var(--border); border-radius: var(--radius);
}
