/* ahedalkhatib.com — global styles
   Minimalist black/white/gray, Lato. Matches the design reference
   (Ahed Alkhatib Architect.dc.html). */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #1a1a1a;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; }
::selection { background: #111; color: #fff; }

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ---- Header (fixed top nav) ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 80px;
  display: flex;
  align-items: center;
  background: #ffffff;
  z-index: 50;
}

.header-row {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.title {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-decoration: none;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: #000;          /* title is never muted */
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: baseline;
  gap: 34px;
}

.nav-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: rgba(0, 0, 0, 0.4);          /* inactive = muted gray */
  transition: color .3s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #000;                         /* hovered / active = solid black */
}

/* ---- Main + view container ---- */
.site-main {
  padding-top: 80px;                   /* clear the fixed header */
  min-height: 100vh;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 64px 48px 140px;            /* left edge aligns with the title */
}

.view {
  animation: pageIn .5s ease;
}

/* ---- Bio view ---- */
.bio-name {
  font-weight: 700;
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  color: #000;
}

.bio-sub {
  font-size: 15px;
  margin-bottom: 3px;
}
.bio-sub--strong { color: #1a1a1a; }
.bio-sub--muted  { color: #9a9a9a; }
.bio-credentials { margin-bottom: 46px; }

.bio-body { max-width: 660px; }
.bio-body p {
  font-size: 15px;
  line-height: 1.8;
  color: #2a2a2a;
  margin: 0 0 22px;
  text-wrap: pretty;
}

/* ---- Projects grid ---- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px 32px;
  align-items: end;
}

.project-cell {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.project-cell img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(1);
  transition: filter .6s ease;
}
.project-cell:hover img { filter: grayscale(0); }

.project-label { margin-top: 12px; }
.project-title {
  font-size: 15px;
  font-weight: 700;
  color: #000;
  line-height: 1.35;
}
.project-sub {
  font-size: 15px;
  color: #9a9a9a;
  margin-top: 2px;
}

@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- Overlay close button (round X) — reused by the Sketches overlay ---- */
.lightbox-close {
  position: fixed;
  top: calc(5vh + 14px);
  right: calc(5vw + 16px);
  z-index: 120;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #e2e2e2;
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: background .25s ease, color .25s ease;
}
.lightbox-close:hover { background: #111; color: #fff; }

/* ---- Per-project detail page (in-page; reuses the .lb-* content classes) ---- */
.back-link {
  display: inline-block;
  margin-bottom: 40px;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: rgba(0, 0, 0, 0.4);
  transition: color .3s ease;
}
.back-link:hover { color: #000; }

.not-found {
  font-size: 15px;
  color: #2a2a2a;
}
.not-found a { color: #000; }

.lb-title {
  font-weight: 700;
  font-size: 38px;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  color: #000;
}
.lb-loc {
  font-size: 19px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 34px;
}
.lb-specs {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.lb-spec { font-size: 15px; color: #1a1a1a; }
.lb-spec .lb-spec-k { color: #9a9a9a; margin-right: 8px; }

.lb-primary {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 46px;
}

.lb-narrative { max-width: 640px; margin-bottom: 46px; }
.lb-narrative p {
  font-size: 15px;
  line-height: 1.8;
  color: #2a2a2a;
  margin: 0 0 22px;
  text-wrap: pretty;
}

.lb-rest {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.lb-rest img { display: block; width: 100%; height: auto; }

.lb-scope {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid #ededed;
  max-width: 760px;
}
.lb-scope-title {
  font-size: 15px;
  font-weight: 700;
  color: #000;
  margin-bottom: 16px;
}
.lb-scope p {
  font-size: 15px;
  line-height: 1.7;
  color: #555;
  margin: 0 0 8px;
  text-wrap: pretty;
}

/* ---- Sketches grid ---- */
.sketches-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px 32px;
  align-items: start;
}
.sketch-cell { cursor: pointer; }
.sketch-cell img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(1);
  transition: filter .6s ease;
}
.sketch-cell:hover img { filter: grayscale(0); }

/* ---- Sketch lightbox (simple full-image overlay) ---- */
.sketchbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(248, 248, 248, 0.82);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vh 6vw;
  animation: lbFade .25s ease;
}
.sketchbox[hidden] { display: none; }

.sketchbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  animation: lbRise .32s cubic-bezier(.2, .7, .2, 1);
}

/* ---- Contact view ---- */
.contact {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 15px;
  color: #000;
}
.contact-place { color: #1a1a1a; }
.contact-label { color: #9a9a9a; margin-right: 12px; }
.contact a { color: #000; text-decoration: none; }

/* ---- Responsive: grid columns ---- */
@media (max-width: 900px) {
  .projects-grid,
  .sketches-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .projects-grid,
  .sketches-grid { grid-template-columns: 1fr; }
  /* Sketches overlay X sits a bit closer to the corner on phones. */
  .lightbox-close { top: calc(2vh + 10px); right: calc(2vw + 12px); }
  /* Project detail typography on phones. */
  .lb-title { font-size: 30px; }
  .lb-loc { font-size: 17px; }
  .lb-specs { gap: 16px 32px; }
}

/* ---- Responsive (narrow screens) ---- */
@media (max-width: 700px) {
  /* Let the header grow and the nav sit under the title — no overlap. */
  .site-header {
    position: static;
    height: auto;
  }
  .header-row {
    padding: 20px 24px;
    flex-wrap: wrap;
    align-items: baseline;
    row-gap: 12px;
  }
  .nav {
    gap: 22px;
    flex-wrap: wrap;
  }
  .site-main {
    padding-top: 0;                    /* header is no longer fixed */
  }
  .container {
    padding: 40px 24px 100px;          /* still aligns with the title */
  }
  .bio-name { font-size: 32px; }
}
