/* ---------------------------------------------------------------------------
   Noor Shami — portfolio
   Typography and spacing mirror the original Adobe Portfolio build.
   Source Sans 3 stands in for the Typekit face the old site served.
--------------------------------------------------------------------------- */

:root {
  --ink: #282828;
  --ink-strong: #111;
  --text-body: #012b55;
  --muted: #999;
  --footer: #ddd;
  --header-h: 65px;
  --font: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: #fff;
}

body {
  margin: 0;
  min-height: 100%;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* --- header ---------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  width: 100%;
  height: var(--header-h);
  padding: 0 3%;
  background: #fff;
  transition: box-shadow 0.3s ease;
}

.site-header.on-scroll { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }

.site-nav { display: flex; align-items: center; }

.site-nav a {
  display: inline-block;
  padding-right: 20px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 400;
  line-height: 24px;
}

.site-nav a:last-child { padding-right: 0; }
.site-nav a.active { font-weight: 700; }

.header-placeholder { height: var(--header-h); }

/* --- responsive nav --------------------------------------------------------- */

.hamburger-click-area {
  display: none;
  position: absolute;
  right: 0;
  top: 50%;
  padding: 30px 5%;
  transform: translateY(-50%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hamburger { position: relative; width: 24px; }

.hamburger i {
  display: block;
  height: 2px;
  margin-bottom: 4px;
  background-color: var(--ink);
}

.hamburger i:last-child { margin-bottom: 0; }

.responsive-nav {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  padding: 50px 5% 0;
  overflow: auto;
  background-color: #fff;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: visibility 0s ease 0.2s, opacity 0.2s ease 0s;
}

.show-responsive-nav .responsive-nav {
  opacity: 1;
  visibility: visible;
  transition: visibility 0s ease 0s, opacity 0.2s ease 0s;
}

.show-responsive-nav { overflow: hidden; }
.show-responsive-nav .site-header,
.show-responsive-nav .site-wrap,
.show-responsive-nav .masthead { display: none; }

.responsive-nav-links { width: 100%; margin: auto; }

.responsive-nav-links a {
  display: block;
  padding: 0 0 30px;
  color: var(--ink);
  font-size: 22px;
  line-height: 32px;
  text-align: center;
}

.close-responsive-click-area {
  position: fixed;
  right: 0;
  top: 0;
  padding: 50px 6%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.close-responsive-button {
  position: fixed;
  right: 5%;
  top: 40px;
  width: 20px;
  height: 20px;
}

.close-responsive-button::before,
.close-responsive-button::after {
  content: "";
  position: absolute;
  left: 50%;
  display: block;
  width: 2px;
  height: 20px;
  background-color: var(--ink);
}

.close-responsive-button::before { transform: rotate(45deg); }
.close-responsive-button::after { transform: rotate(-45deg); }

/* --- masthead (home) ------------------------------------------------------- */

/* The theme leaves room under the title for an (empty) tagline and social row;
   this reserves the same space so the block centres identically. */
.masthead-text { width: 800px; max-width: 100%; padding-bottom: 30px; }

.masthead {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 75vh;
  overflow: hidden;
}

.masthead-placeholder { position: relative; z-index: -1; height: 75vh; opacity: 0; }

.masthead h1 {
  width: 100%;
  max-width: 800px;
  margin: 0 0 10px;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 25px;
  font-weight: bold;
  line-height: 70px;
  text-align: center;
  word-wrap: break-word;
}

.masthead-sub {
  width: 100%;
  max-width: 800px;
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  text-align: center;
}

.masthead-arrow-container {
  position: absolute;
  bottom: 45px;
  left: 50%;
  width: 60px;
  height: 40px;
  margin-left: -30px;
  cursor: pointer;
}

/* The chevron sits at the left edge of its 60px box on purpose: the rotate
   below carries it +14.14px, which is what lands it on centre. Centring it
   here as well (margin: 0 auto) pushes it 14px past centre. */
.masthead-arrow {
  position: absolute;
  top: 5px;
  width: 30px;
  height: 30px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  transform: rotate(45deg) translateY(-15px) translateX(5px);
}

/* Content scrolls up over the fixed masthead. */
.site-wrap { position: relative; z-index: 2; width: 100%; background: #fff; }

/* --- work gallery ---------------------------------------------------------- */

.project-covers {
  display: flex;
  flex-wrap: wrap;
  padding: 1px 0;
}

.project-cover {
  position: relative;
  display: block;
  width: calc(50% - 0.5px);
  margin-right: 1px;
  margin-bottom: 5px;
  overflow: hidden;
}

.project-cover:nth-child(2n) { margin-right: 0; }

.cover-image { position: relative; }

.cover-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.cover-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #222;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.project-cover:hover .cover-image::after,
.project-cover.touch-hover .cover-image::after { opacity: 0.9; }

.cover-details {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0 8%;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.project-cover:hover .cover-details,
.project-cover.touch-hover .cover-details { opacity: 1; }

.cover-details-inner { width: 100%; }

.cover-title {
  margin: 0 0 3px;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
}

.cover-date {
  margin: 0;
  padding-top: 12px;
  color: #fff;
  font-size: 17px;
  font-weight: 400;
  line-height: 20px;
  text-align: center;
}

/* --- "you may also like" ---------------------------------------------------- */

.other-projects { display: block; padding: 100px 0 60px; }

.other-projects .title-container { text-align: center; }

.other-projects-title {
  display: inline-block;
  margin: 0 0 40px;
  color: var(--ink-strong);
  font-size: 20px;
  font-weight: 700;
  line-height: 26px;
}

.other-covers .project-cover {
  width: calc(33.3333% - 3.334px);
  margin-right: 5px;
  margin-bottom: 0;
}

.other-covers .project-cover:nth-child(2n) { margin-right: 5px; }
.other-covers .project-cover:last-child { margin-right: 0; }

/* --- project pages --------------------------------------------------------- */

.page-header {
  max-width: 700px;
  margin: 0 auto;
  padding: 80px 0 50px;
}

.page-header h1 {
  width: 100%;
  margin: 0 auto;
  padding: 0 0 20px;
  color: var(--ink-strong);
  font-size: 28px;
  font-weight: 700;
  line-height: 50px;
  text-align: center;
}

.modules { width: 100%; }

.module { width: 100%; }
.module-grid { overflow: hidden; max-width: 100%; }

/* Negative margins pull the tiles flush to the page edges; the wrapper must
   keep its automatic width for that to widen the row, not shift it. */
.module-grid > .grid { width: auto; }

.module-image img {
  width: auto;
  height: auto;
  max-width: 100%;
  margin: 0 auto;
}

.module-text {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding-left: 5%;
  padding-right: 5%;
}

.module-text div,
.module-text p {
  margin: 0;
  padding-bottom: 10px;
  color: var(--text-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  text-align: center;
}

/* --- captions -------------------------------------------------------------- */

.module-caption-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.module-caption div,
.module-caption p {
  margin: 0;
  padding: 10px 0 20px;
  color: var(--text-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 16px;
  text-align: center;
}

/* --- video ----------------------------------------------------------------- */

.module-video .video-frame {
  position: relative;
  width: 100%;
  height: 0;
  background: #191919;
}

.module-video video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* tree: side-by-side modules */
.tree-wrapper { display: flex; }
.tree-wrapper.valign-center { align-items: center; }
.tree-wrapper.valign-bottom { align-items: flex-end; }

.tree-child {
  min-width: 1px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}

.tree-child:first-child { border-left: 0; }
.tree-child:last-child { border-right: 0; }

/* justified media grid */
.grid-row { display: flex; }
.grid-row-wrap { flex-wrap: wrap; }

.grid-item {
  position: relative;
  display: inline-block;
  box-sizing: content-box;
  border-style: solid;
  border-color: transparent;
  border-top-width: 0;
}

.grid-item .ph {
  display: block;
  background: rgba(0, 0, 0, 0.03);
}

.grid-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clickable { cursor: zoom-in; }

/* --- lazy images ----------------------------------------------------------- */

img.lazy { opacity: 0; transition: opacity 0.4s ease; }
img.lazy.loaded { opacity: 1; }

.ph { background-size: cover; background-position: center; }

/* --- lightbox -------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.94);
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  width: 54px;
  height: 54px;
  margin-top: -27px;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.lightbox-btn::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  margin: 0 auto;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.lightbox-prev { left: 12px; }
.lightbox-prev::before { transform: rotate(135deg); }
.lightbox-next { right: 12px; }
.lightbox-next::before { transform: rotate(-45deg); }

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-count {
  position: absolute;
  bottom: 22px;
  left: 0;
  width: 100%;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* --- contact --------------------------------------------------------------- */

.contact-form {
  width: 100%;
  max-width: 500px;
  margin: 1px auto 40px;
}

.form-input label {
  display: block;
  margin: 0 0 10px;
  color: var(--text-body);
  font-size: 16px;
  font-weight: 700;
  line-height: 16px;
  text-align: left;
}

.form-input input,
.form-input textarea {
  width: 100%;
  margin-bottom: 30px;
  padding-left: 10px;
  padding-right: 10px;
  border: 1px solid #eaeaea;
  border-radius: 3px;
  outline: none;
  background-color: #f8f8f8;
  color: var(--text-body);
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  text-align: left;
  -webkit-appearance: none;
}

.form-input input { height: 42px; line-height: 42px; }

.form-input textarea {
  display: block;
  height: 132px;
  padding-top: 13px;
  padding-bottom: 13px;
  line-height: 1.35;
  resize: vertical;
}

.form-input input::placeholder,
.form-input textarea::placeholder { color: rgba(1, 43, 85, 0.4); }

.form-input input:focus,
.form-input textarea:focus { border-color: #d3d3d3; }

.form-input.error input,
.form-input.error textarea { border-color: #c00; }

.submit-button {
  display: inline-block;
  position: relative;
  width: auto;
  height: 40px;
  padding: 0 25px;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  background-color: #012b55;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 40px;
  cursor: pointer;
  user-select: none;
}

.submit-button:hover { background-color: rgba(1, 43, 85, 0.8); }
.submit-button[disabled] { opacity: 0.5; cursor: default; }

.form-note { margin: 14px 0 0; color: var(--muted); font-size: 15px; }
.form-note.error { color: #c00; }

.contact-sent {
  display: none;
  max-width: 500px;
  margin: 0 auto;
  padding: 40px 0;
  color: var(--text-body);
  font-size: 16px;
  text-align: center;
}

.contact-sent.show { display: block; }

/* --- footer / back to top -------------------------------------------------- */

.site-footer {
  clear: both;
  width: 100%;
  padding: 60px 0;
  color: var(--footer);
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  text-align: center;
}

.site-footer a { color: var(--footer); }

.back-to-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 60px;
  background: rgba(0, 0, 0, 0.1);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, background 0.2s ease, visibility 0.25s;
}

.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: rgba(0, 0, 0, 0.2); }
.back-to-top svg { width: 26px; height: 26px; fill: #000; opacity: 0.35; }
.back-to-top:hover svg { opacity: 0.5; }

/* --- responsive ------------------------------------------------------------ */

@media (max-width: 932px) {
  .site-header { padding-left: 5%; padding-right: 5%; }
  .site-nav { display: none; }
  .hamburger-click-area { display: block; }
  .responsive-nav { display: flex; }
  .masthead { padding-left: 5%; padding-right: 5%; }
  .masthead h1 { font-size: 15px; line-height: 42px; margin-bottom: 8px; }
  .masthead-text { padding-bottom: 18px; }
  .cover-title { font-size: 18px; line-height: 18px; padding-bottom: 5px; }
  .cover-date { font-size: 14px; line-height: 16px; padding-top: 10px; }
  .page-header { padding: 50px 5% 30px; }
  .module-text div,
  .module-text p { font-size: 14px; line-height: 20px; padding-bottom: 8px; }
  .site-footer { font-size: 14px; padding: 28px 0; }
  .back-to-top { display: none; }
}

@media (max-width: 540px) {
  .masthead h1 { font-size: 14px; line-height: 39px; margin-bottom: 7px; }
  .masthead-text { padding-bottom: 16px; }
  .close-responsive-click-area { padding: 40px 10%; }
  .close-responsive-button { top: 30px; }
  .other-covers .project-cover { width: 100%; margin-right: 0; margin-bottom: 2px; }
  .other-projects { padding: 50px 0 30px; }
  .project-cover {
    width: 100%;
    margin-right: 0;
    margin-bottom: 2px;
  }
  .cover-title { font-size: 15px; line-height: 15px; padding-bottom: 4px; }
  .tree-wrapper { display: block; }
  .tree-child {
    border-left: 0;
    border-right: 0;
    flex: none !important;
    width: 100% !important;
    margin-bottom: 4px;
  }
  .site-footer { font-size: 14px; padding: 25px 0; }
}
