:root {
  --bg: #0b1020;
  --text: #e7eaf0;
  --muted: #a9b0bf;
  --brand: #0ea5e9;
  --card: #131a2b;
  --border: #22304b;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --text: #0f172a;
    --muted: #334155;
    --card: #f8fafc;
    --border: #e2e8f0;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}
.container { max-width: 960px; margin: 0 auto; padding: 1rem; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: var(--brand); color: #000; padding: .5rem .75rem; border-radius: .5rem; }

/* Header / Nav */
.site-header { background: linear-gradient(180deg, #0d1b2a, #0b1020); border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
.nav { display: flex; align-items: center; justify-content: space-between; }
.nav ul { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; }
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover, .nav a:focus { text-decoration: underline; }
.brand { font-weight: 800; letter-spacing: .5px; }
.brand span { color: var(--brand); }

/* Hero */
.hero { padding: 2.5rem 1rem 1rem; }
.hero .lead { color: var(--muted); max-width: 60ch; }
.btn { display: inline-block; padding: .6rem 1rem; border-radius: .75rem; background: var(--brand); color: #03101a; text-decoration: none; font-weight: 700; }
.btn:hover { filter: brightness(1.05); }
.btn-outline { background: transparent; color: var(--text); border: 2px solid var(--brand); }

/* Main content */
h1, h2, h3 { line-height: 1.25; }
section { padding: 2rem 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 1rem; padding: 1rem; }
.link { color: var(--brand); text-decoration: none; }
.link:hover, .link:focus { text-decoration: underline; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 1.5rem 0; text-align: center; }

/* scroll behavior */
html { scroll-behavior: smooth; }
.site-header { position: sticky; top: 0; z-index: 10; }
#projects, #about, #contact { scroll-margin-top: 80px; }

/* Focus rings for keyboard users */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Card hover: subtle lift */
.card { transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.25); }

/* Buttons: tiny refinement */
.btn { box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.btn:active { transform: translateY(1px); box-shadow: 0 8px 1px 0 rgba(0,0,0,.25); }

/* Mobile: make hero text fit better */
@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  .hero { padding-top: 1.75rem; }
}
