/* =========================
   PROJECTS — BASE
========================= */

.projects-zone {
  position: relative;
  overflow: visible;
}

.projects-page {
  padding: 10px 20px 0px 20px;
  max-width: 1800px;
  margin: 0 auto;
  color: #000;
}

.page-container {
  overflow: hidden;
    background: linear-gradient(
    180deg,
    #ceabff 0%,
    #dedede 60%,
    #665a4f 78%,
    #4722ff 88%
  );
    background-attachment: fixed;
}

/* =========================
   PROJECTS GRID
========================= */

.projects-section {
  margin-bottom: 20px;
}

.projects-title {
  margin-bottom: 20px;
  text-decoration: underline;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.page-divider {
  width: 100%;
  height: 1px;
  background: #000;
  margin: 20px 0 0;
}

.page-divider-bottom {
  width: 100%;
  height: 1px;
  background: #000;
}

.bottom-line {
  margin: 20px;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   PROJECT ITEM — BASE IMAGE
========================= */

.project-item {
  position: relative;
  display: block;

  background: #000;
}


.project-item img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
}

/* =========================
   PRIMARY PROJECT
========================= */

.project-primary {
  cursor: pointer;
}

.primary-hover {
  position: absolute;
  inset: 0;
  background: #000;

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

  opacity: 0;
  transition: opacity 0.3s ease;

  z-index: 2;
  pointer-events: auto;
}

.primary-hover * {
  pointer-events: none;
}


.project-item:hover .primary-hover,
.project-item:focus .primary-hover {
  opacity: 1;
}

.project-logo-fixed {
  position: absolute;
  inset: 0;

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

  z-index: 1;
  pointer-events: none;
}

.project-logo-fixed img {
  max-width: 55%;
  max-height: 55%;
  object-fit: contain;
}

.project-logo {
  max-width: 55%;
  max-height: 55%;
  object-fit: contain;
}

.project-meta {
  position: absolute;
  top: 16px;
  bottom: 16px;
  right: 16px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;

  color: #fff;

  transform: translateX(4px);
  opacity: 0.8;
  transition: transform 0.25s ease, opacity 0.25s ease;

  z-index: 3;
}

.project-item:hover .project-meta {
  transform: translateX(0);
  opacity: 1;
}

.project-meta::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -12px;
  width: 1px;
  background: #fff;
}

.project-meta-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 14px;
  letter-spacing: 0.06em;
}

.project-meta-arrow {
  font-size: 18px;
  line-height: 1;
}




/* =========================
   SECONDARY PROJECT — BASE
========================= */

.project-secondary {
  position: relative;
  overflow: hidden;
}


/* Overlay */
.secondary-overlay {
  position: absolute;
  inset: 0;
  background: #000;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  padding: 30px 20px 20px;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;

  z-index: 2;
}

.project-title {
  margin-bottom: 6px;
  line-height: 0.9;
}

/* Desktop hover */
@media (hover: hover) {
  .project-secondary:hover .secondary-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Mobile tap */
.project-secondary.is-active .secondary-overlay {
  opacity: 1;
  pointer-events: auto;
}


/* Toggle button (+ / ×) */
.secondary-toggle {
  position: absolute;
  top: 20px;
  right: 30px;

  width: 20px;
  height: 20px;

  background: none;
  border: none;

  z-index: 3;
  pointer-events: none;
}

.secondary-toggle span {
  position: absolute;
  width: 20px;
  height: 1.5px;
  background: #fff;
  left: 0;
  top: 50%;

  transition: transform 0.35s ease;
}

.secondary-toggle span:last-child {
  transform: rotate(90deg);
}

/* Active = × */
.project-secondary.is-active .secondary-toggle span:first-child {
  transform: rotate(45deg);
}

.project-secondary.is-active .secondary-toggle span:last-child {
  transform: rotate(-45deg);
}

/* =========================
   SECONDARY PROJECT — TEXT
========================= */

.secondary-overlay {
  color: #fff;
}

.secondary-overlay h1,
.secondary-overlay h5,
.secondary-overlay p,
.secondary-overlay span {
  color: #fff;
}

.project-year {
    border: 1px solid #fff;
    border-radius: 50%;
    padding: 5px 30px;

    line-height: 1;
    font-size: var(--h6);
}

/* =========================
   SECONDARY PROJECT — MOBILE FIX
========================= */



@media (hover: none) {
  .secondary-toggle {
    pointer-events: auto;
  }
}

@media (hover: hover) {
  .secondary-toggle {
    display: none;
  }
}



/* =========================
   ABOUT ME CTA
========================= */

.projects-cta {
  display: flex;
  justify-content: center;
  width: 100%;

  position: relative;
  isolation: isolate;
  overflow: visible;
  
}

.cta-oval {
  width: min(1700px, 80%);
  min-height: 300px;

outline: 1px solid #000;
outline-offset: -1px;
  border-radius: 50%;

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

  padding: 80px 60px;
}

.cta-inner {
  max-width: 700px;
  text-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.cta-text {
    font-size: clamp(26px, 2.2vw, 40px);
    line-height: 1;
    max-width: 36ch;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
}

.cta-button {
    width: 200px;
    height: 40px;
    
    border: 1px solid #000;
    border-radius: 50%;
    padding: 10px 40px;

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

    background: transparent;
    color: #000;
    text-decoration: none;
    
    cursor: pointer;
    
    transform-style: preserve-3d;
    transition: transform 0.6s ease, background-color 0.3s ease;
    
    pointer-events: auto;

}

.cta-button:hover {
    background-color: #dedede;
    transform: rotateY(360deg);
}


@media (max-width: 600px) {

.projects-cta {
    padding: 0px 0px;
  }
  
    .cta-oval {
    padding: 90px 40px;
    min-height: 260px;
  }

  .cta-text {
    font-size: 16px;
    line-height: 1;
  }
}



@media (hover: none) {
  .project-item:hover .primary-hover {
    opacity: 0;
  }

  .project-item {
    cursor: default;
  }
}
