/* Fred W. Nix Jr. resume v14 · plain, light, one accent */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --ink: #111827;
  --ink-2: #374151;
  --ink-3: #6b7280;
  --line: #e5e7eb;
  --line-strong: #cbd2db;
  --accent: #0b5cad;
  --accent-dark: #084782;
  --accent-soft: #e8f1fa;
  --max: 940px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; color-scheme: light; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 16px; overflow-x: hidden; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
b, strong { font-weight: 600; color: var(--ink); }
.muted { color: var(--ink-2); }
.mono { font-variant-numeric: tabular-nums; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.012em; font-weight: 650; }
ul { list-style: none; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.65rem clamp(1rem, 4vw, 2rem); }
.nav-brand { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); font-weight: 650; }
.nav-brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: var(--ink); color: #fff; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.03em; }
.nav-links { display: flex; align-items: center; gap: 1.2rem; }
.nav-links a { color: var(--ink-2); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

/* ---------- buttons / chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.7rem 1.2rem; border-radius: 8px; border: 1px solid transparent; font-family: var(--font); font-weight: 600; font-size: 0.93rem; cursor: pointer; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.85rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.chip { display: inline-flex; align-items: center; padding: 0.3rem 0.75rem; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2); font-size: 0.85rem; font-weight: 500; }
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chip-muted { color: var(--ink-3); border-color: var(--line); }

/* ---------- layout ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(2.8rem, 6vw, 4.2rem) clamp(1rem, 4vw, 2rem) 0; }
.section-head { margin-bottom: 1.5rem; }
.eyebrow { color: var(--accent); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5rem; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
h4 { font-size: 1rem; }
.section-sub { color: var(--ink-2); margin-top: 0.6rem; max-width: 760px; }
.section + .section { border-top: 1px solid var(--line); margin-top: clamp(2.8rem, 6vw, 4.2rem); }
.hero + .section { border-top: 0; margin-top: 0; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1.3rem 1.4rem; }
.card-tag { color: var(--ink-3); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.5rem; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.bullets { display: grid; gap: 0.6rem; }
.bullets li { position: relative; padding-left: 1rem; color: var(--ink-2); font-size: 0.94rem; line-height: 1.55; }
.bullets li::before { content: ''; position: absolute; left: 0; top: 0.65em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(2.5rem, 6vw, 4rem); }
.hero-grid { display: grid; grid-template-columns: 220px 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.photo-ring { width: 200px; height: 200px; border-radius: 50%; overflow: hidden; border: 1px solid var(--line-strong); margin: 0 auto; }
.photo-ring img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-caption { text-align: center; color: var(--ink-3); font-size: 0.82rem; margin-top: 0.8rem; }
.title { font-size: clamp(1.1rem, 2.2vw, 1.4rem); font-weight: 600; margin-top: 0.5rem; color: var(--accent); }
.lede { margin-top: 1rem; color: var(--ink-2); font-size: 1.06rem; max-width: 700px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.3rem; align-items: center; }
.contact-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.1rem; }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; margin-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 1rem 0.8rem; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-num { font-weight: 700; font-size: clamp(1.4rem, 2.4vw, 1.8rem); color: var(--ink); letter-spacing: -0.02em; }
.stat-label { color: var(--ink-3); font-size: 0.8rem; line-height: 1.35; margin-top: 0.1rem; }

/* ---------- experience ---------- */
.job { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.job:first-of-type { border-top: 0; padding-top: 0; }
.job-head { display: grid; grid-template-columns: 96px 1fr; gap: 1rem; align-items: center; margin-bottom: 0.8rem; }
.job-logo { display: grid; place-items: center; height: 44px; }
.job-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.job-title { font-size: 1.15rem; font-weight: 650; }
.job-meta { color: var(--ink-3); font-size: 0.88rem; }
.job-body { margin-left: calc(96px + 1rem); }
.job-body .intro { color: var(--ink-2); margin-bottom: 0.8rem; max-width: 760px; }
.job-body > p { color: var(--ink-2); max-width: 760px; }
.job-groups { display: grid; gap: 1.1rem; margin-top: 0.4rem; }
.job-group h4 { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.5rem; font-weight: 600; }
.earlier { margin-top: 0.4rem; padding: 1rem 0 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.edu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1.5rem; }

/* ---------- projects ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.proj-grid .card { display: flex; flex-direction: column; }
.proj-grid .card p { color: var(--ink-2); font-size: 0.93rem; flex: 1; }
.proj-link { margin-top: 0.8rem; font-size: 0.88rem; font-weight: 500; }
.more-line { margin-top: 1.2rem; color: var(--ink-2); font-size: 0.95rem; }

/* ---------- skills ---------- */
.skill-cols { display: grid; gap: 0.9rem; }
.skill-group { display: grid; grid-template-columns: 200px 1fr; gap: 1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
.skill-group:last-child { border-bottom: 0; }
.skill-group h4 { color: var(--ink); }
.skill-group p { color: var(--ink-2); font-size: 0.94rem; }

/* ---------- contact / footer ---------- */
.contact-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: clamp(1.6rem, 4vw, 2.6rem); text-align: center; }
.contact-card .contact-row, .contact-card .hero-actions { justify-content: center; }
.contact-card h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; color: var(--ink-3); font-size: 0.8rem; padding: 2rem 0.2rem 2rem; }
.footer a { color: var(--ink-2); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(17, 24, 39, 0.55); }
.modal-panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(760px, calc(100% - 2rem)); max-height: calc(100% - 2rem); overflow: auto; background: #fff; border-radius: 14px; padding: clamp(1.2rem, 3vw, 2rem); box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
.modal-x { position: absolute; top: 0.6rem; right: 0.9rem; background: none; border: 0; color: var(--ink-3); font-size: 1.8rem; cursor: pointer; line-height: 1; }
.modal-x:hover { color: var(--ink); }
.modal-grid { display: grid; grid-template-columns: 200px 1fr; gap: 1.8rem; align-items: center; }
.paper { background: #fff; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 4px; padding: 1rem 0.9rem; aspect-ratio: 8.5 / 11; box-shadow: 0 8px 24px rgba(17,24,39,0.12); }
.paper-name { font-weight: 700; font-size: 0.82rem; letter-spacing: 0.03em; }
.paper-title { font-size: 0.5rem; color: var(--ink-3); margin-top: 0.15rem; }
.paper-rule { height: 2px; background: var(--accent); margin: 0.5rem 0; }
.paper-h { font-size: 0.45rem; color: var(--accent); letter-spacing: 0.1em; margin: 0.6rem 0 0.3rem; font-weight: 700; }
.paper-line { height: 4px; background: #e8ebf0; border-radius: 3px; margin: 0.28rem 0; }
.w95 { width: 95% } .w90 { width: 90% } .w85 { width: 85% } .w80 { width: 80% } .w75 { width: 75% } .w70 { width: 70% } .w60 { width: 60% }
.modal-copy h3 { font-size: 1.3rem; }
.modal-copy p { color: var(--ink-2); font-size: 0.95rem; margin: 0.5rem 0 0.8rem; }
.dl-facts { display: grid; gap: 0.2rem; color: var(--ink-3); font-size: 0.82rem; margin-bottom: 1rem; }
.dl-facts li::before { content: '· '; }
.dl-status { color: var(--accent); font-size: 0.82rem; margin-top: 0.6rem; min-height: 1.2em; }
.dl-opt { display: grid; gap: 0.15rem; padding: 0.85rem 1rem; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--ink); margin-bottom: 1rem; }
.dl-opt:hover { background: #d9e8f6; text-decoration: none; color: var(--ink); }
.dl-opt b { color: var(--accent-dark); }
.dl-opt span { color: var(--ink-2); font-size: 0.88rem; }
.dl-opt em { color: var(--ink-3); font-style: normal; font-size: 0.78rem; word-break: break-all; }

/* ---------- setup page widgets ---------- */
.stack-wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.2rem; align-items: start; }
.stack { display: grid; gap: 0.5rem; }
.layer { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 0.8rem; align-items: center; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem 1rem; cursor: pointer; color: var(--ink); font-family: var(--font); }
.layer:hover { border-color: var(--accent); }
.layer.active { border-color: var(--accent); background: var(--accent-soft); }
.layer-n { grid-row: 1 / span 2; color: var(--accent); font-size: 0.85rem; font-weight: 600; text-align: center; }
.layer-t { font-weight: 600; font-size: 0.98rem; }
.layer-s { color: var(--ink-3); font-size: 0.8rem; line-height: 1.4; }
.stack-detail { position: sticky; top: 80px; }
.stack-detail p { color: var(--ink-2); font-size: 0.93rem; }
.sd-metrics { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }
.sd-metrics span { padding: 0.25rem 0.6rem; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 0.78rem; color: var(--ink-2); }
.platform-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
#fleet { width: 100%; height: auto; display: block; }
.fleet-note { color: var(--ink-2); font-size: 0.9rem; margin-top: 0.6rem; min-height: 4.2em; }
.router-lede { color: var(--ink-2); font-size: 0.93rem; margin-bottom: 0.7rem; }
textarea#router-in { width: 100%; resize: vertical; background: #fff; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 8px; padding: 0.7rem 0.8rem; font-family: var(--font); font-size: 0.93rem; }
textarea#router-in:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.ladder { display: grid; gap: 0.4rem; margin-top: 0.8rem; }
.rung { display: grid; grid-template-columns: 1fr auto auto; gap: 0.8rem; align-items: center; padding: 0.5rem 0.8rem; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.rung-name { font-weight: 600; font-size: 0.9rem; }
.rung-model, .rung-cost { color: var(--ink-3); font-size: 0.78rem; }
.rung.hit { border-color: var(--accent); background: var(--accent-soft); }
.rung.hit .rung-name { color: var(--accent-dark); }
.rung.passed { opacity: 0.45; }
.router-why { margin-top: 0.7rem; color: var(--ink-3); font-size: 0.82rem; line-height: 1.5; }
.platform-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin-top: 1rem; }
.fact { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 0.7rem 0.9rem; color: var(--ink-3); font-size: 0.85rem; }
.fact b { display: block; color: var(--ink); font-size: 0.98rem; margin-bottom: 0.1rem; }
.back { display: inline-block; color: var(--ink-2); font-size: 0.9rem; margin-bottom: 1rem; }

/* ---------- projects page ---------- */
.proj-list { display: grid; gap: 1rem; }
.proj-card h3 { font-size: 1.35rem; margin-bottom: 0.3rem; }
.proj-card .meta { color: var(--ink-3); font-size: 0.82rem; margin-bottom: 0.8rem; }
.proj-card p { color: var(--ink-2); font-size: 0.97rem; margin-bottom: 0.7rem; }
.proj-card ul { display: grid; gap: 0.45rem; margin: 0.4rem 0 0.9rem; }
.proj-card li { position: relative; padding-left: 1rem; color: var(--ink-2); font-size: 0.93rem; }
.proj-card li::before { content: ''; position: absolute; left: 0; top: 0.65em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.proj-card .links { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- 404 ---------- */
.notfound { max-width: 560px; margin: 0 auto; padding: 20vh 1.5rem 3rem; text-align: center; }
.notfound h1 { font-size: 2.2rem; margin: 0.5rem 0 0.8rem; }
.notfound p { color: var(--ink-2); margin-bottom: 1.4rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(4) { border-left: 0; padding-left: 0; }
  .stat { border-top: 1px solid var(--line); }
  .stat:nth-child(-n+3) { border-top: 0; }
  .cards-3, .proj-grid { grid-template-columns: 1fr 1fr; }
  .stack-wrap, .platform-grid { grid-template-columns: 1fr; }
  .stack-detail { position: static; }
  .platform-facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 0.4rem 1rem 1rem; display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.65rem 0.2rem; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 0.8rem; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-actions, .contact-row { justify-content: center; }
  .lede { margin-left: auto; margin-right: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat, .stat:nth-child(4) { border-left: 0; padding-left: 0.2rem; border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); padding-left: 0.8rem; }
  .cards-3, .cards-2, .proj-grid, .edu, .platform-facts { grid-template-columns: 1fr; }
  .job-head { grid-template-columns: 80px 1fr; }
  .job-body { margin-left: 0; }
  .skill-group { grid-template-columns: 1fr; gap: 0.3rem; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-preview { max-width: 150px; margin: 0 auto; }
}

/* ---------- print (the PDF is separate; this is a fallback) ---------- */
@media print {
  .nav, .modal, .hero-actions { display: none !important; }
  .section { padding-top: 1.2rem; }
}
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #fff; }
