/* Overall Fomatting */
:root {
  --header-dark: #141414; /* main header */
  --header-light: #2b2b2b; /* section headers */
  --body-grey: #4a4a4a; /* page body */
  --card-grey: #5c5c5c; /* image placeholders */
  --panel-grey: #3d3d3d; /* text panel under card images */
  --text: #ffffff;
  --link: #9cc9ff; /* blue links */
  --gap: 2.5rem;
  --max-width: 1280px;
  --side-pad: 1.25rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--body-grey);
  color: var(--text);
  font-family:
    Inter,
    "Segoe UI",
    system-ui,
    -apple-system,
    Helvetica,
    Arial,
    sans-serif;
  line-height: 1.6;
}

strong {
  font-weight: 700;
}
a {
  color: var(--link);
}
a:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}

/* Header Fomatting */
.site-header {
  background: var(--header-dark);
  text-align: center;
  padding: 3.5rem var(--side-pad);
}
.site-header h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 1.1;
  font-weight: 700;
}
.site-header p {
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  margin-top: 0.5rem;
  font-weight: 400;
}

/* Section Header Formatting */
.section-header {
  background: var(--header-light);
  padding: 1rem var(--side-pad);
  text-align: center;
}
.section-header h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 600;
}

.section-body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem var(--side-pad);
}

/* Grid Formatting */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 2.5rem;
}

.card {
  background: var(--panel-grey);
  display: flex;
  flex-direction: column;
}
.card .media {
  aspect-ratio: 1 / 1;
  background: var(--card-grey);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card .media img.fit-contain {
  object-fit: contain;
}
.card .text {
  padding: 1.25rem 1.5rem 1.5rem;
  font-size: 1.15rem;
}
.card .text p + p {
  margin-top: 0.6rem;
}

/* Featured Work Formatting */
.grid.featured {
  grid-template-columns: minmax(0, 800px);
  justify-content: center;
}
.grid.featured .card .media {
  aspect-ratio: 16 / 9;
}
.grid.featured .card .text {
  font-size: 1.4rem;
  padding: 1.75rem 2rem 2rem;
}

/* Footer Formatting*/
.site-footer {
  background: var(--header-dark);
  padding: 3rem var(--side-pad) 3.5rem;
  text-align: center;
  margin-top: 2rem;
}
.site-footer h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 600;
  margin-bottom: 2rem;
}
.footer-list {
  list-style: none;
  font-size: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 4rem;
}

/* Contact Me Section Formatting */
.footer-list.three-two {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-list.three-two li {
  grid-column: span 2;
  min-width: 0;
  overflow-wrap: anywhere;
}
.footer-list.three-two li:nth-child(4) {
  grid-column: 2 / span 2;
}
.footer-list.three-two li:nth-child(5) {
  grid-column: 4 / span 2;
}

/* Description Formatting */
.detail {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.detail h2 {
  font-size: 1.9rem;
  margin-bottom: 0.75rem;
}
.detail p {
  font-size: 1.3rem;
  max-width: 100ch;
  text-wrap: pretty;
}
.detail p + p {
  margin-top: 1rem;
}

.media-box,
.media-box-2,
.media-box-3 {
  background: var(--card-grey);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100%;
}

.media-box img,
.media-box video,
.media-box iframe,
.media-box-2 img,
.media-box-2 video,
.media-box-2 iframe,
.media-box-3 img,
.media-box-3 video,
.media-box-3 iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  display: block;
}

.media-box-2 {
  aspect-ratio: 1299 / 938;
}

.media-box-3 {
  aspect-ratio: 1285 / 289;
}

/* Media Formatting for aligning to different sides on project description pages */
.split {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 2.5rem;
  align-items: start;
}
.split h2 {
  line-height: 1.1;
}

/* Text formatting for aligning to different sides on project description pages */
.about-group {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.split.flip {
  grid-template-columns: 7fr 5fr;
}
.split.flip .media-box {
  order: -1;
}
.split .media-box {
  aspect-ratio: 16 / 9;
}

/* Media Formatting */
.wide-video {
  aspect-ratio: 21 / 9;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
.stack .media-box {
  aspect-ratio: 16 / 9;
}

/* Mobile Formatting */
@media (max-width: 800px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .split,
  .split.flip {
    grid-template-columns: 1fr;
  }
  .split.flip .media-box {
    order: 0;
  }
}
@media (max-width: 520px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 800px) {
  .footer-list.three-two {
    grid-template-columns: 1fr;
  }
  .footer-list.three-two li,
  .footer-list.three-two li:nth-child(4),
  .footer-list.three-two li:nth-child(5) {
    grid-column: auto;
  }
}
