/* Portfolio: the split hero.
 *
 * Concept 1 of three, chosen after seeing all of them rendered. Identity and a
 * short pitch on the left, a featured screenshot on the right, then full-width
 * project rows where the screenshot and the words swap sides down the page.
 *
 * It replaces a layout that opened with four dense paragraphs before a single
 * piece of work appeared, and stacked each screenshot above its own words so
 * the images stayed small and the width went unused. The first screenshot now
 * appears within the first screen.
 *
 * Tokens and the site header are NOT defined here: the page defines the first
 * and /shared/site-nav.css owns the second.
 */

/* The tokens and the page frame.
 *
 * These were stripped out with the concept's header rules and nothing put them
 * back, so every var(--bg) resolved to nothing and the body computed to
 * rgba(0, 0, 0, 0) - a page with no background at all. site-nav.css does not
 * define them either, on purpose: it is loaded by four pages that own their
 * own palette.
 *
 * LIGHT IS THE DEFAULT whatever the operating system prefers. There is no
 * prefers-color-scheme block, because the theme toggle treats an unset
 * data-theme as light and honouring the OS made the two disagree.
 */
:root {
  --bg: #eef1f4;
  --surface: #ffffff;
  --text: #1a232b;
  --muted: #44525c;
  --border: #d0d7de;
  --primary: #2c5266;
  --primary-contrast: #ffffff;
  --primary-soft: rgba(44, 82, 102, 0.10);
  --shadow: 0 1px 2px rgba(26, 35, 43, .06), 0 8px 24px rgba(26, 35, 43, .08);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #131a20;
  --surface: #1c242b;
  --text: #e8eef2;
  --muted: #a3b2bc;
  --border: #33404a;
  --primary: #8fb4c8;
  --primary-contrast: #131a20;
  --primary-soft: rgba(143, 180, 200, 0.16);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 28px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 "IBM Plex Sans", system-ui, -apple-system, sans-serif;
}

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

a { color: var(--primary); }

a:hover { text-decoration: underline; }

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

.skip {
    position: absolute;
    left: 8px;
    top: -40px;
    z-index: 100;
    background: var(--primary);
    color: var(--primary-contrast);
    padding: 8px 14px;
    min-height: 44px;
    text-decoration: none;
    font-weight: 600;
  }

.skip:focus { top: 8px; }

.kicker {
    font: 600 11px/1 "IBM Plex Mono", ui-monospace, monospace;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 10px;
  }

.where {
    font: 500 12px/1.3 "IBM Plex Mono", ui-monospace, monospace;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 16px;
  }

.links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }

.pill, .visit, .source {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
  }

.pill, .source {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
  }

.pill:hover, .source:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

.visit {
    border: 1px solid var(--primary);
    background: var(--primary);
    color: var(--primary-contrast);
  }

.visit:hover { filter: brightness(1.06); text-decoration: none; }

.hero {
    display: grid;
    gap: 20px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px 16px 12px;
  }

.hero-shot {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: var(--surface);
  }

.hero-video-title { margin: 0; padding: 12px 16px; font-weight: 600; font-size: 16px; line-height: 1.3; color: var(--text, inherit); border-top: 1px solid var(--border); }
.hero-video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.hero-shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; }

.hero-copy h1 {
    margin: 0 0 8px;
    font-size: clamp(32px, 5vw, 48px);
    letter-spacing: -0.035em;
    line-height: 1.05;
    font-weight: 700;
  }

.hero-copy .headline {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.35;
  }

.hero-copy .bio {
    margin: 0 0 28px;
    color: var(--muted);
    max-width: 62ch;
  }

.hero-copy .bio.clamped {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
  }
.bio-more {
    margin: 0 0 24px;
    padding: 6px 0;
    background: none;
    border: 0;
    color: var(--accent, #2b5870);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
  }
.hero-copy h2 {
    margin: 0 0 8px;
    font-size: 28px;
    letter-spacing: -0.03em;
    line-height: 1.15;
  }

.hero-copy .blurb { margin: 0 0 16px; color: var(--muted); max-width: 62ch; }

.band { padding: 8px 0 64px; }

.row {
    display: grid;
    gap: 20px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px 16px;
    align-items: center;
  }

.row + .row { border-top: 1px solid var(--border); }

.row .shot {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: var(--surface);
  }

.row .shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; }

.row .copy h3 {
    margin: 0 0 10px;
    font-size: 26px;
    letter-spacing: -0.03em;
    line-height: 1.15;
  }

.row .copy p { margin: 0 0 16px; color: var(--muted); max-width: 42ch; }

.gallery {
    grid-column: 1 / -1;
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
.hero-gallery { max-width: 1440px; margin: 0 auto; padding: 8px 16px 28px; }
@media (min-width: 900px) { .hero-gallery { padding: 8px 28px 40px; } }
.gallery li { margin: 0; }
.gallery a { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.gallery img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.gallery span { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.row .actions { display: flex; flex-wrap: wrap; gap: 8px; }

@media (min-width: 900px) {
    .hero {
      grid-template-columns: minmax(24rem, 1fr) minmax(0, 1.25fr);
      gap: 40px;
      padding: 40px 28px 20px;
      align-items: start;
    }
    .hero-copy { order: -1; }
    .row {
      grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.85fr);
      gap: 40px;
      padding: 40px 28px;
    }
    .row.alt { grid-template-columns: minmax(18rem, 0.85fr) minmax(0, 1.35fr); }
    .row.alt .shot { order: 2; }
    .row.alt .copy { order: 1; }
  }

@media (max-width: 720px) {
    header.site .brand img { width: 48px; height: 48px; border-radius: 12px; }
    header.site .brand strong { font-size: 18px; white-space: nowrap; }
    header.site .brand em { display: none; }
    header.site nav.tabs a { font-size: 13px; min-height: 44px; }
  }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; filter: none !important; }
  }


/* ---- closing sections -----------------------------------------------------
 *
 * Open source and the resume facts. They ran edge to edge with no left padding
 * because .band has no max-width - each .row supplies its own - so anything
 * else dropped into a band inherited nothing. band-inner is the same column as
 * the hero and the rows, to the pixel.
 */
.band-inner {
  max-width: 1440px;
  margin: 0 auto;
  /* The SAME horizontal padding as .hero and .row, including the step up at
     900px. It was a flat 16px, so at desktop every closing section started
     twelve pixels left of the hero copy above it - the misalignment that made
     these read as orphaned. Any change to the row padding has to change here
     too, which is why the number is called out rather than buried. */
  padding: 0 16px;
}
@media (min-width: 900px) {
  .band-inner { padding: 0 28px; }
}
.band.closing { padding-top: 0; padding-bottom: 40px; }
.band.closing + .band.closing { padding-top: 4px; }

.section-title {
  font: 600 12px/1 "IBM Plex Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* Repositories as cards in a responsive grid. A single full-width stack of thin
   bars is what made this read as an orphaned list rather than part of the page;
   twelve of them at 1440px is a lot of empty line to cross. */
.repos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
}
.repos li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px 17px;
  min-width: 0;
}
.repos a { color: var(--primary); text-decoration: none; font-weight: 600; }
.repos a:hover { text-decoration: underline; }
.lang {
  margin-left: 9px;
  font: 600 10px/1 "IBM Plex Mono", ui-monospace, monospace;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.repo-desc {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin-top: 6px;
}

/* The resume facts. Each label sits in its own column at desktop width so the
   eye has something to travel down, instead of five paragraphs that begin with
   a bold run and then wrap the full width of the screen. */
.facts { display: grid; gap: 34px; }
.fact { min-width: 0; }
.lines p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}
.lines p:last-child { margin-bottom: 0; }
.lines strong {
  color: var(--text);
  font-weight: 600;
}

@media (min-width: 900px) {
  .lines p {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 20px;
    align-items: baseline;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }
  .lines p:last-child { border-bottom: 0; padding-bottom: 0; }
  .lines strong { text-align: left; }
}

[hidden] { display: none !important; }

/* Shown on a portfolio that has no projects of its own. The alternative was
   borrowing the owner's, which is what this page used to do. */
.empty-note {
  margin: 0;
  padding: 28px 0;
  color: var(--muted);
  font-size: 16px;
}

/* Work history and resume projects. One column of prose, matching the
   document -- this resume has no bullets, so a list renderer would be empty. */
.roles, .resume-projects { display: flex; flex-direction: column; gap: 28px; }
.role h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.03em; }
.role-meta {
  margin: 0 0 12px;
  color: var(--muted);
  font: 500 13px/1.4 "IBM Plex Mono", ui-monospace, monospace;
}
/* No measure cap. 62ch resolved to 595px inside a 1384px column, so every
   achievement paragraph used 43 percent of the width it had and the section
   read as a narrow ribbon on a wide screen. Brian asked for the full width.
   The band's own 1440px max-width and its 28px padding are what keep the line
   from running edge to edge on a very wide monitor. */
.role p { margin: 0 0 10px; color: var(--muted); }
.role p:last-child { margin-bottom: 0; }

/* Print: the page IS the virtual resume. Navigation and a dark canvas burn
   ink and are not the document; Playwright's emulateMedia({ media: 'print' })
   is what proves this, because a screen screenshot cannot. */
@media print {
  header.site, #sitenav, a.skip { display: none !important; }
  html, body {
    background: #fff !important;
    color: #000 !important;
  }
  body { font-size: 12pt; }
  .hero, .row, .band-inner {
    display: block;
    max-width: none;
    padding: 0;
    margin: 0 0 18pt;
    box-shadow: none;
  }
  .hero-shot, .row .shot { display: none; }
  .pill, .visit, .source { border: 1px solid #000; color: #000; background: #fff; }
  .section-title { color: #000; border-bottom-color: #000; }
  .role p, .hero-copy .bio, .lines p { color: #000; }
}
