/* Premium Skills — design-language pass.
 *
 * Every color and shadow comes from the vendored design-system tokens
 * (vendor/tokens.css); neutrals with no token (hairlines, soft text,
 * canvas tint) are derived from token vars via color-mix so the palette
 * stays single-sourced. Geometry (radii, borders, states) follows the
 * Figma component-set previews:
 *   - buttons: ~10px radius, bold Title Case labels, outline variants
 *     invert to filled when pressed, double-ring focus
 *   - callouts: white field, 3px premium-red border, ~14px radius,
 *     red warning icon, bold title + regular body
 *   - pop-ups/cards: 8-12px radius, soft elevation shadows
 *   - dividers: 1px hairlines in gray and red variants
 * Gotham is licensed and not shipped; the stack falls back while the
 * token scale/letter-spacing keeps the hierarchy reading Premium. */

:root {
  --font-stack: "Gotham", "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Gotham 325/400 aren't available in fallback fonts; preserve the
   * token weight *relationships* one step up: body 325→400,
   * bold/heading 400→600, button labels →700 (previews render bold). */
  --weight-body: 400;
  --weight-strong: 600;
  --weight-button: 700;

  /* Neutrals derived from tokens (no standalone gray tokens exist). */
  --tint-canvas: color-mix(in srgb, var(--color-dark-gray) 3%, var(--color-white));
  --tint-hairline: color-mix(in srgb, var(--color-dark-gray) 17%, var(--color-white));
  --tint-chip: color-mix(in srgb, var(--color-dark-gray) 6%, var(--color-white));
  --tint-soft-text: color-mix(in srgb, var(--color-dark-gray) 64%, var(--color-white));
  --red-pressed: color-mix(in srgb, var(--color-premium-red) 78%, var(--color-dark-gray));

  --radius-button: 10px;
  --radius-card: 12px;
  --radius-callout: 14px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--tint-canvas);
  color: var(--color-dark-gray);
  font-family: var(--font-stack);
  font-size: var(--font-body-body-size);
  font-weight: var(--weight-body);
  line-height: var(--font-body-body-line-height);
  letter-spacing: var(--font-body-body-bold-letter-spacing);
}

::selection { background: var(--color-iconic-yellow); color: var(--color-dark-gray); }

/* Double-ring focus, as in the button component set's focus row. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-dark-gray);
  outline-offset: 3px;
  border-radius: var(--radius-button);
}

/* ---------------------------------------------------------------- icons
 * UI glyphs ship as #272727-filled SVGs; masks let them take token
 * colors via currentColor. */
.icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.icon-arrow-left { --icon: url("/static/vendor/icons/arrow-left.svg"); }
.icon-arrow-right { --icon: url("/static/vendor/icons/arrow-right.svg"); }
.icon-alert { --icon: url("/static/vendor/icons/alert-warning.svg"); }
.icon-info { --icon: url("/static/vendor/icons/information.svg"); }
.icon-doc { --icon: url("/static/vendor/icons/document-reports.svg"); }

/* ---------------------------------------------------------------- header */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--tint-hairline);
  box-shadow: var(--shadow-elevation-1);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .bar {
  max-width: 1160px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  color: var(--color-dark-gray);
}

.brand-logo { height: 34px; width: auto; display: block; }

.brand-suffix::after { content: "."; color: var(--color-premium-red); }

/* Lockup divider: vertical hairline, as in the divider component set. */
.brand-suffix {
  border-left: 1px solid var(--tint-hairline);
  padding-left: 20px;
  font-size: var(--font-headings-h5-size);
  font-weight: var(--weight-strong);
  line-height: 1;
  letter-spacing: var(--font-headings-h5-letter-spacing);
}

.site-header .header-aside {
  margin-left: auto;
  font-size: var(--font-body-captions-size);
  font-weight: var(--weight-body);
  line-height: var(--font-body-captions-line-height);
  color: var(--tint-soft-text);
}

/* ---------------------------------------------------------------- layout */
main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 32px 96px;
}

.hero { margin: 8px 0 56px; max-width: 720px; }

.hero h1 {
  margin: 0 0 12px;
  font-size: var(--font-headings-h1-size);
  font-weight: var(--weight-strong);
  line-height: var(--font-headings-h1-line-height);
  letter-spacing: var(--font-headings-h1-letter-spacing);
}

/* Headings end on a premium-red full stop — see "Heading." / "Call Out."
 * in the pop-up and callout component sets. */
.red-stop { color: var(--color-premium-red); }

.hero .lede {
  margin: 0;
  color: var(--tint-soft-text);
  font-size: var(--font-body-body-size);
  line-height: var(--font-body-body-line-height);
}

/* ---------------------------------------------------------------- states */
.status {
  margin: 0;
  color: var(--tint-soft-text);
  font-size: var(--font-body-body-size);
}

/* Callout geometry from the callout component set: white field, 3px
 * red border, generous radius, icon beside a bold title. */
.callout {
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 16px;
  align-items: start;
  max-width: 560px;
  padding: 24px 28px;
  background: var(--color-white);
  border: 3px solid var(--color-premium-red);
  border-radius: var(--radius-callout);
  box-shadow: var(--shadow-elevation-2);
}

.callout .icon { width: 28px; height: 28px; margin-top: 2px; color: var(--color-premium-red); }

/* Callout titles end on a full stop, as in the component set. */
.callout-title::after { content: "."; }

.callout-title {
  margin: 0 0 4px;
  font-size: var(--font-headings-h5-size);
  font-weight: var(--weight-strong);
  line-height: var(--font-headings-h5-line-height);
  letter-spacing: var(--font-headings-h5-letter-spacing);
}

.callout-body { margin: 0; color: var(--tint-soft-text); }

/* Neutral variant (empty state): dark hairline border, info icon. */
.callout.neutral { border-color: var(--tint-hairline); }
.callout.neutral .icon { color: var(--color-dark-gray); }

/* ---------------------------------------------------------------- buttons
 * Component-set geometry: ~10px radius, 2px stroke on outline variants,
 * bold Title Case label, outline inverts to filled when active. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: var(--radius-button);
  border: 2px solid var(--color-dark-gray);
  background: var(--color-white);
  color: var(--color-dark-gray);
  text-decoration: none;
  font-family: var(--font-stack);
  font-size: var(--font-body-body-size);
  font-weight: var(--weight-button);
  line-height: var(--font-body-body-line-height);
  letter-spacing: var(--font-body-body-bold-letter-spacing);
  cursor: pointer;
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out),
    border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.btn:hover,
.btn:active,
.btn.is-active {
  background: var(--color-dark-gray);
  color: var(--color-white);
}

.btn-red {
  border-color: var(--color-premium-red);
  color: var(--color-premium-red);
}

.btn-red:hover,
.btn-red:active,
.btn-red.is-active {
  background: var(--color-premium-red);
  border-color: var(--color-premium-red);
  color: var(--color-white);
}

.btn-red:active { background: var(--red-pressed); border-color: var(--red-pressed); }

/* ---------------------------------------------------------------- catalog */
.dept { margin: 0 0 56px; }

.dept-name {
  margin: 0 0 4px;
  text-transform: capitalize;
  font-size: var(--font-headings-h4-size);
  font-weight: var(--weight-strong);
  line-height: var(--font-headings-h4-line-height);
  letter-spacing: var(--font-headings-h4-letter-spacing);
}

.dept-name::after { content: "."; color: var(--color-premium-red); }

/* Section divider: gray hairline with a premium-red lead segment —
 * the two divider variants from the component set, composed. */
.dept-rule {
  border: 0;
  height: 1px;
  margin: 0 0 24px;
  background: linear-gradient(
    to right,
    var(--color-premium-red) 0 56px,
    var(--tint-hairline) 56px 100%
  );
}

.skill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.skill-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 168px;
  padding: 24px;
  border-radius: var(--radius-card);
  border: 1px solid var(--tint-hairline);
  text-decoration: none;
  color: var(--color-dark-gray);
  background: var(--color-white);
  box-shadow: var(--shadow-elevation-1);
  transition: box-shadow 200ms var(--ease-out), transform 200ms var(--ease-out),
    border-color 200ms var(--ease-out);
}

.skill-card:hover {
  box-shadow: var(--shadow-elevation-2);
  border-color: var(--color-dark-gray);
  transform: translateY(-2px);
}

.skill-card:focus-visible { border-radius: var(--radius-card); }

.skill-name {
  font-size: var(--font-headings-h5-size);
  font-weight: var(--weight-strong);
  line-height: var(--font-headings-h5-line-height);
  letter-spacing: var(--font-headings-h5-letter-spacing);
  overflow-wrap: anywhere;
}

.skill-desc {
  margin: 0;
  color: var(--tint-soft-text);
  font-size: var(--font-body-captions-size);
  font-weight: var(--weight-body);
  line-height: var(--font-body-captions-line-height);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.skill-meta {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--tint-hairline);
}

/* Version chip: a nod to the license-plate token — bordered field,
 * tight caption type. */
.skill-version {
  padding: 3px 10px;
  border: 1.5px solid var(--color-dark-gray);
  border-radius: 5px;
  background: var(--tint-chip);
  font-size: var(--font-body-captions-bold-size);
  font-weight: var(--weight-strong);
  line-height: var(--font-body-captions-bold-line-height);
  letter-spacing: 0.06em;
}

.skill-card .icon-arrow-right {
  width: 18px;
  height: 18px;
  color: var(--tint-soft-text);
  transition: transform 200ms var(--ease-out), color 200ms var(--ease-out);
}

.skill-card:hover .icon-arrow-right {
  color: var(--color-premium-red);
  transform: translateX(4px);
}

/* ---------------------------------------------------------------- skill page */
.skill-page .crumbs { margin: 0 0 32px; }

.markdown-panel {
  background: var(--color-white);
  border: 1px solid var(--tint-hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-elevation-1);
  padding: 40px 48px 48px;
}

.markdown > :first-child { margin-top: 0; }

.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4 {
  font-weight: var(--weight-strong);
  margin: 40px 0 12px;
}

.markdown h1 {
  font-size: var(--font-headings-h3-size);
  line-height: var(--font-headings-h3-line-height);
  letter-spacing: var(--font-headings-h3-letter-spacing);
}

.markdown h1::after { content: "."; color: var(--color-premium-red); }

.markdown h2 {
  font-size: var(--font-headings-h4-size);
  line-height: var(--font-headings-h4-line-height);
  letter-spacing: var(--font-headings-h4-letter-spacing);
  border-bottom: 1px solid var(--tint-hairline);
  padding-bottom: 8px;
}

.markdown h3,
.markdown h4 {
  font-size: var(--font-headings-h5-size);
  line-height: var(--font-headings-h5-line-height);
  letter-spacing: var(--font-headings-h5-letter-spacing);
}

.markdown p, .markdown li { line-height: var(--font-body-body-line-height); }

.markdown strong { font-weight: var(--weight-strong); }

.markdown code {
  font-family: var(--font-mono);
  font-size: var(--font-body-captions-size);
  background: var(--tint-chip);
  border: 1px solid var(--tint-hairline);
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0;
}

.markdown pre {
  background: var(--color-dark-gray);
  color: var(--color-white);
  padding: 20px 24px;
  border-radius: var(--radius-card);
  overflow-x: auto;
  box-shadow: var(--shadow-elevation-1);
}

.markdown pre code {
  background: none;
  border: 0;
  color: inherit;
  padding: 0;
  line-height: var(--font-body-body-line-height);
}

.markdown table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  margin: 16px 0;
  border: 1px solid var(--tint-hairline);
  border-radius: var(--radius-button);
  overflow: hidden;
  box-shadow: var(--shadow-elevation-1);
}

.markdown th {
  background: var(--color-dark-gray);
  color: var(--color-white);
  text-align: left;
  font-weight: var(--weight-strong);
  letter-spacing: var(--font-body-body-bold-letter-spacing);
}

.markdown th,
.markdown td { padding: 10px 16px; }

.markdown td { border-top: 1px solid var(--tint-hairline); }

.markdown tbody tr:nth-child(even) td { background: var(--tint-canvas); }

.markdown a {
  color: var(--color-premium-red);
  font-weight: var(--weight-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.markdown a:hover { color: var(--red-pressed); }

/* ---------------------------------------------------------------- references */
.refs { margin-top: 48px; }

.refs > h2 {
  margin: 0 0 4px;
  font-size: var(--font-headings-h5-size);
  font-weight: var(--weight-strong);
  line-height: var(--font-headings-h5-line-height);
  letter-spacing: var(--font-headings-h5-letter-spacing);
}

.refs > h2::after { content: "."; color: var(--color-premium-red); }

.refs ul {
  list-style: none;
  margin: 0 0 24px;
  padding: 16px 0 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--tint-hairline);
}

.refs .btn { font-size: var(--font-body-captions-bold-size); padding: 8px 16px; }

.refs .btn .icon { width: 16px; height: 16px; }

#ref-md:not(:empty) { margin-top: 8px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 720px) {
  .site-header .bar { padding: 14px 20px; }
  .site-header .header-aside { display: none; }
  main { padding: 32px 20px 64px; }
  .hero h1 {
    font-size: var(--font-headings-h2-size);
    line-height: var(--font-headings-h2-line-height);
    letter-spacing: var(--font-headings-h2-letter-spacing);
  }
  .markdown-panel { padding: 24px; }
}
