:root {
  --we-teal: #006872;
  --we-navy: #004A6C;
  --we-link: #007C91;
  --we-gold: #E7A217;
  --we-red: #E63312;
  --we-warm: #C8C1B6;
  --we-mint: #C0D1C8;
  --we-paper: #F6F8F8;
  --we-ink: #17313A;
  --we-muted: #5B6C73;
  --we-line: #D9E1E3;
  --we-white: #FFFFFF;
  --shadow: 0 12px 30px rgba(0, 74, 108, .10);
  --radius: 10px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--we-ink);
  background: var(--we-white);
  font-family: "Source Sans Pro", "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}
a { color: var(--we-link); text-underline-offset: 3px; }
a:hover { color: var(--we-navy); }
img { max-width: 100%; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--we-white);
  color: var(--we-navy);
  padding: .7rem 1rem;
  z-index: 99;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.site-header {
  background: var(--we-navy);
  color: var(--we-white);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 3px 12px rgba(0,0,0,.08);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--we-white);
  text-decoration: none;
  min-width: 290px;
}
.brand img { width: 36px; height: 38px; object-fit: contain; opacity: .96; }
.brand-text { line-height: 1.05; }
.brand-text strong { display: block; font-weight: 400; letter-spacing: .02em; }
.brand-text span { display: block; font-size: 13px; opacity: .78; margin-top: 4px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.site-nav a {
  color: rgba(255,255,255,.86);
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 15px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; }

.hero {
  background: var(--we-navy);
  color: var(--we-white);
  overflow: hidden;
}
.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 430px;
  padding: 62px 28px 54px;
  display: grid;
  grid-template-columns: minmax(220px, 34%) 1fr;
  gap: 66px;
  align-items: center;
}
.hero-logo { display:flex; justify-content:center; align-items:center; min-height: 300px; }
.hero-logo img { width: min(330px, 90%); opacity: .60; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 600; opacity: .82; margin-bottom: 14px; }
.hero h1 {
  font-size: clamp(44px, 6vw, 72px);
  line-height: .98;
  font-weight: 300;
  margin: 0 0 24px;
  max-width: 820px;
}
.hero p { font-size: 21px; max-width: 720px; margin: 0 0 26px; color: rgba(255,255,255,.88); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-meta span { border: 1px solid rgba(255,255,255,.28); padding: 7px 11px; border-radius: 999px; font-size: 14px; }

.page-hero {
  border-bottom: 1px solid var(--we-line);
  background: linear-gradient(90deg, var(--we-navy) 0 10px, var(--we-white) 10px 100%);
}
.page-hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 50px 28px 42px;
}
.page-kicker { color: var(--we-link); text-transform: uppercase; letter-spacing: .11em; font-weight: 600; font-size: 13px; }
.page-hero h1 { margin: 7px 0 12px; font-weight: 300; font-size: clamp(38px, 5vw, 58px); line-height: 1.02; color: #172A33; }
.page-hero p { margin: 0; max-width: 820px; font-size: 20px; color: var(--we-muted); }
.page-tags { display:flex; flex-wrap:wrap; gap:8px; margin-top:20px; }
.tag { background: #EDF3F4; color: var(--we-navy); border-radius: 999px; padding: 6px 10px; font-size: 14px; }

main { max-width: var(--max); margin: 0 auto; padding: 48px 28px 80px; }
.section { margin: 0 0 58px; }
.section-heading { display: grid; grid-template-columns: 68px 1fr; gap: 18px; align-items: start; margin-bottom: 24px; }
.section-number { font-size: 46px; line-height: 1; font-weight: 300; color: var(--we-link); }
.section-heading h2 { margin: 0; font-size: 31px; line-height: 1.08; font-weight: 400; }
.section-heading p { margin: 8px 0 0; color: var(--we-muted); max-width: 820px; }

.grid-3 { display:grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.grid-2 { display:grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.lab-card {
  position: relative;
  min-height: 330px;
  padding: 28px;
  color: #fff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  border-radius: 2px;
  transition: transform .16s ease, box-shadow .16s ease;
}
.lab-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color:#fff; }
.lab-card:nth-child(1) { background: #007C81; }
.lab-card:nth-child(2) { background: var(--we-navy); }
.lab-card:nth-child(3) { background: var(--we-mint); color: #18363C; }
.lab-card .lab-no { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; opacity: .78; }
.lab-card h2 { font-size: 31px; font-weight: 400; line-height: 1.05; margin: 14px 0 16px; }
.lab-card p { margin: 0; font-size: 16px; opacity: .92; }
.lab-card .go { margin-top: auto; font-size: 15px; padding-top: 28px; }

.callout {
  border-left: 6px solid var(--we-link);
  background: #F1F6F7;
  padding: 20px 22px;
  margin: 24px 0;
}
.callout.warning { border-left-color: var(--we-gold); background: #FFF9ED; }
.callout.danger { border-left-color: var(--we-red); background: #FFF2EF; }
.callout.history { border-left-color: var(--we-warm); background: #F7F5F1; }
.callout strong { display:block; margin-bottom: 4px; }
.callout p:last-child { margin-bottom: 0; }

.task-list { display: grid; gap: 18px; }
.task {
  border: 1px solid var(--we-line);
  background: var(--we-white);
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  padding: 22px 24px 22px 18px;
  box-shadow: 0 4px 12px rgba(0,74,108,.035);
}
.task-no { font-size: 34px; line-height: 1; font-weight: 300; color: var(--we-link); text-align:center; padding-top:2px; }
.task h3 { margin: 0 0 7px; font-size: 21px; font-weight: 500; }
.task p { margin: 0 0 9px; }
.task ul { margin: 10px 0 0 1.1rem; padding: 0; }
.task li { margin: 5px 0; }
.task .hint { margin-top: 12px; color: var(--we-muted); font-size: 15px; }

.command-strip {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin: 12px 0 0;
}
.command-strip code { background: #EAF1F3; color: #003E59; border-radius: 5px; padding: 5px 8px; font-size: 14px; }
code, pre { font-family: "Cascadia Mono", "Consolas", "Liberation Mono", monospace; }
pre {
  background: #0D2733;
  color: #EAF6F7;
  border-left: 6px solid var(--we-link);
  margin: 16px 0;
  padding: 18px 20px;
  overflow:auto;
  font-size: 15px;
  line-height: 1.5;
}
.inline-note { font-size: 14px; color: var(--we-muted); }

.checklist { list-style:none; padding:0; margin:0; display:grid; gap:10px; }
.checklist li { position:relative; padding-left:34px; }
.checklist li::before { content:""; width:17px; height:17px; border:2px solid var(--we-link); position:absolute; left:0; top:.28em; }

.timeline { display:grid; gap: 1px; background:var(--we-line); border:1px solid var(--we-line); }
.timeline-row { display:grid; grid-template-columns: 105px 1fr; gap:18px; padding:13px 16px; background:#fff; }
.timeline-row strong { color:var(--we-navy); }

.next-prev { display:flex; justify-content:space-between; align-items:center; gap:15px; border-top:1px solid var(--we-line); padding-top:26px; margin-top:60px; }
.next-prev a { text-decoration:none; font-weight:600; }

.site-footer { background: var(--we-navy); color: rgba(255,255,255,.78); }
.footer-inner { max-width:var(--max); margin:0 auto; padding:28px; display:flex; gap:20px; justify-content:space-between; align-items:center; font-size:14px; }
.footer-inner strong { color:#fff; font-weight:400; }

@media (max-width: 900px) {
  .site-nav { display:none; }
  .hero-inner { grid-template-columns:1fr; gap:18px; min-height:auto; }
  .hero-logo { min-height:auto; justify-content:flex-start; }
  .hero-logo img { width:145px; }
  .grid-3, .grid-2 { grid-template-columns:1fr; }
  .lab-card { min-height:250px; }
}
@media (max-width: 620px) {
  body { font-size:16px; }
  .header-inner, .hero-inner, .page-hero-inner, main, .footer-inner { padding-left:18px; padding-right:18px; }
  .brand { min-width:0; }
  .brand-text span { display:none; }
  .section-heading { grid-template-columns:50px 1fr; }
  .task { grid-template-columns:40px 1fr; padding:18px 16px 18px 10px; }
  .task-no { font-size:29px; }
  .timeline-row { grid-template-columns:82px 1fr; }
  .footer-inner { flex-direction:column; align-items:flex-start; }
}

@media print {
  .site-header, .site-footer, .next-prev { display:none; }
  .page-hero { background:#fff; }
  main { max-width:none; padding:24px 0; }
  .task, .callout { break-inside:avoid; box-shadow:none; }
  a { color:#000; text-decoration:none; }
}


/* 11-chapter edition */
.chapter-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.chapter-card { display:grid; grid-template-columns:64px 1fr auto; gap:16px; align-items:center; border:1px solid var(--we-line); padding:18px 20px; text-decoration:none; color:var(--we-ink); background:#fff; transition:.15s ease; }
.chapter-card:hover { transform:translateY(-2px); box-shadow:var(--shadow); color:var(--we-ink); }
.chapter-card .num { font-size:34px; line-height:1; font-weight:300; color:var(--we-link); }
.chapter-card h3 { margin:0 0 3px; font-size:20px; font-weight:500; }
.chapter-card p { margin:0; color:var(--we-muted); font-size:14px; }
.chapter-card .lab-badge { font-size:12px; text-transform:uppercase; letter-spacing:.08em; color:var(--we-navy); background:#EDF3F4; padding:6px 9px; border-radius:999px; white-space:nowrap; }
.lab-band { margin:34px 0 14px; display:flex; gap:10px; align-items:center; }
.lab-band strong { color:var(--we-navy); font-weight:600; }
.lab-band span { color:var(--we-muted); font-size:14px; }
.chapter-nav { display:flex; flex-wrap:wrap; gap:4px; margin-left:auto; }
.chapter-nav a { color:rgba(255,255,255,.86); text-decoration:none; padding:7px 9px; border-radius:5px; font-size:13px; }
.chapter-nav a:hover, .chapter-nav a[aria-current="page"] { background:rgba(255,255,255,.12); color:#fff; }
.note-table { width:100%; border-collapse:collapse; margin:18px 0; }
.note-table th, .note-table td { border:1px solid var(--we-line); padding:10px 12px; text-align:left; vertical-align:top; }
.note-table th { background:#F1F6F7; color:var(--we-navy); }
@media (max-width:900px){ .chapter-nav{display:none;} .chapter-grid{grid-template-columns:1fr;} }
@media (max-width:620px){ .chapter-card{grid-template-columns:48px 1fr;} .chapter-card .lab-badge{grid-column:2;} }


/* Strona główna — rozwinięcie dostarczonej formatki UNIX. */
html { scroll-padding-top: 6rem; }
body { font-size: 1.0625rem; }
button, summary { font: inherit; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--we-gold);
  outline-offset: 5px;
}
button { cursor: pointer; }
img { display: block; height: auto; }
p { margin: 0 0 1.05rem; }
p:last-child { margin-bottom: 0; }
.site-header { box-shadow: none; border-bottom: 1px solid rgba(255,255,255,.15); }
.home-header { min-height: 5rem; gap: 1.5rem; justify-content: space-between; flex-wrap: wrap; }
.home-header .brand { min-width: 0; gap: .8rem; }
.home-header .brand img { width: 2.25rem; height: 2.6rem; }
.home-header .brand-text strong { font-size: 1.0625rem; line-height: 1.2; }
.home-header .brand-text span { font-size: .875rem; line-height: 1.3; opacity: .9; }
.home-header .site-nav { display: flex; gap: .15rem; margin-left: auto; flex-wrap: wrap; }
.home-header .site-nav a { font-size: .9375rem; padding: .6rem .7rem; border-radius: 3px; }
.nav-toggle { display: none; }
.home-hero .hero-inner {
  grid-template-columns: minmax(230px, 30%) minmax(0, 1fr);
  min-height: 0;
  gap: clamp(2rem, 5.5vw, 5rem);
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}
.hero-portrait { margin: 0; width: 100%; max-width: 20.5rem; align-self: center; }
.hero-portrait img { width: 100%; aspect-ratio: 807 / 1080; object-fit: contain; border-radius: 2px; }
.hero-copy { min-width: 0; padding: .5rem 0; }
.home-hero h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(2.1rem, 4.5vw, 3.7rem);
  line-height: 1.06;
  letter-spacing: -.025em;
  font-weight: 300;
  overflow-wrap: anywhere;
}
.home-hero h1 .degree { display: block; font-size: 1.35rem; letter-spacing: 0; line-height: 1.35; margin-bottom: .7rem; }
.home-hero h1 .name-line { display: block; }
.home-hero .position { margin: 0 0 1.4rem; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.5; color: #fff; max-width: 34rem; }
.home-hero .hero-intro { font-size: 1.0625rem; line-height: 1.65; max-width: 34rem; margin: 0 0 1.6rem; color: rgba(255,255,255,.9); }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.875rem; padding: .65rem 1.25rem; font-size: 1rem; text-decoration: none; border: 1px solid transparent; border-radius: 3px; font-weight: 600; }
.button-light { background: #fff; color: var(--we-navy); }
.button-light:hover { background: #eaf2f4; color: var(--we-navy); }
.button-outline { border-color: rgba(255,255,255,.6); color: #fff; }
.button-outline:hover { background: rgba(255,255,255,.09); color: #fff; border-color: #fff; }
main { padding-top: 4rem; padding-bottom: 0; }
.section { margin-bottom: 4.75rem; scroll-margin-top: 1rem; }
.section-heading { margin-bottom: 1.8rem; grid-template-columns: 3.4rem minmax(0,1fr); gap: 1.25rem; }
.section-number { font-size: 2.6rem; line-height: 1.04; }
.section-heading h2 { font-size: clamp(1.65rem, 3vw, 1.95rem); line-height: 1.2; }
.section-heading p { font-size: 1rem; line-height: 1.5; }
.about-layout { display: grid; grid-template-columns: minmax(0,1.12fr) minmax(0,1fr); gap: 2.75rem; align-items: start; }
.about-copy { max-width: 39rem; }
.about-copy strong { font-weight: 600; }
.document-photo { margin: 0; }
.document-photo img { width: 100%; height: auto; border-radius: 2px; }
figcaption { margin-top: .8rem; font-size: .875rem; line-height: 1.6; color: var(--we-muted); }
.career-line { margin: 2.25rem 0 0; padding: 1.5rem 0; border-top: 1px solid var(--we-line); border-bottom: 1px solid var(--we-line); display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.5rem; }
.career-line div { padding-left: 1.35rem; border-left: 2px solid var(--we-link); }
.career-line dt { font-size: 1.35rem; font-weight: 400; color: var(--we-navy); line-height: 1.3; margin-bottom: .35rem; }
.career-line dd { margin: 0; font-size: .9375rem; color: var(--we-muted); line-height: 1.5; }
.teaching-intro { max-width: 52rem; margin-bottom: 1.7rem; }
.course-groups { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.5rem; }
.course-group { min-width: 0; border-top: 3px solid var(--we-link); padding-top: 1.05rem; }
.course-group h3 { margin: 0 0 .4rem; font-size: 1.23rem; font-weight: 600; color: var(--we-navy); line-height: 1.4; }
.course-language { font-size: .875rem; color: var(--we-muted); margin-bottom: 1.1rem; }
.course-group ul { margin: 0; padding: 0; list-style: none; }
.course-group li { border-top: 1px solid var(--we-line); padding: .95rem 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .75rem; justify-content: space-between; }
.course-name { font-weight: 500; }
.course-semester { font-size: .875rem; color: var(--we-muted); white-space: nowrap; }
.course-note { font-size: .9375rem; color: var(--we-muted); max-width: 54rem; margin: 1rem 0 0; }
.research-copy { max-width: 53rem; }
.research-copy strong { font-weight: 600; }
.publications { margin-top: 1.8rem; border-top: 1px solid var(--we-line); border-bottom: 1px solid var(--we-line); }
.publications summary { position: relative; padding: 1.1rem 3rem 1.1rem 0; color: var(--we-navy); cursor: pointer; font-weight: 600; font-size: 1.125rem; line-height: 1.5; }
.publications summary::marker { color: var(--we-link); }
.publications summary .count { display: inline-block; font-size: .9375rem; margin-left: .65rem; font-weight: 400; color: var(--we-muted); }
.publication-list { margin: .5rem 0 1.5rem; padding-left: 1.9rem; }
.publication-list li { padding: .85rem 0 .9rem .6rem; border-bottom: 1px solid var(--we-line); font-size: .9375rem; line-height: 1.7; overflow-wrap: anywhere; }
.publication-list li:last-child { border-bottom: 0; }
.publication-list li::marker { color: var(--we-link); font-weight: 600; }
.publication-list cite { font-style: italic; color: var(--we-ink); }
.research-link { margin-top: 1rem; font-size: .9375rem; }
.public-life-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 2.75rem; }
.public-life-grid h3 { margin: 0 0 .85rem; font-size: 1.23rem; color: var(--we-navy); font-weight: 600; }
.public-life-grid p { font-size: 1rem; line-height: 1.7; }
.personal-note { margin: 1.7rem 0 0; padding-top: 1.3rem; border-top: 1px solid var(--we-line); color: var(--we-muted); font-size: .9375rem; }
.personal-note strong { color: var(--we-ink); font-weight: 600; }
.contact-band { background: var(--we-paper); border-top: 1px solid var(--we-line); scroll-margin-top: 5.5rem; }
.contact-inner { max-width: var(--max); padding: 3.4rem 28px 3.7rem; margin: 0 auto; }
.contact-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 2.75rem; }
.contact-grid address { font-style: normal; }
.contact-grid h3 { margin: 0 0 1rem; color: var(--we-navy); font-size: 1.15rem; font-weight: 600; }
.contact-details { margin: 0; }
.contact-details > div { margin-bottom: 1.1rem; }
.contact-details > div:last-child { margin-bottom: 0; }
.contact-details dt { font-size: .875rem; color: var(--we-muted); margin-bottom: .2rem; }
.contact-details dd { margin: 0; font-size: 1.0625rem; }
.contact-details a { overflow-wrap: anywhere; }
.contact-grid .affiliation { font-size: 1rem; line-height: 1.75; margin-bottom: 1.1rem; }
.contact-room { font-size: 1rem; }
.footer-inner { gap: 1.2rem; flex-wrap: wrap; font-size: .875rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.footer-inner p { margin: 0; }
.footer-inner a { color: #fff; text-decoration-color: rgba(255,255,255,.45); }
@media (max-width: 1000px) {
  .home-header { gap: .65rem; }
  .home-header .site-nav a { padding-left: .5rem; padding-right: .5rem; }
  .home-hero .hero-inner { gap: 2.25rem; }
}
@media (max-width: 900px) {
  .home-header { padding-top: 1rem; padding-bottom: 1rem; }
  .home-header .site-nav { margin-left: 0; flex-basis: 100%; justify-content: flex-start; }
  .js .home-header .site-nav { display: none; }
  .js .home-header .site-nav.is-open { display: flex; padding-top: .55rem; }
  .js .nav-toggle { display: inline-flex; gap: .6rem; align-items: center; justify-content: center; min-height: 2.75rem; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.5); border-radius: 3px; padding: .45rem .7rem; font-size: .9375rem; margin-left: auto; }
  .nav-toggle svg { width: 1.1rem; height: 1.1rem; }
  .home-hero .hero-inner { grid-template-columns: minmax(190px,30%) minmax(0,1fr); padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .home-hero .position { font-size: 1.0625rem; }
  .home-hero .hero-intro { font-size: 1rem; }
  .about-layout, .public-life-grid { gap: 1.75rem; }
  .course-groups { grid-template-columns: 1fr; gap: 1.65rem; }
  .course-group li { max-width: 38rem; }
  .course-language { margin-bottom: .75rem; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 5.5rem; }
  .home-header .brand-text strong { font-size: 1rem; }
  .home-header .brand-text span { display: none; }
  .home-header .brand img { width: 1.7rem; height: 2rem; }
  .home-hero .hero-inner { grid-template-columns: 1fr; gap: 1.6rem; }
  .hero-portrait { width: 12.5rem; max-width: 100%; }
  .hero-copy { padding: 0; }
  .home-hero h1 { font-size: clamp(2.1rem, 8.4vw, 3.25rem); margin-bottom: .8rem; }
  .home-hero h1 .degree { font-size: 1.2rem; }
  .home-hero .position { max-width: 31rem; }
  main { padding-top: 2.75rem; }
  .section { margin-bottom: 3.3rem; }
  .section-heading { grid-template-columns: 2.5rem minmax(0,1fr); gap: .85rem; margin-bottom: 1.5rem; }
  .section-number { font-size: 2rem; }
  .section-heading h2 { font-size: 1.65rem; }
  .about-layout, .public-life-grid, .contact-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .career-line { margin-top: 1.7rem; gap: 1.05rem; }
  .career-line div { padding-left: .65rem; }
  .career-line dt { font-size: 1.15rem; }
  .career-line dd { font-size: .875rem; }
  .publications summary { padding-right: 0; font-size: 1.05rem; }
  .publications summary .count { margin-left: .4rem; font-size: .875rem; }
  .contact-inner { padding-top: 2.5rem; padding-bottom: 2.75rem; }
  .contact-details dd { font-size: 1rem; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 620px) {
  .contact-inner { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 380px) {
  .home-header { column-gap: .5rem; }
  .home-header .brand { gap: .45rem; }
  .home-header .brand-text strong { font-size: .9375rem; }
  .js .nav-toggle { padding: .45rem .55rem; }
  .nav-toggle svg { display: none; }
  .career-line { grid-template-columns: 1fr; gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  html { scroll-padding-top: 0; }
  body { font-size: 11pt; }
  .home-hero, .contact-band { background: #fff !important; color: #000 !important; }
  .home-hero .hero-inner { padding: 0 0 1.5rem; grid-template-columns: 130px 1fr; gap: 1.5rem; }
  .home-hero h1 { font-size: 25pt; }
  .home-hero .position, .home-hero .hero-intro { color: #000; font-size: 11pt; }
  .hero-actions, .research-link { display: none; }
  .section { margin-bottom: 1.5rem; }
  .section-heading, h3, figure { break-inside: avoid; }
  .section-heading, h3 { break-after: avoid; }
  .contact-inner { padding: 1.5rem 0; }
  .publication-list li { break-inside: avoid; }
}

/* Galeria — wspólna kolorystyka i układ witryny. */
.gallery-hero .page-hero-inner { padding-top: 2rem; padding-bottom: 2.2rem; }
.gallery-breadcrumb { display: inline-block; margin-bottom: .85rem; font-size: .9375rem; }
.gallery-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.gallery-hero p { font-size: 1.0625rem; }
.gallery-main { padding-top: 2.8rem; padding-bottom: 1rem; }
.gallery-section { margin-bottom: 3.8rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.1rem 1.7rem; }
.gallery-item { min-width: 0; margin: 0; }
.gallery-link { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--we-paper); border: 1px solid var(--we-line); border-radius: 2px; overflow: hidden; }
.gallery-link img { width: 100%; height: 100%; object-fit: contain; }
.gallery-link:hover { border-color: var(--we-link); }
.gallery-zoom { position: absolute; right: .65rem; bottom: .65rem; background: var(--we-navy); color: #fff; padding: .35rem .65rem; font-size: .875rem; border-radius: 2px; }
.gallery-item figcaption { margin-top: .75rem; padding-right: .2rem; font-size: .9375rem; line-height: 1.6; }
.gallery-archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-archive-grid .gallery-link { aspect-ratio: 1; padding: .8rem; }
.gallery-return { border-top: 1px solid var(--we-line); padding-top: 1.3rem; margin-bottom: 2.8rem; }
.gallery-dialog { width: min(72rem, calc(100% - 2rem)); max-width: none; max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); padding: 0; border: 1px solid var(--we-line); border-radius: 3px; color: var(--we-ink); background: #fff; }
.gallery-dialog::backdrop { background: rgba(5, 22, 31, .9); }
.gallery-dialog:not([open]) { display: none; }
.lightbox-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem .9rem; background: var(--we-navy); color: #fff; }
.lightbox-toolbar p { margin: 0; font-size: .9375rem; }
.lightbox-button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .4rem .85rem; font-size: .9375rem; border: 1px solid var(--we-line); border-radius: 2px; color: var(--we-navy); background: #fff; }
.lightbox-button:hover { background: var(--we-paper); }
.lightbox-close { color: #fff; background: transparent; border-color: rgba(255, 255, 255, .6); }
.lightbox-close:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.lightbox-figure { margin: 0; }
.lightbox-image { width: 100%; height: min(65vh, 52rem); height: min(65dvh, 52rem); object-fit: contain; background: var(--we-paper); }
.lightbox-figure figcaption { margin: 0; padding: 1rem 1.1rem .6rem; color: var(--we-ink); font-size: 1rem; }
.lightbox-controls { display: flex; gap: .75rem; justify-content: space-between; flex-wrap: wrap; padding: .5rem 1.1rem 1rem; }
html.lightbox-open { overflow: hidden; }
@media (max-width: 1000px) {
  .home-header .site-nav { margin-left: 0; flex-basis: 100%; justify-content: flex-start; }
  .js .home-header .site-nav { display: none; }
  .js .home-header .site-nav.is-open { display: flex; padding-top: .55rem; }
  .home-header { padding-top: 1rem; padding-bottom: 1rem; }
  .js .nav-toggle { display: inline-flex; gap: .6rem; align-items: center; justify-content: center; min-height: 2.75rem; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.5); border-radius: 3px; padding: .45rem .7rem; font-size: .9375rem; margin-left: auto; }
  .nav-toggle svg { width: 1.1rem; height: 1.1rem; }
}
@media (max-width: 700px) {
  .gallery-main { padding-top: 2rem; }
  .gallery-section { margin-bottom: 2.8rem; }
  .gallery-grid, .gallery-archive-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .gallery-archive-grid .gallery-link { aspect-ratio: 4 / 3; }
  .gallery-dialog { width: calc(100% - 1rem); max-height: calc(100vh - 1rem); max-height: calc(100dvh - 1rem); }
  .lightbox-toolbar { padding: .5rem .65rem; gap: .5rem; }
  .lightbox-image { height: 55vh; height: 55dvh; }
  .lightbox-figure figcaption { font-size: .9375rem; padding: .8rem; }
  .lightbox-controls { padding: .2rem .8rem .8rem; }
}
@media (max-width: 380px) {
  .js .nav-toggle { padding: .45rem .55rem; }
}
@media print {
  .gallery-zoom, .gallery-return, .gallery-breadcrumb, .gallery-dialog { display: none !important; }
  .gallery-grid, .gallery-archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .gallery-item { break-inside: avoid; }
}
