/* ==========================================================================
   Hire Me — shared stylesheet
   Self-contained: no external fonts, no CDN, no analytics, no network calls.
   Palette mirrors mobile/src/constants/design.ts so the site and the app
   read as one product.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Brand constants — identical in both themes */
  --brand-primary: #1e6b51;
  --brand-lime: #c9ef75;

  /* Light theme (default) */
  --bg: #f4f6f2;
  --surface: #ffffff;
  --surface-alt: #eaefe9;
  --text: #15201d;
  --text-soft: #35413d;
  --text-muted: #596660;
  --line: #dfe5df;
  --line-strong: #c6d2c9;
  --link: #1a6049;
  --link-hover: #10402f;
  /* --band-to is capped at #256b52, not the app's #2e8264: white body text over
     the lighter end of the gradient only reaches 4.67:1 at #2e8264, and the soft
     and lime tones fall under 4.5:1. At #256b52 every text tone clears AA. */
  --band-from: #154b3a;
  --band-to: #256b52;
  --band-text: #ffffff;
  --band-text-soft: #dcede5;
  --chip-bg: #dcede5;
  --chip-text: #123f31;
  --focus: #0f3e30;
  --shadow: 0 8px 20px rgba(10, 37, 27, 0.07);
  --shadow-lift: 0 14px 34px rgba(10, 37, 27, 0.12);

  /* Owner-facing TODO markers — deliberately loud */
  --todo-bg: #fff1de;
  --todo-line: #e99b43;
  --todo-text: #7a4310;

  /* Typography and rhythm */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --measure: 66ch;
  --content: 48rem;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1714;
    --surface: #14201c;
    --surface-alt: #1b2924;
    --text: #e4ede8;
    --text-soft: #c3d2cb;
    --text-muted: #9fb2aa;
    --line: #27362f;
    --line-strong: #35473f;
    --link: #7ed3ae;
    --link-hover: #a6e5c8;
    --band-from: #103a2c;
    --band-to: #1a5c46;
    --band-text: #ffffff;
    --band-text-soft: #cae3d8;
    --chip-bg: #1d3a2f;
    --chip-text: #b6e6cf;
    --focus: #c9ef75;
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    --shadow-lift: 0 14px 34px rgba(0, 0, 0, 0.5);

    --todo-bg: #2c2214;
    --todo-line: #e99b43;
    --todo-text: #f4cd94;
  }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1,
h2,
h3 {
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: clamp(1.9rem, 1.35rem + 2.6vw, 2.75rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.3rem, 1.12rem + 0.85vw, 1.6rem);
  font-weight: 650;
}

h3 {
  font-size: 1.075rem;
  font-weight: 650;
  letter-spacing: 0;
}

p,
li,
dd,
blockquote {
  max-width: var(--measure);
}

p {
  margin: 0 0 1.15em;
}

strong {
  font-weight: 650;
  color: var(--text);
}

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

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

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

code {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas,
    monospace;
  font-size: 0.9em;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

/* --------------------------------------------------------------------------
   Skip link
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  background: var(--surface);
  color: var(--link);
  border: 2px solid var(--focus);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.1rem;
  font-weight: 650;
  text-decoration: none;
  transition: top 120ms ease-in;
}

.skip-link:focus {
  top: 1rem;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2rem);
}

main {
  flex: 1 0 auto;
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem);
}

/* --------------------------------------------------------------------------
   Site header
   -------------------------------------------------------------------------- */

.site-header {
  background-image: linear-gradient(150deg, var(--band-from), var(--band-to));
  color: var(--band-text);
  border-bottom: 3px solid var(--brand-lime);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--band-text);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:hover {
  color: var(--brand-lime);
}

.brand svg {
  display: block;
  flex: none;
}

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

.site-nav a {
  display: block;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  color: var(--band-text-soft);
  font-size: 0.9375rem;
  font-weight: 550;
  text-decoration: none;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--band-text);
}

.site-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.16);
  color: var(--band-text);
  box-shadow: inset 0 0 0 1px rgba(201, 239, 117, 0.55);
}

.site-header :focus-visible {
  outline-color: var(--brand-lime);
}

/* --------------------------------------------------------------------------
   Hero (landing page)
   -------------------------------------------------------------------------- */

.hero {
  background-image: linear-gradient(155deg, var(--band-from), var(--band-to));
  color: var(--band-text);
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
}

.hero h1 {
  color: var(--band-text);
  max-width: 22ch;
}

.hero .eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(201, 239, 117, 0.16);
  box-shadow: inset 0 0 0 1px rgba(201, 239, 117, 0.5);
  color: var(--brand-lime);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  max-width: none;
}

.hero .lede {
  margin: 1.15rem 0 0;
  color: var(--band-text-soft);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.2rem);
  max-width: 54ch;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.9rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 650;
  font-size: 0.9875rem;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-lime);
  color: #123f31;
  box-shadow: var(--shadow-lift);
}

.btn-primary:hover {
  background: #d8f596;
  color: #0d2f24;
}

.btn-ghost {
  color: var(--band-text);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--band-text);
}

.hero :focus-visible {
  outline-color: var(--brand-lime);
}

/* --------------------------------------------------------------------------
   Page heading (interior pages)
   -------------------------------------------------------------------------- */

.page-head {
  margin-bottom: 2.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  margin-bottom: 0.9rem;
}

.page-head .lede {
  margin: 0;
  color: var(--text-soft);
  font-size: 1.1rem;
}

.meta-list {
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.9375rem;
}

.meta-list div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.meta-list dt {
  margin: 0;
  color: var(--text-muted);
  font-weight: 650;
}

.meta-list dd {
  margin: 0;
}

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

main section {
  scroll-margin-top: 1.5rem;
}

/* Space between sections, never above the first one — on the legal pages the
   first section follows the table of contents, on the landing page it is the
   first child of the column. */
main .wrap > section + section,
.toc + section {
  margin-top: clamp(2.25rem, 5vw, 2.9rem);
}

main section > h2 {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--brand-lime);
  margin-bottom: 1.1rem;
}

main section h3 {
  margin-top: 1.9rem;
  margin-bottom: 0.5rem;
}

.card h3 {
  margin-top: 0;
}

.sec-num {
  flex: none;
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--chip-text);
  background: var(--chip-bg);
  border-radius: 999px;
  padding: 0.15em 0.6em;
  transform: translateY(-0.12em);
}

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow);
}

.toc h2 {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 1.75rem;
  font-size: 0.9375rem;
}

.toc li {
  max-width: none;
  margin-bottom: 0.3rem;
  break-inside: avoid;
}

@media (max-width: 34rem) {
  .toc ol {
    columns: 1;
  }
}

/* --------------------------------------------------------------------------
   Cards and lists
   -------------------------------------------------------------------------- */

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

.card > :last-child {
  margin-bottom: 0;
}

.card h2,
.card h3 {
  margin-bottom: 0.7rem;
  border-bottom: none;
  padding-bottom: 0;
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-top: 1.5rem;
}

.card-grid .card p {
  max-width: none;
  color: var(--text-soft);
  font-size: 0.9875rem;
}

.after-grid {
  margin-top: 1.5rem;
}

.marked {
  list-style: none;
  margin: 0 0 1.15em;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.marked li {
  position: relative;
  padding-left: 1.7rem;
}

.marked li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 3px;
  background: var(--brand-lime);
  box-shadow: inset 0 0 0 1px rgba(21, 75, 58, 0.35);
}

.marked.negative li::before {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--line-strong);
}

.plain-list {
  padding-left: 1.3rem;
  display: grid;
  gap: 0.5rem;
}

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0 0 1.15em;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.4rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 1.65rem;
  height: 1.65rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 0.8125rem;
  font-weight: 700;
}

.callout {
  margin: 1.6rem 0;
  padding: 1.15rem 1.35rem;
  background: var(--surface-alt);
  border-left: 4px solid var(--brand-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.callout > :last-child {
  margin-bottom: 0;
}

.path {
  white-space: nowrap;
  font-weight: 650;
  background: var(--chip-bg);
  color: var(--chip-text);
  border-radius: 6px;
  padding: 0.1em 0.45em;
}

/* --------------------------------------------------------------------------
   TODO markers — placeholders the owner must fill before publishing
   -------------------------------------------------------------------------- */

.todo {
  display: inline-block;
  background: var(--todo-bg);
  color: var(--todo-text);
  border: 1px dashed var(--todo-line);
  border-radius: 6px;
  padding: 0.1em 0.5em;
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

/* --------------------------------------------------------------------------
   Tables — scroll inside their own container, never sideways-scroll the page
   -------------------------------------------------------------------------- */

.table-scroll {
  margin: 1.5rem 0 1.75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: 0.9375rem;
}

caption {
  caption-side: top;
  text-align: left;
  padding: 0.85rem 1rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

thead th {
  background-image: linear-gradient(150deg, var(--band-from), var(--band-to));
  color: var(--band-text);
  font-weight: 650;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  border-bottom: none;
}

tbody tr:nth-child(even) {
  background: var(--surface-alt);
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: none;
}

tbody th[scope="row"] {
  font-weight: 650;
  white-space: nowrap;
}

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

.site-footer {
  flex: none;
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  padding-block: 2rem 2.5rem;
  display: grid;
  gap: 0.9rem;
}

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

.site-footer p {
  margin: 0;
}
