:root {
  --paper: #F7F5F0;
  --ink: #1C1D21;
  --soft: #5A5C62;
  --muted: #6A6C72;
  --blue: #1F3FB3;
  --marker: #F6DC7A;
  --line: #DDD8CC;
  --photo: #E4E0D6;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 20px/1.55 'Source Serif 4', Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-underline-offset: 4px; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 2px; }

.wrap { max-width: 688px; margin: 0 auto; padding: 0 24px; }

.top { display: flex; justify-content: space-between; align-items: center; padding-top: 40px; font-size: 16px; }
.top .name { font-weight: 600; }
.top .lang { color: var(--muted); }
.top .lang a { color: var(--muted); }

main { display: flex; flex-direction: column; gap: 56px; padding: 96px 0 72px; }

section { display: flex; flex-direction: column; gap: 16px; }
.hero { gap: 24px; }

.photo {
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--photo); object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--muted);
}

h1 { margin: 0; font-size: 56px; line-height: 1.05; font-weight: 600; letter-spacing: -1px; }
.role { margin: 10px 0 0; font-size: 18px; font-style: italic; color: var(--soft); }
.lead { margin: 0; font-size: 22px; line-height: 1.6; }
.lead.typed { min-height: 3.2em; }

h2 { margin: 0; font-size: 24px; font-weight: 600; }

ul { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 10px; line-height: 1.5; }
strong { font-weight: 600; }
p { margin: 0; }

.term { font-weight: 600; white-space: nowrap; }


.terms { display: flex; flex-direction: column; gap: 10px; }
.years { font-size: 52px; line-height: 1; font-weight: 600; letter-spacing: -1.5px; color: var(--blue); margin-top: 4px; }

.word { color: var(--blue); font-style: italic; }
.caret {
  display: inline-block; width: 2px; height: 1em; margin-left: 3px;
  vertical-align: -0.12em; background: var(--blue);
  animation: blink 1s steps(1) infinite;
}

.hl {
  background: linear-gradient(var(--marker), var(--marker)) no-repeat 0 88% / 100% 40%;
  padding: 0 2px;
}

.mail {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 30px; font-weight: 600; text-decoration: none;
  border-bottom: 2px solid currentColor; padding-bottom: 4px;
}
.mail .arr { display: inline-block; transition: transform .25s ease; }
.mail:hover .arr { transform: translateX(10px); }

footer {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 24px 0 48px; border-top: 1px solid var(--line);
  font-size: 16px; color: var(--muted);
}
footer nav { display: flex; gap: 20px; }
footer a { color: var(--muted); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Motion: only when JS is running and the visitor has not asked for less motion */
@media (prefers-reduced-motion: no-preference) {
  /* Hero: pure CSS on load, so it always completes */
  .js .hero .reveal { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .js .hero .photo { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both, ring 2.4s ease-out .6s 2; }
  .js .hl { background-size: 0% 40%; animation: marker 1s cubic-bezier(.6, 0, .2, 1) 1.6s forwards; }
  /* Lower sections: revealed by main.js when they scroll into view */
  .js main > .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
  .js main > .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .caret { display: none; }
}

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes marker { to { background-size: 100% 40%; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes ring {
  0% { box-shadow: 0 0 0 0 rgba(31, 63, 179, .35); }
  100% { box-shadow: 0 0 0 20px rgba(31, 63, 179, 0); }
}

@media (max-width: 560px) {
  body { font-size: 18px; }
  .top { padding-top: 20px; font-size: 15px; }
  .top .lang a { display: inline-flex; align-items: center; min-height: 44px; }
  main { gap: 44px; padding: 48px 0 56px; }
  .photo { width: 96px; height: 96px; }
  h1 { font-size: 42px; letter-spacing: -.8px; }
  .role { font-size: 16px; }
  .lead { font-size: 19px; }
  .lead.typed { min-height: 4.8em; }
  h2 { font-size: 22px; }
  ul { padding-left: 22px; }
  .mail { font-size: 23px; gap: 10px; }
  .years { font-size: 42px; }
  footer { flex-direction: column-reverse; gap: 10px; padding-bottom: 36px; }
}
