.home-hero {
  padding-block: clamp(3.3rem, 6.5vw, 7rem) clamp(3.6rem, 8vw, 8rem);
  border-block-end: 1px solid var(--line);
  background: var(--surface-warm);
}

.home-hero-layout {
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 5vw, 5.4rem);
}

.home-hero-copy { container-type: inline-size; }

.home-hero h1 {
  margin-block-start: .17em;
  font: 900 clamp(3.5rem, 8.1vw, 8.7rem) / .87 var(--display, 'Arial Narrow', sans-serif);
  font-size: clamp(3.5rem, 22cqi, 8.7rem);
  letter-spacing: -.035em;
  text-transform: uppercase;
}

.home-name-line {
  display: block;
  overflow: clip;
  margin: -.045em -.03em -.095em;
  padding: .045em .03em .095em;
  white-space: nowrap;
}

.home-name-line > span { display: inline-block; }
.home-surname { color: var(--accent); }

.home-hero .hero-intro {
  max-width: 30rem;
  margin-block-start: clamp(1.15rem, 2vw, 1.65rem);
  line-height: 1.55;
}

.home-hero .hero-actions { margin-block-start: 1.35rem; }
.home-hero .hero-location { margin-block-start: 1.25rem; }

.home-hero .home-remote::before {
  inline-size: .25rem;
  block-size: .25rem;
  margin-inline-end: .18rem;
  border-radius: 50%;
  background: currentColor;
  content: '';
}

.home-poster { margin-inline: 0 .5rem; isolation: isolate; }

.home-poster::before {
  position: absolute;
  z-index: -1;
  inset: .5rem -.45rem -.5rem .5rem;
  border: 1px solid var(--accent);
  background: var(--accent-mid);
  transform: rotate(2.1deg);
  content: '';
}

.home-poster-mat {
  border: 1px solid var(--ink);
  background: var(--surface-warm-strong);
}

.home-poster-animation {
  position: absolute;
  inset: 1px;
  overflow: hidden;
  pointer-events: none;
}

.home-poster-animation img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-poster-mat > img,
.home-poster-animation > img { filter: var(--artwork-tone); }

.home-poster-controls {
  position: absolute;
  z-index: 1;
  inset: auto calc(clamp(4rem, 9vw, 8.25rem) + .6rem) .65rem .65rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.home-poster-toggle, .home-poster-loading {
  border: 1px solid var(--accent-hover);
  border-radius: 999px;
  background: var(--white);
  color: var(--accent-hover);
  box-shadow: 1px 2px 0 rgb(43 33 24 / .18);
}

.home-poster-toggle {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.home-poster-toggle:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--accent-hover);
}

.home-poster-toggle-icon {
  display: block;
  width: .66rem;
  height: .78rem;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: translateX(.05rem);
}

.home-poster-toggle[data-playing] .home-poster-toggle-icon {
  width: .65rem;
  border-inline: .17rem solid currentColor;
  background: none;
  clip-path: none;
  transform: none;
}

.home-poster-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 2.15rem;
  height: 1.6rem;
}

.home-poster-loading i {
  width: 2px;
  height: .66rem;
  border-radius: 2px;
  background: currentColor;
}

.home-poster-loading i:first-child,
.home-poster-loading i:last-child { height: .42rem; }

.home-poster-status {
  max-width: 13rem;
  padding: .38rem .56rem;
  border: 1px solid var(--accent-hover);
  border-radius: .48rem;
  background: var(--white);
  color: var(--accent-hover);
  font-size: .76rem;
  font-weight: 750;
  line-height: 1.28;
}

.home-poster-status:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .home-poster-toggle:hover { background: var(--accent-hover); color: var(--white); }
}

@media (prefers-reduced-motion: no-preference) {
  .home-poster-animation:not([hidden]) { animation: home-poster-art-reveal 180ms ease-out both; }
  .home-poster-loading i { animation: home-poster-signal .66s ease-in-out infinite alternate; }
  .home-poster-loading i:nth-child(2) { animation-delay: -.27s; }
  .home-poster-loading i:last-child { animation-delay: -.46s; }
}

@keyframes home-poster-art-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes home-poster-signal {
  from { transform: scaleY(.48); }
  to { transform: scaleY(1); }
}

.home-poster-portrait {
  position: absolute;
  inset: auto -.35rem clamp(-1.6rem, -2vw, -.8rem) auto;
  width: clamp(4rem, 9vw, 8.25rem);
  height: auto;
  aspect-ratio: 1;
  border: clamp(3px, .5vw, 6px) solid var(--white);
  background: var(--white);
  object-fit: cover;
  box-shadow: 1px 3px 0 rgb(43 33 24 / .22);
  transform: rotate(6deg);
}

.home-section {
  margin-block-start: clamp(3.6rem, 8vw, 8.5rem);
}

.home-hero + .home-section { margin-block-start: clamp(1.7rem, 4vw, 4rem); }

.home-section-head {
  gap: 1rem 2.5rem;
  margin-block-end: clamp(1.45rem, 3.35vw, 3.1rem);
  padding-block-start: clamp(1.1rem, 2.45vw, 2.3rem);
  border-block-start: 1px solid var(--line);
}

.home-section-head > .inline-link { flex: none; }

.home-section-head h2,
.home-profile h2,
.home-lab h2,
#taxonomy .demo-header h2,
#contact .contact-panel h2 {
  font: 900 clamp(3.1rem, 7.5vw, 7.15rem) / .92 var(--display, 'Arial Narrow', sans-serif);
  letter-spacing: -.03em;
  text-transform: uppercase;
}

.home-section-head h2 em,
.home-profile h2 em,
.home-lab h2 em,
#taxonomy .demo-header h2 em,
#contact .contact-panel h2 em {
  color: var(--accent);
  font: inherit;
  letter-spacing: inherit;
}

.home-section-head p:not(.eyebrow) {
  max-width: 37rem;
  margin-block-start: .65rem;
  color: var(--muted);
}

.home-work-grid {
  gap: clamp(.95rem, 2vw, 1.55rem);
}

.home-case {
  border-block-end: 1px solid var(--line);
  background: var(--white);
}

.home-case-image,
.home-post-image {
  background: var(--surface-tint);
}

.home-case-content { padding: clamp(1rem, 2.55vw, 2.05rem); }

.home-case-content .eyebrow {
  margin-block-end: .6rem;
  color: var(--accent);
}

.home-case h3,
.home-post h3 {
  font-size: clamp(1.3rem, 2.3vw, 1.9rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.048em;
}

.home-case-lead h3 { font-size: clamp(1.65rem, 3.3vw, 2.85rem); }

.home-case h3 a,
.home-post h3 a {
  text-decoration-color: var(--accent-mid);
  text-underline-offset: .19em;
  text-decoration-thickness: 1px;
}

.home-case h3 a::after,
.home-post h3 a::after {
  position: absolute;
  inset: 0;
  content: '';
}

.home-case h3 a:hover,
.home-post h3 a:hover {
  color: var(--accent-hover);
  text-decoration-color: currentColor;
}

.home-case h3 a:focus-visible,
.home-post h3 a:focus-visible { outline: none; }

.home-case:has(h3 a:focus-visible),
.home-post:has(h3 a:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.home-case-content p:not(.eyebrow),
.home-post-copy p {
  margin-block-start: .6rem;
  color: var(--muted);
}

.home-lab-section {
  border-block: 1px solid var(--line);
  background: var(--surface-warm-strong);
}

.home-lab {
  gap: clamp(1.75rem, 5vw, 5rem);
  padding-block: clamp(2.75rem, 6.5vw, 6.35rem);
}

.home-lab h2 {
  max-width: 14ch;
  margin-block-start: .11em;
  font-size: clamp(2.95rem, 6.1vw, 6rem);
}

.home-lab .eyebrow { color: var(--accent-hover); }

.home-lab p:not(.eyebrow) {
  max-width: 32rem;
  margin-block-start: .85rem;
  color: var(--muted);
}

.home-lab .button {
  margin-block-start: 1.15rem;
  white-space: normal;
}

.home-lab-image {
  border: 1px solid var(--accent);
  background: var(--surface-tint);
  box-shadow: clamp(.22rem, .6vw, .5rem) clamp(.22rem, .6vw, .5rem) 0 var(--accent);
}

.home-profile {
  gap: clamp(1.55rem, 5.5vw, 5.75rem);
  padding-block-start: clamp(1.65rem, 3.5vw, 3rem);
  border-block-start: 1px solid var(--line);
}

.home-profile-copy > p:not(.eyebrow) {
  max-width: 38rem;
  margin-block-start: .9rem;
  color: var(--muted);
}

.home-profile-links {
  gap: .25rem 1.25rem;
  margin-block-start: 1.1rem;
}

.home-profile-facts {
  border-block: 1px solid var(--ink);
}

.home-profile-facts > div {
  display: grid;
  grid-template-columns: minmax(5rem, .64fr) minmax(0, 1.36fr);
  align-items: baseline;
  gap: .4rem 1rem;
  padding-block: clamp(.92rem, 1.7vw, 1.35rem);
}

.home-profile-facts > div + div { border-block-start: 1px solid var(--line); }

.home-profile-facts dt {
  color: var(--accent);
  font-size: .85rem;
  font-weight: 750;
  line-height: 1.4;
}

.home-profile-facts dd {
  font-weight: 750;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.home-profile-facts dd > span {
  display: block;
  margin-block-start: .35rem;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 550;
  line-height: 1.5;
}

.home-profile-facts dd > .inline-link { margin-block-start: .2rem; }

.home-writing-grid {
  gap: clamp(1rem, 2.55vw, 2.2rem);
}

.home-post-image {
  border: 1px solid var(--line);
}

.home-post-copy { padding-block-start: .9rem; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .home-case-image img,
  .home-post-image img { transition: transform 350ms var(--ease); }

  .home-case:has(h3 a:hover) .home-case-image img,
  .home-post:has(h3 a:hover) .home-post-image img { transform: scale(1.035); }
}

@media (min-width: 990px) {
  .home-work-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    grid-template-rows: repeat(2, minmax(auto, 1fr));
  }

  .home-case-lead { grid-row: span 2; }

  .home-case:not(.home-case-lead) {
    display: grid;
    grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
    align-items: center;
    gap: clamp(.85rem, 1.6vw, 1.25rem);
    padding: clamp(.9rem, 1.65vw, 1.5rem);
  }

  .home-case:not(.home-case-lead) .home-case-content { padding: 0; }
}

@media (min-width: 641px) and (max-width: 989px) {
  .home-case-lead {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
  }
}

@media (max-width: 480px) {
  .home-writing-grid { row-gap: 1.6rem; }
}

@media (max-width: 810px) {
  .home-hero-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.9rem, 6.5vw, 3.4rem);
  }

  .home-hero h1 {
    font-size: clamp(3.5rem, 14vw, 7.65rem);
    font-size: clamp(3.5rem, 22cqi, 7.65rem);
  }

  .home-poster { max-width: 40rem; }
}

@media (max-width: 520px) {
  .home-profile-facts > div { grid-template-columns: minmax(0, 1fr); }
  .home-lab-image { width: calc(100% - .45rem); }
}

#taxonomy {
  margin-block-start: clamp(3.6rem, 8vw, 8.5rem);
  border-color: var(--line);
  background: var(--surface-tint);
}

#taxonomy .demo-header > .eyebrow {
  margin: 0 0 .65rem;
  color: var(--accent);
}

#contact { margin-block-start: clamp(2.75rem, 7vw, 6.5rem); }

#contact .contact-panel {
  border: 0;
  border-radius: 0;
  background: var(--accent-hover);
  color: var(--white);
}

#contact .contact-panel h2 em { color: var(--surface-warm-strong); }

#contact .contact-panel > div:first-child p,
#contact .availability { color: var(--white); }

#contact .contact-panel > div:first-child p { max-width: 35rem; }
#contact .availability .location-dot { background: var(--surface-warm-strong); }

#contact .button-primary {
  background: var(--white);
  color: var(--accent-hover);
}

#contact .button-whatsapp {
  border-color: var(--white);
  background: transparent;
  color: var(--white);
}

#contact .button-primary:hover { background: var(--surface-warm); }
#contact .button-whatsapp:hover { background: rgb(255 255 255 / .12); }
#contact .button:focus-visible { outline-color: var(--surface-warm-strong); }

@media (max-width: 720px) {
  #contact .contact-panel { align-items: start; flex-direction: column; }
}
