*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:      #09090f;
    --bg2:     #0f0f1c;
    --bg3:     #13131f;
    --border:  rgba(255,255,255,0.07);
    --text:    #e2e8f0;
    --muted:   #64748b;
    --subtle:  #94a3b8;
    --accent:  #6366f1;
    --accent2: #818cf8;
    --green:   #10b981;
    --blue:    #3b82f6;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

a { color: var(--accent2); }

/* ── Nav ── */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 40px;
    border-bottom: 1px solid var(--border);
    background: rgba(9,9,15,0.95);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}
.nav-brand svg { flex-shrink: 0; }
.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
}
.nav-links a {
    font-size: 14px;
    font-weight: 600;
    color: var(--subtle);
    text-decoration: none;
    transition: color .15s;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--accent2);
}
@media (max-width: 580px) {
    nav { padding: 14px 18px; }
    .nav-links { gap: 16px; }
    .nav-links a { font-size: 13px; }
}

/* ── Hero ── */
.hero {
    max-width: 860px;
    margin: 64px auto 48px;
    padding: 0 32px;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--accent2);
    margin-bottom: 20px;
}
.hero h1 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.15;
}
.hero h1 span { color: var(--accent2); }
.hero p {
    font-size: 17px;
    color: var(--subtle);
    max-width: 620px;
    line-height: 1.7;
}
@media (max-width: 580px) { .hero h1 { font-size: 32px; } }

/* ── Section ── */
.section {
    max-width: 860px;
    margin: 0 auto 48px;
    padding: 0 32px;
}
.section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* ── Blog grid ── */
.blog-grid {
    max-width: 1080px;
    margin: 0 auto 56px;
    padding: 0 32px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .blog-grid { grid-template-columns: 1fr; } }

.post-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    text-decoration: none;
    color: inherit;
    transition: border-color .2s, transform .2s;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.post-card:hover {
    border-color: rgba(99,102,241,.35);
    transform: translateY(-2px);
}
.post-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--accent2);
}
.post-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    margin: 2px 0 4px;
}
.post-card p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    flex: 1;
}
.post-read {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent2);
    margin-top: 6px;
}

/* ── Article ── */
.article {
    max-width: 760px;
    margin: 56px auto 48px;
    padding: 0 32px;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 20px;
}
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.article h1 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 18px;
}
@media (max-width: 580px) { .article h1 { font-size: 28px; } }
.article-lede {
    font-size: 17px;
    color: var(--subtle);
    line-height: 1.7;
    padding-bottom: 24px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border);
}
.article h2 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 36px 0 14px;
    line-height: 1.3;
}
.article h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 26px 0 10px;
}
.article p, .article li {
    font-size: 15.5px;
    color: var(--text);
    line-height: 1.75;
    margin-bottom: 14px;
}
.article ul, .article ol {
    padding-left: 22px;
    margin-bottom: 16px;
}
.article li { margin-bottom: 6px; }
.article code {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 2px 7px;
    font-family: 'Consolas', 'SF Mono', monospace;
    font-size: 13.5px;
    color: var(--accent2);
}
.article pre {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
    overflow-x: auto;
    font-family: 'Consolas', 'SF Mono', monospace;
    font-size: 13px;
    color: var(--subtle);
    line-height: 1.6;
    margin: 14px 0 20px;
}
.article pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}
.article blockquote {
    border-left: 3px solid var(--accent);
    background: var(--bg2);
    padding: 14px 20px;
    margin: 18px 0;
    color: var(--subtle);
    font-size: 15px;
    border-radius: 0 8px 8px 0;
}
.article a { color: var(--accent2); text-decoration: underline; text-underline-offset: 3px; }
.article a:hover { color: #a5b4fc; }
.article strong { color: #fff; font-weight: 700; }

/* ── Related posts ── */
.related {
    max-width: 760px;
    margin: 28px auto 60px;
    padding: 28px 32px 0;
    border-top: 1px solid var(--border);
}
.related h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--muted);
    margin-bottom: 16px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
@media (max-width: 720px) { .related-grid { grid-template-columns: 1fr; } }

/* ── Generic card (about, contact) ── */
.panel {
    max-width: 760px;
    margin: 0 auto 32px;
    padding: 32px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.panel h2 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}
.panel h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 18px 0 8px;
}
.panel p, .panel li {
    font-size: 15px;
    color: var(--subtle);
    line-height: 1.7;
    margin-bottom: 12px;
}
.panel ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

/* ── Form ── */
.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.form-row label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--muted);
}
.form-row input, .form-row textarea {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 11px 14px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
}
.form-row input:focus, .form-row textarea:focus {
    border-color: rgba(99,102,241,.45);
}
.form-row textarea { min-height: 140px; resize: vertical; }
.btn-submit {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.btn-submit:hover { background: var(--accent2); }

/* ── Contact list ── */
.contact-list {
    list-style: none;
    padding: 0;
}
.contact-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--subtle);
}
.contact-list li:last-child { border: none; }
.contact-list strong { color: var(--text); display: block; margin-bottom: 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }

/* ── Footer ── */
footer {
    border-top: 1px solid var(--border);
    padding: 28px 32px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin-top: 32px;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--subtle); }
