/* Artur Krysiak — misiga.pl */

:root {
  --bg: #ffffff;
  --bg-alt: #f7f8f9;
  --text: #1a1d21;
  --text-muted: #5b6470;
  --accent: #1f4e79;
  --accent-hover: #17395a;
  --border: #e2e5e9;
  --shadow: 0 1px 3px rgba(26, 29, 33, .06), 0 8px 24px rgba(26, 29, 33, .08);
  --radius: 8px;
  --wrap: 1040px;
  --text-col: 40em;
  --portrait-bg: #e9eef4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181c;
    --bg-alt: #1b1f24;
    --text: #e8eaed;
    --text-muted: #9aa3ae;
    --accent: #7ab3e0;
    --accent-hover: #a3cbec;
    --border: #2a2f36;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --portrait-bg: #252b33;
  }
}

* { box-sizing: border-box; }

img { max-width: 100%; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

section { padding: 96px 0; }
section.alt { background: var(--bg-alt); }

h1, h2, h3 {
  line-height: 1.25;
  letter-spacing: -.015em;
  font-weight: 600;
  margin: 0 0 16px;
}

h1 { font-size: 44px; letter-spacing: -.025em; }
h2 { font-size: 26px; margin-bottom: 24px; }
h3 { font-size: 21px; margin-bottom: 4px; }

p { margin: 0 0 18px; max-width: var(--text-col); }
p:last-child { margin-bottom: 0; }

.muted, .status { color: var(--text-muted); }
.status { font-size: 14px; margin-bottom: 16px; }
.muted { font-size: 16px; }

a { color: var(--accent); }

/* --- nagłówek --- */

.hero {
  padding: 120px 0 88px;
  border-bottom: 1px solid var(--border);
}

.hero .lead {
  font-size: 20px;
  color: var(--text-muted);
  max-width: 34em;
  margin-bottom: 32px;
}

.hero-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

.portrait {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--portrait-bg);
  order: -1;
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- przyciski --- */

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

.btn {
  display: inline-block;
  padding: 11px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.btn:hover { border-color: var(--accent); color: var(--accent); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  .btn-primary, .btn-primary:hover { color: #0f1216; }
}

.btn-small { padding: 8px 16px; font-size: 15px; }

/* --- cytat --- */

blockquote {
  max-width: var(--text-col);
  margin: 28px 0 0;
  padding: 0 0 0 20px;
  border-left: 3px solid var(--accent);
  font-size: 19px;
  color: var(--text);
}

/* --- projekty --- */

.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.project:first-of-type { border-top: none; padding-top: 8px; }

.shot { margin: 0; }

.shot img {
  display: block;
  cursor: zoom-in;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.side-project {
  padding: 40px 0 0;
  border-top: 1px solid var(--border);
}

.side-project h3 { color: var(--text-muted); }
.side-project p { font-size: 16px; color: var(--text-muted); }

.about ul {
  margin: 0 0 18px;
  padding-left: 20px;
  max-width: var(--text-col);
}

.about li { margin-bottom: 6px; }

.shots, .about, .shot, .gallery { min-width: 0; }

.shots {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 8px 0 18px;
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
  cursor: zoom-in;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* --- powiększenie zrzutu --- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(10, 12, 15, .88);
  cursor: zoom-out;
}

.lightbox[hidden] { display: none; }

.lightbox img {
  width: min(1040px, 100%);
  max-height: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 12px 48px rgba(0, 0, 0, .5);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease;
}

.lightbox-close:hover { background: rgba(255, 255, 255, .22); }

/* --- stopka --- */

footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
}

footer p { margin: 0 0 4px; }

/* --- desktop --- */

@media (min-width: 860px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 72px;
  }

  .portrait {
    width: 340px;
    height: 340px;
    order: 0;
  }

  .project {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
    padding: 64px 0;
  }

  .project:nth-of-type(even) .shot { order: 2; }

  .project:has(.shots) { align-items: start; }

  .project .shots {
    position: sticky;
    top: 32px;
  }

  .project .about p { max-width: none; }
}

/* --- mobile --- */

@media (max-width: 600px) {
  body { font-size: 17px; }
  section { padding: 56px 0; }
  .hero { padding: 64px 0 48px; }
  h1 { font-size: 32px; }
  h2 { font-size: 23px; }
  .hero .lead { font-size: 18px; }
  blockquote { font-size: 18px; }
  .actions .btn { flex: 1 1 auto; text-align: center; }
  .portrait { width: 200px; height: 200px; }
  .lightbox { padding: 16px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery img { aspect-ratio: auto; object-fit: fill; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
