.projects-section {
  min-height: calc(100vh - 74px);
  background: var(--surface);
}

.featured-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 0;
  overflow: hidden;
  background: var(--panel-dark);
  border-radius: var(--radius);
  color: #ffffff;
}

.featured-project-image img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.featured-project-copy {
  padding: 34px;
  align-self: center;
}

.featured-project-copy h3 {
  margin: 10px 0 18px;
  font-size: 1.9rem;
  line-height: 1.18;
}

.featured-project-copy ul,
.project-card ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.featured-project-copy li,
.project-card li {
  position: relative;
  padding-left: 18px;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.82);
}

.featured-project-copy li::before,
.project-card li::before {
  position: absolute;
  left: 0;
  top: 10px;
  width: 7px;
  height: 7px;
  content: "";
  background: var(--amber);
  border-radius: 50%;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.project-card {
  overflow: hidden;
  background: var(--panel-dark);
  border-radius: var(--radius);
  color: #ffffff;
}

.project-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  opacity: 0.9;
}

.project-card div {
  padding: 18px;
}

.project-card h3 {
  min-height: 54px;
  margin: 0 0 12px;
  font-size: 1rem;
  line-height: 1.25;
}

.project-card li {
  font-size: 0.88rem;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.gallery-heading {
  margin: 34px 0 0;
  font-size: 1.35rem;
}

.project-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
}

@media (max-width: 1080px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .featured-project {
    grid-template-columns: 1fr;
  }

  .featured-project-image img {
    min-height: 300px;
  }

  .featured-project-copy {
    padding: 22px 18px;
  }

  .featured-project-copy h3 {
    margin-bottom: 12px;
    font-size: 1.45rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .project-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .featured-project-image img {
    min-height: 236px;
  }

  .project-card h3 {
    min-height: 0;
    font-size: 0.96rem;
    overflow-wrap: anywhere;
  }

  .project-card div {
    padding: 14px;
  }

  .project-gallery {
    gap: 8px;
  }
}

.projects-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(237, 244, 242, 0.68)),
    var(--surface);
}

.featured-project {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-strong);
}

.featured-project::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(120deg, transparent 48%, rgba(56, 170, 184, 0.16));
  pointer-events: none;
}

.featured-project-image {
  overflow: hidden;
}

.featured-project-image img {
  transition: transform 700ms ease, filter 700ms ease;
}

.featured-project:hover .featured-project-image img {
  filter: saturate(1.1) contrast(1.05);
  transform: scale(1.04);
}

.featured-project-copy {
  position: relative;
  z-index: 2;
}

.project-card {
  position: relative;
  box-shadow: 0 14px 34px rgba(20, 33, 38, 0.11);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.project-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 35%, rgba(8, 88, 82, 0.34));
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  box-shadow: var(--shadow-strong);
  transform: translateY(-6px);
}

.project-card:hover::after,
.project-card:focus-visible::after {
  opacity: 1;
}

.project-card img {
  transition: transform 520ms ease, opacity 220ms ease, filter 520ms ease;
}

.project-card:hover img,
.project-card:focus-visible img {
  filter: saturate(1.12);
  opacity: 1;
  transform: scale(1.06);
}

.project-card div {
  position: relative;
  z-index: 1;
}

.project-gallery img {
  box-shadow: 0 12px 28px rgba(20, 33, 38, 0.1);
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

.project-gallery img:hover {
  filter: saturate(1.12);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

body.ui-theme-dark .projects-section {
  background:
    linear-gradient(180deg, rgba(18, 30, 36, 0.95), rgba(16, 26, 33, 0.82)),
    var(--surface);
}
