:root{
  --bg:#0b0b0d;
  --card: rgba(255,255,255,.06);
  --muted: rgba(255,255,255,.72);
  --line: rgba(255,255,255,.14);
  --shadow: 0 24px 80px rgba(0,0,0,.55);
  --gold:#d6b36a;
  --gold-soft:#f2d999;
  --gold-dark:#9c7c32;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  background: var(--bg); /* tło robi bgFX */
  color:white;
}

.container{
  max-width:1100px;
  margin:0 auto;
  padding:0 18px;
}

a{ color:inherit; }

/* =============================== BG FX – animowane tło WOW =============================== */
.bgFX{
  position: fixed;
  inset: 0;
  z-index: 0; /* ważne: nie -1 */
  pointer-events: none;
  overflow: hidden;
  background: #0b0b0d;
}

.bgFX__blob{
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 999px;
  filter: blur(70px);
  opacity: .22;
  will-change: transform;
  mix-blend-mode: screen;
}

.bgFX__blob--a{
  left:-15vmax;
  top:-10vmax;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.18), rgba(255,220,170,.08), transparent 62%);
  animation: blobA 18s ease-in-out infinite;
}

.bgFX__blob--b{
background: radial-gradient(circle at 40% 40%,
rgba(214,179,106,.18),
rgba(255,255,255,.06),
transparent 64%);
}

.bgFX__blob--c{
  left:10vmax;
  bottom:-22vmax;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.12), rgba(255,220,170,.05), transparent 66%);
  animation: blobC 26s ease-in-out infinite;
}

@keyframes blobA{
  0%,100%{transform:translate(0,0) scale(1)}
  50%{transform:translate(10vmax,6vmax) scale(1.05)}
}
@keyframes blobB{
  0%,100%{transform:translate(0,0) scale(1)}
  50%{transform:translate(-12vmax,8vmax) scale(1.07)}
}
@keyframes blobC{
  0%,100%{transform:translate(0,0) scale(1)}
  50%{transform:translate(8vmax,-10vmax) scale(1.06)}
}

.bgFX__grain{
  position:absolute;
  inset:-20%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  opacity: .08;
  mix-blend-mode: overlay;
  animation: grainMove 9s steps(10) infinite;
}

@keyframes grainMove{
  0%{ transform: translate(0,0); }
  25%{ transform: translate(-2%, 1%); }
  50%{ transform: translate(2%, -2%); }
  75%{ transform: translate(-1%, 2%); }
  100%{ transform: translate(0,0); }
}

@media (prefers-reduced-motion: reduce){
  .bgFX__blob, .bgFX__grain{ animation:none !important; }
}

/* Wszystko na stronie nad tłem */
.nav, .hero, .section, .footer{ position: relative; z-index: 1; }

/* =============================== NAV =============================== */
.nav{
  position: sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(10px);
  background: rgba(0,0,0,.35);
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.nav__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 0;
  position: relative;
}

.brand{
  display:flex;
  align-items:center;
  text-decoration:none;
}

.brand__name{
  font-family: "MonteCarlo", cursive;
  font-size: 28px;
  line-height: 1;
  white-space: nowrap;
  background: linear-gradient(120deg,var(--gold-soft),var(--gold),var(--gold-dark));
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
}


.nav__links{
  display:flex;
  gap:10px;
  align-items:center;
}

.nav__btn{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:white;
  padding:9px 12px;
  border-radius:999px;
  cursor:pointer;
  text-decoration:none;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  font-size:14px;
  transition:.15s;
}

.nav__btn:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.22);
}

/* Burger – jedna, czysta wersja */
.burger{
  display:none;
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.25);
  cursor:pointer;
  padding:0;
  position:relative;
}

.burger::before{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:20px;
  height:2px;
  transform: translate(-50%,-50%);
  background: rgba(255,255,255,.95);
  border-radius:999px;
  box-shadow: 0 -6px 0 rgba(255,255,255,.95), 0 6px 0 rgba(255,255,255,.95);
}

.burger:focus{ outline:none; }

.burger:focus-visible{
  outline: 2px solid rgba(255,255,255,.35);
  outline-offset: 2px;
}

/* =============================== HERO =============================== */
.hero{
  position:relative;
  min-height:100vh;
  display:flex;
  align-items:center;
  padding:30px 0;
}

.hero__overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(to bottom, rgba(0,0,0,.10), rgba(0,0,0,.55));
  pointer-events:none;
}

.hero__content{
  position:relative;
  z-index:1;
  width:100%;
}

.heroGrid{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:28px;
  align-items:center;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color: rgba(255,255,255,.80);
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  padding:10px 12px;
  border-radius:999px;
  margin-bottom:18px;
}

h1{
  font-size:56px;
  margin:0 0 10px;
  letter-spacing:.5px;
}

.subtitle{
  font-size:20px;
  color: rgba(255,255,255,.88);
  margin:0 0 14px;
}

.lead{
  color: rgba(255,255,255,.82);
  font-size:16px;
  line-height:1.6;
  margin:0 0 20px;
  max-width:52ch;
}

.heroActions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.scrollHint{
  margin-top:22px;
  display:inline-flex;
  gap:10px;
  align-items:center;
  color: rgba(255,255,255,.70);
  font-size:14px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

.arrow{
  display:inline-block;
  animation:bounce 1.3s infinite;
}

@keyframes bounce{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(6px)}
}

/* Buttons */
.btn{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:white;
  padding:12px 16px;
  border-radius:14px;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  user-select:none;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

.btn:hover{
  transform:translateY(-1px);
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.10);
}

.btn--primary{
  background: linear-gradient(135deg,var(--gold-soft),var(--gold));
  color:#1a1a1a;
  border-color:var(--gold);
}

.btn--primary:hover{
  background: linear-gradient(135deg,var(--gold),var(--gold-dark));
}

.btn--ghost{ background: rgba(255,255,255,.08); }

/* Portrait */
.heroRight{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
}

.portraitFrame{
  position:relative;
  width:min(420px, 90vw);
  aspect-ratio: 3 / 4;
  border-radius:26px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
}

.portraitFrame img{
  width:100%;
  height:100%;
  object-fit:cover;
  transform: scale(1.03);
  filter: contrast(1.05) saturate(1.04);
  opacity:1;
  transition: opacity .55s ease, transform .9s ease, filter .9s ease;
  will-change: opacity, transform, filter;
}

/* animacja zmiany portretu */
.portraitFrame img.is-fading{
  opacity: 0;
  transform: scale(1.08);
  filter: blur(2px) saturate(1.15) contrast(1.05);
}

.portraitFrame img.is-in{
  opacity: 1;
  transform: scale(1.03);
  filter: saturate(1.08) contrast(1.06);
}

.portraitGlow{
  position:absolute;
  inset:-30px;
background:
  radial-gradient(circle at 30% 25%, rgba(255,255,255,.22), transparent 55%),
  radial-gradient(circle at 75% 75%, rgba(214,179,106,.25), transparent 60%);
  pointer-events:none;
  mix-blend-mode: screen;
}

/* Sections */
.section{ padding:78px 0; }

.section--alt{
  background: rgba(255,255,255,.03);
  border-top:1px solid rgba(255,255,255,.10);
  border-bottom:1px solid rgba(255,255,255,.10);
}

h2{
  font-size:36px;
  margin:0 0 10px;
}

.muted{
  color: var(--muted);
  margin:0 0 20px;
}

.sectionHead{ margin-bottom: 8px; }

/* Tabs */
.tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:18px 0 26px;
}

.tab{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:white;
  padding:10px 14px;
  border-radius:999px;
  cursor:pointer;
  transition:.15s;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

.tab:hover{ background: rgba(255,255,255,.10); }

.tab.active{
  background:white;
  color:black;
  border-color:white;
}

/* Works grid */
.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:16px;
}

.cardWork{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius:18px;
  overflow:hidden;
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  min-height: 260px;
}

.cardWork img{
  width:100%;
  height:160px;
  object-fit:cover;
}

.cardWork .body{ padding:14px; }

.cardWork .title{
  font-weight:700;
  font-size:18px;
  margin:0 0 6px;
}

.cardWork .meta{
  color: rgba(255,255,255,.70);
  font-size:13px;
  margin:0 0 10px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

.cardWork .desc{
  color: rgba(255,255,255,.86);
  font-size:14px;
  margin:0 0 12px;
  line-height:1.35;
}

.cardWork .actions{
  margin-top:auto;
  padding:0 14px 14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.smallBtn{
  padding:9px 12px;
  border-radius:12px;
  font-size:14px;
}

/* About */
.twoCol{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:18px;
  align-items:start;
}

.chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}

.chip{
  border:1px solid var(--gold);
  background: rgba(214,179,106,.12);
  color: var(--gold-soft);
}

.aboutCard{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  overflow:hidden;
  box-shadow: var(--shadow);
}

.aboutPhoto{
  width:100%;
  height:260px;
  object-fit:cover;
}

.aboutCard__body{
  padding:14px;
  text-align:center;
}

.aboutCard__title{
  font-size:22px;
  margin-bottom:8px;
  font-weight:700;
}

.aboutCard__text{
  margin-bottom:14px;
  color: rgba(255,255,255,.82);
  line-height:1.45;
}

.aboutCard__body .btn{ margin:0 auto; }

/* Kontakt */
#contact .container{
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 24px;
  border-radius: 24px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}

#contact h2{
  font-family: "MonteCarlo", cursive;
  font-size: 42px;
  margin-bottom: 14px;
}

#contact h2::after{
  content:"";
  display:block;
  width:80px;
  height:1px;
  margin:12px auto 18px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,.6), transparent);
}

/* Email popup */
.hidden{ display:none !important; }

.emailReveal{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.66);
  backdrop-filter: blur(8px);
  z-index:999;
}

.emailBox{
  width: min(560px, calc(100% - 34px));
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
  border:1px solid rgba(255,255,255,.22);
  border-radius:22px;
  padding:16px;
  box-shadow: var(--shadow);
  transform-origin:center;
  animation: pop .22s ease-out;
}

@keyframes pop{
  from{ transform: scale(.92); opacity:.2; }
  to{ transform: scale(1); opacity:1; }
}

.emailBox__top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}

.emailBox__title{
  font-size:14px;
  color: rgba(255,255,255,.75);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

.xBtn{
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color:white;
  border-radius:12px;
  padding:6px 10px;
  cursor:pointer;
}

.xBtn:hover{ background: rgba(255,255,255,.10); }

.emailValue{
  font-size:22px;
  font-weight:700;
  letter-spacing:.2px;
  padding:12px 14px;
  border-radius:16px;
  background: rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.18);
  word-break: break-word;
}

.emailActions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:12px;
  flex-wrap:wrap;
}

.tiny{
  margin-top:8px;
  color: rgba(255,255,255,.72);
  font-size:13px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

/* Footer */
.footer{
  padding:22px 0;
  border-top:1px solid rgba(255,255,255,.10);
  color:rgba(255,255,255,.65);
  text-align:center;
  background: rgba(0,0,0,.15);
}

/* =============================== RWD =============================== */
@media (max-width: 980px){
  h1{ font-size:46px; }
  .grid{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px){
  .container{ padding: 0 16px; }
  .section{ padding: 56px 0; }
  .hero{ min-height:auto; padding:26px 0 40px; }
  .heroGrid{ grid-template-columns: 1fr; gap: 18px; }
  .heroRight{ order: -1; }
  .lead{ max-width: none; font-size: 15px; }
  h1{ font-size: 40px; line-height: 1.05; }
  .subtitle{ font-size: 18px; }
  .heroActions{ justify-content: center; }

  .burger{ display:block; }
  .brand__name{ font-size: 22px; letter-spacing: .35px; }

  .nav__links{
    position:absolute;
    left: 14px;
    right: 14px;
    top: 62px;
    display:none;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(10,10,12,.92);
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 30px 90px rgba(0,0,0,.6);
    backdrop-filter: blur(12px);
  }

  .nav__links.open{ display:flex; }

  .nav__links .nav__btn{
    width: 100%;
    display:flex;
    justify-content:center;
    text-align:center;
    padding: 14px 14px;
    font-size: 15px;
  }

  .twoCol{ grid-template-columns: 1fr; }
  .chips{ justify-content:center; }
  .cardWork .actions{ justify-content:center; }
}

@media (max-width: 560px){
  h1{ font-size: 34px; }
  h2{ font-size: 30px; }

  .grid{ grid-template-columns: 1fr; gap: 14px; }

  .cardWork img{ height: 150px; }

  .tabs{
    flex-wrap: nowrap;
    overflow-x:auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }

  .tab{
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .aboutPhoto{ height: 220px; }

  #contact h2{ font-size: 38px; }
  .emailActions{ justify-content:center; }
}

@media (max-width: 360px){
  h1{ font-size: 30px; }
  #contact h2{ font-size: 34px; }
}