/* ============================================
   Nikhilesh Wani — Portfolio  v1.1.0
   ============================================ */

/* --- Design tokens --- */
:root {
  --ink: #101d1a;
  --paper: #f6f4ef;
  --acid: #c8fa4b;
  --green: #567436;
  --muted: #66716b;
  --rule: #d8d8d1;
  --card: #fff;
}

/* --- Reset & base --- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Manrope, Arial, sans-serif;
}

/* --- Layout shell --- */
.shell {
  width: min(1180px, calc(100% - 64px));
  margin: auto;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 244, 239, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav.shell {
  width: 100%;
  max-width: 100%;
  padding: 0 max(32px, calc((100% - 1180px) / 2));
}

/* Brand wordmark */
.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--ink);
  text-decoration: none;
}
.brand-first {
  font-family: Manrope, Arial, sans-serif;
  font-weight: 800;
}
.brand-last {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 600;
}

/* Nav links */
.nav nav {
  display: flex;
  gap: 31px;
}
.nav nav a {
  font: 500 12px 'DM Mono', monospace;
  color: var(--ink);
  text-decoration: none;
  position: relative;
}
.nav nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1.5px;
  background: var(--green);
  transition: width .3s ease;
}
.nav nav a:hover::after {
  width: 100%;
}
.nav .nav-cta {
  border: 1px solid var(--ink);
  padding: 10px 14px;
  border-radius: 2px;
  font: 500 12px 'DM Mono', monospace;
  color: var(--ink);
  text-decoration: none;
  transition: background .25s, color .25s;
}
.nav .nav-cta:hover {
  background: var(--ink);
  color: #fff;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform .3s, opacity .3s;
}
@media (max-width: 760px) {
  .nav .brand { margin-right: auto; }
  .nav .nav-cta { font-size: 10px; order: 1; }
  .nav-toggle { order: 2; margin-left: 10px; }
}
.nav-toggle.open span:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* ============================================
   Eyebrow label
   ============================================ */
.eyebrow {
  font: 500 10px 'DM Mono', monospace;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: #66736c;
  margin: 0 0 20px;
}
.eyebrow::before {
  content: '✦';
  color: #6b9839;
  margin-right: 8px;
}

/* ============================================
   Hero section
   ============================================ */
.hero {
  min-height: auto;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 60px;
  align-items: center;
  padding: 30px 0 40px;
}
.hero h1, .title-block h1 {
  font-size: clamp(42px, 4.8vw, 64px);
  line-height: .97;
  letter-spacing: -1.7px;
  margin: 0;
}
.hero h1 em, .title-block h1 em, h2 em {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  letter-spacing: -.9px;
}
.intro {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  max-width: 490px;
  margin: 29px 0;
}

/* --- Hero portrait --- */
.hero-portrait {
  position: relative;
  display: flex;
  justify-content: center;
}
.portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  background: #ddd;
  position: relative;
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.portrait-label {
  position: absolute;
  bottom: 20px;
  left: 20px;
  color: white;
  font: 600 13px 'DM Mono';
  letter-spacing: 1px;
  z-index: 2;
}
.portrait-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0,0,0,.45) 0%, transparent 100%);
  z-index: 1;
  border-radius: 0 0 16px 16px;
  pointer-events: none;
}

/* ============================================
   Buttons
   ============================================ */
.button {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  padding: 15px 18px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font: 600 12px 'DM Mono', monospace;
  border-radius: 3px;
  transition: transform .25s, box-shadow .25s;
}
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 29, 26, .18);
}
.button:hover span {
  display: inline-block;
  transform: translateX(3px);
  transition: transform .25s;
}
.button span {
  transition: transform .25s;
}
.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.button.lime {
  color: var(--ink);
  background: var(--acid);
}

/* ============================================
   Focus strip
   ============================================ */
.focus {
  border-block: 1px solid var(--rule);
  padding: 29px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.3fr;
  gap: 24px;
}
.focus-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.focus-item svg {
  width: 19px;
  color: var(--green);
  margin-top: 3px;
}
.focus-item b { font-size: 13px; display: block; }
.focus-item p {
  font: 11px/1.5 'DM Mono';
  color: var(--muted);
  margin: 3px 0 0;
}
.focus-note {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

/* ============================================
   Section layout
   ============================================ */
.section { padding: 120px 0; }
.section-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 55px;
}
.section h2 {
  font-size: clamp(45px, 5.4vw, 71px);
  letter-spacing: -1.7px;
  line-height: .99;
  margin: 0;
}
.section-lede {
  align-self: end;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  max-width: 370px;
  margin: 0;
}

/* ============================================
   Work grid & cards
   ============================================ */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 52px 28px;
}
.work-card {
  border-top: 1px solid var(--rule);
  padding-top: 13px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  transition: transform .35s ease;
}
.work-card:hover {
  transform: translateY(-4px);
}
.work-card a {
  color: inherit;
  text-decoration: none;
  display: block;
  max-width: 100%;
  overflow: hidden;
}
.work-image {
  background: #e7e9e6;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  isolation: isolate;
  min-width: 0;
}
.work-image.dark { background: #060b17; }
.work-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-width: 0;
  min-height: 0;
  transition: transform .5s ease;
}
.work-card:hover img {
  transform: scale(1.04);
}
.work-meta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 18px;
}
.work-meta small {
  font: 10px 'DM Mono';
  color: var(--muted);
  text-transform: uppercase;
}
.work-meta h3 {
  font-size: 22px;
  letter-spacing: -1.2px;
  margin: 6px 0 0;
}
.work-meta svg {
  width: 20px;
  transition: transform .3s ease;
}
.work-card:hover .work-meta svg {
  transform: translate(3px, -3px);
}
.work-card p {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  margin: 13px 0;
}

/* --- Tags & skills chips --- */
.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tags span {
  font: 10px 'DM Mono';
  background: #e7e9e5;
  padding: 6px 8px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
}

/* ============================================
   About section
   ============================================ */
.about-section {
  padding: 100px 0;
}
.about-top {
  margin-bottom: 48px;
}
.about-top h2 {
  font-size: clamp(45px, 5.4vw, 71px);
  letter-spacing: -1.7px;
  line-height: .99;
  margin: 0;
}
.about-top h2 em {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  letter-spacing: -.9px;
}
.about-content {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 80px;
}
.about-text p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.82;
  margin: 0 0 22px;
}
.about-text p:first-child {
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
}
.about-toolkit {
  padding: 32px;
  background: var(--ink);
  border-radius: 4px;
  align-self: start;
}
.about-toolkit h3 {
  color: #fff;
  font-size: 14px;
  margin: 0 0 20px;
  letter-spacing: -.3px;
}
.about-toolkit .skills span {
  color: #fff;
}

/* ============================================
   Services preview (landing page)
   ============================================ */
.services-preview {
  padding: 100px 0;
  border-top: 1px solid var(--rule);
}
.services-preview .section-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 48px;
}
.services-preview h2 {
  font-size: clamp(45px, 5.4vw, 71px);
  letter-spacing: -1.7px;
  line-height: .99;
  margin: 0;
}
.services-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.service-preview-card {
  background: var(--card);
  padding: 25px;
  border: 1px solid #e4e2dc;
  transition: transform .3s ease, box-shadow .3s ease;
}
.service-preview-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(16, 29, 26, .08);
}
.service-preview-card svg {
  width: 24px;
  height: 24px;
  color: var(--green);
  margin-bottom: 20px;
}
.service-preview-card h3 {
  font-size: 16px;
  letter-spacing: -.6px;
  margin: 0 0 8px;
}
.service-preview-card p {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}
.services-preview-link {
  margin-top: 36px;
  text-align: center;
}

/* ============================================
   Dark section (toolkit)
   ============================================ */
.dark-section {
  background: var(--ink);
  background-image: radial-gradient(ellipse at 30% 50%, rgba(86, 116, 54, .12) 0%, transparent 60%);
  color: white;
  padding: 90px max(32px, calc((100% - 1116px) / 2));
  width: min(1260px, calc(100% - 32px));
  margin: auto;
  border-radius: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}
.dark-section h2 {
  font-size: clamp(44px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -1.7px;
  margin: 0;
}
.dark-section h2 em { color: var(--acid); }
.dark-section p {
  color: #cbd2cd;
  font-size: 17px;
  line-height: 1.72;
  margin: 0 0 30px;
}
.skills {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.skills span {
  border: 1px solid #49564f;
  border-radius: 20px;
  padding: 8px 11px;
  font: 10px 'DM Mono';
  display: inline-flex;
  align-items: center;
  transition: background .25s, border-color .25s;
  cursor: default;
}
.skills span:hover {
  background: rgba(200, 250, 75, .1);
  border-color: rgba(200, 250, 75, .35);
}

/* ============================================
   Contact section
   ============================================ */
.contact {
  text-align: center;
  padding: 130px 0;
}
.contact h2 {
  font-size: clamp(52px, 6vw, 82px);
  line-height: .98;
  letter-spacing: -1.7px;
  margin: 0;
}
.contact h2 em { color: var(--green); }
.contact p:not(.eyebrow) {
  color: var(--muted);
  font-size: 15px;
  margin: 26px 0;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  min-height: 78px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer p, .footer a {
  font: 10px 'DM Mono';
  color: var(--muted);
  text-decoration: none;
}
.footer .brand {
  font-size: 20px;
}

/* ============================================
   Scroll reveal (fade-in)
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Page header (project / services pages)
   ============================================ */
.page-header {
  padding: 82px 0 56px;
  border-bottom: 1px solid var(--rule);
}
.crumb {
  font: 11px 'DM Mono';
  color: var(--muted);
  text-decoration: none;
}
.title-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 65px;
  align-items: end;
  margin-top: 51px;
}
.title-block p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0 0 4px;
}

/* ============================================
   Project pages
   ============================================ */
.project-hero {
  padding: 44px 0 95px;
  min-width: 0;
  overflow: hidden;
  background: #e7e9e6;
}
.project-hero img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 670px;
  object-fit: contain;
  height: auto;
}
.project-hero:has(img[src*="smart"]) { background: #060b17; }

.case-info {
  padding: 74px 0 115px;
  display: grid;
  grid-template-columns: .85fr 1.3fr;
  gap: 100px;
}
.case-side {
  font: 10px/1.65 'DM Mono';
  color: var(--muted);
  text-transform: uppercase;
}
.case-side div {
  padding: 15px 0;
  border-top: 1px solid var(--rule);
}
.case-side b {
  display: block;
  color: var(--ink);
  font: 500 11px Manrope;
  text-transform: none;
  margin-top: 4px;
}
.case-body h2 {
  font-size: 35px;
  letter-spacing: -2px;
  margin: 0 0 18px;
}
.case-body p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.82;
  margin: 0 0 30px;
}

/* Feature list */
.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.feature-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 16px;
  font-size: 13px;
}
.feature-list svg {
  width: 18px;
  color: var(--green);
  flex: none;
}
.feature-list strong { display: block; margin-bottom: 4px; }
.feature-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* --- Case addendum (JS-injected) --- */
.case-addendum {
  margin-top: 48px;
  padding: 28px 0 0;
  border-top: 1px solid #d8d8d1;
}
.case-addendum .eyebrow { margin-bottom: 12px; }
.case-addendum > div {
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 18px;
  padding: 15px 0;
  border-top: 1px solid #d8d8d1;
}
.case-addendum > div:last-child { border-bottom: 1px solid #d8d8d1; }
.case-addendum span {
  font: 500 10px 'DM Mono';
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #567436;
  padding-top: 3px;
}
.case-addendum p {
  font-size: 13px !important;
  line-height: 1.7 !important;
  margin: 0 !important;
  color: #66716b !important;
}

/* ============================================
   Services page
   ============================================ */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.service-card {
  background: var(--card);
  padding: 29px;
  border: 1px solid #e4e2dc;
  min-height: 264px;
  position: relative;
}
.service-card:nth-child(1) {
  background: var(--ink);
  color: #fff;
}
.service-card:nth-child(2) {
  background: #1b3a2d;
  color: #fff;
}
.service-card:nth-child(3) {
  background: var(--acid);
  color: var(--ink);
}
.service-card:nth-child(5) {
  background: #f0ede5;
  border-color: #d5d1c7;
}
.service-card svg {
  width: 27px;
  height: 27px;
  margin-bottom: 45px;
  color: var(--green);
}
.service-card:nth-child(1) svg,
.service-card:nth-child(2) svg { color: var(--acid); }
.service-card:nth-child(3) svg { color: var(--ink); }
.service-card h2 {
  font-size: 25px;
  letter-spacing: -1.6px;
  margin: 0 0 10px;
}
.service-card p {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}
.service-card:nth-child(1) p,
.service-card:nth-child(2) p { color: #c6cfca; }
.service-card:nth-child(3) p { color: #3a5025; }
.service-card a {
  position: absolute;
  right: 25px;
  bottom: 24px;
  color: inherit;
}

/* Service page enhanced header */
.service-page .page-header,
.service-enhanced-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #ecf4df 0%, #f6f4ef 55%, #dce7e0 100%);
  padding-bottom: 72px;
}
.service-page .page-header::after,
.service-enhanced-header::after {
  content: '';
  position: absolute;
  width: 330px;
  height: 330px;
  border: 1px solid #9bb47d;
  border-radius: 50%;
  right: -110px;
  bottom: -175px;
  pointer-events: none;
}
.service-page .page-header .shell {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  grid-template-rows: auto 1fr;
  gap: 0 60px;
}
.service-page .page-header .crumb {
  grid-column: 1 / -1;
}
.service-page .title-block {
  display: block;
  grid-column: 1;
  grid-row: 2;
}
.service-page .title-block p {
  margin-top: 24px;
  max-width: 440px;
}
.service-visual {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  gap: 14px;
  align-items: end;
  justify-self: end;
  align-self: end;
}
.service-visual-card {
  width: 140px;
  padding: 20px 16px;
  background: #101d1a;
  color: #fff;
  box-shadow: 0 16px 25px #1620161a;
  border-radius: 3px;
}
.service-visual-card:nth-child(2) {
  margin-bottom: 50px;
  background: #c8fa4b;
  color: #101d1a;
}
.service-visual-card:nth-child(3) {
  background: #fff;
  color: #101d1a;
}
.service-visual-card svg {
  width: 22px;
  height: 22px;
  margin-bottom: 20px;
}
.service-visual-card b {
  font-size: 11px;
  display: block;
  line-height: 1.35;
}
.service-visual-card small {
  font: 9px 'DM Mono';
  opacity: .65;
  display: block;
  margin-top: 6px;
}
.service-page .service-card a { display: none; }
.service-page .service-card { cursor: default; }
.service-page .service-card::before {
  content: '';
  display: block;
  position: absolute;
  right: 25px;
  top: 25px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c8fa4b;
}
.service-page .service-card:not(:first-child)::before { background: #8eaaa1; }

/* Service detail (JS-injected) */
.service-detail { padding: 110px 0 96px; }
.service-detail-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 48px;
}
.service-detail-top .eyebrow { grid-column: 1; }
.service-detail-top h2 {
  grid-column: 1;
  grid-row: 2;
  font-size: clamp(40px, 4.8vw, 64px);
  line-height: 1;
  letter-spacing: -1.7px;
  margin: 0;
}
.service-detail-top h2 em,
.engagement-strip h2 em {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: #567436;
  letter-spacing: -.9px;
}
.service-detail-top > p:last-child {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  max-width: 370px;
  margin: 0;
  color: #66716b;
  font-size: 14px;
  line-height: 1.75;
}
.service-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #d8d8d1;
}
.service-detail-grid article {
  padding: 25px 30px 0 0;
  margin-right: 24px;
}
.service-detail-grid article + article {
  border-left: 1px solid #d8d8d1;
  padding-left: 29px;
}
.service-detail-grid svg { width: 23px; color: #567436; }
.service-detail-grid h3 {
  font-size: 18px;
  letter-spacing: -.8px;
  margin: 25px 0 9px;
}
.service-detail-grid p {
  font-size: 12px;
  line-height: 1.65;
  color: #66716b;
  margin: 0;
}
.service-detail-grid ul {
  list-style: none;
  padding: 18px 0 0;
  margin: 18px 0 0;
  border-top: 1px solid #d8d8d1;
}
.service-detail-grid li {
  font: 10px/2 'DM Mono';
  color: #66716b;
}
.service-detail-grid li::before {
  content: '↗';
  color: #567436;
  margin-right: 7px;
}

/* Engagement strip */
.engagement-strip {
  width: min(1260px, calc(100% - 32px));
  margin: auto;
  background: #101d1a;
  color: #fff;
  padding: 78px max(32px, calc((100% - 1116px) / 2));
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 90px;
}
.engagement-strip .eyebrow { color: #b9c3bd; }
.engagement-strip h2 {
  font-size: clamp(40px, 4.6vw, 61px);
  line-height: 1;
  letter-spacing: -1.7px;
  margin: 0;
}
.engagement-list { border-top: 1px solid #445048; }
.engagement-list > div {
  display: grid;
  grid-template-columns: 42px .9fr 1.2fr;
  gap: 13px;
  padding: 21px 0;
  border-bottom: 1px solid #445048;
}
.engagement-list span { font: 10px 'DM Mono'; color: #c8fa4b; }
.engagement-list h3 { font-size: 15px; margin: 0; }
.engagement-list p {
  font-size: 12px;
  line-height: 1.6;
  color: #c8d0cb;
  margin: 0;
}

/* Process section */
.process { padding: 114px 0; }
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
}
.process-step {
  padding: 20px 18px 0 0;
  margin-right: 20px;
}
.process-step span { font: 10px 'DM Mono'; color: var(--green); }
.process-step h3 {
  font-size: 17px;
  letter-spacing: -.8px;
  margin: 15px 0 9px;
}
.process-step p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* ============================================
   Contact page
   ============================================ */
.contact-hero {
  min-height: calc(100vh - 162px);
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 78px;
  align-items: center;
  padding: 55px 0 90px;
}
.contact-hero h1 {
  font-size: clamp(52px, 6vw, 80px);
  letter-spacing: -1.7px;
  line-height: .98;
  margin: 0;
}
.contact-hero h1 em {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  letter-spacing: -.9px;
  color: #567436;
}
.contact-hero > div > p:not(.eyebrow) {
  font-size: 15px;
  line-height: 1.75;
  color: #66716b;
  max-width: 420px;
  margin: 26px 0;
}
.contact-points {
  border-top: 1px solid #d8d8d1;
  max-width: 390px;
}
.contact-points > div {
  display: flex;
  gap: 12px;
  padding: 17px 0;
  border-bottom: 1px solid #d8d8d1;
}
.contact-points svg { width: 18px; color: #567436; }
.contact-points b, .contact-points small { display: block; }
.contact-points b { font-size: 12px; }
.contact-points small {
  font-size: 11px;
  color: #66716b;
  margin-top: 3px;
}

/* Quote form */
.quote-form {
  background: #fff;
  padding: 33px;
  border: 1px solid #e0ded7;
  box-shadow: 0 18px 40px #1820190d;
}
.form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #d8d8d1;
  padding-bottom: 19px;
  margin-bottom: 21px;
}
.form-head p { font-size: 15px; font-weight: 700; margin: 0; }
.form-head span { font: 10px 'DM Mono'; color: #66716b; }
.quote-form label {
  font-size: 11px;
  font-weight: 700;
  display: block;
  margin: 0 0 17px;
}
.quote-form input,
.quote-form select,
.quote-form textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  border: 1px solid #d7d9d4;
  background: #fafaf8;
  border-radius: 2px;
  padding: 12px 13px;
  color: #101d1a;
  font: 12px Manrope;
  outline-color: #91b85d;
}
.quote-form textarea { resize: vertical; }
.quote-form .button {
  border: 0;
  cursor: pointer;
  margin-top: 2px;
}
.form-success {
  display: none;
  margin: 16px 0 0 !important;
  padding: 11px 12px;
  background: #ebf8d6;
  color: #365329;
  font-size: 11px !important;
  line-height: 1.5 !important;
}
.form-success.visible { display: block; }
.form-error {
  display: none;
  margin: 16px 0 0 !important;
  padding: 11px 12px;
  background: #fff0ed;
  color: #9b3b28;
  font-size: 11px !important;
  line-height: 1.5 !important;
}
.form-error.visible { display: block; }

/* ============================================
   Technology icon chips
   ============================================ */
.tech-icon {
  font-size: 13px;
  line-height: 1;
  margin-right: 6px;
  vertical-align: -1px;
  color: #526f42;
}
.skills .tech-icon { color: #c8fa4b; }

/* ============================================
   Responsive — tablet (≤ 980px)
   ============================================ */
@media (max-width: 980px) {
  .service-page .page-header .shell {
    grid-template-columns: 1fr;
  }
  .service-visual {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
    margin-top: 36px;
  }
  .contact-hero { gap: 42px; }
  .nav nav { gap: 18px; }
}

/* ============================================
   Responsive — mobile (≤ 760px)
   ============================================ */
@media (max-width: 760px) {
  .shell { width: calc(100% - 38px); }
  .nav { height: 72px; }
  .nav-toggle { display: flex; }
  .nav nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(246, 244, 239, .97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 16px 20px 20px;
    gap: 0;
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 12px 24px rgba(16, 29, 26, .08);
  }
  .nav nav.open { display: flex; }
  .nav nav a {
    padding: 14px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--rule);
  }
  .nav nav a:last-of-type { border-bottom: none; }
  .nav nav a::after { display: none; }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 20px 0 30px;
    gap: 20px;
  }
  .hero .hero-portrait { order: -1; }
  .hero h1, .title-block h1 { letter-spacing: -1.25px; }
  .hero h1 em, .title-block h1 em { letter-spacing: -.65px; }

  .about-section { padding: 65px 0; }
  .about-content { display: block; }
  .about-toolkit { margin-top: 32px; }
  .about-top h2 { letter-spacing: -1.25px; }

  .services-preview { padding: 65px 0; }
  .services-preview .section-top { display: block; margin-bottom: 30px; }
  .services-preview .section-lede { margin-top: 18px; }
  .services-preview-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .services-preview h2 { letter-spacing: -1.25px; }

  .hero-portrait { height: auto; }
  .portrait {
    width: 100%;
    margin: 0;
    aspect-ratio: 4 / 3;
  }
  .portrait img {
    object-position: 50% 45%;
  }

  .focus {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .focus-note {
    border-top: 1px solid var(--rule);
    padding-top: 18px;
  }

  .section { padding: 80px 0; }
  .section-top, .title-block, .dark-section, .case-info { display: block; }
  .section-top { margin-bottom: 38px; }
  .section-lede { margin-top: 22px; }
  .section h2, .dark-section h2, .contact h2 { letter-spacing: -1.25px; }
  .section h2 em, .dark-section h2 em, .contact h2 em { letter-spacing: -.65px; }

  .work-grid, .service-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
  }
  .work-image { aspect-ratio: 16 / 10; }

  .dark-section {
    padding: 54px 21px;
    width: calc(100% - 20px);
  }
  .dark-section p {
    font-size: 15px;
    margin-top: 28px;
  }

  .contact { padding: 92px 0; }
  .footer p { font-size: 8px; }

  .page-header { padding: 55px 0 40px; }
  .title-block { margin-top: 35px; }
  .title-block p { margin-top: 23px; }
  .project-hero { padding: 25px 0 60px; }
  .project-hero img { max-height: none; object-fit: contain; }
  .case-info { padding: 55px 0 75px; }
  .case-body { margin-top: 44px; }
  .case-body h2 { font-size: 30px; }
  .process { padding: 75px 0; }
  .process-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .process-step { margin: 0; }
  .service-card { min-height: 230px; }

  .service-detail { padding: 72px 0; }
  .service-detail-top { display: block; margin-bottom: 35px; }
  .service-detail-top h2 { font-size: 43px; letter-spacing: -1.25px; }
  .service-detail-top > p:last-child { margin-top: 21px; }
  .service-detail-grid { grid-template-columns: 1fr; }
  .service-detail-grid article,
  .service-detail-grid article + article {
    padding: 24px 0;
    margin: 0;
    border-left: 0;
    border-bottom: 1px solid #d8d8d1;
  }
  .engagement-strip {
    width: calc(100% - 20px);
    padding: 55px 21px;
    display: block;
  }
  .engagement-strip h2 { font-size: 43px; letter-spacing: -1.25px; }
  .engagement-list { margin-top: 35px; }
  .engagement-list > div {
    grid-template-columns: 32px 1fr;
    gap: 8px;
  }
  .engagement-list p { grid-column: 2; }
  .service-detail-grid h3 { margin: 16px 0 9px; }

  .case-addendum { margin-top: 38px; }
  .case-addendum > div {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 15px 0;
  }
}

/* ============================================
   Responsive — small phone (≤ 480px)
   ============================================ */
@media (max-width: 480px) {
  .shell { width: calc(100% - 32px); }
  .nav { height: 68px; }
  .nav .nav-cta { padding: 9px 10px; }

  .hero { padding-top: 36px; }
  .hero h1, .title-block h1, .contact-hero h1 {
    font-size: 50px;
    letter-spacing: -1.25px;
  }
  .hero h1 em, .title-block h1 em, .contact-hero h1 em { letter-spacing: -.65px; }

  .portrait { width: 100%; }

  .services-preview-grid { grid-template-columns: 1fr; }

  .work-meta h3 { font-size: 20px; }

  .service-visual { gap: 7px; }
  .service-visual-card { width: 92px; padding: 12px; }
  .service-visual-card:nth-child(2) { margin-bottom: 29px; }
  .service-visual-card svg { margin-bottom: 11px; }
  .service-visual-card b { font-size: 9px; }

  .contact-hero { display: block; padding: 35px 0 65px; }
  .contact-hero > div > p:not(.eyebrow) { font-size: 14px; }
  .quote-form { padding: 23px 18px; margin-top: 39px; }

  .process-grid { grid-template-columns: 1fr; }
  .footer { gap: 10px; }
  .footer p { display: none; }

  .tech-icon { font-size: 12px; }
}

/* ============================================
   Blog listing grid
   ============================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 52px 28px;
}
.blog-card {
  border-top: 1px solid var(--rule);
  padding-top: 13px;
  transition: transform .35s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
}
.blog-card a {
  color: inherit;
  text-decoration: none;
  display: block;
}
.blog-card-meta small {
  font: 10px 'DM Mono';
  color: var(--muted);
  text-transform: uppercase;
}
.blog-card h3 {
  font-size: 22px;
  letter-spacing: -1.2px;
  margin: 6px 0 0;
}
.blog-card p {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  margin: 13px 0;
}
.blog-card .tags {
  margin-top: 10px;
}

/* ============================================
   Blog post content (rendered markdown)
   ============================================ */
.blog-post-content {
  padding: 60px 0 40px;
  max-width: 720px;
}
.blog-post-content h2 {
  font-size: 28px;
  letter-spacing: -1.2px;
  margin: 48px 0 16px;
  line-height: 1.15;
}
.blog-post-content h3 {
  font-size: 21px;
  letter-spacing: -.8px;
  margin: 36px 0 12px;
}
.blog-post-content p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.82;
  margin: 0 0 22px;
}
.blog-post-content p:first-child {
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
}
.blog-post-content ul,
.blog-post-content ol {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.82;
  margin: 0 0 22px;
  padding-left: 24px;
}
.blog-post-content li {
  margin-bottom: 8px;
}
.blog-post-content strong {
  color: var(--ink);
  font-weight: 600;
}
.blog-post-content blockquote {
  border-left: 3px solid var(--green);
  margin: 28px 0;
  padding: 4px 0 4px 20px;
}
.blog-post-content blockquote p {
  color: var(--ink);
  font-style: italic;
}
.blog-post-content code {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  background: #e7e9e5;
  padding: 2px 6px;
  border-radius: 2px;
}
.blog-post-content pre {
  background: var(--ink);
  color: #e0e6e2;
  padding: 20px 24px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 24px 0;
}
.blog-post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 12px;
  line-height: 1.7;
}
.blog-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 24px 0;
}
.blog-post-content hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 40px 0;
}
.blog-post-content a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.blog-post-content a:hover {
  color: var(--ink);
}

/* ============================================
   Blog responsive — mobile (≤ 760px)
   ============================================ */
@media (max-width: 760px) {
  .blog-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
  }
  .blog-post-content {
    padding: 40px 0 30px;
  }
  .blog-post-content h2 {
    font-size: 24px;
    margin: 36px 0 12px;
  }
}

/* ============================================
   Blog responsive — small phone (≤ 480px)
   ============================================ */
@media (max-width: 480px) {
  .blog-card h3 {
    font-size: 20px;
  }
  .blog-post-content h2 {
    font-size: 22px;
  }
}
