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

html {
  scroll-behavior: smooth;
  background: #ffffff;
}

body {
  background: #ffffff;
  color: #000000;
  font-family: "Courier New", Courier, monospace;
  font-size: 8pt;
  line-height: 1.6;
}

/* ---------- NAV ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  gap: 32px;
  align-items: baseline;
  padding: 24px 32px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(2px);
}

.nav-name {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: inherit;
  text-decoration: none;
}

.nav-link {
  color: #000000;
  text-decoration: none;
}

.nav-link:hover,
.nav-link:focus-visible {
  text-decoration: underline;
}

/* ---------- ABOUT ---------- */

.about {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.about-overlay {
  position: absolute;
  top: auto;
  bottom: -18%;
  left: 50%;
  transform: translateX(-50%);
  width: min(1400px, 90vw);
  max-width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.about-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  text-align: center;
}

.about-content p {
  margin-bottom: 28px;
}

.about-content p:last-child {
  margin-bottom: 0;
}

.section-heading {
  text-transform: uppercase;
  margin-bottom: 20px;
}

.education-list {
  line-height: 1.8;
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: #000000;
  text-decoration: none;
  font-size: 14pt;
  z-index: 2;
  animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

/* ---------- WORKS ---------- */

.works {
  padding: 48px 32px 140px;
}

.works-layout {
  display: flex;
  align-items: flex-start;
  gap: 56px;
  max-width: 1600px;
  margin: 0 auto;
}

/* client sidebar (vertical, sticky) */

.client-sidebar {
  position: sticky;
  top: 140px;
  flex-shrink: 0;
  width: 180px;
}

.client-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.client-list li {
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.works.has-active-client .client-list li {
  opacity: 0.35;
}

.works.has-active-client .client-list li:hover,
.client-list li.is-tapped,
.client-list li.is-lit {
  opacity: 1;
}

.client-name {
  text-decoration: none;
}

.works.has-active-client .client-list li:hover .client-name,
.client-list li.is-tapped .client-name,
.client-list li.is-lit .client-name {
  text-decoration: underline;
}

.client-role {
  display: block;
  text-transform: none;
  text-decoration: none !important;
  color: #666666;
  font-size: 7pt;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease;
}

.works.has-active-client .client-list li:hover .client-role,
.client-list li.is-tapped .client-role,
.client-list li.is-lit .client-role {
  max-height: 40px;
  opacity: 1;
  margin-top: 2px;
  text-decoration: none;
}

/* mosaic grid */

.works-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.work-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.work-images {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.image-row {
  display: flex;
  gap: 8px;
}

.image-row .work-item {
  flex: 1;
  min-width: 0;
}

.work-images .work-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-item {
  display: flex;
  flex-direction: column;
  transition: opacity 0.4s ease;
}

.works.has-active-client .work-item {
  opacity: 0.15;
}

.works.has-active-client .work-item.is-active {
  opacity: 1;
}

/* default (nessun hover attivo): solo i video Prada sono a piena
   opacità e in movimento, gli altri restano opachi/fermi */
.work-flow .work-item:not([data-client="Prada"]) video.work-media {
  opacity: 0.35;
}

.work-flow .work-item[data-client="Prada"] video.work-media {
  opacity: 1;
}

.work-item video.work-media {
  transition: opacity 0.4s ease;
}

.works.has-active-client .work-flow .work-item video.work-media {
  opacity: 1;
}

.work-item {
  min-width: 0;
}

.work-media {
  aspect-ratio: 9 / 16;
  overflow: hidden;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-media.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #000000;
  color: #999999;
  text-transform: uppercase;
  font-size: 7pt;
  text-align: center;
  padding: 8px;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 900px) {
  .work-flow {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .nav {
    padding: 16px;
    gap: 20px;
  }

  .about {
    padding: 96px 16px 64px;
  }

  .works {
    padding: 40px 16px 96px;
  }

  .works-layout {
    flex-direction: column;
    gap: 32px;
  }

  .client-sidebar {
    position: static;
    width: 100%;
  }

  .client-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 20px;
  }

  .work-flow {
    grid-template-columns: repeat(2, 1fr);
  }

  .image-row {
    flex-wrap: wrap;
  }

  .image-row .work-item {
    flex: 1 1 45%;
  }
}

/* ---------- CONTACT PAGE ---------- */

.contact-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.contact-page-email {
  font-size: inherit;
}

.contact-page-email a {
  color: inherit;
  text-decoration: none;
}

.contact-page-email a:hover {
  text-decoration: underline;
}

/* ---------- NIGHT SHIFT ---------- */

.night-toggle {
  position: fixed;
  bottom: 24px;
  left: 32px;
  z-index: 20;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  text-transform: lowercase;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.3s ease, color 0.3s ease;
  opacity: 0.6;
}

.night-toggle:hover {
  opacity: 1;
  text-decoration: underline;
}

body.night {
  background: #000000;
  color: #ffffff;
  transition: background 0.4s ease, color 0.4s ease;
}

html.night-html {
  background: #000000;
}

body.night .nav {
  background: rgba(0, 0, 0, 0.85);
}

body.night .nav-link {
  color: #ffffff;
}

body.night .night-toggle {
  color: #ffffff;
}

body.night .about-overlay {
  filter: invert(1);
  mix-blend-mode: screen;
}

body.night .scroll-cue {
  color: #ffffff;
}

body.night .client-role {
  color: #aaaaaa;
}

body.night .work-media.placeholder {
  border-color: #ffffff;
  color: #777777;
}

body.night .image-row,
body.night .work-flow {
  /* i contenuti video/foto restano invariati, solo lo sfondo cambia */
}

/* ---------- MOTION ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scroll-cue {
    animation: none;
  }

  .about-overlay {
    display: none;
  }
}
