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

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: #121212;
  scrollbar-gutter: stable;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(227, 227, 227, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(227, 227, 227, 0.5);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(227, 227, 227, 0.3) transparent;
}

/* Typography */
body {
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  color: #e3e3e3;
}

h1,
h2,
h3,
h4,
h5,
h6,
button {
  font-weight: 500;
}

/* Split text chars */
.split-char {
  display: inline-block;
}

#smooth-wrapper {
  overflow: hidden;
  position: fixed;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
}

#smooth-content {
  overflow: visible;
  width: 100%;
}

/* Page transition */
.page-transition-bg {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  background: #e3e3e3;
  z-index: 9990;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 2rem;
}

.transition-overlay__text {
  font-family: "Inter", sans-serif;
  font-size: clamp(3rem, 7vw, 8rem);
  font-weight: 500;
  color: #121212;
  line-height: 0.9;
}

.page-wrap {
  position: relative;
  z-index: 1;
  background: #121212;
  min-height: 100vh;
  min-height: 100lvh;
}

/* Loading overlay */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  background: #e3e3e3;
  z-index: 9998;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 2rem;
  transform-origin: top;
}

.loader__counter {
  font-family: "Inter", sans-serif;
  font-size: clamp(3rem, 7vw, 8rem);
  font-weight: 500;
  color: #121212;
  line-height: 0.9;
}

/* Sezioni comuni */
.section {
  width: 100%;
  height: 100vh;
  height: 100lvh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}


/* Navigazione */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 200;
  mix-blend-mode: difference;
  color: #fff;
}

.nav__name {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  font-weight: 500;
  transition: opacity 0.3s, color 0.1s;
  color: inherit;
}

.nav__name .btn-wrap {
  display: block;
  position: relative;
  overflow: hidden;
}

.nav__name .btn-text {
  display: block;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.nav__name .btn-text--clone {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.nav__name:hover .btn-text {
  transform: translateY(-100%);
}

.nav__name:hover .btn-text--clone {
  transform: translateY(0);
}

.nav__links {
  display: none;
}

.nav__link {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  color: inherit;
  text-decoration: none;
}

.nav__link .btn-wrap {
  display: block;
  position: relative;
  overflow: hidden;
}

.nav__link .btn-text {
  display: block;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.nav__link .btn-text--clone {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.nav__link:hover .btn-text {
  transform: translateY(-100%);
}

.nav__link:hover .btn-text--clone {
  transform: translateY(0);
}

.nav__menu {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  color: inherit;
  cursor: pointer;
}


.nav.open .nav__name {
  opacity: 0;
  pointer-events: none;
}

/* Overlay menu mobile */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #121212;
  z-index: 190;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-100%);
  pointer-events: none;
  will-change: transform;
}

.nav-overlay.open {
  pointer-events: auto;
}

.nav-overlay__menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.nav-overlay__link {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  font-weight: 500;
  color: #e3e3e3;
  text-decoration: none;
}

/* Hero - Sezione 1 */
.section--hero {
  background: #121212;
  flex-direction: column;
  gap: 2rem;
  align-items: stretch;
  padding: 8rem 1rem 0;
  height: auto;
  margin-bottom: 10rem;
}

.hero__row {
  padding: 0;
}

.hero__row--video {
  padding: 0;
  position: relative;
  overflow: hidden;
  margin-top: 2rem;
}

.accent {
  color: #FF6F00;
}

.hero__title {
  font-size: clamp(3rem, 7vw, 8rem);
  line-height: 0.9;

  display: flex;
  flex-direction: column;
}

.hero__title-line {
  display: block;
}

.hero__title-line--left {
  text-align: left;
}

.hero__title-line--right {
  text-align: right;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero__paragraph {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  line-height: 1.5;
  font-weight: 500;
  max-width: 70%;
  text-align: left;
}

.hero__row--actions {
  display: flex;
  gap: 16px;
}

.hero__btn {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  background: #e3e3e3;
  color: #121212;
  border: none;
  padding: 16px 32px;
  border-radius: 2rem;
  cursor: pointer;
}

.hero__btn .btn-wrap {
  display: block;
  position: relative;
  overflow: hidden;
}

.hero__btn .btn-text {
  display: block;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.hero__btn .btn-text--clone {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.hero__btn:hover .btn-text {
  transform: translateY(-100%);
}

.hero__btn:hover .btn-text--clone {
  transform: translateY(0);
}

.hero__row--video {
  display: flex;
  gap: 0;
}

.hero__video-wrapper {
  width: 100%;
  aspect-ratio: 9 / 16;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  margin: 0;
}

.hero__video-reveal {
  width: 100%;
  height: 100%;
  position: relative;
}

.hero__video {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Video placeholder (hero) */
.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #1a1a1a 0%, #1a1a1a 40%, #252525 50%, #1a1a1a 60%, #1a1a1a 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 2s ease-in-out infinite;
  border-radius: 16px;
}

@keyframes skeleton-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.video-placeholder__text {
  font-family: "Azeret Mono", monospace;
  font-size: clamp(0.85rem, 1.2vw, 1.1rem);
  color: #555;
  text-transform: lowercase;
  letter-spacing: 0.05em;
}

/* Projects carousel (home) */
.projects-carousel {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.projects-carousel__track {
  display: flex;
  gap: 0.75rem;
  height: calc(50% - 0.375rem);
  will-change: transform;
}

.projects-carousel__img {
  height: 100%;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background-size: 115% auto;
  background-position: 50% 50%;
  background-repeat: no-repeat;
}

/* Sezione 2 - Come lavoro */
.section--work {
  background: #121212;
  flex-direction: column;
  align-items: stretch;
  padding: 0 1rem;
  margin-bottom: 10rem;
}

.work__char {
  display: inline-block;
}

.work__row--title {
  padding: 0;
}

.work__title {
  font-size: clamp(3rem, 7vw, 8rem);
  line-height: 0.9;

  text-align: left;
}

.work__row--steps {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 2rem;
}

.work__step {
  flex: 1;
  padding: 0;
}

.work__step-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: flex-start;
  padding-top: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
}


.work__step-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.work__step-num {
  font-size: clamp(1.5rem, 2vw, 4rem);
  line-height: 1.5;

  font-weight: 500;
  width: 40px;
  flex-shrink: 0;
}

.work__step-subtitle {
  font-size: clamp(1.5rem, 4vw, 4rem);
  line-height: 1.5;

  font-weight: 500;
  color: #FF6F00;
}

.work__step-text {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  line-height: 1.5;
  font-weight: 500;
}

/* Sezione 3 - Progetti */
.section--projects {
  background: #121212;
  flex-direction: column;
  align-items: stretch;
  padding: 0 1rem;
  gap: 2rem;
  height: auto;
  margin-bottom: 10rem;
}

.projects__row--header {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
}

.projects__info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.projects__actions {
  display: flex;
  gap: 16px;
}

.projects__title {
  font-size: clamp(3rem, 7vw, 8rem);
  line-height: 0.9;

  text-align: left;
}

.projects__char {
  display: inline-block;
}

.projects__text {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  line-height: 1.5;
  font-weight: 500;
  text-align: left;
}

.projects__row--video {
  width: 100%;
  aspect-ratio: 9 / 16;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  margin-top: 2rem;
}

.projects__video {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Sezione 4 - Timeline */
.section--timeline {
  background: #121212;
  flex-direction: column;
  align-items: stretch;
  padding: 0 1rem;
  margin-bottom: 10rem;
  height: auto;
}

.timeline__row--title {
  padding: 0;
}

.timeline__title {
  font-size: clamp(3rem, 7vw, 8rem);
  line-height: 0.9;

  text-align: left;
}

.timeline__char {
  display: inline-block;
}

.timeline__row--grid {
  flex: 1;
  padding: 2rem 0 0;
  display: flex;
  flex-direction: column;
}

.timeline__grid {
  flex: 1;
  display: grid;
  grid-template-columns: auto auto 1fr;
  grid-template-rows: auto auto auto 1fr;
  column-gap: 1rem;
}

.timeline__entry {
  display: contents;
}

.timeline__label {
  writing-mode: vertical-lr;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: clamp(1.5rem, 4vw, 4rem);
  line-height: 1.5;
  font-weight: 500;
  color: #FF6F00;

  display: flex;
  padding-top: 2rem;
  align-items: center;
  justify-content: center;
}

.timeline__label--empty {
  visibility: hidden;
}

.timeline__arrow {
  grid-column: 2;
  grid-row: 1 / -1;
  position: relative;
  width: 1px;
  background: transparent;
  --tip-opacity: 0;
}

.timeline__arrow::before,
.timeline__arrow::after {
  content: "";
  display: block;
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 8px;
  height: 1px;
  background: #e3e3e3;
  opacity: var(--tip-opacity);
  transition: opacity 0.2s;
}

.timeline__arrow::before {
  transform-origin: 100% 50%;
  transform: translateX(-100%) rotate(45deg);
}

.timeline__arrow::after {
  transform-origin: 0% 50%;
  transform: rotate(-45deg);
}

.timeline__arrow--hide {
  display: none;
}

.timeline__text {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  line-height: 1.5;
  font-weight: 500;
  max-width: 70%;
  padding-bottom: 2rem;
  grid-column: 3;
}

.timeline__text--last {
  padding-bottom: 0;
  align-self: end;
}

/* Sezione 5 - Tecnologie */
.section--five {
  background: #121212;
  flex-direction: column;
  align-items: stretch;
  padding: 0 1rem;
  margin-bottom: 10rem;
}

.five__row--title {
  padding: 0;
}

.five__title {
  font-size: clamp(3rem, 7vw, 8rem);
  line-height: 0.9;

  text-align: left;
}

.five__char {
  display: inline-block;
}

.five__row--skills {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 2rem;
}

.five__skills-row {
  display: contents;
}

.five__skill {
  flex: 1;
  padding: 0;
  overflow: hidden;
}

.five__skill-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.five__label {
  font-size: clamp(1.5rem, 4vw, 4rem);
  line-height: 1.5;

  font-weight: 500;
  color: #FF6F00;
}

.five__text {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  line-height: 1.5;
  font-weight: 500;
  color: #e3e3e3;
  /* max-width: 70%; */
}

/* Sezione 6 - Contattami */
.section--contact {
  background: #e3e3e3;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 10rem 1rem;
  gap: 0;
  overflow: hidden;
  height: auto;
}

.contact__row--title {
  padding: 0;
}

.contact__title {
  font-size: clamp(3rem, 7vw, 8rem);
  line-height: 0.9;

  font-weight: 500;
  color: #121212;
  text-align: left;
}

.contact__row--content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  margin-top: 4rem;
  gap: 4rem;
}

.contact__left {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact__text {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  line-height: 1.5;
  font-weight: 500;
  color: #121212;
}


.contact__right {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.contact__link {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  font-weight: 500;
  color: #121212;
  text-decoration: underline;
}

.contact__link .btn-wrap {
  display: block;
  position: relative;
  overflow: hidden;
}

.contact__link .btn-text {
  display: block;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.contact__link .btn-text--clone {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.contact__link:hover .btn-text {
  transform: translateY(-100%);
}

.contact__link:hover .btn-text--clone {
  transform: translateY(0);
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 480px;
  margin-top: 0.5rem;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-form__label {
  font-family: "Azeret Mono", monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: #121212;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-form__input,
.contact-form__textarea {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #121212;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid #121212;
  padding: 0.6rem 0;
  outline: none;
  transition: border-color 0.25s ease;
  border-radius: 0;
  -webkit-appearance: none;
}

.contact-form__textarea {
  resize: vertical;
  min-height: 80px;
}

.contact-form__input:focus,
.contact-form__textarea:focus {
  border-bottom-color: #666;
}

.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
  color: rgba(18, 18, 18, 0.35);
}

.contact-form__actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.contact-form__actions .hero__btn {
  background: #121212;
  color: #e3e3e3;
  text-decoration: none;
}

/* Privacy checkbox */
.contact-form__privacy {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.contact-form__privacy input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1.5px solid #121212;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  margin-top: 0.15em;
  position: relative;
  transition: background 0.2s ease;
}

.contact-form__privacy input[type="checkbox"]:checked {
  background: #121212;
}

.contact-form__privacy input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid #e3e3e3;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.contact-form__privacy label {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #121212;
  line-height: 1.5;
  cursor: pointer;
}

.privacy-link {
  color: #121212;
  text-decoration: underline;
  font-weight: 500;
}

.privacy-link:hover {
  opacity: 0.6;
}

/* Privacy overlay */
.privacy-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  overflow-y: auto;
  overflow-x: hidden;
}

.privacy-overlay.active {
  display: block;
}

.privacy-overlay__header {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  padding: 1rem;
  z-index: 10001;
}

.privacy-overlay__header.active {
  display: block;
}

.privacy-overlay__close {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  color: #e3e3e3;
  cursor: pointer;
  transition: opacity 0.3s;
}

.privacy-overlay__close:hover {
  opacity: 0.6;
}

.privacy-overlay__content {
  padding: 6rem 1rem 100vh;
  color: #e3e3e3;
  font-family: "Inter", sans-serif;
  font-size: clamp(0.9rem, 1vw + 0.4rem, 1.1rem);
  line-height: 1.7;
  font-weight: 400;
  max-width: 720px;
}

.privacy-overlay__content h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  line-height: 1;
  margin-bottom: 3rem;
}

.privacy-overlay__content h2 {
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  font-weight: 500;
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
}

.privacy-overlay__content p {
  margin-bottom: 0.8rem;
}

.privacy-overlay__content ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0.8rem;
}

.privacy-overlay__content ul li {
  padding-left: 1.2em;
  position: relative;
}

.privacy-overlay__content ul li::before {
  content: "\2022";
  position: absolute;
  left: 0;
}

.privacy-overlay__content hr {
  border: none;
  border-top: 1px solid rgba(227, 227, 227, 0.2);
  margin: 2rem 0;
}

.privacy-overlay__content strong {
  font-weight: 600;
}

@media (min-width: 768px) {
  .privacy-overlay__header {
    padding: 2rem;
  }

  .privacy-overlay__content {
    padding: 6rem 2rem 100vh;
  }
}


/* Mirror sezione 2 - Come ragiono */
.mirror-work {
  background: #FF6F00;
  flex-direction: column;
  align-items: stretch;
  padding: 0 1rem;
  margin-bottom: 10rem;

  position: relative;
  overflow: hidden;
}

.mirror-work__row--title {
  padding: 0;
}

.mirror-work__title {
  font-size: clamp(3rem, 7vw, 8rem);
  line-height: 0.9;
  width: fit-content;
  text-align: left;
  color: #121212;
  font-weight: 500;
}

.mirror-work__row--steps {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 2rem;
}

.mirror-work__step {
  flex: 1;
  padding: 0;
}

.mirror-work__step-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: flex-start;
  padding-top: 1rem;
  position: relative;
}

.mirror-work__step-inner::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 1px;
  background: #121212;
}

.mirror-work__step-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.mirror-work__step-num {
  font-size: clamp(1.5rem, 2vw, 4rem);
  line-height: 1.5;

  font-weight: 500;
  width: 40px;
  flex-shrink: 0;
  color: #121212;
}

.mirror-work__step-subtitle {
  font-size: clamp(1.5rem, 4vw, 4rem);
  line-height: 1.5;

  font-weight: 500;
  color: #121212;
}

.mirror-work__step-text {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  line-height: 1.5;
  font-weight: 500;
  color: #121212;
  max-width: 70%;
}

/* Sezioni rosse - parte speculare */
.section--red-1 {
  background: #FF6F00;
  position: relative;
  overflow: hidden;
}

/* Mirror hero */
.mirror-hero {
  padding: 8rem 1rem 0;
  flex-direction: column;
  gap: 2rem;
  align-items: stretch;
  justify-content: flex-start;
  margin-bottom: 10rem;
}

.mirror-hero__row {
  padding: 0;
}

.mirror-hero__row--ascii {
  flex: 1;
  padding: 0;
  padding-right: 5rem;
  margin-top: 2rem;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  overflow: hidden;
}

.mirror-hero__title {
  font-size: clamp(3rem, 7vw, 8rem);
  line-height: 0.9;

  display: flex;
  flex-direction: column;
  color: #121212;
  font-weight: 500;
}

.mirror-hero__title-line {
  display: block;
  width: fit-content;
}

.mirror-hero__title-line--left {
  text-align: left;
}

.mirror-hero__title-line--right {
  text-align: right;
  margin-left: auto;
}

.mirror-hero__paragraph {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  line-height: 1.5;
  font-weight: 500;
  max-width: 70%;
  text-align: left;
  color: #121212;
}

.mirror-hero__ascii {
  font-family: "Azeret Mono", monospace;
  font-size: 10px;
  line-height: 1.2;
  color: #121212;
  font-weight: 500;
  white-space: pre;
  transform-origin: top right;
  width: max-content;
  margin-left: auto;
}

/* Code scroll */
.code-scroll {
  position: absolute;
  overflow: hidden;
}

.code-scroll--h {
  bottom: 0;
  left: 0;
  width: 100%;
  white-space: nowrap;
  display: flex;
}

.code-scroll--v {
  top: 8px;
  right: 64px;
  bottom: calc(8px + 10px);
  width: 10px;
  display: flex;
  flex-direction: column;
}

.code-scroll__text {
  font-family: "Azeret Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  color: #121212;
  line-height: 1;
  flex-shrink: 0;
}

.code-scroll__text--h {
  display: inline-block;
  animation: scroll-left 30s linear infinite;
}

.code-scroll__text--v {
  writing-mode: vertical-lr;
  display: block;
  animation: scroll-up 40s linear infinite;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

@keyframes scroll-up {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-50%);
  }
}

.code-scroll--global-v {
  position: absolute;
  top: 0;
  right: 64px;
  height: 100%;
  width: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.section--red-2 {
  background: #FF6F00;
}

.section--red-3 {
  background: #FF6F00;
}

/* Mirror sezione 3 - Rumore di fondo */
.mirror-projects {
  padding: 0 1rem;
  flex-direction: column;
  gap: 2rem;
  align-items: stretch;
  justify-content: flex-start;
  height: auto;
  margin-bottom: 10rem;
}

.mirror-projects__row {
  padding: 0;
}

.mirror-projects__row--header {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
}

.mirror-projects__info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.mirror-projects__row--ascii {
  flex: 1;
  padding: 0;
  padding-right: 5rem;
  margin-top: 2rem;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  overflow: hidden;
}

.mirror-projects__title {
  font-size: clamp(3rem, 7vw, 8rem);
  line-height: 0.9;

  display: flex;
  flex-direction: column;
  color: #121212;
}

.mirror-projects__title-line {
  display: block;
  width: fit-content;
  text-align: left;
  white-space: nowrap;
}

.mirror-projects__paragraph {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  line-height: 1.5;
  font-weight: 500;
  max-width: 70%;
  text-align: left;
  color: #121212;
}

.mirror-projects__ascii {
  font-family: "Azeret Mono", monospace;
  font-size: 10px;
  line-height: 1.2;
  color: #121212;
  font-weight: 500;
  white-space: pre;
  transform-origin: top right;
  width: max-content;
  margin-left: auto;
}

.section--red-4 {
  background: #FF6F00;
}

/* Mirror sezione 4 - Timeline */
.mirror-timeline {
  flex-direction: column;
  align-items: stretch;
  padding: 0 1rem;
  margin-bottom: 10rem;
}

.mirror-timeline__row--title {
  padding: 0;
}

.mirror-timeline__title {
  font-size: clamp(3rem, 7vw, 8rem);
  line-height: 0.9;
  width: fit-content;
  font-weight: 500;
  color: #121212;
  text-align: left;
}

.mirror-timeline__row--grid {
  flex: 1;
  padding: 2rem 0 0;
  display: flex;
  flex-direction: column;
}

.mirror-timeline__grid {
  flex: 1;
  display: grid;
  grid-template-columns: auto auto 1fr;
  grid-template-rows: auto auto auto 1fr;
  column-gap: 1rem;
}

.mirror-timeline__entry {
  display: contents;
}

.mirror-timeline__label {
  writing-mode: vertical-lr;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: clamp(1.5rem, 4vw, 4rem);
  line-height: 1.5;
  font-weight: 500;
  color: #121212;

  display: flex;
  padding-top: 2rem;
  align-items: center;
  justify-content: center;
}

.mirror-timeline__label--empty {
  visibility: hidden;
}

.mirror-timeline__arrow {
  grid-column: 2;
  grid-row: 1 / -1;
  position: relative;
  width: 1px;
  background: transparent;
  --tip-opacity: 0;
}

.mirror-timeline__arrow::before,
.mirror-timeline__arrow::after {
  content: "";
  display: block;
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 8px;
  height: 1px;
  background: #121212;
  opacity: var(--tip-opacity);
  transition: opacity 0.2s;
}

.mirror-timeline__arrow::before {
  transform-origin: 100% 50%;
  transform: translateX(-100%) rotate(45deg);
}

.mirror-timeline__arrow::after {
  transform-origin: 0% 50%;
  transform: rotate(-45deg);
}

.mirror-timeline__arrow--hide {
  display: none;
}

.mirror-timeline__text {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  line-height: 1.5;
  font-weight: 500;
  color: #121212;
  max-width: 70%;
  padding-bottom: 2rem;
  grid-column: 3;
}

.mirror-timeline__text--last {
  padding-bottom: 0;
  align-self: end;
}

.section--red-5 {
  background: #FF6F00;
}

.mirror-five {
  flex-direction: column;
  align-items: stretch;
  padding: 0 1rem;
  margin-bottom: 10rem;
}

.mirror-five__row--title {
  padding: 0;
}

.mirror-five__title {
  font-size: clamp(3rem, 7vw, 8rem);
  line-height: 0.9;
  width: fit-content;
  font-weight: 500;
  color: #121212;
  text-align: left;
}

.mirror-five__row--skills {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 2rem;
}

.mirror-five__skills-row {
  display: contents;
}

.mirror-five__skill {
  flex: 1;
  padding: 0;
  overflow: hidden;
}

.mirror-five__skill-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1rem;
  padding-bottom: 1rem;
  position: relative;
}

.mirror-five__skill-inner::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 1px;
  background: #121212;
}

.mirror-five__label {
  font-size: clamp(1.5rem, 4vw, 4rem);
  line-height: 1.5;

  font-weight: 500;
  color: #121212;
}

.mirror-five__text {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  line-height: 1.5;
  font-weight: 500;
  color: #121212;
  max-width: 70%;
}

/* Mirror sezione 6 - Contattami */
.section--red-6 {
  background: #121212;
}

.mirror-contact {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 10rem 1rem;
  height: auto;
}

.mirror-contact__row--title {
  padding: 0;
}

.mirror-contact__title {
  font-size: clamp(3rem, 7vw, 8rem);
  line-height: 0.9;
  width: fit-content;
  font-weight: 500;
  color: #FF6F00;
  text-align: left;
}

.mirror-contact__row--content {
  margin-top: 4rem;
  padding: 0;
}

.mirror-contact__text {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  line-height: 1.5;
  font-weight: 500;
  color: #FF6F00;
  max-width: 70%;
}

/* Mirror overlay */
#mirror {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  clip-path: circle(0% at 50% calc(100vh - 40px));
  pointer-events: none;
  background: #FF6F00;
}

/* Pulsante reveal (mobile) */
#reveal-btn {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: 80px;
  height: 80px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  -webkit-touch-callout: none;
  mix-blend-mode: difference;
}

.reveal-btn__circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}

.reveal-btn__text {
  width: 100%;
  height: 100%;
  animation: reveal-spin 8s linear infinite;
}

.reveal-btn__text text {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  fill: #fff;
}

@keyframes reveal-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Lens dock */
.lens-dock {
  display: none;
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 120px;
  height: 120px;
  z-index: 100;
  cursor: pointer;
  mix-blend-mode: difference;
}

.lens-dock__circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}

/* Orange circle overlay — outside lens-dock to avoid mix-blend-mode */
.lens-dock-orange {
  display: none;
  position: fixed;
  bottom: calc(32px + 48px);
  right: calc(32px + 48px);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #FF6F00;
  z-index: 101;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.lens-dock-orange.visible {
  opacity: 1;
}

.lens-dock__text {
  width: 100%;
  height: 100%;
  animation: dock-spin 8s linear infinite;
}

.lens-dock__text text {
  font-family: "Inter", sans-serif;
  font-size: 10px;
  font-weight: 500;
  fill: #fff;
}

@keyframes dock-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== DESKTOP ===== */
@media (min-width: 768px) {

  .lens-dock {
    display: block;
  }

  .lens-dock-orange {
    display: block;
  }

  /* Hide reveal button on desktop */
  #reveal-btn {
    display: none;
  }

  /* Navigazione desktop */
  .nav {
    padding: 2rem;
  }

  .nav__links {
    display: flex;
    gap: 2rem;
  }

  .nav__menu {
    display: none;
  }

  .nav-overlay {
    display: none;
  }

  /* Sezione 1 - Hero */
  .section--hero {
    padding: 8rem 32px 0;
    gap: 2rem;
    flex-direction: column;
    align-items: stretch;
    height: auto;
  }

  .hero__row--video {
    margin-top: 2rem;
  }

  .hero__row {
    padding: 0;
  }

  .hero__title {
    text-align: left;
  }

  .hero__title-line--right {
    text-align: left;
  }

  .hero__paragraph {
    max-width: 70%;
  }

  .hero__row--video {
    display: flex;
  }

  .hero__video-wrapper {
    margin: 0;
    aspect-ratio: 16 / 9;
  }

  /* Margin bottom sezione 1 e mirror 1 */
  .section--hero,
  .mirror-hero {
    margin-bottom: 12rem;
  }

  /* Sezione 2 - Come lavoro */
  .section--work {
    padding: 0 32px;
  }

  .work__row--title {
    padding: 0;
  }

  .work__row--steps {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 2rem;
  }

  .work__step {
    padding: 0;
  }

  .work__step-inner {
    display: grid;
    grid-template-columns: 1fr 2fr 2fr;
    align-items: center;
    gap: 2rem;
    padding: 1rem 0;
  }

  .work__step-head {
    display: contents;
  }

  .work__step-num {
    width: auto;
  }

  .work__step-text {
    max-width: none;
  }

  /* Margin bottom sezione 2 */
  .section--work {
    margin-bottom: 12rem;
  }

  /* Sezione 3 - Progetti */
  .section--projects {
    padding: 0 32px;
    gap: 0;
    margin-bottom: 12rem;
  }

  .projects__row--header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: start;
    gap: 0;
  }

  .projects__title {
    grid-column: 1;
  }

  .projects__info {
    grid-column: 3;
    gap: 2rem;
  }

  .projects__row--video {
    margin-top: 4rem;
    aspect-ratio: 16 / 9;
  }

  /* Sezione 4 - Timeline */
  .section--timeline {
    padding: 0 32px;
    height: auto;
    margin-bottom: 12rem;
  }

  .timeline__row--title {
    padding: 0;
  }

  .timeline__grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
  }

  .timeline__entry {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 2fr;
    align-items: end;
    position: relative;
    padding-bottom: 2rem;
  }

  .timeline__entry::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 1);
    transform: scaleX(var(--line-progress, 0));
    transform-origin: left;
  }

  .timeline__entry--1::after {
    left: 0;
  }

  .timeline__entry--2::after {
    left: 20%;
  }

  .timeline__entry--3::after {
    left: 40%;
  }

  .timeline__entry--4::after {
    left: 60%;
  }

  /* Arrow tip on last entry — chevron pointing right */
  .timeline__entry--4::before {
    content: "";
    position: absolute;
    bottom: -4px;
    right: -1px;
    width: 8px;
    height: 8px;
    border-right: 1px solid #e3e3e3;
    border-bottom: 1px solid #e3e3e3;
    transform: rotate(-45deg);
    opacity: var(--arrow-opacity, 0);
    transition: opacity 0.3s;
  }

  .timeline__label {
    writing-mode: horizontal-tb;
    text-orientation: initial;
    transform: none;
    padding-top: 0;
    justify-content: flex-start;
    text-align: left;
    white-space: nowrap;
  }

  .timeline__entry--1 .timeline__label {
    grid-column: 1;
  }

  .timeline__entry--2 .timeline__label {
    grid-column: 2;
  }

  .timeline__entry--3 .timeline__label {
    grid-column: 3;
  }

  .timeline__entry--4 .timeline__label {
    display: none;
  }

  .timeline__arrow {
    display: none;
  }

  .timeline__text {
    grid-column: 4;
    max-width: none;
    padding-bottom: 0;
  }

  .timeline__text--last {
    align-self: end;
  }

  /* Sezione 5 - Tecnologie */
  .section--five {
    padding: 0 32px;
    margin-bottom: 12rem;
  }

  .five__skills-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 900px;
  }

  .five__skill {
    overflow: visible;
  }

  .five__text {
    max-width: 70%;
  }

  .five__skill-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    border-bottom: none;
    gap: 0.5rem;
    padding: 0;
  }

  .five__row--skills {
    padding: 0;
    gap: 4rem;
    margin-top: 4rem;
  }

  .five__row--title {
    padding: 0;
  }


  /* Sezione 6 - Contattami */
  .section--contact {
    padding: 12rem 32px;
  }

  .contact__row--content {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 8rem;
    gap: 4rem;
  }

  .contact__right {
    margin-top: 0;
  }

  .contact-form {
    max-width: 700px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "nome      messaggio"
      "email     messaggio"
      "recaptcha recaptcha"
      "privacy   privacy"
      "actions   actions";
    gap: 1.5rem 2rem;
  }

  .contact-form__field:nth-child(1) { grid-area: nome; }
  .contact-form__field:nth-child(2) { grid-area: email; }
  .contact-form__field:nth-child(3) {
    grid-area: messaggio;
    display: flex;
    flex-direction: column;
  }
  .contact-form__field:nth-child(3) .contact-form__textarea {
    flex: 1;
    min-height: 120px;
  }

  .contact-form > div[data-netlify-recaptcha] { grid-area: recaptcha; }
  .contact-form__privacy { grid-area: privacy; }
  .contact-form__actions { grid-area: actions; }

  /* Mirror sezione 1 - Hero */
  .mirror-hero {
    padding: 8rem 32px 0;
    gap: 2rem;
  }

  .mirror-hero__row {
    padding: 0;
  }

  .mirror-hero__title {
    font-weight: 500;
  }

  .mirror-hero__row--ascii,
  .mirror-projects__row--ascii {
    display: none;
  }

  /* Mirror sezione 2 - Work */
  .mirror-work {
    padding: 0 32px;
    margin-bottom: 12rem;
  }

  .mirror-work__row--title {
    padding: 0;
  }

  .mirror-work__title {
    font-weight: 500;
  }

  .mirror-work__row--steps {
    display: flex;
    flex-direction: column;
  }

  .mirror-work__step {
    padding: 0;
  }

  .mirror-work__step-inner {
    display: grid;
    grid-template-columns: 1fr 2fr 2fr;
    align-items: center;
    gap: 2rem;
    padding: 1rem 0;
  }

  .mirror-work__step-head {
    display: contents;
  }

  .mirror-work__step-num {
    width: auto;
  }

  .mirror-work__step-text {
    max-width: none;
  }

  .mirror-work__step-inner::after {}

  /* Mirror sezione 3 - Projects */
  .mirror-projects {
    padding: 0 32px;
    margin-bottom: 12rem;
  }

  .mirror-projects__row {
    padding: 0;
  }

  .mirror-projects__row--header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: start;
    gap: 0;
  }

  .mirror-projects__title {
    font-weight: 500;
    flex-direction: column;
    grid-column: 1;
  }

  .mirror-projects__info {
    grid-column: 3;
    gap: 2rem;
  }

  /* Mirror sezione 4 - Timeline */
  .mirror-timeline {
    padding: 0 32px;
    height: auto;
    margin-bottom: 12rem;
  }

  .mirror-timeline__row--title {
    padding: 0;
  }

  .mirror-timeline__row--grid {
    padding: 2rem 0 0;
  }

  .mirror-timeline__grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
  }

  .mirror-timeline__entry {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 2fr;
    align-items: end;
    position: relative;
    padding-bottom: 2rem;
  }

  .mirror-timeline__entry::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 100px;
    height: 1px;
    background: rgba(0, 0, 0, 1);
    transform: scaleX(var(--line-progress, 0));
    transform-origin: left;
  }

  .mirror-timeline__entry--1::after {
    left: 0;
  }

  .mirror-timeline__entry--2::after {
    left: 20%;
  }

  .mirror-timeline__entry--3::after {
    left: 40%;
  }

  .mirror-timeline__entry--4::after {
    left: 60%;
  }

  /* Arrow tip on last entry — chevron pointing right, black */
  .mirror-timeline__entry--4::before {
    content: "";
    position: absolute;
    bottom: -4px;
    right: 99px;
    width: 8px;
    height: 8px;
    border-right: 1px solid #121212;
    border-bottom: 1px solid #121212;
    transform: rotate(-45deg);
    opacity: var(--arrow-opacity, 0);
    transition: opacity 0.3s;
  }

  .mirror-timeline__label {
    writing-mode: horizontal-tb;
    text-orientation: initial;
    transform: none;
    padding-top: 0;
    justify-content: flex-start;
    text-align: left;
    white-space: nowrap;
  }

  .mirror-timeline__entry--1 .mirror-timeline__label {
    grid-column: 1;
  }

  .mirror-timeline__entry--2 .mirror-timeline__label {
    grid-column: 2;
  }

  .mirror-timeline__entry--3 .mirror-timeline__label {
    grid-column: 3;
  }

  .mirror-timeline__entry--4 .mirror-timeline__label {
    display: none;
  }

  .mirror-timeline__arrow {
    display: none;
  }

  .mirror-timeline__text {
    grid-column: 4;
    max-width: calc(100% - 100px);
    padding-bottom: 0;
  }

  .mirror-timeline__text--last {
    align-self: end;
  }

  /* Mirror sezione 5 - Tecnologie */
  .mirror-five {
    padding: 0 32px;
    margin-bottom: 12rem;
  }

  .mirror-five__skills-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 900px;
  }

  .mirror-five__skill {
    overflow: visible;
  }

  .mirror-five__skill-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    border-bottom: none;
    gap: 0.5rem;
    padding: 0;
  }

  .mirror-five__skill-inner::after {
    display: none;
  }

  .mirror-five__row--skills {
    padding: 0;
    gap: 4rem;
    margin-top: 4rem;
  }

  .mirror-five__row--title {
    padding: 0;
  }

  /* Mirror sezione 6 - Contattami */
  .mirror-contact {
    padding: 12rem 32px;
  }

  .mirror-contact__row--content {
    margin-top: 8rem;
  }

}

/* ===== DESKTOP < 1600px ===== */
@media (min-width: 768px) and (max-width: 1599px) {}

/* ===== DESKTOP < 1200px ===== */
@media (min-width: 768px) and (max-width: 1199px) {}

/* ===== DESKTOP >= 1600px ===== */
@media (min-width: 1600px) {}