:root {
  --bg: #0b0f14;
  --panel: #111827;
  --panel-2: #0f172a;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --brand: #60a5fa;
  --brand-2: #a78bfa;
  --bd: #1f2937;
  --radius: 14px;
}

html[data-theme="light"] {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-2: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --brand: #2563eb;
  --brand-2: #7c3aed;
  --bd: #e2e8f0;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  transition: background .2s ease, color .2s ease;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bd);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { font-weight: 800; font-size: 1.1rem; color: var(--text); text-decoration: none; letter-spacing: .2px; }
.nav-links { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav-links a:hover { color: var(--text); }
.theme-toggle, .nav-toggle {
  background: var(--panel); border: 1px solid var(--bd); color: var(--text);
  border-radius: 10px; cursor: pointer; width: 38px; height: 38px;
}
.nav-toggle { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0; z-index: 30;
    flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--bd);
    padding: 12px 20px; display: none; gap: 14px;
    box-shadow: 0 8px 16px rgba(0,0,0,.25);
  }
  .nav-links.open { display: flex; }
}

/* Sections */
section { padding: 72px 0; }
.section-label { color: var(--brand); text-transform: uppercase; font-size: .8rem; letter-spacing: 1.5px; font-weight: 700; margin: 0 0 8px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 1.8rem; }
p.lead { color: var(--muted); font-size: 1.05rem; max-width: 60ch; }

/* Hero */
.hero { padding: 110px 0 80px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.hero .accent { background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 55ch; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  background: var(--brand); color: #0b0f14; font-weight: 700; text-decoration: none;
  border: 1px solid transparent; transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); opacity: .92; }
.btn.outline { background: transparent; color: var(--text); border-color: var(--bd); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* Cards / grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 32px; }
.card {
  background: var(--panel); border: 1px solid var(--bd); border-radius: var(--radius);
  padding: 22px; transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--brand); transform: translateY(-2px); }
.card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: .92rem; margin: 0; }
.card a.stretched { position: relative; }
.card a.stretched::after { content: ""; position: absolute; inset: 0; }
.cert-card .cert-img { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; margin-bottom: 12px; border: 1px solid var(--bd); }

/* About */
.about-wrap { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; }
.about-wrap img { width: 180px; height: 180px; object-fit: cover; border-radius: 50%; border: 3px solid var(--bd); }
.about-text { flex: 1; min-width: 260px; }

/* Blog list */
.post-list { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-direction: column; gap: 20px; }
.post-list li { border-bottom: 1px solid var(--bd); padding-bottom: 20px; }
.post-list a { text-decoration: none; color: var(--text); font-size: 1.15rem; font-weight: 700; }
.post-list a:hover { color: var(--brand); }
.post-date { color: var(--muted); font-size: .85rem; display: block; margin-top: 4px; }
.post-excerpt { color: var(--muted); margin-top: 6px; }

article.post { padding-top: 60px; }
article.post .post-date { margin-bottom: 24px; }
article.post h1 { font-size: 2.2rem; }
article.post h2 { margin-top: 32px; }
article.post p { color: var(--text); }
article.post pre { background: var(--panel-2); padding: 14px; border-radius: 10px; overflow-x: auto; }

/* Contact */
.contact-methods { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.contact-methods a { color: var(--text); text-decoration: none; font-size: 1.05rem; }
.contact-methods a:hover { color: var(--brand); }

/* Footer */
.site-footer { border-top: 1px solid var(--bd); padding: 32px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-inner p { margin: 0; color: var(--muted); font-size: .9rem; }
.socials { display: flex; gap: 16px; }
.socials a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.socials a:hover { color: var(--brand); }
