#experience {
  overflow: hidden;
}

.exp-track {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 0 12%;
  overflow-x: auto;
  overflow-y: hidden;
  height: 100%;
  width: 100%;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 12%;
}

@media (max-width: 750px) {
  .exp-track {
    padding: 0 5% !important;
    gap: 1rem;
    scroll-padding: 0 5% !important;
  }

  .exp-card {
    min-width: 90% !important;
    max-width: 90% !important;
    height: 85% !important;
    padding: 1.5rem 1.5rem 1.25rem 2rem !important;
  }

  .exp-role {
    font-size: 1.25rem !important;
  }

  .exp-company {
    font-size: .9rem !important;
  }
}

/* ── Experience nav buttons ── */
.exp-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: transparent;
  border: 1px solid #252525;
  border-radius: 50%;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease;
  flex-shrink: 0;
}

.exp-nav:hover {
  border-color: #EB4468;
  background: rgba(235, 68, 104, 0.1);
}

.exp-nav svg {
  width: 0.85rem;
  height: 0.85rem;
  stroke: #444;
  transition: stroke 200ms ease;
}

.exp-nav:hover svg {
  stroke: #EB4468;
}

.exp-nav-prev {
  left: 9%;
}

.exp-nav-next {
  right: 4%;
}

@media (max-width: 750px) {
  .exp-nav {
    display: none;
  }
}

/* ── Card top bar (shared by card expand and modal close) ── */
.card-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: .4rem .75rem;
  margin: -2.5rem -2.5rem 1.25rem -3rem;
  border-bottom: 1px solid #1f1f1f;
  flex-shrink: 0;
}

@media (max-width: 750px) {
  .exp-card .card-topbar {
    margin: -1.5rem -1.5rem .75rem -2rem;
  }

  .modal-card .card-topbar {
    margin: -2rem -1.25rem .75rem -1.75rem;
  }
}

/* ── Shared icon button style (expand + close) ── */
.exp-expand,
.modal-close {
  background: transparent;
  border: 1px solid #2a2a2a;
  border-radius: .4rem;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease, opacity 200ms ease;
}

.exp-expand svg,
.modal-close svg {
  width: .85rem;
  height: .85rem;
  stroke: #555;
  transition: stroke 200ms ease;
}

.exp-expand:hover,
.modal-close:hover {
  border-color: #EB4468;
  background: rgba(235, 68, 104, 0.1);
}

.exp-expand:hover svg,
.modal-close:hover svg {
  stroke: #EB4468;
}

/* expand button fades in on card hover, always visible on mobile */
.exp-expand {
  opacity: 0;
}

.exp-card:hover .exp-expand {
  opacity: 1;
}

@media (max-width: 750px) {
  .exp-expand {
    opacity: 1 !important;
    border-color: #EB4468;
    background: rgba(235, 68, 104, 0.08);
  }

  .exp-expand svg {
    stroke: #EB4468;
  }
}

/* ── Experience modal ── */
#exp-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#exp-modal.open {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  position: relative;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: .75rem;
  width: min(88vw, 860px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 2.5rem 2rem 3rem;
  overflow: hidden;
  transform: scale(0.96) translateY(8px);
  transition: transform 220ms ease;
}

#exp-modal.open .modal-card {
  transform: scale(1) translateY(0);
}

.modal-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3.2rem;
  bottom: 2rem;
  width: 3px;
  background: #EB4468;
  border-radius: 0 2px 2px 0;
}


.modal-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  gap: 1.5rem;
}

.modal-content .exp-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: .5rem;
}

.modal-content .exp-tags {
  flex-shrink: 0;
}

@media (max-width: 750px) {
  #exp-modal {
    align-items: flex-end;
  }

  .modal-card {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    padding: 2rem 1.25rem 1.5rem 1.75rem;
    transform: translateY(16px);
  }

  #exp-modal.open .modal-card {
    transform: translateY(0);
  }

  .modal-card::before {
    display: none;
  }
}

.exp-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  height: 78%;
  min-width: 76%;
  max-width: 76%;
  border-radius: .75rem;
  background-color: #1a1a1a;
  overflow: hidden;
  border: 1px solid #2a2a2a;
  padding: 2.5rem 2.5rem 2rem 3rem;
  transition: border-color ease-in-out 250ms;
  scroll-snap-align: center;
}

.exp-card:hover {
  border-color: #535353;
}

.exp-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3.2rem;
  bottom: 2rem;
  width: 3px;
  background: #EB4468;
  border-radius: 0 2px 2px 0;
}

.exp-body {
  flex: 1;
  overflow-y: auto;
  padding-right: .5rem;
  min-height: 0;
}

.exp-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .5rem;
}

.exp-period {
  color: #EB4468;
  font-size: .85rem !important;
  font-weight: 700;
}

.exp-badge {
  background: #EB4468;
  color: #ffffff;
  padding: .15rem .55rem;
  border-radius: 1rem;
  font-size: .65rem !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Prevents global h1 { white-space: nowrap } and h1 { margin-top: 2rem } from breaking cards */
.exp-role {
  white-space: normal !important;
  margin-top: 0 !important;
  font-size: 1.6rem !important;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: .35rem;
}

/* Prevents global span { font-size: 4.5vw !important } from overriding the dimmed level text */
.exp-role span {
  font-size: inherit !important;
  font-weight: 400;
  color: #888888;
}

.exp-company {
  font-size: 1rem !important;
  font-weight: 700;
  color: #cccccc;
  margin: 0 0 .2rem;
}

.exp-location {
  display: block;
  font-size: .78rem !important;
  color: #555555;
  margin-bottom: 1.2rem;
}

.exp-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.exp-bullets li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: .5rem;
  font-size: .88rem !important;
  color: #bbbbbb;
  line-height: 1.5;
}

.exp-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: #EB4468;
  font-size: .75rem !important;
  line-height: 1.9;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding-top: 1rem;
  border-top: 1px solid #252525;
  flex-shrink: 0;
}

.exp-tags span {
  font-size: .7rem !important;
  padding: .2rem .55rem;
  border: 1px solid #353535;
  border-radius: .3rem;
  color: #777777;
  background: transparent;
}

/* ══════════════════════════════════════════
   Projects section – carousel (mirrors experience)
══════════════════════════════════════════ */
#projects {
  overflow: hidden;
}

.proj-track {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 0 12%;
  overflow-x: auto;
  overflow-y: hidden;
  height: 100%;
  width: 100%;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 12%;
}

@media (max-width: 750px) {
  .proj-track {
    padding: 0 5% !important;
    gap: 1rem;
    scroll-padding: 0 5% !important;
  }
}

/* ── Project nav buttons (mirrors .exp-nav) ── */
.proj-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: transparent;
  border: 1px solid #252525;
  border-radius: 50%;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease;
  flex-shrink: 0;
}

.proj-nav:hover {
  border-color: #EB4468;
  background: rgba(235, 68, 104, 0.1);
}

.proj-nav svg {
  width: 0.85rem;
  height: 0.85rem;
  stroke: #444;
  transition: stroke 200ms ease;
}

.proj-nav:hover svg {
  stroke: #EB4468;
}

.proj-nav-prev { left: 9%; }
.proj-nav-next { right: 4%; }

@media (max-width: 750px) {
  .proj-nav { display: none; }
}

/* ── Project card ── */
.project-card {
  display: flex;
  flex-direction: column;
  position: relative;
  height: 78%;
  min-width: 76%;
  max-width: 76%;
  border-radius: .75rem;
  background-color: #1a1a1a;
  overflow: hidden;
  border: 1px solid #2a2a2a;
  transition: border-color ease-in-out 250ms;
  scroll-snap-align: center;
}

.project-card:hover {
  border-color: #535353;
}

/* accent bar on the left, same as exp-card */
.project-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #EB4468;
  border-radius: 0 2px 2px 0;
  z-index: 1;
}

.project-image {
  width: 100%;
  height: 52%;
  flex-shrink: 0;
  overflow: hidden;
  background: #111;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}

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

.project-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 2rem 1.5rem 2.5rem;
  overflow-y: auto;
  min-height: 0;
}

.project-name {
  white-space: normal !important;
  margin-top: 0 !important;
  font-size: 1.4rem !important;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: .5rem;
}

.project-description {
  font-size: .86rem !important;
  color: #bbbbbb;
  line-height: 1.55;
  margin: 0 0 1rem;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding-top: .85rem;
  border-top: 1px solid #252525;
}

.project-tags span {
  font-size: .7rem !important;
  padding: .2rem .55rem;
  border: 1px solid #353535;
  border-radius: .3rem;
  color: #777777;
  background: transparent;
}

.project-link {
  display: inline-block;
  margin-top: .75rem;
  font-size: .8rem;
  color: #EB4468;
  text-decoration: none;
  font-weight: 600;
}

.project-link:hover {
  text-decoration: underline;
}

.no-projects {
  color: #555;
  font-size: .9rem;
  text-align: center;
  padding: 2rem 0;
  width: 100%;
}

@media (max-width: 750px) {
  .project-card {
    min-width: 90% !important;
    max-width: 90% !important;
    height: 85% !important;
  }

  .project-name {
    font-size: 1.25rem !important;
  }

  .project-info {
    padding: 1.25rem 1.5rem 1.25rem 2rem !important;
  }
}
