:root{
  --bg:#f7f6f2;
  --card:rgba(255,255,255,.74);
  --ink:#0b0e12;
  --muted:rgba(11,14,18,.66);
  --line:rgba(11,14,18,.12);
  --shadow:0 18px 50px rgba(11,14,18,.10);
  --accent:#2b59c3;
  --accent2:#c35a33;
  --radius:22px;

  --serif:"Fraunces", ui-serif, Georgia, serif;
  --sans:"Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --mono:"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --topbar-h:96px;
}

*{box-sizing:border-box}
html,body{height:100%;width:100%;max-width:100%;overflow-x:hidden}
html{scroll-behavior:smooth;overflow-x:hidden}
body{
  margin:0;
  font-family:var(--sans);
  color:var(--ink);
  background:var(--bg);
  letter-spacing:-0.01em;
  line-height:1.55;
  overflow-x:hidden;
}
a{color:inherit}
a:hover{color:var(--ink)}
img{max-width:100%;height:auto;display:block}
::selection{background:rgba(43,89,195,.18)}

:focus-visible{
  outline:2px solid rgba(43,89,195,.55);
  outline-offset:3px;
  border-radius:12px;
}

/* ===== Topbar ===== */
.topbar{
  position:fixed;
  inset:16px 16px auto 16px;
  z-index:50;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  pointer-events:none;
}
.topbar > *{pointer-events:auto}

.mark, .nav{
  background:rgba(247,246,242,.74);
  border:1px solid var(--line);
  backdrop-filter:blur(12px);
  box-shadow:0 10px 30px rgba(11,14,18,.06);
}

.mark{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  padding:10px 12px;
  border-radius:999px;
  max-width:calc(100vw - 32px);
}
.mark .id{
  display:flex;
  gap:10px;
  align-items:baseline;
  flex-wrap:wrap;
  min-width:0;
  padding-right:10px;
  border-right:1px solid rgba(11,14,18,.10);
}
.mark b{
  font-family:var(--serif);
  font-variation-settings:"opsz" 70,"wght" 700,"SOFT" 28;
  letter-spacing:-0.02em;
}
.mark span{
  font-family:var(--mono);
  font-size:12px;
  color:var(--muted);
  letter-spacing:0.02em;
}
.lang{display:flex;gap:8px;align-items:center}
.flag-btn{
  display:inline-flex;
  gap:6px;
  align-items:center;
  border-radius:999px;
  border:1px solid rgba(11,14,18,.14);
  background:rgba(255,255,255,.55);
  padding:7px 9px;
  cursor:pointer;
  font-family:var(--mono);
  font-size:12px;
  line-height:1;
}
.flag-btn[aria-pressed="true"]{opacity:.6}
.flag-btn[aria-pressed="false"]{opacity:1}

.nav{
  display:flex;
  gap:8px;
  padding:8px;
  border-radius:999px;
}
.nav a{
  font-family:var(--mono);
  font-size:12px;
  text-decoration:none;
  padding:9px 11px;
  border-radius:999px;
  border:1px solid transparent;
  color:rgba(11,14,18,.78);
}
.nav a:hover{
  border-color:rgba(11,14,18,.16);
  color:var(--ink);
  background:rgba(255,255,255,.45);
}

/* ===== Layout ===== */
.chapters{padding-top:calc(var(--topbar-h) + 20px)}
.chapters{overflow-x:clip}
.chapter{overflow-x:clip}
.chapter{
  position:relative;
  padding:42px 20px 34px;
}
.chapter.compact{padding:34px 20px 32px}
.chapter#start{padding-top:48px}
.chapter#start,
.chapter#wyroznienia,
.chapter#obszary,
.chapter#kontakt{scroll-margin-top:calc(var(--topbar-h) + 18px)}

.wrap{max-width:1120px;width:100%;margin:0 auto}

/* Background */
.chapter::before{
  content:"";
  position:absolute;
  inset:-18% -10%;
  z-index:-2;
  background:
    radial-gradient(1100px 540px at 18% 22%, rgba(43,89,195,.18), transparent 60%),
    radial-gradient(900px 520px at 88% 30%, rgba(195,90,51,.16), transparent 55%),
    radial-gradient(800px 520px at 50% 90%, rgba(11,14,18,.10), transparent 60%),
    linear-gradient(120deg, rgba(247,246,242,1), rgba(247,246,242,.72));
  transform:rotate(-1.2deg);
}
.chapter::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  opacity:.10;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  mix-blend-mode:multiply;
}

/* ===== Type ===== */
h1,h2{
  margin:0;
  font-family:var(--serif);
  font-variation-settings:"opsz" 82,"wght" 730,"SOFT" 32;
  letter-spacing:-0.03em;
  line-height:1.02;
}
h1{font-size:clamp(42px,6vw,84px)}
h2{font-size:clamp(26px,3.1vw,44px)}

p{margin:0;color:rgba(11,14,18,.84)}
.lede{
  font-size:clamp(16px,1.35vw,18px);
  max-width:70ch;
  margin-top:12px;
}
.kicker{
  font-family:var(--mono);
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:12px;
  color:var(--muted);
  margin-bottom:10px;
}
.kicker-on-dark{color:rgba(255,255,255,.75)}

/* ===== Components ===== */
.panel{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:18px;
  backdrop-filter:blur(12px);
  box-shadow:0 10px 28px rgba(11,14,18,.06);
}
.tag{
  display:inline-flex;
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.10em;
  text-transform:uppercase;
  color:rgba(11,14,18,.68);
}
.body{margin-top:10px;max-width:68ch}

.badge-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.badge{
  display:inline-flex;
  gap:10px;
  align-items:center;
  padding:9px 11px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.45);
  font-family:var(--mono);
  font-size:12px;
  color:rgba(11,14,18,.78);
}
.badge i{width:9px;height:9px;border-radius:50%;background:var(--accent2);display:inline-block}
.badge.blue i{background:var(--accent)}
.badge.black i{background:rgba(11,14,18,.75)}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(11,14,18,.18);
  background:rgba(255,255,255,.55);
  text-decoration:none;
  font-family:var(--mono);
  font-size:12px;
  color:rgba(11,14,18,.82);
}
.btn:hover{background:rgba(255,255,255,.70);color:var(--ink)}
.btn.primary{
  background:var(--ink);
  color:#fff;
  border-color:rgba(0,0,0,.22);
}
.btn.primary:hover{filter:brightness(1.05)}
.cta-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}

.grid{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:14px;
  align-items:start;
  margin-top:16px;
}
.profile-top{display:grid;grid-template-columns:1fr;gap:14px;align-items:start}
.avatar{
  width:120px;
  height:120px;
  border-radius:18px;
  object-fit:cover;
  box-shadow:var(--shadow);
  border:1px solid rgba(11,14,18,.12);
  background:rgba(255,255,255,.40);
}
.list{margin:10px 0 0 0;padding-left:18px;color:rgba(11,14,18,.84)}
.list li{margin:7px 0}

/* ===== Recognitions ===== */
.rec-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:14px;
}
.rec-slider{grid-column:1 / -1;position:relative;padding:16px 56px}
.logo-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:12px}
.rec-logo img{
  height:72px;
  width:auto;
  border-radius:14px;
  border:1px solid rgba(11,14,18,.10);
  background:rgba(255,255,255,.55);
}
.logo-link{display:inline-flex;margin-top:12px}
.logo-link img{height:78px;width:auto}
.muted{margin-top:10px;color:rgba(11,14,18,.70);font-size:14px}

.track-inner{
  display:flex;
  overflow-x:auto;
  scrollbar-width:none;
}
.track-inner::-webkit-scrollbar{display:none}
.qcard{
  flex:0 0 100%;
  width:100%;
  border:1px solid rgba(11,14,18,.10);
  background:rgba(255,255,255,.40);
  border-radius:18px;
  padding:14px;
}
.qcard .q{margin:0;font-size:14px;line-height:1.55;color:rgba(11,14,18,.88)}
.qcard .src{
  margin-top:10px;
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:rgba(11,14,18,.62);
}
.arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:36px;
  height:36px;
  border-radius:999px;
  border:1px solid rgba(11,14,18,.18);
  background:rgba(255,255,255,.70);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  user-select:none;
}
.arrow:hover{background:rgba(255,255,255,.88)}
.arrow.left{left:14px}
.arrow.right{right:14px}

/* ===== Fix: keep Recognitions same width as other sections (prevent content-driven overflow) ===== */
.rec-grid{min-width:0}
.rec-grid > .panel{min-width:0}
.rec-slider{min-width:0}
.track-inner{min-width:0}
.qcard{min-width:0}

/* Logos and pills must never force the grid wider */
.rec-logo img,
.logo-link img{
  max-width:100%;
  object-fit:contain;
}

.mini-badge{
  max-width:100%;
  word-break:break-word;
  hyphens:auto;
}


/* ===== Scope tiles ===== */
.matrix{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:10px;
  margin-top:14px;
}
.tile{
  grid-column:span 6;
  padding:16px;
  padding-right:56px;
  border-radius:20px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.70);
  backdrop-filter:blur(10px);
  position:relative;
  overflow:hidden;
}
.tile h3{
  margin:0 0 8px 0;
  font-family:var(--serif);
  font-variation-settings:"opsz" 60,"wght" 650,"SOFT" 24;
  letter-spacing:-0.02em;
  font-size:22px;
}
.tile p{font-size:14px;color:rgba(11,14,18,.78)}
.icon{
  position:absolute;
  top:14px;
  right:14px;
  width:34px;
  height:34px;
  opacity:.62;
}
.icon-img{width:100%;height:100%;object-fit:contain}

/* ===== Contact ===== */
.contact-card{
  border-radius:28px;
  padding:22px;
  border:1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(900px 420px at 18% 30%, rgba(195,90,51,.22), transparent 60%),
    radial-gradient(900px 420px at 80% 70%, rgba(43,89,195,.24), transparent 60%),
    rgba(14,22,33,.94);
  box-shadow:var(--shadow);
}
.contact-card h2{color:#fff}
.contact-lede{margin-top:12px;color:rgba(255,255,255,.78);max-width:74ch}
.contact-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:14px;
}
.contact-item{
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  padding:14px;
  background:rgba(0,0,0,.18);
}
.contact-item .label{
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.10em;
  text-transform:uppercase;
  color:rgba(255,255,255,.68);
  margin-bottom:8px;
}
.contact-link{
  font-family:var(--sans);
  color:#fff;
  font-size:16px;
  text-decoration:none;
}
.contact-row{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}
.copy-btn{
  border-radius:12px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.08);
  color:#fff;
  font-family:var(--mono);
  font-size:12px;
  cursor:pointer;
}
.copy-btn:hover{background:rgba(255,255,255,.14)}
.fine{
  font-family:var(--mono);
  font-size:11px;
  color:rgba(255,255,255,.62);
  margin-top:14px;
}

/* ===== Responsive ===== */
@media (max-width:940px){
  .topbar{inset:12px 12px auto 12px}
  .nav{width:min(520px, calc(100vw - 24px));justify-content:space-between}
  .grid{grid-template-columns:1fr}
  .profile-top{grid-template-columns:1fr}
  .matrix{grid-template-columns:1fr}
  .tile{grid-column:span 12}
  .rec-grid{grid-template-columns:1fr}
  .contact-grid{grid-template-columns:1fr}
}
@media (max-width:520px){
  .mark{border-radius:18px}
  .mark .id{border-right:0;padding-right:0}
  .nav{border-radius:18px}
}


.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;
}

.what-media{
  display:flex;
  justify-content:center;
  margin-bottom:14px;
}

.avatar.avatar-xl{
  width:180px;
  height:180px;
  border-radius:22px;
}

@media (max-width: 720px){
  .avatar.avatar-xl{
    width:150px;
    height:150px;
    border-radius:20px;
  }
}

/* ===== What (photo background) ===== */
.panel.what{
  position:relative;
  overflow:hidden;
  min-height:420px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
}
.panel.what::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(11,14,18,.15) 0%, rgba(11,14,18,.28) 40%, rgba(11,14,18,.38) 100%);
  pointer-events:none;
}
.panel.what .what-media{
  position:absolute;
  inset:0;
  margin:0;
  display:block;
  z-index:0;
}
.panel.what .what-media img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:top center;
  border-radius:0;
  border:0;
  box-shadow:none;
}
.panel.what .tag{
  position:absolute;
  top:18px;
  left:18px;
  z-index:2;
}
.panel.what .what-overlay{
  position:relative;
  z-index:2;
  background:rgba(255,255,255,.40);
  border:1px solid rgba(255,255,255,.38);
  border-radius:18px;
  padding:16px;
  backdrop-filter:blur(10px);
}
.panel.what .body{margin:0 0 12px 0}
.panel.what .cta-row{margin-top:0}
@media (max-width: 720px){
  .panel.what{min-height:360px}
  .panel.what .tag{top:14px;left:14px}
  .panel.what .what-overlay{padding:14px}
}


.badge.linkedin{
  padding:0;
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
}

.li-placeholder{
  display:inline-flex;
  width:24px;
  height:24px;
  align-items:center;
  justify-content:center;
  border-radius:7px;
  font-family:var(--mono);
  font-size:12px;
  letter-spacing:.02em;
  border:1px dashed rgba(11,14,18,.35);
  color:rgba(11,14,18,.65);
}

.mini-badges{
  margin-top:8px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.mini-badge{
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(11,14,18,.12);
  background:rgba(255,255,255,.55);
  color:rgba(11,14,18,.70);
}


/* ===== Fix: Recognitions width & mobile layout ===== */
.rec-grid, .rec-slider, .track-inner, .qcard, .rec-logo, .panel{max-width:100%}
.rec-logo img, .logo-link img{max-width:100%;height:auto}

/* Mobile: keep quotes as a slider that fits the screen */
@media (max-width:940px){
  .rec-slider{padding:16px}
  .arrow{display:none}
  .track-inner{
    display:flex;
    gap:12px;
    overflow-x:auto;
    overflow-y:hidden;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
    touch-action:pan-x;
    padding:0 2px;
  }
  .qcard{
    flex:0 0 100%;
    width:100%;
    scroll-snap-align:start;
  }

  /* Smaller badges (like before) */
  .mini-badges{gap:6px}
  .mini-badge{font-size:10px;padding:5px 9px}
}

/* Layout: one column on mobile, without pushing the page sideways */
@media (max-width: 820px){
  .rec-grid{grid-template-columns:1fr}
}



/* Mobile overflow fix */
html, body {
  width: 100%;
  overflow-x: hidden;
}

.highlight, .featured, .wyróżnienia, .wyroznienia {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.highlight img, .featured img {
  max-width: 100%;
  height: auto;
  display: block;
}
