/* A. Hariri site. One font (Barlow), one type scale, dark throughout.
   Light is used only for the logo band, because the logo files need it. */

:root {
  --bg: #0b0b0b;
  --line: #2b2b2b;
  --text: #f4f4f2;
  --muted: #a8a8a4;
  --accent: #0b5fb3;
  --accent-light: #6aa9ea;
  --light: #f1f1ee;
  --ink: #111111;

  /* Type scale: desktop. The phone values are set in the media query below. */
  --h1: 56px;
  --h2: 36px;
  --h3: 22px;
  --body: 17px;
  --small: 14px;

  --gutter: 48px;
  --section: 120px;
  --max: 1440px;
}

@media (max-width: 767px) {
  :root {
    --h1: 38px;
    --h2: 28px;
    --h3: 20px;
    --gutter: 20px;
    --section: 72px;
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Barlow", Arial, sans-serif;
  font-size: var(--body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; }
img { display: block; max-width: 100%; }
.nowrap { white-space: nowrap; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }

h1, h2, h3 { margin: 0; font-weight: 500; }
h1 { font-size: var(--h1); line-height: 1.05; }
h2 { font-size: var(--h2); line-height: 1.15; }
h3 { font-size: var(--h3); line-height: 1.25; }

.muted { color: var(--muted); }
.small { font-size: var(--small); line-height: 1.45; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section) 0; }
.section + .section { padding-top: 0; }

:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--text);
  color: var(--ink);
}

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background-color 0.2s ease;
}
.site-header.solid,
.site-header.open { background: var(--bg); }

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo img { height: 48px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav a {
  font-size: var(--body);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover,
.nav a[aria-current="page"] { border-bottom-color: var(--text); }

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.menu-button span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 6px auto;
  background: currentColor;
}

@media (max-width: 1023px) {
  .menu-button { display: block; }
  .site-header .wrap { height: 68px; }
  .logo img { height: 40px; }
  .nav {
    display: none;
    position: fixed;
    inset: 68px 0 0 0;
    padding: 16px var(--gutter) 40px;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    overflow-y: auto;
  }
  .site-header.open .nav { display: flex; }
  .nav a {
    width: 100%;
    padding: 14px 0;
    font-size: var(--h3);
    border-bottom: 1px solid var(--line);
  }
  .nav a:hover,
  .nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--accent-light); }
}

.nav a.nav-button {
  padding: 8px 18px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
}
.nav a.nav-button:hover { background: #0d6dcc; }

@media (max-width: 1023px) {
  .nav a.nav-button {
    width: auto;
    margin-top: 20px;
    padding: 12px 24px;
    font-size: var(--body);
  }
}

/* Buttons */

.button {
  display: inline-block;
  padding: 13px 28px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #0d6dcc; }

.text-link {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.text-link:hover { color: var(--accent-light); }

/* Home hero: the image is composed with the figure on the left, so the words sit right. */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
}
.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 60%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}
.hero .wrap {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  height: 100%;
  padding-bottom: 64px;
}
.hero-copy { width: 100%; max-width: 560px; }
.hero-copy h2 { font-size: var(--h3); line-height: 1.3; margin-top: 12px; font-weight: 400; }
.hero-copy .place { margin-top: 4px; }
.hero-actions { margin-top: 28px; }

@media (max-width: 767px) {
  .hero > img { object-position: 24% 50%; }
  .hero::after { background: rgba(0, 0, 0, 0.35); }
  .hero .wrap { padding-bottom: 40px; }
}

/* Intro and reel */

.statement p { margin-top: 20px; }

@media (min-width: 768px) {
  .statement { text-align: center; }
  /* Slightly under the h2 size so the statement holds two full-width lines at 1440. */
  .statement h2 { font-size: 32px; text-wrap: balance; }
  .statement p {
    margin: 24px auto 0;
    font-size: var(--h3);
    line-height: 1.45;
    text-wrap: balance;
  }
}

.video {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  background: #000;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
}
.video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video .play {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  background: var(--bg);
  font-size: var(--body);
  line-height: 1;
}
.video .play svg { width: 16px; height: 16px; fill: currentColor; }
.video:hover .play { background: var(--accent); }

.caption {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 14px;
}

/* Section headings */

.head { margin-bottom: 40px; }
.head p { margin-top: 12px; max-width: 640px; }

@media (max-width: 767px) {
  .head { margin-bottom: 28px; }
}

/* What I Do */

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 24px;
}
.tile { display: block; text-decoration: none; }
.tile-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #000;
  margin-bottom: 14px;
}
.tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
}
.tile:hover .tile-image img { opacity: 0.82; }
.tile:hover h3 { color: var(--accent-light); }
.tile p { margin-top: 6px; }

@media (max-width: 767px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: 32px 12px; }
  .tile h3 { font-size: var(--body); font-weight: 500; }
  .tile p { font-size: var(--small); line-height: 1.45; }
}

/* Selected credits */

.credits-layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  align-items: start;
}
.posters {
  grid-column: 1 / span 5;
  display: flex;
  gap: 12px;
}
/* Same height for both: each poster's width follows its own proportions, so neither is cropped. */
.posters img { min-width: 0; height: auto; }
.posters .tall { flex: 1000 1 0; }
.posters .wide { flex: 2003 1 0; align-self: flex-start; }
.credits {
  grid-column: 7 / span 6;
  border-top: 1px solid var(--line);
}
.credits li {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.credits .show { font-weight: 500; }

@media (max-width: 767px) {
  .posters { grid-column: 1 / -1; margin-bottom: 32px; }
  .credits { grid-column: 1 / -1; }
  .credits li { grid-template-columns: 1fr; }
}

/* Light band for logos. These are the client's own files and many have dark artwork. */

.band {
  background: var(--light);
  color: var(--ink);
  padding: 72px 0;
}
.band + .band { padding-top: 0; }
.band h2 { margin-bottom: 40px; }
.logos {
  --logo-height: 56px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 64px;
  gap: 32px 40px;
  align-items: center;
}
.logos img {
  width: 100%;
  height: calc(var(--logo-height) * var(--logo, 1));
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* The logo files have different proportions and margins. These bring them to one visual size. */
.logos img[alt="Peacock"] { --logo: 0.58; }
.logos img[alt="Sesame Street"] { --logo: 0.74; }
.logos img[alt="FOX"] { --logo: 0.66; }
.logos img[alt="CBS"] { --logo: 0.55; }
.logos img[alt="ABC Action News"] { --logo: 0.78; }
.logos img[alt="Tesco"] { --logo: 0.55; }
.logos img[alt="United Healthcare"] { --logo: 0.6; }
.logos img[alt="The Moth"] { --logo: 1.5; }
.logos img[alt="The Brooklyn Hospital Center"] { --logo: 0.8; }
.logos img[alt="Doritos"] { --logo: 1.9; }

/* These files are cropped to the artwork, so each width is its true visible width.
   Adobe sets the size. Taller logos are narrower so all rows keep a similar height. */
.logos.software {
  --unit: 1px;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 88px;
  gap: 20px 0;
  justify-items: center;
}
.logos.software img {
  width: calc(var(--logo-width, 200) * var(--unit));
  max-width: 100%;
  height: auto;
}
.logos.software img[alt="Unreal Engine"] { --logo-width: 190; }
.logos.software img[alt="Nuke"] { --logo-width: 172; }
.logos.software img[alt="DaVinci Resolve"] { --logo-width: 160; }
.logos.software picture { display: contents; }
.logos.software source { display: none; }
/* Plain text until an official TriCaster logo file is supplied. */
.logo-word { font-size: 40px; font-weight: 500; line-height: 1; color: var(--ink); }
.logos.software img[alt="Toon Boom Harmony"] { --logo-width: 180; }

@media (max-width: 767px) {
  .band { padding: 48px 0; }
  .band h2 { margin-bottom: 28px; }
  .logos {
    --logo-height: 44px;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 52px;
    gap: 20px;
  }
  .logos.software {
    --unit: 0.7px;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 64px;
    gap: 12px 0;
  }
  .logos.software img[alt="DaVinci Resolve"] { --logo-width: 200; }
  .logo-word { font-size: 28px; }
}

/* Logos of the places taught, on the Teaching page */

.logos.taught {
  --logo-height: 96px;
  grid-auto-rows: 104px;
  gap: 24px 32px;
}
.logos.taught img[alt="BRIC Arts Media"] { --logo: 0.62; }
.logos.taught img[alt="Manhattan Neighborhood Network"] { --logo: 1.7; }
.logos.taught img[alt="New York City Department of Education"] { --logo: 0.82; }
.logos.taught img[alt^="Mayor"] { --logo: 1; }
.logos.taught img[alt="Brownsville Community Justice Center"] { --logo: 0.9; }
.logos.taught img[alt="New York Edge"] { --logo: 1.05; }
.schools { margin-top: 32px; }

@media (max-width: 767px) {
  .logos.taught {
    --logo-height: 80px;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 88px;
    gap: 20px;
  }
  .schools { margin-top: 24px; }
}

/* Skills */

.columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 24px;
}
.columns h3 { margin-bottom: 12px; }
.columns li { padding: 3px 0; }

.columns.four { grid-template-columns: repeat(4, 1fr); }

.pipeline-note { margin: 32px 0 12px; }

.skill summary { list-style: none; }
.skill summary::-webkit-details-marker { display: none; }

@media (max-width: 767px) {
  .columns.four,
  .columns.collapsible { gap: 0; }
  .columns.four > div { margin-top: 28px; }
  .columns.four.pipeline > div + div { margin-top: 16px; }
  .pipeline h3 { margin-bottom: 4px; }
  .skill { border-bottom: 1px solid var(--line); }
  .skill:first-child { border-top: 1px solid var(--line); }
  .skill summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
    cursor: pointer;
  }
  .skill summary h3 { margin: 0; }
  .skill summary::after { content: "+"; font-size: var(--h3); }
  .skill[open] summary::after { content: "\2212"; }
  .skill ul { padding-bottom: 16px; }
}

@media (max-width: 1023px) {
  .columns.four { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .columns,
  .columns.four { grid-template-columns: 1fr; gap: 32px; }
}

/* Contact */

.contact {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: var(--section);
}
.contact-copy { grid-column: 1 / span 5; }
.contact-copy p { margin-top: 16px; }
.contact-form { grid-column: 7 / span 6; }

.field { margin-bottom: 20px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--small);
  color: var(--muted);
}
input, textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #4a4a48;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 17px;
}
input:focus, textarea:focus { outline: 0; border-color: var(--accent-light); }
textarea { min-height: 140px; resize: vertical; }
.form-note { margin-top: 14px; min-height: 20px; }
.form-trap { position: absolute; left: -9999px; }
.button:disabled { opacity: 0.6; cursor: default; }

@media (max-width: 767px) {
  .contact-copy,
  .contact-form { grid-column: 1 / -1; }
  .contact-form { margin-top: 32px; }
}

/* Footer */

.site-footer { padding: 40px 0 48px; }
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 32px;
}
.social { display: flex; gap: 24px; }

/* Inner page header */

.page-hero {
  position: relative;
  height: 72vh;
  min-height: 460px;
  margin-top: 80px;
  overflow: hidden;
}
@media (max-width: 1023px) {
  .page-hero { margin-top: 68px; }
}
.page-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}
.page-hero .wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding-bottom: 48px;
}
.page-hero .where { margin-bottom: 8px; }

.page-plain { padding-top: 136px; }
.page-plain > .section:first-child { padding-top: 0; }

@media (max-width: 767px) {
  .page-hero { height: 60vh; min-height: 400px; }
  .page-hero .wrap { padding-bottom: 28px; }
  .page-plain { padding-top: 104px; }
}

/* VFX page */

.split {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
}
.split > :first-child { grid-column: 1 / span 5; }
.split > :last-child { grid-column: 7 / span 6; }
.split p + p { margin-top: 16px; }

@media (max-width: 767px) {
  .split > :first-child,
  .split > :last-child { grid-column: 1 / -1; }
  .split > :last-child { margin-top: 24px; }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.gallery button {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  background: #000;
  cursor: zoom-in;
  overflow: hidden;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
}
.gallery button:hover img { opacity: 0.82; }
.gallery .wide { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }

@media (max-width: 767px) {
  .gallery { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
  .gallery .wide { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 24px;
}
.video-grid p { margin-top: 12px; }
.video-grid p + p { margin-top: 2px; }

@media (max-width: 767px) {
  .video-grid { grid-template-columns: 1fr; }
}

.single { max-width: 1040px; }

.next {
  display: block;
  padding: 56px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.next:hover h2 { color: var(--accent-light); }

/* A video beside its description, used for client projects and broadcasts */

.case {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  align-items: start;
}
.case + .case { margin-top: 72px; }
.case > .video { grid-column: 1 / span 7; }
.case-text { grid-column: 9 / span 4; }
.case-text p { margin-top: 12px; }
.case-text .role { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }

@media (max-width: 1023px) {
  .case > .video,
  .case-text { grid-column: 1 / -1; }
  .case-text { margin-top: 16px; }
  .case + .case { margin-top: 48px; }
}

.video-grid.two { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 767px) {
  .video-grid.two { grid-template-columns: 1fr; }
}

/* Collapsed sections */

.fold { border-top: 1px solid var(--line); }
.fold:last-of-type { border-bottom: 1px solid var(--line); }
.fold summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  font-size: var(--h3);
  line-height: 1.25;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary:hover { color: var(--accent-light); }
.fold summary::after {
  content: "+";
  font-size: var(--h3);
  font-weight: 400;
}
.fold[open] summary::after { content: "\2212"; }
.fold .fold-body { padding-bottom: 32px; }
.fold .fold-body > img { width: 100%; margin-bottom: 12px; }

.gallery.packaging { grid-template-columns: repeat(6, 1fr); margin-top: 0; }
.gallery.packaging button { aspect-ratio: 1; background: #1c1c1c; }
.gallery.packaging img { object-fit: contain; }

.gallery.print {
  display: block;
  columns: 4;
  column-gap: 12px;
  margin-top: 0;
}
.gallery.print button {
  aspect-ratio: auto;
  margin-bottom: 12px;
  break-inside: avoid;
}
.gallery.print img { height: auto; }

@media (max-width: 767px) {
  .gallery.packaging { grid-template-columns: repeat(3, 1fr); }
  .gallery.print { columns: 2; column-gap: 8px; }
  .gallery.print button { margin-bottom: 8px; }
  .fold .fold-body > img { margin-bottom: 8px; }
}

/* Simple rows: experience, teaching roles */

.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.row .when { grid-column: 1 / span 3; }
.row .what { grid-column: 4 / span 9; }
.row .what p { margin-top: 8px; max-width: 760px; }

@media (max-width: 767px) {
  .row { display: block; padding: 20px 0; }
  .row .when { margin-bottom: 6px; }
}

.band-image { width: 100%; }

.list-rows { border-top: 1px solid var(--line); }
.list-rows li { padding: 12px 0; border-bottom: 1px solid var(--line); }

/* Freelance Services */

.intro { max-width: 860px; margin-top: 32px; }
.intro p + p { margin-top: 16px; }
.under { text-decoration: underline; text-underline-offset: 4px; font-weight: 500; }
h3.under { font-size: var(--body); line-height: 1.55; margin-bottom: 6px; }
.expertise { margin-top: 24px; }
.expertise p { margin-top: 12px; color: var(--muted); }
.expertise .under { color: var(--text); }
.side-image { width: 100%; }

.service-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 24px;
}
.service { margin-top: 28px; }

@media (max-width: 767px) {
  .service-columns { grid-template-columns: 1fr; }
  .service { margin-top: 24px; }
}

/* Lightbox */

.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.95);
  color: var(--text);
}
.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox img {
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 120px);
  object-fit: contain;
}
.lightbox button {
  position: absolute;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 0;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.lightbox button:hover { background: var(--accent); }
.reel-frame {
  width: min(calc(100vw - 32px), calc((100dvh - 136px) * 16 / 9));
  aspect-ratio: 16 / 9;
  background: #000;
}
.reel-frame video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.lightbox .close { top: 16px; right: 16px; }
.lightbox .prev { bottom: 16px; left: 16px; }
.lightbox .forward { bottom: 16px; right: 16px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
