/* Base styles */
html, body {
  height: 100%;
}

body {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  font-family: museo_sans500, helvetica, arial, sans-serif;
  color: #222;
}

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

.stop-scrolling {
  height: 100% !important;
  overflow: hidden !important;
}

.sectionContainer {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
}

.sectionBackground {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

#home .sectionBackground {
  overflow: hidden;
}

.home-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sectionContent {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 80px 0;
}

.heading {
  font-size: 30px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: proxima_nova_regular, museo_sans500, helvetica, arial, sans-serif;
}

.text {
  font-size: 18px;
  line-height: 28px;
}

a {
  color: #1a1a1a;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

#home a,
#contact a {
  color: #fff;
}

/* Home */
#home {
  color: #fff;
  text-align: center;
}

#home .sectionContent {
  width: 80%;
  max-width: 620px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
}

#home .heading {
  padding: 8px;
  transition: color 10s, border-color 10s;
}

#home-title {
  font-size: 60px;
  letter-spacing: 3px;
  text-transform: lowercase;
  border-top: 0;
  border-bottom: 0;
}

#home .text {
  margin-top: 40px;
  transition: color 10s;
}

#home .sectionContent.darktext .heading {
  color: #333;
  border-color: #333;
}

#home .sectionContent.darktext .text {
  color: #333;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 5;
}

.scroll-cue.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-cue__arrow {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #fff;
  transform: translateY(2px);
}


/* About */
#about .sectionContent {
  width: 90%;
  max-width: 940px;
  margin: 0 auto;
  text-align: left;
}

#about .heading {
  width: 300px;
  margin: 0 auto 20px;
  text-align: center;
  border-bottom: 4px solid #333;
  color: #333;
}

#about .text {
  color: #333;
  text-align: justify;
}

#about .honors {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: center;
  justify-content: space-between;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

#about .honors li {
  height: 56px;
  width: 100px;
  background-image: url(../img/honors.png);
  background-repeat: no-repeat;
  flex: 0 0 auto;
  background-size: 550px 56px;
}

#about .honors li.honors-mit { background-position: -469px 0; width: 77px; }
#about .honors li.honors-tedprize { background-position: -121px 0; width: 163px; }
#about .honors li.honors-time { background-position: -284px 0; width: 105px; }
#about .honors li.honors-good { background-position: -389px 0; width: 73px; }

/* Work */
#work .sectionBackground {
  background-color: #fff;
}

#work.sectionContainer {
  overflow: visible;
}

#work .sectionContent {
  padding: 0;
  overflow-x: hidden;
}

.work-groups {
  width: 100%;
}

.work-group {
  position: relative;
  width: 100%;
  margin: 0;
  list-style: none;
  padding: 0;
  overflow: hidden;
}

#work .grid-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

#work .grid-wrapper > li.half {
  padding: 0;
  margin: 0;
  position: relative;
  float: left;
  width: 50%;
  height: 100%;
}

#work .grid-pic {
  position: relative;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  filter: grayscale(0.7) saturate(0.6) contrast(0.95);
  transition: filter 0.4s ease, opacity 0.35s ease;
  cursor: pointer;
  z-index: 10;
}

#work .grid-pic.color,
#work .grid-pic:hover {
  filter: grayscale(0);
}

#work .grid-pic.expanded {
  filter: grayscale(0);
}

#work .details-hero img,
#work .details-hero iframe,
#work .details-hero .media {
  filter: none;
}

#work .grid-pic img.full {
  width: 100%;
}

#work .grid-pic .tag {
  position: absolute;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  bottom: 0;
  left: 0;
  background-color: #fff;
  padding: 10px;
  color: #333;
  z-index: 11;
}

#work .grid-pic::after {
  content: "+";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.9);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 12;
}

#work .grid-pic:hover::after,
#work .grid-pic.color::after {
  opacity: 1;
  transform: scale(1);
}

#work .grid-0 {
  width: 100%;
  height: 100%;
}

#work .grid-1 {
  width: 100%;
  height: 50%;
}

#work .grid-2,
#work .grid-3 {
  float: left;
  width: 50%;
  height: 50%;
}

#work .grid-details {
  display: none;
  background: #fff;
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  z-index: 1;
}

#work .details-logobar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  text-align: left;
  background-color: rgba(255, 255, 255, 0.9);
  z-index: 2;
}

#work .details-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

#work .details-controls li {
  float: left;
  height: 28px;
  background-image: url(../img/sprites.png);
  background-repeat: no-repeat;
}

#work .details-controls li img {
  height: 28px;
}

#work .details-controls li.prev img,
#work .details-controls li.next img {
  width: 17px;
}

#work .details-controls li.close img {
  width: 27px;
}

#work .details-controls li.prev { background-position: -195px 0; }
#work .details-controls li.prev:hover { background-position: -195px -28px; cursor: pointer; }
#work .details-controls li.next { margin-left: 10px; background-position: -212px 0; }
#work .details-controls li.next:hover { background-position: -212px -28px; cursor: pointer; }
#work .details-controls li.close { margin-left: 20px; background-position: -230px 0; }
#work .details-controls li.close:hover { background-position: -230px -28px; cursor: pointer; }

#work .details-wrapper {
  background: none;
  overflow-y: auto;
  height: 100%;
  padding: 80px 40px 40px;
  box-sizing: border-box;
  display: block;
}

#work .details-hero {
  margin: 0;
  text-align: center;
}

#work .details-hero img.logo {
  max-width: 240px;
  margin: 0 auto 20px;
}

#work .details-hero .logo-text {
  font-size: 28px;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 20px;
  color: #222;
  font-family: proxima_nova_regular, museo_sans500, helvetica, arial, sans-serif;
}

#work .details-hero .media-frame {
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  margin: 0 auto 30px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#work .details-hero .media-frame.has-caption .media-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.3px;
  padding: 8px 12px;
  text-align: left;
}

#work .details-hero iframe,
#work .details-hero img.media {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

#work .details .heading {
  margin: 10px auto 15px;
  font-weight: bold;
  font-size: 28px;
  text-align: center;
  line-height: 34px;
  padding: 8px;
  border-bottom: 4px solid #333;
  border-top: 4px solid #333;
  text-transform: uppercase;
  display: inline-block;
}

#work .details-content {
  color: #333;
  max-width: 860px;
  margin: 0 auto;
}

#work .details-meta {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
  color: #666;
  margin-bottom: 14px;
}

#work .details-title {
  font-size: 26px;
  font-weight: bold;
  text-transform: uppercase;
  line-height: 32px;
  border-bottom: 3px solid #333;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

#work .details-paragraphs {
  font-size: 16px;
  line-height: 28px;
}

#work .details-paragraphs p {
  margin: 0 0 16px;
}

#work .workgrid-left {
  position: relative;
  left: 1px;
}

#work .workgrid-right {
  position: relative;
  left: -1px;
}

/* Media */
#media .sectionBackground {
  background-color: #fff;
}

#videos-tag {
  font-weight: bold;
  text-transform: uppercase;
  position: absolute;
  top: 30px;
  left: 30px;
  z-index: 5;
  color: #000;
  padding: 10px 15px 6px 15px;
  background: rgba(255, 255, 255, 0.7);
}

#videos-tag small {
  color: #4b4b4b;
}

.video-carousel {
  position: relative;
  width: 100%;
  padding: 80px 0 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.video-track {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: transparent;
}

.video-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(140%);
  transition: transform 0.5s ease, opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  box-sizing: border-box;
}

.video-item iframe,
.video-item img {
  width: 70%;
  height: auto;
  border: 0;
  display: block;
  background: #000;
  margin: 0;
}

.video-item.prev iframe,
.video-item.next iframe {
  pointer-events: none;
}

.video-item.prev img,
.video-item.next img {
  pointer-events: none;
}

.video-item.active {
  opacity: 1;
  transform: translateX(0);
  z-index: 2;
}

.video-item.prev {
  opacity: 0.4;
  transform: translateX(calc(-70% - 20px));
  z-index: 1;
}

.video-item.next {
  opacity: 0.4;
  transform: translateX(calc(70% + 20px));
  z-index: 1;
}

.video-item.prev:hover,
.video-item.next:hover {
  opacity: 0.7;
  cursor: pointer;
}

.video-arrow {
  width: 44px;
  height: 44px;
  border: 0;
  background-color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 3;
  opacity: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
  border-radius: 999px;
  border: 0;
  flex: 0 0 auto;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.video-arrow.left {
  left: 24px;
}

.video-arrow.right {
  right: 24px;
}

.video-arrow:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.05);
}

.video-arrow:focus-visible {
  outline: 2px solid #111;
  outline-offset: 3px;
}

.video-arrow::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: invert(1);
}

.video-arrow.left::after { background-image: url(../img/arrow_left.png); }
.video-arrow.right::after { background-image: url(../img/arrow_right.png); }

.video-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Press */
#media .selected-press-container {
  width: 90%;
  margin: 0 auto 40px;
}

#media .honors-text-header {
  color: #333;
  text-align: left;
  font-weight: bold;
  text-transform: uppercase;
  padding: 10px 0;
}

#media .selected-press-logos {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

#media .selected-press-logos a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: grayscale(1);
  transition: filter 0.3s ease;
}

#media .selected-press-logos a:hover {
  filter: grayscale(0);
}

#media .selected-press-logos img {
  max-height: 45px;
  width: auto;
}

/* Contact */
#contact {
  color: #fff;
}

#contact .sectionContent {
  text-align: left;
}

#contact .contact-wrapper {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

#contact .heading {
  text-align: center;
  border-bottom: 4px solid #fff;
  margin: 0 auto 10px;
  color: #fff;
}

#contact .contact-email {
  text-align: center;
  margin-bottom: 30px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

#contact #contactForm {
  width: 100%;
}

#contact #contactForm .left-column,
#contact #contactForm .right-column {
  float: left;
}

#contact #contactForm .right-column {
  margin-left: 30px;
}

#contact .input_name {
  font-weight: bold;
  text-transform: uppercase;
}

#contact .input_text,
#contact textarea {
  margin-bottom: 20px;
  border: 2px solid #fff;
  padding: 8px;
  width: 360px;
  font-size: 16px;
  color: #fff;
  background: transparent;
}

#contact textarea {
  width: 600px;
  min-height: 200px;
  resize: vertical;
}

#contact #submit {
  margin-top: 10px;
  font-weight: bold;
  font-size: 16px;
  text-transform: uppercase;
  color: #333;
  background-color: #fff;
  padding: 10px 15px;
  border: 0;
  cursor: pointer;
}

#contact #submit:hover {
  background-color: #ddd;
}

.pong {
  position: fixed;
  z-index: 20;
  bottom: 10px;
  right: 10px;
}

.pong-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.pong-modal.is-open {
  display: flex;
}

.pong-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.pong-modal__panel {
  position: relative;
  background: #0b0b0b;
  border: 2px solid #fff;
  width: min(860px, 90vw);
  height: min(560px, 80vh);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pong-modal__panel iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.pong-modal__close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 3;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

/* Mobile */
@media only screen and (max-width: 760px) {
  body.mobile #header {
    display: none;
  }

  .sectionContent {
    padding: 60px 0;
  }

  #home .sectionContent,
  #about .sectionContent {
    width: 90%;
  }

  #about .text {
    text-align: left;
  }

  .work-group {
    height: auto;
    min-height: 0;
    margin-bottom: 40px;
  }

  #work .grid-wrapper > li.half {
    float: none;
    width: 100%;
    height: auto;
  }

  #work .grid-pic,
  #work .grid-1,
  #work .grid-2,
  #work .grid-3 {
    width: 100%;
    height: 200px;
  }

  #work .grid-2,
  #work .grid-3 {
    float: none;
  }

  #work .grid-details {
    position: static;
    width: 100%;
    height: auto;
    display: none;
    margin-top: 10px;
    max-height: none;
    overflow: visible;
    opacity: 1;
  }

  #work .grid-details.open {
    display: block;
  }

  #work .details-controls {
    display: none;
  }

  #work .details-wrapper {
    padding: 20px;
    height: auto;
    overflow-y: auto;
    box-sizing: border-box;
    display: block;
  }

  #media {
    display: none;
  }

  #home {
    display: none;
  }

  #contact #contactForm .left-column,
  #contact #contactForm .right-column {
    float: none;
    margin-left: 0;
  }

  #contact .input_text,
  #contact textarea {
    width: 100%;
  }
}
