/* Gloock: static, single weight. */
@font-face {
  font-family: "Gloock";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/gloock-400.woff2") format("woff2");
}

/* Plus Jakarta Sans: one variable file, wght axis 200–800.
   The range in the descriptor is what lets a single file serve 300 (tagline,
   lede), 400 (body) and 700 (<strong>) — no duplicate files, no faux bold. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/pjs-var.woff2") format("woff2");
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }

/* Smooth scroll only when motion is welcome */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Base */
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }

/* Section headings (the ones the nav points at) carry the highlight.
   Scoped to #content so the sidebar h1 stays near-black. Sub-headings (h3)
   deliberately stay --fg: accenting both levels was too much colour. */
#content h2 { color: var(--highlight); }

p { max-width: var(--measure); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--bg);
  padding: var(--space-2) var(--space-3);
  z-index: 100;
}
.skip-link:focus-visible { left: var(--space-3); top: var(--space-3); }

.layout {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

/* Content sections — separated by space alone, no rules. */
#content > section {
  padding-block: var(--space-5);
}

/* Desktop: two columns, sticky full-height sidebar */
@media (min-width: 1024px) {
  .layout {
    display: grid;
    grid-template-columns: minmax(0, 400px) 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
  }
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    padding-block: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }
}

/* Tablet / mobile: single column, sidebar static on top */
@media (max-width: 1023px) {
  .sidebar {
    padding-block: var(--space-5) var(--space-3);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
  }
}

.sidebar__role { color: var(--muted); font-size: var(--step-0); margin-top: var(--space-1); }
.sidebar__tagline { color: var(--fg); font-size: var(--step-0); margin-top: var(--space-3); font-weight: 300; }

.process-strip {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  font-size: var(--step--1);
}
.process-strip li {
  border: 1px solid var(--highlight-edge);
  background: var(--highlight-fill);
  border-radius: 999px;
  padding: 0.2em 0.7em;
  color: var(--highlight);
}

.section-nav ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.section-nav a {
  display: block;
  padding: 0.3em 0;
  color: var(--muted);
  text-decoration: none;
  font-size: var(--step--1);
  letter-spacing: 0.02em;
  border-left: 2px solid transparent;
  padding-left: var(--space-3);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.section-nav a:hover { color: var(--fg); }
.section-nav a.is-active { color: var(--accent); border-left-color: var(--accent); }

.sidebar__footer { margin-top: auto; display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.sidebar__photo { border-radius: 50%; width: 72px; height: 72px; object-fit: cover; }
.socials { list-style: none; padding: 0; display: flex; gap: var(--space-3); font-size: var(--step--1); }

/* Contact links keep the original muted blue — the only cool colour on the page,
   so "reach me" stays findable against the warm amber ramp. */
.socials a, .contact-list a { color: var(--accent-contact); }
[data-theme-toggle] {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 50%;
  width: 2.2rem; height: 2.2rem;
  cursor: pointer;
  font-size: 1rem;
}

/* On mobile the nav becomes a horizontal, sticky wayfinding bar */
@media (max-width: 1023px) {
  .section-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg);
    margin-inline: calc(-1 * var(--space-4));
    padding: var(--space-2) var(--space-4);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
  }
  .section-nav ul { flex-direction: row; gap: var(--space-3); }
  .section-nav a { border-left: 0; padding-left: 0; white-space: nowrap; }
  .section-nav a.is-active { border-left: 0; text-decoration: underline; text-decoration-color: var(--accent); }
  .sidebar__footer { margin-top: var(--space-3); }
}

.section__body { margin-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); }
.lede { font-size: var(--step-1); font-weight: 300; color: var(--fg); }
.value-list, .contact-list { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-2); max-width: var(--measure); }
.value-list li { padding-left: var(--space-4); position: relative; }
.value-list li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.contact-list { gap: var(--space-1); }
.langs { margin-top: var(--space-4); color: var(--muted); font-size: var(--step--1); }

.role { display: flex; flex-direction: column; gap: var(--space-2); }
.role + .role { margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--border); }
.role__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3); }
.role__meta { color: var(--muted); font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.product-list { list-style: none; padding-left: 0; display: flex; flex-direction: column; gap: var(--space-3); max-width: var(--measure); }
.product-list li { padding-left: var(--space-4); position: relative; }
.product-list li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 0.6em; height: 1px; background: var(--accent); }
.role__also { color: var(--muted); font-style: italic; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition: none !important; scroll-behavior: auto !important; }
}
/* Underlines follow each link's own colour via currentColor, so bronze body links
   and blue contact links stay self-consistent without a second pair of rules. */
a:not(.section-nav a):not(.skip-link) { text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
a:not(.section-nav a):hover { text-decoration-color: currentColor; }
