/* ==========================================================================
   AJ Cassarella — personal site
   Design tokens → base → layout → components → utilities → print
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg:          #0B0D10;
  --bg-elev:     #101419;
  --surface:     #151A21;
  --surface-2:   #1B212A;
  --line:        rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.17);
  --text:        #EDEFF2;
  --text-2:      #B7BFCA;
  --muted:       #8A94A2;
  --accent:      #E8B45C;
  --accent-2:    #F5D49A;
  --accent-dim:  rgba(232,180,92,.13);
  --accent-ink:  #171009;
  --shadow:      0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.65);
  --shadow-lg:   0 2px 4px rgba(0,0,0,.35), 0 32px 64px -24px rgba(0,0,0,.75);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --wrap: 1140px;
  --wrap-narrow: 760px;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;

  --step: clamp(64px, 9vw, 116px);
  --ease: cubic-bezier(.22,.61,.36,1);
}

:root[data-theme="light"] {
  --bg:          #FAF9F7;
  --bg-elev:     #FFFFFF;
  --surface:     #FFFFFF;
  --surface-2:   #F3F1ED;
  --line:        rgba(16,20,26,.11);
  --line-strong: rgba(16,20,26,.22);
  --text:        #14181D;
  --text-2:      #3E4854;
  --muted:       #646E7C;
  --accent:      #97670F;
  --accent-2:    #7A520A;
  --accent-dim:  rgba(151,103,15,.10);
  --accent-ink:  #FFFFFF;
  --shadow:      0 1px 2px rgba(16,20,26,.06), 0 10px 28px -14px rgba(16,20,26,.22);
  --shadow-lg:   0 2px 6px rgba(16,20,26,.07), 0 30px 60px -28px rgba(16,20,26,.30);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  font-feature-settings: "cv02","cv03","cv04","ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { margin: 0; font-weight: 620; letter-spacing: -.021em; line-height: 1.16; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

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

::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.wrap-narrow { max-width: var(--wrap-narrow); }
.section { padding-block: var(--step); position: relative; }
.section + .section { border-top: 1px solid var(--line); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--accent-ink);
  padding: 12px 20px; border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip:focus { left: 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav__inner {
  display: flex; align-items: center; gap: 20px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 640; letter-spacing: -.02em; flex-shrink: 0; }
.brand__mark {
  width: 34px; height: 34px; flex: 0 0 34px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 9px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--accent);
  background: var(--accent-dim);
}
.brand__name { font-size: 15.5px; }
.brand__name span { color: var(--muted); font-weight: 500; }

.nav__links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav__link {
  padding: 8px 13px; border-radius: 8px; font-size: 14.5px; font-weight: 500;
  color: var(--text-2); transition: color .2s, background .2s; white-space: nowrap;
}
.nav__link:hover { color: var(--text); background: var(--surface); }
.nav__link.is-active { color: var(--accent); }

.nav__actions { display: flex; align-items: center; gap: 8px; margin-left: 10px; }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); border-radius: 9px;
  cursor: pointer; color: var(--text-2);
  transition: color .2s, border-color .2s, background .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface); }
.icon-btn svg { width: 17px; height: 17px; }

.theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun  { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }

.nav__burger { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; border-radius: 10px;
  font-size: 14.8px; font-weight: 570; letter-spacing: -.005em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s var(--ease), background .2s, border-color .2s, color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--accent-2); }
:root[data-theme="light"] .btn--primary:hover { background: var(--accent-2); color: #fff; }

.btn--ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn--ghost:hover { background: var(--surface); border-color: var(--muted); }

.btn--sm { padding: 9px 16px; font-size: 13.8px; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 640; letter-spacing: .13em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: currentColor; opacity: .55;
}
.section-title {
  font-size: clamp(28px, 4.2vw, 41px);
  letter-spacing: -.028em;
  max-width: 20ch;
}
.section-lede {
  margin-top: 18px; font-size: clamp(16.5px, 1.7vw, 18.5px);
  color: var(--text-2); max-width: 62ch; line-height: 1.68;
}
.section-head { margin-bottom: 52px; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(72px, 11vw, 132px) var(--step); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto 50%;
  transform: translateX(-50%);
  width: 900px; height: 620px; pointer-events: none;
  background: radial-gradient(ellipse at center, var(--accent-dim), transparent 66%);
  opacity: .9;
}
.hero__inner { position: relative; }
.hero__loc {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 520; color: var(--text-2);
  border: 1px solid var(--line); background: var(--surface);
  padding: 7px 15px 7px 12px; border-radius: 100px; margin-bottom: 26px;
}
.hero__loc svg { width: 14px; height: 14px; color: var(--accent); }
.hero h1 {
  font-size: clamp(42px, 7.4vw, 82px);
  letter-spacing: -.038em; line-height: 1.03; font-weight: 640;
  margin-bottom: 22px;
}
.hero h1 em {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  color: var(--accent); letter-spacing: -.015em;
}
.hero__role {
  font-size: clamp(17px, 2.2vw, 21.5px); font-weight: 560;
  color: var(--text); margin-bottom: 20px; letter-spacing: -.015em;
}
.hero__lede {
  font-size: clamp(16.5px, 1.8vw, 18.8px); color: var(--text-2);
  max-width: 60ch; line-height: 1.68; margin-bottom: 36px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 60px; }

/* Stat strip */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.stat { background: var(--bg-elev); padding: 26px 24px; }
.stat__n {
  font-size: clamp(27px, 3.4vw, 36px); font-weight: 660; letter-spacing: -.035em;
  color: var(--accent); line-height: 1; margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.stat__l { font-size: 13.6px; color: var(--text-2); line-height: 1.5; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 340px 1fr; gap: clamp(36px, 6vw, 76px); align-items: start; }
.about__media { position: relative; }
.about__photo {
  border-radius: var(--radius-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 1; object-fit: cover;
}
.about__badge {
  position: absolute; left: -14px; bottom: -16px;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 17px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 11px;
}
.about__badge b { font-size: 20px; font-weight: 660; color: var(--accent); letter-spacing: -.03em; }
.about__badge span { font-size: 12.6px; color: var(--text-2); line-height: 1.35; max-width: 11ch; }

.about__body p { font-size: 17px; color: var(--text-2); line-height: 1.75; }
.about__body strong { color: var(--text); font-weight: 590; }
.about__facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 14px; margin-top: 36px;
}
.fact {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 15px 17px; background: var(--surface);
}
.fact dt {
  font-size: 11.4px; font-weight: 640; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.fact dd { margin: 0; font-size: 14.6px; color: var(--text); font-weight: 520; line-height: 1.5; }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(292px, 100%), 1fr)); gap: 18px; }
.skillcard {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px 26px; background: var(--surface);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.skillcard:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: var(--shadow); }
.skillcard__icon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-dim); color: var(--accent); margin-bottom: 18px;
}
.skillcard__icon svg { width: 20px; height: 20px; }
.skillcard h3 { font-size: 17.5px; margin-bottom: 9px; letter-spacing: -.02em; }
.skillcard p { font-size: 14.6px; color: var(--muted); line-height: 1.62; margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-size: 12.6px; font-weight: 520; color: var(--text-2);
  border: 1px solid var(--line); border-radius: 100px; padding: 5px 12px;
  background: var(--bg-elev); white-space: nowrap;
}

/* ---------- Experience ---------- */
.timeline { position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 12px; bottom: 12px; width: 1px;
  background: linear-gradient(var(--line-strong), var(--line), transparent);
}
.job { position: relative; padding-left: 38px; padding-bottom: 40px; }
.job:last-child { padding-bottom: 0; }
.job::before {
  content: ""; position: absolute; left: 2px; top: 8px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-strong);
}
.job--now::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
.job__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 4px; }
.job__co { font-size: 18px; font-weight: 620; letter-spacing: -.02em; }
.job__when {
  font-size: 12.8px; color: var(--muted); margin-left: auto;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.job__role { font-size: 15px; color: var(--accent); font-weight: 540; margin-bottom: 12px; }
.job__pts { display: grid; gap: 8px; }
.job__pts li {
  position: relative; padding-left: 19px; font-size: 15px; color: var(--text-2); line-height: 1.62;
}
.job__pts li::before {
  content: ""; position: absolute; left: 3px; top: 10px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong);
}
.job__pts b { color: var(--text); font-weight: 590; }

/* ---------- Creative ---------- */
.creative__panel {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background:
    radial-gradient(900px 340px at 82% 0%, var(--accent-dim), transparent 68%),
    var(--bg-elev);
  padding: clamp(34px, 5vw, 58px);
  display: grid; grid-template-columns: 1fr 244px; gap: clamp(32px, 5vw, 62px); align-items: center;
}
.creative__logo {
  display: block; width: 100%; max-width: 210px; margin-inline: auto;
  filter: drop-shadow(0 14px 34px rgba(0,0,0,.45));
}
.creative__logo img { width: 100%; }
.creative__logo .logo-light { display: none; }
:root[data-theme="light"] .creative__logo .logo-dark  { display: none; }
:root[data-theme="light"] .creative__logo .logo-light { display: block; }
:root[data-theme="light"] .creative__logo { filter: drop-shadow(0 14px 30px rgba(16,20,26,.20)); }
.creative h2 { font-size: clamp(26px, 3.6vw, 36px); letter-spacing: -.03em; margin-bottom: 16px; }
.creative p.creative__quote {
  font-family: var(--serif); font-size: clamp(19px, 2.4vw, 24px); font-weight: 400;
  color: var(--text); line-height: 1.45; margin-bottom: 18px; letter-spacing: -.012em;
}
.creative p { color: var(--text-2); font-size: 16px; line-height: 1.7; }
.creative__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* ---------- Writing / newsletter ---------- */
.issue { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.issue__item { background: var(--surface); padding: 24px 24px 26px; }
.issue__k {
  font-family: var(--serif); font-size: 21px; color: var(--accent);
  margin-bottom: 7px; letter-spacing: -.01em;
}
.issue__d { font-size: 14.4px; color: var(--text-2); line-height: 1.6; }

.subscribe {
  margin-top: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  background: var(--bg-elev); padding: clamp(30px, 4.5vw, 46px);
  display: grid; grid-template-columns: 1fr minmax(300px, 420px); gap: clamp(28px, 4vw, 52px); align-items: center;
}
.subscribe h3 { font-size: clamp(21px, 2.7vw, 27px); letter-spacing: -.028em; margin-bottom: 11px; }
.subscribe p { font-size: 15.4px; color: var(--text-2); line-height: 1.65; }
.sub-form { display: grid; gap: 11px; }
.sub-row { display: flex; gap: 10px; }
.sub-form input[type="email"] {
  flex: 1; min-width: 0;
  padding: 13px 16px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--text); font: inherit; font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
}
.sub-form input::placeholder { color: var(--muted); }
.sub-form input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.sub-form input[aria-invalid="true"] { border-color: #E0685C; }
.sub-note { font-size: 12.8px; color: var(--muted); }
.sub-msg { font-size: 14px; font-weight: 520; min-height: 20px; }
.sub-msg[data-state="ok"] { color: var(--accent); }
.sub-msg[data-state="err"] { color: #E0685C; }

/* ---------- Connect ---------- */
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr)); gap: 16px; }
.linkcard {
  display: flex; align-items: center; gap: 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; background: var(--surface);
  transition: border-color .22s var(--ease), transform .22s var(--ease), box-shadow .22s var(--ease);
}
.linkcard:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.linkcard__icon {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 11px;
  display: grid; place-items: center; background: var(--accent-dim); color: var(--accent);
}
.linkcard__icon svg { width: 20px; height: 20px; }
.linkcard__body { min-width: 0; }
.linkcard__t { display: block; font-size: 15.6px; font-weight: 590; letter-spacing: -.015em; margin-bottom: 3px; }
.linkcard__s { display: block; font-size: 13.4px; color: var(--muted); line-height: 1.45; }
.linkcard__go { margin-left: auto; color: var(--muted); transition: transform .22s var(--ease), color .22s; }
.linkcard:hover .linkcard__go { color: var(--accent); transform: translateX(3px); }
.linkcard__go svg { width: 16px; height: 16px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 44px; background: var(--bg-elev); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; }
.footer__meta { font-size: 13.6px; color: var(--muted); }
.footer__meta a { color: var(--text-2); border-bottom: 1px solid var(--line-strong); }
.footer__meta a:hover { color: var(--accent); border-color: var(--accent); }
.footer__social { display: flex; gap: 8px; margin-left: auto; }

/* ---------- Reveal ---------- */
html.js .reveal { opacity: 0; transform: translateY(16px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .about { grid-template-columns: 1fr; }
  .about__media { max-width: 300px; }
  .creative__panel { grid-template-columns: 1fr; }
  .creative__logo { grid-row: 1; max-width: 148px; margin-inline: 0; }
  .subscribe { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav__links {
    position: fixed; inset: 68px 0 auto; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg-elev); border-bottom: 1px solid var(--line);
    padding: 14px 20px 22px; margin: 0;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .22s var(--ease), transform .22s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__link { padding: 12px 14px; font-size: 16px; }
  .nav__burger { display: grid; }
  .nav__actions { margin-left: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .job__when { margin-left: 0; width: 100%; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 19px; }
  .stats { grid-template-columns: 1fr; }
  .sub-row { flex-direction: column; }
  .sub-row .btn { width: 100%; }
  .about__badge { left: 0; bottom: -12px; }
  .brand__name span { display: none; }
  .footer__social { margin-left: 0; width: 100%; }
}

/* ---------- Resume page ---------- */
.rsm { padding-block: clamp(40px, 6vw, 68px) var(--step); }
.rsm__head {
  display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-end;
  padding-bottom: 30px; border-bottom: 1px solid var(--line); margin-bottom: 44px;
}
.rsm__head h1 { font-size: clamp(31px, 5vw, 46px); letter-spacing: -.035em; margin-bottom: 9px; }
.rsm__sub { font-size: clamp(15.6px, 1.9vw, 18px); color: var(--accent); font-weight: 540; margin-bottom: 10px; }
.rsm__contact { font-size: 14.2px; color: var(--muted); }
.rsm__contact a { border-bottom: 1px solid var(--line-strong); }
.rsm__contact a:hover { color: var(--accent); border-color: var(--accent); }
.rsm__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }

.rsm__block { margin-bottom: 46px; }
.rsm__h {
  font-size: 12px; font-weight: 660; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); padding-bottom: 11px; border-bottom: 1px solid var(--line); margin-bottom: 26px;
}
.rsm__sum { font-size: 16.6px; color: var(--text-2); line-height: 1.75; max-width: 78ch; }
.rsm__sum strong { color: var(--text); font-weight: 590; }

.rsm-job { margin-bottom: 34px; }
.rsm-job:last-child { margin-bottom: 0; }
.rsm-job__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.rsm-job__co { font-size: 18.5px; font-weight: 640; letter-spacing: -.022em; }
.rsm-job__meta { font-size: 13px; color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.rsm-job__role { font-size: 15.2px; color: var(--accent); font-weight: 540; margin: 3px 0 12px; }
.rsm-job__pts { display: grid; gap: 8px; }
.rsm-job__pts li { position: relative; padding-left: 19px; font-size: 15.2px; color: var(--text-2); line-height: 1.63; }
.rsm-job__pts li::before {
  content: ""; position: absolute; left: 3px; top: 10px; width: 5px; height: 5px;
  border-radius: 50%; background: var(--accent); opacity: .65;
}
.rsm-job__pts b { color: var(--text); font-weight: 600; }
.rsm-sub { margin-top: 16px; padding-left: 17px; border-left: 2px solid var(--line); }
.rsm-sub__role { font-size: 14.6px; font-weight: 580; margin-bottom: 8px; }
.rsm-sub__role span { color: var(--muted); font-weight: 440; font-size: 12.8px; }

.rsm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(258px, 100%), 1fr)); gap: 16px; }
.rsm-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px; background: var(--surface); }
.rsm-card__t { font-size: 15.4px; font-weight: 600; margin-bottom: 4px; letter-spacing: -.015em; }
.rsm-card__s { font-size: 13.6px; color: var(--muted); line-height: 1.55; }

@media (max-width: 620px) {
  .rsm__actions { margin-left: 0; width: 100%; }
  .rsm-job__meta { margin-left: 0; width: 100%; }
}

/* ---------- Print ---------- */
@media print {
  :root {
    --bg: #fff; --bg-elev: #fff; --surface: #fff; --surface-2: #fff;
    --text: #000; --text-2: #1f2328; --muted: #55595e;
    --line: #d7dade; --line-strong: #b6babf; --accent: #7a5410; --accent-dim: #f2ede3;
    --shadow: none; --shadow-lg: none;
  }
  html { scroll-padding-top: 0; }
  body { font-size: 10.6pt; line-height: 1.46; }
  .nav, .footer, .rsm__actions, .skip, .reveal:not(.in) { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .wrap { max-width: none; padding-inline: 0; }
  .rsm { padding-block: 0; }
  .rsm__head { margin-bottom: 20pt; padding-bottom: 12pt; }
  .rsm__head h1 { font-size: 21pt; }
  .rsm__block { margin-bottom: 15pt; page-break-inside: avoid; }
  .rsm__h { margin-bottom: 10pt; padding-bottom: 4pt; font-size: 8.4pt; }
  .rsm-job { margin-bottom: 12pt; page-break-inside: avoid; }
  .rsm-job__co { font-size: 12pt; }
  .rsm-job__role { font-size: 10.4pt; margin: 1pt 0 5pt; }
  .rsm-job__pts li { font-size: 10.2pt; padding-left: 13px; }
  .rsm-card { border-color: #d7dade; padding: 8pt 10pt; }
  a { text-decoration: none; }
}

/* ==========================================================================
   THEME OVERRIDE — align résumé with main site (blue / silver / purple)
   Appended last so it wins the cascade. Only touches color tokens + display font.
   ========================================================================== */
:root {
  --bg:          #05070f;
  --bg-elev:     #0a0e1e;
  --surface:     #101628;
  --surface-2:   #171e34;
  --line:        rgba(170,188,235,.12);
  --line-strong: rgba(170,188,235,.26);
  --text:        #eef1fb;
  --text-2:      #b3bcd6;
  --muted:       #7480a0;
  --accent:      #7aa2ff;
  --accent-2:    #9a7cf5;
  --accent-dim:  rgba(122,162,255,.14);
  --accent-ink:  #0a1020;
  --serif: "Archivo", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
:root[data-theme="light"] {
  --bg:          #eef2fb;
  --bg-elev:     #ffffff;
  --surface:     #ffffff;
  --surface-2:   #e7edfb;
  --line:        rgba(20,40,80,.12);
  --line-strong: rgba(20,40,80,.22);
  --text:        #0d1428;
  --text-2:      #39445e;
  --muted:       #5b6784;
  --accent:      #3f63d8;
  --accent-2:    #7b57e0;
  --accent-dim:  rgba(63,99,216,.10);
  --accent-ink:  #ffffff;
}
/* subtle branded backdrop to echo the main site's ambient light */
body::before{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:
    radial-gradient(900px 600px at 78% -8%, rgba(91,139,255,.10), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(154,124,245,.10), transparent 60%);
}
.serif{font-weight:700;letter-spacing:-.01em}
