/* ==========================================================================
   Antigravity Portfolio - Premium Featured Projects Showcase Styles
   Two-Stage Experience: Filterable Cards Grid + Interactive Case Study
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Showcase Theme System & Color Tokens
   -------------------------------------------------------------------------- */
:root {
  --ps-accent: #6c3fc5;
  --ps-accent-hover: #581c87;
  --ps-accent-light: rgba(108, 63, 197, 0.12);
  --ps-accent-border: rgba(108, 63, 197, 0.28);
  --ps-badge-color: #581c87;
  --ps-badge-bg: rgba(108, 63, 197, 0.1);
  --ps-badge-border: rgba(108, 63, 197, 0.25);
  --ps-highlight-title: #2e1065;
  --ps-highlight-border: #6c3fc5;
  --ps-section-title-grad: linear-gradient(135deg, #18181b 0%, #4f46e5 55%, #7c3aed 100%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ps-accent: #c084fc;
    --ps-accent-hover: #d8b4fe;
    --ps-accent-light: rgba(192, 132, 252, 0.15);
    --ps-accent-border: rgba(192, 132, 252, 0.35);
    --ps-badge-color: #f3e8ff;
    --ps-badge-bg: rgba(192, 132, 252, 0.16);
    --ps-badge-border: rgba(192, 132, 252, 0.35);
    --ps-highlight-title: #ffffff;
    --ps-highlight-border: #c084fc;
    --ps-section-title-grad: linear-gradient(135deg, #ffffff 0%, #f3e8ff 50%, #c084fc 100%);
  }
}

[color-scheme=light] {
  --ps-accent: #6c3fc5;
  --ps-accent-hover: #581c87;
  --ps-accent-light: rgba(108, 63, 197, 0.12);
  --ps-accent-border: rgba(108, 63, 197, 0.28);
  --ps-badge-color: #581c87;
  --ps-badge-bg: rgba(108, 63, 197, 0.1);
  --ps-badge-border: rgba(108, 63, 197, 0.25);
  --ps-highlight-title: #2e1065;
  --ps-highlight-border: #6c3fc5;
  --ps-section-title-grad: linear-gradient(135deg, #18181b 0%, #4f46e5 55%, #7c3aed 100%);
}

[color-scheme=dark] {
  --ps-accent: #c084fc;
  --ps-accent-hover: #d8b4fe;
  --ps-accent-light: rgba(192, 132, 252, 0.15);
  --ps-accent-border: rgba(192, 132, 252, 0.35);
  --ps-badge-color: #f3e8ff;
  --ps-badge-bg: rgba(192, 132, 252, 0.16);
  --ps-badge-border: rgba(192, 132, 252, 0.35);
  --ps-highlight-title: #ffffff;
  --ps-highlight-border: #c084fc;
  --ps-section-title-grad: linear-gradient(135deg, #ffffff 0%, #f3e8ff 50%, #c084fc 100%);
}

/* --------------------------------------------------------------------------
   1. Section Layout & Filter Tabs
   -------------------------------------------------------------------------- */
.projects-showcase-section {
  position: relative;
  width: 100%;
  background: transparent !important;
  overflow-anchor: none;
}

/* Ensure Main Section Title is 100% visible, sharp and vivid in Dark & Light modes */
.projects-showcase-section .h2__title,
#portfolio .h2__title,
.device-portfolio__title .h2__title {
  display: block;
  font: normal 700 3.4rem/1.2 var(--_font-accent);
  letter-spacing: -0.02em;
  background: var(--ps-section-title-grad) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: var(--t-bright);
}

@media only screen and (min-width: 768px) {
  .projects-showcase-section .h2__title,
  #portfolio .h2__title,
  .device-portfolio__title .h2__title {
    font-size: 3.8rem;
  }
}
@media only screen and (min-width: 1200px) {
  .projects-showcase-section .h2__title,
  #portfolio .h2__title,
  .device-portfolio__title .h2__title {
    font-size: 4.6rem;
    max-width: 70rem;
  }
}
@media only screen and (min-width: 1400px) {
  .projects-showcase-section .h2__title,
  #portfolio .h2__title,
  .device-portfolio__title .h2__title {
    font-size: 5.4rem;
    max-width: 80rem;
  }
}
@media only screen and (min-width: 1600px) {
  .projects-showcase-section .h2__title,
  #portfolio .h2__title,
  .device-portfolio__title .h2__title {
    font-size: 6rem;
    max-width: 90rem;
  }
}

.projects-showcase-section .h2__subtitle,
#portfolio .h2__subtitle,
.device-portfolio__title .h2__subtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  background: var(--ps-badge-bg) !important;
  border: 1px solid var(--ps-badge-border) !important;
  color: var(--ps-badge-color) !important;
  font: normal 700 1.25rem/1 var(--_font-default);
  margin-bottom: 1.5rem;
}

.projects-showcase-section .h2__subtitle svg,
#portfolio .h2__subtitle svg {
  color: var(--ps-accent);
}

.projects-filter-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2.5rem 0 3.5rem 0;
  padding: 0;
  list-style: none;
}

.projects-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1.8rem;
  background: var(--base-tint);
  border: 1px solid var(--stroke-elements);
  border-radius: 999px;
  color: var(--t-medium);
  font: normal 700 1.25rem/1 var(--_font-default);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  outline: none;
}

.projects-filter-btn:hover {
  color: var(--t-bright);
  border-color: var(--ps-accent);
  background: var(--ps-accent-light);
}

.projects-filter-btn.active {
  background: #6c3fc5 !important;
  border-color: #aa70e0 !important;
  color: #ffffff !important;
  box-shadow: 0 0.8rem 2rem rgba(108, 63, 197, 0.35);
}

.projects-filter-btn:focus-visible {
  outline: 2px solid var(--ps-accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   2. Project Cards Grid (Stage 1)
   -------------------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
  width: 100%;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--base-tint);
  border: 1px solid var(--stroke-elements);
  border-radius: var(--_radius-m, 2.4rem);
  padding: 2.4rem;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
              background-color 0.4s ease;
  outline: none;
  text-align: left;
  user-select: none;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--ps-accent-border);
  box-shadow: 0 2.4rem 4.8rem -1.2rem rgba(108, 63, 197, 0.28),
              0 0 0 1px var(--ps-accent-border);
}

.project-card:focus-visible {
  outline: 2px solid var(--ps-accent);
  outline-offset: 3px;
  transform: translateY(-4px);
}

/* Project Card Top Bar */
.project-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}

.project-card__num {
  font: normal 800 1.25rem/1 var(--_font-default);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ps-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.project-card__num::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ps-accent);
  box-shadow: 0 0 8px var(--ps-accent);
}

.project-card__category {
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  background: var(--ps-badge-bg);
  border: 1px solid var(--ps-badge-border);
  font: normal 700 1.2rem/1.2 var(--_font-default);
  color: var(--ps-badge-color);
  letter-spacing: 0.02em;
}

/* Project Card Preview Image */
.project-card__preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 220px;
  border-radius: var(--_radius-s, 1.6rem);
  overflow: hidden;
  background: #0f0f12;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 2.2rem;
}

.project-card__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: block;
}

.project-card:hover .project-card__preview img {
  transform: scale(1.04);
}

.project-card__preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0) 60%, rgba(17, 17, 17, 0.6) 100%);
  pointer-events: none;
}

/* Project Card Content */
.project-card__content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-card__title {
  font: normal 700 2.4rem/1.2 var(--_font-accent);
  color: var(--t-bright);
  margin: 0 0 1rem 0;
  transition: color 0.3s ease;
}

.project-card:hover .project-card__title {
  color: var(--ps-accent);
}

.project-card__desc {
  font: normal 400 1.45rem/1.6 var(--_font-default);
  color: var(--t-medium);
  margin: 0 0 2rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tech Badges */
.project-card__techs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2.2rem;
}

.project-tech-badge {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--base-tint);
  border: 1px solid var(--stroke-elements);
  font: normal 600 1.15rem/1 var(--_font-default);
  color: var(--t-medium);
  transition: all 0.25s ease;
}

.project-card:hover .project-tech-badge {
  border-color: var(--ps-accent-border);
  color: var(--t-bright);
}

/* Card Action Trigger */
.project-card__action {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: auto;
  font: normal 700 1.35rem/1 var(--_font-default);
  color: var(--ps-accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-card__action i {
  font-size: 1.6rem;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-card:hover .project-card__action i {
  transform: translateX(6px);
}

/* Hidden Card state for filtering */
.project-card.is-hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   3. Interactive Case Study Presentation (Stage 2)
   -------------------------------------------------------------------------- */
.case-study-showcase {
  display: none;
  position: relative;
  width: 100%;
  background: var(--base-tint);
  border: 1px solid var(--stroke-elements);
  border-radius: var(--_radius-m, 2.4rem);
  padding: 4rem;
  margin-top: 1rem;
  box-shadow: 0 3rem 6rem rgba(0, 0, 0, 0.45);
  overflow-anchor: none;
  animation: caseStudyFadeIn 0.35s ease-out forwards;
}

.case-study-showcase.is-active {
  display: block;
}

@keyframes caseStudyFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Case Study Navigation Bar */
.case-study__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--stroke-elements);
  margin-bottom: 3.5rem;
}

.case-study__back-btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke-elements);
  border-radius: 999px;
  color: var(--t-bright);
  font: normal 700 1.3rem/1 var(--_font-default);
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.case-study__back-btn:hover {
  background: #6c3fc5;
  border-color: #aa70e0;
  color: #ffffff;
  transform: translateX(-4px);
}

.case-study__back-btn:focus-visible {
  outline: 2px solid #aa70e0;
}

.case-study__counter {
  font: normal 700 1.4rem/1 var(--_font-default);
  color: var(--t-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.case-study__counter span {
  color: var(--ps-accent);
}

.case-study__quick-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.case-study__arrow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke-elements);
  color: var(--t-bright);
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.case-study__arrow-btn:hover {
  background: #6c3fc5;
  border-color: #aa70e0;
  color: #ffffff;
  transform: scale(1.05);
}

.case-study__arrow-btn:focus-visible {
  outline: 2px solid #aa70e0;
}

/* Case Study Header */
.case-study__header {
  margin-bottom: 4rem;
}

.case-study__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.case-study__project-id {
  font: normal 800 1.35rem/1 var(--_font-default);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ps-accent);
}

.case-study__pill {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  background: var(--ps-badge-bg);
  border: 1px solid var(--ps-badge-border);
  color: var(--ps-badge-color);
  font: normal 700 1.25rem/1.2 var(--_font-default);
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.case-study__title {
  font: normal 800 4.2rem/1.15 var(--_font-accent);
  color: var(--t-bright);
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.02em;
}

.case-study__description {
  font: normal 400 1.7rem/1.7 var(--_font-default);
  color: var(--t-medium);
  max-width: 880px;
  margin: 0;
}

/* --------------------------------------------------------------------------
   4. Unified Device Presentation (Laptop + Mobile Showcase)
   -------------------------------------------------------------------------- */
.showcase-devices-wrapper {
  position: relative;
  width: 100%;
  margin: 4.5rem 0 5.5rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.showcase-devices-stage {
  position: relative;
  width: 100%;
  max-width: 820px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

/* Laptop Mockup in Showcase */
.showcase-laptop {
  position: relative;
  width: 100%;
  max-width: 680px;
  z-index: 1;
}

.showcase-laptop__lid {
  position: relative;
  width: 100%;
  padding-bottom: 62.5%; /* 16:10 aspect ratio */
  background: #1e1e24;
  border: 10px solid #2d2d34;
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  box-shadow: 0 3rem 6rem rgba(0, 0, 0, 0.55),
              0 0.5rem 2rem rgba(108, 63, 197, 0.15);
}

.showcase-laptop__camera {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: 8px;
  height: 8px;
  background: #09090c;
  border: 1px solid #33333d;
  border-radius: 50%;
}

.showcase-laptop__screen {
  position: absolute;
  inset: 0;
  background: #0d0d11;
  overflow: hidden;
}

.showcase-laptop__screen::before,
.showcase-phone__screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(108, 63, 197, 0.16) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: showcaseShimmer 1.4s infinite ease-in-out;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1;
}

.showcase-laptop__screen.is-loading::before,
.showcase-phone__screen.is-loading::before {
  opacity: 1;
}

.showcase-laptop__screen img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}

.showcase-laptop__screen.is-loading img,
.showcase-phone__screen.is-loading img {
  opacity: 0 !important;
}

@keyframes showcaseShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.showcase-laptop__base {
  position: relative;
  width: 112%;
  height: 20px;
  margin-left: -6%;
  background: linear-gradient(180deg, #3d3d46 0%, #292930 100%);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.showcase-laptop__base::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 6px;
  background: #1e1e24;
  border-radius: 0 0 6px 6px;
}

.showcase-laptop__foot {
  width: 130%;
  height: 8px;
  margin-left: -15%;
  background: #1b1b20;
  border-radius: 0 0 16px 16px;
}

/* Smartphone Mockup Overlapping */
.showcase-phone {
  position: absolute;
  right: -20px;
  bottom: -20px;
  z-index: 3;
  width: 210px;
  height: 420px;
  background: #18181d;
  border: 7px solid #2f2f37;
  border-radius: 38px;
  padding: 10px;
  box-shadow: -1.5rem 2rem 5rem rgba(0, 0, 0, 0.65),
              0 1rem 3rem rgba(108, 63, 197, 0.25);
  transform: translateY(0);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.showcase-phone:hover {
  transform: translateY(-8px);
}

.showcase-phone__notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  width: 72px;
  height: 20px;
  background: #18181d;
  border-radius: 0 0 14px 14px;
}

.showcase-phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000000;
  border-radius: 28px;
  overflow: hidden;
}

.showcase-phone__screen img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}

/* --------------------------------------------------------------------------
   5. Case Study Details (Role, What I Did, Techs, Highlights)
   -------------------------------------------------------------------------- */
.case-study__details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4rem;
  margin-bottom: 5rem;
}

.case-study__block {
  background: var(--base-tint);
  border: 1px solid var(--stroke-elements);
  border-radius: var(--_radius-s, 1.8rem);
  padding: 3rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.case-study__block-title {
  font: normal 800 1.45rem/1 var(--_font-default);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ps-accent);
  margin: 0 0 2rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.case-study__block-title i {
  font-size: 2rem;
  color: var(--ps-accent);
}

/* Role callout */
.case-study__role-text {
  font: normal 800 2.2rem/1.3 var(--_font-accent);
  color: var(--t-bright);
  margin-bottom: 2rem;
}

/* Deliverables Checklist */
.case-study__checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.case-study__checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  font: normal 500 1.45rem/1.55 var(--_font-default);
  color: var(--t-medium);
}

.case-study__checklist-item i {
  color: var(--ps-accent);
  font-size: 1.8rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

/* Technologies in Case Study */
.case-study__tech-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.case-study__tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.6rem;
  background: var(--base-tint);
  border: 1px solid var(--stroke-elements);
  border-radius: 999px;
  font: normal 700 1.25rem/1 var(--_font-default);
  color: var(--t-bright);
  transition: all 0.25s ease;
}

.case-study__tech-pill:hover {
  background: var(--ps-accent-light);
  border-color: var(--ps-accent);
  color: var(--ps-accent);
  transform: translateY(-2px);
}

/* Highlights cards */
.case-study__highlights {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.case-study__highlight-item {
  padding: 1.8rem 2.2rem;
  background: var(--base-shade, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--stroke-elements);
  border-left: 4px solid var(--ps-highlight-border);
  border-radius: 1.2rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.case-study__highlight-item:hover {
  transform: translateX(4px);
  border-color: var(--ps-accent-border);
  box-shadow: 0 8px 24px rgba(108, 63, 197, 0.12);
}

.case-study__highlight-label {
  font: normal 800 1.35rem/1.2 var(--_font-default);
  color: var(--ps-highlight-title);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
  display: block;
}

.case-study__highlight-desc {
  font: normal 500 1.4rem/1.55 var(--_font-default);
  color: var(--t-medium);
  margin: 0;
}

/* --------------------------------------------------------------------------
   6. Action Triggers & CTAs
   -------------------------------------------------------------------------- */
.case-study__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.8rem;
  margin-bottom: 5rem;
}

.case-study__btn-live {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 3rem;
  background: #6c3fc5;
  border: 1px solid #aa70e0;
  border-radius: 999px;
  color: #ffffff;
  font: normal 700 1.4rem/1 var(--_font-default);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  box-shadow: 0 1rem 2.5rem rgba(108, 63, 197, 0.4);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.case-study__btn-live:hover {
  background: #7c4bd6;
  transform: translateY(-3px);
  box-shadow: 0 1.6rem 3.5rem rgba(108, 63, 197, 0.55);
  color: #ffffff;
}

.case-study__btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 3rem;
  background: transparent;
  border: 1px solid var(--stroke-elements);
  border-radius: 999px;
  color: var(--t-bright);
  font: normal 700 1.4rem/1 var(--_font-default);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: all 0.3s ease;
}

.case-study__btn-contact:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #aa70e0;
  color: #ffffff;
  transform: translateY(-3px);
}

/* Hire Me Card at bottom */
.case-study__hire-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2.5rem;
  padding: 3.5rem 4rem;
  background: linear-gradient(135deg, rgba(108, 63, 197, 0.16) 0%, rgba(22, 22, 26, 0.8) 100%);
  border: 1px solid rgba(170, 112, 224, 0.3);
  border-radius: var(--_radius-m, 2.4rem);
  margin-bottom: 4rem;
}

.case-study__hire-content h4 {
  font: normal 800 2.4rem/1.2 var(--_font-accent);
  color: #ffffff;
  margin: 0 0 0.8rem 0;
}

.case-study__hire-content p {
  font: normal 400 1.5rem/1.6 var(--_font-default);
  color: var(--t-muted);
  margin: 0;
}

.case-study__hire-btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 3.2rem;
  background: #aa70e0;
  border: 1px solid #c48df0;
  border-radius: 999px;
  color: #111111;
  font: normal 800 1.4rem/1 var(--_font-default);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  box-shadow: 0 1rem 3rem rgba(170, 112, 224, 0.4);
  transition: all 0.3s ease;
}

.case-study__hire-btn:hover {
  background: #ba84eb;
  transform: translateY(-3px);
  box-shadow: 0 1.5rem 4rem rgba(170, 112, 224, 0.6);
  color: #000000;
}

/* Bottom Next Project Footer */
.case-study__bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  padding-top: 3rem;
  border-top: 1px solid var(--stroke-elements);
}

.case-study__next-trigger {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-align: right;
  margin-left: auto;
  outline: none;
}

.case-study__next-label {
  font: normal 800 1.2rem/1 var(--_font-default);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ps-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: flex-end;
}

.case-study__next-title {
  font: normal 700 2.2rem/1.2 var(--_font-accent);
  color: var(--t-bright);
  transition: color 0.25s ease;
}

.case-study__next-trigger:hover .case-study__next-title {
  color: var(--ps-accent);
}

/* --------------------------------------------------------------------------
   7. Responsive Design (1440px, 1280px, 1024px, 768px, 480px, 375px)
   -------------------------------------------------------------------------- */
@media only screen and (max-width: 1199px) {
  .case-study-showcase {
    padding: 3rem 2.4rem;
  }

  .showcase-devices-stage {
    max-width: 660px;
  }

  .showcase-laptop {
    max-width: 540px;
  }

  .showcase-phone {
    width: 180px;
    height: 360px;
    right: -10px;
    bottom: -10px;
  }

  .case-study__title {
    font-size: 3.4rem;
  }
}

@media only screen and (max-width: 991px) {
  .projects-grid {
    gap: 2.2rem;
  }

  .case-study__details-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .showcase-devices-stage {
    max-width: 580px;
  }

  .showcase-laptop {
    max-width: 480px;
  }

  .showcase-phone {
    width: 160px;
    height: 320px;
    right: 0px;
    bottom: -15px;
    border-width: 6px;
    border-radius: 30px;
  }
}

@media only screen and (max-width: 767px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-card {
    padding: 2rem;
    border-radius: 2rem;
  }

  .project-card__preview {
    height: 200px;
  }

  .project-card__title {
    font-size: 2.1rem;
  }

  .case-study-showcase {
    padding: 2.5rem 1.6rem;
    border-radius: 2rem;
  }

  .case-study__title {
    font-size: 2.8rem;
  }

  .case-study__description {
    font-size: 1.5rem;
  }

  /* Devices stack vertically on mobile to avoid cramped overlap */
  .showcase-devices-stage {
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    max-width: 100%;
  }

  .showcase-laptop {
    width: 100%;
    max-width: 100%;
  }

  .showcase-laptop__lid {
    border-width: 6px;
    border-radius: 12px 12px 0 0;
  }

  .showcase-laptop__base {
    width: 106%;
    margin-left: -3%;
    height: 14px;
  }

  .showcase-laptop__foot {
    width: 116%;
    margin-left: -8%;
    height: 6px;
  }

  .showcase-phone {
    position: relative;
    right: auto;
    bottom: auto;
    width: 200px;
    height: 400px;
    margin: 0 auto;
    border-width: 7px;
    border-radius: 36px;
  }

  .case-study__block {
    padding: 2rem 1.6rem;
  }

  .case-study__hire-card {
    padding: 2.5rem 2rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .case-study__hire-btn {
    width: 100%;
    justify-content: center;
  }

  .case-study__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .case-study__btn-live,
  .case-study__btn-contact {
    width: 100%;
    justify-content: center;
  }

  .case-study__bottom-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 2rem;
  }

  .case-study__next-trigger {
    text-align: left;
    margin-left: 0;
  }

  .case-study__next-label {
    justify-content: flex-start;
  }
}

@media only screen and (max-width: 480px) {
  .projects-filter-bar {
    gap: 0.6rem;
  }

  .projects-filter-btn {
    padding: 0.7rem 1.4rem;
    font-size: 1.15rem;
  }

  .project-card__title {
    font-size: 1.9rem;
  }

  .case-study__title {
    font-size: 2.4rem;
  }

  .showcase-phone {
    width: 180px;
    height: 360px;
  }
}

/* --------------------------------------------------------------------------
   8. Reduced Motion Accessibility
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-card__preview img,
  .case-study-showcase,
  .showcase-phone,
  .projects-filter-btn,
  .case-study__btn-live,
  .case-study__btn-contact,
  .case-study__hire-btn {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}
