/* Jack's Robotics — "Shop Floor" theme
   Change --accent to recolour the whole site. */
:root {
  --bg: #121212;
  --surface: #1A1A1A;
  --line: #2A2A2A;
  --text: #EDEDED;
  --muted: #BDBDBD;
  --dim: #A0A0A0;
  --accent: #3B9EE8;
  --accent-hover: #8CCBF5;
  --on-accent: #121212;
  --display: 'Barlow Condensed', system-ui, sans-serif;
  --body: 'Barlow', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.mono { font-family: var(--mono); }
.eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
  margin: 0;
}
p { margin: 0; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between;
  padding-top: 20px; padding-bottom: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-logo { width: 44px; height: 44px; display: block; }
.brand-mark {
  width: 36px; height: 36px;
  background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 22px;
}
.brand-name {
  font-family: var(--display); font-weight: 700; font-size: 22px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.nav a {
  font-family: var(--mono); font-size: 14px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: #CFCFCF; padding: 10px 0;
}
.nav a:hover { color: var(--accent); }
.nav a.cta { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 26px;
  font-family: var(--display); font-weight: 700; font-size: 18px;
  text-transform: uppercase; letter-spacing: 0.06em;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { border-color: #555; color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Photo placeholders ----------
   Swap any <div class="ph">…</div> for <img src="images/…" alt="…" class="photo">
   when you have the real photo. */
.ph, .photo { width: 100%; height: 100%; object-fit: cover; }
.hero-media, .card-media, .project-cover, .about-media { position: relative; overflow: hidden; }
.hero-media > .photo, .card-media > .photo, .project-cover > .photo, .about-media > .photo {
  position: absolute; inset: 0;
}
.ph {
  background-color: #1E1E1E;
  background-image: repeating-linear-gradient(135deg, #262626 0 12px, #1E1E1E 12px 24px);
  border: 1px dashed #4A4A4A;
  display: flex; align-items: flex-end;
  padding: 24px;
  font-family: var(--mono); font-size: 13px; color: var(--dim);
}

/* ---------- Hero ---------- */
.hero {
  display: grid; gap: 48px; align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  padding-top: 72px; padding-bottom: 64px;
}
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(52px, 7vw, 92px); line-height: 0.92; letter-spacing: -0.01em; }
.hero .lead { font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 520px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 8px; }
.hero-media { position: relative; height: 480px; }
.hero-media::before, .hero-media::after {
  content: ""; position: absolute; width: 18px; height: 18px; z-index: 1;
}
.hero-media::before { top: 16px; left: 16px; border-top: 3px solid var(--accent); border-left: 3px solid var(--accent); }
.hero-media::after { bottom: 16px; right: 16px; border-bottom: 3px solid var(--accent); border-right: 3px solid var(--accent); }

/* ---------- Skills strip ---------- */
.strip { background: var(--accent); color: var(--on-accent); }
.strip ul {
  list-style: none; margin: 0 auto; padding: 14px 32px; max-width: var(--max);
  display: flex; flex-wrap: wrap; gap: 12px 36px;
  font-family: var(--display); font-weight: 700; font-size: 20px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.strip li + li::before { content: "■"; margin-right: 36px; }

/* ---------- Sections ---------- */
section { scroll-margin-top: 24px; }
.section { padding-top: 88px; padding-bottom: 40px; }
.section-head {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between; align-items: flex-end;
  margin-bottom: 40px;
}
.section-head h2 { font-size: clamp(44px, 5vw, 64px); }

/* ---------- Project cards ---------- */
.projects { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text); display: flex; flex-direction: column;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.card-media { height: 230px; }
.card-media .ph { border: none; padding: 18px; font-size: 12px; }
.card-body { padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.card-tag { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.card h3 { font-weight: 700; font-size: 30px; }
.card p { font-size: 16px; line-height: 1.55; color: var(--muted); }

.card.featured {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.card.featured .card-media { height: auto; min-height: 360px; }
.card.featured .card-body { padding: 40px; gap: 18px; justify-content: center; }
.card.featured h3 { font-weight: 800; font-size: 46px; }
.card.featured p { font-size: 17px; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: 12px; }
.chips span { border: 1px solid #444; padding: 6px 10px; }
.more {
  font-family: var(--display); font-weight: 700; font-size: 18px;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent);
}

/* ---------- From the shed ---------- */
.shed { padding-top: 64px; padding-bottom: 24px; }
.shed-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.shed-grid > figure:first-child { grid-column: span 2; }
.shed figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.shed .photo { height: 420px; border: 1px solid var(--line); }
.shed figcaption { font-family: var(--mono); font-size: 13px; color: var(--dim); line-height: 1.5; }
@media (max-width: 720px) {
  .shed-grid > figure:first-child { grid-column: auto; }
  .shed .photo { height: 280px; }
}

/* ---------- About ---------- */
.about {
  display: grid; gap: 48px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  padding-top: 72px; padding-bottom: 72px;
}
.about-media { min-height: 380px; }
.about-copy { display: flex; flex-direction: column; gap: 20px; justify-content: center; max-width: 780px; }
.about-copy h2 { font-size: clamp(40px, 4.5vw, 54px); }
.about-copy p { color: var(--muted); line-height: 1.65; }

/* ---------- Experience ---------- */
.experience { padding-top: 40px; padding-bottom: 72px; }
.experience h2 { font-size: clamp(40px, 4.5vw, 54px); margin-bottom: 28px; }
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li {
  display: grid; gap: 16px; padding: 26px 0; border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.timeline .when { font-family: var(--mono); font-size: 14px; color: var(--dim); }
.timeline .what { font-family: var(--display); font-weight: 700; font-size: 26px; text-transform: uppercase; line-height: 1.1; }
.timeline .detail { font-size: 16px; color: var(--muted); line-height: 1.55; }

/* ---------- Contact / footer ---------- */
.contact { border-top: 1px solid var(--line); }
.contact .wrap {
  display: flex; flex-wrap: wrap; gap: 32px;
  justify-content: space-between; align-items: center;
  padding-top: 80px; padding-bottom: 80px;
}
.contact h2 { font-size: clamp(48px, 6vw, 72px); line-height: 0.95; }
.contact-links { display: flex; flex-direction: column; gap: 14px; font-family: var(--mono); font-size: 16px; }
.contact-links a { padding: 6px 0; }
.site-footer {
  text-align: center; padding: 20px;
  font-family: var(--mono); font-size: 12px; color: #8A8A8A;
  border-top: 1px solid var(--line);
}

/* ---------- Project detail pages ---------- */
.back { display: inline-block; margin-top: 40px; font-family: var(--mono); font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; }
.project-hero { padding-top: 32px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 20px; }
.project-hero h1 { font-size: clamp(48px, 6.5vw, 84px); line-height: 0.95; }
.project-hero .lead { font-size: 19px; color: var(--muted); max-width: 760px; }
.project-cover { height: 520px; margin-bottom: 64px; }
.project-layout {
  display: grid; gap: 56px; padding-bottom: 88px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.prose { grid-column: span 2; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.prose h2 { font-size: 40px; margin-top: 24px; }
.prose p, .prose li { color: var(--muted); line-height: 1.7; }
.specs { border: 1px solid var(--line); background: var(--surface); align-self: start; }
.specs h2 { font-size: 24px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.specs dl { margin: 0; }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.specs div:last-child { border-bottom: none; }
.specs dt { font-family: var(--mono); font-size: 13px; color: var(--dim); text-transform: uppercase; }
.specs dd { margin: 0; text-align: right; }
.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.gallery > * { height: 200px; }

@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .hero { padding-top: 48px; }
  .hero-media { height: 320px; }
  .prose { grid-column: auto; }
  .strip li + li::before { margin-right: 20px; }
  .strip ul { gap: 8px 20px; font-size: 17px; }
}

/* ---------- Content pages (resume, blog, summary statement) ---------- */
.page { padding-top: 56px; padding-bottom: 88px; max-width: 900px; }
.page-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 48px; }
.page-head h1 { font-size: clamp(48px, 6vw, 76px); line-height: 0.95; }
.page-head .lead { font-size: 19px; color: var(--muted); }
.page h2 { font-size: 34px; margin: 48px 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.page h3 { font-family: var(--display); font-weight: 700; font-size: 24px; text-transform: none; letter-spacing: 0; }
.page p, .page li { color: var(--muted); line-height: 1.7; }
.page ul { padding-left: 20px; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.entry { display: grid; gap: 4px 24px; grid-template-columns: minmax(0, 1fr) auto; padding: 14px 0; }
.entry .meta { font-family: var(--mono); font-size: 13px; color: var(--dim); white-space: nowrap; }
.entry .sub { grid-column: 1 / -1; color: var(--text); }
.entry ul { grid-column: 1 / -1; }
.skills { display: grid; gap: 12px 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.skills dt { font-family: var(--mono); font-size: 13px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.skills dd { margin: 4px 0 0; color: var(--muted); }
.contact-line { display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--mono); font-size: 14px; }
.post-list { list-style: none; padding: 0 !important; gap: 0 !important; border-top: 1px solid var(--line); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a { display: flex; flex-direction: column; gap: 6px; padding: 22px 0; color: var(--text); }
.post-list a:hover h3 { color: var(--accent); }
.post-list .meta { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.post-list p { font-size: 16px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.table-wrap table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 15px; }
.table-wrap th { text-align: left; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); background: var(--surface); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table-wrap td { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--muted); line-height: 1.55; }
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap td:first-child { color: var(--text); }
.table-wrap .code { font-family: var(--mono); color: var(--accent); white-space: nowrap; }
.post { max-width: 760px; }
.post .prose { grid-column: auto; }
@media print {
  body { background: #fff; color: #111; }
  .site-header .nav, .site-footer, .back { display: none; }
  .page p, .page li, .table-wrap td, .table-wrap td:first-child { color: #111; }
  .table-wrap th { background: #eee; color: #333; }
  .table-wrap, .table-wrap td, .table-wrap th { border-color: #bbb; }
  a { color: #0b4f8a; }
  .brand-name { color: #111; }
}
.comp-box { margin-top: 56px; padding: 22px 24px; border: 1px solid var(--line); background: var(--surface); }
.comp-box ul { list-style: none; padding: 0; margin-top: 10px; }
.comp-box a { color: var(--muted); }
.comp-box a:hover { color: var(--accent); }
.comp-box .code, .post .code { font-family: var(--mono); color: var(--accent); margin-right: 8px; }
.prose code { font-family: var(--mono); font-size: 0.92em; color: var(--text); }
.prose strong { color: var(--text); }
