/* Base */

body {
  background-color: #171717;
  color: #fff;
  font-family: Futura, sans-serif;
  margin: 0;
}

/* =========================
   HEADER
   ========================= */

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  padding: 16px 24px;
  column-gap: 32px;
}

/* Logo */

.logo-link {
  justify-self: center;
}

.site-logo {
  height: 150px;
  width: auto;
  display: block;
}

/* Navigation */

.site-nav {
  display: flex;
  gap: 24px;
}

.site-nav-left {
  justify-self: start;
}

.site-nav a {
  text-decoration: none;
  color: #fff;
  font-weight: 400;
  opacity: 0.85;
}

.site-nav a:hover {
  opacity: 1;
}

/* Socials (container must be flex or icons stack) */

.site-social {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
}

.site-social-wrap {
  justify-self: end;
}

.site-social a {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;

  color: #fff;
  opacity: 0.85;
}

.site-social a:hover {
  opacity: 1;
}

.site-social svg {
  width: 20px;
  height: 20px;
  display: block;

  fill: currentColor;
}

/* Burger toggle */

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

/* =========================
   PORTFOLIO GRID
   ========================= */

.portfolio {
  padding: 32px;
  max-width: 1920px;
  margin: 0 auto;
}

.covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.cover-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.cover-item {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.cover {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.cover-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.cover-text {
  color: #000;
  font-size: 2rem;
  letter-spacing: 0.05em;
}

/* =========================
   PROJECT PAGES
   ========================= */

.project {
  max-width: 1000px;
  margin: 0 auto 120px;
  padding: 0 24px;
}

.project-title {
  text-align: center;
  margin: 48px 0 64px;
}

.project-section {
  text-align: center;
  margin-bottom: 64px;
}

.project-section h2 {
  margin-bottom: 12px;
}

.project-section p {
  margin-bottom: 16px;
  line-height: 1.6;
}

p {
  font-weight: 400;
}
/* Video embed */

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin: 24px 0;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
}

.video-embed.vertical {
  padding-top: 177.78%; /* 9:16 */
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* =========================
   ABOUT
   ========================= */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
}

.about-text {
  margin-top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.about-text h1,
.about-text h2,
.about-text h3 {
  margin-top: 0;
}

/* =========================
   FOOTER
   ========================= */

.site-footer {
  padding: 48px 24px;
  display: flex;
  justify-content: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #fff;
  opacity: 0.85;
}

.footer-social a:hover {
  opacity: 1;
}

.footer-social svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.site-footer .site-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

/* =========================
   CONTACT
   ========================= */

.contact-box {
  max-width: 520px;
  margin: 0 auto;
}

.contact-box form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-box label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  gap: 6px;
}

.contact-box input,
.contact-box textarea {
  background-color: #111;
  border: 1px solid #333;
  color: #fff;
  padding: 12px;
  font-family: inherit;
  font-size: 1rem;
}

.contact-box input:focus,
.contact-box textarea:focus {
  outline: none;
  border-color: #fff;
}

.contact-box button {
  margin-top: 12px;
  align-self: flex-start;

  background: #fff;
  color: #000;
  border: 0;
  font-weight: 600;

  padding: 12px 24px;
  font-size: 0.9rem;
  cursor: pointer;

  border-radius: 999px; /* fully pill-shaped */
}

.contact-box button:hover {
  opacity: 0.85;
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 768px) {
  /* Closed header */
  .site-header {
    grid-template-columns: 1fr auto 1fr;
    padding: 12px 16px;
    row-gap: 0;
    position: relative;
    z-index: 50;
  }

  .logo-link {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
  }

  .nav-toggle {
    display: block;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    position: relative;
    z-index: 60;
  }

  /* Hide nav + socials when closed */
  .site-nav,
  .site-social-wrap {
    display: none;
  }

  .site-logo {
    height: 90px;
  }

  /* Fullscreen overlay when open */
  .site-header.is-open {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(23, 23, 23, 0.98);
    padding: 16px;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto 1fr auto;
    align-content: start;
  }

  /* Keep logo top centre in overlay */
  .site-header.is-open .logo-link {
    grid-row: 1;
    grid-column: 2;
  }

  /* Centred nav in overlay */
  .site-header.is-open .site-nav {
    display: flex !important;
    grid-row: 2;
    grid-column: 1 / -1;

    flex-direction: column;
    justify-content: center;
    align-items: center;

    justify-self: center !important;
    width: 100%;
    text-align: center;
  }

  .site-header.is-open .site-nav a {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 1.4rem;
    opacity: 1;
  }

  /* Socials pinned to bottom */
  .site-header.is-open .site-social-wrap {
    display: flex !important; /* make sure it shows */
    grid-row: 3;
    grid-column: 1 / -1;

    justify-self: stretch; /* override desktop justify-self:end */
    width: 100%; /* make it span full width */

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

    padding-bottom: 12px;
  }
  .site-header.is-open .site-social {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
  }

  /* Portfolio grid: 1 column on mobile */
  .covers {
    grid-template-columns: 1fr;
  }

  /* Optional: mobile type scaling */
  .project-title {
    font-size: 1.75rem;
  }

  .project-section h2 {
    font-size: 1.25rem;
  }

  .project-section p {
    font-size: 1rem;
  }

  .site-footer {
    padding: 32px 16px;
  }

  .footer-social {
    gap: 20px;
  }
  .video-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .about-text p {
    margin: 0 auto;
    text-align: left;
  }

  .about-image img {
    max-width: 100%;
    height: auto;
  }
  .contact-box {
    padding: 24px 16px;
  }

  .contact-box button {
    width: 100%;
    text-align: centre;
  }
}
