/* ==== CSS Reset (Minimal, Tailwind-Friendly) ==== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

img, video {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  background: none;
}

/* ==== Twitter/X-Inspired Theme with Cleaned Styles ==== */
:root {
  --twitter-black: #15202B;
  --twitter-dark: #192734;
  --twitter-border: #38444d;
  --twitter-blue: #1DA1F2;
  --twitter-text: #FFFFFF;
  --twitter-light-text: #8899A6;
  --twitter-green: #17BF63;
  --twitter-red: #E0245E;
}

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.5;
  background-color: var(--twitter-black);
  color: var(--twitter-text);
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  color: var(--twitter-blue);
  transition: color 0.3s ease;
}
a:hover {
  color: var(--twitter-text);
}

/* Active Tab */
.tab-active {
  color: var(--twitter-text) !important;
  font-weight: 500;
  border-bottom: 4px solid var(--twitter-blue) !important;
}

/* Skill Badge */
.skill-badge {
  background-color: rgba(29, 161, 242, 0.2);
  color: var(--twitter-blue);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  display: inline-block;
  transition: all 0.3s ease;
}
.skill-badge:hover {
  background-color: rgba(29, 161, 242, 0.4);
  transform: translateY(-2px);
}

/* Project Tags */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.project-tag {
  padding: 0.25rem 0.75rem;
  background-color: rgba(29, 161, 242, 0.2);
  color: #1DA1F2;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s ease;
}
.project-tag:hover {
  background-color: rgba(29, 161, 242, 0.4);
  transform: translateY(-2px);
}

/* Equal height grid rows */
.grid {
  display: grid;
  align-items: stretch;
}
.project-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.project-card .project-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Locked media container height */
.project-card .swiper {
  width: 100%;
  height: 320px; /* Fixed height for all image/video containers */
  overflow: hidden;
  position: relative;
}

/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 16/9) {
  .project-card .swiper {
    height: 0;
    padding-bottom: 56.25%;
  }
  .swiper-slide img,
  .swiper-slide video {
    position: absolute;
    top: 0;
    left: 0;
  }
}

.swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  height: 100%;
}
.swiper-slide img,
.swiper-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}
.swiper-slide:hover img,
.swiper-slide:hover video {
  transform: scale(1.05);
}

/* Swiper buttons */
.swiper-button-next,
.swiper-button-prev {
  background-color: rgba(29, 161, 242, 0.1);
  border-radius: 50%;
  padding: 1.5rem;
  transition: all 0.3s ease;
}
.swiper-button-next:hover,
.swiper-button-prev:hover {
  background-color: rgba(29, 161, 242, 0.2);
  transform: scale(1.1);
}
.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 1.2rem !important;
  font-weight: bold;
}

/* Swiper pagination */
.swiper-pagination-bullet {
  background: #1DA1F2 !important;
  opacity: 0.5;
}
.swiper-pagination-bullet-active {
  opacity: 1;
  transform: scale(1.2);
}

/* Profile images */
.profile-image-container img {
  aspect-ratio: 1/1;
  object-fit: cover;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--twitter-black);
}
::-webkit-scrollbar-thumb {
  background: var(--twitter-border);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--twitter-blue);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .project-card .swiper {
    height: 240px; /* Smaller fixed height for tablet */
  }
  .profile-image-container img {
    width: 6rem;
    height: 6rem;
  }
}
@media (max-width: 480px) {
  .project-card .swiper {
    height: 200px; /* Smaller fixed height for mobile */
  }
  .profile-image-container img {
    width: 5rem;
    height: 5rem;
  }
  .skill-badge {
    margin-bottom: 0.5rem;
  }
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
