/* ---------- Colours & fonts ---------- */
:root {
  --bg: #0b0c0f;
  --text: #f2f4f8;
  --muted: #a3aab7;
  --paper: #eef1f5;
  --ink: #0b0c0f;
  --blue: #2b3dff;
  --orange: #ff5a1f;
  --line: #2a2e36;
  --dots: rgba(255, 255, 255, 0.07);
  --display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f1eb;
    --text: #0b0c0f;
    --muted: #555b67;
    --paper: #ffffff;
    --line: #d5d2c9;
    --dots: rgba(0, 0, 0, 0.09);
    color-scheme: light;
  }
}

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(var(--dots) 1px, transparent 1.2px);
  background-size: 18px 18px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 72px 16px 40px;
}
@media (min-width: 700px) { .page { padding: 120px 32px 56px; } }

/* ---------- Intro ---------- */
.kicker {
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange);
}

.name {
  margin: 16px 0 28px;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: .9;
  letter-spacing: -0.02em;
  font-size: clamp(3rem, 13vw, 7.5rem);
}
.name span { display: block; width: fit-content; }
.name__last {
  margin-top: .08em;
  padding: .06em .16em .02em;
  background: var(--blue);
  color: #fff;
  box-shadow: .07em .07em 0 var(--orange);
}

.text {
  max-width: 34em;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--muted);
}

/* ---------- CV / GIT / EMAIL ---------- */
.cards {
  display: grid;
  gap: 18px;
  margin-top: 56px;
}
@media (min-width: 700px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  min-height: 150px;
  padding: 20px 22px;
  border: 3px solid var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translate(-4px, -4px); }

.card__title {
  font-family: var(--display);
  font-size: clamp(2.2rem, 6vw, 2.8rem);
  line-height: 1;
}
.card__sub { font-weight: 600; font-size: .95rem; word-break: break-word; }
.card__arrow {
  position: absolute;
  top: 16px; right: 18px;
  font-size: 1.4rem;
  transition: transform .15s ease;
}
.card:hover .card__arrow { transform: translate(3px, -3px); }

.card--blue   { background: var(--blue); color: #fff; }
.card--paper  { background: var(--paper); color: var(--ink); }
.card--orange { background: var(--orange); color: var(--ink); }
.card--blue:hover   { box-shadow: 8px 8px 0 var(--orange); }
.card--paper:hover  { box-shadow: 8px 8px 0 var(--blue); }
.card--orange:hover { box-shadow: 8px 8px 0 var(--blue); }

/* ---------- Sections ---------- */
.section { margin-top: 72px; }

.heading {
  display: inline-block;
  margin-bottom: 24px;
  padding-bottom: 6px;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.1;
  border-bottom: 6px solid var(--orange);
}
.heading--blue { border-bottom-color: var(--blue); }

/* ---------- Stack ---------- */
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.stack li {
  padding: 7px 14px;
  font-weight: 700;
  font-size: .95rem;
  border: 2px solid var(--line);
}
.stack li:hover { border-color: var(--blue); }

/* ---------- Stack filters ---------- */
.filters { display: none; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.js .filters { display: flex; }   /* filters only make sense with JS */
.chip {
  padding: 6px 14px;
  font: 700 .9rem var(--sans);
  color: var(--text);
  background: transparent;
  border: 2px solid var(--text);
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.chip:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }
.chip.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 3px 3px 0 var(--orange);
}
.stack li { transition: border-color .15s, opacity .2s; }
.stack li.is-dim { opacity: .2; }

/* ---------- Links ---------- */
.link-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 24px;
}
@media (min-width: 760px) { .link-groups { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.label {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 10px;
  font: 700 .8rem var(--sans);
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
}
.label--paper  { background: var(--paper); color: var(--ink); }
.label--blue   { background: var(--blue); color: #fff; }
.label--orange { background: var(--orange); color: var(--ink); }

.links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.links a {
  font-weight: 700;
  font-size: clamp(1.15rem, 3.2vw, 1.4rem);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
  text-decoration-color: var(--blue);
  transition: color .15s, text-decoration-color .15s;
}
.links li:nth-child(even) a { text-decoration-color: var(--orange); }
.links a:hover { color: var(--orange); text-decoration-color: currentColor; }

/* ---------- Footer ---------- */
.footer {
  width: min(816px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
  font-size: .85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
@media (min-width: 700px) { .footer { width: min(816px, calc(100% - 64px)); padding-bottom: 48px; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
