/* tajmajer.tech: styl odtwarzający dawny motyw Squarespace (ciemne/jasne sekcje z falami). */

/* ---------- Fonty (self-hosted, SIL OFL; licencja w assets/fonts) ---------- */
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Zmienne ---------- */
:root {
  --dark: #1b1b1a;        /* tło sekcji ciemnych (accent z motywu) */
  --light: #ffffff;       /* tło sekcji jasnych */
  --ink: #1b1b1a;
  --paper: #ffffff;
  --muted-dark: rgba(255, 255, 255, .68);
  --muted-light: rgba(27, 27, 26, .64);
  --font: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --w: 1160px;
  --w-narrow: 860px;
  --pad: clamp(1.25rem, 5vw, 3rem);
}

/* ---------- Podstawy ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  overflow-wrap: break-word;
  font-family: var(--font);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.6;
  letter-spacing: .02em;
  color: var(--paper);
  background: var(--dark);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
strong, b { font-weight: 700; }
h1, h2, h3, h4 { font-weight: 300; line-height: 1.15; letter-spacing: .01em; margin: 0 0 .6em; }
p { margin: 0 0 1em; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.skip-link { position: absolute; left: -999px; top: .5rem; background: #fff; color: #000; padding: .5rem 1rem; z-index: 10; }
.skip-link:focus { left: .5rem; }

.container { max-width: var(--w); margin: 0 auto; padding: 0 var(--pad); }
.container--narrow { max-width: var(--w-narrow); }
.center { text-align: center; }

/* ---------- Motywy sekcji ---------- */
.section { padding: clamp(3rem, 8vw, 6rem) 0; }
.s-dark { background: var(--dark); color: var(--paper); }
.s-light { background: var(--light); color: var(--ink); }
.s-dark .muted { color: var(--muted-dark); }
.s-light .muted { color: var(--muted-light); }
.section__title { font-size: clamp(2rem, 4.5vw, 3.25rem); }
.section__title--sm { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }

/* Fale między sekcjami: tło = sekcja powyżej, wypełnienie = sekcja poniżej */
.wave { line-height: 0; margin: -1px 0; }
.wave svg { width: 100%; height: clamp(40px, 6vw, 90px); display: block; }
.wave--to-light { background: var(--dark); fill: var(--light); }
.wave--to-dark { background: var(--light); fill: var(--dark); }
.wave--flip svg { transform: scaleX(-1); }

/* ---------- Nagłówek ---------- */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1rem var(--pad);
  background: var(--dark);
  color: var(--paper);
}
.nav__links { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav__links a { text-decoration: none; font-size: 1rem; }
.nav__links a:hover, .nav__links a[aria-current="page"] { text-decoration: underline; }
.site-title { text-decoration: none; font-size: clamp(1.05rem, 2vw, 1.4rem); text-align: center; }
.nav__social { justify-self: end; display: inline-flex; }

@media (max-width: 760px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-title { grid-column: 1 / -1; grid-row: 1; text-align: left; }
  .nav { grid-row: 2; }
  .nav__social { grid-row: 2; }
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(2rem, 6vw, 4rem); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero__title { font-size: clamp(2.4rem, 5.5vw, 4rem); margin-bottom: .8em; }
.hero__text p { font-size: .95rem; letter-spacing: .05em; }
.hero__photo { margin: 0; }
.hero__photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.hero__tagline { margin-top: clamp(2rem, 5vw, 3.5rem); font-size: clamp(1.2rem, 2.4vw, 1.75rem); line-height: 1.35; text-align: center; }
.hero__tagline span { display: block; }
.hero__tagline span + span { padding-left: clamp(0rem, 12vw, 10rem); }
@media (max-width: 760px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__photo { order: -1; max-width: 360px; }
  .hero__tagline span + span { padding-left: 0; }
}

/* ---------- Portfolio (strona główna) ---------- */
.portfolio__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); margin: 2rem 0 3rem; }
.feature { display: flex; flex-direction: column; font-size: .92rem; }
.feature__head { text-align: center; margin-bottom: 1.25rem; }
.feature__head h3 { font-size: 1.6rem; margin: .5rem 0 0; }
.feature__logo { width: 96px; height: 96px; object-fit: contain; margin: 0 auto; }
.feature__role { font-weight: 700; font-style: italic; }
.feature__image { margin-top: auto; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; padding-top: 1rem; }
.more { font-size: .9rem; }
.button {
  display: inline-block;
  padding: 1.1rem 3.5rem;
  border-radius: 999px;
  background: var(--dark);
  color: var(--paper);
  text-decoration: none;
  letter-spacing: .08em;
  font-weight: 500;
  transition: opacity .2s;
}
.s-dark .button { background: var(--paper); color: var(--ink); }
.button:hover { opacity: .85; }
@media (max-width: 900px) { .portfolio__grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; } }

/* ---------- Akordeon (bez JS: <details>) ---------- */
.accordion details { border-top: 1px solid currentColor; }
.accordion details:last-child { border-bottom: 1px solid currentColor; }
.accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  font-size: 1.1rem;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 2rem; font-weight: 200; line-height: 1; }
.accordion details[open] summary::after { content: "−"; }
.accordion__body { padding: 0 0 1.5rem; max-width: 70ch; }

/* ---------- Opinie ---------- */
.testimonials__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.quote { margin: 0; }
.quote blockquote { margin: 0 0 1rem; font-size: clamp(1.2rem, 2.2vw, 1.6rem); line-height: 1.3; font-weight: 400; }
.quote figcaption { font-size: .85rem; }
.quote:last-child:nth-child(odd) { grid-column: 1 / -1; max-width: 640px; margin: 0 auto; }
@media (max-width: 760px) { .testimonials__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Doświadczenie i publikacje ---------- */
.cv__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(2rem, 6vw, 5rem); }
.timeline, .pubs { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.timeline li { padding: .55rem 0; border-bottom: 1px solid rgba(255, 255, 255, .15); font-size: .95rem; line-height: 1.4; }
.timeline__year { font-style: italic; display: inline-block; min-width: 3.2rem; }
.timeline .muted { padding-left: 3.25rem; display: inline-block; }
.pubs li { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); padding: .6rem 0; border-bottom: 1px solid rgba(255, 255, 255, .15); font-size: .92rem; line-height: 1.45; }
.pubs__year { font-style: italic; }
.pubs a { text-decoration: none; }
.pubs a:hover { text-decoration: underline; }
@media (max-width: 860px) { .cv__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Umiejętności ---------- */
.skills__list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
.skills__list li { padding: 1.1rem 0; border-top: 1px solid rgba(27, 27, 26, .2); font-size: 1.25rem; }
@media (max-width: 600px) { .skills__list { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Kontakt ---------- */
.contact__title { font-size: clamp(2.2rem, 5vw, 3.5rem); }
.contact__email { font-size: 1.35rem; font-weight: 500; }
.email__at { opacity: .8; }
.contact-page { min-height: 60vh; display: flex; align-items: center; }
.contact-page .container { width: 100%; }

/* ---------- Projekty ---------- */
.toc { padding-bottom: 3rem; }
.toc__list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.toc__list a { text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .35); }
.toc__list a:hover { border-color: currentColor; }

.project { scroll-margin-top: 1rem; }
.project__grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.project--rev .project__grid { grid-template-columns: minmax(0, 1fr) 300px; }
.project--rev .project__meta { order: 2; }
.project__meta { text-align: right; font-size: .9rem; line-height: 1.45; position: sticky; top: 1.5rem; }
.project--rev .project__meta { text-align: left; }
.project__title { font-size: clamp(2rem, 3.6vw, 2.9rem); padding-bottom: .4rem; border-bottom: 1px solid currentColor; margin-bottom: 1.25rem; overflow-wrap: normal; word-break: normal; hyphens: manual; text-wrap: balance; }
.project__role { margin-bottom: 1.1rem; }
.project__meta dl { margin: 0; }
.project__meta dt { font-weight: 700; margin-top: 1.1rem; }
.project__meta dd { margin: 0; overflow-wrap: anywhere; }
.project__logo { max-height: 110px; max-width: 280px; width: auto; object-fit: contain; margin: 0 auto 2rem; }
.s-dark .project__logo { background: #fff; padding: .75rem; border-radius: 12px; }
.project__logo--on-dark, .s-dark .project__logo--on-dark { background: var(--dark); padding: .75rem; border-radius: 12px; }
.project__body { font-size: 1rem; }
.project__body ul { padding-left: 1.25rem; margin: 0 0 1.25rem; }
.project__body li { margin-bottom: .45rem; }
.project__list-title { margin-bottom: .5rem; font-weight: 500; }
.papers em { font-style: italic; opacity: .85; }
@media (max-width: 860px) {
  .project__grid, .project--rev .project__grid { grid-template-columns: minmax(0, 1fr); }
  .project__meta, .project--rev .project__meta { order: 0; position: static; text-align: left; }
}

/* ---------- Stopka ---------- */
.site-footer { background: var(--dark); color: var(--muted-dark); text-align: center; padding: 2rem var(--pad); font-size: .85rem; }

/* ---------- Druk ---------- */
@media print {
  body, .s-dark, .site-header, .site-footer { background: #fff !important; color: #000 !important; }
  .wave, .skip-link, .nav__social { display: none; }
  .accordion details > * { display: block; }
}
