/* ============================================================
   Justin Jorgensen — Resume Site
   "The Operations Brief": editorial, document-grade, senior.
   Navy accent · slate neutrals · serif gravitas + technical mono.
   ============================================================ */

/* ---- Design tokens ---------------------------------------- */
:root {
  /* Palette — light */
  --bg:        #ffffff;
  --canvas:    #f7f8fa;   /* faint tinted bands */
  --panel:     #f2f5f9;
  --ink:       #14181f;   /* near-black slate, primary text */
  --ink-soft:  #3a4452;
  --muted:     #5c6675;
  --faint:     #8a93a1;
  --line:      #e4e8ee;
  --line-strong:#d3d9e2;
  --navy:      #1e3a5f;   /* primary accent */
  --navy-ink:  #1e3a5f;   /* navy used as text */
  --link:      #2c5a8c;
  --link-hover:#1e3a5f;
  --on-navy:   #eaf0f7;

  /* Typography */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Layout */
  --maxw: 1080px;
  --gutter: clamp(22px, 5vw, 64px);

  --shadow-sm: 0 1px 2px rgba(20,24,31,.05), 0 1px 1px rgba(20,24,31,.04);
}

[data-theme="dark"] {
  --bg:        #0e1218;
  --canvas:    #11161e;
  --panel:     #161c26;
  --ink:       #e7ebf1;
  --ink-soft:  #c4ccd8;
  --muted:     #9aa5b4;
  --faint:     #6b7585;
  --line:      #232b37;
  --line-strong:#2e3744;
  --navy:      #7ea8d8;   /* lifted for contrast on dark */
  --navy-ink:  #9cc0e8;
  --link:      #93b8e3;
  --link-hover:#bcd6f2;
  --on-navy:   #0e1218;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
}

/* ---- Reset / base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .35s ease, color .35s ease;
}

h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.12; }
p { margin: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--navy); color: #fff; }
[data-theme="dark"] ::selection { background: var(--navy); color: var(--on-navy); }

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

/* Letterhead top rule */
body::before {
  content: "";
  position: fixed; inset: 0 0 auto 0;
  height: 4px;
  background: var(--navy);
  z-index: 100;
}

/* ---- Shared layout ---------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

.section { padding-block: clamp(48px, 7vw, 92px); }
.section--tint { background: var(--canvas); border-block: 1px solid var(--line); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--navy-ink);
  font-weight: 500;
}

/* Section header: mono index + serif title */
.shead {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 34px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.shead__no {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
  font-weight: 500;
  letter-spacing: .08em;
  flex: none;
  padding-top: 6px;
}
.shead__title {
  font-family: var(--serif);
  font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: -.01em;
  color: var(--ink);
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__row {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--ink);
  white-space: nowrap;
}
.brand b { color: var(--navy-ink); font-weight: 600; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav__links { display: flex; gap: 4px; }
.nav__links a {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--muted);
  padding: 7px 11px;
  border-radius: 6px;
  transition: color .2s, background .2s;
}
.nav__links a:hover { color: var(--ink); background: var(--panel); }
@media (max-width: 720px) { .nav__links { display: none; } }

.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.iconbtn:hover { border-color: var(--navy); color: var(--navy-ink); }
.iconbtn svg { width: 17px; height: 17px; }
.iconbtn .sun { display: none; }
[data-theme="dark"] .iconbtn .sun { display: block; }
[data-theme="dark"] .iconbtn .moon { display: none; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  height: 38px;
  padding: 0 15px;
  border-radius: 8px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--on-navy);
  cursor: pointer;
  transition: opacity .2s, transform .05s;
}
[data-theme="dark"] .btn { color: var(--bg); }
.btn:hover { opacity: .9; color: var(--on-navy); }
[data-theme="dark"] .btn:hover { color: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; }
.btn--ghost { background: transparent; color: var(--navy-ink); }
.btn--ghost:hover { background: var(--panel); color: var(--navy-ink); }
[data-theme="dark"] .btn--ghost { color: var(--navy-ink); }
[data-theme="dark"] .btn--ghost:hover { color: var(--navy-ink); }
@media (max-width: 560px) { .btn .btn__label { display: none; } .btn { padding: 0 11px; } }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding-top: clamp(56px, 9vw, 104px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero__eyebrow { margin-bottom: 22px; }
.hero__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(46px, 8.2vw, 88px);
  line-height: .98;
  letter-spacing: -.025em;
  color: var(--ink);
}
.hero__lede {
  margin-top: 26px;
  max-width: 30ch;
  font-family: var(--serif);
  font-size: clamp(20px, 2.5vw, 27px);
  line-height: 1.4;
  font-weight: 400;
  color: var(--ink-soft);
}
.hero__lede .em { color: var(--navy-ink); font-style: italic; }
.hero__meta {
  margin-top: 30px;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px 18px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .02em;
}
.hero__meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }
.hero__links { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.chiplink {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .03em;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--bg);
  transition: border-color .2s, color .2s, background .2s;
}
.chiplink:hover { border-color: var(--navy); color: var(--navy-ink); background: var(--panel); }
.chiplink svg { width: 15px; height: 15px; flex: none; }

.targetline {
  margin-top: 30px;
  padding: 14px 18px;
  border-left: 2px solid var(--navy);
  background: var(--panel);
  border-radius: 0 8px 8px 0;
  font-size: 14.5px;
  color: var(--ink-soft);
  max-width: 62ch;
}
.targetline b { color: var(--ink); font-weight: 600; }

/* Proof-stat strip */
.stats {
  margin-top: clamp(40px, 6vw, 64px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}
.stat {
  padding: 22px clamp(16px, 2.2vw, 26px) 20px;
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: none; }
.stat__num {
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--navy-ink);
  font-weight: 500;
}
.stat__num .u { font-size: .52em; color: var(--muted); letter-spacing: 0; }
.stat__label {
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.45;
  letter-spacing: .02em;
  color: var(--muted);
  text-transform: uppercase;
}
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
  .stat { border-left: none; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: none; }
}

/* ============================================================
   SUMMARY
   ============================================================ */
.summary__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 5vw, 64px); }
@media (max-width: 820px) { .summary__grid { grid-template-columns: 1fr; gap: 36px; } }
.summary__body p { font-size: 17.5px; color: var(--ink-soft); }
.summary__body p + p { margin-top: 18px; }
.summary__body .lead { font-size: 19px; color: var(--ink); }

.strengths__label {
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 16px;
}
.strengths { display: flex; flex-wrap: wrap; gap: 8px; }
.strengths li {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .01em;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink-soft);
  background: var(--bg);
}

/* ============================================================
   COMPETENCIES
   ============================================================ */
.comp { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
@media (max-width: 720px) { .comp { grid-template-columns: 1fr; } }
.comp__cell { background: var(--bg); padding: 24px clamp(18px, 2.4vw, 28px); }
.comp__head {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px;
}
.comp__no { font-family: var(--mono); font-size: 12px; color: var(--navy-ink); font-weight: 500; }
.comp__title { font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: .01em; color: var(--ink); text-transform: uppercase; letter-spacing: .06em; }
.comp__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.comp__tags span {
  font-family: var(--mono); font-size: 12px;
  padding: 5px 10px; border-radius: 6px;
  background: var(--panel); color: var(--ink-soft);
  border: 1px solid var(--line);
}

/* ============================================================
   EXPERIENCE
   ============================================================ */
.role { display: grid; grid-template-columns: 248px 1fr; gap: clamp(20px, 4vw, 56px); padding-block: clamp(30px, 4vw, 46px); border-top: 1px solid var(--line); }
.role:first-of-type { border-top: none; padding-top: 8px; }
@media (max-width: 820px) { .role { grid-template-columns: 1fr; gap: 16px; } }

.role__aside { position: relative; }
.role__company { font-family: var(--sans); font-size: 18px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); line-height: 1.25; }
.role__industry {
  display: inline-block; margin-top: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--navy-ink);
  padding: 4px 9px; border: 1px solid var(--line-strong); border-radius: 6px;
}
.role__dates { margin-top: 14px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); letter-spacing: .01em; }
.role__loc { margin-top: 4px; font-family: var(--mono); font-size: 12px; color: var(--faint); }

.role__title { font-family: var(--serif); font-size: clamp(21px, 2.5vw, 26px); letter-spacing: -.01em; color: var(--ink); margin-bottom: 14px; }
.role__intro { font-size: 15.5px; color: var(--muted); margin-bottom: 20px; max-width: 64ch; }
.bullets { display: flex; flex-direction: column; gap: 13px; }
.bullets li { position: relative; padding-left: 24px; font-size: 15.5px; color: var(--ink-soft); max-width: 70ch; }
.bullets li::before {
  content: ""; position: absolute; left: 2px; top: 9px;
  width: 7px; height: 7px; border: 1.5px solid var(--navy);
  border-radius: 50%;
}
.bullets b { color: var(--ink); font-weight: 600; }

/* ============================================================
   EARLIER EXPERIENCE (condensed)
   ============================================================ */
.early { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
@media (max-width: 720px) { .early { grid-template-columns: 1fr; } }
.early__item { background: var(--bg); padding: 22px clamp(18px, 2.2vw, 26px); }
.early__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.early__co { font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.early__date { font-family: var(--mono); font-size: 11.5px; color: var(--faint); white-space: nowrap; flex: none; }
.early__role { font-family: var(--mono); font-size: 12px; letter-spacing: .03em; color: var(--navy-ink); margin-bottom: 10px; }
.early__desc { font-size: 14.5px; color: var(--muted); }
.early__desc b { color: var(--ink-soft); font-weight: 600; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--canvas); border-top: 1px solid var(--line); padding-block: clamp(48px, 7vw, 80px); }
.footer__grid { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
@media (max-width: 680px) { .footer__grid { grid-template-columns: 1fr; align-items: start; } }
.footer__name { font-family: var(--serif); font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em; color: var(--ink); }
.footer__tag { margin-top: 10px; font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.footer__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.footer__meta { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: .02em; text-align: right; line-height: 1.7; }
@media (max-width: 680px) { .footer__meta { text-align: left; margin-top: 28px; } }

/* ============================================================
   PRINT — clean, single-column résumé
   ============================================================ */
@media print {
  :root {
    --bg:#fff; --canvas:#fff; --panel:#fff; --ink:#111; --ink-soft:#222;
    --muted:#444; --faint:#555; --line:#ccc; --line-strong:#bbb;
    --navy:#1e3a5f; --navy-ink:#1e3a5f; --link:#1e3a5f; --on-navy:#fff;
  }
  body { font-size: 10.5pt; line-height: 1.4; }
  body::before { display: none; }
  .topbar, .hero__links, .footer__links, .no-print { display: none !important; }
  .section { padding-block: 14pt; }
  .section--tint { background: #fff; border: none; }
  .hero { padding: 0 0 10pt; }
  .hero__name { font-size: 30pt; }
  .hero__lede { font-size: 13pt; margin-top: 10pt; max-width: 60ch; }
  .stats { box-shadow: none; grid-template-columns: repeat(4, 1fr); break-inside: avoid; margin-top: 14pt; }
  .stat__num { font-size: 18pt; }
  .shead { margin-bottom: 12pt; padding-bottom: 6pt; }
  .shead__title { font-size: 16pt; }
  .role { grid-template-columns: 200px 1fr; gap: 24px; break-inside: avoid; padding-block: 12pt; }
  .summary__grid { grid-template-columns: 1.4fr 1fr; }
  .comp, .early { break-inside: avoid; }
  .role, .comp__cell, .early__item { break-inside: avoid; }
  a { color: #1e3a5f; }
  .wrap { max-width: 100%; padding-inline: 0; }
  @page { margin: 14mm 14mm; }
}
