/* GLOBAL DEFAULTS */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
    "Lucida Sans", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

/* HERO */

.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 25px;
  background-color: #111;
}

/* HERO BACKGROUND AND GRADIENT OVERLAY */
.hero-bg {
  position: absolute;
  width: 100%;
  height: 100%;

  background:
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.75)),
    url("images/photona-vision/UNCSA Photona 24-12-13 00023 copy.jpg")
    center/cover no-repeat;

  z-index: 0;

  opacity: 0;

  transition: opacity 1.2s ease;
}

.hero-bg.loaded {
  opacity: 1;
}

/* HERO CONTENT */
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 60px;

  /* FADE IN FROM BELOW */
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 2s ease forwards;
}

/* HEADSHOT */
.headshot {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
}

/* NAME AND SUBTITLE */
.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-text h1 {
  font-size: 3.5rem;
  color: white;
}

.hero-text h2 {
  font-size: 1.6rem;
  font-weight: normal;
  color: #ddd;
  margin-top: 5px;
}

/* HERO ENTRANCE ANIMATION */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* HERO LAYOUT: UP TO 768PX */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .headshot {
    width: 200px;
    height: 200px;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }
}

/* CONTENT */

.category {
  padding: 80px 40px;
  background: #f5f5f5;
  margin-top: -60px;
  border-radius: 40px 40px 0 0;
}

/* HOME PAGE CATEGORY HEADINGS */
.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.category-header h2 {
  font-size: 2rem;
  text-align: center;
}

/* VIEW ALL LINKS */
.view-all {
  text-decoration: none;
  color: #111;
  border-bottom: 1px solid #111;
  padding-bottom: 2px;
  transition: 0.3s;
}

.view-all:hover {
  opacity: 0.6;
}

/* IMAGES */

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

/* GALLERY LAYOUT: 600–799PX, WITH THE FIRST IMAGE SPANNING BOTH COLUMNS */
@media (min-width: 600px) and (max-width: 799px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery .item:first-child {
    grid-column: span 2;
    height: 350px;
  }

  .gallery .item:not(:first-child) {
    height: 200px;
  }
}

/* GALLERY LAYOUT: 800PX AND WIDER, WITH COLUMNS SIZED TO FIT */
@media (min-width: 800px) {
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .gallery .item:first-child {
    grid-column: span 1;
  }
}

/* GALLERY ITEMS AND HOVER EFFECTS */
.item {
  position: relative;
  overflow: hidden;
  height: 220px;
}

.item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item:hover img {
  transform: scale(1.05);
}

.item:hover .overlay {
  opacity: 1;
}

/* IMAGE HOVER OVERLAY */
.overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 15px;
  background: rgba(0, 0, 0, 0.5);
  color: white;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  transition: 0.3s;
}

/* THIN HERO BANNER */

/* PAGE HEADERS AND BACKGROUND IMAGES */
.sub-hero {
  position: relative;
  height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sub-hero-bg-lighting {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)),
    url("images/senior-cab/IMG_6596.jpg") center/cover no-repeat;
  z-index: 0;
}

.sub-hero-bg-projects {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)),
    url("images/dmx-tester/IMG_6336.jpg") center/cover no-repeat;
  z-index: 0;
}

.sub-hero-bg-artwork {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)),
    url("images/disposable/Disposable.png") center/cover no-repeat;
  z-index: 0;
}

/* PAGE TITLES */
.sub-hero h1 {
  position: relative;
  z-index: 1;
  color: white;
  font-size: 3rem;
  text-align: center;
}

/* PROJECT HEADINGS AND SPACING */
.project {
  max-width: 800px;
  margin: 60px auto;
}

.project h2 {
  margin-bottom: 20px;
  text-align: center;
}

.project h3 {
  margin-bottom: 20px;
  text-align: center;
  font-size: 1rem;
  font-weight: normal;
  color: #666;
  letter-spacing: 0.5px;
}

/* TEAM */

.team {
  margin-top: 20px;
}

/* TEAM HEADING */
.team strong {
  display: block;
  text-align: center;
  margin-bottom: 15px;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* TEAM LIST */
.team ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 20px;

  list-style: none;
  padding: 0;
  margin: 0 auto;

  max-width: 1000px;
}

/* TEAM MEMBER LAYOUT */
.team li {
  display: grid;
  grid-template-columns: 180px 1fr;
}

/* MEMBER NAME */
.name {
  font-weight: 500;
  white-space: nowrap;
}

/* MEMBER ROLE */
.role {
  text-align: right;
  color: #666;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* TEAM ALIGNMENT: 901PX AND WIDER */
@media (min-width: 901px) {
  .team ul li:nth-child(odd) {
    text-align: left;
  }

  .team ul li:nth-child(even) {
    text-align: right;
  }
}

/* TEAM LAYOUT: UP TO 900PX, WITH A SINGLE COLUMN */
@media (max-width: 900px) {
  .team ul {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .team li {
    grid-template-columns: 1fr;
    text-align: center;
    max-width: 400px;
  }

  .name {
    white-space: normal;
  }

  .role {
    text-align: center;
    margin-top: 2px;
  }
}

/* TEAM LAYOUT: UP TO 600PX */
@media (max-width: 600px) {
  .team ul {
    grid-template-columns: 1fr;
  }
}

/* MODAL */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal img {
  max-width: 90%;
  max-height: 90%;
}

.modal.active {
  display: flex;
}

.close {
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}

/* NAV */

/* DESKTOP NAV ALIGNMENT */
.nav {
  position: fixed;
  top: 0;
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 40px;
  flex-wrap: wrap;

  min-height: 70px;
  height: auto;

  padding: 0 40px;

  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);

  z-index: 1000;

  /* REVEAL NAV AT CATEGORY SCROLL THRESHOLD */
  opacity: 0;
  transform: translateY(-100%);

  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

/* NAVIGATION LOGO */

.logo {
  height: 60px;
  width: auto;
  display: block;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

/* NAVIGATION LINKS */

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav a {
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS",
    sans-serif;
  text-decoration: none;
  color: #111;
  font-size: 0.95rem;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.nav a:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* MOBILE MENU BUTTON */

.menu-toggle {
  display: none;

  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;

  width: 40px;
  height: 40px;

  background: transparent;
  border: none;
  cursor: pointer;

  padding: 0;
}

.menu-toggle span {
  width: 26px;
  height: 2px;

  background: #111;
  border-radius: 10px;

  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ACTIVE MENU BUTTON: TURN THE THREE BARS INTO AN X */

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* NAVIGATION LAYOUT: UP TO 768PX */

@media (max-width: 768px) {
  .nav {
    padding: 10px 20px;
    column-gap: 20px;
    justify-content: space-between;
  }

  .logo {
    height: 50px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    width: 100%;
    flex-basis: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;

    max-height: 0;
    overflow: hidden;

    opacity: 0;

    padding: 0;

    transition:
      max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.3s ease,
      padding 0.3s ease;
  }

  .nav-links.active {
    max-height: 400px;
    opacity: 1;
    padding: 25px 0 20px;
  }

  .nav-links a {
    font-size: 1.1rem;

    opacity: 0;
    transform: translateY(-10px);

    transition:
      opacity 0.4s ease,
      transform 0.4s ease;
  }

  .nav-links.active a {
    opacity: 1;
    transform: translateY(0);
  }

  /* STAGGER LINK ENTRANCES WHEN THE MOBILE MENU OPENS */

  .nav-links.active a:nth-child(1) {
    transition-delay: 0.05s;
  }

  .nav-links.active a:nth-child(2) {
    transition-delay: 0.1s;
  }

  .nav-links.active a:nth-child(3) {
    transition-delay: 0.15s;
  }

  .nav-links.active a:nth-child(4) {
    transition-delay: 0.2s;
  }

  .nav-links.active a:nth-child(5) {
    transition-delay: 0.25s;
  }

  .nav-links.active a:nth-child(6) {
    transition-delay: 0.3s;
  }
}
