/* ==========================================================================
   krystynabielecka.pl — design system
   Hand-written. No framework, no CDN, no JavaScript required.
   ========================================================================== */

:root {
  /* palette */
  --paper: #fbfaf7;
  --surface: #ffffff;
  --ink: #1c1e21;
  --ink-soft: #4a4e54;
  --muted: #6e7278;
  --rule: #e6e1d8;
  --accent: #2f4f4a;
  --accent-hover: #253e3a;
  --accent-soft: #eaf0ed;
  --focus: #2f4f4a;

  /* type */
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  /* layout */
  --wrap: 68rem;
  --wrap-narrow: 46rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(3.5rem, 8vw, 7rem);
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-soft: 0 1px 2px rgba(28, 30, 33, 0.04),
    0 8px 24px -12px rgba(28, 30, 33, 0.14);
}

/* --------------------------------------------------------------- reset --- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  color: var(--ink);
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration: underline;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: var(--section) 0;
}

blockquote {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 1.15rem;
}

ul,
ol {
  margin: 0 0 1.1em;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.35em;
}

::selection {
  background: var(--accent-soft);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* -------------------------------------------------------------- layout --- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow {
  max-width: var(--wrap-narrow);
}

main {
  display: block;
}

.section {
  padding-block: var(--section);
}

.section--tight {
  padding-block: clamp(2rem, 4vw, 3.25rem);
}

.section + .section {
  border-top: 1px solid var(--rule);
}

.rule-top {
  border-top: 1px solid var(--rule);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
}

.skip:focus {
  left: 0;
}

.eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.lead {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.6;
  color: var(--ink-soft);
  font-family: var(--serif);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

/* -------------------------------------------------------------- header --- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.75rem;
  padding-block: 1.25rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.wordmark:hover {
  text-decoration: none;
  color: var(--accent);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.35rem;
  margin-left: auto;
  font-size: 0.95rem;
}

.nav a {
  color: var(--ink-soft);
  padding-block: 0.2rem;
  border-bottom: 1px solid transparent;
}

.nav a:hover {
  color: var(--accent);
  text-decoration: none;
  border-bottom-color: var(--rule);
}

.nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.lang {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.lang span[aria-current] {
  color: var(--ink);
  font-weight: 600;
}

.lang a {
  color: var(--muted);
}

.lang a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ---------------------------------------------------------------- hero --- */

.hero {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: var(--section);
  align-items: center;
}

.hero__text h1 {
  font-size: clamp(2.1rem, 5vw, 3rem);
  margin-bottom: 0.35em;
}

.hero__role {
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.hero__figure {
  margin: 0;
}

.hero__figure img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

@media (min-width: 768px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

/* ---------------------------------------------------------------- grid --- */

.grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.grid--2 {
  grid-template-columns: 1fr;
}

.grid--3 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------- cards --- */

.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.panel h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.panel p:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------- buttons --- */

.btn {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  border: 1px solid var(--accent);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

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

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--rule);
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* --------------------------------------------------------------- prose --- */

.prose {
  max-width: var(--wrap-narrow);
}

.prose h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  margin-top: 2.2em;
}

.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: 1.15rem;
  margin-top: 1.8em;
  margin-bottom: 0.5em;
}

.prose ul,
.prose ol {
  padding-left: 1.35rem;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose strong {
  font-weight: 600;
}

/* -------------------------------------------------------------- figure --- */

.figure {
  margin: 2rem 0;
}

.figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.figure--cover img {
  max-width: min(22rem, 100%);
}

figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 40ch;
}

/* ---------------------------------------------------- publications list -- */

.pubs {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.pubs li {
  padding-left: 2.25rem;
  text-indent: -2.25rem;
  margin-bottom: 0.9rem;
  line-height: 1.6;
}

.pubs a {
  word-break: break-word;
}

.pubs em,
.pubs i {
  font-style: italic;
}

.pub-group + .pub-group {
  margin-top: 2.5rem;
}

.pub-group > h3 {
  font-size: 1.05rem;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.5rem;
}

/* ------------------------------------------------------------- contact --- */

.contact-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.contact-item svg {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.3rem;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-item .label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.contact-item a {
  color: var(--ink);
}

.contact-item a:hover {
  color: var(--accent);
}

address {
  font-style: normal;
}

/* -------------------------------------------------------------- footer --- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 5vw, 4rem);
  margin-top: var(--section);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .wrap > p {
  margin-bottom: 0.5rem;
  max-width: 62ch;
}

.site-footer a {
  color: var(--ink-soft);
}

.site-footer .fine {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* --------------------------------------------------------------- print --- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip,
  .actions {
    display: none;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  .section {
    padding-block: 1.5rem;
  }
}

/* --------------------------------------------------------- utilities --- */

.mt-lg {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

.figure--flush {
  margin: 0;
}
