/* Graham O'Neill portfolio. One stylesheet, no build step.
   Colors meet WCAG 2.1 AA contrast in both themes. */
:root {
  --bg: #fbfaf7;
  --surface: #fff;
  --text: #1c1b19;
  --muted: #55524c;
  --rule: #dcd8cf;
  --accent: #1f4e79;
  --accent-text: #fff;
  --link: #1f4e79;
  --focus: #b45309;
  --serif: "Source Serif 4", georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", roboto, sans-serif;
  --measure: 68ch;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141518;
    --surface: #1c1e22;
    --text: #ecebe7;
    --muted: #b3b0a8;
    --rule: #34363c;
    --accent: #8fb8de;
    --accent-text: #0d1b2a;
    --link: #9cc3e6;
    --focus: #f0a35e;

    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header and navigation */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.site-name {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--rule); }

.site-nav [aria-current="page"] {
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* Type */
main { padding: 2.5rem 0 4rem; }

h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.2;
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.6rem;
  margin: 3rem 0 1rem;
}

h3 {
  font-size: 1.2rem;
  margin: 1.75rem 0 0.5rem;
}
p, li { max-width: var(--measure); }

.lede {
  font-size: 1.2rem;
  color: var(--text);
}
.muted { color: var(--muted); }

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

/* Home intro */
.intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
}

.intro img {
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule);
}

@media (width >= 48rem) {
  .intro {
    grid-template-columns: 10rem 1fr;
    gap: 2.5rem;
  }

  .intro img {
    width: 10rem;
    height: 10rem;
  }
}

/* Key numbers */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}

.stats li {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1rem 1.25rem;
}

.stats .num {
  display: block;
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.1;
}

.stats .label {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* Case studies */
.cases {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem;
}

.case {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
}

.case h2 {
  margin: 0 0 0.25rem;
  font-size: 1.3rem;
}

.case dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem 1rem;
  margin: 0.75rem 0 0;
}
.case dt { font-weight: 600; }

.case dd {
  margin: 0 0 0.5rem;
  max-width: var(--measure);
}

@media (width >= 48rem) {
  .case dl { grid-template-columns: 9rem 1fr; }
  .case dd { margin: 0; }
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Lists of writing and roles */
.plain-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.plain-list > li {
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}
.plain-list > li:last-child { border-bottom: 1px solid var(--rule); }

.role-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 1rem;
}
.role-head h3 { margin: 0; }

.role ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

/* Buttons */
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.6rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
}
.button:hover { filter: brightness(1.08); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.button.secondary {
  background: transparent;
  color: var(--link);
  border: 2px solid var(--link);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Print: the résumé page prints as a clean PDF */
@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
    --text: #000;
    --muted: #333;
    --rule: #bbb;
    --link: #000;
  }
  .site-header, .site-footer, .skip-link, .no-print { display: none; }
  main { padding: 0; }

  body {
    font-size: 10.5pt;
    line-height: 1.4;
  }

  h1 {
    font-size: 20pt;
    margin-bottom: 4pt;
  }

  h2 {
    font-size: 13pt;
    margin: 12pt 0 4pt;
  }

  h3 {
    font-size: 11pt;
    margin: 6pt 0 2pt;
  }

  .plain-list > li {
    padding: 4pt 0;
    break-inside: avoid;
  }
  a { text-decoration: none; }
}

