:root {
  --bg: #efe7d8;
  --bg-2: #e7ddcc;
  --paper: #f6f1e6;
  --ink: #161310;
  --ink-soft: #3d3830;
  --muted: #6f675c;
  --line: rgba(22, 19, 16, 0.14);
  --line-strong: rgba(22, 19, 16, 0.28);
  --brass: #8a6a3c;
  --brass-deep: #6e522c;
  --dark: #12100e;
  --dark-2: #1c1915;
  --cream: #f3eadb;
  --max: 1280px;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --header: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--bg);
  font-family: Outfit, system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.02rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--paper);
  padding: 0.5rem 0.8rem;
}

.ar {
  font-family: Amiri, "Noto Naskh Arabic", serif;
  direction: rtl;
  letter-spacing: 0;
  line-height: 1.7;
}

.ar-name {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  margin-top: 0.45rem;
  color: var(--ink-soft);
  text-align: left;
  unicode-bidi: isolate;
}

.hero .ar-name {
  color: color-mix(in srgb, var(--cream) 88%, transparent);
  font-size: 1.35rem;
}

.formation-list {
  margin-top: 1.6rem;
  display: grid;
  gap: 0.85rem;
}

.formation-list li {
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.formation-list b {
  display: block;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.whatsapp {
  display: block;
  margin-top: 0.35rem;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-deep);
}

.serif {
  font-family: "Cormorant Garamond", Georgia, serif;
}

.muted {
  color: var(--muted);
}

.wrap {
  width: min(var(--max), calc(100% - var(--pad) * 2));
  margin-inline: auto;
}

.split {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 880px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 4.5rem;
    align-items: start;
  }
}

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
}

.header-inner {
  width: min(var(--max), calc(100% - var(--pad) * 2));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.brand strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1;
}

.brand span {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: none;
  align-items: center;
  gap: 1.6rem;
}

.nav a {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav a[aria-current="page"],
.nav a:hover {
  color: var(--brass-deep);
}

.nav-cta {
  border: 1px solid var(--ink);
  padding: 0.55rem 0.9rem;
}

.nav-cta:hover {
  background: var(--ink);
  color: var(--cream);
}

.menu-btn {
  display: inline-flex;
  width: 2.6rem;
  height: 2.6rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
}

.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  display: block;
  width: 1.05rem;
  height: 1px;
  background: var(--ink);
  position: relative;
}

.menu-btn span::before,
.menu-btn span::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-btn span::before {
  top: -5px;
}

.menu-btn span::after {
  top: 5px;
}

@media (min-width: 920px) {
  .nav {
    display: flex;
  }

  .menu-btn {
    display: none;
  }
}

.mobile-nav {
  display: none;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  padding: 1rem var(--pad) 1.4rem;
}

.mobile-nav.is-open {
  display: grid;
  gap: 0.85rem;
  position: fixed;
  top: var(--header);
  left: 0;
  right: 0;
  z-index: 39;
}

.mobile-nav a {
  font-size: 1.15rem;
  font-family: "Cormorant Garamond", Georgia, serif;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header));
  display: grid;
  color: var(--cream);
  overflow: hidden;
  background: var(--dark);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.05);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 16, 14, 0.28) 0%, rgba(18, 16, 14, 0.55) 52%, rgba(18, 16, 14, 0.78) 100%),
    linear-gradient(90deg, rgba(18, 16, 14, 0.45), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - var(--pad) * 2));
  margin: auto auto 4.5rem;
  display: grid;
  gap: 1.5rem;
}

.hero h1 {
  font-size: clamp(3.2rem, 10vw, 7.4rem);
  max-width: 11ch;
  font-weight: 400;
}

.hero h1 em {
  font-style: italic;
  font-weight: 400;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: end;
  justify-content: space-between;
}

.hero p.lead {
  max-width: 34rem;
  color: color-mix(in srgb, var(--cream) 82%, transparent);
  font-size: 1.05rem;
}

.hero-aside {
  display: none;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  position: absolute;
  z-index: 2;
  top: 2rem;
  right: var(--pad);
  color: color-mix(in srgb, var(--cream) 70%, transparent);
}

@media (min-width: 920px) {
  .hero-aside {
    display: block;
  }
}

.hero-content .btn-row {
  margin-top: 0.4rem;
}

@media (max-width: 700px) {
  .hero {
    min-height: auto;
  }

  .hero-content {
    margin: 7.5rem auto 2.2rem;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 13vw, 4rem);
  }

  .year-mark {
    display: none;
  }
}

.year-mark {
  position: absolute;
  z-index: 1;
  right: 4%;
  bottom: 8%;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(4rem, 14vw, 11rem);
  line-height: 0.8;
  color: color-mix(in srgb, var(--cream) 12%, transparent);
  pointer-events: none;
}

/* Sections */
.section {
  padding: clamp(4rem, 8vw, 7.5rem) 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 2.5rem;
  align-items: end;
}

.section-head h2 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  max-width: 14ch;
}

.page-hero {
  padding: 3.5rem 0 2rem;
}

.page-hero h1 {
  font-size: clamp(2.4rem, 6.2vw, 4.4rem);
  max-width: 18ch;
}

.page-hero p {
  max-width: 38rem;
  margin-top: 1rem;
  color: var(--ink-soft);
}

.hero-with-portrait {
  display: grid;
  gap: 2.2rem;
  align-items: start;
}

@media (min-width: 860px) {
  .hero-with-portrait {
    grid-template-columns: minmax(0, 1fr) 17rem;
    gap: 4.5rem;
    align-items: start;
  }
}

.portrait-frame {
  margin: 0;
}

.portrait {
  display: block;
  width: min(100%, 17rem);
  height: auto;
  mix-blend-mode: multiply;
}

.portrait-home {
  width: 7.25rem;
  margin-bottom: 1.4rem;
}

@media (min-width: 880px) {
  .portrait-home {
    margin-bottom: 1.8rem;
  }
}

/* Dual practice */
.dual {
  display: grid;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 800px) {
  .dual {
    grid-template-columns: 1fr 1fr;
  }
}

.dual article {
  padding: clamp(2rem, 5vw, 3.5rem);
}

.dual article:first-child {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 800px) {
  .dual article:first-child {
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
}

.dual h3 {
  font-size: 2.35rem;
  margin: 0.7rem 0 1rem;
}

.dual p + p {
  margin-top: 0.9rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: 1.6rem var(--pad);
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat b {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 500;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 700px) {
  .stat-row {
    grid-template-columns: 1fr;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* Projects */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.8rem;
}

.filters button {
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.filters button.is-active,
.filters button:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

.project-grid {
  display: grid;
  gap: 1.4rem;
}

@media (min-width: 760px) {
  .project-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .project-card:nth-child(3n + 1) {
    grid-column: 1 / -1;
  }
}

.project-card {
  display: block;
  color: inherit;
}

.project-card .media {
  overflow: hidden;
  background: var(--dark);
  aspect-ratio: 16 / 10;
}

.project-card:nth-child(3n + 1) .media {
  aspect-ratio: 21 / 10;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 1.1s var(--ease), filter 1.1s var(--ease);
  filter: saturate(0.85);
}

.project-card:hover img {
  transform: scale(1.07);
  filter: saturate(1);
}

.project-card .caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0 0.2rem;
  font-size: 0.92rem;
}

.project-card .caption b {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.project-card .num {
  color: var(--muted);
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.8rem;
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--ink);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  width: fit-content;
}

.btn:hover {
  background: var(--ink);
  color: var(--cream);
}

.btn.ghost {
  border-color: currentColor;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Manifesto / about */
.manifesto {
  background: var(--dark);
  color: var(--cream);
}

.manifesto .kicker {
  color: #c4a36a;
}

.manifesto p {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.28;
  max-width: 22ch;
}

.creds {
  display: grid;
  gap: 1.2rem;
}

.creds li {
  border-top: 1px solid rgba(243, 234, 219, 0.16);
  padding-top: 1rem;
}

.creds b {
  display: block;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.creds span {
  font-size: 0.95rem;
  color: var(--muted);
}

.manifesto .creds li {
  border-top-color: rgba(243, 234, 219, 0.16);
}

.manifesto .creds span {
  color: color-mix(in srgb, var(--cream) 70%, transparent);
}

.num {
  color: var(--muted);
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

[hidden] {
  display: none !important;
}

/* Services */
.service-list {
  display: grid;
  gap: 0;
}

.service-item {
  display: grid;
  gap: 0.7rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 760px) {
  .service-item {
    grid-template-columns: 4rem 1fr 1.4fr;
    gap: 1.5rem;
    align-items: start;
  }
}

.service-item h3 {
  font-size: 1.8rem;
}

/* Project detail */
.detail-hero {
  display: grid;
  gap: 1.5rem;
}

.detail-hero img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  filter: saturate(0.88);
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 700px) {
  .facts {
    grid-template-columns: repeat(4, 1fr);
  }
}

.facts dt {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.facts dd {
  margin: 0.2rem 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
}

.gallery {
  display: grid;
  gap: 0.7rem;
}

@media (min-width: 760px) {
  .gallery {
    grid-template-columns: 1.4fr 1fr;
  }
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.note {
  margin-top: 1.2rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 860px) {
  .contact-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 4rem;
  }
}

.contact-lines a,
.contact-lines p {
  display: block;
}

.contact-lines a {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
}

.contact-lines a:hover {
  color: var(--brass-deep);
}

form {
  display: grid;
  gap: 0.9rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 0.55rem 0;
  outline: none;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-bottom-color: var(--ink);
}

.form-status {
  min-height: 1.4rem;
  font-size: 0.92rem;
}

.map-fallback {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: var(--cream);
  padding: 3rem 0 1.5rem;
}

.footer-top {
  display: grid;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(243, 234, 219, 0.12);
}

@media (min-width: 760px) {
  .footer-top {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer .brand strong {
  color: var(--cream);
}

.site-footer a:hover {
  color: #c4a36a;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: 1.1rem;
  color: color-mix(in srgb, var(--cream) 55%, transparent);
  font-size: 0.78rem;
}

.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    animation: rise 0.9s var(--ease) forwards;
  }

  .reveal:nth-child(2) {
    animation-delay: 0.08s;
  }

  .reveal:nth-child(3) {
    animation-delay: 0.16s;
  }
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .project-card img {
    transition: none;
  }
}
