/* shewach.com — the one shared stylesheet.
   Every page links to this file. Change a color, size or spacing here
   and it changes everywhere. Values come from shewach-design-system.html
   (July 11, 2026) and SHEWACH_CLAUDE_CODE_BRIEF.md. */

/* ---------- 1. Design tokens ---------- */
:root {
  /* colors */
  --paper: #FAF9F6;          /* Soft Paper: page background */
  --ink: #2B2B2B;            /* Near Black: headings AND body copy */
  --ink-2: #6B6B6B;          /* Secondary Gray: captions, subtitles, meta only */
  --sage: #8A9E8A;           /* Muted Sage: accent, borders, hover (not for text on paper) */
  --sage-light: #A8BEA8;     /* sage on dark backgrounds */
  --brown: #6A5F4E;          /* Warm Brown: links, button hover, icons */
  --clay: #E5D7C6;           /* soft Clay: callouts, icon tiles */
  --divider: #EAE7E1;        /* Warm Divider */
  --button: #2E2E2E;         /* Button Dark */
  --dark: #2B2B2B;           /* dark section background */
  --dark-card: #333330;      /* card on a dark section */
  --dark-line: #3F3F3B;      /* borders on dark */
  --on-dark: #FAF9F6;        /* all text on dark sections */
  --on-dark-2: #D4D0C8;      /* supporting text on dark sections */

  /* type */
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --fs-hero: clamp(2.5rem, 1.75rem + 3vw, 3.5rem);        /* 40 → 56px */
  --fs-h2: clamp(1.875rem, 1.5rem + 1.5vw, 2.5rem);       /* 30 → 40px */
  --fs-subline: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);   /* 20 → 24px */
  --fs-card: clamp(1.125rem, 1.08rem + 0.2vw, 1.25rem);   /* 18 → 20px */
  --fs-body: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);     /* 17 → 20px */
  --fs-small: 1rem;                                       /* 16px */
  --fs-caption: 0.875rem;                                 /* 14px */
  --fs-label: 0.8125rem;                                  /* 13px, ALL CAPS labels */

  /* space (8px grid) and shape */
  --radius: 12px;            /* one number for every rounded thing */
  --gutter: clamp(1.25rem, 0.8rem + 2vw, 2.5rem);
  --section-y: clamp(4rem, 3rem + 4vw, 6.25rem);
  --wide: 70rem;             /* 1120px: grids */
  --text: 43.75rem;          /* 700px: reading width */
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
h1, h2, h3 { font-weight: 300; line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
p { text-wrap: pretty; }
p + p { margin-top: 1.1em; }
em { font-style: italic; }
strong { font-weight: 500; }

a { color: var(--brown); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--brown); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 0.75rem 1rem;
  border-radius: var(--radius); text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- 3. Layout helpers ---------- */
.wrap { width: 100%; max-width: calc(var(--wide) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--text { max-width: calc(var(--text) + var(--gutter) * 2); }
.section { padding-block: var(--section-y); }
.section--dark { background: var(--dark); color: var(--on-dark); }
.section--dark a { color: var(--sage-light); }
.section--center { text-align: center; }

.section-title { font-size: var(--fs-h2); }
.section-intro { margin-top: 1rem; color: var(--ink-2); font-size: var(--fs-small); line-height: 1.6; }
.section--dark .section-intro { color: var(--on-dark-2); }

.label {
  font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brown);
}
.section--dark .label { color: var(--sage-light); }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.875rem 1.75rem;
  border-radius: var(--radius); border: 1px solid var(--button);
  background: var(--button); color: #fff;
  font: 400 0.9375rem/1.2 var(--font); letter-spacing: 0.01em;
  text-decoration: none; text-transform: lowercase;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { background: var(--brown); border-color: var(--brown); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { color: #fff; }
.section--dark .btn { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.section--dark .btn:hover { background: var(--sage-light); border-color: var(--sage-light); }

/* ---------- 5. Site header (menu) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 246, 0.94);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--divider);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 4.5rem;
}
.wordmark {
  font-size: 1.375rem; font-weight: 300; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.wordmark:hover { color: var(--brown); }
.site-nav ul { display: flex; gap: clamp(1rem, 0.6rem + 1.4vw, 2rem); list-style: none; padding: 0; }
.site-nav a {
  display: inline-block; padding-block: 0.5rem;
  font-size: 0.9375rem; font-weight: 400; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--sage); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--sage); }

/* iPhone: the menu sits on its own line under the name. No hidden menu button. */
@media (max-width: 40rem) {
  .site-header__inner { flex-direction: column; align-items: flex-start; gap: 0; padding-block: 0.75rem 0.25rem; min-height: 0; }
  .site-nav { width: 100%; }
  .site-nav ul { justify-content: space-between; gap: 0.5rem; }
  .site-nav a { padding-block: 0.6rem; font-size: 1rem; }
}

/* ---------- 6. Site footer ---------- */
.site-footer { background: var(--dark); color: var(--on-dark-2); padding-block: 3.5rem; font-size: var(--fs-caption); line-height: 1.7; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--sage-light); }
.site-footer__inner { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; list-style: none; padding: 0; }
.site-footer__links a, .back-to-top { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.75rem; }
.back-to-top svg { width: 1rem; height: 1rem; }
@media (min-width: 48rem) {
  .site-footer__inner { grid-template-columns: 1fr auto auto; align-items: center; gap: 3rem; }
}

/* ---------- 7. Home: hero + letter ---------- */
.hero { padding-top: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.hero__title { font-size: var(--fs-hero); text-transform: lowercase; }
.hero__subline { margin-top: 1rem; max-width: 30ch; font-size: var(--fs-subline); font-weight: 400; line-height: 1.4; }

.letter { padding-top: clamp(2rem, 1.5rem + 2vw, 3rem); padding-bottom: var(--section-y); }
.letter__row { display: grid; gap: 2.5rem; align-items: center; }
.letter__row + .letter__row { margin-top: 3rem; }
.letter__text { max-width: 36rem; }
.letter__text .greeting { font-weight: 400; }
.letter__signoff { margin-top: 1.5em; font-weight: 400; }
@media (min-width: 56rem) {
  .letter__row { grid-template-columns: 1fr 1fr; gap: clamp(3rem, 2rem + 3vw, 5rem); }
  .letter__row + .letter__row { margin-top: 4.5rem; }
  .letter__row--flip .photo-grid { order: -1; }
}

.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(0.75rem, 0.5rem + 0.8vw, 1.25rem); }
.photo-grid img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--radius); background: var(--divider);
}

/* ---------- 8. Home: things I'm building ---------- */
.projects { display: grid; gap: 1.25rem; margin-top: 3rem; }
@media (min-width: 48rem) { .projects { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }
.project {
  position: relative; display: flex; flex-direction: column; gap: 0.75rem;
  padding: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  background: var(--dark-card); border: 1px solid var(--dark-line); border-radius: var(--radius);
  color: var(--on-dark-2); text-decoration: none;
  transition: border-color 0.2s ease;
}
.section--dark a.project { color: var(--on-dark-2); text-decoration: none; }
a.project:hover { border-color: var(--sage); }
.project__icon { width: 2rem; height: 2rem; color: var(--sage-light); stroke-width: 1.5; }
.project__title { font-size: var(--fs-card); font-weight: 400; color: var(--on-dark); text-transform: lowercase; }
.project__text { font-size: var(--fs-small); line-height: 1.65; }
.project__arrow { position: absolute; top: 1.5rem; right: 1.5rem; width: 1.25rem; height: 1.25rem; color: var(--on-dark-2); }
a.project:hover .project__arrow { color: var(--sage-light); }

/* ---------- 9. Blog roll (post cards) ---------- */
.post-list { display: grid; gap: 2rem; margin-top: 3rem; text-align: left; }
@media (min-width: 40rem) { .post-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .post-list { grid-template-columns: repeat(3, 1fr); } }
.post-card { display: flex; flex-direction: column; gap: 0.75rem; color: var(--ink); text-decoration: none; }
.post-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--divider); }
.post-card__date { font-size: var(--fs-caption); color: var(--ink-2); }
.post-card__title { font-size: var(--fs-card); font-weight: 400; text-transform: lowercase; line-height: 1.3; }
.post-card__sub { font-size: var(--fs-small); color: var(--ink-2); line-height: 1.55; }
.post-card:hover .post-card__title { color: var(--brown); }

.empty-note { margin-top: 1.5rem; color: var(--ink-2); font-size: var(--fs-small); }
.section-actions { margin-top: 2.5rem; }

/* ---------- 10. Now ---------- */
.now-dateline { margin-top: 0.75rem; color: var(--on-dark-2); font-size: var(--fs-small); text-transform: lowercase; }
.now-list { list-style: none; padding: 0; margin-top: 2.5rem; text-align: left; display: grid; gap: 1.75rem; }
.now-list li { padding-left: 1.25rem; border-left: 2px solid var(--sage); font-size: var(--fs-small); line-height: 1.7; color: var(--on-dark-2); }
.now-list li strong { display: block; margin-bottom: 0.15rem; font-size: var(--fs-card); font-weight: 400; color: var(--on-dark); }
.now-footnote { margin-top: 2.5rem; font-size: var(--fs-caption); color: var(--on-dark-2); }

/* ---------- 11. Connect ---------- */
.icon-links { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; list-style: none; padding: 0; }
.icon-links a {
  display: grid; place-items: center; width: 3.25rem; height: 3.25rem;
  border-radius: var(--radius); background: var(--clay); color: var(--brown);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.icon-links a:hover { background: var(--brown); color: var(--paper); }
.icon-links svg { width: 1.5rem; height: 1.5rem; stroke-width: 1.5; }

/* ---------- 12. Page cover (photo with the page title on it) ---------- */
.page-cover {
  position: relative; display: grid; place-items: center; text-align: center;
  min-height: clamp(17.5rem, 12rem + 22vw, 30rem); padding: 4rem var(--gutter);
  color: #fff; overflow: hidden; background: var(--dark);
}
.page-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.28), rgba(0,0,0,.42)); }
.page-cover__text { position: relative; z-index: 1; max-width: 40rem; }
.page-cover .label { color: rgba(255,255,255,.85); margin-bottom: 0.75rem; }
.page-cover h1 { font-size: var(--fs-hero); text-transform: lowercase; text-shadow: 0 1px 12px rgba(0,0,0,.25); }
.page-cover__sub { margin-top: 1rem; font-size: var(--fs-subline); line-height: 1.45; text-shadow: 0 1px 10px rgba(0,0,0,.3); }

/* plain page title (no photo), e.g. now and 404 */
.page-head { padding-top: clamp(3rem, 2rem + 4vw, 5rem); }
.page-head h1 { font-size: var(--fs-hero); text-transform: lowercase; }
.page-head__sub { margin-top: 0.75rem; color: var(--ink-2); font-size: var(--fs-small); text-transform: lowercase; }

/* ---------- 13. Long-form text (about, slowiness, posts) ---------- */
.prose { padding-block: clamp(2.5rem, 2rem + 2vw, 4rem); }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.625rem); font-weight: 400; line-height: 1.3; margin-top: 2.25em; }
.prose .lead { font-size: var(--fs-subline); line-height: 1.5; font-weight: 300; }
.prose .stack { line-height: 1.5; }
.prose .signoff { margin-top: 2em; font-weight: 400; }

.pull-quote {
  margin-block: 2em; padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 3px solid var(--sage);
  font-size: var(--fs-subline); line-height: 1.5; font-weight: 300;
}
.callout { padding: 1.5rem 1.75rem; background: var(--clay); border-radius: var(--radius); font-size: var(--fs-small); line-height: 1.65; }
.divider { border: 0; height: 1px; background: var(--divider); margin-block: 3em; }

.post-figure img { width: 100%; border-radius: var(--radius); background: var(--divider); }
.post-figure figcaption, .photo-row figcaption {
  margin-top: 0.6rem; font-size: var(--fs-caption); font-style: italic; color: var(--ink-2); line-height: 1.5;
}
.prose .post-figure { margin-block: 2em; }

/* a row of captioned photos between paragraphs (about page) */
.photo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; padding-block: 1rem 0.5rem; }
@media (min-width: 56rem) { .photo-row { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; } }
.photo-row img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); background: var(--divider); }

/* ---------- 14. Blog posts ---------- */
.post-header { padding-top: clamp(3rem, 2rem + 4vw, 5rem); }
.post-header__date { font-size: var(--fs-caption); color: var(--ink-2); }
.post-header__title { margin-top: 0.75rem; font-size: clamp(1.875rem, 1.4rem + 2.2vw, 2.75rem); }
.post-header__sub { margin-top: 1rem; font-size: var(--fs-subline); line-height: 1.45; color: var(--ink-2); }
.archive-note { margin-top: 1.25rem; font-size: var(--fs-caption); color: var(--brown); }
.post-hero { margin-top: clamp(2rem, 1.5rem + 2vw, 3rem); max-width: calc(56rem + var(--gutter) * 2); }
.post-hero img { max-height: 80vh; object-fit: cover; }
.post-footer { padding-bottom: var(--section-y); border-top: 1px solid var(--divider); padding-top: 2.5rem; }

.section--tint { background: #F3F1EB; }

/* ---------- 15. Preview banner (removed at launch) ---------- */
.preview-banner { background: var(--clay); color: var(--ink); text-align: center; font-size: var(--fs-caption); padding: 0.5rem var(--gutter); }

/* now list on a light page */
.now-list--light { margin-top: 0; }
.now-list--light li { color: var(--ink); }
.now-list--light a { color: var(--brown); }
.prose .now-footnote { color: var(--ink-2); }
.not-found { padding-bottom: var(--section-y); }
.not-found h1 { text-transform: none; }

/* tall (portrait) photos inside a post: never taller than most of the screen */
.prose .post-figure img { width: auto; max-width: 100%; max-height: 75vh; margin-inline: auto; }
.prose .post-figure figcaption { text-align: center; }

/* video inside a post (YouTube, privacy-enhanced player) */
.post-video__frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--dark); }
.post-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* lists inside a post */
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--sage); }

/* ---------- 16. Categories (topic tags) ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.badge {
  display: inline-block; padding: 0.15rem 0.6rem; border-radius: var(--radius);
  background: #EEF1EC; color: #56685A; font-size: var(--fs-caption); font-weight: 500; line-height: 1.5;
  text-decoration: none; text-transform: lowercase;
}
a.badge:hover { background: var(--sage); color: #fff; }
.post-header .badges { margin-top: 0.75rem; }
.category-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 2rem; }
.chip {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.1rem;
  border: 1px solid var(--divider); border-radius: var(--radius); background: #fff;
  color: var(--ink); font-size: 0.9375rem; font-weight: 400; text-decoration: none;
}
.chip:hover { border-color: var(--sage); }
.chip[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
