/* Fabiola Einhorn design portfolio: static rebuild of the original Squarespace look.
   Fonts: Lato (Google Fonts) and Georgia (system). */

:root {
  --text: #777;
  --heading: #222;
  --meta: #333;
  --nav: #999;
  --nav-active: #111;
  --rule: #ddd;
  --link: #33d761;
  --gutter: 17px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: Lato, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid #222; outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: #222; color: #fff; padding: 10px 14px; font-size: 13px;
}
.skip-link:focus { top: 8px; }

/* ---------- canvas ---------- */
#canvas {
  max-width: 970px;
  margin: 0 auto;
  padding: 100px 100px 0;
}

/* ---------- header ---------- */
#header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 107px;
}
#header .logo { margin: 0; line-height: 0; font-size: 0; }
#header .logo img { width: 87px; height: auto; }

#mobileMenuLink { display: none; }

#topNav { align-self: stretch; display: flex; align-items: center; }
#topNav > ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center;
  font-size: 12px; letter-spacing: 2px; text-transform: lowercase;
}
#topNav > ul > li { position: relative; padding: 41px 0; text-align: center; }
#topNav > ul > li + li { margin-left: 32px; }
#topNav > ul > li > a {
  color: var(--nav);
  line-height: 24px;
  display: inline-block;
  border-bottom: 1px solid transparent;
}
#topNav > ul > li > a:hover { color: var(--nav-active); text-decoration: none; }
#topNav > ul > li.active-link > a { color: var(--nav-active); border-bottom-color: var(--rule); }

#topNav .subnav {
  list-style: none; margin: 0; padding: 12px 0;
  position: absolute; top: 80px; left: 50%; transform: translateX(-50%);
  z-index: 20; background: #fff; min-width: 260px;
  border: 1px solid var(--rule);
  visibility: hidden; opacity: 0; transition: opacity .15s ease;
}
#topNav li:hover > .subnav,
#topNav li:focus-within > .subnav { visibility: visible; opacity: 1; }
#topNav .subnav li { padding: 0; }
#topNav .subnav a {
  display: block; padding: 6px 18px; color: var(--text);
  line-height: 1.6; letter-spacing: 2px;
}
#topNav .subnav a:hover { color: var(--nav-active); text-decoration: none; }

.page-divider { border-bottom: 1px solid var(--rule); margin-top: 30px; }

main { display: block; margin: 30px 0; overflow-wrap: break-word; }

/* ---------- footer ---------- */
#footer {
  border-top: 1px solid var(--rule);
  padding: 30px 0;
}
#footer p {
  margin: 0; text-align: center;
  font-size: 8px; line-height: 1.6; letter-spacing: 2px; text-transform: uppercase;
}

/* ---------- typography inside content ---------- */
main h1, main h2, main h3, main h4 { color: var(--heading); font-weight: 400; }
main h1 { font-size: 15px; line-height: 1.2; letter-spacing: 3px; text-transform: uppercase; margin: 15px 0 7.5px; }
main h2 { font-size: 18px; line-height: 1.4; letter-spacing: 2px; margin: 0 0 9px; }
main h3 { font-size: 12px; line-height: 1.6; letter-spacing: 3px; text-transform: uppercase; margin: 0 0 7.5px; }
main p { margin: 0 0 1.6em; }
main blockquote { margin: 0 0 1.6em; padding: 0 0 0 20px; border-left: 2px solid var(--rule); font-style: italic; }
main ul, main ol { margin: 0 0 1.6em; padding-left: 1.6em; }
main hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }
main strong { font-weight: 700; }
main .sqs-html-content > :first-child { margin-top: 0; }
main .sqs-html-content > :last-child { margin-bottom: 0; }
main .text-align-center { text-align: center; }
main .text-align-right { text-align: right; }
main pre.source-code {
  white-space: pre-wrap; word-break: break-word;
  font-family: Menlo, Consolas, monospace; font-size: 12px; line-height: 1.5;
  background: #f7f7f7; padding: 14px; margin: 0; overflow-x: auto; color: #444;
}

/* ---------- Squarespace-style 12 column layout ---------- */
.sqs-layout { width: 100%; }
.sqs-row { display: flex; flex-wrap: wrap; margin: 0 calc(var(--gutter) * -1); }
.sqs-row::after { content: ""; display: table; clear: both; }
.sqs-row .col { min-width: 0; }
.sqs-row .col .sqs-row { margin: 0; }
.col.span-1 { width: 8.3333%; } .col.span-2 { width: 16.6667%; } .col.span-3 { width: 25%; }
.col.span-4 { width: 33.3333%; } .col.span-5 { width: 41.6667%; } .col.span-6 { width: 50%; }
.col.span-7 { width: 58.3333%; } .col.span-8 { width: 66.6667%; } .col.span-9 { width: 75%; }
.col.span-10 { width: 83.3333%; } .col.span-11 { width: 91.6667%; } .col.span-12 { width: 100%; }
.sqs-block { padding: 0 var(--gutter) var(--gutter); clear: both; }
.sqs-block.float { clear: none; }
.sqs-block.float-right { float: right; width: 50%; padding-right: 0; }
.sqs-block.float-left { float: left; width: 50%; padding-left: 0; }
.sqs-block.float + .sqs-block { clear: none; }
.sqs-block.horizontalrule-block { padding-top: 17px; padding-bottom: 34px; }

/* images */
figure.image { margin: 0 auto; }
figure.image img { width: 100%; }
figure.image figcaption, .gallery-stacked figcaption { padding-top: 10px; }
figure.image figcaption p { margin: 0; }

/* embeds */
.embed { position: relative; width: 100%; margin: 0 auto; }
.embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.embed-video { aspect-ratio: 16 / 9; }
.embed-fixed { aspect-ratio: 16 / 9; }

/* gallery: grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: var(--gap, 20px);
}
.gallery-grid .grid-item { aspect-ratio: 1 / 1; overflow: hidden; background: #f3f3f3; }
.gallery-grid.ratio-standard .grid-item { aspect-ratio: 3 / 2; }
.gallery-grid.ratio-standard-vertical .grid-item { aspect-ratio: 2 / 3; }
.gallery-grid.ratio-four-three .grid-item { aspect-ratio: 4 / 3; }
.gallery-grid.ratio-widescreen .grid-item { aspect-ratio: 16 / 9; }
.gallery-grid .grid-item a { display: block; height: 100%; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; }

/* gallery: stacked */
.gallery-stacked figure { margin: 0 0 20px; }
.gallery-stacked figure:last-child { margin-bottom: 0; }
.gallery-stacked img { width: 100%; }
.gallery-stacked .meta-title { display: block; color: var(--heading); }
.gallery-stacked .meta-description { display: block; }

/* gallery: slideshow */
.gallery { max-width: 100%; min-width: 0; }
.gallery-slideshow .slideshow-frame { position: relative; overflow: hidden; background: rgba(175,175,175,.1); }
.gallery-slideshow .slide { position: absolute; inset: 0; margin: 0; }
.gallery-slideshow .slide[hidden] { display: none; }
.gallery-slideshow .slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery-slideshow .slide-meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 20px 12px;
  background: linear-gradient(to top, rgba(0,0,0,.45), rgba(0,0,0,0));
  color: #fff; font-size: 18px; letter-spacing: 1px;
}
.gallery-slideshow .slide-meta .meta-description { display: block; font-size: 13px; }
.slide-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 60px; border: 0; cursor: pointer;
  background: rgba(0,0,0,.12); color: #fff; font-size: 32px; line-height: 1;
}
.slide-btn:hover { background: rgba(0,0,0,.3); }
.slide-prev { left: 0; }
.slide-next { right: 0; }
.slide-thumbs {
  display: flex; gap: 0; margin-top: 15px; padding: 5px 0; overflow-x: auto; justify-content: safe center; max-width: 100%;
}
.slide-thumb {
  flex: 0 0 auto; height: var(--thumb-h, 60px); min-height: 32px; padding: 0; border: 0;
  background: none; cursor: pointer; opacity: .5;
}
.slide-thumb.is-active, .slide-thumb:hover { opacity: 1; }
.slide-thumb img { height: 100%; width: auto; max-width: none; }

/* ---------- home: project thumbnails ---------- */
#projectThumbs .wrapper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 34px;
  row-gap: 35px;
}
#projectThumbs a.project { display: block; color: var(--nav); }
#projectThumbs a.project:hover { text-decoration: none; }
#projectThumbs .project-image { aspect-ratio: 234 / 91; overflow: hidden; margin-bottom: 10px; background: #fff; }
#projectThumbs .project-image img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s ease; }
#projectThumbs a.project:hover .project-image img { opacity: .8; }
#projectThumbs .project-title {
  font-size: 12px; font-weight: 300; line-height: 1.6; letter-spacing: 3px;
  text-transform: lowercase; text-align: center; color: var(--nav);
}

/* ---------- blog and thesis articles ---------- */
article.entry + article.entry { margin-top: 80px; }
article.entry > header { text-align: center; margin: 0 0 45px; }
.entry-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px; line-height: 24px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--heading); font-weight: 400; margin: 0 0 10px;
}
.entry-title a { color: var(--heading); }
.entry-title a:hover { text-decoration: none; color: #555; }
article.entry .meta { color: var(--meta); }
article.entry .date { font-size: 11.9px; font-style: italic; letter-spacing: 2px; }
article.entry .date a { color: var(--meta); }
article.entry .body { margin: 0 0 45px; }
article.entry > footer { text-align: center; margin-top: 14px; }
article.entry > footer .meta-row { margin: 14px 0; }
article.entry > footer .meta-row:empty { display: none; }
article.entry > footer a { color: var(--meta); }
article.entry > footer a:hover { color: var(--link); }

nav.pagination {
  display: flex; justify-content: space-between; gap: 20px;
  margin: 30px 0; padding: 7.5px 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
nav.pagination a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 48%; }
nav.pagination .next-item { margin-left: auto; text-align: right; }

/* ---------- tablet ---------- */
@media (max-width: 1000px) {
  #canvas { padding: 60px 40px 0; }
}

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  #canvas { padding: 0 17px; }
  #header { flex-direction: column; align-items: stretch; min-height: 0; }
  #mobileMenuLink {
    display: block; width: 100%; min-height: 44px; margin: 0;
    background: none; border: 0; border-bottom: 1px solid var(--rule);
    font: inherit; font-size: 14px; letter-spacing: 2px; color: var(--nav); cursor: pointer;
    padding: 12px 0;
  }
  #topNav { display: none; order: 2; }
  #topNav.is-open { display: block; }
  #topNav > ul { flex-direction: column; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  #topNav > ul > li { padding: 0; }
  #topNav > ul > li + li { margin-left: 0; }
  #topNav > ul > li > a { padding: 10px 0; }
  #topNav .subnav { display: none; }
  #header .logo { order: 3; text-align: center; padding: 30px 0 40px; }
  #header .logo img { margin: 0 auto; width: 87px; }

  .sqs-row { display: block; margin: 0; }
  .col[class*="span-"] { width: 100%; }
  .sqs-block { padding: 0 0 var(--gutter); }
  .sqs-block.float-right, .sqs-block.float-left { float: none; width: 100%; }

  #projectThumbs .wrapper { grid-template-columns: 1fr; row-gap: 20px; }
  .gallery-slideshow .slide-meta { display: none; }
  .slide-thumb { height: min(var(--thumb-h, 60px), 60px); }
  .gallery-grid { grid-template-columns: repeat(min(var(--cols, 3), 2), minmax(0, 1fr)); gap: 10px; }
  nav.pagination a { max-width: 48%; }
}

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

/* poster for videos that are no longer playable on Vimeo */
.video-poster a { display: block; width: 100%; height: 100%; position: relative; }
.video-poster img { width: 100%; height: 100%; object-fit: cover; }
.video-poster a::after {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-40%, -50%);
  border-style: solid; border-width: 18px 0 18px 30px; border-color: transparent transparent transparent #fff;
  filter: drop-shadow(0 0 6px rgba(0,0,0,.4));
}
