/* chrismkirby.com — Patch Panel
   Layout: one column on rack-grey ground. Masthead, intro, patch panel (career chapters),
   then plain labelled sections. Cable colours identify each career chapter throughout. */

:root {
  --ground: #e4e7ea;      /* rack grey page ground */
  --surface: #f4f5f6;     /* lighter plate for detail areas */
  --ink: #1b232c;         /* main text */
  --muted: #4f5b68;       /* secondary text */
  --faint: #8d98a6;       /* small labels on dark panel */
  --rule: #c6ccd3;        /* hairlines */
  --panel: #1f262f;       /* patch panel body */
  --jack: #0f141a;
  --jack-edge: #3a4552;

  --c-hosting: #d9822b;   /* orange */
  --c-sales: #8b5a2b;     /* brown */
  --c-college: #7b8794;   /* grey */
  --c-it: #2f855a;        /* green */
  --c-ih: #2b6cb0;        /* blue: current */
  --link: #245c9c;        /* text-safe blue, AA on ground */

  --f-label: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif;
  --f-body: 'Barlow', 'Segoe UI', Roboto, Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: 1.75rem;
  --step-4: clamp(2.25rem, 6vw, 3.5rem);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--c-ih); outline-offset: 3px; border-radius: 2px; }

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  padding-block: 40px 56px;
}

/* ---------- Masthead ---------- */
.masthead {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px 32px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
}
.masthead-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.portrait { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface); flex: none; }
h1 {
  font-family: var(--f-label);
  font-weight: 700;
  font-size: var(--step-4);
  line-height: 0.95;
  margin: 0;
  letter-spacing: 0.005em;
}
.role {
  margin: 8px 0 0;
  font-family: var(--f-label);
  font-weight: 600;
  font-size: var(--step-1);
  color: var(--muted);
}
.masthead-meta { display: grid; gap: 8px; justify-items: end; }
.status {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-label);
  font-weight: 600;
  font-size: var(--step-0);
}
.status-led { width: 9px; height: 9px; border-radius: 50%; background: var(--c-it); box-shadow: 0 0 0 3px rgb(47 133 90 / 0.2); }
.contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: var(--step--1);
}
.contact a { font-weight: 500; }
.contact .download { font-weight: 600; }

/* ---------- Intro ---------- */
.intro {
  font-size: var(--step-1);
  line-height: 1.6;
  max-width: 64ch;
  margin: 26px 0 30px;
  color: #2c3844;
}

/* ---------- Section titles ---------- */
.section-title {
  font-family: var(--f-label);
  font-weight: 700;
  font-size: var(--step-3);
  line-height: 1.1;
  margin: 0 0 16px;
}

/* ---------- Icons (Lucide) ---------- */
.ico { width: 1em; height: 1em; stroke-width: 2; vertical-align: -0.15em; flex: none; }
.contact a { display: inline-flex; align-items: center; gap: 6px; }
.section-title { display: flex; align-items: center; gap: 10px; }
.section-title .ico { width: 0.85em; height: 0.85em; color: var(--c-ih); }

/* ---------- Patch panel ---------- */
.panel {
  background: var(--panel);
  border-radius: 6px;
  padding: 18px 16px 16px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px 10px;
  box-shadow: inset 0 0 0 1px #2c3541;
}
.port {
  color: #c9d0d8;
  padding: 6px 4px 4px;
  border-radius: 4px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  text-align: center;
  min-width: 0;
}
.jack {
  position: relative;
  width: 100%;
  max-width: 96px;
  aspect-ratio: 1.25;
  border-radius: 4px;
  background: var(--jack);
  border: 2px solid var(--jack-edge);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.jack::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 0; height: 28%; background: var(--jack-edge); }
.led {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--c); opacity: 0.4;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}
.cable { width: 10px; height: 24px; margin-top: -8px; background: var(--c); border-radius: 0 0 4px 4px; }
.port-name, .port-sub { overflow-wrap: anywhere; }
.port-name { font-family: var(--f-label); font-weight: 600; font-size: 1rem; line-height: 1.15; color: #e9edf1; }
.port-sub { font-family: var(--f-label); font-weight: 500; font-size: 0.85rem; line-height: 1.2; color: var(--faint); margin-top: -2px; }
.port.is-current .jack { border-color: var(--c); box-shadow: inset 0 0 0 2px #e9edf1, 0 0 0 3px color-mix(in srgb, var(--c) 40%, transparent); }
.port.is-current .led { opacity: 1; box-shadow: 0 0 6px var(--c); }

/* Chapter details: all five shown, in career order */
.chapters { display: grid; gap: 12px; margin-top: 16px; }
.chapter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 8px 24px;
  background: var(--surface);
  border-left: 6px solid var(--c);
  padding: 16px 20px;
}
.chapter h3 { margin: 0; font-family: var(--f-label); font-weight: 700; font-size: var(--step-2); line-height: 1.15; }
.chapter p { margin: 2px 0 0; color: var(--muted); }
.chapter ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }

/* ---------- Sections ---------- */
.block { margin-top: 56px; padding-top: 22px; border-top: 2px solid var(--ink); }
.career { margin-top: 0; }
.intro strong, .prose strong { font-weight: 600; color: var(--ink); }
.prose { max-width: 68ch; margin: 0; font-size: var(--step-1); line-height: 1.6; color: #2c3844; }

/* ---------- Experience: one cable line per job ---------- */
.jobs { display: grid; gap: 36px; }
.job {
  position: relative;
  padding-left: 26px;
  border-left: 4px solid var(--c);
}
.job::before {
  content: "";
  position: absolute;
  left: -10px; top: 4px;
  width: 16px; height: 16px;
  border-radius: 3px;
  background: var(--jack);
  border: 3px solid var(--c);
}
.job-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; align-items: baseline; margin-bottom: 10px; }
.job h3 { margin: 0; font-family: var(--f-label); font-weight: 700; font-size: var(--step-2); line-height: 1.15; }
.org { margin: 2px 0 0; font-weight: 600; color: var(--c); filter: brightness(0.85); }
.job-when { margin: 0; display: grid; justify-items: end; font-family: var(--f-label); font-weight: 600; color: var(--muted); line-height: 1.3; }
.job-when .place { font-weight: 500; font-size: var(--step--1); }
.job ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; max-width: 80ch; }
.job li::marker { color: var(--c); }
.job strong { font-weight: 600; }

/* ---------- Projects ---------- */
.projects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
.project { min-width: 0; padding-top: 12px; border-top: 1px solid var(--rule); }
.project h3 { margin: 0 0 4px; font-family: var(--f-label); font-weight: 700; font-size: var(--step-1); line-height: 1.2; }
.project p { margin: 0; color: #2c3844; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.project .tags { margin-top: 10px; }
.tags span, .skills dd span {
  font-family: var(--f-label);
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 3px;
  background: var(--surface);
  border: 1px solid var(--rule);
  color: var(--ink);
}

.learned { margin-top: 18px; }
.learned h3 { margin: 0 0 8px; font-family: var(--f-label); font-weight: 700; font-size: var(--step-1); }

/* ---------- Certifications: labelled rows, like a port map ---------- */
.certs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.certs li { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.cert-name { font-weight: 600; }
.cert-meta { font-family: var(--f-label); font-weight: 500; color: var(--muted); text-align: right; }
.certs li:first-child .cert-meta { color: var(--link); font-weight: 600; }

/* ---------- Skills ---------- */
.skills { margin: 0; display: grid; gap: 0; }
.skill-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 8px 24px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.skill-row dt { font-family: var(--f-label); font-weight: 700; font-size: var(--step-1); }
.skill-row dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Education ---------- */
.education { list-style: none; margin: 0; padding: 0; display: grid; }
.education li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 24px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.edu-name { font-weight: 600; }
.edu-meta { grid-column: 1; color: var(--muted); }
.edu-when { grid-column: 2; grid-row: 1; font-family: var(--f-label); font-weight: 600; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 56px;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: var(--step--1);
  color: var(--muted);
}

@media (max-width: 760px) {
  .projects, .certs { grid-template-columns: 1fr; }
  .skill-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .job-when { justify-items: start; }
  .job { padding-left: 18px; }
  .panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chapter { grid-template-columns: 1fr; padding: 14px 16px; }
  .page { padding-block: 28px 40px; }
  .masthead-meta { justify-items: start; }
  .portrait { width: 64px; height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .page { padding: 0; max-width: none; }
  a { color: #000; }
  .contact a[href^="http"]::after { content: " (" attr(href) ")"; }
  .contact .download { display: none; }
  .status-led { box-shadow: none; }
  /* Light panel so it does not flood ink; all chapters print */
  .panel { background: #fff; box-shadow: inset 0 0 0 1px #999; }
  .port { color: #000; }
  .port-name { color: #000; }
  .port-sub { color: #444; }
  .jack { background: #fff; border-color: #999; }
  .jack::after { background: #999; }
  .chapter, .tags span, .skills dd span { background: #fff; }
  .block, .job, .project, .certs li, .skill-row { break-inside: avoid; }
}
