/* ===== Resume page: waterproofing projects list (tabs + full-width rows) =====
   Row layout: text on the right, photo on the left (DOM order: body, then media —
   in an RTL grid the first child lands in the rightmost column). */
.resume-projects {
  --navy: #0c1f38;
  --yellow: #ffc31d;
  --gray: #f1f1f1;
  --white: #fff;
  --text: #0c1f38;
  --text-soft: rgba(12, 31, 56, .68);
  --line: rgba(12, 31, 56, .14);

  position: relative;
  direction: rtl;
  color: var(--text);
  background: var(--white);
  padding-block: clamp(40px, 6vw, 88px);
}
.resume-projects *,
.resume-projects *::before,
.resume-projects *::after { box-sizing: border-box; }

.resume-projects__inner {
  max-width: var(--landing-wrap, 1620px);
  margin-inline: auto;
  padding-inline: var(--landing-gutter, clamp(20px, 4vw, 40px));
}

.resume-projects h2.resume-projects__title {
  margin: 0 0 clamp(24px, 3vw, 36px);
  font-size: clamp(1.375rem, 1rem + 1.2vw, 2rem);
  font-weight: 800;
  line-height: 1.5;
  color: var(--navy);
}

/* --- tabs (built from the service_type terms actually used by the listed projects) --- */
.resume-projects__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 clamp(28px, 3.5vw, 40px);
}
.resume-tab {
  position: relative;
  padding: 11px 22px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--text-soft);
  font: inherit;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.6;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.resume-tab:hover { border-color: var(--navy); color: var(--navy); }
.resume-tab.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}
.resume-tab:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.resume-tab .resume-tab__count {
  margin-inline-start: 6px;
  opacity: .7;
  font-size: .8125rem;
  font-weight: 700;
}

/* --- rows --- */
.resume-projects__list {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.6vw, 28px);
}

.resume-row {
  position: relative;
  isolation: isolate;
  transition: opacity .2s ease;
}
.resume-row.is-hidden { display: none; }

.resume-row__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr);
  align-items: stretch;
  min-height: 240px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .25s ease, transform .25s ease;
}
.resume-row__link:hover,
.resume-row__link:focus-visible {
  box-shadow: 0 22px 44px -26px rgba(12, 31, 56, .45);
  transform: translateY(-2px);
}
.resume-row__link:focus-visible { outline: 3px solid var(--navy); outline-offset: -3px; }

/* body first in the DOM -> rightmost column in this RTL grid */
.resume-projects__inner .resume-row__body { order: 0; }
.resume-projects__inner .resume-row__media { order: 1; }

.resume-row__media {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  background: var(--gray);
}
.resume-row__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.resume-row__link:hover .resume-row__media img { transform: scale(1.04); }

/* corner frame marks: a subtle "photo card" cue at two opposite corners (physical, not logical) */
.resume-row__media::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  width: 22px;
  height: 22px;
  border-top: 2px solid rgba(255, 255, 255, .85);
  border-left: 2px solid rgba(255, 255, 255, .85);
  pointer-events: none;
}
.resume-row::after {
  content: "";
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  border-bottom: 2px solid var(--yellow);
  border-right: 2px solid var(--yellow);
  z-index: 2;
  pointer-events: none;
}

/* service-type badge, inside the photo (bottom corner, next to the seam) */
.resume-row__badge {
  position: absolute;
  bottom: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--navy);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
  box-shadow: 0 10px 20px -10px rgba(12, 31, 56, .5);
  z-index: 3;
}

.resume-row__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  padding: clamp(24px, 3vw, 40px) clamp(24px, 3vw, 40px) clamp(28px, 3.4vw, 44px);
  min-width: 0;
}

.resume-projects h3.resume-row__title {
  margin: 0;
  font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem);
  font-weight: 800;
  line-height: 1.6;
  color: var(--navy);
}

.resume-projects p.resume-row__location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: .9375rem;
  line-height: 1.8;
  color: var(--text-soft);
}
.resume-row__location svg { width: 17px; height: 17px; flex: none; opacity: .8; }

.resume-row__meta {
  display: flex;
  flex-direction: column;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.resume-row__meta li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.resume-row__meta .label {
  flex: none;
  font-size: .8125rem;
  color: var(--text-soft);
}
.resume-row__meta .value {
  min-width: 0;
  text-align: end;
  overflow-wrap: anywhere;
  font-size: .9375rem;
  font-weight: 700;
  color: var(--navy);
}

.resume-projects p.resume-projects__empty {
  margin: 8px 0 0;
  padding: 32px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  text-align: center;
  color: var(--text-soft);
}
.resume-projects p.resume-projects__empty[hidden] { display: none; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .resume-row__link { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .resume-projects__inner .resume-row__body { order: 0; }
  .resume-projects__inner .resume-row__media { order: -1; }
  .resume-row__media { min-height: 220px; aspect-ratio: 16 / 10; }
}
@media (max-width: 480px) {
  .resume-tab { padding: 9px 16px; font-size: .875rem; }
}
@media (prefers-reduced-motion: reduce) {
  .resume-row__link,
  .resume-row__media img,
  .resume-tab,
  .resume-row { transition: none; }
}
