/* Hallmark: Pátio Oblíquo, architectural drawing sheets and pigment red. */
/* Critique: the facade has room to carry the composition, with a functional index below. */

@font-face {
  font-family: Fahkwang;
  src: url("fahkwang.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url("/assets/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --paper: #e5e8e2;
  --ink: #202b28;
  --muted: #45534f;
  --line: #88918c;
  --wash: #c7d3c9;
  --bright: #ff7750;
  --tint: #702c1c;
  --dialog: #202b28aa;
  --display: Fahkwang, Manrope, sans-serif;
  --body: Manrope, system-ui, sans-serif;
  --gutter: clamp(1.2rem,4.85vw,5.2rem);
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
body, h1, h2, p, figure { margin: 0; }
body { font-size: 1rem; line-height: 1.58; }
a { color: inherit; text-underline-offset: .26em; }
button { color: inherit; font: inherit; cursor: pointer; }
img { display: block; width: 100%; height: auto; }
h1, h2 { min-width: 0; overflow-wrap: break-word; font: 600 1em/.98 var(--display); }
[hidden] { display: none !important; }
:focus-visible { outline: .16rem solid var(--tint); outline-offset: .3rem; }
::selection { color: var(--ink); background: var(--bright); }
.wrap { width: min(calc(100% - var(--gutter) * 2), 92rem); margin-inline: auto; }
.skip { position: absolute; top: .5rem; left: 1rem; z-index: 5; padding: .6rem; background: var(--bright); transform: translateY(-160%); }
.skip:focus { transform: none; }

.mast { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5rem; border-bottom: 1px solid var(--ink); }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: inherit; text-decoration: none; white-space: nowrap; font: 600 clamp(1.25rem, 2.8vw, 2rem)/1 var(--display); letter-spacing: -.055em; }
.patio-mark { display: inline-block; flex: none; width: 1.6rem; height: 1.6rem; background: var(--tint); clip-path: polygon(0 34%, 61% 0, 100% 0, 100% 20%, 66% 20%, 20% 46%, 20% 100%, 0 100%); }
.mast nav { display: flex; gap: clamp(.75rem,4vw,3.5rem); }
.mast nav a { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .9rem; font-weight: 740; }
.mast nav a:hover { color: var(--tint); }

.drawing-hero { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); grid-template-rows: auto; padding-block: clamp(1.7rem,4.6vw,5rem) clamp(3.4rem,8.5vw,9.25rem); }
.plan-photo { grid-column: 4 / -1; grid-row: 1; min-width: 0; }
.plan-photo img { aspect-ratio: 1.64; object-fit: cover; object-position: center 45%; }
.plan-photo figcaption { padding-top: .5rem; border-top: 1px solid var(--ink); color: var(--muted); font-size: .81rem; text-align: end; }
.thesis { grid-column: 1 / 7; grid-row: 1; z-index: 1; align-self: end; background: var(--paper); padding: clamp(1rem,3.4vw,3.25rem) clamp(1rem,2.65vw,3rem) 0 0; }
.thesis::before { content: ""; display: block; width: clamp(4rem, 11.5vw, 12rem); height: .43rem; background: var(--bright); margin-bottom: clamp(.85rem,2.1vw,2.1rem); }
.thesis h1 { max-width: 9.6ch; font-size: clamp(3.3rem,7vw,7.5rem); letter-spacing: -.07em; line-height: .98; }
.thesis p { max-width: 31ch; margin-top: 1.05rem; color: var(--muted); }
.thesis a, .approach a { display: inline-flex; align-items: center; width: fit-content; min-height: 3rem; margin-top: 1.05rem; font-weight: 820; color: var(--ink); background: var(--bright); padding: .56rem .85rem; text-decoration: none; }
.thesis a:hover, .approach a:hover { text-decoration: underline; }

.work { padding-block: clamp(2.1rem,5vw,5rem) clamp(2.5rem,7.5vw,7.5rem); border-top: .12rem solid var(--ink); }
.work-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .9rem 1.2rem; align-items: baseline; }
.work h2, .approach h2 { font-size: clamp(2.8rem, 5.8vw, 6rem); letter-spacing: -.06em; }
.filters { display: flex; gap: clamp(.65rem, 2vw, 2rem); }
.filters button, footer button { border: 0; background: transparent; min-height: 2.75rem; padding: .4rem 0; font-size: .91rem; font-weight: 760; }
.filters button[aria-pressed="true"], .filters button:hover, footer button { text-decoration: underline; text-underline-offset: .3em; }
.filters button[aria-pressed="true"] { color: var(--tint); text-decoration-thickness: .15em; }
.count, .reference-note { color: var(--muted); font-size: .85rem; margin-top: .8rem; }
.project-grid { display: grid; grid-template-columns: minmax(0,1.23fr) minmax(0,.82fr) minmax(0,.95fr); gap: clamp(.85rem,2.75vw,2.65rem); align-items: start; margin-top: 1.25rem; }
.project-grid.filtered { grid-template-columns: repeat(2,minmax(0,1fr)); }
.project { display: block; text-align: left; padding: 0; border: 0; background: none; }
.project-image { display: block; overflow: clip; background: var(--wash); }
.project img { aspect-ratio: 1.06; object-fit: cover; transition: transform .28s ease-out; }
.project:nth-child(2) img { aspect-ratio: .82; }
.project:nth-child(3) img { aspect-ratio: 1.15; }
.project:hover img { transform: scale(1.035); }
.project-caption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem .7rem; padding-top: .6rem; border-top: 1px solid var(--ink); }
.project-caption strong { font: 600 clamp(1.3rem,2.25vw,2.15rem)/1.15 var(--display); letter-spacing: -.04em; }
.project-caption > span { color: var(--muted); font-size: .76rem; }
.reference-note { margin-top: 1.35rem; }
.approach { background: var(--wash); }
.approach-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); align-items: end; gap: 1.4rem clamp(1.4rem,7vw,7rem); padding-block: clamp(2.4rem,7.6vw,8rem); }
.approach h2 { max-width: 12ch; }
.approach p + p { margin-top: 1em; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.05rem; padding-block: 1.8rem; }

dialog { max-width: min(calc(100% - 1.5rem),48rem); max-height: 88dvh; border: 1px solid var(--ink); padding: 0; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: var(--dialog); }
dialog img { width: 100%; max-height: min(52dvh,42rem); object-fit: contain; background: var(--wash); }
dialog img:not([src]) { display: none; }
.dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 3.25rem; border-bottom: 1px solid var(--ink); padding-inline: .9rem; font-weight: 750; }
.dialog-close { min-height: 2.75rem; padding-inline: .35rem; border: 0; background: transparent; text-decoration: underline; text-underline-offset: .25em; }
.dialog-text { display: grid; gap: .7rem; padding: 1.25rem; }
.dialog-text h2 { font-size: clamp(1.95rem,4.4vw,3.2rem); }
.modal-open { overflow-y: hidden; }

@media (max-width: 790px) {
  .plan-photo { grid-column: 3/-1; }
  .thesis { grid-column: 1/8; }
  .project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 570px) {
  .mast { min-height: 4.25rem; }
  .mast nav a { font-size: .78rem; }
  .drawing-hero { display: flex; flex-direction: column; gap: 1.25rem; }
  .thesis { order: -1; align-self: stretch; padding: 0; }
  .thesis h1 { font-size: clamp(3.05rem, 13.8vw, 5rem); max-width: 10ch; }
  .thesis a { margin-top: .65rem; }
  .plan-photo img { aspect-ratio: 1.43; }
  .project-grid, .project-grid.filtered, .approach-grid { grid-template-columns: minmax(0,1fr); }
  .project img, .project:nth-child(2) img, .project:nth-child(3) img { aspect-ratio: 1.4; }
}
@media (prefers-reduced-motion: reduce) {
  .project img { transition: none; }
  .project:hover img { transform: none; }
}

