/* Side Gig — an editorial home for independent technical work. */
:root {
  color-scheme: light;
  --paper: #fafbfc;
  --ink: #17202b;
  --muted: #596575;
  --rule: #dce2e9;
  --accent: #315cda;
  --accent-dark: #2449b5;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --content-width: 1160px;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: 2rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: #dce6ff; color: var(--ink); }
a {
  color: inherit;
  text-decoration-color: #9daedb;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: color 140ms ease, text-decoration-color 140ms ease;
}
a:hover { color: var(--accent-dark); text-decoration-color: currentColor; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
img, svg { max-width: 100%; }
h1, h2, h3, p, ul { margin-top: 0; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; }
h1, h2 { font-family: var(--serif); }
h1 { font-size: clamp(2.75rem, 5.2vw, 4.5rem); line-height: 1.08; letter-spacing: -0.045em; }
h2 { font-size: 2rem; line-height: 1.2; letter-spacing: -0.025em; }
p { margin-bottom: 1.25rem; }
.shell { width: min(var(--content-width), calc(100% - 6rem)); margin-inline: auto; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  z-index: 20;
  top: 0.75rem;
  left: 1rem;
  padding: 0.65rem 1rem;
  transform: translateY(-200%);
  background: var(--ink);
  color: white;
  border-radius: 3px;
}
.skip-link:focus { transform: translateY(0); color: white; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 112px;
  gap: 2rem;
  border-bottom: 1px solid var(--rule);
}
.wordmark { font-size: 1.875rem; font-weight: 760; letter-spacing: -0.065em; line-height: 1; text-decoration: none; white-space: nowrap; }
.wordmark-dot { color: var(--accent); padding-left: 0.025em; }
.site-nav { display: flex; align-items: center; gap: 2rem; font-size: 0.9375rem; line-height: 1.4; }
.site-nav a { padding-block: 0.6rem; text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.site-nav .nav-external { margin-left: 0.25rem; color: var(--muted); }
.site-nav .nav-external:hover { color: var(--accent); }
.page-shell { min-height: 55vh; }
.eyebrow { margin-bottom: 1.5rem; color: var(--muted); font-size: 0.8125rem; font-weight: 600; line-height: 1.6; letter-spacing: 0.075em; text-transform: uppercase; }
.eyebrow a { text-decoration: none; }
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: clamp(3rem, 6vw, 6rem);
  padding-block: 6rem 5.25rem;
  align-items: end;
}
.hero-main .eyebrow { margin-bottom: 1.8rem; }
.home-hero h1 { margin-bottom: 1.75rem; font-size: clamp(4rem, 7.8vw, 6.75rem); line-height: 0.99; letter-spacing: -0.055em; }
.home-hero h1 em { color: var(--accent); font-weight: 400; }
.hero-description { max-width: 560px; margin-bottom: 1.8rem; color: var(--muted); font-size: 1.1875rem; line-height: 1.65; }
.text-link { color: var(--accent); font-size: 0.9375rem; font-weight: 600; text-decoration-color: #a4b8ef; text-underline-offset: 0.3em; }
.quiet-link { color: var(--muted); font-size: 0.9375rem; text-decoration-color: var(--rule); }
.hero-aside { padding-bottom: 0.25rem; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.aside-rule { display: block; width: 2rem; height: 3px; margin-bottom: 1.55rem; background: var(--accent); }
.hero-aside .eyebrow { margin-bottom: 0.85rem; color: var(--ink); }
.hero-aside p { margin-bottom: 1rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; }
.section-heading h2 { margin-bottom: 0; font-size: 1.75rem; }
.home-writing { border-top: 1px solid var(--ink); padding-top: 1.75rem; }
.home-project { border-top: 1px solid var(--rule); padding-top: 1.75rem; }
.featured-entry, .article-entry { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 3rem; }
.featured-entry { padding-block: 2.5rem 3rem; }
.entry-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; padding-top: 0.2rem; color: var(--muted); font-size: 0.8125rem; line-height: 1.6; }
.topic-label { color: var(--accent); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.025em; }
.entry-content h3, .entry-content h2 { margin-bottom: 0.75rem; font-family: var(--serif); font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.2; letter-spacing: -0.025em; }
.entry-content h3 a, .entry-content h2 a { text-decoration: none; }
.entry-content h3 a:hover, .entry-content h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
.entry-content p { max-width: 670px; margin-bottom: 1.3rem; color: var(--muted); line-height: 1.7; }
.home-interests { border-top: 1px solid var(--rule); padding-block: 1.75rem 1rem; }
.interest-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; margin-top: 2rem; }
.interest h3 { margin-bottom: 0.75rem; font-family: var(--sans); font-size: 1rem; font-weight: 650; line-height: 1.4; letter-spacing: -0.015em; }
.interest h3 a { text-decoration: none; }
.interest p { color: var(--muted); font-size: 1rem; line-height: 1.7; }
.page-heading { max-width: 820px; padding-block: 4.75rem 3.75rem; }
.page-heading .eyebrow { margin-bottom: 1.15rem; }
.page-heading h1 { margin-bottom: 1.5rem; }
.page-heading > p:last-child { max-width: 690px; margin-bottom: 0; color: var(--muted); font-size: 1.1875rem; line-height: 1.65; }
.article-list { border-top: 1px solid var(--ink); }
.article-entry { padding-block: 2.5rem; border-bottom: 1px solid var(--rule); }
.page-endnote { padding-top: 2rem; color: var(--muted); font-size: 1rem; }
.software-project, .project-entry { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 3rem; padding-block: 3rem; border-bottom: 1px solid var(--rule); }
.software-project { border-top: 1px solid var(--ink); }
.project-label { padding-top: 0.2rem; }
.project-language { margin-top: 0.6rem; color: var(--muted); font-size: 0.8125rem; }
.project-content { max-width: 740px; }
.project-content h2 { margin-bottom: 1.3rem; }
.project-content p { color: var(--muted); }
.project-content .project-intro { color: var(--ink); font-size: 1.1875rem; }
.interests-heading { padding-top: 2.5rem; }
.topic-list { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 1.75rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.8125rem; }
.project-links { padding-block: 2.75rem 0.5rem; }
.project-links h2 { margin-bottom: 0.8rem; font-size: 1.75rem; }
.project-links p { max-width: 720px; color: var(--muted); }
.project-links .text-link { font-size: inherit; font-weight: inherit; }
.prose-page { max-width: 780px; padding-top: 4.75rem; }
.prose-page h1 { margin-bottom: 2.25rem; }
.prose-page h2 { margin-top: 2.5rem; margin-bottom: 1.1rem; }
.prose-page > p:not(.eyebrow) { line-height: 1.8; }
.prose-page > h1 + p { font-size: 1.25rem; line-height: 1.7; }
.article-shell { max-width: 800px; margin-inline: auto; padding-top: 4.75rem; }
.article-header { padding-bottom: 2.5rem; border-bottom: 1px solid var(--rule); }
.article-header .eyebrow { margin-bottom: 1.25rem; }
.eyebrow-separator { margin-inline: 0.75rem; color: #a8b1bf; }
.article-header h1 { margin-bottom: 1.5rem; font-size: clamp(2.75rem, 5.5vw, 4.5rem); }
.article-description { margin-bottom: 1.75rem; color: var(--muted); font-size: 1.1875rem; line-height: 1.7; }
.article-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; color: var(--muted); font-size: 0.875rem; }
.article-meta a { color: var(--ink); text-decoration: none; }
.meta-separator { color: #9ba6b7; }
.article-body { padding-top: 2.5rem; font-size: 1.0625rem; line-height: 1.85; }
.article-body > p:first-child { font-size: 1.25rem; line-height: 1.75; }
.article-body p { margin-bottom: 1.5rem; }
.article-body h2 { margin-top: 2.75rem; margin-bottom: 1.2rem; font-size: 2rem; }
.article-body h3 { margin-top: 2rem; font-size: 1.3rem; font-weight: 600; }
.article-body blockquote { margin: 2rem 0; padding-left: 1.5rem; border-left: 3px solid var(--accent); color: var(--muted); }
.article-body pre { overflow-x: auto; padding: 1.25rem; border: 1px solid var(--rule); border-radius: 3px; background: #f0f3f7; line-height: 1.6; }
.article-body code { font-size: 0.9em; }
.article-body :not(pre) > code { padding: 0.1em 0.3em; border-radius: 2px; background: #edf0f5; }
.article-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.article-body th, .article-body td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--rule); text-align: left; }
.article-footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 1rem; }
.not-found { max-width: 690px; padding-block: 6rem 4rem; }
.not-found h1 { margin-bottom: 1.5rem; }
.not-found > p:not(.eyebrow) { max-width: 550px; color: var(--muted); font-size: 1.1875rem; }
.not-found-links { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2rem; }
.site-footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; margin-top: 5rem; padding-block: 2rem 2.5rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.8125rem; }
.footer-identity { display: flex; flex-direction: column; gap: 0.35rem; }
.footer-name { color: var(--ink); font-size: 1rem; font-weight: 650; text-decoration: none; letter-spacing: -0.025em; }
.footer-identity span a { text-decoration: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; padding-top: 0.2rem; }
.footer-links a { text-decoration: none; }
@media (min-width: 1500px) {
  .home-hero { padding-top: 7rem; }
}
@media (max-width: 960px) {
  .shell { width: calc(100% - 4rem); }
  .home-hero { grid-template-columns: minmax(0, 1fr) 235px; gap: 2.5rem; padding-block: 4.5rem; }
  .home-hero h1 { font-size: clamp(3.75rem, 8.3vw, 5.5rem); }
  .hero-description { font-size: 1.125rem; }
  .desktop-break { display: none; }
  .featured-entry, .article-entry, .project-entry, .software-project { grid-template-columns: 170px minmax(0, 1fr); gap: 2rem; }
  .interest-grid { gap: 1.75rem; }
}
@media (max-width: 760px) {
  .home-hero { grid-template-columns: 1fr; gap: 2.75rem; padding-block: 3.75rem; }
  .home-hero h1 { font-size: clamp(4rem, 11vw, 6rem); }
  .hero-aside { max-width: 560px; padding-left: 1.25rem; border-left: 2px solid var(--accent); }
  .aside-rule { display: none; }
  .hero-aside .eyebrow { margin-bottom: 0.5rem; }
  .hero-aside p { margin-bottom: 0.65rem; }
  .site-nav { gap: 1.3rem; }
  .featured-entry, .article-entry, .project-entry, .software-project { grid-template-columns: 1fr; gap: 1.25rem; }
  .entry-meta { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.25rem; }
  .interest-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .interest { max-width: 580px; }
  .interest p { margin-bottom: 0; font-size: 1rem; }
  .page-heading, .article-shell, .prose-page { padding-top: 3.5rem; }
  .page-heading { padding-bottom: 2.75rem; }
  .site-footer { margin-top: 4rem; }
}
@media (max-width: 520px) {
  .shell { width: calc(100% - 2.5rem); }
  .site-header { flex-direction: column; align-items: flex-start; min-height: 0; gap: 1rem; padding-block: 1.5rem 0.8rem; }
  .wordmark { font-size: 1.75rem; }
  .site-nav { justify-content: space-between; width: 100%; gap: 0.7rem; font-size: 0.875rem; }
  .site-nav .nav-external { margin-left: 0; }
  .eyebrow { font-size: 0.75rem; letter-spacing: 0.055em; }
  .home-hero { padding-block: 3rem; }
  .home-hero h1 { font-size: clamp(3.5rem, 14vw, 4.75rem); letter-spacing: -0.06em; }
  .hero-main .eyebrow { margin-bottom: 1.5rem; }
  .hero-description { margin-bottom: 1.5rem; font-size: 1.0625rem; }
  .section-heading { gap: 1rem; }
  .section-heading h2 { font-size: 1.5rem; }
  .section-heading .quiet-link { font-size: 0.8125rem; white-space: nowrap; }
  .featured-entry { padding-block: 2rem 2.5rem; }
  .entry-content p { font-size: 1rem; }
  .page-heading, .article-shell, .prose-page { padding-top: 2.75rem; }
  .page-heading > p:last-child, .article-description { font-size: 1.0625rem; }
  .project-entry, .software-project { padding-block: 2.25rem; }
  .project-content h2, .article-body h2, .prose-page h2 { font-size: 1.75rem; }
  .article-body, .prose-page > p:not(.eyebrow) { font-size: 1rem; }
  .article-body > p:first-child, .prose-page > h1 + p { font-size: 1.125rem; }
  .site-footer { flex-direction: column; gap: 1.5rem; padding-top: 1.5rem; }
  .not-found { padding-top: 3.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print {
  body { background: white; color: black; font-size: 11pt; }
  .shell { width: 100%; }
  .site-header { min-height: 0; padding-bottom: 1rem; }
  .site-nav, .site-footer, .skip-link, .article-footer { display: none; }
  .article-shell, .prose-page { max-width: none; padding-top: 2rem; }
  a { color: inherit; }
  h1, h2, h3 { break-after: avoid; }
}

/* Public minimal Blog layout; these styles also serve the richer local preview. */
.blog-intro { max-width: 860px; padding-block: 6rem 5.75rem; }
.blog-intro h1 { margin-bottom: 1.8rem; font-size: clamp(4rem, 7.8vw, 6.75rem); line-height: 0.99; letter-spacing: -0.055em; }
.blog-intro h1 em { color: var(--accent); font-weight: 400; }
.blog-intro .hero-description { max-width: 740px; }
.empty-writing { margin: 0; padding-block: 2.5rem 5rem; color: var(--muted); font-size: 1rem; }
.blog-page .home-writing { margin-bottom: 2rem; }
@media (max-width: 760px) { .blog-intro { padding-block: 4rem 3.5rem; } }
@media (max-width: 520px) { .blog-intro { padding-block: 3rem; } .blog-intro h1 { font-size: clamp(3.5rem, 14vw, 4.75rem); } }

/* Compact publication index: one site wordmark, no large hero or slogan. */
.blog-page .home-writing { border-top: 0; padding-top: 3.25rem; }
.blog-page .section-heading h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); line-height: 1.25; letter-spacing: -0.02em; }
.blog-interests { max-width: 760px; color: var(--muted); font-size: 1rem; line-height: 1.7; margin: 1rem 0 2.5rem; }
.blog-page .article-list { border-top: 1px solid var(--rule); }
@media (max-width: 520px) { .blog-page .home-writing { padding-top: 2rem; } }
