/* Work Experience page. Uses style.css (colours, CV button, transitions)
   and about.css (back link, chips) */

/* ========== Layout: heading on top, timeline | details below ========== */
.exp {
  height: 100vh;
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  grid-template-rows: auto 1fr;
  column-gap: 5vw;
  row-gap: 5vh;
  padding: 13vh 5vw 6vh;
  overflow: hidden;
}

.exp-head { grid-column: 1 / -1; }

.exp-title {
  margin-top: 1.6vh;
  font-size: min(3.6vw, 6vh);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--white);
}
.exp-title em { font-style: normal; font-weight: 700; color: var(--burgundy-light); }

/* ========== Left: timeline ========== */
.roles {
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.6vh;
  border-left: 1px solid rgba(226, 177, 60, 0.35);
}

.role {
  position: relative;
  text-align: left;
  font-family: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-left: none;
  border-radius: 0 14px 14px 0;
  padding: 1.6vh 1.5vw 1.6vh 2vw;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* timeline dot */
.role::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 2.3vh;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2A2023;
  border: 1px solid var(--gold);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.role b {
  display: block;
  font-size: min(1.3vw, 2.4vh);
  font-weight: 500;
  color: var(--white);
}
.role > span {
  display: block;
  margin-top: 0.5vh;
  font-size: min(0.95vw, 1.75vh);
  color: var(--muted);
}

.role:hover { background: rgba(226, 177, 60, 0.06); }

/* tighter list for pages with many roles (Leadership) */
.roles.compact { gap: 0.2vh; }
.roles.compact .role { padding-top: 1.15vh; padding-bottom: 1.15vh; }
.roles.compact .role::before { top: 1.9vh; }

.role.active {
  background: rgba(176, 58, 85, 0.20);
  border-color: rgba(176, 58, 85, 0.50);
}
.role.active::before { background: var(--gold); box-shadow: 0 0 12px var(--gold); }

.now {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border: 1px solid rgba(226, 177, 60, 0.5);
  border-radius: 999px;
  font-size: 0.55em;
  font-weight: 500;
  color: var(--gold);
  vertical-align: middle;
}

/* ========== Right: details panel ========== */
.details {
  align-self: start;
  max-height: 100%;
  overflow-y: auto;          /* long roles scroll inside the panel */
  scrollbar-width: thin;
  scrollbar-color: rgba(226, 177, 60, 0.4) transparent;
  border-radius: 18px;
  background: rgba(226, 177, 60, 0.07);
  border: 1px solid rgba(226, 177, 60, 0.30);
  padding: 4vh 2.6vw;
}

/* soft fade at the bottom so it's clear the panel scrolls */
.details::after {
  content: "";
  position: sticky;
  bottom: -4vh;
  display: block;
  height: 7vh;
  margin: 0 -2.6vw -4vh;
  background: linear-gradient(transparent, #191510);
  pointer-events: none;
}

.panel { display: none; }
.panel.active { display: block; animation: panel-in 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } }

.meta {
  font-size: min(0.9vw, 1.6vh);
  letter-spacing: 0.2em;
  color: var(--gold);
}

.panel h2 {
  margin-top: 1.2vh;
  font-size: min(2.2vw, 3.8vh);
  font-weight: 500;
  line-height: 1.15;
  color: var(--white);
}

.panel h3 {
  margin-top: 0.8vh;
  font-size: min(1.25vw, 2.3vh);
  font-weight: 400;
  color: #D9CDC0;
}

.panel ul { list-style: none; margin-top: 3vh; }
.panel li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 1.4vh;
  font-size: min(1.1vw, 2vh);
  line-height: 1.6;
  color: #D9CDC0;
}
.panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 8px;
  height: 2px;
  background: var(--gold);
}
.panel li b { font-weight: 500; color: var(--gold); }

.group-label {
  margin-top: 2.6vh;
  font-size: min(0.8vw, 1.5vh);
  letter-spacing: 0.3em;
  color: var(--gold);
}
.group-label + ul { margin-top: 1.4vh; }

.tools-label {
  margin-top: 2.6vh;
  font-size: min(0.8vw, 1.5vh);
  letter-spacing: 0.3em;
  color: var(--muted);
}

/* ========== Tablets & phones: stack, allow scrolling ========== */
@media (max-width: 900px) {
  .exp {
    display: flex;
    flex-direction: column;
    gap: 28px;
    height: auto;
    overflow: visible;
    padding: 80px 20px 48px;
  }

  .exp-title { font-size: 38px; }
  .role { padding: 14px 16px 14px 22px; }
  .role::before { top: 20px; }
  .roles.compact .role { padding-top: 14px; padding-bottom: 14px; }
  .roles.compact .role::before { top: 20px; }
  .role b { font-size: 18px; }
  .role > span { font-size: 13px; }

  .details { padding: 26px 22px; }
  .meta { font-size: 12px; }
  .panel h2 { font-size: 24px; }
  .panel h3 { font-size: 16px; }
  .panel li { font-size: 15px; }
  .group-label, .tools-label { font-size: 11px; margin-top: 20px; }
  .details { max-height: none; overflow: visible; }
  .details::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .panel.active { animation: none; }
}
