:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --text: #1c1f23;
  --muted: #5b6470;
  --line: #e3e5e8;
  --accent: #0f766e;
  --accent-soft: #e6f4f2;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111416;
    --surface: #181c1f;
    --text: #e7e9eb;
    --muted: #9aa3ad;
    --line: #2a3035;
    --accent: #2dd4bf;
    --accent-soft: #11302d;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 1.0625rem; }
a { color: var(--accent); }
.wrap { max-width: 900px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: .25rem .5rem; }

.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 1rem; height: 3.5rem; }
.nav ul { display: flex; gap: 1.1rem; list-style: none; margin: 0; padding: 0; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav ul a { color: var(--muted); text-decoration: none; font-size: .92rem; white-space: nowrap; }
.nav ul a:hover { color: var(--text); }
.brand { font-weight: 800; text-decoration: none; color: var(--text); letter-spacing: .04em; }
.lang { margin: 0; display: flex; gap: .4rem; font-size: .85rem; }
.lang a { text-decoration: none; color: var(--muted); padding: .1rem .35rem; border-radius: 6px; }
.lang a[aria-current] { color: var(--accent); background: var(--accent-soft); font-weight: 700; }

.hero { padding: 4.5rem 0 2.5rem; }
.hero { display: grid; grid-template-columns: 1fr auto; gap: 2.5rem; align-items: center; }
.hero-text { grid-column: 1; grid-row: 1; min-width: 0; }
.photo { grid-column: 2; grid-row: 1; }
.photo img { display: block; width: 200px; height: 200px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--surface); box-shadow: 0 0 0 1px var(--line), 0 8px 24px rgb(0 0 0 / .12); }
h1 { font-size: clamp(2.1rem, 6vw, 3.2rem); line-height: 1.1; margin: .4rem 0 .2rem; letter-spacing: -.02em; }
.role { font-size: 1.3rem; color: var(--muted); margin: 0 0 1.2rem; font-weight: 500; }
.tagline { font-size: 1.2rem; max-width: 42rem; margin: 0 0 .8rem; }
.avail { color: var(--muted); max-width: 42rem; margin: 0; }
.cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.6rem; }
.btn { font: inherit; font-size: .95rem; padding: .6rem 1.1rem; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #06201d; } }

section { padding: 2rem 0; border-top: 1px solid var(--line); }
h2 { font-size: 1.45rem; margin: 0 0 1rem; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; margin: 0 0 .35rem; }
.intro, .earlier, .small { color: var(--muted); }
.small { font-size: .9rem; }

.job { padding: .9rem 0 .4rem 1.1rem; border-left: 2px solid var(--line); margin-left: .2rem; position: relative; }
.job::before { content: ""; position: absolute; left: -6px; top: 1.25rem; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.job .meta { margin: 0; color: var(--muted); display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .95rem; }
.job .period { font-variant-numeric: tabular-nums; }
.job ul { margin: .5rem 0 0; padding-left: 1.1rem; }
.job li { margin: .25rem 0; }

.skills { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0 0 1.5rem; }
.skills dt { font-weight: 700; }
.skills dd { margin: 0; color: var(--muted); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.cols ul { padding-left: 1.1rem; margin: 0 0 1rem; }
.contact { list-style: none; padding: 0; }
.contact li { margin: .3rem 0; }
.print-only { display: none; }
.foot { color: var(--muted); font-size: .85rem; padding-top: 1rem; padding-bottom: 2rem; }

@media (max-width: 640px) {
  .nav ul { display: none; }
  .nav { justify-content: space-between; }
  .hero { padding-top: 2.5rem; }
  .hero { grid-template-columns: 1fr; gap: 1.2rem; }
  .photo, .hero-text { grid-column: 1; }
  .photo { grid-row: 1; }
  .hero-text { grid-row: 2; }
  .photo img { width: 128px; height: 128px; }
  .skills { grid-template-columns: 1fr; gap: .1rem; }
  .skills dd { margin-bottom: .6rem; }
  .cols { grid-template-columns: 1fr; }
}

@media print {
  :root { --bg: #fff; --surface: #fff; --text: #000; --muted: #333; --line: #ccc; --accent: #0f5f58; --accent-soft: #fff; font-size: 10pt; }
  body { font-size: 10pt; }
  .top, .cta, .foot, .skip { display: none; }
  .print-only { display: list-item; }
  .hero { padding: 0 0 .5rem; }
  h1 { font-size: 22pt; }
  .hero { gap: 1rem; }
  .photo img { width: 24mm; height: 24mm; box-shadow: none; border: 0; }
  section { padding: .6rem 0; break-inside: auto; }
  h2, h3, .job header { break-after: avoid; }
  .job li, .case p { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* selected projects */
.case { margin: 0 0 1.3rem; }
.case:last-child { margin-bottom: 0; }
.case p { margin: .3rem 0 0; max-width: 46rem; }
.job .summary { margin: .5rem 0 .2rem; }
#lab p { max-width: 46rem; }

@page { size: A4; margin: 11mm 13mm; }
@media print {
  :root { font-size: 9pt; }
  section { padding: .35rem 0; }
  #contact > p { display: none; }
  .contact li { display: inline; margin-right: 1.2rem; }
  .contact li.print-only { display: inline; }
  .skills { gap: .1rem 1rem; margin-bottom: .5rem; }
  .cols ul { margin-bottom: .3rem; }
  .cols h3 { margin: .2rem 0 .1rem; }
  .cols { grid-template-columns: 3fr 2fr; gap: .8rem; }
  .cols li { margin: 0; }
  .small { font-size: 8pt; }
  .hero { padding-bottom: .2rem; }
  .skills dd, .skills dt { line-height: 1.3; }
  .job ul { margin-top: .2rem; }
  .case p, #lab p, .tagline, .avail { max-width: none; }
  p { margin: .25rem 0; }
  .job { padding-top: .25rem; }
  body { font-size: 9pt; line-height: 1.38; }
  .case { margin-bottom: .5rem; break-inside: avoid; }
  .job { padding-top: .4rem; }
  .job li { margin: .1rem 0; }
  h2 { font-size: 13pt; margin-bottom: .4rem; }
  .tagline { font-size: 11pt; }
  .role { margin-bottom: .5rem; }
}
