/* Jakub Siuda – portfolio. One typeface (Schibsted Grotesk) plus a hand for chart notes (Caveat). */

@font-face { font-family: "Schibsted Grotesk"; font-weight: 400; font-display: swap;
  src: url("fonts/schibsted-grotesk-latin-ext-400-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: "Schibsted Grotesk"; font-weight: 400; font-display: swap;
  src: url("fonts/schibsted-grotesk-latin-400-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: "Schibsted Grotesk"; font-weight: 500; font-display: swap;
  src: url("fonts/schibsted-grotesk-latin-ext-500-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: "Schibsted Grotesk"; font-weight: 500; font-display: swap;
  src: url("fonts/schibsted-grotesk-latin-500-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: "Schibsted Grotesk"; font-weight: 700; font-display: swap;
  src: url("fonts/schibsted-grotesk-latin-ext-700-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: "Schibsted Grotesk"; font-weight: 700; font-display: swap;
  src: url("fonts/schibsted-grotesk-latin-700-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: "Schibsted Grotesk"; font-weight: 800; font-display: swap;
  src: url("fonts/schibsted-grotesk-latin-ext-800-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: "Schibsted Grotesk"; font-weight: 800; font-display: swap;
  src: url("fonts/schibsted-grotesk-latin-800-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: "Caveat"; font-weight: 600; font-display: swap;
  src: url("fonts/caveat-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Caveat"; font-weight: 600; font-display: swap;
  src: url("fonts/caveat-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
  --paper: #f3f5f7;
  --sheet: #fbfcfd;
  --ink: #172033;
  --ink-2: #4d5970;
  --rule: #d3d9e0;
  --signal: #2457d6;
  --alarm: #d7352b;
  --marker: #ffdd57;
  --hand: "Caveat", "Segoe Print", cursive;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 66ch;
  --pad: clamp(20px, 5vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  font-feature-settings: "tnum" 0;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--signal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; }
.skip:focus { left: 8px; z-index: 10; }

.wrap { max-width: 1160px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* ------------------------------------------------------------------ header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.top .name { font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.top nav { display: flex; gap: clamp(14px, 2.4vw, 28px); align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.top nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 0.97rem; }
.top nav a:hover { color: var(--ink); }
.top nav .cv { color: var(--ink); border: 1.5px solid var(--ink); padding: 6px 14px; border-radius: 999px; }
.top nav .cv:hover { background: var(--ink); color: var(--sheet); }

/* ------------------------------------------------------------------ hero */
.hero { padding-top: clamp(20px, 4vw, 44px); }
.hero-text { display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 3vw, 36px); align-items: start; }
.hero-text img { width: clamp(84px, 11vw, 132px); aspect-ratio: 1; }
h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(2.9rem, 7.4vw, 5.4rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
}
.lede {
  margin: 0.45em 0 0;
  max-width: 40ch;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.sub { margin: 1.1em 0 0; max-width: 58ch; color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 22px; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: 12px 22px; border-radius: 999px; border: 2px solid var(--ink);
}
.btn.primary { background: var(--ink); color: var(--sheet); }
.btn.primary:hover { background: var(--signal); border-color: var(--signal); }
.btn.ghost { color: var(--ink); }
.btn.ghost:hover { background: var(--sheet); }
.actions .quiet { font-weight: 500; }

/* the one bold element: an annotated chart from real work */
.exhibit { margin: clamp(28px, 4vw, 44px) 0 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px;
  padding: clamp(14px, 2.2vw, 28px) clamp(10px, 2vw, 28px) 12px; }
.exhibit .signal { width: 100%; height: auto; overflow: visible; }
.exhibit figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; color: var(--ink-2); font-size: 0.92rem;
  border-top: 1px solid var(--rule); margin-top: 6px; padding-top: 12px; }
.exhibit figcaption strong { color: var(--ink); font-weight: 700; }
.signal .band { fill: #e6eaef; opacity: 0.55; }
.signal .centre { stroke: var(--ink-2); stroke-width: 1; opacity: 0.45; }
.signal .limit { stroke: var(--ink); stroke-width: 1.4; stroke-dasharray: 6 5; }
.signal .axis { stroke: var(--rule); stroke-width: 1.2; }
.signal .tick { stroke: var(--rule); }
.signal .ax { font: 500 15px var(--sans); fill: var(--ink-2); }
.signal .ax.end { text-anchor: end; }
.signal .fail { stroke: var(--alarm); stroke-width: 1.4; opacity: 0.85; }
.signal .failmark { fill: var(--alarm); }
.signal .trace { fill: none; stroke: var(--signal); stroke-width: 1.7; stroke-linejoin: round; }
.signal .over circle { fill: var(--alarm); }
.signal .hand { font: 600 27px var(--hand); fill: var(--ink); paint-order: stroke; stroke: var(--sheet); stroke-width: 7px; stroke-linejoin: round; }
.exhibit .mobile-notes { display: none; }
.signal .lab { paint-order: stroke; stroke: var(--sheet); stroke-width: 5px; fill: var(--ink); }
.signal .hand.end { text-anchor: end; }
.signal .arrow { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-motion: no-preference) {
  .signal .trace { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s cubic-bezier(.45,.05,.2,1) .25s forwards; }
  .signal .over, .signal .note { opacity: 0; animation: appear .6s ease-out forwards; }
  .signal .over { animation-delay: 2.4s; }
  .signal .note-b { animation-delay: 2.8s; }
  .signal .note-a { animation-delay: 3.3s; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes appear { to { opacity: 1; } }
}

/* ------------------------------------------------------------------ sections */
section { padding-top: clamp(64px, 10vw, 120px); }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: clamp(24px, 4vw, 40px); max-width: var(--measure); }
h2 { margin: 0; font-size: clamp(1.9rem, 4.2vw, 2.9rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; }
.sec-head p { margin: 0; color: var(--ink-2); }
h3 { margin: 0; font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; }

/* highlighter on the numbers that matter */
mark {
  background: linear-gradient(transparent 52%, var(--marker) 52%, var(--marker) 92%, transparent 92%);
  color: inherit; padding: 0 0.08em; font-weight: 700;
}

/* featured case studies */
.case { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 56px); align-items: start;
  padding: clamp(28px, 4vw, 44px) 0; border-top: 2px solid var(--ink); }
.case + .case { margin-top: clamp(24px, 4vw, 40px); }
.case .question { margin: 14px 0 0; color: var(--ink-2); max-width: 52ch; }
.results { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.results li { padding-left: 18px; position: relative; max-width: 54ch; }
.results li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 2px; background: var(--ink); }
.built { margin: 22px 0 0; font-size: 0.95rem; color: var(--ink-2); }
.links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 18px 0 0; padding: 0; list-style: none; font-weight: 700; }
.case figure { margin: 0; }
.case figure img { border: 1px solid var(--rule); border-radius: 4px; background: #fff; }
.case figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--ink-2); }
.case .note { font-size: 0.92rem; color: var(--ink-2); margin: 16px 0 0; }

/* more analyses: a plain list, lighter than the featured work */
.more { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.more li { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) 7.5rem; gap: 8px 28px; padding: 18px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.more .t { font-weight: 700; }
.more .t span { display: block; font-weight: 400; color: var(--ink-2); font-size: 0.92rem; }
.more .r { color: var(--ink); }
.more a { font-weight: 700; white-space: nowrap; justify-self: end; }

/* skills with proof: which project used what */
.matrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.matrix { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 0.97rem; }
.matrix caption { text-align: left; color: var(--ink-2); padding-bottom: 14px; caption-side: top; }
.matrix th, .matrix td { padding: 12px 10px; border-bottom: 1px solid var(--rule); text-align: center; vertical-align: middle; }
.matrix thead th { font-weight: 700; font-size: 0.9rem; vertical-align: bottom; border-bottom: 2px solid var(--ink); }
.matrix thead th:first-child, .matrix tbody th { text-align: left; }
.matrix tbody th { font-weight: 700; }
.matrix tbody th span { display: block; font-weight: 400; color: var(--ink-2); font-size: 0.88rem; }
.matrix td .y { display: inline-block; width: 13px; height: 13px; border-radius: 50%; background: var(--signal); }
.matrix td .n { display: inline-block; width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--rule); }
.matrix td { position: relative; }
.matrix .used-in { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* background */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 56px); }
.about p { margin: 0 0 1em; max-width: 56ch; }
.about .big { font-size: clamp(1.2rem, 2.2vw, 1.5rem); line-height: 1.35; font-weight: 500; letter-spacing: -0.01em; }
ol.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--ink); }
.timeline li { position: relative; padding: 0 0 26px 26px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 0.5em; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
.timeline li.now::before { background: var(--signal); border-color: var(--signal); }
.timeline .when { font-weight: 700; font-variant-numeric: tabular-nums; }
.timeline .role { font-weight: 700; display: block; }
.timeline p { margin: 4px 0 0; color: var(--ink-2); max-width: 54ch; }
.facts { margin: 8px 0 0; padding: 0; list-style: none; color: var(--ink-2); display: grid; gap: 6px; }

/* contact */
.contact { padding-bottom: clamp(56px, 9vw, 110px); }
.contact .mail { display: inline-block; font-size: clamp(1.6rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.035em; color: var(--ink);
  text-decoration-color: var(--marker); text-decoration-thickness: 0.18em; text-underline-offset: 0.12em; text-decoration-skip-ink: none; overflow-wrap: anywhere; }
.contact .mail:hover { color: var(--signal); }
.contact .elsewhere { display: flex; flex-wrap: wrap; gap: 10px 26px; list-style: none; margin: 26px 0 0; padding: 0; font-weight: 700; }

footer { padding-bottom: 40px; color: var(--ink-2); font-size: 0.88rem; }
footer p { margin: 0; border-top: 1px solid var(--rule); padding-top: 22px; }

/* ------------------------------------------------------------------ small screens */
@media (max-width: 860px) {
  .case, .about { grid-template-columns: minmax(0, 1fr); }
  .case figure { order: -1; }
  .more li { grid-template-columns: minmax(0, 1fr); }
  .more a { justify-self: start; }
}
@media (max-width: 640px) {
  table.matrix { min-width: 0; }
  .matrix thead, .matrix td { display: none; }
  .matrix tbody th { padding-left: 0; }
  .matrix .used-in { display: block; color: var(--ink); margin-top: 4px; }
  .top { flex-direction: column; align-items: flex-start; }
  .top nav { justify-content: flex-start; }
  .hero-text { grid-template-columns: minmax(0, 1fr); }
  .signal .note { display: none; }
  .exhibit .mobile-notes { display: block; color: var(--ink); font: 600 1.35rem/1.2 var(--hand); }
  .signal .ax { font-size: 20px; }
}

@media print {
  body { background: #fff; }
  .top nav, .actions, .skip { display: none; }
  section { padding-top: 32px; }
}
