/* Projects Section */
.projects-section {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 80px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.work-wrapper {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 40px;
  position: relative;
  border-radius: 8px;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.work-wrapper::before {
  content: '';
  position: absolute;
  border: 2px dashed var(--purple);
  inset: 0;
  pointer-events: none;
  border-radius: 8px;
}

.works {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  padding: 0;
  position: relative;
  flex-shrink: 0;
  width: 100%;
}

.project-frame-container {
  position: absolute;
  top: -32px;
  left: 57px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}

.project-frame-switch-icon {
  width: 32px;
  height: auto;
  text-align: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-wrapper:hover .project-title-frame {
  color: var(--purple) !important;
}

.work-wrapper .project-frame-switch-icon span {
  color: var(--purple);
  font-size: 18px;
  opacity: 1;
}

.project-title-frame {
  color: var(--purple);
  font-size: 16px;
  white-space: nowrap;
}

/* Project Card */
.project-card {
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  border: 2px solid var(--blue-gray-50);
  outline: 2px solid transparent;
  flex-direction: column;
  gap: 40px;
  padding: 48px 0 40px 40px;
  position: relative;
  overflow: hidden;
  height: auto;
}

.project-card:hover {
  outline: 2px solid var(--purple);
}

.project-card.bg-green {
  background-color: var(--off-white-green);
}

.project-card.bg-yellow {
  background-color: var(--off-white-yellow);
}

.project-card.bg-blue {
  background-color: var(--off-white-blue);
}

.project-card.bg-purple {
  background-color: var(--off-white-purple);
}

.project-card.bg-red {
  background-color: var(--off-white-red);
}

.project-card.bg-pink {
  background-color: var(--off-white-pink);
}

.project-card.bg-brown {
  background-color: var(--off-white-brown);
}

.project-image-container {
  position: relative;
  width: auto;
  height: auto;
  max-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.project-image-single {
  position: relative;
  width: auto;
  max-height: 320px;
  box-shadow: 0px 0px 24px 0px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.project-image-single img {
  width: auto;
  height: 100%;
  max-height: 320px;
  object-fit: contain;
  display: block;
}

.project-image-single::before {
  content: '';
  position: absolute;
  border: 2px solid var(--blue-200);
  inset: -2px;
  pointer-events: none;
  z-index: 1;
}

.project-images-double {
  display: flex;
  gap: 24px;
  height: 100%;
  max-height: 320px;
  width: auto;
}

.project-image-double {
  position: relative;
  max-height: 320px;
  box-shadow: 0px 0px 24px 0px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.project-image-double img {
  width: auto;
  height: 100%;
  max-height: 320px;
  object-fit: contain;
  display: block;
}

.project-image-double::before {
  content: '';
  position: absolute;
  border: 2px solid var(--blue-200);
  inset: -2px;
  pointer-events: none;
  z-index: 1;
}

.project-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 32px;
  width: auto;
}

.project-title {
  color: var(--blue-gray-900);
  font-family: 'Karla', sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: normal;
  margin: 0;
}

.project-description {
  color: var(--blue-gray-500);
}

.project-title-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.project-year-badge {
  background-color: var(--blue-100);
  border: 1px solid var(--blue-50);
  border-radius: 4px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.project-year {
  color: var(--blue-gray-900);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.projects {
  flex-basis: 0;
  background-color: var(--blue-300);
  flex-grow: 1;
  border: 4px solid transparent;
  height: auto;
  min-height: 1px;
  min-width: 300px;
  aspect-ratio: 1/0.8;
  border-radius: 8px;
  flex-shrink: 0;
  cursor: pointer;
}

.projects:hover {
  border: 4px solid var(--purple);
}

/* Corner Squares for Project Images */
.corner-square {
  box-sizing: border-box;
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: #FDFDFD;
  border: 2px solid var(--blue-200);
  z-index: 2;
}

.corner-square.top-left {
  top: -6px;
  left: -6px;
}

.corner-square.top-right {
  top: -6px;
  right: -6px;
}

.corner-square.bottom-left {
  bottom: -6px;
  left: -6px;
}

.corner-square.bottom-right {
  bottom: -6px;
  right: -6px;
}

.project-image-container .corner-square.top-left {
  top: -6px;
  left: -6px;
}

.project-image-container .corner-square.bottom-left {
  bottom: -6px;
  left: -6px;
}

.project-image-double .corner-square.top-left {
  top: -6px;
  left: -4px;
}

.project-image-double .corner-square.top-right {
  top: -6px;
  right: -5px;
}

.project-image-double .corner-square.bottom-left {
  bottom: -6px;
  left: -6px;
}

.project-image-double .corner-square.bottom-right {
  bottom: -6px;
  right: -6px;
}

/* Project Draggable States */
.projects-section.draggable {
  cursor: grab;
  user-select: none;
  outline: 2px solid transparent;
  transform: translate(0px, 0px);
  will-change: transform;
}

.projects-section.draggable.animate__animated {
  animation-fill-mode: both;
}

.projects-section.draggable.animate__animated[data-x],
.projects-section.draggable.animate__animated[data-y] {
  animation: none !important;
}

.projects-section.draggable[style*="transform"] {
  animation: none !important;
  animation-play-state: paused !important;
}

.projects-section.draggable:hover {
  outline: 2px solid #9747ff;
  cursor: grab;
}

.projects-section.draggable:active {
  outline: 2px solid #9747ff;
  cursor: grabbing;
}

.projects-section.draggable.draggable-disabled {
  cursor: default;
  outline: none;
}

.projects-section.draggable.draggable-disabled:hover {
  outline: none;
  cursor: default;
}

.projects-section.draggable .project-card {
  cursor: grab !important;
  user-select: none;
}

.projects-section.draggable-disabled .project-card {
  cursor: pointer !important;
  user-select: auto;
}

.projects-section.draggable .project-card:hover:not(:active) {
  outline: 2px solid transparent !important;
  cursor: grab !important;
}

.projects-section.draggable-disabled .project-card:hover:not(:active) {
  outline: 2px solid var(--purple) !important;
  cursor: pointer !important;
}

.projects-section.draggable .project-card:active {
  outline: 2px solid transparent;
  cursor: grabbing !important;
}

.projects-section.draggable-disabled .project-card:active {
  outline: 2px solid var(--purple);
  cursor: pointer !important;
}

/* Others Projects Section */
.others-projects-section {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 80px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.others-work-wrapper {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 40px;
  position: relative;
  border-radius: 8px;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.others-work-wrapper::before {
  content: '';
  position: absolute;
  border: 2px dashed var(--purple);
  inset: 0;
  pointer-events: none;
  border-radius: 8px;
}

.others-works {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  gap: 32px;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  position: relative;
  flex-shrink: 0;
  width: 100%;
}

.others-frame-container {
  position: absolute;
  top: -32px;
  left: 72px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}

.others-frame-switch-icon {
  width: 32px;
  height: auto;
  text-align: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.others-work-wrapper:hover .others-title-frame {
  color: var(--purple) !important;
}

.others-work-wrapper .others-frame-switch-icon span {
  color: var(--purple);
  font-size: 18px;
  opacity: 1;
}

.others-title-frame {
  color: var(--purple);
  font-size: 16px;
  white-space: nowrap;
}

.others-project-item {
  flex: 1;
  background-color: var(--blue-50);
  outline: 2px solid transparent;
  border: 2px solid var(--blue-gray-50);
  height: auto;
  min-height: 80px;
  border-radius: 8px;
  cursor: pointer;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  text-decoration: none;
  color: inherit;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.others-project-item:hover {
  outline: 2px solid var(--purple);
}

.others-project-content {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  box-sizing: border-box;
  min-width: 0;
}

.others-project-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  width: 100%;
  position: relative;
  box-sizing: border-box;
  min-width: 0;
}

.others-project-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  position: relative;
}

.icon-container {
  width: 100%;
  height: 100%;
  position: relative;
  border: 2px solid var(--blue-200);
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.icon-image {
  width: 48px;
  height: 48px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: rotate(15deg);
}

.others-project-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
}

.others-project-title-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
}

.others-project-title {
  color: var(--blue-gray-900);
  text-align: left;
  white-space: nowrap;
}

.others-project-icon-right {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-gray-900);
  font-size: 16px;
}

.others-project-description {
  color: var(--blue-gray-700);
  text-align: left;
  width: 100%;
  word-wrap: break-word;
}

/* Corner Squares for Others Project Items */
.others-project-item .corner-square {
  box-sizing: border-box;
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: #FDFDFD;
  border: 2px solid var(--blue-200);
  z-index: 2;
}

.others-project-item .corner-square.top-left {
  top: -6px;
  left: -6px;
}

.others-project-item .corner-square.top-right {
  top: -6px;
  right: -6px;
}

.others-project-item .corner-square.bottom-left {
  bottom: -6px;
  left: -6px;
}

.others-project-item .corner-square.bottom-right {
  bottom: -6px;
  right: -6px;
}

/* Others Project Draggable States */
.others-projects-section.draggable {
  cursor: grab;
  user-select: none;
  outline: 2px solid transparent;
  transform: translate(0px, 0px);
  will-change: transform;
}

.others-projects-section.draggable.animate__animated {
  animation-fill-mode: both;
}

.others-projects-section.draggable.animate__animated[data-x],
.others-projects-section.draggable.animate__animated[data-y] {
  animation: none !important;
}

.others-projects-section.draggable[style*="transform"] {
  animation: none !important;
  animation-play-state: paused !important;
}

.others-projects-section.draggable:hover {
  outline: 2px solid #9747ff;
  cursor: grab;
}

.others-projects-section.draggable:active {
  outline: 2px solid #9747ff;
  cursor: grabbing;
}

.others-projects-section.draggable.draggable-disabled {
  cursor: default;
  outline: none;
}

.others-projects-section.draggable.draggable-disabled:hover {
  outline: none;
  cursor: default;
}

.others-projects-section.draggable .others-project-item {
  cursor: grab !important;
  user-select: none;
}

.others-projects-section.draggable-disabled .others-project-item {
  cursor: pointer !important;
  user-select: auto;
}

.others-projects-section.draggable .others-project-item:hover:not(:active) {
  outline: 2px solid transparent !important;
  cursor: grab !important;
}

.others-projects-section.draggable-disabled .others-project-item:hover:not(:active) {
  outline: 2px solid var(--purple) !important;
  cursor: pointer !important;
}

.others-projects-section.draggable .others-project-item:active {
  outline: 2px solid transparent;
  cursor: grabbing !important;
}

.others-projects-section.draggable-disabled .others-project-item:active {
  outline: 2px solid var(--purple);
  cursor: pointer !important;
}

/* Responsive */
@media screen and (max-width: 1026px) {
  .project-card {
    padding: 32px 0 24px 24px;
    gap: 32px;
  }
  
  .project-image-single img {
    max-height: 280px;
  }
  
  .project-image-double img {
    max-height: 280px;
  }
  
  .project-title {
    font-size: 20px;
  }
  
  .project-description {
    font-size: 13px;
  }
  
  .project-content {
    padding-right: 24px;
  }
  
  .others-project-item {
    padding: 16px 24px;
  }
  
  .others-project-header {
    gap: 16px;
  }
  
  .others-project-icon {
    width: 56px;
    height: 56px;
  }
  
  .icon-image {
    width: 42px;
    height: 42px;
  }
  
  .corner-square {
    width: 10px;
    height: 10px;
  }
}

@media screen and (max-width: 725px) {  
  .others-works {
    flex-direction: column;
  }

  .work-wrapper, .others-work-wrapper {
    padding: 32px;
  }

  .works {
    gap: 24px;
  }
}

@media screen and (max-width: 601px) {
  .works {
    grid-template-columns: 1fr;
  }
  
  .others-project-item {
    gap: 16px;
  }
  
  .others-project-header {
    width: 100%;
    gap: 16px;
  }
  
  .others-project-icon {
    width: 48px;
    height: 48px;
  }
  
  .icon-image {
    width: 36px;
    height: 36px;
  }
  
  .corner-square {
    width: 8px;
    height: 8px;
  }
}