:root {
    --bg: #0e1116;
    --fg: #e6e8eb;
    --muted: #8b94a3;
    --accent: #5b8def;
    --accent-hover: #89aef5;
    --card: #161b24;
    --border: #232936;
    --radius: 10px;
    --maxw: 780px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--fg);
    font-size: 17px;
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; width: 100%; }

header {
    border-bottom: 1px solid var(--border);
    background: rgba(14, 17, 22, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    position: sticky; top: 0; z-index: 10;
}
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 600; font-size: 1.05rem; color: var(--fg); letter-spacing: 0.02em; }
.logo:hover { color: var(--accent); text-decoration: none; }
nav ul { display: flex; gap: 22px; list-style: none; }
nav a { color: var(--muted); font-size: 0.94rem; }
nav a:hover { color: var(--fg); text-decoration: none; }
nav a.active { color: var(--accent); }

main { flex: 1; padding: 56px 0; }
h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 600; line-height: 1.25; margin-bottom: 18px; }
h2 { font-size: 1.3rem; font-weight: 600; margin: 32px 0 14px; }
h3 { font-size: 1.08rem; font-weight: 600; margin: 22px 0 10px; }
p { color: #cdd3db; margin-bottom: 14px; }
p.lead { color: var(--muted); font-size: 1.12rem; margin-bottom: 24px; }
.meta { color: var(--muted); font-size: 0.88rem; }

.grid {
    display: grid; gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin: 28px 0;
}
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.card h3 { margin-top: 0; }
.card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

.btn {
    display: inline-block;
    padding: 11px 20px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 500;
    font-size: 0.94rem;
    border: 1px solid var(--accent);
    transition: background .15s;
}
.btn:hover { background: #4a7cdf; color: #fff; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); background: transparent; }

details {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 12px;
}
details summary {
    cursor: pointer;
    font-weight: 500;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--muted); }
details[open] summary::after { content: "−"; }
details[open] summary { margin-bottom: 12px; }
details p { margin-bottom: 10px; }
details p:last-child { margin-bottom: 0; }

footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    color: var(--muted);
    font-size: 0.88rem;
}
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 560px) {
    header .wrap { height: 56px; }
    nav ul { gap: 14px; }
    main { padding: 40px 0; }
}
