:root {
  --bg: #1e1e1e;
  --accent: #daff77;
  --white: #ffffff;
  --overlay: rgba(30, 30, 30, 0.8);
  --container: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--accent);
  font-family: "Lexend", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.3;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--accent);
  font-weight: 500;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  transform: translateY(-150%);
  background: var(--white);
  color: var(--bg);
  padding: 0.75rem 1rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.site-header {
  padding: 2rem 0;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  width: 176px;
}

.logo-link img {
  width: 176px;
  height: auto;
  max-height: 56px;
  object-fit: contain;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
  font-size: 20px;
}

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent);
  transition: color 180ms ease;
}

.nav-link::before,
.mobile-link::before {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  line-height: 1;
}

.icon-archive::before {
  content: "📷";
}

.icon-mach::before {
  content: "😍";
}

.icon-factory::before {
  content: "📁";
}

.icon-contact::before {
  content: "☎️";
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--white);
}

.menu-toggle {
  display: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font: inherit;
  height: 24px;
  padding: 0;
  width: 24px;
}

.menu-toggle span {
  display: block;
  position: relative;
  height: 24px;
  width: 24px;
}

.menu-open::before,
.menu-open::after,
.menu-close::before,
.menu-close::after {
  content: "";
  position: absolute;
  left: 3px;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.menu-open::before {
  top: 8px;
}

.menu-open::after {
  top: 15px;
}

.menu-close::before {
  top: 11px;
  transform: rotate(45deg);
}

.menu-close::after {
  top: 11px;
  transform: rotate(-45deg);
}

.menu-toggle .menu-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .menu-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .menu-close {
  display: inline;
}

.mobile-menu {
  display: none;
}

.main-content {
  padding-top: 0;
}

.intro {
  margin-bottom: 1.5rem;
}

.intro-title,
.page-title,
.contact-heading,
.project-title {
  margin: 0;
  color: var(--accent);
  font-size: clamp(1.539rem, 1.124rem + 2.075vw, 2.369rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
}

.intro-title span {
  color: var(--white);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  padding-bottom: 4rem;
}

.project-card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #2b2b2b;
  color: var(--white);
}

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

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--overlay);
  opacity: 0;
  transition: opacity 300ms ease;
}

.project-card-title {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1rem;
  color: var(--white);
  font-size: clamp(1.155rem, 1.066rem + 0.446vw, 1.333rem);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  opacity: 0;
  transition: opacity 300ms ease;
}

.project-card:hover::after,
.project-card:focus-visible::after,
.project-card:hover .project-card-title,
.project-card:focus-visible .project-card-title {
  opacity: 1;
}

.site-footer {
  padding: 0 0 2rem;
  color: var(--white);
  font-size: 1rem;
}

.footer-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
}

.copyright {
  justify-self: end;
}

.page-copy {
  color: var(--white);
  padding-bottom: 4rem;
}

.page-title {
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 0;
}

.profile-media {
  margin: 0 0 20px;
}

.profile-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.about-text {
  padding: 0 8%;
}

.about-text p,
.contact-page p,
.project-copy {
  margin: 0 0 2rem;
}

.contact-page {
  max-width: var(--container);
}

.contact-heading {
  margin-bottom: 1.5rem;
}

.project-page {
  padding-bottom: 4rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--accent);
  font-size: 20px;
}

.back-link:hover {
  color: var(--white);
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.project-media {
  margin: 0;
}

.project-media img,
.project-video {
  width: 100%;
  height: auto;
  background: #000000;
}

.video-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  color: var(--accent);
  font-size: clamp(1.155rem, 1.066rem + 0.446vw, 1.333rem);
  text-align: center;
}

.project-meta {
  color: var(--white);
}

.project-meta .project-title {
  margin-bottom: 0.9rem;
}

.project-logo-card {
  display: flex;
  align-items: center;
  min-height: 3.1rem;
  margin-bottom: 0.42rem;
  padding: 0.45rem 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 6px;
}

.project-logo-card img {
  width: auto;
  max-width: 128px;
  max-height: 34px;
}

.project-facts {
  display: grid;
  gap: 0.42rem;
  margin-bottom: 1.2rem;
}

.project-fact {
  margin: 0;
  padding: 0.42rem 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 6px;
  color: var(--accent);
  font-size: 17px;
  line-height: 1.3;
}

.project-fact-label {
  color: var(--accent);
  font-weight: 500;
}

.project-fact-value {
  color: var(--white);
  font-weight: 300;
}

.project-description .project-copy {
  margin-bottom: 1rem;
  color: var(--white);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.55;
}

.source-link {
  color: var(--accent);
}

.source-link:hover {
  color: var(--white);
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 2rem;
}

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

@media (max-width: 1023px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .container {
    width: min(100% - 2rem, var(--container));
  }

  .site-header {
    padding: 1.5rem 0;
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    position: relative;
    z-index: 5;
  }

  .mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 4;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(30, 30, 30, 0.94);
    padding: 8.5rem 2rem 2rem;
    font-size: 20px;
  }

  .mobile-menu.is-open {
    display: flex;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .footer-row {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .copyright {
    justify-self: center;
    margin-top: 1rem;
  }

  .about-layout,
  .project-hero {
    grid-template-columns: 1fr;
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }

  .about-text {
    padding: 0;
  }
}
