.tailored-portfolio-section {
  padding: 100px 5%;
  background-color: #fafafa;
  /* Premium subtle noise/grain texture */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
  position: relative;
  overflow: hidden;
  transition: background-color 0.5s ease;
}

/* Active rotating architectural circle */
.tailored-portfolio-section::before {
  content: '';
  position: absolute;
  top: -300px;
  right: -200px;
  width: 510px;
  height: 510px;
  border-radius: 50%;
  border: 2px dashed rgba(197, 168, 128, 0.4);
  /* border-top: 2px solid rgba(197, 168, 128, 0.8); */
  /* box-shadow: 0 0 60px rgba(197, 168, 128, 0.15); */
  z-index: 0;
  pointer-events: none;
  animation: slowSpin 30s linear infinite;
  transition: all 0.8s ease;
}

/* Massive subtle watermark typography */
.tailored-portfolio-section::after {
  content: 'PORTFOLIO';
  position: absolute;
  bottom: 10%;
  left: -100px;
  font-size: clamp(10rem, 20vw, 25rem);
  font-weight: 700;
  color: rgba(0, 0, 0, 0.02);
  z-index: 0;
  pointer-events: none;
  transform: rotate(-90deg);
  transform-origin: left bottom;
  letter-spacing: -5px;
  transition: all 0.8s ease;
}

.tailored-portfolio-section:hover::before {
  border-color: rgba(197, 168, 128, 0.8);
  box-shadow: 0 0 100px rgba(197, 168, 128, 0.3);
  transform: scale(1.05);
}

.tailored-portfolio-section:hover::after {
  color: rgba(0, 0, 0, 0.04);
  letter-spacing: 2px;
}

@keyframes slowSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Ensure content stays above the background elements */
.bento-section-header,
.hero-container,
.split-container {
  position: relative;
  z-index: 1;
}

.bento-section-header {
  text-align: center;
  margin-bottom: 80px;
}

.bento-section-header h2 {
  position: relative;
  display: inline-block;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  margin-bottom: 17px;
  color: #111;
}

/* Creative underline using ::after */
.bento-section-header h2::after {
  content: '';
  position: absolute;
  bottom: -33px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: #d3363b;
  transition: width 0.5s ease;
}

.bento-section-header:hover h2::after {
  width: 160px;
}

.bento-section-header p {
  font-size: clamp(1rem, 2vw, 1.1rem);
  color: #666;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 15px;
}

/* General Item Styles (Shared) */
.tailored-item {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

/* Elegant Corner Accents - Top Left */
.tailored-item::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 24px;
  width: 40px;
  height: 40px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-radius: 8px 0 0 0;
  z-index: 4;
  opacity: 0.6;
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
}

/* Elegant Corner Accents - Bottom Right */
.tailored-item::after {
  content: '';
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  border-radius: 0 0 8px 0;
  z-index: 4;
  opacity: 0.6;
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
}

/* Hover State: Corners expand to form a full glowing frame */
.tailored-item:hover::before,
.tailored-item:hover::after {
  width: calc(100% - 48px);
  height: calc(100% - 48px);
  opacity: 1;
  box-shadow: inset 0 0 30px rgba(197, 168, 128, 0.2);
  border-radius: 12px;
}

.tailored-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.tailored-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 1;
}

.tailored-item:hover img {
  transform: scale(1.06);
}

.tailored-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.85) 100%);
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.tailored-item:hover .tailored-overlay {
  opacity: 0.95;
}

.tailored-content {
  position: absolute;
  bottom: 50px;
  left: 50px;
  right: 50px;
  z-index: 5;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
  /* Let clicks pass through to the card */
}

.tailored-btn-wrap {
  pointer-events: auto;
  /* Re-enable for the button */
}

/* Badges & Buttons */
.tailored-badge {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 50px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 600;
  background: #d3363b;
  border: 1px solid #ffffff;
  color: #fff;
  margin-bottom: 25px;
  align-self: flex-start;
}

.tailored-badge.dark {
  background: rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.2);
}

.tailored-desc {
  font-size: 1.1rem;
  color: #eee;
  line-height: 1.6;
  margin-bottom: 35px;
  font-weight: 300;
  max-width: 600px;
}

.tailored-btn-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.tailored-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  transition: all 0.4s ease;
}

.tailored-item:hover .tailored-btn {
  background: #fff;
  color: #111;
  transform: translateX(10px);
}

.tailored-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}


/* =========================================
   1. ONGOING: PANORAMIC HERO CARD
   ========================================= */
.hero-container {
  max-width: 100%;
  margin: 0 auto;
}

.hero-item {
  width: 100%;
  /* height: 75vh; */
  height: 600px;
  margin-bottom: 80px;
}

.hero-item .tailored-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 20px;
}

/* =========================================
   2. PAST: SPLIT SCREEN HOVER ACCORDION
   ========================================= */
.split-container {
  display: flex;
  gap: 20px;
  height: 600px;
  max-width: 100%;
  margin: 0 auto;
}

.split-item {
  flex: 1;
  transition: flex 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Hover expansion logic */
.split-container:hover .split-item {
  flex: 1;
}

.split-container .split-item:hover {
  flex: 2.5;
}

.split-item .tailored-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 20px;
}

/* On mobile, stack them normally */
@media (max-width: 991px) {
  .hero-item {
    height: 650px;
    margin-bottom: 30px;
  }

  .tailored-portfolio-section {
    padding: 60px 2%;
  }

  .split-container {
    flex-direction: column;
    height: auto;
  }

  .split-item {
    flex: none !important;
    height: 650px;
  }

  .tailored-desc {
    max-width: 100%;
    font-size: 16px;
  }

  .tailored-content {
    bottom: 20px;
    left: 20px;
    right: 20px;
  }

  .completed-project-title {
    font-size: 1.3rem !important;
  }

  .completed-project-detail {
    font-size: 1rem !important;
  }
}

.project-filters {
  display: flex;
  justify-content: center;
  gap: 80px;
  margin-top: 50px;
  position: relative;
  border-bottom: 1px solid #d0353a5e;
  padding-bottom: 60px;
  z-index: 10;
}

@media (max-width: 767px) {
  .tailored-portfolio-section {
    padding: 50px 3%;
  }

  .bento-section-header {
    margin-bottom: 40px;
  }

  .project-filters {
    display: grid;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
    padding-bottom: 20px;
    margin-top: 0px;
    width: 100%;
  }

  .filter-btn {
    padding: 10px 12px;
    font-size: 0.75rem;
    letter-spacing: 1px;
    width: 100%;
    border: 1px dashed #d3363b !important;
    text-align: center;
  }

  .filter-btn:nth-child(3) {
    grid-column: 1 / -1;
  }

  .tailored-content {
    bottom: 20px;
    left: 15px;
    right: 15px;
  }

  .tailored-badge {
    padding: 6px 16px;
    font-size: 0.75rem;
    margin-bottom: 15px;
  }

  .hero-item .tailored-title,
  .split-item .tailored-title {
    font-size: 1.8rem;
    margin-bottom: 12px;
  }

  .tailored-desc {
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
  }

  .tailored-btn {
    width: 45px;
    height: 45px;
  }

  .tailored-btn svg {
    width: 18px;
    height: 18px;
  }

  .completed-projects-grid {
    margin-bottom: 50px;

    gap: 15px;
  }

  .completed-project-card {
    padding: 40px 20px;
  }

  .completed-project-title {
    font-size: 1.3rem !important;
  }

  .completed-project-detail {
    font-size: 1rem !important;
  }
}

/* =========================================
   PROJECT FILTERS (Camera Lock-On Design)
   ========================================= */


.filter-btn {
  position: relative;
  background: transparent;
  border: none;
  color: #999;
  font-size: 0.95rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  padding: 15px 35px;
  transition: all 0.4s ease;
  z-index: 1;
}

/* The 4 Architectural Corners */
.filter-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    /* Top Left */
    linear-gradient(to right, #d3363b 100%, transparent 0) 0 0 / 12px 2px no-repeat,
    linear-gradient(to bottom, #d3363b 100%, transparent 0) 0 0 / 2px 12px no-repeat,
    /* Top Right */
    linear-gradient(to left, #d3363b 100%, transparent 0) 100% 0 / 12px 2px no-repeat,
    linear-gradient(to bottom, #d3363b 100%, transparent 0) 100% 0 / 2px 12px no-repeat,
    /* Bottom Left */
    linear-gradient(to right, #d3363b 100%, transparent 0) 0 100% / 12px 2px no-repeat,
    linear-gradient(to top, #d3363b 100%, transparent 0) 0 100% / 2px 12px no-repeat,
    /* Bottom Right */
    linear-gradient(to left, #d3363b 100%, transparent 0) 100% 100% / 12px 2px no-repeat,
    linear-gradient(to top, #d3363b 100%, transparent 0) 100% 100% / 2px 12px no-repeat;

  /* Static State - faint, pushed out slightly */
  opacity: 0.25;
  transform: scale(1.15);
  transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  pointer-events: none;
}

/* Glassmorphism Background Fill */
.filter-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(197, 168, 128, 0.05);
  backdrop-filter: blur(4px);
  border-radius: 2px;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: center;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) 0.1s;
  z-index: -1;
}

.filter-btn:hover {
  color: #666;
}

/* Hover state brings the corners closer */
.filter-btn:hover::before {
  opacity: 0.6;
  transform: scale(1.05);
}

.filter-btn.active {
  color: #fff;
  text-shadow: none;
}

.filter-btn.active::before {
  opacity: 1;
  transform: scale(1);
}

.filter-btn.active::after {
  opacity: 1;
  transform: scaleY(1);
  background: #d3363b;
}

.split-item.hidden {
  display: none !important;
}

/* =========================================
   3. COMPLETED PROJECTS: TEXT GRID
   ========================================= */
.completed-projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 100%;
  margin: 80px auto 100px auto;
  position: relative;
  z-index: 1;
  gap: 10px;
}

.completed-project-card {
  padding: 60px 30px;
  text-align: center;
  border: 1px solid #eaeaea;
  border-bottom: 1px solid #eaeaea;
  background-color: rgb(255 255 255);
  backdrop-filter: blur(5px);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.completed-project-card::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  width: 30px;
  height: 30px;
  border-top: 2px solid #d3363b;
  border-left: 2px solid #d3363b;
  border-radius: 0;
  z-index: 4;
  opacity: 1;
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
}

.completed-project-card::after {
  content: '';
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  border-bottom: 2px solid #d3363b;
  border-right: 2px solid #d3363b;
  border-radius: 0 0 0px 0;
  z-index: 4;
  opacity: 1;
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
}

.completed-project-card:hover {
  background-color: #fff;
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
  z-index: 2;
  border-color: transparent;
}

.completed-project-card:hover::before,
.completed-project-card:hover::after {
  width: calc(100% - 30px);
  height: calc(100% - 30px);
  opacity: 1;
  border-radius: 0;
}

.completed-project-title {
  font-size: 1.8rem;
  font-weight: 400;
  color: #111;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.completed-project-detail {
  font-size: 18px;
  color: #666;
  line-height: 1.6;
  margin: 0;
  font-weight: 300;
}

@media (max-width: 991px) {
  .completed-projects-grid {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 30px !important;
    margin-bottom: 0px !important;
  }
}

@media (max-width: 767px) {
  .completed-projects-grid {
    grid-template-columns: 1fr;
  }

  .filter-btn::before {
    display: none;
  }
}

@media (max-width: 479px) {
  .split-item {
    height: 500px;
  }

  .hero-item {
    height: 500px;
  }

  .tailored-item:hover::before,
  .tailored-item:hover::after {
    display: none;
  }
}