:root {
  color-scheme: light;
  --paper: #f7f7f0;
  --panel: #efefe6;
  --surface: #fdfdf8;
  --ink: #23251f;
  --muted: #545a4e;
  --line: #d8dbcf;
  --accent: #dce982;
  --accent-hover: #cedf6a;
  --gutter: clamp(1.25rem, 4.9vw, 4.5rem);
  --header-height: 4.25rem;
  --section-gap: clamp(4rem, 7.5vw, 7rem);
  --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.25rem);
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
}
body.case-open { overflow: hidden; }
a {
  color: inherit;
  text-decoration: none;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
img {
  display: block;
  max-width: 100%;
  height: auto;
}
h1, h2, h3, p, figure, dl, dd, blockquote { margin: 0; }
[hidden] { display: none !important; }
:focus-visible {
  outline: 3px solid #596426;
  outline-offset: 4px;
}

.wrap {
  width: min(100% - var(--gutter) * 2, 76rem);
  margin-inline: auto;
}
.section-block { padding-block: var(--section-gap); }
.mono, .placeholder {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.placeholder {
  display: inline-block;
  color: #51584a;
}
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 30;
  inset: .6rem auto auto .6rem;
  color: var(--ink);
  background: var(--accent);
  padding: .75rem 1rem;
  border-radius: .3rem;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-height);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  width: fit-content;
  font-weight: 750;
  font-size: 1rem;
  letter-spacing: -.035em;
  line-height: 1.15;
}
.brand img { flex: 0 0 auto; }
.menu-toggle {
  display: inline-flex;
  gap: .65rem;
  align-items: center;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 99rem;
  padding: .45rem .9rem;
  background: transparent;
  font-size: .83rem;
  font-weight: 650;
  cursor: pointer;
}
.menu-icon {
  position: relative;
  width: .89rem;
  height: .58rem;
  border-block: 1.5px solid currentColor;
}
.site-nav {
  display: none;
  position: absolute;
  inset: calc(100% + 1px) 0 auto;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: .6rem var(--gutter) 1.1rem;
  max-height: calc(100dvh - var(--header-height));
  overflow: auto;
}
.site-nav[data-open="true"] { display: grid; }
.site-nav > a:not(.nav-contact) {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted);
  font-size: .91rem;
  font-weight: 550;
}
.site-nav > a:not(.nav-contact):hover, .site-nav > a[aria-current="location"]:not(.nav-contact) { color: var(--ink); }
.site-nav > a[aria-current="location"]:not(.nav-contact) { font-weight: 750; }
.nav-contact {
  width: fit-content;
  margin-top: .5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  min-height: 3.25rem;
  padding: .72rem 1.27rem;
  border: 1px solid transparent;
  border-radius: 99rem;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.button > span[aria-hidden] {
  font-size: 1.11rem;
  line-height: 1;
}
.button-primary {
  color: var(--ink);
  background: var(--accent);
}
.button-primary:hover { background: var(--accent-hover); }
.button-outline {
  border-color: #aeb2a5;
  background: transparent;
}
.button-outline:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}
.button-dark {
  background: var(--ink);
  color: var(--surface);
}
.button-dark:hover { background: #3b4131; }
.text-link {
  display: inline-flex;
  gap: .58rem;
  align-items: center;
  padding: .25rem 0;
  border: 0;
  background: none;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .31em;
  text-decoration-color: #929985;
  cursor: pointer;
}
.text-link:hover { text-decoration-color: currentColor; }

.hero {
  display: grid;
  align-items: center;
  gap: 2.2rem;
  padding-block: clamp(3.1rem, 6.1vw, 5.7rem) clamp(3.2rem, 6.4vw, 5.6rem);
}
.hero-copy { min-width: 0; }
.location {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1.55rem;
  color: var(--muted);
}
.location-dot {
  display: block;
  width: .53rem;
  height: .53rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #7f8e45;
}
.hero-placeholder { margin-bottom: .5rem; }
.hero h1 {
  font-size: clamp(3.2rem, 12vw, 6.6rem);
  font-weight: 770;
  line-height: .96;
  letter-spacing: -.085em;
  overflow-wrap: anywhere;
}
.hero-specialty {
  margin-top: .95rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.8rem, 4.7vw, 3.06rem);
  line-height: 1.08;
  font-style: italic;
  letter-spacing: -.065em;
  color: #454c35;
}
.hero-description {
  max-width: 31rem;
  color: var(--muted);
  font-size: 1rem;
  margin-top: 1.4rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .64rem;
  margin-top: 1.75rem;
}
.hero-portrait {
  position: relative;
  min-width: 0;
  aspect-ratio: 1.08;
  isolation: isolate;
  overflow: hidden;
  border-radius: .55rem;
  background: #c3c1b8;
}
.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 37%;
}
.image-label {
  position: absolute;
  inset: auto auto 1rem 1rem;
  color: var(--ink);
  background: var(--accent);
  padding: .43rem .66rem;
  border-radius: .22rem;
  line-height: 1.3;
}

h2 {
  font-size: clamp(2.42rem, 6vw, 4.3rem);
  font-weight: 740;
  line-height: 1.04;
  letter-spacing: -.073em;
  overflow-wrap: anywhere;
}
h3 {
  font-weight: 720;
  letter-spacing: -.04em;
  line-height: 1.2;
}
.about, .services, .experience {
  display: grid;
  gap: 1.9rem;
  border-top: 1px solid var(--line);
}
.section-heading .text-link { margin-top: 1.1rem; }
.cv-hint {
  display: block;
  margin-top: .3rem;
}
.about-content > p {
  color: var(--muted);
  max-width: 42rem;
  margin-top: .7rem;
}
.about-content > .about-lead {
  color: var(--ink);
  font-size: clamp(1.15rem, 2.5vw, 1.43rem);
  font-weight: 510;
  line-height: 1.52;
  letter-spacing: -.024em;
}
.about-facts {
  display: grid;
  gap: .95rem 1.2rem;
  margin-top: 1.6rem;
}
.about-facts > div {
  padding-top: .8rem;
  border-top: 1px solid var(--line);
}
.about-facts dt, .contact-details dt {
  font-size: .84rem;
  font-weight: 730;
}
.about-facts dd {
  font-size: .88rem;
  color: var(--muted);
  margin-top: .2rem;
}

.work-section { background: var(--panel); }
.work-heading {
  display: grid;
  gap: .8rem 2rem;
  align-items: end;
}
.work-heading p {
  color: var(--muted);
  max-width: 23rem;
  line-height: 1.5;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.65rem 0 1.55rem;
}
.filter-button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .37rem .88rem;
  border: 1px solid #bec3b4;
  border-radius: 99rem;
  background: transparent;
  font-size: .84rem;
  font-weight: 640;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.filter-button:hover {
  background: var(--surface);
  border-color: #828b73;
}
.filter-button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}
.project-grid, .service-list, .timeline, .testimonial-grid {
  list-style: none;
  padding: 0;
  margin: 0;
}
.project-grid {
  display: grid;
  gap: 1.7rem 1.3rem;
}
.project-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
  border-radius: .47rem;
}
.project-thumb {
  display: block;
  position: relative;
  aspect-ratio: 3 / 2;
  isolation: isolate;
  overflow: hidden;
  border-radius: .47rem;
  background: #dce0d3;
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .42s cubic-bezier(.23,.66,.32,1);
}
.project-card:hover img { transform: scale(1.04); }
.project-thumb .image-label {
  inset: .7rem auto auto .7rem;
  font-size: .64rem;
  background: var(--surface);
}
.project-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .15rem 1rem;
  align-items: center;
  padding: .85rem 0 .9rem;
  border-bottom: 1px solid #ccd0c3;
}
.project-title {
  grid-column: 1;
  color: var(--ink);
  font-size: clamp(1.27rem, 2.3vw, 1.59rem);
  line-height: 1.18;
  font-weight: 735;
  letter-spacing: -.044em;
}
.project-category {
  grid-column: 1;
  color: #53594e;
  font-size: .8rem;
}
.project-arrow {
  grid-column: 2;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid #adb3a3;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.project-card:hover .project-arrow {
  color: var(--surface);
  background: var(--ink);
  border-color: var(--ink);
}

.services { border-top: 0; }
.desktop-break { display: none; }
.services-content {
  display: grid;
  gap: 1.6rem;
}
.service-offerings > .placeholder, .skills-panel > .placeholder { margin-bottom: .6rem; }
.service-list li {
  padding-block: .92rem;
  border-top: 1px solid var(--line);
}
.service-list h3 { font-size: 1.12rem; }
.service-list p {
  margin-top: .34rem;
  color: var(--muted);
  font-size: .93rem;
  line-height: 1.5;
}
.skills-panel {
  background: var(--panel);
  border-radius: .5rem;
  padding: clamp(1.15rem, 2.9vw, 1.85rem);
}
.skills-list > div + div { margin-top: .84rem; }
.skills-list dt {
  font-weight: 730;
  font-size: .92rem;
}
.skills-list dd {
  margin-top: .25rem;
  color: var(--muted);
  font-size: .88rem;
}

.timeline {
  position: relative;
  align-self: start;
}
.timeline-entry {
  position: relative;
  display: grid;
  gap: .4rem 1rem;
  padding: 0 0 1.5rem 1.4rem;
  border-left: 1px solid #aab29d;
}
.timeline-entry:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}
.timeline-entry::before {
  content: '';
  position: absolute;
  top: .18rem;
  left: -.37rem;
  width: .68rem;
  height: .68rem;
  border: 1px solid #5c673e;
  border-radius: 50%;
  background: var(--accent);
}
.timeline-entry h3 {
  font-size: 1.18rem;
  margin-top: .32rem;
}
.timeline-date {
  font-size: .82rem;
  color: var(--muted);
  font-weight: 660;
  line-height: 1.4;
}
.timeline-entry .timeline-organization {
  color: var(--ink);
  font-size: .86rem;
  font-weight: 560;
  margin-top: .13rem;
}
.timeline-entry .timeline-outcome {
  color: var(--muted);
  font-size: .89rem;
  margin-top: .28rem;
}

.testimonials { background: var(--panel); }
.testimonial-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.65rem;
}
.testimonial-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .95rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .5rem;
  padding: clamp(1.2rem, 3vw, 2rem);
}
.testimonial-card blockquote {
  flex: 1;
  font-size: clamp(1.05rem, 2.1vw, 1.36rem);
  letter-spacing: -.024em;
  line-height: 1.46;
}
.testimonial-card figcaption {
  font-size: .83rem;
  line-height: 1.55;
  color: var(--muted);
}
.testimonial-card strong {
  display: block;
  color: var(--ink);
  font-weight: 720;
}

.contact { background: var(--accent); }
.contact-layout {
  display: grid;
  justify-content: stretch;
  align-items: start;
  gap: 2rem clamp(2rem, 7vw, 6rem);
}
.contact-intro h2 {
  font-size: clamp(3.15rem, 7.8vw, 5.85rem);
  line-height: .94;
}
.contact-intro > p {
  max-width: 26rem;
  margin-top: 1.05rem;
  font-size: clamp(1rem, 2.7vw, 1.19rem);
}
.contact-intro > .response-line {
  margin-top: .58rem;
  font-size: .87rem;
  color: #444c31;
}
.contact-details {
  display: grid;
  gap: .8rem 1rem;
  margin-block: 1.35rem 1rem;
}
.contact-details > div {
  border-top: 1px solid #a9b76a;
  padding-top: .55rem;
}
.contact-details dd {
  font-size: .91rem;
  overflow-wrap: anywhere;
}
.contact-details a, .social-links a {
  text-decoration: underline;
  text-underline-offset: .26em;
}
.button-whatsapp {
  border: 1px solid #596242;
  margin-top: .35rem;
}
.button-whatsapp:not(a) {
  cursor: default;
  color: #3d4631;
}
a.button-whatsapp:hover {
  background: var(--ink);
  color: var(--surface);
}
.social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem 1rem;
  font-size: .84rem;
}
.contact-intro .social-links { margin-top: 1.2rem; }
.social-links .social-placeholder {
  display: inline-flex;
  gap: .3rem;
  align-items: baseline;
}
.social-links .placeholder { font-size: .62rem; }
.contact-form {
  padding: clamp(1.2rem, 3.4vw, 2rem);
  background: var(--surface);
  border: 1px solid #bdcb72;
  border-radius: .58rem;
}
.contact-form h3 { font-size: 1.55rem; }
#form-note {
  font-size: .84rem;
  color: var(--muted);
  margin: .45rem 0 1.15rem;
}
.form-field {
  display: grid;
  gap: .26rem;
  margin-bottom: .79rem;
}
.form-field label, .draft-preview label {
  color: var(--ink);
  font-size: .88rem;
  font-weight: 710;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: .55rem .75rem;
  border: 1px solid #a8afa0;
  border-radius: .32rem;
  color: var(--ink);
  background: #fff;
  font-size: 1rem;
}
.contact-form input::placeholder, .contact-form textarea::placeholder {
  color: #64695d;
  opacity: 1;
}
.contact-form textarea {
  display: block;
  min-height: 6rem;
  resize: vertical;
}
.form-status:not(:empty) {
  margin-top: .8rem;
  font-size: .86rem;
  color: #3d4927;
}
.draft-preview {
  display: grid;
  gap: .35rem;
  margin-top: .9rem;
}
.draft-preview .text-link { justify-self: start; }

.site-footer {
  background: var(--ink);
  color: var(--surface);
}
.footer-inner {
  display: grid;
  align-items: center;
  justify-items: start;
  gap: 1rem 2rem;
  padding-block: 1.65rem;
}
.footer-brand p {
  color: #d1d5c5;
  font-size: .76rem;
  margin-top: .3rem;
}
.site-footer .placeholder { color: #d1d5c5; }
.site-footer :focus-visible { outline-color: var(--accent); }
.back-top { white-space: nowrap; }

.case-dialog {
  max-width: 57rem;
  width: calc(100% - 1rem);
  max-height: 92vh;
  max-height: 92dvh;
  border: 1px solid var(--line);
  border-radius: .64rem;
  color: var(--ink);
  background: var(--surface);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.case-dialog::backdrop { background: rgb(25 28 21 / .7); }
.dialog-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  position: sticky;
  z-index: 1;
  top: 0;
  padding: .55rem clamp(1rem, 4vw, 2.35rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.close-dialog {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 2.75rem;
  padding: .22rem .8rem;
  border: 1px solid var(--line);
  border-radius: 99rem;
  background: transparent;
  font-size: .83rem;
  font-weight: 680;
  cursor: pointer;
}
.close-dialog:hover { background: var(--panel); }
.close-dialog span[aria-hidden] {
  font-size: 1.45rem;
  line-height: 1;
}
.case-content { padding: clamp(1rem, 4vw, 2.35rem); }
.case-content h2 { margin-top: .25rem; }
.case-subtitle {
  margin-top: .4rem;
  color: var(--muted);
}
.case-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin: 1.15rem 0;
  padding-block: .9rem;
  border-block: 1px solid var(--line);
}
.case-facts dt {
  font-weight: 720;
  font-size: .8rem;
}
.case-facts dd {
  color: var(--muted);
  font-size: .86rem;
}
.case-copy, .case-gallery {
  display: grid;
  gap: 1rem;
}
.case-copy h3, .case-gallery-title { font-size: 1.12rem; }
.case-copy p {
  margin-top: .3rem;
  color: var(--muted);
  font-size: .91rem;
}
.case-gallery-title { margin-block: 1.4rem .62rem; }
.case-gallery img {
  width: 100%;
  border-radius: .4rem;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.case-gallery figcaption {
  margin-top: .3rem;
  font-size: .76rem;
  color: var(--muted);
}

.error-layout {
  min-height: 100svh;
  max-width: 45rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-block: 3rem;
}
.error-code {
  margin-top: 1.75rem;
  font-size: clamp(6rem, 26vw, 13rem);
  font-weight: 770;
  line-height: .96;
  letter-spacing: -.09em;
}
.error-code span { color: #788541; }
.error-layout h1 {
  margin-top: .75rem;
  font-size: clamp(1.8rem, 5vw, 3rem);
  letter-spacing: -.06em;
  line-height: 1.08;
}
.error-layout h1 + p {
  max-width: 29rem;
  color: var(--muted);
  margin-top: .85rem;
}

.reveal-pending {
  opacity: 0;
  transform: translateY(.75rem);
}
.reveal-pending:focus-within, .reveal-pending:target {
  opacity: 1;
  transform: none;
}
.revealed { transition: opacity .5s ease, transform .5s ease; }

@media (min-width: 39rem) {
  .project-grid, .testimonial-grid, .about-facts, .contact-details, .case-gallery, .case-copy { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: auto 1fr; }
  .back-top {
    grid-column: 2;
    justify-self: end;
  }
}

@media (min-width: 49rem) {
  :root { --header-height: 4.6rem; }
  .hero {
    grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
    gap: clamp(2rem, 4.65vw, 4.15rem);
  }
  .hero h1 { font-size: clamp(4.15rem, 8.05vw, 7rem); }
  .hero-specialty { font-size: clamp(1.9rem, 3.42vw, 3.25rem); }
  .hero-portrait { aspect-ratio: .99; }
  .about, .services, .experience {
    grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
    gap: clamp(2rem, 5vw, 5rem);
  }
  .section-heading .text-link { margin-top: 1.4rem; }
  .work-heading { grid-template-columns: minmax(0, 1fr) auto; }
  .work-heading p { padding-bottom: .3rem; }
  .timeline-entry {
    grid-template-columns: minmax(6.2rem, .3fr) minmax(0, 1fr);
    padding-bottom: 1.75rem;
  }
  .contact-layout { grid-template-columns: minmax(0, 1fr) minmax(0, .94fr); }
  .footer-inner { grid-template-columns: auto 1fr auto; }
  .footer-inner .social-links { justify-self: center; }
  .back-top { grid-column: auto; }
}

@media (min-width: 65rem) {
  .menu-toggle { display: none; }
  .site-nav, .site-nav[data-open="true"] {
    display: flex;
    gap: clamp(.9rem, 1.8vw, 1.65rem);
    align-items: center;
    position: static;
    padding: 0;
    border: 0;
    overflow: visible;
  }
  .site-nav > a:not(.nav-contact) {
    position: relative;
    font-size: .84rem;
  }
  .site-nav > a[aria-current="location"]:not(.nav-contact)::after {
    content: '';
    position: absolute;
    inset: auto 0 .34rem;
    height: 1px;
    background: #76814e;
  }
  .nav-contact {
    margin-top: 0;
    margin-left: .35rem;
    min-height: 2.75rem;
    font-size: .84rem;
    padding-inline: .98rem;
  }
  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.05rem 1.4rem;
  }
  .desktop-break { display: initial; }
  .contact-details { max-width: 33rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .reveal-pending {
    opacity: 1;
    transform: none;
  }
  .project-card:hover img { transform: none; }
}
