:root {
  color-scheme: dark;
  --surface: #0d172b;
  --surface-raised: #142137;
  --surface-chip: #18363d;
  --ink: #e8eefb;
  --muted: #a6b5cc;
  --accent: #75ead4;
  --rule: #33445f;
  --body: "Aptos", "Segoe UI", sans-serif;
  --display: "Bahnschrift", "Aptos Display", "Segoe UI", sans-serif;
  --mono: "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--muted);
  background: radial-gradient(ellipse at top left, #13283c, transparent 48rem), var(--surface);
  font: 1rem / 1.7 var(--body);
}

a { color: var(--accent); text-underline-offset: .28em; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
h1, h2, h3, p { margin: 0; }
[id] { scroll-margin-top: 2rem; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 2;
  top: 1rem;
  left: 1rem;
  padding: .5rem 1rem;
  background: var(--surface);
}

.cursor-spotlight { display: none; }
@media screen and (any-pointer: fine) and (prefers-reduced-motion: no-preference) {
  .cursor-spotlight {
    display: block;
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease;
  }
  .cursor-spotlight::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: min(64rem, 160vw);
    aspect-ratio: 1;
    background: radial-gradient(circle closest-side, rgb(63 133 224 / .18), transparent);
    transform: translate3d(var(--cursor-x, 0px), var(--cursor-y, 0px), 0) translate(-50%, -50%);
  }
  .cursor-spotlight.is-visible { opacity: 1; }
}

.shell {
  position: relative;
  width: min(100% - 5rem, 72rem);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(15rem, .82fr) minmax(0, 1.18fr);
  gap: clamp(3.5rem, 8vw, 8rem);
  padding-block: clamp(4rem, 9vh, 7rem) 2.5rem;
}
.profile {
  position: sticky;
  top: clamp(2rem, 9vh, 7rem);
  align-self: start;
}
.profile-photo {
  display: block;
  border: 1px solid var(--rule);
  border-radius: 1rem;
  background: #fcfcfc;
  object-fit: contain;
}
.location, .dates, .work-company {
  font: .875rem / 1.5 var(--mono);
  letter-spacing: .035em;
}
.location {
  margin-top: .75rem;
  color: var(--accent);
}
h1 {
  margin-block: 1.35rem;
  color: var(--ink);
  font: 700 clamp(3rem, 8vw, 5rem) / .98 var(--display);
  letter-spacing: -.075em;
}
.identity h1 {
  margin-block: 1.1rem .85rem;
  font-size: clamp(2rem, 3.7vw, 2.625rem);
  line-height: 1.1;
  letter-spacing: -.04em;
}
.name-alias {
  display: block;
  margin-top: .65rem;
  color: var(--accent);
  font-size: .43em;
  line-height: 1.12;
  letter-spacing: -.04em;
}
.identity .name-alias {
  display: inline-block;
  margin-block-start: 0;
  margin-inline-start: .15em;
  font-size: .62em;
  letter-spacing: 0;
}
.role {
  color: var(--ink);
  font-size: clamp(1.125rem, 1.9vw, 1.375rem);
  font-weight: 650;
  line-height: 1.35;
}
.pitch { margin-top: .625rem; max-width: 25ch; font-size: 1.0625rem; }
nav {
  display: grid;
  justify-items: start;
  gap: .375rem;
  margin-block: 2.3rem;
}
nav a {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .3rem 0;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
nav a::before {
  width: .9rem;
  height: 2px;
  background: var(--rule);
  content: "";
  transition: width .2s, background-color .2s;
}
nav a:hover, nav a[aria-current] { color: var(--accent); }
nav a[aria-current]::before { width: 1.65rem; background: var(--accent); }
.profile-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem .65rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  max-width: 20.5rem;
}
.profile-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: .3rem;
  text-decoration: none;
}
.social-link { width: 44px; }
.social-link:hover { background: var(--surface-chip); }
.cv-link {
  border: 1px solid var(--accent);
  padding-inline: .75rem;
  font-weight: 600;
}
.cv-link:hover { background: var(--accent); color: var(--surface); }

main { min-width: 0; }
main section + section { margin-top: clamp(3rem, 7vw, 5.4rem); }
h2 {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
  color: var(--accent);
  font: 600 .875rem / 1.4 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
h2::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
h3 { color: var(--ink); font-size: 1.13rem; line-height: 1.35; margin-bottom: .4rem; }
h3 span { color: var(--accent); }
#about p + p { margin-top: .75rem; }
.intro { color: var(--ink); font-size: 1.45rem; font-weight: 550; line-height: 1.4; max-width: 38ch; }
.timeline { border-bottom: 1px solid var(--rule); }
.entry {
  display: grid;
  grid-template-columns: 6.6rem minmax(0, 1fr);
  gap: .8rem;
  padding-block: 1.2rem;
}
.entry:first-child { padding-top: 0; }
.entry + .entry { border-top: 1px solid var(--rule); }
.dates { padding-top: .18rem; }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  list-style: none;
  padding: 0;
  margin: .75rem 0 0;
}
.tags li {
  border-radius: .25rem;
  padding: .18rem .5rem;
  color: var(--accent);
  background: var(--surface-chip);
  font: .82rem / 1.5 var(--mono);
}
.work-item {
  border-left: 2px solid var(--accent);
  background: var(--surface-raised);
  padding: 1.25rem 1.4rem;
}
.work-item + .work-item { margin-top: 1rem; }
.work-company { color: var(--accent); margin-bottom: .4rem; }
.outcome {
  margin-block: .4rem;
  color: var(--accent);
  font: 650 clamp(1.5rem, 4vw, 2.5rem) / 1.2 var(--display);
  letter-spacing: -.04em;
}
.outcome span:not(.sr-only) { font-weight: 400; vertical-align: .06em; }
footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .45rem 1.3rem;
  margin-top: 4rem;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  font-size: .95rem;
}

.cv { width: min(100% - 3rem, 49rem); margin: 3.5rem auto; }
.cv header { margin-bottom: 2.5rem; }
.cv header p + p { margin-top: .5rem; }
.cv section + section { margin-top: 2rem; }
.cv .entry ul { margin: .5rem 0 0; padding-inline-start: 1.2rem; }
.cv-controls { display: flex; gap: 1.2rem; align-items: baseline; }
.cv-controls button {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--rule);
  border-radius: .3rem;
  padding: .25rem .75rem;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 56rem), (max-height: 44rem) {
  .profile { position: static; }
}
@media (max-width: 48rem) {
  .shell { display: block; width: min(100% - 3rem, 37rem); padding-block: 3rem 2rem; }
  .pitch { max-width: 35ch; }
  nav { display: flex; flex-wrap: wrap; gap: .25rem 1.2rem; margin-block: 1.5rem 1rem; }
  nav a::before { display: none; }
  .profile-links { max-width: none; }
  .shell main { margin-top: 3rem; }
}
@media (max-width: 30rem) {
  .entry { grid-template-columns: 1fr; gap: .25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  nav a::before { transition: none; }
}
@media print {
  :root { color-scheme: light; --ink: #111; --muted: #333; --accent: #165473; --rule: #aaa; }
  body { background: #fff; font-size: 10pt; }
  .cv { width: auto; margin: 0; }
  .cv h1 { font-size: 30pt; }
  .cv-controls { display: none; }
  .entry { break-inside: avoid; }
}
