/* ==========================================================================
   dylanchennault.com styles
   1. Design tokens (colors, fonts, spacing): change the look here
   2. Base
   3. Layout helpers
   4. Components (buttons, chips, cards, rows, credentials)
   5. Page sections (header, hero, results, contact, footer)
   Layout is flex-wrap based, so it reflows to phone width without media queries.
   ========================================================================== */

/* 1. Design tokens ------------------------------------------------------- */
:root {
  --accent: #1f4e79;          /* buttons, links, heading rules */
  --ink: #14202b;             /* main text, dark sections */
  --text-muted: #2f3b45;      /* body copy */
  --text-subtle: #59636d;     /* dates, captions, labels */
  --bg: #f4f5f2;              /* page background */
  --surface: #ffffff;         /* cards and alternate sections */
  --border: #d9ddd6;
  --border-strong: #c9d0c6;   /* chips, outlined controls */
  --on-dark: #f4f5f2;
  --on-dark-muted: #c3cbd3;
  --on-dark-accent: #9fb7cf;
  --success: #2e7d4f;

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Spacing scale: use these instead of one-off pixel values */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
  --space-9: 64px;

  --max-width: 1120px;
  --gutter: clamp(24px, 4vw, 40px);
  --section-pad: clamp(80px, 9vw, 120px);   /* 80px on phones, up to 120px on wide screens */
  --radius: 10px;
  --tap: 44px;                /* minimum touch-target height */
}

/* 2. Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); }
a:hover { color: var(--ink); }

h1, h2, h3, p, figure { margin: 0; }

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

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--on-dark);
  border-radius: 6px;
  z-index: 10;
}
.skip-link:focus { top: 8px; }

/* 3. Layout helpers ------------------------------------------------------ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section-pad) 0; }
.section--surface {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section--dark { background: var(--ink); color: var(--on-dark); }

.section-title {
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--accent);
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.section-title--spaced { margin-bottom: var(--space-8); }
.section--dark .section-title { border-bottom-color: var(--on-dark-accent); }

/* Two-column row: label or company on the left, details on the right.
   Wraps to one column when there is not room for both. */
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-5) var(--space-8);
  padding: var(--space-8) 0;
}
.row:first-of-type { padding-top: 0; }   /* the section title already provides the gap */
.row + .row { border-top: 1px solid var(--border); }
.row:last-child { padding-bottom: 0; }
.row__side { flex: 1 1 260px; min-width: 0; }
.row__main { flex: 999 1 520px; min-width: 0; }

.mono-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-subtle);
}

.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); font-size: 15px; }

/* 4. Components ---------------------------------------------------------- */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.btn svg { flex: none; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { color: #fff; filter: brightness(1.15); }
.btn--outline { border: 1px solid var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--on-dark); }
.btn--light { background: var(--on-dark); color: var(--ink); }
.btn--light:hover { color: var(--ink); background: #fff; }
.btn--ghost-light { border: 1px solid #5b6b7a; color: var(--on-dark); }
.btn--ghost-light:hover { color: var(--on-dark); border-color: var(--on-dark); }
.btn--small { min-height: var(--tap); padding: 0 18px; font-size: 15px; }

/* Skill chips (Selected Work and Skills use the same chip) */
.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 10px;
}
.chips li {
  padding: 5px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.6;
}
ul.chips { list-style: none; margin: 0; padding: 0; }

/* Selected Work cards */
.cards { display: flex; flex-wrap: wrap; gap: var(--space-5); }
.card {
  flex: 1 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: clamp(24px, 3vw, 36px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card .mono-label { line-height: 1.5; }
.card h3 { font-size: 23px; line-height: 1.25; font-weight: 600; }
.card__result {
  margin-top: var(--space-1);
  padding-top: var(--space-5);
  border-top: 1px solid #e4e7e2;
  font-weight: 600;
}
.card .chips { margin-top: auto; padding-top: var(--space-2); }

/* Experience roles */
.company { font-size: 20px; line-height: 1.35; font-weight: 600; }
.company + .subtle { margin-top: var(--space-2); line-height: 1.5; }
.roles { display: flex; flex-direction: column; gap: var(--space-7); }
.role__head {
  display: flex;
  flex-direction: column;   /* title on top, dates always on their own line */
  gap: var(--space-1);
  font-weight: 600;
  line-height: 1.4;
}
.role__dates {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-subtle);
}
.role p { margin-top: var(--space-3); color: var(--text-muted); }
.role__bullets {
  margin: var(--space-3) 0 0;
  padding-left: 20px;
  color: var(--text-muted);
}
.role__bullets li { padding-left: var(--space-1); }
.role__bullets li + li { margin-top: var(--space-2); }
.role__bullets li::marker { color: var(--text-subtle); }

/* Skills rows */
.skill-row { padding: var(--space-6) 0; gap: var(--space-4) var(--space-8); }
.skill-row h3 { flex: 1 1 300px; font-size: 17px; font-weight: 600; }
.skill-row .chips { flex: 999 1 520px; min-width: 0; }

/* Education, licenses and certifications */
.credential h3 { font-size: 21px; line-height: 1.35; font-weight: 600; }
.credential__main { flex: 999 1 460px; min-width: 0; }
.credential__main p { margin-top: var(--space-2); font-size: 16px; line-height: 1.55; color: var(--text-muted); }
.credential__main .credential__issuer { margin-top: var(--space-3); font-size: 17px; }
.verify-link {
  margin-top: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap);
  font-size: 15px;
  font-weight: 500;
}

/* Document thumbnails: links to the full image; main.js turns them into
   click-to-expand panels. Without JavaScript they open the image directly. */
.docs {
  flex: 1 1 340px;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-4);
}
.doc-thumb {
  flex: 1 1 140px;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  cursor: zoom-in;
}
.section:not(.section--surface) .doc-thumb { background: var(--surface); }
.doc-thumb:hover { border-color: var(--accent); color: var(--ink); }
.doc-thumb[aria-expanded="true"] { border-color: var(--accent); cursor: zoom-out; }
.doc-thumb img { width: 100%; aspect-ratio: 1600 / 1237; object-fit: cover; border-radius: 4px; }
.doc-thumb span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.doc-figure { flex: 1 1 100%; }
.doc-figure[hidden] { display: none; }
.doc-figure img {
  width: 100%;
  max-width: 1000px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.doc-figure figcaption {
  max-width: 1000px;
  margin-top: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  font-size: 14px;
  color: var(--text-subtle);
}
.doc-close {
  min-height: var(--tap);
  padding: 0 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}

/* 5. Page sections ------------------------------------------------------- */

/* Header */
.site-header { border-bottom: 1px solid var(--border); }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2) var(--space-5);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}
.site-nav__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav__links a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 12px;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}
.site-nav__links a:not(.btn):hover { color: var(--accent); }
.site-nav__links .btn { margin-left: 8px; }

/* Hero */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-8) var(--space-9);
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(64px, 8vw, 104px);
}
.hero__text { flex: 999 1 520px; min-width: 0; }
.hero__side {
  flex: 1 1 280px;
  min-width: 0;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-5);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-muted);
}
.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}
.hero__credentials {
  margin-top: clamp(24px, 3.2vw, 40px);  /* clear space under the large name */
  line-height: 1.75;
  font-family: var(--font-mono);
  font-size: min(14px, 3.6vw);  /* shrinks on small phones so each credential stays on one line */
  letter-spacing: 0.02em;
  color: var(--accent);
}
.hero h1 {
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1.04;   /* keeps the two lines apart when the name wraps on phones */
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero__pitch {
  margin-top: var(--space-7);
  max-width: 680px;
  font-size: clamp(20px, 2.2vw, 25px);
  line-height: 1.45;
  color: var(--text-muted);
}
.hero__actions { margin-top: var(--space-7); display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
  background: #e6eaee;
}
.facts {
  margin: 0;
  padding-top: var(--space-5);
  border-top: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  font-size: 15px;
  line-height: 1.5;
}
.facts dt {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.facts dd { margin: var(--space-1) 0 0; }

/* Hero status button: "Open to new roles · Hiring incentives available" (links to #hiring) */
.badge--status {
  min-height: var(--tap);
  margin: var(--space-6) 0 0;
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}
.badge--status:hover { background: var(--accent); color: #fff; }
.badge--status svg { flex: none; }

/* Hiring incentives (Kern County ETR flier) */
.hiring { gap: var(--space-7) var(--space-9); }
.hiring__main {
  flex: 999 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  color: var(--text-muted);
}
.hiring__lead { font-size: 19px; max-width: 720px; }
.hiring__list { margin: 0; padding-left: 20px; max-width: 720px; }
.hiring__list li { padding-left: var(--space-1); }
.hiring__list li + li { margin-top: var(--space-3); }
.hiring__list li::marker { color: var(--accent); }
.hiring__list strong { color: var(--ink); font-weight: 600; }
.hiring__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-2); }
.hiring__actions .btn { max-width: 100%; white-space: normal; text-align: center; }
.hiring__flier {
  flex: 1 1 220px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
  cursor: zoom-in;
}
.hiring__flier:hover { border-color: var(--accent); color: var(--ink); }
.hiring__flier img { width: 100%; border-radius: 4px; }

/* Results band */
.results { display: flex; flex-wrap: wrap; gap: var(--space-7) var(--space-6); padding-top: clamp(48px, 6vw, 72px); padding-bottom: clamp(48px, 6vw, 72px); }
.result { flex: 1 1 220px; min-width: 0; }
.result__value { font-size: 44px; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }
.result__label { margin-top: var(--space-3); max-width: 300px; font-size: 15px; line-height: 1.5; color: var(--on-dark-muted); }

/* Contact */
.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6) var(--space-8);
}
.contact p { flex: 999 1 420px; min-width: 0; max-width: 600px; font-size: 19px; color: var(--on-dark-muted); }
.contact__links { flex: 0 1 auto; min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.contact__links .btn { min-height: 52px; font-size: 16px; }

/* Footer */
.site-footer { border-top: 1px solid #2c3a47; }
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  font-size: 14px;
  color: #9aa6b2;
}
