/* Work page styles */

/* Work summary section */
.work-summary {
  flex: 1 1 340px;
  max-width: 340px;
  margin-top: 0;
}

.work-summary h2 {
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 600;
  margin: 0 0 1.25rem 0;
  letter-spacing: -0.03em;
}

.work-summary p {
  font-size: clamp(1rem, 3vw, 1.05rem);
  line-height: 1.5;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

/* Projects section */
.projects-section {
  flex: 2 1 640px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Main content for non-other-designs */
.main-content:not(.other-designs) {
  margin-top: 2rem;
}

/* Main content for other designs */
.main-content.other-designs {
  margin-top: 16rem;
}

.project {
  margin-bottom: 1.5rem;
}

.main-content:not(.other-designs) .projects-section .project {
  margin-left: 10rem;
}

.main-content:not(.other-designs) .projects-section .project .project-thumbnail-wrapper {
  width: 100%;
  max-width: 670px;
  min-width: 0;
  aspect-ratio: 670 / 377;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
}

.main-content:not(.other-designs) .projects-section .project .project-thumbnail-wrapper .project-thumbnail {
  position: absolute;
  inset: 0;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  object-fit: cover;
  object-position: center;
  transform: none;
  margin: 1px;
}

/* Project thumbnail transformations */
.main-content:not(.other-designs) .projects-section .project:nth-child(2) .project-thumbnail {
  transform: translateX(-4%) scale(1.8);
  transform-origin: center center;
}

.main-content:not(.other-designs) .projects-section .project:nth-child(4) .project-thumbnail {
  transform: scale(1.1);
  transform-origin: center center;
}

/* Hover effects for project thumbnails */
.main-content:not(.other-designs) .projects-section .project a:hover .project-thumbnail {
  animation: brightnessEffect 2s infinite;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.main-content:not(.other-designs) .projects-section .project:nth-child(2) a:hover .project-thumbnail {
  transform: translateX(-4%) scale(1.9);
}

.main-content:not(.other-designs) .projects-section .project:nth-child(4) a:hover .project-thumbnail {
  transform: scale(1.15);
}

/* Brightness animation */
@keyframes brightnessEffect {

  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.1);
  }
}

/* Project thumbnail base styles */
.project-thumbnail {
  background: white;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.2rem;
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

/* Special styling for Financier thumbnail */
.main-content:not(.other-designs) .projects-section .project:nth-child(1) .project-thumbnail {
  background: linear-gradient(to right, #1e40af, #3b82f6);
}

/* Other designs specific styles */
.main-content.other-designs .projects-section .project-thumbnail {
  cursor: zoom-in;
}

.main-content.other-designs .projects-section .project-thumbnail-wrapper,
.main-content.other-designs .projects-section .project-thumbnail {
  margin-bottom: 0;
}

.main-content.other-designs .projects-section .project-thumbnail-wrapper .project-thumbnail {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Project metadata */
.project-title {
  font-size: clamp(1.2rem, 3.5vw, 1.45rem);
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  letter-spacing: 0.01em;
}

.project-meta {
  font-size: clamp(0.75rem, 2.5vw, 0.9rem);
  color: #656565;
  font-weight: 400;
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

[data-theme="dark"] .project-meta {
  color: #9E9E9E;
}

.project-description {
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  color: #2d2d2d;
  margin: 0 0 0.3rem 0;
}

/* Grid layout for Other Designs */
.main-content.other-designs .projects-section {
  display: grid;
  grid-template-columns: 290px 290px;
  grid-auto-rows: auto;
  grid-column-gap: 24px;
  grid-row-gap: 24px;
  justify-content: start;
  width: 604px;
  max-width: 604px;
  margin-left: calc(10rem + 35px);
  box-sizing: border-box;
}

.main-content.other-designs .projects-section .project-thumbnail-wrapper {
  pointer-events: none;
}

.main-content.other-designs .projects-section .project-thumbnail-wrapper a {
  pointer-events: auto;
}

.main-content.other-designs .projects-section .project-thumbnail-wrapper .project-thumbnail {
  position: static;
  height: auto;
  object-fit: contain;
}

/* Work summary margin */
.main-content .work-summary {
  margin-left: -2rem;
}

/* Hover effects */
.project-thumbnail-wrapper:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.main-content.other-designs .project-thumbnail-wrapper:hover {
  box-shadow: none;
}

.main-content.other-designs .project-thumbnail-wrapper a:focus,
.main-content.other-designs .project-thumbnail-wrapper a:active {
  outline: none;
  box-shadow: none;
}

/* Scroll to top button */
button[onclick*="scrollTo"] svg {
  stroke: var(--hover-color);
}

[data-theme="dark"] button[onclick*="scrollTo"] svg {
  stroke: var(--dark-mode-toggle-hover);
}

/* Responsive styles */
@media (max-width: 1200px) {
  .main-content {
    flex-direction: column;
    gap: 2rem;
  }

  .work-summary {
    max-width: 100%;
    margin-top: 0;
    margin-bottom: 2rem;
    margin-left: 0;
  }

  .main-content:not(.other-designs) .projects-section .project {
    margin-left: 0;
  }

  .main-content .work-summary {
    margin-left: 0;
  }
}

@media (max-width: 900px) {
  .main-content {
    flex-direction: column;
    gap: 2.5rem;
    padding: 2.5rem 1rem 1rem 1rem;
  }

  .work-summary {
    max-width: 100%;
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .container {
    height: auto;
    overflow-y: auto;
  }

  .main-content {
    flex: none;
    overflow: visible;
  }

  .main-content.other-designs {
    margin-top: 12rem;
  }

  .main-content.other-designs .projects-section {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }

  .main-content.other-designs .projects-section .project {
    width: 100%;
    max-width: 100%;
  }

  .main-content.other-designs .projects-section .project:nth-child(1),
  .main-content.other-designs .projects-section .project:nth-child(2) {
    justify-self: center;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .main-content {
    padding: 1rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .main-content.other-designs .projects-section {
    padding: 0 0.5rem;
  }

  .main-content {
    padding: 1rem 0.5rem;
    overflow-x: hidden;
  }

  .work-summary h2 {
    font-size: 1.5rem;
  }

  .work-summary p {
    font-size: 1rem;
  }

  .project-title {
    font-size: 1.2rem;
  }

  .project-meta {
    font-size: 0.75rem;
  }
}

@media (min-width: 1200px) {
  .main-content.other-designs .projects-section {
    width: 604px;
    max-width: 604px;
    margin-left: calc(10rem + 35px);
  }
}

@media (max-width: 390px) {
  .container {
    padding: 0;
    overflow-x: hidden;
  }

  .main-content {
    padding: 1rem 0.75rem;
    margin-bottom: 0;
  }

  .main-content.other-designs {
    margin-top: 12rem;
    padding-top: 0;
  }

  .main-content.other-designs .work-summary {
    margin-top: 2rem;
  }

  .main-content+.main-content.other-designs {
    margin-top: 12rem;
  }
}