:root {
  --bg: #ffffff;
  --text: #1a1a1f;
  --muted: #5f5f6b;
  --faint: #8a8a96;
  --rule: #e6e6ec;
  --accent: #5d00ff;
  --accent-soft: #f3edff;
  --max: 880px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 64px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 20px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
}
.nav .name { font-weight: 600; font-size: 21px; color: var(--text); }
.nav .name:hover { text-decoration: none; }
.nav ul {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 18px;
}
.nav ul a { color: var(--muted); }
.nav ul a:hover { color: var(--accent); text-decoration: none; }

@media (max-width: 640px) {
  .nav ul { display: none; }
}

/* ---------- Header ---------- */
.intro {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  align-items: start;
  padding: 56px 0 40px;
}
.intro img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 50%;
}
h1 {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 4px 0 6px;
}
.role { color: var(--muted); margin: 0 0 14px; }
.intro p { margin: 0 0 12px; }

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 18px;
  font-size: 18px;
}
.links a { display: inline-flex; align-items: center; gap: 7px; }
.links a:hover { text-decoration: none; }
.links a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.links.emails { margin-top: 12px; }
.links .cv {
  background: var(--accent);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 500;
}
.links .cv:hover { opacity: .9; }
.links .cv:hover span { text-decoration: none; }

@media (max-width: 640px) {
  .intro { grid-template-columns: 1fr; gap: 20px; padding-top: 36px; }
  .intro img { width: 120px; height: 120px; }
}

/* ---------- Sections ---------- */
section { padding: 8px 0 28px; }
h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.item { margin-bottom: 22px; }
.item:last-child { margin-bottom: 0; }
.item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.item h3 { font-size: 20px; font-weight: 600; margin: 0; }
.item .date {
  color: var(--faint);
  font-size: 18px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.item .sub { color: var(--muted); font-size: 18.5px; font-style: italic; }
.item ul { margin: 6px 0 0; padding-left: 18px; }
.item li { margin-bottom: 3px; }
.item p { margin: 6px 0 0; }

@media (max-width: 640px) {
  .item-head { flex-direction: column; gap: 0; }
}

.featured {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 18px 20px;
}
.tag {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: #fff;
  border: 1px solid #ddd0ff;
  border-radius: 999px;
  padding: 1px 9px;
  margin-right: 6px;
  font-style: normal;
  vertical-align: 1px;
}

.list { list-style: none; margin: 0; padding: 0; }
.list li { margin-bottom: 10px; }
.list .status { color: var(--faint); }

.skills { display: grid; grid-template-columns: 170px 1fr; gap: 6px 16px; margin: 0; }
.skills dt { font-weight: 600; font-size: 19px; }
.skills dd { margin: 0; color: var(--muted); font-size: 19px; }
@media (max-width: 640px) {
  .skills { grid-template-columns: 1fr; }
  .skills dd { margin-bottom: 8px; }
}

footer {
  border-top: 1px solid var(--rule);
  padding: 24px 0 40px;
  color: var(--faint);
  font-size: 17px;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
