:root {
  --paper: #f2efe6;
  --paper-deep: #e8e1d3;
  --paper-light: #fbf9f3;
  --ink: #19201c;
  --ink-soft: #4f5852;
  --forest: #215f4c;
  --forest-dark: #174638;
  --clay: #a7442e;
  --sun: #e9b949;
  --line: rgba(25, 32, 28, 0.2);
  --light-line: rgba(255, 255, 255, 0.2);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--sun);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a,
button,
summary,
input {
  outline-offset: 4px;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

/* Headings default to the small scale: comfortable leading, near-neutral
   tracking. Only true display sizes opt into tight settings below. */

h1,
h2,
h3 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.012em;
}

.hero h1,
.section-heading h2,
.about-heading h2,
.credentials-layout h2,
.contact-layout h2,
.case-copy h3 {
  line-height: 1.02;
  letter-spacing: -0.032em;
}

.hero h1 {
  line-height: 0.98;
  letter-spacing: -0.042em;
}

.container {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

.section {
  padding: 120px 0;
  scroll-margin-top: 82px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper-light);
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Navigation */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(242, 239, 230, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper-light);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.brand-name {
  font-size: 0.96rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  position: relative;
  font-size: 0.88rem;
  font-weight: 600;
}

.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.2s ease;
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-external {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-external span {
  transition: transform 0.2s ease;
}

.nav-external:hover span {
  transform: translate(2px, -2px);
}

.nav-cta {
  padding: 10px 15px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-cta:hover {
  background: var(--ink);
  color: var(--paper-light);
}

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  transition: transform 0.2s ease;
}

.menu-btn[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* Hero */

.hero {
  position: relative;
  padding: 110px 0 100px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  right: -230px;
  top: 70px;
  border: 1px solid rgba(25, 32, 28, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(25, 32, 28, 0.025), 0 0 0 140px rgba(25, 32, 28, 0.018);
  pointer-events: none;
}

.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: clamp(60px, 8vw, 120px);
  align-items: end;
}

.eyebrow,
.section-kicker,
.case-meta,
.timeline-label {
  margin-bottom: 22px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow span,
.availability span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--clay);
}

.hero h1 {
  max-width: 900px;
  margin-bottom: 36px;
  font-size: clamp(3.2rem, 7.2vw, 6.2rem);
}

.hero h1 em {
  color: var(--clay);
  font-weight: inherit;
}

.hero-copy {
  max-width: 700px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
  line-height: 1.55;
}

.hero-actions,
.case-actions,
.contact-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--ink);
  color: var(--paper-light);
}

.btn-dark:hover {
  background: var(--forest);
}

.btn-light {
  background: var(--paper-light);
  color: var(--ink);
}

.btn-light:hover {
  background: var(--sun);
}

.text-link,
.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid currentColor;
  font-weight: 700;
}

.text-link span,
.inline-link span {
  transition: transform 0.2s ease;
}

.text-link:hover span,
.inline-link:hover span {
  transform: translate(2px, -2px);
}

.availability {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 38px 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 600;
}

.availability span {
  background: var(--forest);
  box-shadow: 0 0 0 5px rgba(33, 95, 76, 0.12);
}

.now-card {
  position: relative;
  padding: 36px;
  border: 1px solid var(--ink);
  background: var(--paper-light);
  box-shadow: 13px 14px 0 var(--sun);
  transform: rotate(1.2deg);
}

.now-card::before {
  content: "";
  position: absolute;
  width: 92px;
  height: 25px;
  top: -13px;
  left: 50%;
  background: rgba(201, 96, 63, 0.6);
  transform: translateX(-50%) rotate(-2deg);
}

.handwritten {
  margin-bottom: 14px;
  color: var(--clay);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.25rem;
  font-style: italic;
}

.now-card h2 {
  margin-bottom: 28px;
  font-size: clamp(1.4rem, 1.9vw, 1.8rem);
  line-height: 1.18;
}

.now-card ul {
  padding: 0;
  margin: 0 0 30px;
  list-style: none;
}

.now-card li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.now-card li span {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.now-card > a {
  font-size: 0.85rem;
  font-weight: 700;
}

/* Shared section heading */

.section-heading {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 50px;
  align-items: start;
  margin-bottom: 64px;
}

.section-kicker {
  color: var(--clay);
}

.section-heading h2,
.about-heading h2,
.credentials-layout h2,
.contact-layout h2 {
  max-width: 850px;
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 3.6vw, 3.1rem);
}

.section-heading > div > p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* Work */

.work-section {
  background: var(--paper-light);
}

.case-study {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: clamp(50px, 7vw, 90px);
  padding: clamp(38px, 6vw, 74px);
  border-radius: 30px;
  background: var(--forest);
  color: var(--paper-light);
}

.case-study + .case-study {
  margin-top: 28px;
}

.case-meta {
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.8);
}

.case-meta span {
  color: #c3efde;
}

.case-copy h3 {
  max-width: 20ch;
  margin-bottom: 24px;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
}

.case-lead {
  max-width: 68ch;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.08rem;
}

.case-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 36px 0 0;
}

.case-details div {
  padding-top: 16px;
  border-top: 1px solid var(--light-line);
}

.case-details dt {
  margin-bottom: 8px;
  color: #c3efde;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.case-details dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.light-link {
  color: var(--paper-light);
}

.system-map {
  align-self: start;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  background: rgba(9, 39, 30, 0.35);
}

.map-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--light-line);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.spec-list {
  margin: 0;
}

.spec-list > div {
  padding: 14px 0;
  border-bottom: 1px solid var(--light-line);
  font-size: 0.92rem;
}

.spec-list > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.spec-list dt {
  margin-bottom: 2px;
  color: #a9d8c7;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.spec-list dd {
  margin: 0;
  font-weight: 600;
}

/* Work index: one row per project. Grows without redesign — the featured card
   above carries the hierarchy, these carry the count. */

.work-index {
  padding: 0;
  margin: 56px 0 0;
  border-bottom: 1px solid var(--line);
  list-style: none;
  counter-reset: work;
}

.work-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1.55fr) minmax(0, 0.7fr) 150px;
  gap: 32px;
  align-items: baseline;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

.work-year,
.work-stack,
.work-status {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.work-year {
  font-weight: 700;
}

.work-body h3 {
  margin-bottom: 7px;
  font-size: clamp(1.25rem, 1.9vw, 1.6rem);
}

.work-body h3 a {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size 0.25s ease;
}

.work-body h3 a:hover {
  background-size: 100% 1px;
}

.work-body p {
  max-width: 54ch;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.work-status {
  justify-self: end;
  text-align: right;
}

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

.work-link span {
  transition: transform 0.2s ease;
}

.work-link:hover span {
  transform: translateX(3px);
}

.work-item-active {
  margin-inline: -20px;
  padding-inline: 20px;
  background: rgba(233, 185, 73, 0.12);
}

.work-item-active .work-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--forest);
  font-weight: 700;
}

.work-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--forest);
}

.colophon {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: center;
  margin-top: 56px;
  padding: 30px 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper-deep);
}

.colophon h3 {
  margin-bottom: 8px;
  font-size: 1.4rem;
}

.colophon p {
  max-width: 62ch;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.colophon-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

/* About */

.about-section {
  background: var(--paper-deep);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(380px, 1.1fr);
  gap: clamp(60px, 10vw, 140px);
}

.about-heading {
  position: sticky;
  top: 110px;
  align-self: start;
}

.about-heading h2 {
  max-width: 560px;
}

.portrait {
  display: block;
  width: min(220px, 60%);
  height: auto;
  margin-top: 34px;
  border-radius: 6px;
  filter: grayscale(0.15);
}

.story-lead {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.35;
  letter-spacing: -0.012em;
}

.about-story > p:not(.story-lead) {
  max-width: 650px;
  color: var(--ink-soft);
}

.personal-facts {
  margin-top: 44px;
  border-bottom: 1px solid var(--line);
}

.personal-facts > div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.personal-facts span {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.personal-facts strong {
  font-size: 0.92rem;
}

.toolkit {
  margin-top: 96px;
}

.toolkit-title {
  margin-bottom: 26px;
  font-size: 1.35rem;
}

.toolkit dl {
  margin: 0;
  border-top: 1px solid var(--line);
}

.toolkit dl > div {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 28px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.toolkit dt {
  font-weight: 600;
  letter-spacing: -0.005em;
}

.toolkit dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.toolkit dd a {
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.toolkit dd a:hover {
  border-bottom-color: currentColor;
}

/* Journey */

.journey-section {
  background: var(--ink);
  color: var(--paper-light);
}

.journey-section .section-kicker {
  color: var(--sun);
}

.journey-section .section-heading > div > p {
  color: rgba(255, 255, 255, 0.58);
}

.compact-heading {
  margin-bottom: 40px;
}

.timeline {
  margin-left: 280px;
  border-bottom: 1px solid var(--light-line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 42px;
  padding: 40px 0;
  border-top: 1px solid var(--light-line);
}

.time {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
  font-weight: 700;
}

.timeline-label {
  margin-bottom: 10px;
  color: #7ce0bd;
}

.timeline-item h3 {
  margin-bottom: 8px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.timeline-item .institution {
  margin-bottom: 16px;
  color: var(--sun);
  font-size: 0.87rem;
  font-weight: 600;
}

.timeline-item div > p:last-of-type {
  max-width: 660px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.62);
}

.inline-link {
  margin-top: 18px;
  color: var(--paper-light);
  font-size: 0.84rem;
}

/* Credentials */

.credentials-section {
  background: var(--paper-light);
}

.credentials-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(70px, 11vw, 150px);
  align-items: start;
}

.credentials-layout h2 {
  max-width: 560px;
}

.credentials-intro {
  max-width: 440px;
  color: var(--ink-soft);
}

.credential-stack {
  border-bottom: 1px solid var(--line);
}

.credential {
  display: grid;
  grid-template-columns: 58px 1fr 24px;
  gap: 20px;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.credential > span {
  color: var(--clay);
  font-size: 0.74rem;
  font-weight: 700;
}

.credential strong,
.credential small {
  display: block;
}

.credential strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.15;
}

.credential small {
  margin-top: 5px;
  color: var(--ink-soft);
}

.credential > i {
  font-style: normal;
  transition: transform 0.2s ease;
}

.credential:hover > i {
  transform: translate(3px, -3px);
}

.more-credentials {
  border-top: 1px solid var(--line);
}

.more-credentials summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.more-credentials summary::-webkit-details-marker {
  display: none;
}

.more-credentials summary span {
  font-size: 1.5rem;
  font-weight: 400;
  transition: transform 0.2s ease;
}

.more-credentials[open] summary span {
  transform: rotate(45deg);
}

.credential-links {
  display: grid;
  gap: 0;
  padding-bottom: 18px;
}

.credential-links a {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 0 10px 58px;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.credential-links a:hover {
  color: var(--ink);
}

/* Contact and footer */

.contact-section {
  padding: 110px 0;
  scroll-margin-top: 76px;
  background: var(--clay);
  color: var(--paper-light);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: clamp(60px, 10vw, 140px);
  align-items: end;
}

.contact-layout .section-kicker {
  color: #ffe09a;
}

.contact-layout h2 {
  max-width: 700px;
  margin-bottom: 0;
}

.contact-layout > div:last-child > p {
  max-width: 540px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.06rem;
}

footer {
  padding: 28px 0;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.62);
}

.footer-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 0.78rem;
}

.footer-layout p {
  margin-bottom: 0;
}

.footer-layout a {
  color: var(--paper-light);
}

/* AI guide */

.chat-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 17px 10px 11px;
  border: 1px solid var(--paper-light);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper-light);
  box-shadow: 0 12px 35px rgba(25, 32, 28, 0.2);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.chat-toggle:hover {
  background: var(--forest);
  transform: translateY(-2px);
}

.chat-spark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
}

.chat-window {
  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 999;
  width: min(390px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 20px;
  background: var(--paper-light);
  box-shadow: 14px 14px 0 rgba(25, 32, 28, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.chat-window.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.chat-header p {
  margin-bottom: 1px;
  color: var(--clay);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chat-header strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
}

.chat-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.chat-close:hover {
  background: var(--ink);
  color: var(--paper-light);
}

.chat-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  overflow-y: auto;
}

.message {
  max-width: 84%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.bot-message {
  align-self: flex-start;
  border: 1px solid var(--line);
  border-bottom-left-radius: 3px;
  background: var(--paper);
}

.user-message {
  align-self: flex-end;
  border-bottom-right-radius: 3px;
  background: var(--forest);
  color: var(--paper-light);
}

.chat-loading {
  color: var(--ink-soft);
  font-style: italic;
}

.chat-suggestions {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto;
}

.suggestion-btn {
  flex-shrink: 0;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 0.72rem;
  cursor: pointer;
}

.suggestion-btn:hover {
  border-color: var(--forest);
  background: rgba(33, 95, 76, 0.08);
}

.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.chat-input-area input {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-light);
  color: var(--ink);
  font-size: 0.84rem;
}

.chat-input-area input:focus {
  border-color: var(--forest);
}

.chat-send {
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper-light);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.chat-send:hover {
  background: var(--forest);
}

.chat-input-area input:disabled,
.chat-send:disabled {
  cursor: wait;
  opacity: 0.6;
}

/* Responsive */

@media (max-width: 960px) {
  .container {
    width: min(var(--max), calc(100% - 36px));
  }

  .section {
    padding: 90px 0;
  }

  .menu-btn {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    padding: 16px 18px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    flex-direction: column;
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 4px;
  }

  .nav-links .nav-cta {
    margin-top: 8px;
    padding: 10px 14px;
    text-align: center;
  }

  .hero-layout,
  .about-layout,
  .credentials-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero-layout {
    gap: 80px;
  }

  .about-heading {
    position: static;
  }

  .now-card {
    width: min(520px, calc(100% - 14px));
    justify-self: end;
  }

  .section-heading {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .case-study {
    grid-template-columns: 1fr;
  }

  .system-map {
    width: 100%;
  }

  .work-item {
    grid-template-columns: 62px minmax(0, 1fr) 130px;
    gap: 10px 22px;
  }

  .work-stack {
    grid-column: 2;
  }
  .toolkit {
    margin-top: 70px;
  }

  .timeline {
    margin-left: 200px;
  }

  .credentials-layout,
  .contact-layout {
    gap: 50px;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(var(--max), calc(100% - 28px));
  }

  .section {
    padding: 72px 0;
  }

  .brand-name {
    display: none;
  }

  .hero {
    padding: 72px 0 76px;
  }

  .hero::before {
    display: none;
  }

  .hero h1 {
    margin-bottom: 28px;
    font-size: clamp(2.8rem, 12vw, 3.8rem);
  }

  .hero-copy {
    font-size: 1rem;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .now-card {
    width: calc(100% - 10px);
    padding: 28px;
    box-shadow: 9px 10px 0 var(--sun);
    transform: rotate(0.6deg);
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 44px;
  }

  .section-heading h2,
  .about-heading h2,
  .credentials-layout h2,
  .contact-layout h2 {
    font-size: clamp(1.95rem, 7vw, 2.5rem);
  }

  .case-study {
    gap: 42px;
    padding: 30px 22px;
    border-radius: 20px;
  }

  .case-copy h3 {
    font-size: clamp(1.8rem, 6.5vw, 2.3rem);
  }

  .case-details {
    grid-template-columns: 1fr;
  }

  .case-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .system-map {
    padding: 22px;
  }

  .work-index {
    margin-top: 44px;
  }

  .work-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 26px 0;
  }

  .work-status {
    justify-self: start;
    text-align: left;
  }

  .work-item-active {
    margin-inline: -10px;
    padding-inline: 10px;
  }


  .colophon {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 26px 22px;
  }

  .colophon-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .about-layout {
    gap: 38px;
  }

  .about-heading {
    position: static;
  }

  .story-lead {
    font-size: 1.2rem;
  }

  .personal-facts > div {
    grid-template-columns: 90px 1fr;
    gap: 14px;
  }

  .toolkit {
    margin-top: 60px;
  }

  .toolkit dl > div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .timeline {
    margin-left: 0;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 30px 0;
  }

  .credential {
    grid-template-columns: 48px 1fr 20px;
    gap: 12px;
  }

  .credential strong {
    font-size: 1.15rem;
  }

  .credential-links a {
    padding-left: 0;
  }

  .contact-section {
    padding: 76px 0;
  }

  .footer-layout {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .chat-toggle {
    right: 14px;
    bottom: 14px;
  }

  .chat-window {
    right: 10px;
    bottom: 76px;
    width: calc(100vw - 20px);
    height: min(580px, calc(100dvh - 92px));
    border-radius: 16px;
    box-shadow: 7px 7px 0 rgba(25, 32, 28, 0.16);
  }
}


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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------------------
   Project detail pages (projects/<slug>/index.html)
   Narrow measure for reading; everything else inherits the site system.
   --------------------------------------------------------------------------- */

.project-page {
  padding: 56px 0 120px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 44px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 700;
}

.back-link:hover {
  color: var(--ink);
}

.back-link span {
  transition: transform 0.2s ease;
}

.back-link:hover span {
  transform: translateX(-3px);
}

.project-hero {
  max-width: 820px;
  padding-bottom: 52px;
  border-bottom: 1px solid var(--line);
}

.project-hero h1 {
  margin-bottom: 26px;
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.project-lead {
  max-width: 62ch;
  margin-bottom: 40px;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
}

.fact-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 26px;
  margin: 0 0 40px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.fact-strip dt {
  margin-bottom: 6px;
  color: var(--clay);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fact-strip dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.project-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

/* Reading column */

.prose {
  max-width: 68ch;
  margin-top: 60px;
}

.prose h2 {
  margin: 60px 0 18px;
  font-size: clamp(1.5rem, 2.3vw, 1.95rem);
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose p {
  margin-bottom: 20px;
  font-size: 1.02rem;
  line-height: 1.72;
}

.prose a:not(.btn) {
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.prose a:not(.btn):hover {
  border-bottom-color: currentColor;
}

.prose code {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(25, 32, 28, 0.07);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.code-block {
  margin: 0 0 24px;
  padding: 22px 24px;
  overflow-x: auto;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper-light);
  font-size: 0.84rem;
  line-height: 1.6;
}

.code-block code {
  padding: 0;
  background: none;
  font-size: inherit;
}

.project-figure {
  margin: 32px 0 42px;
}

.project-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.project-figure figcaption {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.5;
}

.step-list {
  padding-left: 22px;
  margin: 0 0 24px;
}

.step-list li {
  margin-bottom: 12px;
  line-height: 1.7;
}

.results-table {
  width: 100%;
  margin: 0 0 26px;
  border-collapse: collapse;
  font-size: 0.93rem;
  text-align: left;
}

.results-table caption {
  margin-bottom: 14px;
  color: var(--clay);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}

.results-table th,
.results-table td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.results-table th {
  width: 42%;
  color: var(--ink-soft);
  font-weight: 500;
}

.results-table td {
  font-weight: 600;
}

.callout {
  margin: 30px 0;
  padding: 22px 26px;
  border-left: 3px solid var(--clay);
  border-radius: 0 12px 12px 0;
  background: var(--paper-deep);
}

.prose .callout {
  margin-bottom: 30px;
}

.placeholder-note {
  padding: 18px 22px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--ink-soft);
  font-style: italic;
}

.example-run {
  margin: 0 0 28px;
  padding: 4px 0;
}

.example-run + .example-run {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.example-kicker {
  margin: 0 0 12px;
  color: var(--clay);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-next {
  max-width: 68ch;
  margin-top: 80px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.project-next > p {
  margin-bottom: 12px;
  color: var(--clay);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-next a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
}

.project-next a span:last-child {
  transition: transform 0.2s ease;
}

.project-next a:hover span:last-child {
  transform: translateX(4px);
}

@media (max-width: 680px) {
  .project-page {
    padding: 36px 0 72px;
  }

  .back-link {
    margin-bottom: 30px;
  }

  .project-hero {
    padding-bottom: 36px;
  }

  .prose {
    margin-top: 40px;
  }

  .prose h2 {
    margin-top: 44px;
  }

  .code-block {
    padding: 18px;
    font-size: 0.78rem;
  }

  .results-table,
  .results-table tbody,
  .results-table tr,
  .results-table th,
  .results-table td {
    display: block;
    width: auto;
  }

  .results-table tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .results-table th,
  .results-table td {
    padding: 0;
    border-bottom: 0;
  }

  .results-table th {
    margin-bottom: 2px;
    font-size: 0.8rem;
  }

  .project-next a {
    flex-direction: column;
    gap: 8px;
  }
}
