/* patrickjthomas.com - Quiet Signal stylesheet */

:root {
  --bg: #FAF9F6;
  --surface: #FFFFFF;
  --ink: #17171A;
  --body: #34343B;
  --muted: #66656E;
  --rule: #E6E3DC;
  --blue: #1D4ED8;
  --blue-underline: rgba(29, 78, 216, 0.38);
  --vermilion: #D93822;
  --ochre: #E5A91C;
  --emerald: #157347;
  --selection-bg: #DCE6FE;
  --selection-fg: #17171A;
  --sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131417;
    --surface: #1B1D22;
    --ink: #ECECF1;
    --body: #B8BBC6;
    --muted: #8C909E;
    --rule: #272932;
    --blue: #7AA2F7;
    --blue-underline: rgba(122, 162, 247, 0.42);
    --vermilion: #E56452;
    --ochre: #EAB844;
    --emerald: #44B87E;
    --selection-bg: #27375C;
    --selection-fg: #ECECF1;
  }
}

:root[data-theme="dark"] {
  --bg: #131417;
  --surface: #1B1D22;
  --ink: #ECECF1;
  --body: #B8BBC6;
  --muted: #8C909E;
  --rule: #272932;
  --blue: #7AA2F7;
  --blue-underline: rgba(122, 162, 247, 0.42);
  --vermilion: #E56452;
  --ochre: #EAB844;
  --emerald: #44B87E;
  --selection-bg: #27375C;
  --selection-fg: #ECECF1;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--selection-bg); color: var(--selection-fg); }

#nl-badge-frame,
iframe[title="Powered by Netlify"],
[data-nf-variant] {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip-link:focus {
  left: 16px;
  top: 12px;
  z-index: 30;
  background: var(--blue);
  color: #FFFFFF;
  padding: 8px 14px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

/* Razor-thin modern-art ribbon along the top edge: the site's one vivid visual signal */
.top-ribbon {
  display: grid;
  grid-template-columns: 62fr 18fr 12fr 8fr;
  height: 4px;
  width: 100%;
}
.top-ribbon span:nth-child(1) { background: var(--blue); }
.top-ribbon span:nth-child(2) { background: var(--vermilion); }
.top-ribbon span:nth-child(3) { background: var(--ochre); }
.top-ribbon span:nth-child(4) { background: var(--emerald); }

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 44px 48px 104px;
}

/* Header locked to the same rail + reading column grid */
header {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 44px;
  align-items: baseline;
  margin-bottom: 84px;
}
.site-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-decoration: none;
}
.site-name:hover { color: var(--blue); }

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-size: 15px;
  color: var(--muted);
}
nav a {
  color: inherit;
  text-decoration: none;
}
nav a:hover,
nav a[aria-current="page"] {
  color: var(--ink);
}
nav a[aria-current="page"] {
  font-weight: 600;
}

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

/* Two-track monograph band: quiet left margin rail + effortless reading column */
.band {
  display: grid;
  grid-template-columns: 200px minmax(0, 620px);
  gap: 44px;
  padding: 42px 0;
  border-top: 1px solid var(--rule);
}
.band.hero-band {
  border-top: none;
  padding-top: 0;
  padding-bottom: 56px;
}
.rail {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  padding-top: 4px;
  line-height: 1.5;
}
.rail-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 8px;
}
.mini-portrait {
  width: 112px;
  height: 112px;
  border-radius: 6px;
  object-fit: cover;
  object-position: top;
  display: block;
}
.about-portrait {
  width: 152px;
  height: 164px;
  border-radius: 6px;
  object-fit: cover;
  object-position: top;
  display: block;
}
.rail-note {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

h1 {
  margin: 0 0 24px;
  font-size: clamp(30px, 4.2vw, 38px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.028em;
  color: var(--ink);
  max-width: 19ch;
  text-wrap: balance;
}
h1.wide-h1 { max-width: 24ch; }

p {
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.68;
  color: var(--body);
  text-wrap: pretty;
}
p:last-child { margin-bottom: 0; }

a.inline-link,
.prose a,
.simple a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--blue-underline);
  font-weight: 500;
}
a.inline-link:hover,
.prose a:hover,
.simple a:hover {
  text-decoration-color: var(--blue);
}

.hero-links,
.sub-links {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 15.5px;
}

.meta-stamp {
  font-size: 14.5px;
  color: var(--muted);
  margin: -10px 0 20px;
}

/* Featured & link entries */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.entry-title {
  font-size: 17px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
}
.entry-title a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--blue-underline);
}
.entry-title a:hover {
  color: var(--blue);
  text-decoration-color: var(--blue);
}
.entry-meta {
  font-weight: 400;
  color: var(--muted);
  font-size: 15px;
  margin-left: 6px;
}
.entry-desc {
  font-size: 16px;
  line-height: 1.62;
  color: var(--body);
  margin: 0;
}

/* What I built list */
.build-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.build-item {
  scroll-margin-top: 28px;
}
.build-item p {
  font-size: 16.5px;
  line-height: 1.68;
  color: var(--body);
}
.build-item strong {
  color: var(--ink);
  font-weight: 700;
}
.build-with-photo {
  display: grid;
  grid-template-columns: 1fr 148px;
  gap: 28px;
  align-items: start;
}
.robot-photo {
  width: 148px;
  height: 148px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
  margin-top: 4px;
}

/* Experience roles */
.role-head {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.38;
  font-weight: 700;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.role-where {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 14px;
}
.role-bullets {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--body);
}
.role-bullets li {
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.64;
}
.role-bullets li:last-child { margin-bottom: 0; }
.role-bullets strong { color: var(--ink); font-weight: 600; }

/* Simple lists (Education, Friends, Read more) */
.simple {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.simple li {
  font-size: 16px;
  line-height: 1.62;
  color: var(--body);
}
.simple strong {
  color: var(--ink);
  font-weight: 600;
}

.big-email {
  font-size: clamp(21px, 3vw, 26px);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 22px 0 18px;
  word-break: break-word;
}

footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 44px;
  font-size: 14px;
  color: var(--muted);
}
.footer-links {
  display: flex;
  gap: 10px 20px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--ink);
}

@media (max-width: 780px) {
  .page {
    padding: 28px 22px 72px;
  }
  header {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 44px;
  }
  nav {
    gap: 8px 18px;
    font-size: 14.5px;
  }
  .entry-meta {
    display: block;
    margin-left: 0;
    margin-top: 2px;
    font-size: 14px;
  }
  .band {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 32px 0;
  }
  .band.hero-band {
    padding-bottom: 40px;
  }
  .rail-meta {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding-top: 0;
    margin-bottom: 8px;
  }
  .mini-portrait {
    width: 72px;
    height: 72px;
  }
  .about-portrait {
    width: 112px;
    height: 120px;
  }
  .build-with-photo {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .robot-photo {
    width: 180px;
    height: 180px;
  }
  footer {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

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