/* ---------- tokens ---------- */
:root {
  --bg: #f5f4f1;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --text: #0d0d0f;
  --muted: #6d6d75;
  --line: rgba(0, 0, 0, 0.09);
  --line-strong: rgba(0, 0, 0, 0.16);
  --accent: #ff5a3c;
  --accent-ink: #ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px -12px rgba(0,0,0,.14);
  --hero-veil: rgba(245, 244, 241, 0.78);
  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1080px;
  --gutter: 16px;
}

:root[data-theme="dark"] {
  --bg: #0b0b0c;
  --surface: #141416;
  --surface-2: #1a1a1d;
  --text: #f3f2f0;
  --muted: #9b9ba3;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.22);
  --accent: #ff6a4a;
  --accent-ink: #12100f;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 18px 40px -18px rgba(0,0,0,.8);
  --hero-veil: rgba(11, 11, 12, 0.78);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .25s ease, color .25s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px 0;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background-color .25s ease;
}
.topbar.is-stuck { border-bottom-color: var(--line); }

.topbar__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 17px;
}
.brand__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
}

.nav {
  display: flex;
  gap: 4px;
  margin: 0 auto;
}
.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color .18s ease, background-color .18s ease;
  white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--surface); }

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.lang {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.lang__btn {
  position: relative;
  z-index: 1;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  transition: color .2s ease;
}
.lang__btn.is-active { color: var(--accent-ink); }
.lang__pill {
  position: absolute;
  top: 3px;
  left: 3px;
  height: calc(100% - 6px);
  width: 46px;
  border-radius: 999px;
  background: var(--text);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.lang[data-active="en"] .lang__pill { transform: translateX(46px); }
:root[data-theme="dark"] .lang__btn.is-active { color: #0b0b0c; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}
.icon-btn svg {
  width: 17px; height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: clamp(48px, 9vw, 104px) 0 0;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: -10% -5% 0;
  background: url("assets/cover.png") center top / cover no-repeat;
  opacity: .5;
  filter: saturate(0);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.5) 55%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.5) 55%, transparent 92%);
}
:root[data-theme="dark"] .hero__bg { opacity: .22; filter: saturate(0) invert(1); }

.hero__inner {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(40px, 7vw, 76px);
  text-align: center;
}

.hero__photo {
  width: clamp(110px, 16vw, 152px);
  aspect-ratio: 1;
  margin: 0 auto 26px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--surface);
  box-shadow: var(--shadow);
  background: var(--surface-2);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }

.hero__name {
  margin: 0;
  font-size: clamp(31px, 8.2vw, 88px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.hero__role {
  margin: 14px 0 0;
  font-size: clamp(16px, 2.2vw, 20px);
  font-weight: 500;
  color: var(--muted);
}
.hero__location {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
  opacity: .85;
}
.hero__cta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, opacity .18s ease, background-color .18s ease;
}
.btn--primary { background: var(--text); color: var(--bg); }
.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--text); }
.btn--ghost[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn:hover { transform: translateY(-2px); }

/* marquee */
.marquee {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: marquee 32s linear infinite;
}
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--muted);
}
.marquee__item::after {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section--tight { padding: clamp(36px, 6vw, 56px) 0 0; }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 28px;
}
.section__title {
  margin: 0 0 28px;
  font-size: clamp(26px, 4.4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.section__head .section__title { margin-bottom: 0; }
.section__hint { margin: 0; font-size: 14px; color: var(--muted); }

/* stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.stat {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow);
}
.stat__value {
  font-size: clamp(28px, 4.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat__label { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* about */
.about__text {
  margin: 0;
  font-size: clamp(18px, 2.6vw, 26px);
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: -0.015em;
  max-width: 34ch;
}
.about__text { max-width: 44ch; }

/* ---------- jobs ---------- */
.jobs { display: flex; flex-direction: column; gap: 12px; }

.job {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.job:hover { border-color: var(--line-strong); }
.job.is-open { box-shadow: var(--shadow); }

.job__head {
  width: 100%;
  display: grid;
  grid-template-columns: 190px 1fr 36px;
  align-items: center;
  gap: 20px;
  padding: 24px 24px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.job__period {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.job__badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.job__title {
  margin: 0;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 700;
  letter-spacing: -0.025em;
}
.job__company { color: var(--muted); font-weight: 600; }
.job__summary {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--muted);
  max-width: 62ch;
}
.job__chev {
  justify-self: end;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  transition: transform .3s cubic-bezier(.4,0,.2,1), background-color .2s ease;
}
.job__chev svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.job.is-open .job__chev { transform: rotate(180deg); background: var(--surface-2); }

.job__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s cubic-bezier(.4,0,.2,1);
}
.job.is-open .job__body { grid-template-rows: 1fr; }
.job__bodyInner { overflow: hidden; }
.job__content {
  padding: 4px 24px 28px;
  border-top: 1px solid var(--line);
  margin-top: 0;
}
.job.is-open .job__content { padding-top: 24px; }

.job__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 18px;
}
.job__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.job__link:hover { text-decoration: underline; }

.group + .group { margin-top: 22px; }
.group__title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.group__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.group__list li {
  position: relative;
  padding-left: 22px;
  font-size: 15.5px;
  line-height: 1.5;
}
.group__list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}

/* ---------- skills ---------- */
.skills { display: flex; flex-direction: column; gap: 32px; }
.skillgroup__title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14.5px;
  font-weight: 500;
  transition: border-color .18s ease, transform .18s ease;
}
.chip:hover { border-color: var(--line-strong); transform: translateY(-2px); }

/* ---------- education ---------- */
.edu { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.edublock__title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.edulist { display: flex; flex-direction: column; gap: 10px; }
.edurow {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.edurow__year { font-size: 14px; font-weight: 600; color: var(--muted); }
.edurow__name { font-weight: 600; letter-spacing: -0.015em; }
.edurow__org { margin-top: 4px; font-size: 14px; color: var(--muted); }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(56px, 8vw, 88px) 0 32px;
}
.footer__title {
  margin: 0;
  font-size: clamp(30px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.footer__lead { margin: 12px 0 0; color: var(--muted); max-width: 46ch; }
.footer__phones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 28px;
}
.phone { display: inline-flex; align-items: baseline; gap: 10px; }
.phone__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--muted);
}
.phone__value {
  font-size: clamp(18px, 2.6vw, 24px);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.phone__value:hover { color: var(--accent); }

.footer__preferred {
  margin: 28px 0 0;
  max-width: 56ch;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.footer__socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.social {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.social:hover { background: var(--text); color: var(--bg); transform: translateY(-2px); }

.social--tier1 {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.social--tier1:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.social__badge {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  opacity: .75;
}
.social--tier3 { opacity: .62; }
.social--tier3:hover { opacity: 1; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.footer__bottom a:hover { color: var(--text); }

/* ---------- reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1);
}
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .edu { grid-template-columns: 1fr; gap: 32px; }
  .nav { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .stats { grid-template-columns: 1fr; }
  .job__head {
    grid-template-columns: 1fr 34px;
    gap: 10px 12px;
    padding: 20px 18px;
  }
  .job__period { grid-column: 1 / -1; }
  .job__chev { grid-row: 2; grid-column: 2; align-self: start; }
  .job__content { padding-left: 18px; padding-right: 18px; }
  .footer__bottom { flex-direction: column; gap: 8px; }
}

@media print {
  .topbar, .marquee, .hero__bg, .job__chev, .footer__socials { display: none !important; }
  .job__body { grid-template-rows: 1fr !important; }
  .job { break-inside: avoid; }
  body { background: #fff; color: #000; }
}
