/* ============== Theme tokens ============== */
:root {
  --max: 1280px;
  --pad: 32px;

  /* Forest (default dark) */
  --bg: oklch(0.135 0.018 165);
  --bg-2: oklch(0.180 0.025 165);
  --bg-3: oklch(0.225 0.028 165);
  --line: oklch(0.32 0.02 165);
  --text: oklch(0.945 0.012 95);
  --text-mute: oklch(0.70 0.018 100);
  --text-soft: oklch(0.55 0.015 100);
  --accent: oklch(0.78 0.10 160);
  --accent-deep: oklch(0.45 0.08 165);
  --on-accent: oklch(0.18 0.02 165);
}

/* Onyx — black + warm cream */
[data-palette="onyx"] {
  --bg: oklch(0.105 0.005 60);
  --bg-2: oklch(0.155 0.008 60);
  --bg-3: oklch(0.205 0.010 60);
  --line: oklch(0.32 0.012 60);
  --text: oklch(0.955 0.018 85);
  --text-mute: oklch(0.72 0.020 85);
  --text-soft: oklch(0.55 0.012 70);
  --accent: oklch(0.82 0.06 80);
  --accent-deep: oklch(0.55 0.05 75);
  --on-accent: oklch(0.10 0.005 60);
}

/* Navy — deep blue + cream */
[data-palette="navy"] {
  --bg: oklch(0.140 0.040 255);
  --bg-2: oklch(0.190 0.050 255);
  --bg-3: oklch(0.235 0.055 255);
  --line: oklch(0.34 0.040 255);
  --text: oklch(0.945 0.013 90);
  --text-mute: oklch(0.72 0.022 240);
  --text-soft: oklch(0.55 0.020 240);
  --accent: oklch(0.78 0.10 250);
  --accent-deep: oklch(0.50 0.10 255);
  --on-accent: oklch(0.12 0.025 255);
}

/* Light mode overrides */
[data-mode="light"] {
  --bg: oklch(0.97 0.008 95);
  --bg-2: oklch(0.93 0.012 95);
  --bg-3: oklch(0.89 0.014 95);
  --line: oklch(0.82 0.012 95);
  --text: oklch(0.18 0.012 165);
  --text-mute: oklch(0.42 0.012 165);
  --text-soft: oklch(0.55 0.010 165);
  --accent: oklch(0.42 0.08 165);
  --accent-deep: oklch(0.30 0.06 165);
  --on-accent: oklch(0.97 0.008 95);
}
[data-mode="light"][data-palette="onyx"] {
  --bg: oklch(0.965 0.012 80);
  --bg-2: oklch(0.92 0.015 80);
  --bg-3: oklch(0.88 0.016 80);
  --line: oklch(0.80 0.014 75);
  --text: oklch(0.16 0.010 60);
  --text-mute: oklch(0.42 0.010 60);
  --text-soft: oklch(0.55 0.008 60);
  --accent: oklch(0.32 0.04 60);
  --accent-deep: oklch(0.20 0.020 60);
  --on-accent: oklch(0.965 0.012 80);
}
[data-mode="light"][data-palette="navy"] {
  --bg: oklch(0.965 0.010 90);
  --bg-2: oklch(0.92 0.013 90);
  --bg-3: oklch(0.88 0.014 90);
  --line: oklch(0.80 0.014 240);
  --text: oklch(0.18 0.022 255);
  --text-mute: oklch(0.42 0.020 255);
  --text-soft: oklch(0.55 0.018 255);
  --accent: oklch(0.40 0.10 255);
  --accent-deep: oklch(0.28 0.08 255);
  --on-accent: oklch(0.965 0.010 90);
}

/* ============== Base ============== */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  transition: background 0.4s ease, color 0.4s ease;
}
body {
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.serif {
  font-family: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
  font-feature-settings: "liga", "dlig";
}
.mono {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ============== Layout ============== */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}
section {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}
section:first-of-type { border-top: 0; }

.kicker {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 500;
}
.kicker .num {
  color: var(--accent);
  margin-right: 14px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
  color: var(--text-mute);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
}

h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -0.02em; }
h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  margin-bottom: 16px;
}
.section-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-bottom: 64px;
  align-items: end;
}
.section-intro p {
  color: var(--text-mute);
  font-size: 17px;
  line-height: 1.6;
  max-width: 48ch;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* ============== Nav ============== */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid color-mix(in oklch, var(--line) 50%, transparent);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.brand-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  transform: translateY(-3px);
}
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
  font-size: 13px;
  color: var(--text-mute);
}
.nav-links a {
  position: relative;
  padding: 8px 0;
  transition: color .25s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  font-size: 13px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  transition: all .25s ease;
}
.nav-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
@media (max-width: 800px) {
  .nav-links { display: none; }
}

/* ============== Hero ============== */
.hero {
  padding: 80px 0 120px;
  border-top: 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-roles {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 28px;
}
.hero-roles span {
  display: inline-flex; align-items: center; gap: 12px;
}
.hero-roles span:not(:last-child)::after {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.hero h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(44px, 6.4vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--text);
}
.hero h1 em {
  color: var(--accent);
  font-style: italic;
  font-feature-settings: "dlig", "liga";
}
.hero-sub {
  margin-top: 32px;
  max-width: 50ch;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-mute);
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.hero-cta {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 44px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all .3s ease;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.btn-ghost:hover {
  border-color: var(--text-mute);
  color: var(--text);
}
.btn .arrow {
  display: inline-block;
  transition: transform .3s ease;
}
.btn:hover .arrow { transform: translateX(4px); }

.hero-meta {
  margin-top: 56px;
  display: flex;
  gap: 48px;
  font-size: 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  flex-wrap: wrap;
}
.hero-meta-item .label { display: block; margin-bottom: 6px; opacity: 0.7; }
.hero-meta-item .val { color: var(--text); font-size: 13px; letter-spacing: 0.06em; }

.portrait {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 60px 100px -40px rgba(0,0,0,0.6);
}
.portrait img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.95) contrast(1.02);
}
.portrait::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, color-mix(in oklch, var(--bg) 65%, transparent));
  pointer-events: none;
}
.portrait-frame {
  position: relative;
}
.portrait-frame::before {
  content: "";
  position: absolute;
  inset: -16px -16px auto auto;
  width: 80px; height: 80px;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  pointer-events: none;
}
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: auto auto -16px -16px;
  width: 80px; height: 80px;
  border-bottom: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
  pointer-events: none;
}
.portrait-tag {
  position: absolute;
  bottom: 24px; left: 24px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.portrait-tag .name {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 22px;
  letter-spacing: -0.01em;
  text-transform: none;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .portrait { max-width: 420px; }
  .section-intro { grid-template-columns: 1fr; gap: 24px; }
}

/* ============== Stats ============== */
.stats {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat {
  padding: 56px 32px;
  border-left: 1px solid var(--line);
  position: relative;
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat:last-child { padding-right: 0; }
.stat-num {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.stat-num .unit {
  font-size: 0.4em;
  color: var(--accent);
  font-style: italic;
  letter-spacing: -0.01em;
}
.stat-num .plus {
  font-size: 0.7em;
  color: var(--accent);
}
.stat-label {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-mute);
  line-height: 1.4;
  max-width: 22ch;
}
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 36px 20px; border-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(2n) { border-left: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
}

/* ============== Profil ============== */
.profile-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 80px;
}
.profile-side {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.profile-side .num {
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}
.profile-body {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text);
  max-width: 65ch;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.profile-body p { margin: 0 0 24px; }
.profile-body p:first-child::first-letter {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 4.4em;
  float: left;
  line-height: 0.85;
  margin: 8px 14px 0 -2px;
  color: var(--accent);
  font-style: italic;
}
.profile-quote {
  margin-top: 40px;
  padding: 28px 32px;
  border-left: 2px solid var(--accent);
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 24px;
  line-height: 1.35;
  color: var(--text);
  max-width: 50ch;
}
@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ============== Obszary doradztwa ============== */
.areas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.area {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 40px 32px 56px;
  position: relative;
  transition: background 0.3s ease;
}
.area:nth-child(3n) { border-right: 0; }
.area:hover { background: var(--bg-2); }
.area-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 24px;
}
.area-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 12px;
}
.area-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-mute);
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
@media (max-width: 900px) {
  .areas { grid-template-columns: 1fr; }
  .area { border-right: 0; }
}

/* ============== Sektory ============== */
.sectors-section {
  background: var(--bg-2);
}
.sectors {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}
.sector {
  display: grid;
  grid-template-columns: 80px 1fr 2fr 200px;
  gap: 32px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  transition: padding 0.3s ease;
}
.sector:hover { padding-left: 16px; }
.sector .s-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.sector .s-name {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 28px;
  letter-spacing: -0.01em;
}
.sector .s-desc {
  font-size: 14px;
  color: var(--text-mute);
  line-height: 1.5;
}
.sector .s-scale {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  text-align: right;
}
@media (max-width: 900px) {
  .sector { grid-template-columns: 1fr; gap: 8px; padding: 20px 0; }
  .sector .s-scale { text-align: left; }
}

/* ============== Uprawnienia ============== */
.creds-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.cred-list { display: flex; flex-direction: column; gap: 24px; }
.cred {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: start;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.cred:first-child { border-top: 0; padding-top: 0; }
.cred-icon {
  min-width: 56px;
  width: auto;
  padding: 0 8px;
  height: 44px;
  border: 1px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.cred-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.cred-meta {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 8px;
}
.cred-desc {
  font-size: 14px;
  color: var(--text-mute);
  line-height: 1.5;
  max-width: 38ch;
}
@media (max-width: 900px) {
  .creds-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ============== Kompetencje (chips) ============== */
.skills-section { padding-top: 48px; padding-bottom: 96px; }
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.skill {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  font-weight: 500;
  transition: all .25s ease;
}
.skill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============== Kontakt ============== */
.contact {
  background: var(--bg-2);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact h2 {
  font-size: clamp(42px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -0.025em;
}
.contact h2 em {
  color: var(--accent);
  font-style: italic;
}
.contact-lead {
  margin-top: 28px;
  color: var(--text-mute);
  font-size: 17px;
  line-height: 1.55;
  max-width: 50ch;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.contact-cta {
  display: inline-flex;
  margin-top: 36px;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.contact-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.contact-row:last-child { border-bottom: 0; }
.contact-row .lab {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.contact-row .val {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 22px;
  color: var(--text);
  letter-spacing: -0.005em;
}
.contact-row .val a {
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.contact-row .val a:hover { border-color: var(--accent); }
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ============== Financing ============== */
.financing {
  background: var(--bg-2);
}
.financing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.financing-lead h2 {
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.02;
}
.financing-sub {
  margin-top: 28px;
  color: var(--text-mute);
  font-size: 17px;
  line-height: 1.6;
  max-width: 50ch;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.financing-stat {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fs-num {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(56px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text);
  display: flex; align-items: baseline; gap: 8px;
}
.fs-unit {
  font-size: 0.32em;
  color: var(--accent);
  font-style: italic;
}
.fs-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  line-height: 1.6;
}
.financing-points {
  display: flex;
  flex-direction: column;
}
.fp {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.fp:first-child { border-top: 0; padding-top: 0; }
.fp-num {
  width: 36px; height: 36px;
  border: 1px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
}
.fp-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.fp-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-mute);
  max-width: 46ch;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
@media (max-width: 900px) {
  .financing-grid { grid-template-columns: 1fr; gap: 48px; }
}
footer {
  border-top: 1px solid var(--line);
  padding: 36px 0;
}
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  flex-wrap: wrap;
  gap: 16px;
}

/* utility */
.muted { color: var(--text-mute); }
.accent { color: var(--accent); }

/* selection */
::selection { background: var(--accent); color: var(--on-accent); }

/* scroll behavior */
html { scroll-behavior: smooth; }

/* anchor scroll padding */
section[id] { scroll-margin-top: 80px; }
