/* ==========================================================================
   Experience page — centered content card over the Experience home-hover bg.
   ========================================================================== */

html,
body {
  background: #2d2d2d;
}

body {
  --index-chevron-left-offset: 626px;
  --index-chevron-top: 80px;

  color: #000000;
}

/* display:contents grouping — lets reveal.js scope the pill + content while the
   transform below is applied only to <main>, so the fixed pill stays viewport-fixed */
.experience-root {
  display: contents;
}

.experience-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, #2d2d2d 0%, #878787 35%, #c4c4c4 70%, #f9f9f9 100%);
}

.experience-bg .displacement-map-canvas {
  position: absolute;
  top: 0;
  left: 0;
}

.experience-page {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(1032px, calc(100% - 48px));
  margin: 80px auto 0;
  padding: 96px 24px 120px;
  overflow: visible;
  background: #ffffff;
  border-radius: 28px;
  background-clip: padding-box;
  -webkit-background-clip: padding-box;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: var(--site-shadow);
  font-weight: 400;
}

.experience-contact-section {
  width: min(1032px, calc(100% - 48px));
  margin: 0 auto 24px;
}

.experience-contact-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
}

.experience-contact-social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  min-height: 358px;
}

.experience-contact-social-card,
.experience-contact-card {
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 28px;
  background: #ffffff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: var(--site-shadow);
}

.experience-contact-social-card {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  text-decoration: none;
  box-shadow: var(--site-shadow);
  transition:
    background-color 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}

.experience-contact-social-card:hover,
.experience-contact-social-card:focus-visible {
  background: #f2f2f2;
  box-shadow: var(--site-shadow);
}

.experience-contact-social-card img {
  display: block;
  width: 32px;
  height: 32px;
}

.experience-contact-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 358px;
  padding: 40px 32px 32px;
  color: #000000;
}

.experience-contact-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.experience-contact-label {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 28px;
  padding: 6px 12px;
  border-radius: 26.264px;
  background: #f3f3f3;
  color: rgba(0, 0, 0, 0.5);
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  letter-spacing: -0.1876px;
}

.experience-contact-text {
  margin: 0;
  color: #000000;
  font-size: 20px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: -0.4px;
}

.experience-contact-email {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 75px;
  padding: 0 16px;
  border-radius: 16px;
  background: #f7f6f6;
  color: rgba(0, 0, 0, 0.2);
  font-size: 34.667px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -1.0577px;
  text-decoration: none;
  white-space: nowrap;
}

.experience-contact-meta {
  color: rgba(0, 0, 0, 0.16);
}

.experience-contact-section .reveal-on-scroll.is-settled {
  filter: none;
  transform: none;
  will-change: auto;
}

/* --- Back to Index pill (matches Figma 2020:11552) --- */
.exp-back-pill {
  position: fixed;
  top: calc(48px + env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 30;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 10px 16px;
  border-radius: 56px;
  border: 0;
  background-clip: padding-box;
  -webkit-background-clip: padding-box;
  background-color: #fff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: var(--site-shadow);
  color: #000000;
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: -0.2px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transform: translateX(-50%);
}

.exp-back-pill.reveal-on-scroll {
  transform: translate(-50%, 12px);
}

.exp-back-pill.reveal-on-scroll.is-revealed {
  transform: translate(-50%, 0);
}

.exp-back-pill.reveal-on-scroll.is-settled {
  filter: none;
  transform: translateX(-50%);
  will-change: auto;
}

/* --- content column --- */
.experience-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 488px;
  max-width: 100%;
  margin: 0 auto;
}

/* Release the compositor layer left by the reveal once it settles
   (persistent will-change + filter + transform can leave a ghost copy). */
.experience-content .reveal-on-scroll.is-settled {
  filter: none;
  transform: none;
  will-change: auto;
}

/* --- heading --- */
.exp-heading {
  width: 300px;
  max-width: 100%;
  margin: 0;
  color: #000000;
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

/* --- intro paragraphs --- */
.exp-intro {
  display: flex;
  flex-direction: column;
  gap: 24px; /* one blank line between paragraphs */
  width: 100%;
  margin-top: 32px;
}

.exp-intro p {
  margin: 0;
  color: #000000;
  font-size: 18px;
  line-height: 24px;
  letter-spacing: -0.4px;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: pretty;
}

/* --- current work snapshot --- */
.exp-projects {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  margin-top: 80px;
}

.exp-projects-heading {
  margin: 0;
  color: #000000;
  font-size: 18px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: -0.4px;
}

.exp-project-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.exp-project {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  min-height: 72px;
  padding: 0 0 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.exp-project + .exp-project {
  padding-top: 24px;
}

.exp-project-logo {
  --exp-project-logo-bg: #f5f5f5;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 56px;
  height: 72px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  isolation: isolate;
}

.exp-project-logo::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: -7.5px;
  top: -7.1px;
  width: 84px;
  height: 99px;
  background: url("./assets/logo-assets/projects/logo-card-shadow.svg") center / 100% 100% no-repeat;
  pointer-events: none;
}

.exp-project-logo::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  box-sizing: border-box;
  border: 2px solid #ffffff;
  border-radius: 8px;
  background: var(--exp-project-logo-bg);
  pointer-events: none;
}

.exp-project-logo img {
  position: relative;
  z-index: 2;
  display: block;
  width: 24px;
  height: 24px;
  max-width: 24px;
  max-height: 24px;
  object-fit: contain;
}

.exp-project-logo--hilbert {
  --exp-project-logo-bg: #1f55ff;
}

.exp-project-logo--ornn {
  --exp-project-logo-bg: #000000;
}

.exp-project-logo--ornn img {
  filter: brightness(0) invert(1);
}

.exp-project-logo--emeris {
  --exp-project-logo-bg: #000000;
}

.exp-project-logo--bibliu {
  --exp-project-logo-bg: #604dad;
}

.exp-project-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.exp-project-copy h3 {
  margin: 0;
  color: #000000;
  font-size: 18px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: -0.4px;
}

.exp-project-copy p {
  margin: 0;
  color: rgba(0, 0, 0, 0.5);
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: -0.4px;
}

.exp-closing {
  width: 100%;
  margin: 40px 0 0;
  color: #000000;
  font-size: 18px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: -0.4px;
}

/* --- experience list --- */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  margin-top: 80px;
}

.exp-entry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

.exp-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.exp-headline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
}

.exp-role {
  margin: 0;
  width: 100%;
  color: #000000;
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: -0.18px;
}

.exp-role a {
  color: inherit;
  text-decoration: underline;
  text-underline-position: from-font;
  text-decoration-thickness: from-font;
}

.exp-date {
  margin: 0;
  color: #000000;
  font-size: 15px;
  line-height: 22px;
  font-weight: 400;
}

.exp-desc {
  margin: 0;
  width: 100%;
  color: #000000;
  font-size: 15px;
  line-height: 22px;
  font-weight: 400;
}

/* --- achievement bullets --- */
.exp-points {
  width: 100%;
  margin: 0;
  padding-left: 22px;
  list-style: disc outside;
  color: #000000;
  font-size: 15px;
  font-weight: 400;
}

.exp-points li {
  line-height: 22px;
}

.exp-points li:not(:last-child) {
  margin-bottom: 6px;
}

/* line spans produced by [data-reveal-lines] are display:block; keep them
   flush inside the list item so the disc marker aligns to the first line */
.exp-points li .reveal-line {
  display: block;
}

/* --- client sub-groups (Heartbeat) --- */
.exp-clients {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

.exp-client {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.exp-client-name {
  margin: 0;
  width: 100%;
  color: #000000;
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
}

.exp-client-name a {
  color: inherit;
  text-decoration: underline;
  text-underline-position: from-font;
  text-decoration-thickness: from-font;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 540px) {
  .experience-page {
    width: calc(100% - 32px);
    margin: 80px auto 0;
    padding: 56px 24px 72px;
  }

  .experience-contact-section {
    width: calc(100% - 32px);
    margin-bottom: 24px;
  }

  .experience-contact-row {
    grid-template-columns: 1fr;
  }

  .experience-contact-card {
    order: 1;
  }

  .experience-contact-social-grid {
    order: 2;
    gap: 12px;
    min-height: 0;
  }

  .experience-contact-social-card {
    min-height: 128px;
  }

  .experience-contact-card {
    min-height: 328px;
    padding: 32px 24px 24px;
  }

  .experience-contact-email {
    min-height: 64px;
    font-size: clamp(24px, 8vw, 34.667px);
  }

  .experience-contact-meta {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
  }

  .experience-contact-location {
    justify-content: center;
  }

  .exp-back-pill {
    max-width: calc(100% - 32px);
  }

  .exp-heading {
    font-size: 28px;
    line-height: 34px;
  }

  .exp-intro {
    margin-top: 28px;
  }

  .exp-projects {
    margin-top: 64px;
  }

  .exp-project {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
  }

  .exp-project-copy h3 {
    font-size: 17px;
    line-height: 23px;
  }

  .exp-project-copy p {
    font-size: 15px;
    line-height: 20px;
  }

  .exp-intro p {
    font-size: 16px;
    line-height: 22px;
  }

  .exp-list {
    margin-top: 56px;
  }

}
