/* scottlapaglia.com — one stylesheet for every page.
   Plain CSS, no build step: GitHub Pages serves this repo as-is. */

:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --border: #e3dfd8;
  --text: #1c1a17;
  --text-dim: #5e584f;
  --text-faint: #8a8278;
  --accent: #0f6e6a;
  --accent-dim: #d7eceb;
  --shadow: 0 1px 2px rgba(28, 26, 23, .05), 0 6px 18px -10px rgba(28, 26, 23, .12);
  --radius: 10px;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15161a;
    --surface: #1c1e23;
    --border: #2f323a;
    --text: #e9e7e3;
    --text-dim: #a9a6a0;
    --text-faint: #7d7a75;
    --accent: #5ec8c0;
    --accent-dim: #1d3836;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px -10px rgba(0, 0, 0, .5);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
  /* Keeps the footer at the bottom of the viewport on a short page. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- layout ---- */

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

main { flex: 1 0 auto; padding-bottom: 4rem; }

/* ---- header / nav ---- */

.masthead {
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.masthead .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.wordmark {
  font-weight: 650;
  font-size: 1rem;
  letter-spacing: -.01em;
  color: var(--text);
  text-decoration: none;
}

.masthead nav {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
  font-size: .9375rem;
}

.masthead nav a {
  color: var(--text-dim);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.masthead nav a:hover { color: var(--text); border-bottom-color: var(--border); }
.masthead nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

/* ---- type ---- */

h1 {
  font-size: clamp(1.75rem, 5vw, 2.375rem);
  line-height: 1.15;
  letter-spacing: -.022em;
  margin: 0 0 .75rem;
  font-weight: 680;
}

h2 {
  font-size: 1.1875rem;
  line-height: 1.3;
  letter-spacing: -.012em;
  margin: 2.75rem 0 .75rem;
  font-weight: 650;
}

h3 {
  font-size: 1rem;
  margin: 1.75rem 0 .5rem;
  font-weight: 650;
}

p, ul, ol, dl { margin: 0 0 1rem; }

.prose { max-width: var(--measure); }
.prose li { margin-bottom: .4rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }

.lede {
  font-size: 1.125rem;
  color: var(--text-dim);
  max-width: var(--measure);
  margin-bottom: 2.5rem;
}

.meta {
  font-size: .875rem;
  color: var(--text-faint);
  margin: 0 0 2.5rem;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 650; }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .875em;
  background: var(--accent-dim);
  color: var(--text);
  padding: .1em .35em;
  border-radius: 4px;
  word-break: break-word;
}

/* ---- intro block (home) ---- */

.intro { margin-bottom: 3.5rem; }

.section-label {
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 1.25rem;
}

/* ---- project cards ---- */

.projects {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .625rem;
  margin-bottom: .5rem;
}

.project-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.badge {
  font-size: .6875rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 999px;
  padding: .2rem .55rem;
  white-space: nowrap;
}

.project p { color: var(--text-dim); max-width: var(--measure); }
.project p:last-of-type { margin-bottom: 1.125rem; }

.stack {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin: 0 0 1.25rem;
  padding: 0;
}

.stack li {
  font-size: .8125rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .15rem .5rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  font-size: .9375rem;
  align-items: center;
}

.links .note { color: var(--text-faint); font-size: .875rem; }

/* ---- footer ---- */

.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 1.75rem 0 3rem;
  font-size: .875rem;
  color: var(--text-faint);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  align-items: baseline;
}

.site-footer nav { display: flex; gap: 1.25rem; margin-left: auto; }
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

/* ---- misc ---- */

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem .375rem;
  margin: 0 0 2.5rem;
  max-width: var(--measure);
}

.toc p { font-size: .75rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 .625rem; }
.toc ol { margin: 0 0 .75rem; padding-left: 1.25rem; font-size: .9375rem; }
.toc li { margin-bottom: .3rem; }
.toc a { color: var(--text-dim); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

h2[id], h3[id] { scroll-margin-top: 1.5rem; }

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