:root {
  --primary:  #1e3a5f;
  --accent:   #2563eb;
  --bg:       #ffffff;
  --surface:  #f8fafc;
  --text:     #1e293b;
  --muted:    #64748b;
  --border:   #e2e8f0;
  --radius:   8px;
  --max-w:    860px;
  --font:     -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  font-family: var(--font);
  color: var(--text);
  background: #f9f8f6;
  line-height: 1.75;
  font-size: 1rem;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

a[target="_blank"]::after {
  content: ' ↗';
  font-size: 0.7em;
  opacity: 0.6;
  vertical-align: super;
}

/* ── Navigation ── */

header {
  background: var(--primary);
  border-top: 4px solid #93c5fd;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 58px;
}

.nav-brand {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
  color: #fff;
  text-decoration: none;
  background: rgba(255,255,255,0.1);
}

.nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.15);
}

/* ── Main content ── */

main {
  max-width: var(--max-w);
  margin: 2rem auto;
  padding: 3rem 2.5rem 5rem;
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.tagline {
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  margin-bottom: 2rem;
}

h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
}

h2::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 3px;
  background: var(--accent);
  margin-top: 0.5rem;
  border-radius: 2px;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

li { margin-bottom: 0.4rem; }

/* ── Profile block (index only) ── */

.profile {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.profile img {
  width: 190px;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  flex-shrink: 0;
  display: block;
}

.profile-info {
  padding-top: 0.25rem;
}

.profile-info ul {
  list-style: none;
  padding: 0;
}

.profile-info li {
  margin-bottom: 0.65rem;
  color: var(--text);
}

/* ── Footer ── */

footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.825rem;
}

/* ── Responsive ── */

@media (max-width: 620px) {
  nav {
    flex-direction: column;
    height: auto;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .nav-links { gap: 0; flex-wrap: wrap; }

  .profile { flex-direction: column; }
  .profile img { width: 160px; }

  h1 { font-size: 1.6rem; }
}
