:root {
  --bg: #0b1120;
  --surface: rgba(15, 23, 42, 0.85);
  --card: #111827;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --radius: 16px;
}

[data-theme="light"] {
  --bg: #ffffff;
  --surface: rgba(248, 250, 252, 0.9);
  --card: #e2e8f0;
  --text: #020617;
  --muted: #475569;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav { display: flex; align-items: center; gap: 16px; }

nav a {
  font-weight: 500;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
  transition: background .2s ease, color .2s ease;
}

nav a:hover { color: var(--text); background: rgba(148,163,184,0.12); }

#themeToggle {
  border: 1px solid rgba(148,163,184,0.25);
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

.container {
  max-width: 1100px;
  margin: auto;
  padding: 64px 18px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 36px;
  align-items: center;
}

.hero img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid rgba(148,163,184,0.18);
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.15;
  margin: 0 0 14px;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.section { margin-top: 56px; }
.section h2 { margin: 0 0 16px; font-size: 1.5rem; }

.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid rgba(148,163,184,0.14);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 55px rgba(0,0,0,.28);
}

.card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.card .pad { padding: 16px; }
.card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #020617;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  margin-right: 10px;
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(148,163,184,0.25);
  color: var(--text);
}

.muted { color: var(--muted); font-size: .95rem; }

footer {
  padding: 40px 18px;
  text-align: center;
  color: var(--muted);
}

/* Blog typography */
.blog-content { max-width: 760px; margin: auto; }
.blog-meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 18px; }
.blog-content h1 { font-size: 2.2rem; line-height: 1.2; margin-bottom: 16px; }
.blog-content h2 { margin-top: 40px; }
.blog-content p { margin-bottom: 18px; }

/* Contact */
.contact-card {
  max-width: 560px;
  margin-top: 28px;
  background: var(--card);
  border: 1px solid rgba(148,163,184,0.14);
  padding: 22px;
  border-radius: var(--radius);
}
.field { display: flex; flex-direction: column; margin-bottom: 16px; }
.field label { color: var(--muted); font-size: 0.9rem; margin-bottom: 6px; }
.field input, .field textarea {
  background: transparent;
  border: 1px solid rgba(148,163,184,0.22);
  border-radius: 12px;
  padding: 12px 12px;
  color: var(--text);
  font-family: inherit;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* Animations (safe) */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.animate { opacity: 1; transform: none; transition: all .6s ease; }
/* ===== Responsive Header + Mobile Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148,163,184,0.15);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand a {
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav a {
  color: var(--muted);
  font-weight: 600;
  padding: 10px 10px;
  border-radius: 12px;
  transition: background .2s ease, color .2s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(148,163,184,0.12);
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(148,163,184,0.25);
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 16px;
  cursor: pointer;
}

.theme-btn {
  border: 1px solid rgba(148,163,184,0.25);
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

/* ===== Mobile ===== */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero img {
    max-height: 360px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid rgba(148,163,184,0.15);
    padding: 14px 16px;
    display: grid;
    gap: 10px;
    transform: translateY(-120%);
    transition: transform .25s ease;
  }

  .site-nav.open {
    transform: translateY(0);
  }

  .site-nav a,
  .theme-btn {
    width: 100%;
    padding: 14px 14px;
    font-size: 16px;
  }
}

/* lock scroll when menu open */
body.nav-open {
  overflow: hidden;
}
