/* ==========================================================================
   John Foreman - IT Services
   Design language: "the work order" - the carbon-copy service ticket, the
   manila job folder, the rubber stamp, the handwriting in the blanks.
   ========================================================================== */

:root {
  /* Color: pulled from a triplicate work order pad */
  --manila:      #EDE4D0;  /* the folder / page background */
  --manila-deep: #E2D6BC;  /* recessed panels, table stripes */
  --copy:        #FBF8F0;  /* the white top copy - cards */
  --canary:      #F3D77A;  /* the yellow carbon copy - accents */
  --canary-soft: #FAEEC6;
  --ink:         #1B3050;  /* ballpoint blue - all body text */
  --ink-soft:    #5A6B85;  /* secondary text */
  --rule:        #C4B698;  /* printed form rules */
  --rule-fine:   #D8CCB2;
  --stamp:       #A6382C;  /* rubber stamp red */
  --stamp-soft:  #C9705F;

  --font-form: 'Archivo', system-ui, sans-serif;      /* printed form labels */
  --font-body: 'Newsreader', Georgia, serif;          /* what you read */
  --font-hand: 'Caveat', cursive;                     /* filled in by hand */

  --wrap: 1060px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background-color: var(--manila);
  /* faint fibrous paper texture */
  background-image:
    repeating-linear-gradient(0deg, rgba(27,48,80,0.018) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(27,48,80,0.014) 0 1px, transparent 1px 4px);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

a { color: var(--stamp); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--stamp);
  outline-offset: 3px;
}

p { margin: 0 0 1em; }
.muted { color: var(--ink-soft); }

/* Form label: the printed part of the page */
.label {
  font-family: var(--font-form);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

h1, h2, h3 {
  font-family: var(--font-form);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 0.4em;
}

/* ---------- Header: the folder tab strip ---------- */
.site-header {
  background: var(--copy);
  border-bottom: 2px solid var(--ink);
  position: sticky; top: 0; z-index: 30;
}
.header-inner {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px 28px; flex-wrap: wrap; padding: 14px 0 0;
}
.logo { text-decoration: none; display: block; padding-bottom: 12px; }
.logo strong {
  display: block;
  font-family: var(--font-form);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1;
}
.logo span {
  font-family: var(--font-form);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--stamp);
}

.site-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.site-nav a {
  font-family: var(--font-form);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 9px 15px;
  border: 1px solid var(--rule-fine);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  background: var(--manila-deep);
  position: relative; top: 1px;
}
.site-nav a:hover { color: var(--ink); background: var(--canary-soft); }
.site-nav a[aria-current="page"] {
  background: var(--copy);
  color: var(--ink);
  border-color: var(--ink);
  border-width: 2px 2px 0;
  top: 2px;
}

/* ---------- The rubber stamp (signature element) ---------- */
.stamp {
  display: inline-block;
  font-family: var(--font-form);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--stamp);
  border: 3px double var(--stamp);
  border-radius: 3px;
  padding: 7px 14px 6px;
  letter-spacing: 0.13em;
  line-height: 1.05;
  transform: rotate(-5deg);
  opacity: 0.88;
  font-size: 0.82rem;
  text-align: center;
}
.stamp small {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  opacity: 0.85;
  margin-top: 2px;
}
.stamp--sm { font-size: 0.64rem; padding: 4px 9px 3px; border-width: 2px; transform: rotate(-3deg); }
.stamp--closed { color: var(--ink-soft); border-color: var(--ink-soft); }

/* ---------- Hero: a filled-out work order ---------- */
.order {
  margin: 44px 0 60px;
  background: var(--copy);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(27,48,80,0.10);
  position: relative;
}
.order__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 14px 26px;
  border-bottom: 2px solid var(--ink);
  background: var(--canary);
}
.order__title {
  font-family: var(--font-form);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0;
}
.order__no { font-family: var(--font-form); font-size: 0.72rem; letter-spacing: 0.1em; color: #6E5A1E; }

.order__stamp { position: absolute; top: 74px; right: 22px; z-index: 5; }
@media (max-width: 860px) { .order__stamp { position: static; margin: 18px 26px 0; display: inline-block; } }

.order__rows { border-bottom: 1px solid var(--rule); }
.order__row {
  display: grid;
  grid-template-columns: 168px 1fr;
  border-bottom: 1px solid var(--rule-fine);
}
.order__row:last-child { border-bottom: none; }
.order__row dt {
  padding: 11px 20px;
  border-right: 1px solid var(--rule-fine);
  background: var(--manila-deep);
  font-family: var(--font-form);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex; align-items: center;
}
.order__row dd {
  margin: 0;
  padding: 10px 20px;
  font-size: 1.02rem;
  display: flex; align-items: center;
  min-height: 46px;
}
.order__row dd.name {
  font-family: var(--font-form);
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: -0.02em;
  padding: 12px 20px;
}
@media (max-width: 620px) {
  .order__row { grid-template-columns: 1fr; }
  .order__row dt { border-right: none; border-bottom: 1px solid var(--rule-fine); padding: 7px 20px; }
  .order__row dd.name { font-size: 1.5rem; }
}

.order__body { padding: 22px 26px 26px; }
.order__body .label { display: block; margin-bottom: 10px; }
.order__body p { font-size: 1.08rem; max-width: 72ch; margin-bottom: 0; }

.order__foot {
  display: flex; gap: 12px; flex-wrap: wrap;
  padding: 0 26px 26px;
}

.btn {
  font-family: var(--font-form);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 13px 22px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--copy);
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}
.btn:hover { background: var(--stamp); border-color: var(--stamp); color: var(--copy); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--canary); border-color: var(--ink); color: var(--ink); }

/* ---------- Sections ---------- */
section { padding: 8px 0 56px; }
.section-head { margin-bottom: 26px; max-width: 640px; }
.section-head .label { display: block; margin-bottom: 8px; }
.section-head h2 { font-size: 1.6rem; margin-bottom: 6px; }
.section-head p { margin-bottom: 0; color: var(--ink-soft); }

/* ---------- Skills: a checklist of what he's qualified on ---------- */
.checklist {
  background: var(--copy);
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 rgba(27,48,80,0.08);
}
.check-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 0 14px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--rule-fine);
  text-decoration: none;
  color: inherit;
}
.check-row:last-child { border-bottom: none; }
.check-row:hover { background: var(--canary-soft); color: inherit; }

.box {
  width: 22px; height: 22px;
  border: 2px solid var(--ink);
  display: grid; place-items: center;
  font-family: var(--font-hand);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--stamp);
  background: var(--copy);
}
.box--partial { color: var(--ink-soft); font-size: 1.15rem; }

.check-row h3 {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  margin: 0 0 1px;
}
.check-row p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); line-height: 1.4; }
.check-note {
  font-family: var(--font-hand);
  font-size: 1.12rem;
  color: var(--stamp);
  white-space: nowrap;
}
.check-note--wait { color: var(--ink-soft); }
@media (max-width: 620px) {
  .check-row { grid-template-columns: 32px 1fr; }
  .check-note { grid-column: 2; font-size: 1rem; }
}

.after-list { margin-top: 18px; }
.after-list a {
  font-family: var(--font-form);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Jobs (projects) ---------- */
.jobs { display: grid; gap: 20px; }
.job {
  background: var(--copy);
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 rgba(27,48,80,0.08);
  padding: 0;
}
.job__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 10px 22px;
  border-bottom: 1px solid var(--rule);
  background: var(--manila-deep);
}
.job__no {
  font-family: var(--font-form);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.job__body { padding: 20px 22px 22px; }
.job__body h3 { font-size: 1.2rem; margin-bottom: 10px; }
.job__body p { margin-bottom: 0.8em; }
.job__body p:last-of-type { margin-bottom: 0; }

.parts {
  list-style: none; margin: 16px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 7px;
}
.parts li {
  font-family: var(--font-form);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  background: var(--manila);
  padding: 4px 10px;
}

.job__shot { margin: 18px 0 0; }
.job__shot img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--rule);
}
.job__shot figcaption {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-top: 7px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 2px solid var(--ink);
  background: var(--copy);
  margin-top: 20px;
  padding: 22px 0;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap;
  font-family: var(--font-form);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.footer-inner a { color: var(--ink-soft); text-decoration: none; }
.footer-inner a:hover { color: var(--stamp); }

/* ---------- About: bio + headshot ---------- */
.bio-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  align-items: start;
  max-width: 920px;
  margin: 34px 0 52px;
}
@media (max-width: 720px) {
  .bio-layout { grid-template-columns: 1fr; }
  .bio-photo { max-width: 230px; }
}
.bio-photo {
  width: 100%;
  height: auto;
  display: block;
  background: var(--copy);
  padding: 10px;
  border: 1px solid var(--rule);
  box-shadow: 4px 4px 0 rgba(27,48,80,0.09);
}
.panel {
  background: var(--copy);
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 rgba(27,48,80,0.08);
  padding: 26px;
}
.bio-text { margin: 0; }
.bio-text p:last-child { margin-bottom: 0; }

/* ---------- Personal: polaroids pinned to the board ---------- */
.personal {
  background: var(--manila-deep);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 44px 0 52px;
  margin-top: 20px;
}

.polaroids {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-bottom: 40px;
  padding: 6px 0;
}
.polaroid {
  background: #FDFBF6;
  padding: 11px 11px 0;
  margin: 0;
  width: 174px;
  box-shadow: 0 3px 12px rgba(27,48,80,0.20);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.polaroid img {
  width: 100%;
  height: 174px;
  object-fit: cover;
  display: block;
}
.polaroid figcaption {
  font-family: var(--font-hand);
  font-size: 1.12rem;
  line-height: 1.25;
  color: var(--ink);
  text-align: center;
  padding: 11px 4px 14px;
}
.polaroid--tilt-l { transform: rotate(-2.5deg); }
.polaroid--tilt-r { transform: rotate(2deg); }
.polaroid:hover {
  transform: rotate(0deg) scale(1.04);
  box-shadow: 0 10px 24px rgba(27,48,80,0.28);
  z-index: 2;
}
@media (max-width: 560px) {
  .polaroids { justify-content: center; gap: 18px; }
  .polaroid { width: 148px; }
  .polaroid img { height: 148px; }
}

.interests-panel { max-width: 720px; }
.interests-panel h3 { font-size: 1.15rem; }
.tag-list {
  list-style: none; margin: 14px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 7px;
}
.tag-list li {
  font-family: var(--font-form);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  background: var(--manila);
  padding: 5px 11px;
}

/* ---------- Page header (inner pages) ---------- */
.page-header {
  border-bottom: 2px solid var(--ink);
  background: var(--copy);
  padding: 34px 0 30px;
  margin-bottom: 8px;
}
.page-header h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: 8px; }
.page-header p { max-width: 62ch; margin: 0; color: var(--ink-soft); }
.page-header .label { display: block; margin-bottom: 9px; }

/* ---------- Career changelog ---------- */
.changelog-list { list-style: none; margin: 0; padding: 0; }
.changelog-list li {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule-fine);
}
.changelog-list li:first-child { border-top: 1px solid var(--rule); }
@media (max-width: 640px) {
  .changelog-list li { grid-template-columns: 1fr; gap: 5px; }
}
.version {
  font-family: var(--font-form);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stamp);
}
.changelog-list h3 { font-size: 1.05rem; margin-bottom: 5px; }
.changelog-list .role { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 7px; }
.changelog-list p:last-child { margin-bottom: 0; }

/* ---------- Skills page ---------- */
.skill-block { padding: 26px 0; border-bottom: 1px solid var(--rule-fine); }
.skill-block:first-child { border-top: 1px solid var(--rule); }
.skill-block__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.skill-block__head h2 { font-size: 1.2rem; margin: 0; }
.skill-block__blurb { margin: 5px 0 15px; font-size: 0.95rem; }
.skill-items {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 26px;
}
@media (max-width: 700px) { .skill-items { grid-template-columns: 1fr; } }
.skill-items li {
  font-size: 0.95rem;
  padding-left: 17px;
  position: relative;
  line-height: 1.5;
}
.skill-items li::before {
  content: "\2022";
  position: absolute; left: 2px;
  color: var(--stamp);
}

/* ---------- Project screenshot ---------- */
.project-shot { margin: 18px 0 0; }
.project-shot img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--rule);
}
.project-shot figcaption {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-top: 7px;
}

/* Old project-card markup, restyled as job tickets */
.project-card {
  background: var(--copy);
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 rgba(27,48,80,0.08);
  padding: 26px !important;
  margin-bottom: 20px;
}
.project-meta {
  font-family: var(--font-form);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 9px;
}
.project-card h3 { margin-bottom: 10px; }
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 760px) { .project-grid { grid-template-columns: 1fr; } }
.link-more {
  font-family: var(--font-form);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.section-head .eyebrow, .page-header .eyebrow {
  font-family: var(--font-form);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stamp);
  margin: 0 0 8px;
}
.callout {
  border: 1px dashed var(--rule);
  background: var(--canary-soft);
  padding: 14px 18px;
  font-size: 0.92rem;
}
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .status-grid { grid-template-columns: 1fr; } }
.status-card {
  background: var(--copy);
  border: 1px solid var(--rule);
  padding: 18px;
}
.status-card h3 { font-size: 0.95rem; margin-bottom: 5px; }
.status-card p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

/* ==========================================================================
   Color extensions + motion
   ========================================================================== */
:root {
  --approved: #3F6B4A;   /* approved-green, second stamp ink */
  --approved-soft: #E4EDE3;
}

/* Skills page: qualified reads green, in-progress stays red */
.stamp--ok { color: var(--approved); border-color: var(--approved); }

/* Canary band across inner page headers, echoing the work order */
.page-header {
  border-top: 6px solid var(--canary);
  position: relative;
}

/* Section headers get a small ruled marker */
.section-head { position: relative; padding-left: 0; }
.section-head h2::after {
  content: "";
  display: block;
  width: 44px; height: 3px;
  background: var(--canary);
  margin-top: 9px;
}

/* Job / project cards: canary edge that warms on hover */
.job, .project-card {
  border-left: 6px solid var(--canary);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-left-color 0.18s ease;
}
.job:hover, .project-card:hover {
  border-left-color: var(--stamp);
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(27,48,80,0.12);
}
.project-card { position: relative; }
.job-stamp { position: absolute; top: 20px; right: 22px; }
@media (max-width: 620px) {
  .job-stamp { position: static; display: inline-block; margin-bottom: 10px; }
}

/* Nav tabs lift slightly */
.site-nav a { transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease; }
.site-nav a:hover { transform: translateY(-2px); }

/* Buttons */
.btn { transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease; }
.btn:active { transform: translateY(1px); }

/* ---------- Contact page layout ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
  padding-top: 34px;
  padding-bottom: 30px;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card .label { display: block; margin-bottom: 14px; }
.contact-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.contact-card p { margin-bottom: 12px; }

.contact-side { padding-top: 6px; }
.stamp--lg { font-size: 1rem; padding: 12px 20px 10px; transform: rotate(-4deg); }
.side-rows { margin: 34px 0 0; }
.side-rows > div {
  border-top: 1px solid var(--rule);
  padding: 12px 0;
}
.side-rows dt {
  font-family: var(--font-form);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 3px;
}
.side-rows dd { margin: 0; font-size: 0.98rem; }

/* Push the footer down on short pages */
body { display: flex; flex-direction: column; min-height: 100vh; }
.site-footer { margin-top: auto; }

/* ==========================================================================
   Motion. All of it opt-out via prefers-reduced-motion (handled at top).
   ========================================================================== */

/* The signature: the stamp lands on the page */
@keyframes stamp-down {
  0%   { opacity: 0; transform: rotate(-18deg) scale(2.1); }
  55%  { opacity: 1; transform: rotate(-3deg) scale(0.94); }
  75%  { transform: rotate(-6deg) scale(1.03); }
  100% { opacity: 0.88; transform: rotate(-5deg) scale(1); }
}
.order__stamp .stamp {
  animation: stamp-down 0.62s cubic-bezier(0.2, 0.8, 0.3, 1) 0.45s both;
}
.contact-side .stamp--lg {
  animation: stamp-down 0.62s cubic-bezier(0.2, 0.8, 0.3, 1) 0.3s both;
}

/* Work order slides up on load */
@keyframes lift-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.order { animation: lift-in 0.5s ease both; }

/* Scroll reveals */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.is-in {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2,0.7,0.3,1);
}

/* Checkmarks tick in one after another, like someone working down the list */
@keyframes tick {
  from { opacity: 0; transform: scale(0.3) rotate(-25deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}
.checklist.is-in .box { animation: tick 0.32s ease both; }

@media (prefers-reduced-motion: reduce) {
  .order__stamp .stamp,
  .contact-side .stamp--lg,
  .order,
  .checklist.is-in .box { animation: none !important; opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; }
}
