/* =====================================================
   Agnieszka Walczak — Psychoterapeuta Psychodynamiczny
   Redesign: "The Descent" — cinematic one-page landing
   ===================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Palette — Twilight Ocean (default).
     Variables marked --p-* are runtime-swappable by the
     palette tweak. Everything else is derived from these. */
  --p-sky-1: #fff6dc;
  --p-sky-2: #f6fafd;
  --p-sky-3: #e3ecf3;
  --p-water-1: #c7dae6;
  --p-water-2: #aac4d5;
  --p-water-3: #92b3c8;
  --p-deep-1: #7ea1b8;
  --p-deep-2: #6e93ac;
  --p-deep-3: #5e85a0;
  --p-accent: #c08842;     /* deeper amber for contrast on light bg */
  --p-accent-2: #d9a05c;
  --p-glow: rgba(192, 136, 66, 0.4);
  --p-text: #1a3a52;       /* deep navy, readable on light water */
  --p-text-soft: rgba(26, 58, 82, 0.82);
  --p-text-mute: rgba(26, 58, 82, 0.55);
  --p-text-dark: #0c2638;

  /* Aliases */
  --accent: var(--p-accent);
  --accent-2: var(--p-accent-2);
  --glow: var(--p-glow);
  --text: var(--p-text);
  --text-soft: var(--p-text-soft);
  --text-mute: var(--p-text-mute);

  /* Typography */
  --font-display: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;

  /* Rhythm */
  --section-pad: clamp(3.5rem, 7vw, 6rem);
  --content-max: 1180px;
  --content-narrow: 720px;
  --nav-h: 68px;

  /* Easing */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--p-deep-3);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ---------- Atmospheric layers (fixed, persistent) ---------- */

/* The full descent gradient — airy, light, soft */
.atmos {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, var(--p-sky-1) 0%, transparent 55%),
    linear-gradient(180deg,
      var(--p-water-1) 0%,
      var(--p-water-2) 40%,
      var(--p-water-3) 75%,
      var(--p-deep-1) 100%);
  transition: background 0.8s var(--ease);
}

/* Caustic light — slow drifting refraction patterns */
.caustics {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0;
  display: none;
  mix-blend-mode: screen;
  background:
    radial-gradient(ellipse 700px 220px at 20% 25%, var(--p-accent), transparent 60%),
    radial-gradient(ellipse 600px 200px at 80% 50%, var(--p-accent-2), transparent 55%),
    radial-gradient(ellipse 500px 170px at 40% 75%, var(--p-accent), transparent 60%),
    radial-gradient(ellipse 800px 240px at 70% 15%, var(--p-accent-2), transparent 50%);
  filter: blur(60px);
  animation: caustic-drift 22s ease-in-out infinite alternate;
}

@keyframes caustic-drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-30px, 20px) scale(1.05); }
  100% { transform: translate(40px, -15px) scale(1.1); }
}

/* Light rays slicing down through the water */
.rays {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.rays::before, .rays::after {
  content: "";
  position: absolute;
  top: -10%;
  width: 60vw;
  height: 120vh;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--p-accent) 8%,
    transparent 60%);
  opacity: 0.06;
  filter: blur(40px);
  transform-origin: top center;
}
.rays::before { left: 10%; transform: rotate(-12deg); animation: ray-sway 14s ease-in-out infinite alternate; }
.rays::after  { right: 15%; transform: rotate(8deg);  animation: ray-sway 18s ease-in-out infinite alternate-reverse; }

@keyframes ray-sway {
  from { transform: translateX(0) rotate(-12deg); opacity: 0.04; }
  to   { transform: translateX(40px) rotate(-8deg); opacity: 0.09; }
}

/* Particles — drifting motes / bubbles */
.particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.mote {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
    rgba(255, 255, 255, 0.5),
    rgba(255, 255, 255, 0.08) 60%,
    transparent 80%);
  opacity: 0;
  bottom: -20px;
  left: var(--x, 50%);
  width: var(--s, 6px);
  height: var(--s, 6px);
  animation: mote-rise var(--d, 18s) var(--delay, 0s) linear infinite;
  filter: blur(0.4px);
}

@keyframes mote-rise {
  0%   { transform: translate3d(0, 0, 0) scale(0.6); opacity: 0; }
  10%  { opacity: var(--o, 0.5); }
  90%  { opacity: var(--o, 0.5); }
  100% { transform: translate3d(var(--drift, 30px), -110vh, 0) scale(1); opacity: 0; }
}

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: clamp(3rem, 7vw, 5.6rem); font-weight: 400; font-variation-settings: "opsz" 144; }
h2 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 400; font-variation-settings: "opsz" 100; }
h3 { font-size: clamp(1.3rem, 2vw, 1.55rem); font-weight: 500; line-height: 1.3; font-variation-settings: "opsz" 36; }

p { max-width: 62ch; text-wrap: pretty; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  padding-left: 38px;
  position: relative;
}
.eyebrow::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 28px; height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.section-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.025em;
  margin-bottom: 2.5rem;
  font-variation-settings: "opsz" 144;
}

.lede {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text);
  font-variation-settings: "opsz" 72;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 3rem);
}
.section {
  position: relative;
  padding: var(--section-pad) 0;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  filter: blur(8px);
  transition:
    opacity 1.2s var(--ease),
    transform 1.2s var(--ease),
    filter 1.2s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
  filter: none;
}
.r-d1 { transition-delay: 0.1s; }
.r-d2 { transition-delay: 0.22s; }
.r-d3 { transition-delay: 0.34s; }
.r-d4 { transition-delay: 0.46s; }
.r-d5 { transition-delay: 0.58s; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background 0.5s var(--ease), backdrop-filter 0.5s var(--ease), border-color 0.5s;
  background: rgba(255, 250, 240, 0.45);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(26, 58, 82, 0.06);
  box-shadow: 0 4px 20px rgba(26, 58, 82, 0.06);
}
.nav.scrolled {
  background: rgba(255, 250, 240, 0.72);
  border-bottom-color: rgba(26, 58, 82, 0.08);
  box-shadow: 0 4px 24px rgba(26, 58, 82, 0.08);
}
.nav.scrolled .nav__logo,
.nav.scrolled .nav__link { color: var(--text); }
.nav.scrolled .nav__lang { color: var(--accent); border-color: rgba(26, 58, 82, 0.3); }
.nav__logo, .nav__link { color: #fbf5e7; }
.nav__link { transition: color 0.3s; }
.nav__lang { color: #f4c87a; border-color: rgba(244, 200, 122, 0.5); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 3rem);
}
.nav__logo {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  letter-spacing: 0.005em;
  color: var(--text);
  font-variation-settings: "opsz" 36;
  white-space: nowrap;
}
.nav__logo span { color: var(--accent); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav__link {
  position: relative;
  padding: 0.6rem 1.05rem;
  font-size: 1rem;
  font-size: 0.86rem;
  font-weight: 400;
  color: var(--text-soft);
  letter-spacing: 0.02em;
  transition: color 0.3s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 4px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.4s var(--ease), left 0.4s var(--ease);
}
.nav__link:hover, .nav__link.active { color: var(--text); }
.nav__link.active::after { width: 16px; left: calc(50% - 8px); }

.nav__lang {
  margin-left: 0.75rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--accent);
  border: 1px solid rgba(240, 201, 135, 0.35);
  border-radius: 2px;
  transition: background 0.3s, color 0.3s;
}
.nav__lang:hover { background: var(--accent); color: var(--p-deep-2); }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 101;
}
.nav__hamburger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--text);
  transition: transform 0.4s var(--ease), opacity 0.3s;
}
.nav__hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-overlay {
  position: fixed; inset: 0;
  background: rgba(26, 58, 82, 0.28);
  backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.nav-overlay.open { opacity: 1; pointer-events: auto; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--nav-h) + 0.75rem);
  padding-bottom: 2rem;
  overflow: hidden;
  isolation: isolate;
}

/* Hero photo handled by .hero__photo div below */
.hero::before {
  content: none;
}
.hero::after {
  content: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 1640px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
  z-index: 2;
}

.hero__intro {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 0.5rem;
}

.hero__name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(3.4rem, 9.5vw, 7.5rem);
  letter-spacing: -0.04em;
  line-height: 0.92;
  color: #fbf5e7;
  font-variation-settings: "opsz" 144;
  margin-bottom: 0.7rem;
  text-shadow:
    0 2px 8px rgba(0, 10, 25, 0.6),
    0 8px 30px rgba(0, 10, 25, 0.5),
    0 18px 60px rgba(0, 10, 25, 0.4),
    0 0 80px rgba(244, 200, 122, 0.18);
}

.hero__role {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.25vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: #b9802f;
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  text-shadow: 0 1px 2px rgba(0, 20, 40, 0.25);
}
.hero__role::before, .hero__role::after {
  content: "";
  width: 36px; height: 1px;
  background: #f4c87a;
  opacity: 0.7;
  box-shadow: 0 0 8px rgba(244, 200, 122, 0.6);
}
.hero__role::before, .hero__role::after {
  content: "";
  width: 36px; height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

.hero__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #fbf5e7;
  max-width: 28ch;
  margin: 0 auto 0;
  font-variation-settings: "opsz" 100;
  text-wrap: balance;
  text-shadow: 0 2px 16px rgba(0, 10, 25, 0.7), 0 6px 32px rgba(0, 10, 25, 0.4);
}

.hero__lede {
  max-width: 56ch;
  margin: 1.5rem auto 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-soft);
}

/* Iceberg layout — BIG, dominant on desktop */
.iceberg-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(560px, 920px) minmax(200px, 1fr);
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

/* Side panels — refined, more "etched into the air" */
.iceberg-aside {
  position: relative;
  padding: 0 0 0 1.5rem;
  border-left: 1px solid rgba(243, 238, 229, 0.18);
  text-align: left;
}
.iceberg-aside--right { border-left: none; border-right: 1px solid rgba(240, 201, 135, 0.22); padding: 0 1.5rem 0 0; text-align: right; }

.iceberg-aside__eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 0.5rem;
}
.iceberg-aside--right .iceberg-aside__eyebrow { color: var(--accent); opacity: 0.85; }

.iceberg-aside__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 1.1rem;
  font-variation-settings: "opsz" 72;
}

.iceberg-aside ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.iceberg-aside li {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-soft);
  font-weight: 400;
}
.iceberg-aside--right li { padding-right: 0.5rem; position: relative; }
.iceberg-aside--right li::after {
  content: "";
  position: absolute;
  right: -1.5rem; top: 0.55em;
  width: 6px; height: 1px;
  background: var(--accent);
  opacity: 0.5;
}
.iceberg-aside--left li { padding-left: 0.5rem; position: relative; }
.iceberg-aside--left li::before {
  content: "";
  position: absolute;
  left: -1.5rem; top: 0.55em;
  width: 6px; height: 1px;
  background: rgba(243, 238, 229, 0.4);
}
.iceberg-aside__more { font-style: italic; opacity: 0.55; }

/* Iceberg SVG — BIG, with scroll-linked camera + gentle float.
   --cam-y, --cam-scale, --cam-x are set by JS on scroll. */
.iceberg-wrap {
  position: relative;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  --cam-y: 0px;
  --cam-scale: 1;
  --cam-x: 0px;
}
.iceberg-stage {
  width: 100%;
  height: auto;
  transform-origin: 50% 45%;
  transform: translate3d(var(--cam-x, 0), var(--cam-y, 0), 0) scale(var(--cam-scale, 1));
  will-change: transform;
  /* Decoupled from animation: container handles scroll camera, child handles float */
}
.iceberg-svg {
  width: 100%;
  height: auto;
  filter:
    drop-shadow(0 30px 50px rgba(0, 10, 25, 0.55))
    drop-shadow(0 10px 24px rgba(50, 100, 140, 0.25))
    drop-shadow(0 4px 12px rgba(255, 220, 170, 0.08));
  animation: iceberg-float 14s ease-in-out infinite alternate;
}
@keyframes iceberg-float {
  0%   { transform: translateY(0) rotate(-0.3deg); }
  100% { transform: translateY(-10px) rotate(0.4deg); }
}

/* Soft halo behind iceberg — warmer, brighter */
.iceberg-wrap::before {
  content: "";
  position: absolute;
  inset: -15% -20%;
  background:
    radial-gradient(ellipse 55% 30% at 50% 28%, var(--p-accent), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 65%, rgba(255,255,255,0.12), transparent 75%);
  opacity: 0.45;
  filter: blur(40px);
  z-index: -1;
  animation: halo-pulse 8s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes halo-pulse {
  0%   { opacity: 0.35; transform: scale(0.97); }
  100% { opacity: 0.55; transform: scale(1.05); }
}

/* Waterline glow */
.iceberg-svg .waterline { animation: waterline-pulse 4s ease-in-out infinite; }
@keyframes waterline-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

/* CTA */
.hero__cta-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 2rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 2px;
  cursor: pointer;
  transition:
    background 0.4s var(--ease),
    color 0.4s var(--ease),
    transform 0.3s var(--ease),
    box-shadow 0.4s var(--ease);
}
.btn--primary {
  background: #f4c87a;
  color: #1a1208;
  box-shadow: 0 8px 30px rgba(244, 200, 122, 0.4), 0 0 0 1px rgba(244, 200, 122, 0.2);
}
.btn--primary:hover {
  background: #ffd9a8;
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(244, 200, 122, 0.55);
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fbf5e7;
  border: 1px solid rgba(251, 245, 231, 0.4);
  backdrop-filter: blur(4px);
}
.btn--ghost:hover {
  border-color: #f4c87a;
  color: #f4c87a;
  background: rgba(255,255,255,0.05);
}
.btn svg { width: 14px; height: 14px; transition: transform 0.3s; }
.btn:hover svg { transform: translateX(4px); }

/* Scroll hint */
.scroll-hint {
  display: none;
}
.scroll-hint__line { display: none; }
/* Hero water motif */
.hero--centered {
  display: grid;
  place-items: center;
  text-align: center;
}
.hero--centered .hero__intro {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.hero__water {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero__photo {
  position: absolute;
  inset: 0;
  background-image: url("https://images.unsplash.com/photo-1518837695005-2083093ee35b?q=80&w=2940&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero__photo::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 25%;
  background: linear-gradient(180deg, transparent 0%, var(--p-water-1) 100%);
  pointer-events: none;
}
.ripple-svg {
  width: 100%;
  height: 100%;
}
.ripple {
  opacity: 0;
  transform-origin: center;
  animation: ripple-expand 7s linear infinite;
}
.ripple.r1 { animation-delay: 0s; }
.ripple.r2 { animation-delay: 1.4s; }
.ripple.r3 { animation-delay: 2.8s; }
.ripple.r4 { animation-delay: 4.2s; }
.ripple.r5 { animation-delay: 5.6s; }
@keyframes ripple-expand {
  0%   { transform: scale(0.6); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: scale(18); opacity: 0; }
}
.hero__inner--centered { padding-top: 0; padding-bottom: 0; }

/* Solo about (no sidebar) */
.about__text--solo { max-width: 720px; }
.scroll-hint--legacy {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-mute);
  pointer-events: none;
  z-index: 3;
}
.scroll-hint__line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, transparent, var(--accent));
  animation: line-pulse 2s ease-in-out infinite;
}
@keyframes line-pulse {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0.3; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0.3; }
}

/* ---------- Section header pattern ---------- */
.section-head {
  margin-bottom: 2.5rem;
  max-width: var(--content-narrow);
}

/* ---------- Section: O mnie / About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about__text p { margin-bottom: 1.4rem; }
.about__text p:last-child { margin-bottom: 0; }
.about__text .lede { margin-bottom: 2rem; }

.about__sidehead {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  margin: 2.5rem 0 1rem;
  color: var(--text);
  font-variation-settings: "opsz" 72;
}

/* Stat panel */
.stats {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: rgba(243, 238, 229, 0.12);
  border: 1px solid rgba(243, 238, 229, 0.1);
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}
.stat {
  padding: 2rem 1.75rem;
  background: rgba(6, 22, 38, 0.55);
  backdrop-filter: blur(8px);
}
.stat__num {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.8rem, 5vw, 3.6rem);
  line-height: 1;
  color: var(--accent);
  font-variation-settings: "opsz" 144;
  margin-bottom: 0.4rem;
}
.stat__label {
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* ---------- Divider — subtle centered hairline with an accent mark */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  width: min(420px, 80%);
  margin: 1rem auto;
  pointer-events: none;
}
.divider__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(26, 58, 82, 0.28));
}
.divider__line:last-child {
  background: linear-gradient(90deg, rgba(26, 58, 82, 0.28), transparent);
}
.divider__mark {
  flex: none;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(192, 136, 66, 0.12);
}

/* ---------- Section: Podejście / Approach ---------- */
.approach__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 880px;
}
.approach__intro p { font-size: 1.1rem; line-height: 1.8; color: var(--text-soft); margin-bottom: 1.5rem; }

.approach__pull {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--text);
  padding: 2.5rem 0 2.5rem 2rem;
  border-left: 2px solid var(--accent);
  margin: 1rem 0;
  position: relative;
  font-variation-settings: "opsz" 100;
  max-width: 720px;
}
.approach__pull::before {
  content: "\201C";
  position: absolute;
  left: -0.05em; top: -1.5rem;
  font-size: 6rem;
  font-weight: 400;
  color: var(--accent);
  opacity: 0.25;
  line-height: 1;
  font-family: var(--font-display);
}

.approach__points {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 1rem;
}
.approach__point h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  margin-bottom: 0.85rem;
  color: var(--text);
  font-variation-settings: "opsz" 72;
}
.approach__point p { color: var(--text-soft); font-size: 1rem; line-height: 1.75; }

/* ---------- Section: Doświadczenie / Experience ---------- */
.timeline {
  position: relative;
  padding-left: 2.5rem;
  max-width: 880px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg,
    rgba(240, 201, 135, 0.5) 0%,
    rgba(240, 201, 135, 0.15) 100%);
}
.tl-item {
  position: relative;
  margin-bottom: 2.6rem;
  padding-left: 1.5rem;
}
.tl-item:last-child { margin-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -2.5rem; top: 8px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--p-deep-2);
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(240, 201, 135, 0.12);
  transition: background 0.3s, box-shadow 0.3s;
}
.tl-item:hover::before {
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(240, 201, 135, 0.18);
}
.tl-date {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.tl-role {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 0.3rem;
  font-variation-settings: "opsz" 72;
}
.tl-place {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.55;
}
.tl-desc {
  font-size: 0.88rem;
  color: var(--text-mute);
  line-height: 1.65;
  margin-top: 0.5rem;
}

/* ---------- Section: Wykształcenie / Education ---------- */
.edu-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 880px;
  margin-bottom: 4rem;
}
.edu-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 2rem;
  padding: 1.4rem 0;
  border-top: 1px solid rgba(243, 238, 229, 0.1);
  align-items: baseline;
  transition: border-color 0.4s;
}
.edu-item:first-child { border-top-color: rgba(240, 201, 135, 0.3); }
.edu-item:hover { border-top-color: var(--accent); }
.edu-year {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--accent);
  font-variation-settings: "opsz" 36;
}
.edu-title { font-size: 1.05rem; color: var(--text); margin-bottom: 0.2rem; font-weight: 500; }
.edu-place { font-size: 0.92rem; color: var(--text-soft); line-height: 1.55; }

/* Conferences / certifications — pebble row */
.conferences__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: var(--text);
  font-variation-settings: "opsz" 72;
}
.conf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  max-width: 880px;
}
.conf-tag {
  padding: 0.55rem 1.1rem;
  background: rgba(243, 238, 229, 0.04);
  border: 1px solid rgba(243, 238, 229, 0.12);
  border-radius: 100px;
  font-size: 0.82rem;
  color: var(--text-soft);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.conf-tag:hover { border-color: var(--accent); color: var(--text); background: rgba(240, 201, 135, 0.06); }

/* ---------- Section: Kontakt / Contact ---------- */
.contact {
  padding-bottom: calc(var(--section-pad) + 3rem);
}
.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: start;
}
.contact__intro {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 3rem;
  max-width: 18ch;
  font-variation-settings: "opsz" 100;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.contact__row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(243, 238, 229, 0.08);
}
.contact__row:last-child { border-bottom: none; padding-bottom: 0; }
.contact__icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border: 1px solid rgba(240, 201, 135, 0.3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  transition: background 0.3s, color 0.3s;
}
.contact__row:hover .contact__icon { background: var(--accent); color: var(--p-deep-2); }
.contact__icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.contact__label {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 0.3rem;
}
.contact__value { font-size: 1rem; color: var(--text); line-height: 1.55; }
.contact__value a { transition: color 0.3s; }
.contact__value a:hover { color: var(--accent); }
.contact__location { margin-top: 0.6rem; }
.contact__location:first-child { margin-top: 0; }
.contact__location strong {
  display: block;
  color: var(--accent);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.15rem;
  margin-bottom: 0.15rem;
  font-variation-settings: "opsz" 36;
}
.contact__location-note { font-size: 0.85rem; color: var(--text-mute); display: block; margin-top: 0.2rem; }

/* Form */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(26, 58, 82, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field label {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.field input, .field textarea {
  padding: 0.85rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(26, 58, 82, 0.22);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}
.field input:focus, .field textarea:focus { border-bottom-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-mute); }
.field textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

/* ---------- Footer ---------- */
.footer {
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-mute);
  letter-spacing: 0.04em;
  border-top: 1px solid rgba(243, 238, 229, 0.06);
}
.footer__inner { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.footer a { color: var(--text-soft); transition: color 0.3s; }
.footer a:hover { color: var(--accent); }

/* ---------- Tweaks panel ---------- */
.tweaks-toggle {
  position: fixed;
  right: 1.5rem; bottom: 1.5rem;
  z-index: 200;
  width: 48px; height: 48px;
  background: rgba(255, 250, 240, 0.9);
  border: 1px solid rgba(192, 136, 66, 0.45);
  box-shadow: 0 6px 20px rgba(26, 58, 82, 0.14);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  color: var(--accent);
  display: grid;
  place-items: center;
  transition: transform 0.3s, background 0.3s;
}
.tweaks-toggle:hover { transform: rotate(45deg); background: var(--accent); color: var(--p-deep-2); }
.tweaks-toggle svg { width: 20px; height: 20px; }

.tweaks-panel {
  position: fixed;
  right: 1.5rem; bottom: 5rem;
  z-index: 200;
  width: 280px;
  background: rgba(255, 250, 240, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(26, 58, 82, 0.12);
  box-shadow: 0 12px 40px rgba(26, 58, 82, 0.16);
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.tweaks-panel.open { opacity: 1; pointer-events: auto; transform: none; }
.tweaks-panel__title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.tweaks-panel__sub {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 1.25rem;
}
.palette-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.palette-swatch {
  position: relative;
  padding: 0.85rem 0.85rem 0.85rem 2.4rem;
  background: rgba(26, 58, 82, 0.04);
  border: 1px solid rgba(26, 58, 82, 0.14);
  border-radius: 2px;
  text-align: left;
  font-size: 0.78rem;
  color: var(--text-soft);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.palette-swatch:hover { border-color: var(--accent); color: var(--text); }
.palette-swatch.active { border-color: var(--accent); color: var(--text); background: rgba(192, 136, 66, 0.1); }
.palette-swatch::before {
  content: "";
  position: absolute;
  left: 0.7rem; top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sw1, #4a7d9b) 0%, var(--sw1, #4a7d9b) 50%, var(--sw2, #f0c987) 50%, var(--sw2, #f0c987) 100%);
  border: 1px solid rgba(26, 58, 82, 0.18);
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .nav__logo { font-size: 1rem; }
  .nav__link { font-size: 0.88rem; padding: 0.45rem 0.6rem; white-space: nowrap; }
}
@media (max-width: 1100px) {
  .iceberg-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .iceberg-aside, .iceberg-aside--right {
    text-align: left;
    border-left: 1px solid rgba(240, 201, 135, 0.2);
    border-right: none;
    padding: 0 0 0 1.5rem;
  }
  .iceberg-aside--right li { padding-right: 0; padding-left: 0.5rem; }
  .iceberg-aside--right li::after { display: none; }
  .iceberg-aside--right li::before {
    content: "";
    position: absolute;
    left: -1.5rem; top: 0.55em;
    width: 6px; height: 1px;
    background: var(--accent);
    opacity: 0.6;
  }
  .iceberg-wrap { max-width: 480px; order: -1; }
  .about__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .stats { flex-direction: row; position: static; }
  .stat { flex: 1; }
  .contact__grid { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 700px) {
  :root { --nav-h: 60px; }
  .nav__hamburger { display: flex; }
  .nav__links {
    position: fixed;
    top: 0; right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 5rem 2rem 2rem;
    gap: 1rem;
    background: rgba(255, 250, 240, 0.97);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(26, 58, 82, 0.08);
    box-shadow: -8px 0 30px rgba(26, 58, 82, 0.12);
    transition: right 0.5s var(--ease);
  }
  .nav__links.open { right: 0; }
  .nav__link { font-size: 1.1rem; padding: 0.6rem 0; }
  .nav__lang { margin-left: 0; margin-top: 1rem; }

  .hero__name { font-size: clamp(2.6rem, 12vw, 3.6rem); }
  .hero__role { font-size: 0.7rem; letter-spacing: 0.32em; gap: 0.7rem; margin-bottom: 2rem; }
  .hero__role::before, .hero__role::after { width: 18px; }
  .iceberg-wrap { max-width: 280px; }

  .edu-item { grid-template-columns: 1fr; gap: 0.4rem; }
  .timeline { padding-left: 1.75rem; }
  .tl-item::before { left: -1.75rem; }

  .contact__form { padding: 1.75rem; }
  .approach__pull { padding-left: 1.5rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .approach__pull::before { font-size: 4rem; top: -0.5rem; }

  .tweaks-panel { right: 1rem; left: 1rem; bottom: 5rem; width: auto; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; filter: none; }
  .mote, .caustics, .rays { display: none; }
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
