:root {
  --white: #ffffff;
  --ice: #eef4ff;
  --line: #d3e0f7;
  --blue: #1d4ed8;
  --blue-dark: #1e3a8a;
  --navy: #0b1f4d;
  --muted: #475a7a;
  --max: 920px;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
}
a { color: var(--blue); }
a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--blue); color: var(--white); padding: 0.5rem 1rem; z-index: 20;
}
.skip:focus { left: 0.5rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.85rem max(1.25rem, calc((100% - var(--max)) / 2));
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--navy); text-decoration: none; }
.site-header nav { display: flex; align-items: center; gap: 1.25rem; font-size: 0.95rem; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--blue); }
.site-header nav .nav-cta { color: var(--white); background: var(--blue); padding: 0.4rem 0.9rem; border-radius: 6px; }
.site-header nav .nav-cta:hover { color: var(--white); background: var(--blue-dark); }

/* Layout */
main > section { padding: 4.5rem max(1.25rem, calc((100% - var(--max)) / 2)); }
main > section:nth-of-type(even) { background: var(--ice); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; }
h2 { font-size: 1.9rem; margin-bottom: 1.25rem; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1rem; max-width: 65ch; }

/* Hero */
.hero { padding-top: 6rem; padding-bottom: 5rem; border-bottom: 6px solid var(--blue); background: var(--white); }
.hero h1 { font-size: clamp(3.2rem, 10vw, 6.5rem); font-weight: 700; letter-spacing: -0.03em; color: var(--blue); }
.role { font-family: var(--display); font-weight: 500; font-size: 1.4rem; margin: 1rem 0 1.25rem; }
.lead { font-size: 1.2rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.btn {
  display: inline-block; padding: 0.65rem 1.25rem; border-radius: 6px;
  border: 2px solid var(--blue); color: var(--blue); text-decoration: none; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--ice); }
.btn.primary { background: var(--blue); color: var(--white); }
.btn.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }

/* Projects */
.project { padding: 1.75rem 0; border-top: 1px solid var(--line); }
.project:first-of-type { border-top: 0; padding-top: 0; }
.project-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 0.75rem; }
.tags { margin: 0; color: var(--muted); font-size: 0.95rem; }
.text-link { font-weight: 500; }

/* Passenger journey diagram */
.flow {
  list-style: none; margin: 1.5rem 0 0; padding: 1.5rem;
  background: var(--blue); border-radius: 10px;
  display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; counter-reset: step;
}
.flow li {
  counter-increment: step; position: relative;
  background: var(--white); color: var(--navy);
  padding: 0.5rem 0.9rem; border-radius: 999px; font-weight: 500; font-size: 0.95rem;
}
.flow li::before { content: counter(step) ". "; color: var(--blue); }
.flow li:not(:last-child)::after {
  content: ""; position: absolute; left: 100%; top: 50%; width: 2rem; height: 2px; background: var(--white);
}
.flow li.optional { background: transparent; color: var(--white); border: 2px dashed var(--white); }
.flow li.optional::before { color: var(--white); }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin: 0; }
.skills dt { font-weight: 500; color: var(--muted); font-size: 0.95rem; }
.skills dd { margin: 0.2rem 0 0; font-family: var(--display); font-weight: 500; font-size: 1.2rem; }

/* Education */
.edu { list-style: none; margin: 0; padding: 0; }
.edu li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.edu li:first-child { border-top: 0; padding-top: 0; }
.years { color: var(--blue); font-weight: 500; }

/* Contact */
main > .contact { background: var(--blue); color: var(--white); }
.contact h2 { color: var(--white); }
.contact .btn.light { background: var(--white); color: var(--blue); border-color: var(--white); font-size: 1.05rem; }
.contact .btn.light:hover { background: var(--ice); }
.contact a:focus-visible { outline-color: var(--white); }
.links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1.5rem; }
.links a { color: var(--white); }

footer { padding: 1.5rem max(1.25rem, calc((100% - var(--max)) / 2)); color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--line); }
footer p { margin: 0; }

/* Small screens */
@media (max-width: 680px) {
  .site-header nav a:not(.nav-cta) { display: none; }
  main > section { padding-top: 3rem; padding-bottom: 3rem; }
  .edu li { grid-template-columns: 1fr; gap: 0.25rem; }
  .flow { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .flow li:not(:last-child)::after { left: 1.5rem; top: 100%; width: 2px; height: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
