﻿:root {
  --bg: #ffffff;
  --surface: #f3f5f8;
  --text: #17202a;
  --muted: #5a6573;
  --line: #e1e6eb;
  --accent: #0b5fa3;
  --accent-hover: #084a80;
  --accent-ink: #ffffff;
  --shadow: 0 1px 2px rgb(16 24 40 / .06), 0 12px 30px -16px rgb(16 24 40 / .3);
  /* Headings use a bookish system serif (Palatino on Windows, Iowan on Apple); body text stays sans. No downloads. */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1317;
    --surface: #171c22;
    --text: #e6eaee;
    --muted: #9aa4ae;
    --line: #2a323b;
    --accent: #6cb8ee;
    --accent-hover: #93ccf3;
    --accent-ink: #06121c;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 30px -16px rgb(0 0 0 / .8);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* header and navigation: a slim accent band across the top */
.site-header { border-top: 4px solid var(--accent); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 16px; padding-bottom: 16px; }
.name { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--text); text-decoration: none; }
.name:hover { color: var(--text); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-header nav a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.site-header nav a:hover { color: var(--text); }
.site-header nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }

/* page content */
main.wrap { padding-top: 52px; padding-bottom: 64px; }
h1, h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 3rem); line-height: 1.1; margin: 0 0 12px; }
h2 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 14px; }
h3, h4 { font-size: 1.1rem; line-height: 1.3; margin: 0 0 4px; }
p { margin: 0 0 14px; text-wrap: pretty; }
section { margin-top: 56px; }
section:first-child { margin-top: 0; }
.lede { font-size: 1.3rem; line-height: 1.45; margin-bottom: 10px; }
.muted { color: var(--muted); }
.small { font-size: .92rem; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button { display: inline-block; padding: 11px 20px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.button:hover { background: var(--accent-hover); color: var(--accent-ink); }
.button.secondary { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.button.secondary:hover { color: var(--accent-hover); box-shadow: inset 0 0 0 2px var(--accent-hover); }

/* home: full-width bands, alternating white and grey, with a line between each */
main.bands { padding: 0; }
.band { margin: 0; padding: 60px 0; border-top: 1px solid var(--line); }
.band:first-child { border-top: 0; }
.band.alt { background: var(--surface); }
.band .wrap > p { max-width: 68ch; }
/* the name is the one big moment */
.hero { padding: 76px 0 64px; }
.hero h1 { font-size: clamp(2.8rem, 9vw, 4.6rem); line-height: 1; letter-spacing: -.02em; margin-bottom: 20px; }
.hero .lede { font-size: clamp(1.2rem, 2.4vw, 1.4rem); color: var(--muted); max-width: 40ch; text-wrap: balance; }
.nowrap { white-space: nowrap; }

/* project list on the home page: apps and businesses wide, games in a row of three */
.group { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--muted); margin: 30px 0 0; }
h2 + .group { margin-top: 6px; }
.project-grid + .group { margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--line); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px 24px; margin-top: 14px; }
.project-grid.featured { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.project-grid a { display: block; color: var(--text); text-decoration: none; }
.project-grid img { border-radius: 8px; border: 1px solid var(--line); box-shadow: var(--shadow); aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 12px; }
.project-grid a:hover img { border-color: var(--accent); }
.project-grid a:hover h4 { color: var(--accent); }
.project-grid.featured h4 { font-size: 1.2rem; }
.project-grid p { color: var(--muted); font-size: .95rem; margin: 0; }

/* project pages */
.project { padding-top: 48px; margin-top: 48px; border-top: 1px solid var(--line); }
.project:first-of-type { margin-top: 0; padding-top: 24px; border-top: 0; }
.project img { border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 24px; }
.project h2 { font-size: clamp(1.6rem, 3.6vw, 2.05rem); margin-bottom: 2px; }
.project p { max-width: 68ch; }
.kind { color: var(--muted); margin-bottom: 16px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 18px 0 6px; padding: 16px 18px; background: var(--surface); border-radius: 8px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* work log */
.entry { padding: 22px 0; border-top: 1px solid var(--line); }
.entry:first-of-type { border-top: 0; padding-top: 4px; }
.entry time { display: block; color: var(--muted); font-size: .92rem; margin-bottom: 2px; }

/* resume: name header, a main column, and a shaded sidebar */
body.page-resume .wrap { max-width: 1000px; }
.cv-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px 24px; padding-bottom: 18px; border-bottom: 3px solid var(--accent); }
.cv-head h1 { margin: 0; font-size: clamp(2.4rem, 6vw, 3.2rem); letter-spacing: -.015em; }
.cv-title { margin: 4px 0 0; color: var(--muted); font-size: 1.1rem; }
.cv-contact { list-style: none; margin: 0; padding: 0; text-align: right; font-size: .95rem; line-height: 1.7; }
.cv-contact a { color: var(--text); text-decoration: none; }
.cv-contact a:hover { color: var(--accent); }
.cv-download { grid-column: 1 / -1; margin: 6px 0 0; }
.cv-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 36px; margin-top: 28px; }
.cv-main section, .cv-side section { margin-top: 26px; }
.cv-main section:first-child, .cv-side section:first-child { margin-top: 0; }
.cv-grid h2 { font-size: 1.25rem; color: var(--accent); margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.cv-side { background: var(--surface); border-radius: 10px; padding: 22px; align-self: start; }
.cv-role { margin-top: 16px; }
.cv-role:first-of-type { margin-top: 0; }
.cv-role-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cv-role h3 { font-size: 1.02rem; margin: 0; }
.cv-role h3 .org { font-weight: 400; color: var(--muted); }
.cv-dates { color: var(--muted); font-size: .9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cv-meta { color: var(--muted); font-size: .9rem; margin: 1px 0 6px; }
.cv-role ul { margin: 0; padding-left: 18px; }
.cv-role li { margin-bottom: 3px; }
.cv-side .cv-role h3 { font-size: .98rem; }
.cv-side .cv-role-head { display: block; }
.cv-skill { margin-top: 12px; }
.cv-skill:first-of-type { margin-top: 0; }
.cv-skill h3 { font-size: .9rem; color: var(--muted); font-weight: 600; margin: 0 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.chips li { font-size: .85rem; padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
@media (max-width: 760px) {
  .cv-head { grid-template-columns: 1fr; }
  .cv-contact { text-align: left; }
  .cv-grid { grid-template-columns: 1fr; gap: 28px; }
  .cv-role-head { display: block; }
}

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; margin: 0; padding: 0; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  main.wrap { padding-top: 32px; }
  section { margin-top: 44px; }
  .band { padding: 44px 0; }
  .hero { padding: 52px 0 44px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
}

/* the resume page prints as a one-page, two-column document (the Download button serves Robert's own PDF) */
@media print {
  @page { size: Letter; margin: .5in .55in; }
  :root { --bg: #fff; --surface: #eef2f6; --text: #111; --muted: #4a525c; --line: #d3d9df; --accent: #0b5fa3; }
  html, body { font-size: 8.9pt; }
  body { line-height: 1.38; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-header, .site-footer, .no-print { display: none !important; }
  main.wrap { padding: 0; }
  .wrap, body.page-resume .wrap { max-width: none; padding: 0; }
  h1, .cv-head h1 { font-size: 22pt; }
  p { margin-bottom: 4pt; }
  .cv-head { padding-bottom: 7pt; }
  .cv-title { font-size: 10.5pt; }
  .cv-contact { font-size: 8.9pt; line-height: 1.5; }
  .cv-grid { gap: 18pt; margin-top: 12pt; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
  .cv-main section, .cv-side section { margin-top: 11pt; }
  .cv-grid h2 { font-size: 11pt; margin-bottom: 5pt; padding-bottom: 2pt; break-after: avoid; }
  .cv-side { padding: 11pt 12pt; }
  .cv-role { margin-top: 8pt; break-inside: avoid; }
  .cv-role h3 { font-size: 9.6pt; }
  .cv-meta, .cv-dates { font-size: 8.4pt; }
  .cv-role li { margin-bottom: 1.5pt; }
  .chips { gap: 4pt; }
  .chips li { font-size: 7.9pt; padding: 1.5pt 6pt; }
  a { color: inherit; text-decoration: none; }
}
