.tw-home-bento-shell {
  --tw-home-bento-gap: 1.5em;
}

.tw-home-bento-shell .container {
  display: flex;
  flex-direction: column;
  gap: var(--tw-home-bento-gap);
}

.tw-home-bento-controls {
  display: inline-flex;
  gap: 8px;
  width: fit-content;
}

.tw-home-bento-toggle {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 999px;
  color: #131417;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: -.01em;
  line-height: 1;
  padding: 12px 20px;
  transition: background-color 240ms ease, border-color 240ms ease, color 240ms ease;
}

.tw-home-bento-toggle .link-floating-text {
  display: block;
  text-shadow: 0 15px 0 #131417;
  transition: transform 400ms cubic-bezier(.455, .03, .515, .955);
}

.tw-home-bento-toggle .link-text-wrapper {
  display: block;
  line-height: 1;
  overflow: hidden;
}

.tw-home-bento-toggle.is-active .link-floating-text {
  text-shadow: 0 15px 0 #fff;
}

.tw-home-bento-toggle:hover .link-floating-text {
  transform: translateY(-100%);
  transition-duration: 400ms;
  transition-timing-function: cubic-bezier(.455, .03, .515, .955);
}

.tw-home-bento-toggle.is-active {
  background: #131417;
  border-color: #131417;
  color: #fff;
}

.tw-home-bento-view--bento {
  display: flex;
  flex-direction: column;
  gap: var(--tw-home-bento-gap);
}

.tw-home-bento-view--list {
  display: flex;
}

.tw-home-bento-shell[data-view="bento"] .tw-home-bento-view--list,
.tw-home-bento-shell[data-view="list"] .tw-home-bento-view--bento {
  display: none;
}

.tw-home-bento-section {
  display: flex;
  flex-direction: column;
  gap: var(--tw-home-bento-gap);
}

.tw-home-bento-archive-wrapper {
  border: 1px solid #ddd;
  border-radius: 1.75em;
  display: flex;
  flex-direction: column;
  gap: var(--tw-home-bento-gap);
  padding: var(--tw-home-bento-gap);
}

.tw-home-bento-archive-label {
  color: #131417;
  font-size: 18px;
  line-height: 1;
}

.tw-home-bento-grid {
  display: grid;
  gap: var(--tw-home-bento-gap);
}

.tw-home-bento-grid--primary {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.tw-home-bento-grid--secondary,
.tw-home-bento-grid--regular {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tw-home-bento-grid > .project-item {
  min-width: 0;
  width: 100%;
}

.tw-thumbnail-loader {
  inset: 0;
  opacity: 1;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  transition: opacity 520ms ease;
  z-index: 0;
}

.tw-thumbnail-loader::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 44%, rgba(19, 20, 23, .08)),
    var(--tw-loader-thumb-url, var(--tw-thumb-url)) center / cover no-repeat;
  content: "";
  filter: blur(28px) saturate(1.08);
  inset: -18px;
  opacity: 1;
  pointer-events: none;
  position: absolute;
  transform: scale(1.12);
}

.tw-thumbnail-loader::after {
  animation: tw-thumb-glow-sweep 1.6s cubic-bezier(.4, 0, .2, 1) infinite;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0) 22%, rgba(255, 255, 255, .16) 39%, rgba(255, 255, 255, .5) 50%, rgba(255, 255, 255, .2) 61%, rgba(255, 255, 255, 0) 78%);
  content: "";
  filter: blur(24px);
  inset: -52%;
  mix-blend-mode: screen;
  opacity: .58;
  pointer-events: none;
  position: absolute;
  transform: translate3d(-36%, -36%, 0);
}

.tw-thumb-loaded .tw-thumbnail-loader {
  opacity: 0;
}

.tw-thumb-video {
  display: block;
  height: 100%;
  inset: 0;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 520ms ease;
  width: 100%;
  z-index: 1;
}

.tw-thumb-video-loaded .tw-thumb-video {
  opacity: 1;
}

.project-link[href="/works/premium-news-app-redesign"] {
  background-position: 50% 50%;
  background-size: auto 120%;
}

.tw-home-project-list-item[href="/works/premium-news-app-redesign"] .tw-home-project-list-thumb {
  transform: scale(1.1) !important;
}

.project-link[href="/works/spinning-climax"] {
  background-position: 50% 30%;
  background-size: auto 120%;
}

.project-link[href="/works/smart-scale-for-lab-recycling"] {
  background-position: 42% 50%;
}

.project-link[href="/works/smart-scale-for-lab-recycling"] .tw-thumb-video,
.tw-home-project-list-item[href="/works/smart-scale-for-lab-recycling"] .tw-thumb-video,
.tw-home-project-list-item[href="/works/smart-scale-for-lab-recycling"] .tw-home-project-list-thumb {
  object-position: 42% 50%;
}

.project-link[href="/works/physical-ai-design-system-for-humanoid-robots"] .tw-thumb-video,
.tw-home-project-list-item[href="/works/physical-ai-design-system-for-humanoid-robots"] .tw-thumb-video {
  height: 172%;
  inset: auto;
  left: 50%;
  object-position: 50% 0;
  top: 0;
  transform: translateX(-50%);
  width: 172%;
}

.project-link[href="/works/physical-ai-design-system-for-humanoid-robots"] {
  background-position: 50% 0;
  background-size: 172%;
}

.tw-home-project-list-item[href="/works/physical-ai-design-system-for-humanoid-robots"] .tw-home-project-list-thumb {
  height: 172%;
  left: 50%;
  max-width: none;
  object-position: 50% 0;
  position: relative;
  top: 0;
  transform: translateX(-50%);
  width: 172%;
}

@keyframes tw-thumb-glow-sweep {
  0% {
    transform: translate3d(-38%, -38%, 0);
  }

  100% {
    transform: translate3d(38%, 38%, 0);
  }
}

.tw-home-bento-grid .project-additional-info-l {
  -webkit-backdrop-filter: blur(22px) saturate(180%) contrast(108%);
  backdrop-filter: blur(22px) saturate(180%) contrast(108%);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .4), rgba(255, 255, 255, .2) 48%, rgba(42, 48, 52, .2)),
    rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  box-shadow:
    inset 0 .5px .5px rgba(255, 255, 255, .56),
    inset 0 -3px 8px rgba(255, 255, 255, .05),
    inset 0 -.5px .5px rgba(0, 0, 0, .12),
    0 8px 22px rgba(0, 0, 0, .13);
  color: #fff;
  overflow: hidden;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .34);
}

.tw-home-bento-chip-label {
  color: #fff;
  display: block;
  position: relative;
  text-shadow: none;
  z-index: 1;
}

.tw-home-bento-chip-text-dark .tw-home-bento-chip-label {
  color: #131417;
  text-shadow: 0 1px 14px rgba(255, 255, 255, .18);
}

.tw-home-bento-chip-text-light .tw-home-bento-chip-label {
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .28);
}

.tw-home-bento-grid .project-link:hover .project-additional-info-l,
.tw-home-bento-grid .tw-project-card-hover .project-additional-info-l {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(255, 255, 255, .46), rgba(255, 255, 255, .22) 48%, rgba(42, 48, 52, .18)),
    rgba(255, 255, 255, .17);
  border-color: rgba(255, 255, 255, .36);
  box-shadow:
    inset 0 .5px .5px rgba(255, 255, 255, .64),
    inset 0 -3px 9px rgba(255, 255, 255, .06),
    inset 0 -.5px .5px rgba(0, 0, 0, .12),
    0 9px 24px rgba(0, 0, 0, .14);
}

.tw-home-bento-year-chip {
  bottom: 1.25em;
  left: 1.25em;
  pointer-events: none;
  position: absolute;
  transform: translateY(200%);
  transition: transform 400ms cubic-bezier(.165, .84, .44, 1);
  z-index: 2;
}

.project-item:hover .tw-home-bento-year-chip,
.project-link:hover .tw-home-bento-year-chip,
.tw-project-card-hover .tw-home-bento-year-chip {
  transform: translateY(0);
}

.tw-home-bento-grid--primary > .project-item {
  aspect-ratio: 1 / 1;
  height: auto;
  grid-column: span 4;
}

.tw-home-bento-grid--primary > .tw-home-bento-span-2 {
  aspect-ratio: 2.05 / 1;
  grid-column: span 8;
}

.tw-home-bento-grid--primary > .tw-home-bento-span-half {
  aspect-ratio: 1.525 / 1;
  grid-column: span 6;
}

.tw-home-bento-grid--secondary > .project-item,
.tw-home-bento-grid--regular > .project-item {
  aspect-ratio: 1 / 1;
  height: auto;
}

.tw-home-bento-grid--secondary > .tw-home-bento-span-2,
.tw-home-bento-grid--regular > .tw-home-bento-span-2 {
  aspect-ratio: 2.06 / 1;
  grid-column: span 2;
}

@media screen and (min-width: 992px) {
  .tw-home-bento-grid--secondary > .project-item:nth-child(-n+2) {
    aspect-ratio: 1.52 / 1;
  }
}

.tw-home-bento-actions {
  display: flex;
}

.tw-home-bento-actions-hidden {
  display: none !important;
}

.tw-home-project-list {
  display: flex;
  flex-direction: column;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
}

.tw-home-project-list-item {
  --tw-home-project-list-row-height: 64px;
  border-bottom: 1px solid #ddd;
  color: #131417;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr) 118px minmax(64px, 1fr);
  align-items: center;
  min-height: var(--tw-home-project-list-row-height);
  padding: 10px 0;
  text-decoration: none;
  width: 100%;
}

.tw-home-project-list-name {
  font-size: 16px;
  font-weight: 500;
  transition: color 240ms ease;
}

.tw-home-project-list-owner,
.tw-home-project-list-year {
  color: var(--grey-40);
  font-size: 16px;
}

.tw-home-project-list-year {
  text-align: right;
}

.tw-home-project-list-thumb-wrap {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  height: calc(var(--tw-home-project-list-row-height) - 20px);
  overflow: hidden;
  position: relative;
  width: auto;
  z-index: 1;
}

.tw-home-project-list-thumb {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.tw-home-project-list-item[href="/works/spinning-climax"] .tw-home-project-list-thumb {
  transform: scale(1.2);
}

.tw-home-project-list-item:hover .tw-home-project-list-name,
.tw-home-project-list-item:focus-visible .tw-home-project-list-name {
  color: var(--grey-40);
}

@media screen and (max-width: 991px) {
  .tw-home-bento-shell {
    --tw-home-bento-gap: 16px;
  }

  .tw-home-bento-grid--primary,
  .tw-home-bento-grid--secondary,
  .tw-home-bento-grid--regular {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tw-home-bento-grid--primary > .project-item {
    grid-column: span 1;
  }

  .tw-home-bento-grid--primary > .tw-home-bento-span-2,
  .tw-home-bento-grid--primary > .tw-home-bento-span-half {
    aspect-ratio: 1 / 1;
    grid-column: span 1;
  }

  .tw-home-bento-grid--secondary > .tw-home-bento-span-2,
  .tw-home-bento-grid--regular > .tw-home-bento-span-2 {
    aspect-ratio: 1 / 1;
    grid-column: span 1;
  }
}

@media screen and (max-width: 767px) {
  .tw-home-bento-grid--primary,
  .tw-home-bento-grid--secondary,
  .tw-home-bento-grid--regular {
    grid-template-columns: 1fr;
  }

  .tw-home-bento-grid .project-additional-info-l {
    font-size: 14px;
  }

  .tw-home-project-list-item {
    --tw-home-project-list-row-height: auto;
    column-gap: 16px;
    display: flex;
    flex-wrap: wrap;
    row-gap: 12px;
    padding: 12px 0;
  }

  .tw-home-project-list-name {
    flex: 0 0 100%;
    order: 2;
  }

  .tw-home-project-list-owner,
  .tw-home-project-list-year {
    order: 3;
  }

  .tw-home-project-list-name,
  .tw-home-project-list-owner,
  .tw-home-project-list-year {
    font-size: 14px;
  }

  .tw-home-project-list-thumb-wrap {
    flex: 0 0 100%;
    height: auto;
    order: 1;
    width: 100%;
  }

  .tw-home-project-list-year {
    margin-left: auto;
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tw-thumbnail-loader::after {
    animation: none;
    opacity: 0;
  }
}
