:root {
  color-scheme: light;
  --paper: #ffffff;
  --soft: #f5f8fb;
  --ink: #1f2c39;
  --muted: #596978;
  --line: #d9e1e8;
  --blue: #4f82aa;
  --blue-dark: #365f81;
  --blue-mid: #789bbd;
  --blue-pale: #e8eff5;
  --max: 1140px;
  font-family: Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Arial, Helvetica, sans-serif; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
.container { width: min(var(--max), calc(100% - 56px)); margin-inline: auto; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 50; padding: 10px 14px; background: var(--paper); color: var(--ink); }
.skip-link:focus { top: 12px; }
.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; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { font-size: 16px; line-height: 1; font-weight: 800; letter-spacing: -.04em; white-space: nowrap; }
.brand span, h1 span { color: var(--blue); }
.nav-links { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav-links a, .header-cta { font-size: 13px; font-weight: 700; }
.nav-links a:hover, .text-link:hover, .cv-links a:hover, .footer-inner > a:last-child:hover { color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: 22px; }
.language-switch { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; }
.language-switch > span { color: #9aa7b3; }
.language-button { padding: 5px 0; border: 0; background: transparent; color: #82909d; font-size: 12px; font-weight: 800; cursor: pointer; }
.language-button.is-current { color: var(--ink); }
.header-cta { color: var(--blue); }
.menu-toggle { display: none; width: 42px; height: 42px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: white; cursor: pointer; }
.menu-toggle span:not(.sr-only) { display: block; height: 2px; width: 19px; margin: 4px 0; background: var(--ink); }
.hero { display: grid; grid-template-columns: 1.08fr .82fr; align-items: center; gap: clamp(44px, 8vw, 100px); padding-block: clamp(66px, 8vw, 100px); }
.hero-copy { max-width: 620px; }
.eyebrow { margin: 0 0 17px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .09em; line-height: 1.4; }
.hero h1 { margin: 0 0 25px; font-size: clamp(64px, 9vw, 112px); letter-spacing: -.075em; line-height: .92; font-weight: 800; }
.hero h2 { max-width: 540px; margin: 0 0 15px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.045em; line-height: 1.2; }
.intro { max-width: 515px; margin: 0; color: var(--muted); font-size: 16px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-top: 30px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 0 20px; border-radius: 5px; font-size: 13px; font-weight: 700; }
.button-primary { color: white; background: var(--blue); }
.button-primary:hover { background: var(--blue-dark); }
.text-link { color: var(--blue); font-size: 13px; font-weight: 700; }
.portrait { width: 100%; max-width: 420px; aspect-ratio: 4 / 5; margin: 0 auto; overflow: hidden; background: var(--blue-pale); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 43%; }
.section { padding-block: 82px; }
.section-heading { max-width: 760px; margin-bottom: 40px; }
.section-heading h2, .about-copy h2, .contact-inner h2 { margin: 0; font-size: clamp(32px, 4.6vw, 52px); letter-spacing: -.06em; line-height: 1.12; }
.section-intro { max-width: 610px; margin: 14px 0 0; color: var(--muted); font-size: 15px; }
.project-item { padding-block: 42px 46px; border-top: 1px solid var(--line); }
.project-heading { display: grid; grid-template-columns: .95fr 1.05fr; gap: 42px; align-items: end; margin-bottom: 24px; }
.project-type { margin: 0 0 7px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.project-title h3 { margin: 0; font-size: clamp(28px, 3.5vw, 41px); letter-spacing: -.055em; line-height: 1.08; }
.project-role { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.project-summary { max-width: 560px; margin: 0 0 2px; color: var(--muted); font-size: 14px; }
.carousel { margin-top: 24px; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: 4px; background: var(--blue-pale); }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; min-width: 0; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.carousel-slide img { display: block; width: 100%; height: clamp(260px, 50vw, 600px); object-fit: contain; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 16px; }
.carousel-counter { min-width: 70px; text-align: center; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.project-item--text { padding-bottom: 12px; }
.expertise-section { background: var(--soft); }
.expertise-section .section-heading { margin-bottom: 34px; }
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; padding-top: 28px; border-top: 1px solid var(--line); }
.skill h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.03em; }
.skill p { max-width: 310px; margin: 0; color: var(--muted); font-size: 14px; }
.languages-row { display: grid; grid-template-columns: .72fr 1.28fr; gap: 20px; align-items: baseline; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); }
.languages-row .eyebrow { margin: 0; }
.languages-row p { margin: 0; font-size: 14px; font-weight: 700; }
.about-section { display: grid; grid-template-columns: .55fr 1.45fr; gap: 50px; }
.about-label .eyebrow { margin-top: 9px; }
.about-copy { max-width: 760px; }
.about-copy p { margin: 20px 0 0; color: var(--muted); font-size: 15px; }
.contact-section { background: var(--blue-pale); }
.contact-inner { display: grid; grid-template-columns: 1fr .85fr; gap: 55px; align-items: end; }
.contact-inner .eyebrow { margin-bottom: 17px; }
.contact-details { padding-bottom: 3px; }
.email-link { display: inline-block; max-width: 100%; color: var(--blue-dark); font-size: clamp(20px, 3vw, 30px); font-weight: 700; letter-spacing: -.045em; overflow-wrap: anywhere; }
.cv-links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 18px; }
.cv-links a { border-bottom: 1px solid #9aacbc; color: var(--ink); font-size: 13px; font-weight: 700; padding-bottom: 3px; }
.site-footer { background: white; }
.footer-inner { min-height: 78px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--line); }
.footer-inner > span, .footer-inner > a:last-child { color: var(--muted); font-size: 11px; }
:focus-visible { outline: 3px solid var(--blue-mid); outline-offset: 3px; }
@media (max-width: 800px) {
  .header-inner { min-height: 70px; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 70px; padding: 8px 28px 18px; border-bottom: 1px solid var(--line); background: white; }
  .nav-links.is-open { display: grid; gap: 0; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .header-actions { gap: 14px; }
  .header-cta { display: none; }
  .menu-toggle { display: block; }
  .hero { grid-template-columns: 1fr; gap: 38px; padding-block: 56px 66px; }
  .hero-copy { max-width: 640px; }
  .portrait { max-width: 480px; }
  .section { padding-block: 66px; }
  .project-heading { grid-template-columns: 1fr; gap: 12px; }
  .project-summary { max-width: 680px; }
  .skills-grid { grid-template-columns: 1fr; gap: 24px; }
  .skill p { max-width: 560px; }
  .about-section { grid-template-columns: 1fr; gap: 14px; }
  .contact-inner { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 580px) {
  .container { width: min(var(--max), calc(100% - 36px)); }
  .brand { font-size: 14px; }
  .hero h1 { font-size: clamp(58px, 18vw, 82px); }
  .hero h2 { font-size: 26px; }
  .intro { font-size: 15px; }
  .project-item { padding-block: 34px 38px; }
  .languages-row { grid-template-columns: 1fr; gap: 5px; }
  .footer-inner { min-height: 72px; gap: 10px; }
  .footer-inner > span, .footer-inner > a:last-child { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Slideshow thumbnail navigation */
.carousel-thumbnails { position: relative; display: flex; overflow-x: auto; gap: 8px; padding: 12px 3px 6px; scrollbar-width: thin; scrollbar-color: var(--blue-mid) transparent; }
.carousel-thumbnail { flex: 0 0 64px; border: 2px solid transparent; padding: 3px; border-radius: 5px; background: transparent; cursor: pointer; }
.carousel-thumbnail img { width: 54px; height: 42px; object-fit: cover; border-radius: 2px; }
.carousel-thumbnail.is-current { border-color: var(--blue); }
.carousel-controls { justify-content: space-between; margin-top: 8px; gap: 15px; }
.carousel-play { border: 1px solid var(--line); border-radius: 20px; background: white; color: var(--blue-dark); padding: 7px 15px; cursor: pointer; font-size: 12px; font-weight: 700; }
.carousel-counter { text-align: left; }
