:root{
  --ink:#3f4142;
  --muted:#74736e;
  --paper:#faf9f6;
  --line:#e7e2d8;

  /* Project colours in portfolio order */
  --home-office:#cfd1c4;
  --primrose:#f2dcda;
  --driftwood:#dce4ea;
  --amberwood:#405461;
  --courtyard:#4f5b4f;
  --vernacular:#e6dcd3;
}

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);
  background:var(--paper);
  line-height:1.6;
}

a{
  color:inherit;
  text-decoration:none;
}

img{
  max-width:100%;
  display:block;
}

.wrap{
  width:min(1120px,92vw);
  margin:auto;
}

/* Navigation */

.topbar{
  position:sticky;
  top:0;
  z-index:20;
  background:rgba(250,249,246,.92);
  backdrop-filter:blur(16px);
  border-bottom:1px solid var(--line);
}

.nav{
  height:70px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

.brand{
  font-weight:800;
  letter-spacing:.04em;
}

.menu{
  display:flex;
  gap:22px;
  align-items:center;
  font-size:14px;
}

.menu a,
.dropbtn{
  padding:10px 0;
  color:#565651;
}

.dropdown{
  position:relative;
}

.dropbtn{
  cursor:pointer;
}

.dropdown-content{
  display:none;
  position:absolute;
  right:0;
  min-width:240px;
  background:white;
  border:1px solid var(--line);
  box-shadow:0 18px 40px rgba(40,38,34,.12);
  border-radius:18px;
  padding:10px;
}

.dropdown:hover .dropdown-content{
  display:block;
}

.dropdown-content a{
  display:block;
  padding:10px 12px;
  border-radius:12px;
}

.dropdown-content a:hover{
  background:#f4f1eb;
}

/* Hero */

.hero{
  min-height:78vh;
  display:grid;
  place-items:center;
  padding:72px 0;

  background:linear-gradient(
    90deg,

    var(--home-office) 0 2.2%,
    var(--primrose) 2.2% 4.4%,
    var(--driftwood) 4.4% 6.6%,
    var(--amberwood) 6.6% 8.8%,
    var(--courtyard) 8.8% 11%,
    var(--vernacular) 11% 13.2%,

    transparent 13.2% 100%
  );
}

.hero-card{
  width:min(970px,86vw);
  display:grid;
  grid-template-columns:1fr;
  gap:42px;
  align-items:center;
}

.hero-clean{
  max-width:820px;
}

.script{
  font-family:Georgia,"Times New Roman",serif;
  font-style:italic;
  font-size:clamp(32px,5vw,62px);
  line-height:1.1;
  margin:0 0 14px;
}

.hero h1{
  font-size:clamp(72px,14vw,158px);
  line-height:.88;
  margin:0 0 28px;
  font-weight:900;
  letter-spacing:-.08em;
  color:#444;
}

.eyebrow{
  font-size:13px;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--muted);
  font-weight:700;
}

.hero .eyebrow{
  display:block;
  line-height:1.6;
  margin:0;
}

.btns{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:30px;
}

.btn{
  border:1px solid var(--ink);
  border-radius:999px;
  padding:12px 18px;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:white;
}

.btn.fill{
  background:var(--ink);
  color:white;
}

.cover{
  border-radius:8px;
  box-shadow:0 30px 80px rgba(0,0,0,.14);
}

/* General sections */

section{
  padding:90px 0;
}

.section-title{
  font-size:clamp(38px,6vw,72px);
  line-height:.92;
  letter-spacing:-.06em;
  margin:0 0 28px;
}

/* About */

.about-grid{
  display:grid;
  grid-template-columns:360px 1fr;
  gap:64px;
  align-items:center;
}

.portrait{
  width:100%;
  aspect-ratio:3/4;
  object-fit:cover;
  object-position:center;
  border-radius:22px;
  padding:10px;
  background:white;
  border:1px solid var(--line);
  box-shadow:0 20px 50px rgba(0,0,0,.08);
}

/* Projects */

.projects{
  background:#f2f0eb;
}

.project-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:22px;
}

.project-card{
  background:white;
  border:1px solid var(--line);
  border-radius:22px;
  overflow:hidden;
  transition:transform .2s ease,box-shadow .2s ease;
}

.project-card:hover{
  transform:translateY(-4px);
  box-shadow:0 18px 45px rgba(0,0,0,.1);
}

.project-card img{
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
  object-position:center;
}

.project-card div{
  padding:18px;
}

.project-card h3{
  margin:8px 0;
}

.num{
  font-weight:900;
  color:var(--muted);
}

/* Contact */

.contact{
  background:linear-gradient(
    90deg,
    var(--courtyard) 0 7%,
    transparent 7% 100%
  );
}

.contact-card{
  background:white;
  border:1px solid var(--line);
  border-radius:28px;
  padding:42px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:40px;
  align-items:center;
}

.contact-actions{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

/* Footer */

.footer{
  padding:28px 0;
  border-top:1px solid var(--line);
  font-size:13px;
  color:var(--muted);
}

/* Individual project pages */

.page-hero{
  padding:90px 0 40px;
  background:linear-gradient(
    90deg,
    var(--project-color,#d7e1e7) 0 7%,
    transparent 7% 100%
  );
}

.page-hero h1{
  font-size:clamp(48px,8vw,96px);
  line-height:.9;
  margin:8px 0;
  letter-spacing:-.06em;
}

.pdf-pages{
  display:grid;
  gap:26px;
  padding:50px 0 90px;
}

.pdf-page{
  background:white;
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  box-shadow:0 14px 38px rgba(0,0,0,.08);
}

.pdf-page img{
  border-radius:8px;
  width:100%;
  height:auto;
}

.backline{
  display:flex;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
  margin-top:22px;
}

.mobile-menu{
  display:none;
}

/* Tablet and mobile */

@media(max-width:820px){

  .menu{
    display:none;
  }

  .mobile-menu{
    display:block;
  }

  .about-grid,
  .contact-card{
    grid-template-columns:1fr;
  }

  .hero{
    min-height:72vh;
    padding:64px 0;

    background:linear-gradient(
      90deg,

      var(--home-office) 0 1.35%,
      var(--primrose) 1.35% 2.7%,
      var(--driftwood) 2.7% 4.05%,
      var(--amberwood) 4.05% 5.4%,
      var(--courtyard) 5.4% 6.75%,
      var(--vernacular) 6.75% 8.1%,

      transparent 8.1% 100%
    );
  }

  .hero-card{
    width:min(86vw,700px);
  }

  .hero h1{
    font-size:clamp(64px,20vw,120px);
    line-height:.9;
    margin-bottom:26px;
  }

  .script{
    font-size:clamp(30px,9vw,52px);
    margin-bottom:12px;
  }

  .project-grid{
    grid-template-columns:1fr;
  }

  .contact{
    background:linear-gradient(
      90deg,
      var(--courtyard) 0 4%,
      transparent 4% 100%
    );
  }

  section{
    padding:64px 0;
  }

  .portrait{
    max-width:360px;
  }

  .dropdown-content{
    right:auto;
    left:0;
  }

  .contact-actions{
    justify-content:flex-start;
  }
}

/* Katy Karami logo */

.brand{
  display:flex;
  align-items:center;
  padding:0;
}

.brand img{
  display:block;
  width:175px;
  height:auto;
  max-height:48px;
  object-fit:contain;
}

/* Correct hero title spacing */

.hero-card > div:first-child{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}

.script{
  line-height:1.05;
  margin:0 0 16px;
}

.hero h1{
  line-height:.9;
  margin:0;
}

.hero .eyebrow{
  display:block;
  line-height:1.5;
  margin:28px 0 0;
}

.hero .btns{
  margin-top:28px;
}

@media(max-width:820px){
  .brand img{
    width:145px;
    max-height:42px;
  }

  .hero .eyebrow{
    margin-top:22px;
  }
}