/* Shared tokens + placeholder page styles */

:root {
  --gold: #FFC627;
  --ink: #191919;
  --paper: #ffffff;
  --paper-alt: #f5f4f0;
  --muted: #5c5c5c;
  /* Page side margin: grows with the window (≈62px @1080, 91px @1440, 130px @1920, max 160px).
     Lower bound keeps the compact logo + nav from colliding at the 1080px breakpoint. */
  --pad: clamp(48px, 12vw - 24px, 160px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- Light / dark ----------
   <html data-theme="dark|light">, set before paint by the inline script in
   index.html and switched by the button in the header (js/header.js).
   Dark is the default. The gold logo plate and gold buttons look the same
   in both; everything else reads these tokens. */

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg-page: #121212;              /* main content                        */
  --bg-hero: #0f0f0f;
  --bg-chrome: #191919;            /* header and small-screen menu        */
  --bg-footer: #191919;
  --fg: #fff;                      /* text                                */
  --fg-rgb: 255, 255, 255;         /* text, for rgba() tints              */
  --accent: var(--gold);           /* gold for text and small marks       */
  --accent-2: rgb(255, 236, 196);  /* the General taxonomy's cream        */
  --shadow: rgba(0, 0, 0, .28);
}

[data-theme="light"] {
  color-scheme: light;
  --bg-page: #fff;
  --bg-hero: #faf9f6;
  --bg-chrome: #fff;
  --bg-footer: #f5f4f0;
  --fg: #191919;
  --fg-rgb: 25, 25, 25;
  --accent: #946c00;               /* gold dark enough to read on white   */
  --accent-2: #6e4f14;
  --shadow: rgba(0, 0, 0, .1);
}

@media (max-width: 1079px) { :root { --pad: clamp(20px, 5vw, 48px); } }
@media (max-width: 379px)  { :root { --pad: 16px; } }

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 24px);
}

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

body {
  margin: 0;
  padding-top: calc(var(--util-h) + var(--bar-h));
  font-family: var(--font);
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

/* Pages other than the home page keep the compact header (utility row slid away). */
.compact-page body { padding-top: var(--bar-h); }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  font: 600 14px/1 var(--font);
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}

.btn--sm { height: 28px; padding: 0 12px; font-size: 12.5px; }
.btn--lg { height: 48px; padding: 0 24px; font-size: 15px; }

.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover, .btn--gold:focus-visible { background: #fff; }
[data-theme="light"] .btn--gold:hover,
[data-theme="light"] .btn--gold:focus-visible { background: var(--ink); color: #fff; }

.btn--ghost { border-color: rgba(var(--fg-rgb), .45); color: var(--fg); }
.btn--ghost:hover, .btn--ghost:focus-visible { border-color: var(--fg); background: rgba(var(--fg-rgb), .08); }

/* Hero styles live in css/hero.css */

/* ---------- Main content ---------- */

.block { padding: 72px var(--pad); }

.block__inner {
  max-width: 1200px;
  margin-inline: auto;            /* centred on the page */
}

.block h2 {
  margin: 0 0 24px;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -.01em;
}

.block h2::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin-bottom: 16px;
  background: var(--gold);
}

.placeholder {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed rgba(var(--fg-rgb), .25);
  color: rgba(var(--fg-rgb), .6);
  font-size: 14px;
}

/* ---------- Footer ----------
   Two columns, centred as a pair and split by a hairline: the logo with
   LinkedIn under it | About and its links. The copyright line sits below. */

.site-footer {
  padding: 64px var(--pad) 36px;
  background: var(--bg-footer);
  color: rgba(var(--fg-rgb), .6);
  font-size: 13px;
}

.site-footer__inner {
  max-width: 1200px;
  margin-inline: auto;
}

.footer-cols {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding-right: 56px;
}

.footer-logo { display: block; }
.footer-logo img { display: block; width: 96px; height: 96px; }

.footer-nav a:focus-visible,
.footer-social:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.footer-social {
  display: block;
  color: rgba(var(--fg-rgb), .7);
  transition: color .2s;
}

.footer-social svg { display: block; width: 28px; height: 28px; fill: currentColor; }
.footer-social:hover,
.footer-social:focus-visible { color: var(--accent); }

.footer-nav {
  align-self: stretch;
  padding-left: 56px;
  border-left: 1px solid rgba(var(--fg-rgb), .14);
}

/* Same type as the main nav; gold sets it apart from its links. */
.footer-nav__title {
  margin: 0 0 6px;
  color: var(--accent);
  font: 600 15px/1.5 var(--font);
  letter-spacing: .01em;
}

.footer-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Same underline as the main nav */
.footer-nav a {
  position: relative;
  display: inline-block;
  padding: 7px 0;
  color: rgba(var(--fg-rgb), .86);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;            /* as in the main nav */
  text-decoration: none;
  transition: color .2s;
}

.footer-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible { color: var(--fg); }
.footer-nav a:hover::after,
.footer-nav a:focus-visible::after { transform: scaleX(1); }

/* Where the numbers come from (set left), and how to cite them: the links
   under it end on the block's right edge. */
.footer-note {
  max-width: 68ch;
  margin: 48px auto 0;
  text-align: left;
  line-height: 1.6;
}

.footer-note p { margin: 0; }

.footer-note__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px 24px;
  margin-top: 14px !important;
}

.footer-note__links a {
  color: rgba(var(--fg-rgb), .86);
  font-weight: 600;
  text-decoration: none;
  transition: color .2s;
}

.footer-note__links a:hover,
.footer-note__links a:focus-visible { color: var(--accent); }

.footer-stamp {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.footer-copy {
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(var(--fg-rgb), .12);
  text-align: center;
}

@media (max-width: 599px) {
  .footer-brand { padding-right: 32px; }
  .footer-nav { padding-left: 32px; }
}
