/* ============ PROJECTS.CSS (MASTER LAYOUT - SIDEBAR REMOVED) ============ */
/* ============ MASTER LAYOUT & COLOR SYNC ============ */
:root {
  --bg: #07070b;
  --card-bg: rgba(10, 10, 14, 0.75);
  /* Darker, premium glass look */
  --accent: #3b82f6;
  --accent-rgb: 59, 130, 246;
  --border: rgba(255, 255, 255, 0.06);
  --muted: rgba(255, 255, 255, 0.4);
}

html,
body {
  /* THE FIX: Replicating the styles.css background exactly */
  background:
    radial-gradient(1200px 600px at 50% 10%, rgba(var(--accent-rgb), 0.14), transparent 60%),
    radial-gradient(800px 500px at 80% 40%, rgba(34, 211, 238, 0.06), transparent 55%),
    #07070b !important;
  background-attachment: fixed;
  color: #fff;
  margin: 0;
  padding: 0;
}

/* Base Card & Container Glassmorphism */
.card,
.main__inner {
  background: rgba(10, 10, 14, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(4px) !important;
  /* Subtle secondary blur */
  transition: all 0.3s ease;
}

.card {
  background: rgba(10, 10, 14, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(4px) !important;
  /* Subtle secondary blur */
  transition: all 0.3s ease;
  display: flex !important;
  flex-direction: column !important;
  height: 100%;
}

.card:hover {
  background: rgba(15, 15, 20, 0.8) !important;
  border-color: rgba(59, 130, 246, 0.5) !important;
  /* The signature blue hover */
  transform: translateY(-5px);
}

.main__inner {
  /* Moving the container 20px closer to the sidebar */
  margin-left: 30px !important;
  width: calc(100% - 20px) !important;
  /* THE DARK GLASS ENGINE */
  background: rgba(10, 10, 14, 0.7) !important;
  /* THE COLOR: Deep dark tint from reference */
  backdrop-filter: blur(20px) saturate(160%) !important;
  /* Strong frosted blur */
  -webkit-backdrop-filter: blur(20px) saturate(160%);

  /* THE CRYSTAL BORDER (Light highlight on the edge) */
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 24px !important;

  /* DEPTH ENGINE */
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    /* Large outer shadow */
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  /* Inner specular highlight */
}

/* DELETE OR REPLACE THIS BLOCK in projects.css */
.main__inner::after {
  display: none !important;
  /* This kills the unwanted middle radial gradient */
}

a:not(.btn-primary):not(.btn-secondary):not(.social-btn),
.card__link,
.card-link-wrapper {
  text-decoration: none !important;
  color: inherit !important;
  outline: none !important;
}

.card__title {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  line-height: 1.2 !important;
  margin: 0 !important;
}

/* 3. DESCRIPTION TEXT (The "Nice" look) */
.card__desc {
  margin: 0 !important;
  font-size: 13.5px !important;
  margin-top: auto !important;
  padding-top: 20px;
  color: rgba(255, 255, 255, 0.45) !important;
  line-height: 1.6 !important;
  font-weight: 400;
}

/* --- 2. UNIVERSAL UI --- */
.card,
.main__inner {
  /* THE DARK GLASS ENGINE */
  background: rgba(10, 10, 14, 0.7) !important;
  /* THE COLOR: Deep dark tint from reference */
  backdrop-filter: blur(20px) saturate(160%) !important;
  /* Strong frosted blur */
  -webkit-backdrop-filter: blur(20px) saturate(160%);

  /* THE CRYSTAL BORDER (Light highlight on the edge) */
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 24px !important;

  /* DEPTH ENGINE */
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    /* Large outer shadow */
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  /* Inner specular highlight */
}

/* --- 3. ANIMATIONS --- */
@keyframes universalSpawn {
  0% {
    opacity: 0;
    filter: blur(10px);
  }

  100% {
    opacity: 1;
    filter: blur(0);
  }
}

.header,
.pageTitle,
.pageSub,
.eyebrow,
.card,
.case-row,
.project__thumb--technical,
.design-philosophy-container,
.tech-footer {
  opacity: 0;
  animation: universalSpawn 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* ============ HEIGHT MATCHING ENGINE ============ */
.design-philosophy-container {
  display: flex !important;
  flex-direction: row !important;
  gap: 40px !important;
  /* THE FIX: Ensures both sides are the same height */
  align-items: stretch !important;
  margin: 80px 0 !important;
}

.philosophy-image-side {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  /* Pushes everything to fill the vertical space */
  justify-content: stretch !important;
}

.design-system-preview-img {
  width: 100% !important;
  /* THE FIX: Forces image to fill the container height */
  height: 100% !important;
  /* Ensures the image crops nicely instead of stretching/squishing */
  object-fit: cover !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.philosophy-text-side {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  /* Distributes the 3 pillars evenly to match the image height */
  justify-content: space-between !important;
  gap: 20px !important;
}

/* --- 4. IMAGE MODAL FIX (Stop the Face Explosion) --- */
.modal-content {
  max-width: 90% !important;
  max-height: 80vh !important;
  object-fit: contain !important;
  /* Forces the image to fit without stretching */
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

/* ============ 1. THE TABLET/MOBILE BRIDGE (0px - 1100px) ============ */
@media (max-width: 1100px) {

  .page,
  .app {
    display: block !important;
    /* Kills the 2-column grid layout */
    padding: 15px !important;
  }

  /* THE FIX: Specifically targets the project grid */
  .grid,
  .projectGrid {
    grid-template-columns: 1fr !important;
    /* Forces one card per row */
    gap: 20px !important;
  }

  .main__inner {
    margin-left: 0 !important;
    /* THE FIX: Closes the 320px sidebar gap */
    width: 100% !important;
    /* Expands content to fill screen width */
    padding: 30px 20px !important;
    border-radius: 20px !important;
  }

  .pageTitle {
    font-size: 34px !important;
    /* Prevents title overlap at 1025px */
    line-height: 1.2 !important;
  }
}

/* ============ 1. THE TABLET/MOBILE BRIDGE (0px - 1100px) ============ */
@media (max-width: 1100px) {

  .page,
  .app {
    display: block !important;
    /* Forces vertical stacking */
    padding: 0px !important;
  }

  .main__inner {
    margin-left: 0 !important;
    /* THE FIX: Snaps content to the left edge */
    width: 100% !important;
    /* Expands content to fill screen */
    padding: 25px 20px !important;
    border-radius: 20px !important;
  }
}

/* ============ 2. THE DESKTOP GRID (1101px+) ============ */
@media (min-width: 1101px) {

  .app,
  .page {
    display: grid !important;
    grid-template-columns: 320px 1fr !important;
    /* Re-introduces sidebar */
    padding: 20px !important;
  }

  .main__inner {
    margin-left: 30px !important;
    /* Restores desktop sidebar gap */
    width: calc(100% - 20px) !important;
    padding: 40px !important;
  }
}

/* IMPORTANT: DELETE any old '@media (min-width: 1025px)' blocks below this! */
/* ============ 6. MOBILE LAYOUT (1024px-) ============ */
@media (max-width: 1024px) {
  .main {
    padding: 10px 15px 30px 15px !important;
    width: 100% !important;
  }

  .main__inner {
    margin-left: 0 !important;
    width: 100% !important;
    border-radius: 25px !important;

  }

  .case-row,
  .design-philosophy-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  .eyebrow {
    padding-top: 15px;
  }
}

/* ============ 7. CARD & CONTENT STYLES ============ */
.main__inner::after {
  content: "";
  position: absolute;
  inset: -80px -140px;
  pointer-events: none;
  background: radial-gradient(520px 240px at 75% 35%, rgba(255, 255, 255, 0.06), transparent 60%),
    radial-gradient(620px 280px at 25% 55%, rgba(var(--accent-rgb), 0.10), transparent 60%);
  opacity: .85;
  z-index: -1;
}

.pageTitle {
  margin: 0 0 10px;
  font-size: 48px !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em;
  line-height: 1.1;
  /* Premium Text Gradient from styles.css index */
  background: linear-gradient(to bottom, #ffffff, #a7a7bc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pageSub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

/* ============ PROJECT FILTERS ============ */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
  background: rgba(59, 130, 246, 0.15);
  /* Accent blue tint */
  color: #60A5FA;
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
}

.grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  /* THE FIX: Ensures every card in a row is the same height */
  grid-auto-rows: 1fr !important;
  align-items: stretch !important;
}

.card {
  /* Darker background for more depth */
  background: rgba(10, 10, 14, 0.75) !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  overflow: hidden;
  transition: all 0.4s ease;
}

.card.hidden {
  display: none !important;
}

.card:hover {
  transform: translateY(-8px);
  /* Matching the blue glow from your main index */
  border-color: rgba(59, 130, 246, 0.4) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 20px rgba(59, 130, 246, 0.15);
}

.thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden !important;

  /* THE FIX: Matches your card's 20px - 22px radius */
  border-radius: 20px 20px 0 0 !important;

  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: #000;

}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: filter 0.4s ease;
}

.card:hover .thumb img {
  /* brighten only — no zoom, so the whole screenshot stays visible */
  filter: brightness(1.06);
}

.card__body {
  padding: 20px 10px !important;
  /* More breathing room */
  display: flex;
  flex-direction: column;
  gap: 0px !important;
  flex-grow: 1;
}

.tag {
  font-size: 12px;
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--muted) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 6px 10px;
  border-radius: 999px;
}

.card:hover .tag {
  color: #60A5FA !important;
  /* Blue pop on hover */
  background: rgba(59, 130, 246, 0.08) !important;
  border-color: rgba(59, 130, 246, 0.2) !important;
}

.openBtn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: white;
  transition: all 0.3s ease;
}

.card:hover .openBtn {
  background: var(--accent);
  transform: rotate(45deg);
}

/* ============ RESTORE TECHNICAL THUMBNAILS ============ */

/* AWS + STRIPE Hero Styling */
.infrastructure-sync {
  background: #000 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  aspect-ratio: 16/9;
  margin-bottom: 0 !important;
  border-bottom: 1pz solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 20px 20px 0 0 !important;
  /* Forces rounded top corners */
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}


.hero-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center;
}

.hero-main {
  display: block;
  color: #4A90E2;
  /* The signature blue from your reference */
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.2;
}

.hero-sub {
  display: block;
  color: rgba(255, 255, 255, 0.4);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Coming Soon Grayscale Effect */
.infrastructure-sync-gray {
  background: radial-gradient(circle at center, #1a1a1a 0%, #050505 100%) !important;
  border-radius: 20px 20px 0 0 !important;
  /* Forces rounded top corners */
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.infrastructure-sync+.card__body .tags {
  margin-top: -10px !important;
}

.infrastructure-sync-gray .hero-main {
  color: #333 !important;
  /* Muted project text */
  font-size: 24px;
  font-weight: 900;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}

/* Ensure the technical visual title and arrow align */
.infrastructure-sync+.card__body .card__titleRow {
  justify-content: space-between !important;
  gap: 12px !important;
}

.infrastructure-sync+.card__body .card__title {
  flex-grow: 1;
  margin: 0 !important;
}

.infrastructure-sync+.card__body .openBtn {
  flex-shrink: 0 !important;
}

.infrastructure-sync+.card__body {
  padding-top: 28px !important;
}

.coming-soon-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
}

.center-title {
  justify-content: center !important;
  width: 100%;
}

.muted-text {
  color: rgba(255, 255, 255, 0.3) !important;
  font-size: 1rem !important;
  letter-spacing: 1px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 4px;
}

.spec-item span {
  color: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
}

.spec-item strong {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
}

/* ============ TAGS: GREY THEME + NO-OVERLAP FIX ============ */
.tags {
  display: flex !important;
  flex-wrap: wrap !important;
  /* THE FIX: Allows tags to drop to next line */
  gap: 8px !important;
  /* Horizontal and vertical spacing */
  margin-bottom: 24px !important;
  /* Space between tags and title */
  line-height: 1.8 !important;
  /* Prevents vertical pill collision */
}

.tag {
  display: inline-flex !important;
  align-items: center;

  /* 1. THE COLOR: Switched from Blue to Refined Grey */
  background: rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;

  /* 2. SIZING */
  padding: 6px 14px !important;
  border-radius: 10px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  white-space: nowrap;

  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

/* Subtle Hover to match the "Senior" feel */
.tag:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
}

/* ============ ARROW POSITIONING FIX ============ */
.card__titleRow {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  margin-bottom: 14px !important;

}



.openBtn {
  /* Ensure the button doesn't shrink or grow */
  flex-shrink: 0 !important;

  /* Center the arrow icon inside the circle/box */
  display: inline-flex !important;
  align-items: center;
  justify-content: center;

  /* Slightly smaller size to match the refined title */
  width: 32px !important;
  height: 32px !important;
  flex-shrink: 0 !important;
}

/* =========================
   MOBILE RESPONSIVENESS OVERRIDES (PHONES)
   ========================= */
@media (max-width: 768px) {

  /* 1. Filter Buttons Wrapping & Spacing */
  .project-filters {
    gap: 10px !important;
    margin-bottom: 24px !important;
    justify-content: flex-start !important;
  }

  .filter-btn {
    padding: 6px 14px !important;
    font-size: 11.5px !important;
  }

  /* 2. Project Card Text Padding */
  .card__body {
    padding: 18px 14px !important;
  }
}