/* ==========================================================================
   Madhav Rao — Personal Website & Digital Garden
   Minimal v2: hairlines, whitespace, dot tags, inline Lucide icons.
   Single stylesheet. No build step, no JS.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #FCFCFB;
  --surface: #F4F3F0;
  --ink: #1A1A18;
  --ink-soft: #5C5A54;
  --accent: #1E6B5C;
  --rule: #EAE8E3;

  --pillar-arch: #1E5AA8;
  --pillar-uiux: #A8501E;
  --pillar-product: #6B1E8F;
  --pillar-teaching: #75641A;
  --pillar-agentic: #1E6B5C;
  --pillar-data: #0E7490;
  --pillar-platform: #9F1239;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, monospace;

  --measure: 42rem;
  --wide: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151514;
    --surface: #201F1C;
    --ink: #ECEAE4;
    --ink-soft: #A3A199;
    --accent: #5CBBA4;
    --rule: #2C2B28;

    --pillar-arch: #7FB1E8;
    --pillar-uiux: #E8A37F;
    --pillar-product: #C58FDD;
    --pillar-teaching: #D4C06A;
    --pillar-agentic: #5CBBA4;
    --pillar-data: #6CC5DE;
    --pillar-platform: #E58FA6;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0 0 1rem;
}
h1 { font-size: 1.875rem; }
h2 { font-size: 1.25rem; margin-top: 3rem; }
h3 { font-size: 1.0625rem; margin-top: 2rem; }

p { margin: 0 0 1.25rem; }

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color 120ms ease; }
a:hover { text-decoration-color: var(--accent); color: var(--accent); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}
pre {
  background: var(--surface);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  line-height: 1.55;
}
pre code { background: none; padding: 0; }

blockquote {
  margin: 1.75rem 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--accent);
  color: var(--ink-soft);
}
blockquote p { margin: 0; }

hr { border: none; border-top: 1px solid var(--rule); margin: 3rem 0; }

ul, ol { padding-left: 1.25rem; margin: 0 0 1.25rem; }
li { margin-bottom: 0.5rem; }

img { max-width: 100%; height: auto; }

.case-study-figure {
  margin: 2rem 0 2.5rem;
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
}
.case-study-figure img {
  display: block;
  width: 100%;
  border-radius: 7px;
}
.case-study-figure figcaption {
  margin: 0.65rem 0.25rem 0.1rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.55;
}

::selection { background: var(--accent); color: var(--bg); }

/* ---------- Icons (inline Lucide SVGs) ---------- */
.icon {
  width: 1.05em;
  height: 1.05em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.16em;
  flex-shrink: 0;
}
.icon-lg { width: 1.25rem; height: 1.25rem; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- Layout ---------- */
.container { max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem; }
.prose { max-width: var(--measure); margin: 0 auto; padding: 0 1.5rem; }

/* Make in-site article links discoverable without requiring hover. */
.prose a[href]:not([href^="http"]):not([href^="//"]):not([href^="mailto:"]) {
  color: var(--accent);
  font-weight: 500;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
}
.prose a[href]:not([href^="http"]):not([href^="//"]):not([href^="mailto:"]):hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

main { padding: 3.5rem 0 5rem; }

/* ---------- Header ---------- */
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px dotted var(--ink-soft);
}
.wordmark {
  font-weight: 600;
  font-size: 1.2em;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  text-transform: lowercase;
}

/* Mobile nav toggle (CSS-only checkbox pattern; label/input hidden on desktop) */
.nav-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.nav-toggle-label { display: none; }
.nav-toggle:focus-visible ~ .nav-toggle-label {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.site-nav { display: flex; align-items: center; gap: 1.25rem; overflow-x: auto; }
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1;
  white-space: nowrap;
  text-transform: lowercase;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0 3rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.site-footer a { color: var(--ink-soft); }

/* ---------- Masthead (home) ---------- */
.masthead {
  padding: 1.5rem 0 0.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2.5rem;
}
.masthead-text { flex: 1; min-width: 0; }
.masthead-photo {
  margin-top: 0.35rem; /* optical alignment with the h1 cap height */
  width: 176px;
  height: 176px;
  object-fit: cover;
  object-position: 50% 22%; /* keep the face centred in the square crop */
  border-radius: 28px;
  flex-shrink: 0;
  border: 1px solid var(--rule);
}
.masthead h1 { font-size: 1.75rem; max-width: 26ch; }
.masthead .lede { font-size: 1.0625rem; color: var(--ink-soft); max-width: 52ch; }
.link-row { display: flex; gap: 2rem; margin-top: 1.75rem; flex-wrap: wrap; }
.link-row a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--accent);
}
.link-row a:hover { text-decoration: underline; text-decoration-color: var(--accent); }

.download-list {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}
.download-list li {
  padding: 0.5rem 0;
  color: var(--ink-soft);
}
.download-list a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.download-list a:hover { text-decoration: none; }

/* ---------- Section labels ---------- */
.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
  margin: 4rem 0 0.5rem;
}

/* ---------- Item lists (pillars, notes) ---------- */
.item-list { list-style: none; padding: 0; margin: 0; }
.item-list li { margin: 0; border-bottom: 1px solid var(--rule); }
.item-list li:first-child { border-top: 1px solid var(--rule); }

.item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 0;
  text-decoration: none;
  color: var(--ink);
}
.item .icon { position: relative; top: 0.13em; }
.item-body { flex: 1; min-width: 0; }
.item-title { font-weight: 500; margin: 0; }
a.item:hover .item-title { color: var(--accent); }
.item-sub { font-size: 0.875rem; color: var(--ink-soft); margin: 0.1rem 0 0; }
.item-end {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------- Home: compact reference-build portfolio ---------- */
.reference-proof {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.reference-feature {
  display: block;
  padding: 1.35rem 0 1.45rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.reference-kicker {
  display: block;
  margin-bottom: 0.45rem;
}
.reference-feature-title {
  display: block;
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 600;
}
.reference-feature-copy {
  display: block;
  max-width: 58ch;
  margin-top: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}
.reference-feature-link {
  display: block;
  margin-top: 0.75rem;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
}
.reference-feature:hover .reference-feature-title,
.reference-index a:hover strong { color: var(--accent); }
.reference-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--rule);
}
.reference-index a {
  display: block;
  min-width: 0;
  padding: 0.9rem 1rem 0.95rem 0;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.reference-index a:nth-child(odd) {
  padding-right: 1.25rem;
  border-right: 1px solid var(--rule);
}
.reference-index a:nth-child(even) { padding-left: 1.25rem; }
.reference-index a:nth-last-child(-n + 2) { border-bottom: 0; }
.reference-index span {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.reference-index strong {
  display: block;
  font-size: 0.875rem;
  line-height: 1.4;
  font-weight: 500;
}
.reference-pipeline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0 1.2rem;
}
.reference-pipeline strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
}
.reference-pipeline p {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}
.reference-pipeline > a {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}
.reference-pipeline > a:hover,
.reference-feature:hover .reference-feature-link { text-decoration: underline; }

/* ---------- Dot tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
}
.tag::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--dot, var(--ink-soft));
}
.tag-arch     { --dot: var(--pillar-arch); }
.tag-uiux     { --dot: var(--pillar-uiux); }
.tag-product  { --dot: var(--pillar-product); }
.tag-teaching { --dot: var(--pillar-teaching); }
.tag-agentic  { --dot: var(--pillar-agentic); }
.tag-data     { --dot: var(--pillar-data); }
.tag-platform { --dot: var(--pillar-platform); }

.pillar-icon-arch     { color: var(--pillar-arch); }
.pillar-icon-uiux     { color: var(--pillar-uiux); }
.pillar-icon-product  { color: var(--pillar-product); }
.pillar-icon-teaching { color: var(--pillar-teaching); }
.pillar-icon-agentic  { color: var(--pillar-agentic); }
.pillar-icon-data     { color: var(--pillar-data); }
.pillar-icon-platform { color: var(--pillar-platform); }

/* ---------- Maturity ---------- */
.maturity { color: var(--ink-soft); display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8125rem; }

/* ---------- Note pages ---------- */
.breadcrumb { font-size: 0.8125rem; color: var(--ink-soft); margin-bottom: 2rem; }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

.note-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin: -0.25rem 0 2.5rem;
}

.note-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.note-footer h2 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 1.5rem;
}
.note-footer ul { list-style: none; padding: 0; }
.note-footer li { margin-bottom: 0.35rem; }

/* ---------- Garden legend ---------- */
.legend {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin: 1.5rem 0 1rem;
}
.legend span { display: inline-flex; align-items: center; gap: 0.4rem; }

/* ---------- Garden index: toolbar, jump bar, collapsible categories ---------- */
.garden-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  padding: 0.85rem 0 0.75rem;
  border-bottom: 1px solid var(--rule);
  margin: 1.5rem 0 1rem;
}
.note-filter {
  width: 100%;
  font: inherit;
  font-size: 0.9375rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}
.note-filter::placeholder { color: var(--ink-soft); }
.note-filter:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.jump-bar {
  display: flex;
  gap: 0.35rem 1.15rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  margin-top: 0.65rem;
}
.jump-bar a { color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.jump-bar a:hover { color: var(--accent); }
.jump-bar .count { opacity: 0.65; }

details.category { scroll-margin-top: 6.5rem; }
details.category > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.35rem 0;
}
details.category > summary::-webkit-details-marker { display: none; }
details.category > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
details.category > summary .section-label { margin: 1.5rem 0 0.25rem; }
details.category > summary::after {
  content: "";
  width: 0.45em;
  height: 0.45em;
  border-right: 1.5px solid var(--ink-soft);
  border-bottom: 1.5px solid var(--ink-soft);
  transform: rotate(-45deg);
  transition: transform 120ms ease;
  align-self: center;
  margin-top: 1.25rem;
}
details.category[open] > summary::after { transform: rotate(45deg); }
.category-count { font-size: 0.8125rem; color: var(--ink-soft); align-self: center; margin-top: 1.4rem; }
.filter-empty { color: var(--ink-soft); font-size: 0.9375rem; margin-top: 1.5rem; }

/* ---------- Now line (home) ---------- */
.now-line {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* ---------- Redesigned portfolio hierarchy ---------- */
.eyebrow, .section-kicker {
  margin: 0 0 0.55rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 13rem;
  gap: 3rem;
  align-items: start;
  padding: 2rem 0 1.75rem;
}
.home-hero h1 { max-width: 20ch; margin-top: 0; }
.home-hero .lede { max-width: 54ch; }
.home-hero-aside {
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
}
.home-hero-aside .masthead-photo { width: 100%; height: auto; margin: 0 0 0.9rem; border-radius: 18px; }
.home-hero-aside p { margin: 0; color: var(--ink-soft); font-size: 0.82rem; line-height: 1.5; }
.home-hero-aside strong { color: var(--ink); }
.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.proof-strip span { padding: 0.9rem 0.8rem; color: var(--ink-soft); font-size: 0.8rem; border-right: 1px solid var(--rule); }
.proof-strip span:last-child { border-right: 0; }
.proof-strip strong { display: block; color: var(--ink); font-size: 1.2rem; line-height: 1.1; }
.home-section { margin-top: 4.25rem; }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1rem; }
.section-heading-row h2 { margin: 0; max-width: 28ch; }
.section-heading-row > a { flex: 0 0 auto; color: var(--accent); font-size: 0.875rem; font-weight: 500; }
.service-grid, .build-grid, .featured-work-grid, .path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.service-card, .build-card, .featured-work-card, .path-grid a { display: flex; flex-direction: column; align-items: flex-start; gap: 0.55rem; padding: 1.25rem; background: var(--bg); color: var(--ink); text-decoration: none; }
.service-card:hover, .build-card:hover, .featured-work-card:hover, .path-grid a:hover { background: var(--surface); }
.service-number { color: var(--accent); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; }
.service-card h3, .featured-work-card h3 { margin: 0; font-size: 1.05rem; }
.service-card p, .build-card span:not(.tag):not(.card-link), .featured-work-card p, .path-grid span { margin: 0; color: var(--ink-soft); font-size: 0.875rem; line-height: 1.5; }
.card-link { margin-top: auto; color: var(--accent); font-size: 0.875rem; font-weight: 550; }
.service-card-featured, .engagement-card-featured { border-top: 3px solid var(--accent); }
.featured-build { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 0; background: var(--surface); border: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.featured-build:hover { background: var(--bg); }
.featured-build img { display: block; width: 100%; height: 100%; min-height: 15rem; object-fit: cover; padding: 1rem; box-sizing: border-box; }
.featured-build-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 0.7rem; padding: 1.5rem; }
.featured-build-copy strong { font-size: 1.35rem; line-height: 1.25; }
.featured-build-copy > span:not(.tag):not(.card-link) { color: var(--ink-soft); line-height: 1.55; }
.build-card img, .featured-work-card img { display: block; width: 100%; height: 8rem; object-fit: cover; margin: 0 0 0.4rem; border-bottom: 1px solid var(--rule); }
.build-card strong { font-size: 1rem; line-height: 1.35; }
.coming-next { display: flex; align-items: end; justify-content: space-between; gap: 2rem; padding: 1.5rem; background: var(--surface); border: 1px solid var(--rule); }
.coming-next h2 { margin: 0 0 0.5rem; }
.coming-next p { max-width: 58ch; margin: 0; color: var(--ink-soft); }
.path-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.selected-garden-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.path-grid a strong { font-size: 0.95rem; line-height: 1.35; }
.home-cta, .work-cta { margin-top: 4.5rem; padding: 2rem 0 0; border-top: 1px solid var(--rule); }
.home-cta h2, .work-cta h2 { max-width: 26ch; margin: 0 0 1.25rem; }
.button-link { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--accent); font-weight: 600; text-decoration: none; }
.prose .button-link-primary { padding: 0.7rem 0.9rem; color: var(--bg); background: var(--accent); border: 1px solid var(--accent); }
.prose .button-link-primary:hover { color: var(--bg) !important; background: var(--ink); border-color: var(--ink); }
.work-page h1 { max-width: 24ch; }
.work-intro, .work-section { margin-top: 3.75rem; }
.engagement-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.engagement-card { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; min-height: 15rem; padding: 1.3rem; background: var(--bg); color: var(--ink); text-decoration: none; }
.engagement-card:hover { background: var(--surface); }
.engagement-card h3 { margin: 0; font-size: 1.1rem; }
.engagement-card p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.55; }
.engagement-card .card-link { margin-top: auto; }
.featured-work-card { min-height: 19rem; }
.featured-work-card p { flex: 1; }
.case-group { border-top: 1px solid var(--rule); }
.case-group:last-child { border-bottom: 1px solid var(--rule); }
.case-group > summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; cursor: pointer; list-style: none; color: var(--ink); font-weight: 600; }
.case-group > summary::-webkit-details-marker { display: none; }
.case-group > summary::after { content: "+"; color: var(--accent); font-family: var(--font-mono); }
.case-group[open] > summary::after { content: "−"; }
.case-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-bottom: 1rem; background: var(--rule); border: 1px solid var(--rule); }
.case-list a { display: flex; flex-direction: column; gap: 0.35rem; padding: 1rem; background: var(--bg); color: var(--ink); text-decoration: none; }
.case-list a:hover { background: var(--surface); }
.case-list strong { font-size: 0.92rem; line-height: 1.35; }
.case-list span { color: var(--ink-soft); font-size: 0.82rem; line-height: 1.45; }
.work-principles { padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.principles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.principles-grid div { display: flex; flex-direction: column; gap: 0.35rem; }
.principles-grid strong { color: var(--ink); }
.principles-grid span { color: var(--ink-soft); font-size: 0.875rem; line-height: 1.5; }
.work-cta { margin-bottom: 1rem; }
.garden-landing, .garden-current { margin-top: 3rem; }
.garden-landing h2, .garden-current h2 { margin: 0 0 1rem; }
.garden-path-grid, .garden-current-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.garden-path-grid a, .garden-current-grid a { display: flex; flex-direction: column; gap: 0.4rem; padding: 1rem; background: var(--bg); color: var(--ink); text-decoration: none; }
.garden-path-grid a:hover, .garden-current-grid a:hover { background: var(--surface); }
.garden-path-grid strong, .garden-current-grid strong { font-size: 0.92rem; line-height: 1.35; }
.garden-path-grid span, .garden-current-grid span { color: var(--ink-soft); font-size: 0.82rem; line-height: 1.45; }
.garden-filter-row { display: flex; align-items: center; gap: 0.65rem; }
.garden-filter-row .note-filter { flex: 1; }
.note-filter-clear { flex: 0 0 auto; padding: 0.55rem 0.75rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); color: var(--accent); font: inherit; font-size: 0.875rem; cursor: pointer; }
.note-filter-clear:hover { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.filter-status { margin: 0.45rem 0 0; color: var(--ink-soft); font-size: 0.78rem; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  h1, .masthead h1 { font-size: 1.5rem; }
  .masthead { flex-direction: column-reverse; align-items: flex-start; gap: 1.5rem; }
  .masthead-photo { width: 112px; height: 112px; border-radius: 20px; }
  main { padding: 2.5rem 0 4rem; }
  .item { flex-wrap: wrap; gap: 0.5rem 1rem; }
  .item-end { width: 100%; padding-left: 2.1rem; }
  .reference-index { grid-template-columns: 1fr; }
  .reference-index a,
  .reference-index a:nth-child(odd),
  .reference-index a:nth-child(even) {
    padding: 0.8rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .reference-index a:last-child { border-bottom: 0; }
  .reference-pipeline { align-items: flex-start; flex-direction: column; gap: 0.8rem; }
  .home-hero { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1rem; }
  .home-hero-aside { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; align-items: start; width: 100%; box-sizing: border-box; }
  .home-hero-aside .masthead-photo { width: 7rem; height: 7rem; margin: 0; }
  .proof-strip { grid-template-columns: repeat(2, 1fr); }
  .proof-strip span:nth-child(2) { border-right: 0; }
  .proof-strip span:nth-child(-n + 2) { border-bottom: 1px solid var(--rule); }
  .home-section { margin-top: 3rem; }
  .section-heading-row { align-items: flex-start; flex-direction: column; gap: 0.65rem; }
  .service-grid, .build-grid, .featured-work-grid, .engagement-grid, .path-grid, .garden-path-grid, .garden-current-grid { grid-template-columns: 1fr; }
  .featured-build { grid-template-columns: 1fr; }
  .featured-build img { min-height: 10rem; }
  .coming-next { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .case-list { grid-template-columns: 1fr; }
  .principles-grid { grid-template-columns: 1fr; gap: 1rem; }
  .engagement-card, .featured-work-card { min-height: auto; }

  /* Hamburger menu replaces the nav row */
  .site-header .container { flex-wrap: wrap; }
  .nav-toggle-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 0.4rem;
    margin: -0.4rem;
    color: var(--ink);
  }
  .nav-toggle-label .icon { width: 1.4rem; height: 1.4rem; }
  .nav-toggle-label .icon-close { display: none; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow: visible;
    padding: 0.75rem 0 0.25rem;
  }
  .site-nav a {
    font-size: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--rule);
  }
  .site-nav a:last-child { border-bottom: none; }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .nav-toggle:checked ~ .nav-toggle-label .icon-menu { display: none; }
  .nav-toggle:checked ~ .nav-toggle-label .icon-close { display: inline-block; }

  .garden-toolbar { position: static; }
  details.category { scroll-margin-top: 1rem; }
}
