/* zakresy znaków przepisane z index.css pakietów @fontsource-variable 5.3.0 */
@font-face { font-family: Inter; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-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: Inter; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-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: "JetBrains Mono"; font-weight: 100 800; font-display: swap; src: url(../fonts/jetbrains-mono-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: "JetBrains Mono"; font-weight: 100 800; font-display: swap; src: url(../fonts/jetbrains-mono-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; }

/* neutralne tła i jeden kolor akcentu */
:root {
  color-scheme: dark;
  --sans: Inter, system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, ui-monospace, monospace;
  --bg: #0b0b10;
  --surface: #121219;
  --chip: #1c1d26;
  --line: #23242f;
  --text: #ededf2;
  --soft: #a2a4b3;
  --accent: #a98fff;
  --btn: #ededf2;
  --btn-text: #0b0b10;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.6 var(--sans); overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h2 { margin-bottom: 1.5rem; font-size: 1.75rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.35; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(100% - 2rem, 66rem); margin-inline: auto; }
main > section { padding-block: clamp(3rem, 6vw, 4.5rem) 0; }

.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 2rem; padding-block: .75rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
nav { order: 3; display: flex; gap: 1.5rem; width: 100%; color: var(--soft); font-size: .9rem; font-weight: 500; }
nav a:hover { color: var(--text); }
.lang { margin-left: auto; padding: .15rem .6rem; border: 1px solid var(--line); border-radius: .4rem; font-size: .8rem; font-weight: 600; }

.skip { position: absolute; left: -999em; }
.skip:focus { left: 1rem; top: 1rem; z-index: 20; padding: .5rem 1rem; border-radius: .5rem; background: var(--btn); color: var(--btn-text); }

/* Projekty pojawiają się same po dodaniu pierwszego <article> */
#projects:not(:has(article)),
body:not(:has(#projects article)) a[href="#projects"] { display: none; }

/* baner: jedyny duży napis to imię i nazwisko */
.hero { text-align: center; }
main > .hero { padding-top: clamp(3rem, 7vw, 5rem); }
.eyebrow { color: var(--accent); font: 500 .85rem var(--mono); }
h1 { margin-block: .75rem; font-size: clamp(2.5rem, 7vw, 4.5rem); font-weight: 750; line-height: 1.05; letter-spacing: -.035em; }
.role { font-size: 1.3rem; font-weight: 500; line-height: 1.4; }
.lead { max-width: 36rem; margin: .35rem auto 0; text-wrap: balance; color: var(--soft); font-size: 1.05rem; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.75rem; }
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.25rem; border: 1px solid var(--btn); border-radius: .6rem; background: var(--btn); color: var(--btn-text); font-weight: 600; }
.btn:hover { border-color: var(--accent); background: var(--accent); }
.btn.ghost { border-color: var(--line); background: transparent; color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

/* okno z kodem */
.stage { max-width: 46rem; margin: clamp(2.5rem, 5vw, 3.5rem) auto 0; text-align: left; }
.window { overflow: hidden; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); box-shadow: 0 30px 90px -45px color-mix(in srgb, var(--accent) 55%, transparent); }
.bar { display: flex; align-items: center; gap: .4rem; padding: .6rem 1rem; border-bottom: 1px solid var(--line); color: var(--soft); font: .75rem var(--mono); }
.bar i { width: .6rem; height: .6rem; border-radius: 50%; background: #34353f; }
.tab { margin-left: .75rem; color: var(--text); }
.status { margin-left: auto; }
.code { counter-reset: line; padding: 1rem 1rem 1.15rem 0; color: var(--soft); font: clamp(.75rem, 1.3vw, .875rem)/1.9 var(--mono); font-variant-ligatures: none; }
.code span { display: block; position: relative; padding-left: 3.5rem; white-space: pre-wrap; counter-increment: line; }
.code span::before { content: counter(line); position: absolute; left: 0; width: 2.25rem; color: #5d6072; text-align: right; }
.code b { color: var(--accent); font-weight: 500; }
.code em, .code q { color: var(--text); font-style: normal; }
.code q { quotes: none; white-space: nowrap; }
.code i { font-style: normal; }
.code u { display: none; }
@media (max-width: 47.99rem) {
  .code { padding-right: .5rem; font-size: .68rem; }
  /* wcięcie wiszące: wszystkie kolejne wiersze instrukcji zaczynają się w tym samym miejscu */
  .code span { padding-left: calc(2rem + 6ch); text-indent: -6ch; }
  .code span::before { width: 1.25rem; text-indent: 0; }
  .code i { display: none; }
  .code u { display: inline; text-decoration: none; }
  .code u::after { content: "\a"; white-space: pre; }
}

/* technologie */
.bento, .projects { display: grid; gap: .75rem; }
.bento article, .projects article { min-width: 0; padding: 1.25rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
.bento article { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; align-items: center; column-gap: .75rem; }
.glyph { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: .5rem; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font: 700 .75rem var(--mono); font-variant-ligatures: none; }
.chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.chips li { padding: .2rem .6rem; border-radius: .4rem; background: var(--chip); font-size: .875rem; }

/* projekty */
.projects article { display: flex; flex-direction: column; align-items: flex-start; }
.meta { margin-bottom: .5rem; color: var(--accent); font: 500 .8rem var(--mono); }
.projects h3 { margin-bottom: .4rem; font-size: 1.25rem; }
.projects article > p:not(.meta) { max-width: 65ch; color: var(--soft); }
.projects .chips { margin-top: auto; padding-top: 1rem; }

/* kontakt */
.contact { padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); text-align: center; }
.contact h2 { margin-bottom: .75rem; }
.mail { color: var(--accent); font-size: clamp(1.35rem, 4vw, 2rem); font-weight: 600; }
.mail:hover { text-decoration: underline; text-underline-offset: .2em; }
address { margin-block: 1.75rem 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-style: normal; }
dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: 1.25rem; margin: 1.25rem 0 0; }
dt { color: var(--soft); font: .75rem var(--mono); }
dd { margin: .2rem 0 0; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 2rem; padding-block: 2rem; color: var(--soft); font-size: .85rem; }

/* na telefonie dwuwierszowy nagłówek nie zasłania treści */
@media (max-width: 47.99rem) {
  .top { position: static; }
  html { scroll-padding-top: 0; }
}

@media (min-width: 48rem) {
  .wrap { width: min(100% - 4rem, 66rem); }
  nav { order: 0; width: auto; gap: 2rem; margin-left: auto; }
  .lang { margin-left: 0; }
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bento article { grid-column: span 2; }
  .bento article.half { grid-column: span 3; }
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* nieparzysta liczba wpisów: ostatni zajmuje cały wiersz */
  .projects article:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* duże monitory: większa skala zamiast szerokich pustych boków */
@media (min-width: 100rem) {
  html { font-size: 112.5%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
