/* cateenterprises.com: one stylesheet for every page */

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --ink: #1d2024;
  --muted: #5b626c;
  --line: #e3e0d8;
  --accent: #0e6b5c;
  --accent-soft: #e3f1ed;
  --code-bg: #f2f0ea;
  --note-bg: #fbf4e2;
  --note-line: #e8d9ae;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, Menlo, monospace;

  --wrap: 50rem;
  --radius: 10px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131517;
    --surface: #1a1d20;
    --ink: #e7e5e0;
    --muted: #9ba2ab;
    --line: #2c3035;
    --accent: #5fc4ae;
    --accent-soft: #1b2f2b;
    --code-bg: #1f2327;
    --note-bg: #2a2518;
    --note-line: #4a4127;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

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

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--surface); padding: 0.5rem 1rem;
}
.skip:focus { left: 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }

/* ---------- header and footer ---------- */

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.5rem 1.5rem;
  padding-top: 1rem; padding-bottom: 1rem;
}
.brand {
  font-family: var(--font-head); font-size: 1.3rem; font-weight: 700;
  color: var(--ink); text-decoration: none; letter-spacing: 0.01em;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.97rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem;
  padding-top: 1.5rem; padding-bottom: 2rem; color: var(--muted); font-size: 0.92rem;
}
.site-footer a { color: var(--muted); }
.site-footer p { margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }

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

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 6vw, 2.9rem); margin: 0 0 0.75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.6rem; margin: 0 0 1rem; }
h3 { font-size: 1.25rem; margin: 0 0 0.4rem; }

main { padding-top: 3rem; }
section { margin-top: 4rem; }
section:first-child { margin-top: 0; }

.lede { font-size: 1.2rem; max-width: 40rem; margin: 0 0 1.25rem; }
.muted { color: var(--muted); }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 0.5rem;
}

.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.25rem 1rem; }
.section-head h2 { margin-bottom: 1rem; }

/* ---------- hero ---------- */

.status {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: var(--accent-soft); color: var(--ink);
  padding: 0.35rem 0.85rem; border-radius: 999px; font-size: 0.95rem; margin: 0 0 1.25rem;
}
.status::before {
  content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--accent);
}

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.btn {
  display: inline-block; padding: 0.55rem 1.05rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  text-decoration: none; font-size: 0.97rem; font-weight: 500;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn-primary:hover { filter: brightness(1.08); }

/* ---------- numbers ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.stats li { border-top: 2px solid var(--accent); padding-top: 0.75rem; }
.stats strong { display: block; font-family: var(--font-head); font-size: 1.9rem; line-height: 1.1; margin-bottom: 0.35rem; }
.stats span { color: var(--muted); font-size: 0.95rem; line-height: 1.5; display: block; }

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

.projects { display: grid; gap: 1.25rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem;
}
.card p { margin: 0 0 0.9rem; }
.card ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.card li { margin-bottom: 0.35rem; }
.card .actions { margin-top: 1.1rem; }
.card ul.tags, .card ul.actions { padding-left: 0; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.tags li {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 5px; padding: 0.1rem 0.45rem; margin: 0;
}

.note-inline { font-size: 0.92rem; color: var(--muted); align-self: center; }

/* ---------- services ---------- */

.services {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem;
  margin: 1.25rem 0 0.75rem; padding: 0; list-style: none;
}
.services .card { display: flex; flex-direction: column; padding: 1.25rem; }
.services h3 { font-size: 1.15rem; }
.services .card p { font-size: 0.97rem; }
.services .card .proof {
  margin: auto 0 0; padding-top: 0.6rem; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.9rem;
}
.small { font-size: 0.9rem; }
.subhead { margin-top: 2.5rem; margin-bottom: 1rem; }

/* ---------- skills ---------- */

.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.25rem 2rem; margin: 0; }
.skills dt { font-weight: 600; margin-bottom: 0.2rem; }
.skills dd { margin: 0; color: var(--muted); }

/* ---------- contact ---------- */

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.contact-list span { display: inline-block; min-width: 5.5rem; color: var(--muted); }

/* ---------- writing / archive ---------- */

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.25rem 1rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--line);
}
.post-list time { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); padding-top: 0.15rem; }
.post-list a { font-weight: 600; text-decoration: none; }
.post-list a:hover { text-decoration: underline; }
.post-list p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.95rem; }
.post-list .summary { grid-column: 2; }

@media (max-width: 34rem) {
  .post-list li { grid-template-columns: 1fr; }
  .post-list .summary { grid-column: 1; }
}

.archive-note {
  background: var(--note-bg); border: 1px solid var(--note-line); border-radius: 8px;
  padding: 0.75rem 1rem; font-size: 0.95rem; margin: 0 0 2rem;
}

.post { max-width: 42rem; }
.post .meta { font-family: var(--font-mono); font-size: 0.88rem; color: var(--muted); margin: 0 0 2rem; }
.post h1 { font-size: clamp(1.9rem, 5vw, 2.4rem); }
.post blockquote {
  margin: 1.25rem 0; padding: 0.25rem 0 0.25rem 1.1rem;
  border-left: 3px solid var(--accent); color: var(--muted);
}
.post .editor {
  font-size: 0.93rem; color: var(--muted); border-left: 3px solid var(--note-line);
  padding-left: 0.9rem;
}
.post-nav {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.95rem;
}

code, pre { font-variant-ligatures: none; }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
pre {
  background: var(--code-bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 1rem 1.1rem; overflow-x: auto; font-size: 0.86rem; line-height: 1.55; margin: 1.25rem 0;
}
pre code { background: none; padding: 0; font-size: inherit; }

/* ---------- resume ---------- */

.resume header.resume-head { margin-bottom: 2.5rem; }
.resume .contact-line { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; color: var(--muted); }
.resume h2 {
  font-size: 1.05rem; font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 0.4rem; margin: 2.5rem 0 1.25rem;
}
.resume section { margin-top: 0; }
.job { margin-bottom: 2rem; }
.job-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; align-items: baseline; }
.job-head h3 { margin: 0; }
.job-head .where { color: var(--muted); }
.role { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; margin: 0.9rem 0 0.35rem; font-weight: 600; }
.role time, .dates { font-family: var(--font-mono); font-size: 0.86rem; color: var(--muted); font-weight: 400; }
.job ul { margin: 0.35rem 0 0; padding-left: 1.2rem; }
.job li { margin-bottom: 0.4rem; }
.competencies { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; padding: 0; margin: 0; }
.competencies li { border: 1px solid var(--line); border-radius: 6px; padding: 0.15rem 0.6rem; font-size: 0.93rem; background: var(--surface); }

.print-only { display: none; }

@media print {
  :root { --bg: #fff; --ink: #000; --muted: #333; --line: #bbb; --surface: #fff; }
  body { font-size: 10.5pt; line-height: 1.4; }
  .site-header, .site-footer, .no-print, .skip { display: none !important; }
  .print-only { display: block; }
  main { padding-top: 0; }
  .wrap { max-width: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
  .resume h1 { font-size: 22pt; margin-bottom: 0.2rem; }
  .resume h2 { margin: 1.1rem 0 0.6rem; font-size: 10pt; }
  .resume header.resume-head { margin-bottom: 0.8rem; }
  .job { margin-bottom: 0.9rem; break-inside: avoid-page; }
  .job li { margin-bottom: 0.15rem; }
  .competencies li { padding: 0 0.4rem; font-size: 9pt; }
  @page { margin: 0.6in; }
}

/* headings inside archived posts */
.post h2 { font-size: 1.2rem; margin: 2rem 0 0.5rem; }
