/* Phil G. — shared styles
   System fonts only, single family, hierarchy via weight/size/spacing. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --bg: #f6f2ea;
  --bg-raised: #efe8db;
  --text: #211d17;
  --text-muted: #6f675b;
  --text-faint: #a39a8a;
  --border: #ded4c1;
  --border-strong: #c9bda5;
  --accent: #c8421a;
  --accent-ink: #943012;

  --content-width: 760px;
  --wide-width: 960px;
  --gutter: 24px;

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

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

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

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(246, 242, 234, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  z-index: 10;
}

.site-header .wrap-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}

.logo svg {
  display: block;
  height: 19px;
  width: auto;
}

.logo-accent {
  fill: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  font-size: 14.5px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav .cta {
  color: var(--text);
  font-weight: 600;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 7px 14px;
}

.site-nav .cta:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.nav-toggle {
  display: none;
}

/* ---------- Sections ---------- */

section {
  border-bottom: 1px solid var(--border);
  padding: 72px 0;
}

section:last-of-type {
  border-bottom: none;
}

.eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 18px;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.18;
}

h2 {
  font-size: 26px;
  line-height: 1.25;
}

h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

p {
  margin: 0 0 16px;
  color: var(--text);
}

.lede {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 640px;
}

.text-muted {
  color: var(--text-muted);
}

/* ---------- Hero ---------- */

.hero {
  padding-top: 96px;
  padding-bottom: 88px;
}

.hero h1 {
  max-width: 660px;
}

.hero h1 em {
  white-space: nowrap;
}

.hero .lede {
  margin-left: 0;
  margin-right: 0;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  color: var(--text);
  transition: all 0.15s ease;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fdf8f1;
}

.btn-primary:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  color: #fdf8f1;
}

/* ---------- Profile ---------- */

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 48px;
  align-items: start;
}

.profile-photo {
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.facts-list {
  margin-top: 20px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.facts-list li {
  padding-left: 22px;
  position: relative;
  color: var(--text-muted);
}

.facts-list li::before {
  content: "\2013";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Experience ---------- */

.timeline {
  display: grid;
  gap: 36px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
}

.timeline-dates {
  color: var(--text-faint);
  font-size: 14px;
  font-family: var(--mono);
  padding-top: 3px;
}

.timeline-role {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 8px;
}

/* ---------- FAQ / facts ---------- */

.faq-list {
  display: grid;
  gap: 32px;
}

.faq-item h3 {
  font-size: 17px;
}

.faq-item p {
  color: var(--text-muted);
}

/* ---------- Testimonials ---------- */

.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.testimonial {
  background: var(--bg-raised);
  border-radius: 10px;
  padding: 26px 28px;
}

.testimonial p {
  font-size: 15.5px;
  color: var(--text);
  margin-bottom: 14px;
}

.testimonial cite {
  font-style: normal;
  font-size: 13.5px;
  color: var(--text-faint);
}

/* ---------- Trusted-by ---------- */

.trusted-by {
  text-align: center;
}

.trusted-by-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 34px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
}

.trusted-by-list li {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* ---------- Publications teaser ---------- */

.pub-teaser-list {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.pub-teaser-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}

.pub-teaser-item:hover .pub-teaser-title {
  color: var(--accent-ink);
}

.pub-teaser-title {
  font-weight: 600;
  transition: color 0.15s ease;
}

.pub-teaser-meta {
  font-size: 13.5px;
  color: var(--text-faint);
  font-family: var(--mono);
  white-space: nowrap;
}

.pub-teaser-source {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- Contact ---------- */

.contact {
  text-align: center;
}

.contact-links {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 40px 0;
}

.site-footer .wrap-wide {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-faint);
}

.site-footer a {
  color: var(--text-faint);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-ink);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* ---------- Publications page ---------- */

.pub-page-header {
  padding-top: 64px;
  padding-bottom: 40px;
}

.pub-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 28px;
}

.pub-search {
  flex: 1 1 240px;
  position: relative;
}

.pub-search input {
  width: 100%;
  font-family: var(--font);
  font-size: 15px;
  padding: 11px 14px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text);
}

.pub-search input:focus {
  outline: none;
  border-color: var(--accent);
}

.pub-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pub-filter {
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pub-filter:hover {
  border-color: var(--accent);
}

.pub-filter[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.pub-count {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--text-faint);
}

.pub-group {
  padding: 48px 0;
}

.pub-group:not([hidden]) ~ .pub-group:not([hidden]) {
  border-top: 1px solid var(--border-strong);
}

.pub-group-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.pub-group-count {
  color: var(--text-faint);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.pub-list {
  margin-top: 16px;
  display: grid;
}

.pub-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
}

.pub-row:not([hidden]) ~ .pub-row:not([hidden]) {
  border-top: 1px solid var(--border);
}

.pub-row[hidden],
.pub-group[hidden] {
  display: none;
}

.pub-row a {
  text-decoration: none;
  font-weight: 500;
  color: var(--text);
}

.pub-row a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
}

.pub-row-date {
  font-size: 13px;
  color: var(--text-faint);
  font-family: var(--mono);
  white-space: nowrap;
}

.pub-empty {
  display: none;
  padding: 60px 0;
  text-align: center;
  color: var(--text-faint);
}

/* ---------- Legal pages ---------- */

.legal-page {
  padding-top: 64px;
  padding-bottom: 96px;
}

.legal-page h2 {
  font-size: 20px;
  margin-top: 40px;
}

.legal-page h3 {
  font-size: 16px;
  margin-top: 28px;
}

.legal-page p, .legal-page li {
  color: var(--text-muted);
  font-size: 15.5px;
}

.legal-page address {
  font-style: normal;
  color: var(--text-muted);
}

.legal-meta {
  color: var(--text-faint);
  font-size: 14px;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  section {
    padding: 52px 0;
  }

  .hero {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-photo {
    max-width: 200px;
    order: -1;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    gap: 16px;
  }

  .pub-teaser-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .pub-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 560px) {
  .site-nav a:not(.cta) {
    display: none;
  }
}
