/* ── Tokens ──────────────────────────────────────────── */
:root {
  --navy:   #111844;
  --indigo: #4B5694;
  --slate:  #7288AE;
  --cream:  #EAE0CF;

  --bg:        var(--cream);          /* #EAE0CF — light */
  --surface:   #F3EBDD;               /* raised tint of the cream */
  --ink:       var(--navy);           /* #111844 — dark */
  --ink-soft:  #2B3567;
  --muted:     #4B5694;
  --rule:      rgba(17, 24, 68, 0.16);

  /* Basic ships a single weight (400). Emphasis comes from size,
     tracking, colour and a hairline stroke — never faux-bold. */
  --font: "Basic", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --stroke-thin:  0.3px;
  --stroke-heavy: 0.6px;

  --measure: 46rem;
  --gap: clamp(3.5rem, 7vw, 6rem);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-style: normal;
  font-size: 16.5px;
  line-height: 1.68;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--indigo); text-decoration: none; }
a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

strong {
  font-weight: 400;
  color: var(--navy);
  -webkit-text-stroke: var(--stroke-thin) currentColor;
}

em { font-style: italic; color: var(--ink-soft); }

::selection { background: var(--navy); color: var(--cream); }

/* ── Top bar ─────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1.25rem, 5vw, 3rem);
  background: rgba(234, 224, 207, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.topbar.is-stuck { border-bottom-color: var(--rule); }

.mark {
  font-size: 1.25rem;
  letter-spacing: .06em;
  color: var(--navy);
  -webkit-text-stroke: var(--stroke-thin) currentColor;
}
.mark span { color: var(--slate); -webkit-text-stroke: 0; }
.mark:hover { text-decoration: none; }

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(.85rem, 2.5vw, 1.75rem);
  font-size: .78rem;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.topbar nav a { color: var(--muted); }
.topbar nav a:hover,
.topbar nav a.active {
  color: var(--navy);
  text-decoration: none;
  -webkit-text-stroke: var(--stroke-thin) currentColor;
}

/* ── Layout ──────────────────────────────────────────── */
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.25rem, 5vw, 3rem) 4rem;
}

.section { padding-top: var(--gap); }

.section h2 {
  margin: 0 0 2rem;
  font-size: .92rem;
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--slate);
  -webkit-text-stroke: var(--stroke-thin) currentColor;
}
.section h2::after {
  content: "";
  display: block;
  width: 2rem;
  height: 2px;
  margin-top: .8rem;
  background: var(--slate);
}

/* ── Hero ────────────────────────────────────────────── */
.hero { text-align: center; }

.avatar {
  width: clamp(9rem, 26vw, 11.5rem);
  height: clamp(9rem, 26vw, 11.5rem);
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 25%;
  display: block;
  margin: 0 auto 2rem;
  border: 4px solid var(--surface);
  box-shadow: 0 0 0 1px var(--rule), 0 18px 40px -20px rgba(17, 24, 68, .45);
}

.hero h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(2.4rem, 7.5vw, 3.6rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--navy);
  -webkit-text-stroke: var(--stroke-heavy) currentColor;
}

.tagline {
  max-width: 34rem;
  margin: 0 auto 2rem;
  font-size: 1.04rem;
  color: var(--ink-soft);
}

.contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .5rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .88rem;
  letter-spacing: .015em;
  color: var(--muted);
}
.contact li { position: relative; }
.contact li + li::before {
  content: "";
  position: absolute;
  left: -.6rem;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--slate);
  transform: translateY(-50%);
}

/* ── Entries ─────────────────────────────────────────── */
.lede {
  margin: 0;
  font-size: 1.04rem;
  color: var(--ink-soft);
}

.entry {
  padding: 1.6rem 0;
  border-top: 1px solid var(--rule);
}
.entry:first-of-type { border-top: none; padding-top: 0; }

.entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .35rem 1rem;
}

.entry h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: .015em;
  color: var(--navy);
  -webkit-text-stroke: var(--stroke-thin) currentColor;
}
.entry h3 .dash { color: var(--slate); -webkit-text-stroke: 0; }

.meta {
  font-size: .84rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.links { display: flex; gap: .9rem; font-size: .84rem; }

.org, .stack {
  margin: .3rem 0 0;
  font-size: .86rem;
  color: var(--muted);
}
.org { font-style: italic; }
.stack { letter-spacing: .02em; }

.bullets {
  margin: .9rem 0 0;
  padding: 0;
  list-style: none;
}
.bullets li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: .5rem;
  color: var(--ink-soft);
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .78em;
  width: .42rem;
  height: 1px;
  background: var(--slate);
}
.bullets li:last-child { margin-bottom: 0; }
.bullets.spaced li { margin-bottom: .8rem; }

/* ── Skills ──────────────────────────────────────────── */
.skills { margin: 0; }
.skills > div {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 0 1.5rem;
  padding: .8rem 0;
  border-top: 1px solid var(--rule);
}
.skills > div:first-child { border-top: none; padding-top: 0; }
.skills dt {
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--slate);
  padding-top: .28rem;
  -webkit-text-stroke: var(--stroke-thin) currentColor;
}
.skills dd { margin: 0; color: var(--ink-soft); }

/* ── Rows (education) ────────────────────────────────── */
.rows { margin: 0; padding: 0; list-style: none; }
.rows li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .25rem 1rem;
  padding: .9rem 0;
  border-top: 1px solid var(--rule);
}
.rows li:first-child { border-top: none; padding-top: 0; }
.rows .sub { display: block; font-size: .86rem; color: var(--muted); }

/* ── Tags ────────────────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: .4rem .9rem;
  font-size: .84rem;
  letter-spacing: .015em;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  transition: border-color .2s ease, color .2s ease;
}
.tags li:has(a):hover { border-color: var(--slate); }
.tags a { color: inherit; }
.tags a:hover { color: var(--navy); text-decoration: none; }

/* ── Footer ──────────────────────────────────────────── */
footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem clamp(1.25rem, 5vw, 3rem) 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  border-top: 1px solid var(--rule);
  font-size: .8rem;
  letter-spacing: .03em;
  color: var(--muted);
}

/* ── Reveal ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

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

/* ── Small screens ───────────────────────────────────── */
@media (max-width: 34rem) {
  .topbar nav a:nth-child(n+4) { display: none; }
  .skills > div { grid-template-columns: 1fr; gap: .15rem; }
  .entry-head { flex-direction: column; }
  .hero h1 { letter-spacing: .02em; }
}
