@import "tailwindcss/preflight";
@tailwind utilities;
@tailwind utilities;

/* Alpine.js cloak */
[x-cloak] {
    display: none;
}

*::selection{

    background-color: #4D8AFF ;
    color: #fff;
}
/* Animation for text */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.text-animate {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

/* Canvas styling */
.trail-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

html,
body {
    margin: 0;
    min-height: 100%;
    overflow-x: hidden;
    background-color: #f8fafc;
}

.site-footer {
    position: relative;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
    box-shadow: 0 0 0 100vmax rgba(255, 255, 255, 0.9);
    clip-path: inset(0 -100vmax);
}

.dark .site-footer {
    box-shadow: 0 0 0 100vmax #0f172a;
}

.project-picture-media {
    position: relative;
    overflow: hidden;
    height: 12rem;
}

.project-picture-media .project-picture-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.45s ease, transform 0.7s ease;
    z-index: 1;
}

.project-picture-media > img:not(.project-picture-img) {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.group:hover .project-picture-media .project-picture-img {
    transform: scale(1.08);
}

.group:hover .project-picture-media > img:not(.project-picture-img) {
    transform: scale(1.08);
}

.project-picture-media.has-project-image .project-picture-img,
.project-picture-media.has-project-image > img:not(.project-picture-img) {
    opacity: 1;
}

.project-picture-media.has-project-image .project-picture-fallback {
    opacity: 0;
}

.project-picture-fallback {
    transition: opacity 0.45s ease;
}

.project-picture-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.24), rgba(15, 23, 42, 0.04));
}

.project-picture-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    color: #fff;
}

.project-filter-chip.is-active {
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    color: #fff;
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.24);
}

.dark .project-filter-chip.is-active {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    box-shadow: 0 10px 22px rgba(99, 102, 241, 0.18);
}

.project-clear-filters {
    border-style: dashed;
}

/* From Uiverse.io by Type-Delta */
/* a clone from joshwcomeau.com
 * but this version runs on pure CSS
 */

 .themeToggle {
    color: #bbb;
    width: 3em;
  }

  .st-sunMoonThemeToggleBtn {
    position: relative;
    cursor: pointer;
  }

  .st-sunMoonThemeToggleBtn .themeToggleInput {
    opacity: 0;
    width: 100%;
    aspect-ratio: 1;
  }

  .st-sunMoonThemeToggleBtn svg {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease;
    transform: rotate(40deg);
  }

  .st-sunMoonThemeToggleBtn svg .sunMoon {
    transform-origin: center center;
    transition: inherit;
    transform: scale(1);
  }

  .st-sunMoonThemeToggleBtn svg .sunRay {
    transform-origin: center center;
    transform: scale(0);
  }

  .st-sunMoonThemeToggleBtn svg mask > circle {
    transition: transform 0.64s cubic-bezier(0.41, 0.64, 0.32, 1.575);
    transform: translate(0px, 0px);
  }

  .st-sunMoonThemeToggleBtn svg .sunRay2 {
    animation-delay: 0.05s !important;
  }
  .st-sunMoonThemeToggleBtn svg .sunRay3 {
    animation-delay: 0.1s !important;
  }
  .st-sunMoonThemeToggleBtn svg .sunRay4 {
    animation-delay: 0.17s !important;
  }
  .st-sunMoonThemeToggleBtn svg .sunRay5 {
    animation-delay: 0.25s !important;
  }
  .st-sunMoonThemeToggleBtn svg .sunRay5 {
    animation-delay: 0.29s !important;
  }

  .st-sunMoonThemeToggleBtn .themeToggleInput:checked + svg {
    transform: rotate(90deg);
  }
  .st-sunMoonThemeToggleBtn .themeToggleInput:checked + svg mask > circle {
    transform: translate(16px, -3px);
  }
  .st-sunMoonThemeToggleBtn .themeToggleInput:checked + svg .sunMoon {
    transform: scale(0.55);
  }
  .st-sunMoonThemeToggleBtn .themeToggleInput:checked + svg .sunRay {
    animation: showRay1832 0.4s ease 0s 1 forwards;
  }

  @keyframes showRay1832 {
    0% {
      transform: scale(0);
    }
    100% {
      transform: scale(1);
    }
  }


  .modal {
    display: none;
    position: fixed;
    z-index: 50;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
  }

  /* Modal Content */
  .modal-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 900px;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Modal Images */
  .modal-image {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
  }

  /* Navigation Buttons */
  .prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s;
    border-radius: 0 5px 5px 0;
    user-select: none;
    -webkit-user-select: none;
    background-color: rgba(79, 70, 229, 0.6);
  }

  .next {
    right: 0;
    border-radius: 5px 0 0 5px;
  }

  .prev:hover, .next:hover {
    background-color: rgba(79, 70, 229, 0.9);
  }
