/* ------------------------------------------------------------------
   Maciej Posłuszny — personal landing page
   One hand-rolled stylesheet. System font stack only; two deliberate
   themes (light + dark), chosen up front as CSS custom properties and
   switched by prefers-color-scheme. No JS, no frameworks, no assets.
   ------------------------------------------------------------------ */

/* 1 · Minimal reset — only what this design actually needs ------- */

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

/* 2 · Design tokens ----------------------------------------------
   Light: warm paper, near-black ink, desaturated clay accent.
   All pairs verified ≥ 4.5:1 on their own background. */

:root {
  --bg: #faf9f7;                          /* off-white paper        */
  --fg: #1f232a;                          /* near-black ink  ~13.5  */
  --muted: #565b64;                       /* secondary text  ~6.4   */
  --hairline: rgba(31, 35, 42, 0.16);     /* rules only             */
  --accent: #a4442f;                      /* links, tagline  ~5.8   */
  --accent-hover: #7f3120;                /* hover state    ~8.6    */
  --accent-soft: rgba(164, 68, 47, 0.16); /* ::selection wash       */

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;                        /* real dark surface      */
    --fg: #e9e7e2;                        /* warm off-white ~11.9   */
    --muted: #9aa0a8;                     /* secondary text ~6.9    */
    --hairline: rgba(233, 231, 226, 0.14);
    --accent: #e0785a;                    /* links, tagline ~6.0    */
    --accent-hover: #eda088;              /* hover state    ~8.9    */
    --accent-soft: rgba(224, 120, 90, 0.24);
  }
}

/* 3 · Document shell ----------------------------------------------
   Single centered column, content left-aligned, footer pinned to the
   bottom edge on tall screens. No cards, shadows or gradients. */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding-inline: clamp(1.25rem, 5vw, 2rem);
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

header,
main,
footer {
  width: 100%;
  max-width: 62ch;                        /* ≈ 62–70 ch measure     */
  margin-inline: auto;
}

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

/* 4 · Identity block ---------------------------------------------- */

h1 {
  margin: 0;
  padding-block-start: clamp(4rem, 15vh, 7.5rem);
  font-size: clamp(2rem, 1.4rem + 2.5vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.022em;
  font-weight: 700;
  text-wrap: balance;
}

.headline {
  margin: 0.9rem 0 0;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent);                   /* the one accent line    */
}

/* 5 · Body copy + links ------------------------------------------- */

.bio {
  margin: 0;
  padding-block-start: clamp(2.5rem, 7vh, 4rem);
  max-width: 62ch;
  text-wrap: pretty;
}

nav {
  margin-block-start: clamp(3rem, 8vh, 4.5rem);
  padding-block-start: 1.75rem;
  border-top: 1px solid var(--hairline);  /* quiet structure        */
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.75rem;
  align-items: baseline;
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

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

/* 6 · Footer -------------------------------------------------------- */

footer {
  margin-top: auto;                       /* parks © at the bottom  */
  padding-block: 1.5rem;
  border-top: 1px solid var(--hairline);
}

footer p {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.035em;
  color: var(--muted);
}

/* 7 · Motion --------------------------------------------------------
   Color + underline transitions only, and only when the user has
   not asked for reduced motion. */

@media (prefers-reduced-motion: no-preference) {
  a {
    transition: color 160ms ease, text-decoration-color 160ms ease;
  }
}
