/* ============================================================
   Portfolio — styles
   Blue-black, pale gold instrumentation, a terrain mesh below.
   Every colour and metric is a token in :root. Change them there.
   ============================================================ */

:root {
  /* surfaces */
  --void:    #06070c;
  --strata:  #0c0e16;
  --haze:    #151928;

  /* hairlines */
  --hair:    rgba(160, 180, 215, 0.13);
  --hair-2:  rgba(160, 180, 215, 0.3);

  /* text */
  --ice:     #dce3f0;
  --text:    #8b93a8;
  --mute:    #5d6478;

  /* accents — gold is the interface, glacier is the terrain */
  --aurum:   #e4c079;
  --glacier: #7fa6c9;

  --nav:     66px;
  --status:  30px;
  --edge:    clamp(1.5rem, 5vw, 3.5rem);
  --measure: 58ch;

  --slow: 820ms;
  --mid:  480ms;
  --fast: 200ms;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--void);
  color: var(--text);
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 200; color: var(--ice); }
p { margin: 0 0 1.15em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, dl, dd { margin: 0; padding: 0; list-style: none; }
canvas, svg { display: block; }

:focus-visible { outline: 1px solid var(--aurum); outline-offset: 4px; }

/* ============================================================
   Environment — horizon light, terrain mesh, corner registration
   ============================================================ */

.env { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.env::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 46% at 50% 44%, rgba(64, 92, 132, 0.34), transparent 70%),
    radial-gradient(100% 60% at 50% 100%, rgba(10, 12, 22, 0.9), transparent 70%);
}

#terrain { position: absolute; inset: 0; width: 100%; height: 100%; }

/* four corner marks. No full border — a box would feel heavier. */
.reg { position: fixed; inset: 14px; z-index: 6; pointer-events: none; }
.reg span { position: absolute; width: 16px; height: 16px; }
.reg span:nth-child(1) { top: 0; left: 0; border-top: 1px solid var(--hair-2); border-left: 1px solid var(--hair-2); }
.reg span:nth-child(2) { top: 0; right: 0; border-top: 1px solid var(--hair-2); border-right: 1px solid var(--hair-2); }
.reg span:nth-child(3) { bottom: 0; left: 0; border-bottom: 1px solid var(--hair-2); border-left: 1px solid var(--hair-2); }
.reg span:nth-child(4) { bottom: 0; right: 0; border-bottom: 1px solid var(--hair-2); border-right: 1px solid var(--hair-2); }

/* ============================================================
   Top rail
   ============================================================ */

.rail {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  height: var(--nav);
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 var(--edge);
  background: linear-gradient(180deg, rgba(6, 7, 12, 0.92), rgba(6, 7, 12, 0));
}

/* optional wordmark, commented out in the HTML */
.mark { display: flex; align-items: center; text-decoration: none; flex: none; }
.mark b {
  font-family: "Azeret Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text);
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 3vw, 2.6rem);
}

/* The active tab is marked by a rule under the label. Drawn on the
   button itself rather than positioned over it, so it can never land
   in the wrong place while fonts are still loading. */
.nav__item {
  padding: 0.35rem 0 0.3rem;
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--mute);
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: color var(--mid) var(--ease), border-color var(--mid) var(--ease);
}
.nav__item:hover { color: var(--text); }
.nav__item[aria-current="true"] { color: var(--ice); border-bottom-color: var(--aurum); }

/* ============================================================
   Status strip
   ============================================================ */

.status {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 15;
  height: var(--status);
  display: flex;
  align-items: center;
  gap: 2.4rem;
  padding: 0 var(--edge);
  background: linear-gradient(0deg, rgba(6, 7, 12, 0.94), rgba(6, 7, 12, 0));
  font-family: "Azeret Mono", ui-monospace, monospace;
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
}
.status b { font-weight: 400; color: var(--text); }
.status__clock { margin-left: auto; }

/* ============================================================
   Stage and view transitions
   ============================================================ */

.stage {
  position: relative;
  z-index: 2;
  max-width: 1560px;
  /* Bez tego cała kolumna przykleja się do lewej krawędzi ekranu.
     Wyrównanie treści w środku zostaje do lewej — przesuwa się
     tylko sam blok. */
  margin-inline: auto;
  padding: calc(var(--nav) + clamp(2.5rem, 7vh, 5.5rem)) var(--edge) calc(var(--status) + 5rem);
}

.view { display: none; }
.view.is-active { display: block; }

/* content resolves left to right, like a scan completing */
.view.is-active .beat { animation: resolve var(--slow) var(--ease) both; }
.view.is-active .beat:nth-child(2) { animation-delay: 110ms; }
.view.is-active .beat:nth-child(3) { animation-delay: 190ms; }

@keyframes resolve {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  40%  { opacity: 1; }
  to   { opacity: 1; clip-path: inset(0 0 0 0); }
}

/* ============================================================
   Typography
   ============================================================ */

.display {
  display: block;
  font-size: clamp(3.2rem, 9.5vw, 7.2rem);
  font-weight: 200;
  line-height: 0.94;
  letter-spacing: -0.005em;
  color: var(--ice);
}

/* the surname as an outline — the page's one typographic risk */
@supports (-webkit-text-stroke: 1px currentColor) {
  .display--hollow {
    color: transparent;
    -webkit-text-stroke: 1px var(--hair-2);
  }
}

.title {
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
  font-weight: 200;
  line-height: 1.1;
  letter-spacing: 0.005em;
}

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.18rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--text);
  /* pierwsze zdanie ma 79 znaków — przy 46ch łamało się w połowie */
  max-width: 82ch;
}

.data {
  font-family: "Azeret Mono", ui-monospace, monospace;
  font-size: 0.64rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
}

.head { margin-bottom: 3rem; }
.head p { margin-top: 1.2rem; }

/* ============================================================
   Home
   ============================================================ */

.hero { min-height: min(58vh, 480px); display: flex; flex-direction: column; justify-content: center; }
.hero__name { margin-bottom: 1.6rem; }
.hero__role {
  font-family: "Azeret Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--aurum);
  margin-bottom: 2.4rem;
}

/* ============================================================
   Discipline picker — rail on the left, projects on the right
   ============================================================ */

.picker {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  margin-top: 4rem;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}

.picker__list { border-right: 1px solid var(--hair); }

.sector {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 1.82rem clamp(1.3rem, 2.6vw, 2.2rem) 2rem;
  transition: background-color var(--mid) var(--ease);
}
.sector + .sector { border-top: 1px solid var(--hair); }
.sector:hover { background: rgba(21, 25, 40, 0.5); }

/* the marker grows down the edge of the chosen discipline */
.sector::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--aurum);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 460ms var(--ease);
}
.sector[aria-selected="true"]::before { transform: scaleY(1); }
.sector[aria-selected="true"] { background: var(--strata); }
.sector[aria-selected="true"] .sector__name { color: var(--aurum); }

.sector__name {
  display: block;
  font-size: 1.66rem;
  font-weight: 200;
  letter-spacing: 0.02em;
  color: var(--ice);
  transition: color var(--mid) var(--ease);
}
.sector__count { display: block; margin-top: 0.25rem; font-size: 0.72rem; }

/* proportion bar — real data, not decoration */
.sector__bar { display: block; height: 1px; margin-top: 1.37rem; background: var(--hair-2); }
.sector__bar i {
  display: block;
  height: 1px;
  width: var(--w, 0%);
  background: var(--aurum);
  transition: width var(--slow) var(--ease);
}

/* --- the panel the projects arrive in --- */

.picker__panel {
  padding: 2.2rem clamp(1.1rem, 2.4vw, 1.4rem) 2.45rem;
  transition: opacity 180ms linear;
}
.picker__panel.is-swapping { opacity: 0; }

.cards {
  display: grid;
  grid-auto-flow: column;
  /* Every tile is exactly this wide, in every category, however many
     there are. Three fit side by side from about 1440px; below that,
     or with four or more, the row scrolls. */
  grid-auto-columns: 320px;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--hair-2) transparent;
  padding-bottom: 0.5rem;
}
.cards::-webkit-scrollbar { height: 4px; }
.cards::-webkit-scrollbar-track { background: transparent; }
.cards::-webkit-scrollbar-thumb { background: var(--hair-2); }

.card { scroll-snap-align: start; }

.card {
  display: block;
  text-align: left;
  padding: 0;
  color: inherit;
  background: rgba(10, 13, 22, 0.82);
  border: 1px solid var(--hair);
  backdrop-filter: blur(4px);
  opacity: 0;
  animation: cardIn 580ms var(--ease) both;
  animation-delay: calc(60ms + var(--i) * 95ms);
  transition: border-color var(--mid) var(--ease), background-color var(--mid) var(--ease);
}

/* they arrive from the rail, moving right */
@keyframes cardIn {
  from { opacity: 0; transform: translateX(-26px); }
  to   { opacity: 1; transform: none; }
}

.card__mini {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 90% at 30% 0%, rgba(28, 38, 58, 0.6), transparent 65%),
    var(--strata);
  border-bottom: 1px solid var(--hair);
}
.card__mini canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.card__mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* the panel that keeps the writing off the terrain */
.card__body { display: block; padding: 1.25rem 1.35rem 1.5rem; }

.card__name {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1.42rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--ice);
  transition: color var(--fast) linear;
}

.card__note {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--text);
}

.card:hover, .card:focus-visible {
  border-color: var(--hair-2);
  background: rgba(16, 20, 32, 0.88);
}
.card:hover .card__name { color: var(--aurum); }

.panel__all {
  margin: 1.95rem 0 0;
  opacity: 0;
  animation: cardIn 580ms var(--ease) both;
  animation-delay: calc(60ms + var(--i) * 95ms);
}
.panel__link {
  padding-bottom: 2px;
  font-size: 0.92rem;
  color: var(--text);
  border-bottom: 1px solid var(--hair-2);
  transition: color var(--fast) linear, border-color var(--fast) linear;
}
.panel__link:hover { color: var(--aurum); border-bottom-color: var(--aurum); }

/* ============================================================
   Projects — index on the left, specimen on the right
   ============================================================ */

.sift { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 2rem; }
.sift button {
  padding: 0.2rem 0;
  font-size: 0.9rem;
  color: var(--mute);
  border-bottom: 1px solid transparent;
  transition: color var(--fast) linear, border-color var(--fast) linear;
}
.sift button:hover { color: var(--text); }
.sift button[aria-pressed="true"] { color: var(--ice); border-bottom-color: var(--aurum); }

.index {
  max-width: 1120px;
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

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

.roll button {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  width: 100%;
  padding: 0.85rem 0.4rem 0.85rem 0;
  text-align: left;
  border-bottom: 1px solid var(--hair);
  color: var(--text);
  transition: color var(--fast) linear, padding-left var(--mid) var(--ease);
}
.roll button:hover { color: var(--ice); padding-left: 0.5rem; }
.roll button[aria-selected="true"] { color: var(--ice); padding-left: 0.5rem; }
.roll button[aria-selected="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 1.15em;
  margin-top: -0.575em;
  background: var(--aurum);
}
.roll li { position: relative; }
.roll__title { flex: 1; font-size: 1.02rem; font-weight: 300; }

.specimen.is-fresh { animation: resolve 560ms var(--ease) both; }

.specimen { position: sticky; top: calc(var(--nav) + 2rem); }
.specimen__kind { color: var(--aurum); }
.specimen__title { margin: 0.9rem 0 1.2rem; }
.specimen__summary { max-width: 46ch; font-size: 1.05rem; }

.spec {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 0.55rem 1.5rem;
  margin: 2.2rem 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--hair);
}
.spec dt { font-family: "Azeret Mono", ui-monospace, monospace; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); padding-top: 0.28em; }
.spec dd { color: var(--text); font-size: 0.95rem; }

.link {
  display: inline-block;
  padding-bottom: 2px;
  color: var(--ice);
  text-decoration: none;
  border-bottom: 1px solid var(--aurum);
  transition: color var(--fast) linear;
}
.link:hover { color: var(--aurum); }

/* ============================================================
   Downloads — one row per file, specs in aligned columns
   ============================================================ */

.releases { max-width: 1120px; border-top: 1px solid var(--hair); }

.release {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem 2.5rem;
  padding: 1.45rem 0.25rem;
  border-bottom: 1px solid var(--hair);
  transition: background-color var(--fast) linear;
}
.release:hover { background: rgba(21, 25, 40, 0.4); }

.release__name {
  font-size: 1.35rem;
  font-weight: 200;
  letter-spacing: 0.015em;
  color: var(--ice);
  line-height: 1.2;
}
.release__note { font-size: 0.94rem; line-height: 1.55; margin: 0.25rem 0 0; max-width: 44ch; }

/* fixed column widths so the specs line up down the whole list */
.release__spec {
  display: grid;
  grid-template-columns: 4.5rem 7.5rem 4rem 6rem;
  gap: 0 1.5rem;
}
.release__spec i {
  display: block;
  font-style: normal;
  font-family: "Azeret Mono", ui-monospace, monospace;
  font-size: 0.56rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
}
.release__spec b {
  display: block;
  margin-top: 0.3rem;
  font-family: "Azeret Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text);
}

.get {
  display: inline-block;
  padding: 0.62rem 1.2rem;
  border: 1px solid var(--hair-2);
  color: var(--text);
  font-size: 0.88rem;
  text-decoration: none;
  white-space: nowrap;
  text-align: center;
  transition: color var(--mid) var(--ease),
              border-color var(--mid) var(--ease),
              background-color var(--mid) var(--ease);
}
a.get:hover, a.get:focus-visible {
  color: var(--void);
  background: var(--aurum);
  border-color: var(--aurum);
}
.get--off { color: var(--mute); border-color: var(--hair); cursor: default; }

/* ============================================================
   About
   ============================================================ */

.about { max-width: 62ch; }

.years { margin: 3rem 0; border-top: 1px solid var(--hair); }
.years > div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 0.3rem 1.5rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--hair);
}
.years dt { padding-top: 0.35em; }
.years h3 { font-size: 1.2rem; font-weight: 300; color: var(--ice); }
.years p { font-size: 0.94rem; margin: 0.15rem 0 0; }

.kit { display: grid; gap: 1.4rem; margin-bottom: 3rem; }
.kit h4 { font-size: 0.95rem; font-weight: 400; color: var(--ice); margin-bottom: 0.55rem; }
.kit ul { display: flex; flex-wrap: wrap; gap: 0.4rem 0.5rem; }
.kit li {
  font-family: "Azeret Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--text);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--hair);
}

.reach { display: flex; flex-wrap: wrap; gap: 1.6rem; }

/* ============================================================
   Responsive
   ============================================================ */

/* between roughly 900 and 1080 the four spec columns crowd the name,
   so the name takes its own line and the specs sit under it */
@media (max-width: 1080px) {
  .release { grid-template-columns: minmax(0, 1fr) auto; row-gap: 1.1rem; }
  .release__id { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  :root { --nav: 58px; }
  .mark b { display: none; }
  .nav { gap: 1.05rem; }
  .nav__item { font-size: 0.82rem; }
  .index { grid-template-columns: 1fr; gap: 2.5rem; }
  .specimen { position: static; }
  .picker { grid-template-columns: 1fr; }
  .picker__list { border-right: 0; border-bottom: 1px solid var(--hair); }
  .picker__panel { padding-inline: 0; }
  .status { gap: 1.3rem; font-size: 0.55rem; letter-spacing: 0.12em; }

  .release { grid-template-columns: 1fr; gap: 1.1rem; }
  .release__spec { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem 1.5rem; }
  .get { justify-self: start; }
}

@media (max-width: 560px) {
  .nav { gap: 0.75rem; }
  .nav__item { font-size: 0.75rem; letter-spacing: 0.01em; }
  .status__records { display: none; }
  .release__name { font-size: 1.22rem; }
  .years > div { grid-template-columns: 1fr; }
  .spec { grid-template-columns: 1fr; gap: 0.1rem 0; }
  .spec dd { margin-bottom: 0.7rem; }
}

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .card, .panel__all { opacity: 1; transform: none; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   Powiększona treść "O mnie"
   16px było za małe przy tej długości tekstu. Teraz ~18.7px,
   czyli o dwa punkty typograficzne więcej.
   ============================================================ */

.about > p { font-size: 1.17rem; line-height: 1.78; }
.kit li { font-size: 0.7rem; }
