:root {
  --bg: #f6f8fc;
  --bg-alt: #eaeff8;
  --card: #ffffff;
  --text: #1b2433;
  --muted: #55607a;
  --line: #d9e0ee;
  --navy: #14284b;
  --blue: #2457c5;
  --blue-soft: #e4ecfb;
  --on-hero: #f3f6fd;
  --shadow: 0 1px 2px rgba(20, 40, 75, .06), 0 6px 20px rgba(20, 40, 75, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1320;
    --bg-alt: #111a2b;
    --card: #162033;
    --text: #e7ecf6;
    --muted: #a3b0c8;
    --line: #26334d;
    --navy: #0a1428;
    --blue: #7aa2f7;
    --blue-soft: #1d2b48;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0 0 1em; }

.wrap { width: min(1080px, 100% - 2rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2rem); }

.skip {
  position: absolute; left: -999px; top: 0; background: var(--blue); color: #fff;
  padding: .5rem 1rem; z-index: 100;
}
.skip:focus { left: 0; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--navy) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 3.5rem; }
.brand { color: var(--on-hero); font-weight: 700; letter-spacing: .02em; text-decoration: none; white-space: nowrap; }
.topbar nav { display: flex; gap: 1.1rem; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.topbar nav::-webkit-scrollbar { display: none; }
.topbar nav a { color: #c9d4ee; text-decoration: none; font-size: .95rem; padding: .25rem 0; white-space: nowrap; }
.topbar nav a:hover { color: #fff; }

/* Hero */
.hero {
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(122,162,247,.28), transparent 60%),
    linear-gradient(160deg, #14284b 0%, #1d3f86 100%);
  color: var(--on-hero);
  padding: clamp(2.5rem, 7vw, 5.5rem) 0;
}
.hero-inner { display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem); flex-wrap: wrap; }
.avatar {
  position: relative; flex: none;
  width: 220px; height: 220px; border-radius: 50%;
  overflow: hidden; border: 4px solid rgba(255,255,255,.85);
  background: #2c4a8f; box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-initials {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 4rem; font-weight: 700; color: rgba(255,255,255,.9); letter-spacing: .04em;
}
.hero-text { flex: 1 1 320px; max-width: 680px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: #aebfe6; margin-bottom: .75rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.01em; margin-bottom: 1rem; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: #e3eafa; margin-bottom: 1rem; }
.meta { font-size: .95rem; color: #aebfe6; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; margin-bottom: 0; }
.btn {
  display: inline-block; padding: .6rem 1.2rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.55); color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem;
}
.btn:hover { background: rgba(255,255,255,.12); }
.btn.primary { background: #fff; color: #14284b; border-color: #fff; }
.btn.primary:hover { background: #e6eeff; }

/* Sections */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section.alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: .75rem; }
.section h2::after {
  content: ""; display: block; width: 48px; height: 4px; border-radius: 2px;
  background: var(--blue); margin-top: .6rem;
}
.section-note { color: var(--muted); max-width: 70ch; margin: 1rem 0 1.75rem; }

/* Cards */
.grid { display: grid; gap: 1.25rem; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.4rem 1.4rem 1.2rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.card p { font-size: .98rem; color: var(--text); }
.card .kicker { color: var(--blue); font-weight: 600; font-size: .9rem; margin-bottom: .6rem; }
.tags { list-style: none; padding: 0; margin: auto 0 0; display: flex; flex-wrap: wrap; gap: .4rem; padding-top: .5rem; }
.tags li {
  background: var(--blue-soft); color: var(--blue);
  font-size: .78rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px;
}
.skills .card p { margin-bottom: 0; color: var(--muted); }

/* Timeline */
.timeline { list-style: none; margin: 1.5rem 0 1rem; padding: 0 0 0 1.5rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding-bottom: 1.6rem; }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1.5rem - 7px); top: .45rem;
  width: 12px; height: 12px; border-radius: 50%; background: var(--blue); border: 2px solid var(--bg-alt);
}
.timeline .when { font-size: .85rem; font-weight: 700; color: var(--blue); margin-bottom: .15rem; letter-spacing: .02em; }
.timeline h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.timeline p:last-child { color: var(--muted); font-size: .98rem; margin-bottom: 0; }

/* Footer */
.footer { background: var(--navy); color: #aebfe6; padding: 1.75rem 0; font-size: .92rem; }
.footer a { color: #d6e1fb; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }
.footer p { margin: 0; }

/* Responsive */
@media (max-width: 900px) {
  .grid.three { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .hero-inner { justify-content: center; text-align: center; }
  .actions { justify-content: center; }
  .avatar { width: 170px; height: 170px; }
  .avatar-initials { font-size: 3rem; }
  .topbar-inner { gap: .75rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Print: a tidy one-column copy */
@media print {
  .topbar, .actions, .skip { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .hero { background: none; color: #000; padding: 0 0 1rem; }
  .eyebrow, .meta, .lead { color: #333; }
  .section, .section.alt { background: none; padding: 1rem 0; }
  .card { box-shadow: none; break-inside: avoid; }
  .grid.two, .grid.three { grid-template-columns: 1fr 1fr; }
  .footer { background: none; color: #333; }
}
