/* Reusable portfolio sections. Each block is self-contained: it reads only the
   custom properties below, so it can be lifted into another site (for example
   Studio) by redefining them. Prefix: sx- */
.sx {
  --sx-bg: var(--surface, #fff);
  --sx-ink: var(--ink, #12141a);
  --sx-muted: var(--muted, #5b616e);
  --sx-line: var(--line, #e3e6ec);
  --sx-accent: var(--accent, #0f6b7a);
  --sx-on-accent: var(--on-accent, #fff);
  --sx-tint: var(--tint, #e8f3f5);
  --sx-max: var(--max, 68rem);
  --sx-pad: var(--pad, 24px);
  background: var(--sx-bg);
  color: var(--sx-ink);
}
.sx-wrap { max-width: var(--sx-max); margin: 0 auto; padding: 0 var(--sx-pad); }
.sx-label { margin: 0 0 1rem; font-size: .8125rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--sx-accent); }

/* Hero: statement plus facts */
.sx-hero { padding: clamp(3rem, 8vw, 6.5rem) 0 0; border-bottom: 1px solid var(--sx-line); }
.sx-hero h1, .sx-hero .sx-h1 { margin: 0 0 1.25rem; max-width: 16ch; font-size: clamp(2.5rem, 1.4rem + 5.2vw, 5.25rem); line-height: 1.02; letter-spacing: -.035em; font-weight: 700; }
.sx-hero .sx-lead { max-width: 56ch; margin: 0 0 1.75rem; font-size: clamp(1.05rem, 1rem + .5vw, 1.3rem); line-height: 1.55; color: var(--sx-muted); }
.sx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.sx-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.25rem; border-radius: 8px; background: var(--sx-accent); color: var(--sx-on-accent); font-weight: 650; text-decoration: none; }
.sx-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--sx-accent); font-weight: 600; text-underline-offset: 3px; }
.sx-btn:focus-visible, .sx-link:focus-visible { outline: 3px solid var(--sx-accent); outline-offset: 3px; }
.sx-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--sx-line); }
.sx-facts li { padding: 1.1rem 1.25rem 1.25rem 0; }
.sx-facts strong { display: block; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); line-height: 1.1; letter-spacing: -.02em; }
.sx-facts span { display: block; margin-top: .35rem; font-size: .9375rem; color: var(--sx-muted); }

/* Hero variant: portrait split */
.sx-hero--split .sx-split { display: grid; gap: 2rem; align-items: center; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.sx-hero--split .sx-actions { margin-bottom: 0; }
.sx-hero--split img { width: 100%; max-width: 320px; height: auto; border-radius: 12px; border: 1px solid var(--sx-line); }
@media (min-width: 768px) { .sx-hero--split .sx-split { grid-template-columns: 1.6fr 1fr; } .sx-hero--split img { justify-self: end; } }

/* Section header */
.sx-section { padding: clamp(3rem, 7vw, 5.5rem) 0; border-bottom: 1px solid var(--sx-line); }
.sx-section h1, .sx-section h2 { margin: 0 0 .75rem; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1.1; letter-spacing: -.02em; }
.sx-section .sx-intro { max-width: 60ch; margin: 0 0 2rem; color: var(--sx-muted); }

/* Placement: role card plus capability rows */
.sx-role { display: grid; gap: 2rem; }
.sx-role dl { margin: 0; }
.sx-role dt { font-weight: 650; }
.sx-role dd { margin: .25rem 0 1.25rem; color: var(--sx-muted); }
@media (min-width: 768px) { .sx-role { grid-template-columns: 1fr 2fr; } }
.sx-note { margin-top: 1.5rem; font-size: .9375rem; color: var(--sx-muted); }

/* Education rows */
.sx-rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--sx-line); }
.sx-rows li { display: grid; gap: .25rem 2rem; padding: 1.1rem 0; border-bottom: 1px solid var(--sx-line); }
.sx-rows strong { font-size: 1.125rem; }
.sx-rows span { color: var(--sx-muted); }
@media (min-width: 768px) { .sx-rows li { grid-template-columns: 1fr 1fr; } }

[data-theme="dark"] .sx { --sx-bg: var(--surface, #14161b); --sx-ink: var(--ink, #f1f3f6); --sx-muted: var(--muted, #aab1bd); --sx-line: var(--line, #2a2e37); --sx-accent: var(--accent, #5cc2d1); --sx-on-accent: #0b0d11; }

/* Skills grid: heading, blurb, chips, evidence link */
.sx-skill-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .sx-skill-grid { grid-template-columns: repeat(2, 1fr); } }
.sx-skill { padding: 1.5rem; border: 1px solid var(--sx-line, var(--line)); border-radius: 12px; background: var(--sx-bg, var(--surface)); display: flex; flex-direction: column; gap: .75rem; }
.sx-skill h3 { margin: 0; font-size: 1.2rem; letter-spacing: -.01em; }
.sx-skill p { margin: 0; color: var(--sx-muted, var(--muted)); }
.sx-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.sx-chips li { padding: .25rem .6rem; border: 1px solid var(--sx-line, var(--line)); border-radius: 999px; font-size: .875rem; }
.sx-evidence { margin-top: auto !important; font-size: .9375rem; }
.sx-evidence a { color: var(--sx-accent, var(--accent)); text-underline-offset: 3px; display: inline-block; min-height: 24px; }
