/* Kalyani Wasave portfolio
   Sage and stone: the deep sage green of the original portfolio on warm off-white. No dark blocks. */

:root {
  --ink: #263431;
  --ink-2: #34433F;
  --text: #263431;
  --text-2: #66736E;
  --text-3: #8C958F;
  --white: #FFFFFF;
  --mist: #F5F3EE;
  --mist-2: #ECEAE3;
  --line: #E3E4DC;
  --accent: #255B52;
  --accent-dark: #1C4740;
  --accent-soft: #E6EFEC;
  --mint: #B9D3CB;
  --on-dark: #EEF3F1;
  --on-dark-2: #C9D8D3;
  --valid: #255B52;
  --invalid: #B42318;
  --invalid-soft: #FBE9E7;

  --font-head: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 22px;
  --shadow: 0 1px 2px rgba(38, 52, 49, 0.05), 0 16px 40px -22px rgba(38, 52, 49, 0.2);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--text); font-family: var(--font-body); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 0.5em; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.65rem, 2.8vw, 2.15rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
.lede { font-size: 1.18rem; color: var(--text-2); max-width: 62ch; line-height: 1.6; }
.muted { color: var(--text-2); }
strong { font-weight: 600; }

/* ---------- Navigation ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.9); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; }
.brand::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { text-decoration: none; font-weight: 500; color: var(--text-2); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.nav a.btn, .nav a.btn:hover { color: #fff; box-shadow: none; }
.menu-btn { display: none; background: none; border: 1.5px solid var(--ink); border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }

/* ---------- Buttons and links ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; padding: 12px 22px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--ink); color: #fff; text-decoration: none; cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s; }
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.small { padding: 8px 16px; font-size: 0.92rem; }
.btn.on-dark { background: #fff; border-color: #fff; color: var(--ink); }
.btn.on-dark:hover { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.btn.on-dark.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.btn.on-dark.ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.text-link { font-weight: 600; color: var(--accent); text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Hero ---------- */
.hero { background: var(--mist); padding: clamp(40px, 6vw, 72px) 0 clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.hero h1 { max-width: 20ch; }
.hero .intro { font-size: 1.15rem; color: var(--text-2); max-width: 58ch; }
.hero .intro strong { color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; column-gap: clamp(24px, 4vw, 56px); margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.stats div { max-width: 200px; }
.stats b { display: block; font-family: var(--font-head); font-size: 2.1rem; color: var(--ink); line-height: 1.1; letter-spacing: -0.02em; }
.stats span { color: var(--text-2); font-size: 0.92rem; }
.portrait-wrap { position: relative; z-index: 0; display: grid; justify-items: center; gap: 18px; margin-top: clamp(24px, 3vw, 40px); }
.portrait { position: relative; width: min(100%, 340px); }
.portrait img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 8px solid #fff; box-shadow: var(--shadow); }
.portrait::before { content: ""; position: absolute; inset: -16px -16px auto auto; width: 40%; aspect-ratio: 1; border-radius: 50%; background: var(--accent); z-index: -1; }
.portrait::after { content: ""; position: absolute; left: -10px; bottom: 18px; width: 22%; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--ink); z-index: -1; }
.socials { display: grid; grid-template-columns: repeat(2, auto); gap: 10px; justify-content: center; }
.socials a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 500; font-size: 0.92rem; }
.socials a:hover { border-color: var(--ink); }
.socials img { width: 18px; height: 18px; }

/* ---------- Value strip ---------- */
.value { padding: clamp(40px, 5vw, 60px) 0; }
.value-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.value-item { padding: 28px 28px 30px; background: #fff; }
.value-item + .value-item { border-left: 1px solid var(--line); }
.value-item .num { font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; color: var(--accent); line-height: 1; letter-spacing: -0.03em; }
.value-item .num small { font-size: 0.95rem; color: var(--text-2); font-weight: 500; letter-spacing: 0; margin-left: 6px; }
.value-item h3 { margin: 18px 0 8px; font-size: 1.2rem; }
.value-item p { margin: 0; color: var(--text-2); font-size: 0.97rem; }
.value-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.value-head h2 { margin: 0; font-size: clamp(1.65rem, 2.8vw, 2.1rem); }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 6vw, 80px) 0; }
.section.tint { background: var(--mist); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head .lede { margin: 0; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.95rem; color: var(--accent); margin-bottom: 12px; }
.kicker::before { content: ""; width: 18px; height: 2px; background: var(--accent); }

.block { margin-top: 48px; }
.block:first-of-type { margin-top: 0; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--ink); padding-bottom: 14px; margin-bottom: 24px; }
.block-head h3 { font-size: 1.6rem; margin: 0; }
.block-head p { margin: 0; color: var(--text-2); flex: 1 1 320px; }

/* ---------- Feature (labs) ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); background: var(--ink); color: #fff; border-radius: var(--r-lg); overflow: hidden; }
.feature + .feature { margin-top: 24px; }
.feature .media { background: var(--ink-2); padding: 28px; display: flex; align-items: center; }
.feature .media img { border-radius: 12px; width: 100%; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45); }
.feature .body { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; }
.feature h3 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.feature p { color: var(--on-dark-2); }
.feature ul { margin: 0 0 8px; padding: 0; list-style: none; display: grid; gap: 8px; }
.feature li { padding-left: 24px; position: relative; color: var(--on-dark); }
.feature li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); }
.feature.reverse { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
.feature.reverse .media { order: 2; }

.pill { display: inline-block; align-self: flex-start; font-size: 0.8rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.pill.dark { background: var(--mist-2); color: var(--ink); }
.feature .pill { background: rgba(111, 214, 168, 0.14); color: var(--mint); }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.card:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow); }
.card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; border-bottom: 1px solid var(--line); }
.card .card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 0.96rem; flex: 1; }
.card .more { font-weight: 600; color: var(--accent); }
.other-project-cards { gap: 18px; }
.other-project-card img { aspect-ratio: 16 / 8; }
.other-project-card .card-body { padding: 18px 20px 20px; }
.other-project-card .pill { font-size: 0.75rem; padding: 3px 10px; margin-bottom: 10px; }
.other-project-card h3 { font-size: 1.08rem; }
.other-project-card p { font-size: 0.9rem; }
.other-project-card .more { margin-top: auto; }

.term-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.term-card { display: block; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 20px 22px; transition: border-color 0.15s; position: relative; }
.term-card::before { content: ""; position: absolute; left: 22px; top: 0; width: 28px; height: 3px; background: var(--accent); border-radius: 0 0 3px 3px; }
.term-card:hover { border-color: var(--ink); }
.term-card h3 { font-size: 1.08rem; margin: 6px 0 6px; }
.term-card p { margin: 0; color: var(--text-2); font-size: 0.93rem; }

/* ---------- About / principles ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.principle { background: #fff; border-radius: var(--r); padding: 24px; border: 1px solid var(--line); }
.principle .n { font-family: var(--font-head); font-weight: 700; color: var(--accent); font-size: 0.95rem; }
.principle h3 { font-size: 1.1rem; margin: 6px 0 8px; }
.principle p { margin: 0; color: var(--text-2); font-size: 0.96rem; }
.aside { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 28px; position: sticky; top: 92px; }
.aside h3 { color: #fff; font-size: 0.98rem; margin: 0 0 12px; }
.aside h3 + .chips { margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-size: 0.84rem; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: var(--on-dark); border: 1px solid rgba(255, 255, 255, 0.08); }

/* ---------- Experience ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 31px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.job { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 24px; padding: 0 0 40px; position: relative; }
.job .logo { width: 64px; height: 64px; border-radius: 16px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; position: relative; z-index: 1; }
.job .logo img { max-width: 48px; max-height: 40px; object-fit: contain; }
.job .logo.text { font-family: var(--font-head); font-weight: 700; font-size: 0.8rem; color: var(--ink); text-align: center; line-height: 1.1; }
.job .head { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; align-items: baseline; }
.job h3 { margin: 0; }
.job .when { color: var(--text-3); font-size: 0.92rem; font-weight: 500; }
.job .org { color: var(--accent); font-weight: 600; margin: 2px 0 10px; }
.job ul { margin: 0; padding-left: 1.1em; color: var(--text-2); max-width: 78ch; }
.job li { margin-bottom: 6px; }
.job li::marker { color: var(--accent); }
.hm-note { margin: 12px 0 0; font-size: 0.95rem; color: var(--text-2); background: var(--mist); border-radius: var(--r-sm); padding: 12px 14px; max-width: 78ch; border-left: 3px solid var(--accent); }
.hm-note a { color: var(--accent); }

/* ---------- Education ---------- */
.edu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.edu-card { background: #fff; border-radius: var(--r-lg); padding: 28px; border: 1px solid var(--line); display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; align-items: start; }
.edu-card img { width: 72px; height: 72px; object-fit: contain; }
.edu-card h3 { margin: 4px 0; }
.edu-card .level { color: var(--accent); font-weight: 600; font-size: 0.92rem; }
.edu-card p { margin: 0; color: var(--text-2); }

/* ---------- Other projects ---------- */
.mini-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.mini { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; display: flex; flex-direction: column; }
.mini img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; filter: grayscale(0.35); }
.mini .mini-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.mini .cat { font-size: 0.8rem; color: var(--text-3); }
.mini h3 { font-size: 1rem; margin: 4px 0 6px; }
.mini p { font-size: 0.9rem; color: var(--text-2); margin: 0 0 10px; flex: 1; }
.mini .links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.9rem; }

/* ---------- Contact ---------- */
.contact { background: var(--ink); color: #fff; padding: clamp(72px, 10vw, 112px) 0; text-align: center; position: relative; overflow: hidden; }
.contact::before { content: ""; position: absolute; left: -120px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; background: var(--accent); opacity: 0.55; }
.contact::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); }
.contact .wrap { position: relative; z-index: 1; }
.contact h2 { color: #fff; }
.contact p { color: var(--on-dark-2); max-width: 56ch; margin: 0 auto 8px; font-size: 1.15rem; }
.contact .btn-row { justify-content: center; }
.resumes { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 28px; }
.resumes a { color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 999px; padding: 8px 16px; font-size: 0.92rem; }
.resumes a:hover { border-color: var(--mint); color: var(--mint); }
.resumes span { width: 100%; color: var(--on-dark-2); font-size: 0.9rem; }

/* ---------- Footer ---------- */
.site-footer { padding: 28px 0; border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-footer .icons { display: flex; gap: 12px; }
.site-footer .icons a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; }
.site-footer .icons a:hover { border-color: var(--ink); }
.site-footer .icons img { width: 18px; height: 18px; }

/* ---------- Inner pages ---------- */
.page-head { background: var(--mist); padding: clamp(40px, 5vw, 64px) 0 clamp(28px, 3vw, 40px); border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.page-head h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); max-width: 20ch; }
.crumbs { font-size: 0.92rem; color: var(--text-2); margin-bottom: 16px; }
.crumbs a { color: var(--accent); text-decoration: none; font-weight: 500; }
.crumbs a:hover { text-decoration: underline; }
.article-cover { margin: 32px 0 0; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.article-cover img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.article-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; color: var(--text-2); font-size: 0.92rem; margin-bottom: 18px; }
.article-meta .pill { margin: 0; }
.prose { max-width: 70ch; font-size: 1.1rem; line-height: 1.75; padding: 32px 0 64px; }
.prose h2 { font-size: 1.8rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.3rem; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose blockquote { margin: 1.6em 0; padding: 20px 24px; border-radius: var(--r-sm); background: var(--mist); border-left: 3px solid var(--accent); font-family: var(--font-head); font-size: 1.25rem; line-height: 1.45; color: var(--ink); }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose a.term { text-decoration-style: dotted; }
.prose .note { font-size: 0.96rem; background: var(--mist); padding: 14px 18px; border-radius: var(--r-sm); color: var(--text-2); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 1.2em 0 1.6em; }
.prose th, .prose td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--ink); font-weight: 600; border-bottom: 1.5px solid var(--ink); }
.next-up { border-top: 1px solid var(--line); padding: 32px 0 72px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.sources { font-size: 0.95rem; color: var(--text-2); max-width: 70ch; padding-bottom: 8px; }
.sources a { color: var(--accent); }

/* ---------- Glossary ---------- */
.glossary-tools { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 24px 0 18px; }
.glossary-tools input { font: inherit; padding: 12px 18px; border: 1.5px solid var(--ink); border-radius: 999px; min-width: min(100%, 340px); color: var(--ink); background: #fff; }
.section-title-row { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; margin: 40px 0 16px; }
.section-title-row h2 { font-size: 1.8rem; margin: 0; }
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.letters a { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--mist); color: var(--ink); font-weight: 600; text-decoration: none; }
.letters a:hover { background: var(--ink); color: #fff; }
.terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 72px; }
.term-row { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 22px 24px; scroll-margin-top: 96px; }
.term-row dt { font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; color: var(--ink); }
.term-row dt small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.85rem; color: var(--text-3); margin-top: 2px; }
.term-row dd { margin: 10px 0 0; color: var(--text-2); }
.term-row dd p { margin: 0 0 10px; }
.term-row .eg { background: var(--mist); border-radius: 8px; padding: 10px 12px; color: var(--ink); font-size: 0.95rem; margin: 0; }
.term-row .eg strong { color: var(--accent); }
.term-row a { color: var(--accent); }
.term-row:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.entry-def { font-size: 1.2rem; line-height: 1.55; background: #fff; border-left: 3px solid var(--accent); padding: 18px 22px; border-radius: 0 var(--r-sm) var(--r-sm) 0; max-width: 70ch; color: var(--ink); margin: 8px 0 18px; box-shadow: var(--shadow); }
.aka { color: var(--text-3); font-weight: 500; margin: -6px 0 14px; }
.related { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.related span { color: var(--text-2); font-size: 0.92rem; margin-right: 4px; }
.related a { text-decoration: none; font-size: 0.9rem; font-weight: 500; padding: 5px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.related a:hover { border-color: var(--ink); }
.faq { max-width: 70ch; padding-bottom: 24px; }
.faq h2 { font-size: 1.6rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.faq details p { margin: 10px 0 0; color: var(--text-2); }
.faq a { color: var(--accent); }

/* ---------- Labs (shared) ---------- */
.lab-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 28px; align-items: start; margin-top: 32px; }
.lab-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.lab-panel.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.lab-panel h2 { font-size: 1.3rem; margin-top: 0; }
.lab-panel.dark h2, .lab-panel.dark h3 { color: #fff; }
.lab-panel h3 { font-size: 1.02rem; margin: 22px 0 8px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.field select, .field input[type="date"], .field input[type="number"] { font: inherit; width: 100%; padding: 10px 12px; border: 1.5px solid #CDD2CB; border-radius: 10px; background: #fff; color: var(--ink); }
.field select:focus, .field input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.field .why { display: block; font-size: 0.82rem; color: var(--invalid); margin-top: 4px; }
.field .why:empty { display: none; }
.field .hint { display: block; font-size: 0.82rem; color: var(--text-3); margin-top: 4px; }
.config-code { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; letter-spacing: 0.02em; word-break: break-all; color: var(--mint); margin: 2px 0 12px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; padding: 6px 14px; border-radius: 999px; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.status.ok { color: var(--mint); background: rgba(111, 214, 168, 0.12); }
.status.bad { color: #FF9C91; background: rgba(255, 156, 145, 0.14); }
.notice { font-size: 0.92rem; background: rgba(111, 214, 168, 0.1); border-left: 3px solid var(--mint); border-radius: 0 8px 8px 0; padding: 10px 12px; margin: 0 0 8px; color: var(--on-dark); }
.notice:empty { display: none; }
.lab-panel table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.lab-panel th, .lab-panel td { text-align: left; padding: 8px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); vertical-align: top; }
.lab-panel th { color: var(--on-dark-2); font-weight: 600; }
.lab-panel .count { color: var(--on-dark-2); font-size: 0.88rem; margin: -2px 0 6px; }
.num { text-align: right; }
.pn { font-weight: 600; white-space: nowrap; }
.tabs { display: flex; gap: 8px; margin: 40px 0 16px; flex-wrap: wrap; }
.tabs button { font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--text-2); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tabpanel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; overflow-x: auto; margin-bottom: 72px; }
.tabpanel table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tabpanel th, .tabpanel td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabpanel th { color: var(--text-2); font-weight: 600; }
.pass { color: var(--valid); font-weight: 600; }
.fail { color: var(--invalid); font-weight: 600; }
.tabpanel .prose { padding: 0; font-size: 1rem; max-width: 74ch; }

/* ---------- Portfolio lab ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.kpi .label { font-size: 0.85rem; color: var(--text-2); }
.kpi .val { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; }
.kpi .delta { font-size: 0.85rem; font-weight: 600; }
.kpi .delta.up { color: var(--valid); }
.kpi .delta.down { color: var(--invalid); }
.kpi .delta.flat { color: var(--text-3); }
.kpi.dark { background: var(--ink); border-color: var(--ink); }
.kpi.dark .label { color: var(--on-dark-2); }
.kpi.dark .val { color: #fff; }
.kpi.dark .delta.up { color: var(--mint); }
.kpi.dark .delta.down { color: #FF9C91; }
.controls { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: end; background: var(--mist); border-radius: var(--r); padding: 16px 18px; margin-bottom: 16px; }
.controls .field { margin: 0; min-width: 180px; }
.controls .field input[type="range"] { width: 100%; accent-color: var(--accent); }
.decision { font: inherit; font-size: 0.9rem; padding: 6px 8px; border: 1.5px solid #CDD2CB; border-radius: 8px; background: #fff; color: var(--ink); }
tr.retire td { color: var(--text-3); text-decoration: line-through; text-decoration-color: rgba(180, 35, 24, 0.5); }
tr.retire td.act, tr.retire td.why-col { text-decoration: none; }
tr.reprice td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.bar { height: 8px; border-radius: 4px; background: var(--accent); min-width: 2px; }
.bar.low { background: #C9CEC6; }
.attr-row td { background: var(--mist); font-weight: 600; color: var(--ink); }
.why-col { font-size: 0.85rem; color: var(--text-2); max-width: 260px; }
.tag-mini { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin-left: 6px; vertical-align: middle; }
.tag-mini.warn { background: var(--invalid-soft); color: var(--invalid); }
.space-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.chart-wrap { overflow-x: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .cards, .term-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature, .feature.reverse { grid-template-columns: 1fr; }
  .feature.reverse .media { order: 0; }
  .feature .media { padding: 20px; }
  .about-grid, .lab-grid { grid-template-columns: 1fr; }
  .aside { position: static; }
  .value-grid { grid-template-columns: 1fr; }
  .value-item + .value-item { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 820px) {
  .menu-btn { display: inline-block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px var(--gutter) 16px; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; width: 100%; }
  .nav .btn { margin-top: 8px; width: auto; padding: 8px 16px; }
  .hero-grid { grid-template-columns: 1fr; }
  .portrait-wrap { order: -1; margin-top: 0; }
  .portrait { width: min(70%, 260px); }
  .hero h1 { max-width: none; }
  .space-figs { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cards, .term-grid, .mini-cards, .principles, .edu, .terms { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edu-card { grid-template-columns: 56px minmax(0, 1fr); padding: 22px; }
  .edu-card img { width: 56px; height: 56px; }
  .job { grid-template-columns: 48px minmax(0, 1fr); gap: 16px; }
  .job .logo { width: 48px; height: 48px; border-radius: 12px; }
  .job .logo img { max-width: 36px; max-height: 30px; }
  .timeline::before { left: 23px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .contact::before { width: 200px; height: 200px; left: -90px; bottom: -90px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .card:hover { transform: none; }
}
.value-item .num small { display: block; margin: 8px 0 0; font-family: var(--font-body); }
.decision { min-width: 150px; }
.value-item .num { text-align: left; }


/* ================= Theme: wine and stone (overrides) ================= */
.brand::before, .kicker::before, .portrait::before, .portrait::after, .contact::before, .contact::after { content: none; display: none; }
.brand { font-size: 1.15rem; }

/* Navigation: easy to see and to hit */
.site-header .wrap { min-height: 74px; }
.nav { gap: 6px; }
.nav a { color: var(--ink); font-weight: 600; font-size: 1rem; padding: 9px 16px; border-radius: 999px; transition: background-color 0.15s, color 0.15s; }
.nav a:hover { background: var(--mist-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.nav a.btn { margin-left: 10px; padding: 9px 18px; }

/* Buttons */
.btn { background: var(--accent); border-color: var(--accent); }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.ghost { color: var(--accent); border-color: var(--accent); background: transparent; }
.btn.ghost:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Section labels and block headings */
.kicker { display: inline-block; background: var(--accent-soft); color: var(--accent); padding: 5px 14px; border-radius: 999px; font-size: 0.88rem; }
.block-head { border-bottom: 0; padding: 0 0 0 18px; margin-bottom: 24px; align-items: center; position: relative; }
.block-head::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 5px; border-radius: 3px; background: var(--accent); }
.block-head h3 { font-size: 1.4rem; }
.block-head .btn { flex: none; }

/* Hero and value strip */
.hero { background: linear-gradient(180deg, var(--mist) 0%, #fff 100%); }
.portrait img { border: 0; box-shadow: 0 24px 60px -28px rgba(38, 52, 49, 0.45); }
.value-item .num { color: var(--accent); }

/* Feature cards become light */
.feature { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.feature .media { background: var(--mist); }
.feature .media img { box-shadow: 0 18px 40px -20px rgba(38, 52, 49, 0.35); border: 1px solid var(--line); }
.feature h3 { color: var(--ink); }
.feature p { color: var(--text-2); }
.feature li { color: var(--ink); }
.feature li::before { background: var(--accent); }
.feature .pill, .pill { background: var(--accent-soft); color: var(--accent); }
.pill.dark { background: var(--mist-2); color: var(--ink); }

/* Cards and terms */
.card:hover, .term-card:hover { border-color: var(--accent); }
.card .more, .text-link, .crumbs a, .prose a, .faq a, .term-row a, .sources a, .hm-note a { color: var(--accent); }
.term-card::before { background: var(--accent); }

/* About aside becomes light */
.aside { background: var(--mist); color: var(--ink); border: 1px solid var(--line); }
.aside h3 { color: var(--ink); }
.chips span { background: #fff; color: var(--ink); border: 1px solid var(--line); }

/* Experience */
.job .org { color: var(--accent); }
.job li::marker { color: var(--accent); }

/* Contact band: light blush, not black */
.contact { background: var(--accent-soft); color: var(--ink); }
.contact h2 { color: var(--ink); }
.contact p { color: var(--text-2); }
.contact .contact-content { max-width: 900px; text-align: left; }
.contact .contact-content h2 { margin-bottom: 20px; }
.contact .contact-content p { max-width: 68ch; margin: 0 0 16px; }
.contact .contact-content .btn-row { justify-content: flex-start; margin-top: 24px; }
.resumes a { color: var(--accent); border-color: rgba(37, 91, 82, 0.3); background: #fff; }
.resumes a:hover { border-color: var(--accent); color: var(--accent-dark); }
.resumes span { color: var(--text-2); }

/* Footer with social icons */
.site-footer { padding: 48px 0 24px; background: var(--mist); border-top: 1px solid var(--line); }
.site-footer .wrap.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 32px; align-items: start; justify-content: stretch; }
.footer-about p { color: var(--text-2); margin: 10px 0 0; max-width: 40ch; font-size: 0.95rem; }
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, auto)); gap: 8px 32px; justify-content: start; }
.footer-nav a { text-decoration: none; font-weight: 600; color: var(--ink); }
.footer-nav a:hover { color: var(--accent); }
.footer-social span { display: block; font-weight: 600; margin-bottom: 10px; color: var(--ink); }
.site-footer .icons { display: flex; gap: 10px; }
.site-footer .icons a { width: 44px; height: 44px; background: #fff; border: 1px solid var(--line); }
.site-footer .icons a:hover { border-color: var(--accent); }
.site-footer .icons img { width: 20px; height: 20px; }
.site-footer .wrap.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 0.9rem; }
.footer-base a { color: var(--text-2); text-decoration: none; }
.footer-base a:hover { color: var(--accent); }

/* Inner pages */
.page-head { background: linear-gradient(180deg, var(--mist) 0%, #fff 100%); }
.entry-def { border-left-color: var(--accent); }
.prose blockquote { background: var(--accent-soft); border-left-color: var(--accent); }
.letters a:hover { background: var(--accent); }
.term-row:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Labs: light result panels */
.lab-panel.dark { background: var(--mist); color: var(--ink); border-color: var(--line); }
.lab-panel.dark h2, .lab-panel.dark h3 { color: var(--ink); }
.lab-panel th, .lab-panel td { border-bottom: 1px solid var(--line); }
.lab-panel th { color: var(--text-2); }
.lab-panel .count { color: var(--text-2); }
.config-code { color: var(--accent); }
.status.ok { color: var(--accent); background: var(--accent-soft); }
.status.bad { color: var(--invalid); background: var(--invalid-soft); }
.notice { background: #fff; border-left-color: var(--accent); color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); }
.kpi.dark { background: var(--accent); border-color: var(--accent); }
.kpi.dark .label { color: var(--on-dark-2); }
.kpi.dark .delta.up { color: #fff; }
.kpi.dark .delta.down { color: #FFD5D0; }
.kpi .delta.up { color: var(--accent); }
.bar { background: var(--accent); }
.bar.low { background: #D6DAD2; }
.tag-mini { background: var(--accent-soft); color: var(--accent); }
.controls .field input[type="range"] { accent-color: var(--accent); }
.field select:focus, .field input:focus { box-shadow: 0 0 0 3px var(--accent-soft); }

@media (max-width: 820px) {
  .nav a { padding: 12px 4px; border-radius: 0; }
  .nav a[aria-current="page"] { background: none; box-shadow: inset 3px 0 0 var(--accent); padding-left: 12px; }
  .nav a.btn { margin: 8px 0 0; padding: 9px 18px; border-radius: 999px; }
  .site-footer .wrap.footer-grid { grid-template-columns: 1fr; }
  .block-head h3 { font-size: 1.35rem; }
}

/* Featured project on the home page */
.featured { padding-top: clamp(36px, 4vw, 56px); }
.featured .block-head h2 { margin: 6px 0 0; font-size: clamp(1.7rem, 2.8vw, 2.2rem); }
.featured .block-head .kicker { margin: 0; }
.feature-star { border: 1px solid var(--accent); box-shadow: 0 24px 60px -36px rgba(37, 91, 82, 0.45); grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.feature-star .media { background: var(--accent-soft); }
.feature-star .lead { color: var(--ink); font-size: 1.12rem; font-weight: 500; line-height: 1.55; }
.feature-star .note { font-size: 0.88rem; color: var(--text-3); margin: 6px 0 4px; }
@media (max-width: 900px) { .feature-star { grid-template-columns: 1fr; } }
.feature-star .media { align-items: stretch; }
.feature-star .media img { height: 100%; max-height: 720px; object-fit: cover; object-position: top left; }
@media (max-width: 900px) { .feature-star .media img { height: auto; max-height: none; } }

/* Clearer card boundaries and section labels */
.card,
.term-card,
.mini,
.edu-card,
.principle,
.term-row,
.value-grid,
.feature {
  border-color: rgba(37, 91, 82, 0.34);
}
.card,
.term-card,
.mini,
.edu-card,
.principle,
.term-row,
.feature {
  border-width: 1.5px;
}
.card,
.term-card,
.mini,
.edu-card,
.principle,
.term-row {
  box-shadow: 0 2px 8px rgba(38, 52, 49, 0.045);
}
.block + .block {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.block-head {
  gap: 12px 18px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.block-head::before { display: none; }
.block-head h3 {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid rgba(37, 91, 82, 0.28);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}
.card:hover,
.term-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
@media (max-width: 640px) {
  .block + .block {
    margin-top: 40px;
    padding-top: 24px;
  }
}
