:root {
  color-scheme: light;
  --ink: #121927;
  --muted: #4e596a;
  --blue: #154bda;
  --rule: #dce2ed;
  --wash: #edf2ff;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ol, dl, dd { margin: 0; }
a { color: var(--blue); text-underline-offset: .24em; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.skip-link {
  position: fixed;
  z-index: 2;
  top: .65rem;
  left: 1rem;
  padding: .8rem;
  transform: translateY(-160%);
  background: white;
}
.skip-link:focus { transform: none; }

.profile {
  display: grid;
  grid-template-columns: minmax(14rem, 27%) minmax(0, 1fr);
  max-width: 97rem;
  min-height: 100svh;
  margin-inline: auto;
}
.identity {
  position: sticky;
  top: 0;
  align-self: start;
  padding: clamp(2.25rem, 5.3vw, 5.5rem) clamp(1.6rem, 3vw, 3.5rem);
}
h1 {
  font-size: clamp(2rem, 2.98vw, 3.1rem);
  font-weight: 680;
  line-height: 1.04;
  letter-spacing: -.052em;
}
h1 span { display: block; }
h1::after, .section-header h2::after, .info h2::after {
  content: "";
  display: block;
  width: 2.6rem;
  height: 3px;
  margin-top: 1rem;
  border-radius: 2px;
  background: var(--blue);
}
.profession { margin-top: 1.05rem; font-size: clamp(1.06rem, 1.5vw, 1.45rem); line-height: 1.35; }
.intro {
  max-width: 34ch;
  margin-top: 1.3rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
}
.menu { display: grid; gap: .25rem; margin-top: clamp(1.75rem, 3.3vw, 3.5rem); }
.menu a {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-height: 2.85rem;
  padding: .6rem .85rem;
  border-radius: .45rem;
  color: inherit;
  text-decoration: none;
}
.menu a[aria-current="page"] { color: var(--blue); background: var(--wash); font-weight: 600; }
.menu svg { width: 1.2rem; height: 1.2rem; flex-shrink: 0; }

.reader {
  min-width: 0;
  border-left: 1px solid var(--rule);
  padding: clamp(2.25rem, 4.8vw, 5rem) clamp(1.5rem, 3.25vw, 4rem);
}
.view:focus { outline: none; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
h2 { font-size: clamp(2rem, 2.6vw, 2.7rem); line-height: 1.12; letter-spacing: -.045em; }
.cv-link, .return { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .92rem; }
.stops {
  --date-width: clamp(6.2rem, 8.45vw, 9rem);
  --rail-gap: clamp(1.5rem, 2.2vw, 2.6rem);
  --item-gap: 1rem;
  display: grid;
  gap: var(--item-gap);
  padding: 0;
  margin-top: clamp(1.6rem, 2.3vw, 2.45rem);
  list-style: none;
}
.stops li {
  position: relative;
  display: grid;
  grid-template-columns: var(--date-width) minmax(0, 1fr);
  gap: var(--rail-gap);
  --dot-x: calc(var(--date-width) + var(--rail-gap) / 2 - 2px);
  --dot-y: 2rem;
}
.stops li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: var(--dot-x);
  top: var(--dot-y);
  bottom: calc(0px - var(--item-gap) - var(--dot-y));
  border-left: 2px solid #6790eb;
}
.stops li::after {
  content: "";
  position: absolute;
  left: calc(var(--dot-x) + 1px);
  top: var(--dot-y);
  width: .86rem;
  height: .86rem;
  transform: translate(-50%, -50%);
  border: 3px solid var(--blue);
  border-radius: 50%;
  background: white;
  pointer-events: none;
}
.period { padding-top: 1.4rem; }
.period strong, .period span { display: block; }
.period strong { font-size: clamp(.9rem, 1.13vw, 1.1rem); line-height: 1.25; }
.period span, .card-role { font-size: .875rem; color: var(--muted); line-height: 1.4; }
.period span { margin-top: .35rem; }
.project-card, .role-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(7rem, 28%);
  align-items: stretch;
  gap: 1rem;
  min-height: 8.65rem;
  padding: .6rem;
  border: 1px solid var(--rule);
  border-radius: .8rem;
  background: #fafbfd;
  color: inherit;
  text-decoration: none;
}
.card-copy { align-self: center; padding: .5rem .3rem .5rem .75rem; }
.card-copy h3 { font-size: clamp(1.14rem, 1.47vw, 1.55rem); line-height: 1.19; letter-spacing: -.034em; margin-block: .35rem; }
.summary, .role > p:not(.project-tech), .info p, .info dd { font-size: 1rem; line-height: 1.52; color: var(--muted); }
.project-card img { width: 100%; height: auto; align-self: start; object-fit: cover; border-radius: .5rem; }
.menu a:hover { color: var(--blue); }
.grouped-card { display: block; padding: 0; }
.role-entry { border: 0; border-top: 1px solid var(--rule); border-radius: 0; background: transparent; }
.role-entry:first-child { border-top: 0; border-radius: .8rem .8rem 0 0; }
.role-entry:last-child { border-radius: 0 0 .8rem .8rem; }

.icon-library { position: absolute; overflow: hidden; }
.project-tech { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .75rem; margin-top: .6rem; color: var(--muted); font-size: .875rem; line-height: 1.55; }
.technology { display: inline-flex; align-items: center; gap: .32rem; }
.technology svg { width: 1.08rem; height: 1.08rem; flex: none; color: #3158a7; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.project-tech strong { color: var(--ink); }
.card-copy .project-tech + h3 { margin-top: 1.15rem; }
.stops a:hover h3, .stops a:focus-visible h3 { color: var(--blue); }
.stops a:hover, .stops a:focus-visible { background: #f5f8ff; }
.role, .info { max-width: 43rem; }
.role header { margin: 1.5rem 0; padding-bottom: 1.2rem; border-bottom: 1px solid var(--rule); }
.role header h2 { margin: .4rem 0; }
.role h3 { margin: 1.4rem 0 .4rem; }
.role h4 { margin: 1rem 0 .35rem; font-size: 1rem; }
@supports selector(:has(:target)) {
  .view { display: none; }
  #timeline, .view:target { display: block; }
  .reader:has(.view:target:not(#timeline)) #timeline { display: none; }
}
.info h2 { margin-bottom: 1.5rem; }
.info h3 { margin-block: 1.5rem .35rem; font-size: 1.15rem; }
.info p, .info dl { max-width: 65ch; }
.info p + p { margin-top: .75rem; }
.info dl {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) 2.5fr;
  gap: .9rem 1rem;
}
.info p + dl { margin-top: 1rem; }
.info dt { font-weight: 600; line-height: 1.52; }
.info dd { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: no-preference) {
  .view:target { animation: enter .18s ease-out; }
  @keyframes enter { from { opacity: .7; transform: translateY(3px); } }
}
@media (max-width: 65rem) {
  .project-card, .role-entry { grid-template-columns: minmax(0, 1fr) 6.25rem; gap: .45rem; }
  .card-copy { padding-left: .35rem; }
}
@media (max-width: 48rem) {
  .profile { display: block; }
  .identity { position: static; padding: 1.6rem 1.25rem .75rem; }
  h1 { font-size: clamp(1.8rem, 5.2vw, 2.65rem); }
  h1 span { display: inline; }
  h1::after, .intro { display: none; }
  .profession { margin-top: .4rem; font-size: 1.03rem; }
  .menu { display: flex; flex-wrap: wrap; gap: .15rem; margin-top: 1rem; }
  .menu a { padding: .5rem .55rem; min-height: 2.75rem; font-size: .9rem; }
  .menu svg { display: none; }
  .reader { padding: 1.4rem 1.25rem 2rem; border-left: 0; border-top: 1px solid var(--rule); }
  .view { scroll-margin-top: 1rem; }
  .stops { --item-gap: 1.4rem; }
  .stops li { display: block; padding-left: 1.55rem; --dot-x: .33rem; --dot-y: .6rem; }
  .period { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .65rem; margin-bottom: .55rem; padding: 0; }
  .period span { margin: 0; }
  .project-card { min-height: 0; }
}
@media (max-width: 33rem) {
  .project-card:not(.grouped-card), .role-entry { display: block; padding: .9rem; }
  .card-copy { padding: 0; }
  .project-card img { display: none; }
  .info dl { display: block; }
  .info dt:not(:first-child) { margin-top: .85rem; }
}
