:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f3faf8;
  --color-text: #1e2b29;
  --color-text-muted: #5c6e6b;
  --color-primary: #2f9e8f;
  --color-primary-dark: #227568;
  --color-border: #e2ede9;
  --shadow-card: 0 10px 30px -12px rgba(30, 60, 55, 0.18);
  --radius: 16px;
  --font-heading: "Poppins", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 12px;
}

h2 { font-size: clamp(1.6rem, 2.5vw, 2.1rem); }

.section-lead {
  color: var(--color-text-muted);
  margin: 0 0 32px;
  max-width: 56ch;
}

.sub-heading {
  margin-top: 48px;
  font-size: 1.15rem;
}

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  transition: background 0.2s ease;
}
.btn-primary:hover { background: var(--color-primary-dark); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-text);
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav a:hover { color: var(--color-primary); }

.nav-cta {
  background: var(--color-primary);
  color: #fff !important;
  padding: 9px 20px;
  border-radius: 999px;
}
.nav-cta:hover { background: var(--color-primary-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}

/* Hero */
.hero {
  padding: 72px 0 88px;
  background: linear-gradient(180deg, var(--color-bg-alt), #fff);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 10px;
}

.hero h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.5rem);
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-tagline {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 28px;
  max-width: 44ch;
}

.hero-media {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-alt);
  box-shadow: var(--shadow-card);
}

.hero-media img { width: 100%; height: 100%; object-fit: cover; }

.hero-media.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-media.is-empty img { display: none; }
.hero-media.is-empty::after {
  content: "Dodaj zdjęcie: photo/hero/hero.jpg";
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 24px;
}

/* Sections */
.section { padding: 84px 0; }
.section-alt { background: var(--color-bg-alt); }

.about-text {
  color: var(--color-text-muted);
  font-size: 1.02rem;
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  border-left: 2px solid var(--color-border);
}

.timeline li {
  position: relative;
  padding: 0 0 28px 28px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary);
}

.timeline .t-year {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.timeline .t-title { font-weight: 600; }
.timeline .t-place { color: var(--color-text-muted); font-size: 0.92rem; }

/* Grids / cards */
.grid { display: grid; gap: 24px; }
.grid-portfolio { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-certificates { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

.t-card-media {
  position: relative;
}

.t-card-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: zoom-in;
}

.watermark {
  position: absolute;
  color: #fff;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75), 0 0 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.t-card-media .watermark {
  right: 10px;
  bottom: 8px;
  font-size: 0.68rem;
}

.t-card-body { padding: 18px 20px 22px; }
.t-card-body h3 { font-size: 1.05rem; margin-bottom: 6px; }
.t-card-body p { margin: 0; color: var(--color-text-muted); font-size: 0.92rem; }

.cert-card { padding: 20px; text-align: center; }
.cert-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 14px;
  cursor: zoom-in;
}
.cert-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  margin-bottom: 14px;
  background: var(--color-bg-alt);
  border: 1.5px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  padding: 12px;
  text-align: center;
}
.cert-card h3 { font-size: 1rem; margin-bottom: 4px; }
.cert-card .cert-meta { color: var(--color-text-muted); font-size: 0.88rem; }

/* Contact */
.contact-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}

.contact-list { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.contact-list strong { display: block; color: var(--color-text); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 3px; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fff;
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.contact-form label { font-size: 0.85rem; font-weight: 600; }
.contact-form input,
.contact-form textarea {
  font-family: var(--font-body);
  padding: 11px 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-size: 0.95rem;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}
.contact-form button { margin-top: 6px; align-self: flex-start; }
.hidden-field { position: absolute; left: -9999px; }

/* Footer */
.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 23, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 32px;
}
.lightbox.is-open { display: flex; }
.lightbox-media { position: relative; max-width: min(90vw, 900px); max-height: 85vh; }
.lightbox-media img { display: block; max-width: min(90vw, 900px); max-height: 85vh; border-radius: 8px; }
.lightbox-media .watermark {
  display: none;
  font-size: 0.85rem;
  right: 16px;
  bottom: 14px;
}
.lightbox-media .watermark.is-visible { display: block; }
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* Responsive */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 360px; margin: 0 auto; }
  .contact-inner { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    gap: 16px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav-cta { align-self: flex-start; }
}
