/* ============================================================
   HSEI.IO — profession.css
   /profession: credential aesthetic — gold seal, monument, path
   ============================================================ */

.prof-page .toc-content {
  position: relative;
  overflow-x: clip;
}

.prof-page .page-title {
  animation: none;
}

/* ---------- DIRECTIONAL ENTRANCE ---------- */
.prof-enter {
  opacity: 0;
  filter: blur(8px);
  transition:
    opacity 2.1s cubic-bezier(0.22, 1, 0.36, 1),
    transform 2.25s cubic-bezier(0.22, 1, 0.36, 1),
    filter 1.95s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform, filter;
}
.prof-enter--from-left { transform: translateX(-64px); }
.prof-enter--from-right { transform: translateX(64px); }
.prof-enter--from-up { transform: translateY(48px) scale(0.96); }
.prof-enter--from-center {
  transform: scaleX(0);
  transform-origin: center center;
  filter: none;
}
.prof-enter.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: none;
}
.prof-enter--from-center.is-visible {
  transform: scaleX(1);
}

.prof-converge-rail {
  height: 2px;
  margin: 10px 0 22px;
  overflow: hidden;
  border-radius: 999px;
}
.prof-converge-rail span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--gold) 22%,
    var(--teal-accent) 50%,
    rgba(228, 184, 174, 0.6) 78%,
    transparent 100%
  );
  opacity: 0.7;
}

/* ---------- HERO · GOLD SEAL ---------- */
#s-intro {
  position: relative;
}
.prof-hero-seal {
  position: absolute;
  top: 0;
  right: 0;
  width: 88px;
  height: 88px;
  pointer-events: none;
  opacity: 0.55;
}
.prof-hero-seal svg {
  width: 100%;
  height: 100%;
  animation: prof-seal-spin 24s linear infinite;
}
@keyframes prof-seal-spin {
  to { transform: rotate(360deg); }
}

.meta-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.mi {
  color: var(--text-ghost);
  padding: 6px 12px;
  border: 0.5px solid var(--border-neutral);
  border-radius: 999px;
  background: var(--bg-surface);
}
.mi span {
  color: var(--gold);
}

/* ---------- SECTIONS ---------- */
.tp-sec {
  margin-bottom: 52px;
  padding-bottom: 52px;
  border-bottom: 0.5px solid var(--border-neutral);
}
.tp-sec:last-of-type,
.tp-sec--last {
  border-bottom: none;
  padding-bottom: 0;
}
.sec-label {
  color: var(--gold);
  margin-bottom: 14px;
  display: block;
  letter-spacing: 0.1em;
}
.sec-title {
  color: var(--text-main);
  margin-bottom: 18px;
}
.tp-body {
  color: var(--text-muted);
  margin-bottom: 16px;
}
.tp-body em {
  color: var(--text-main);
  font-style: italic;
}
.tp-body strong {
  color: var(--text-main);
  font-weight: 500;
}

/* Defining monument */
.defining-box {
  background: linear-gradient(160deg, rgba(228, 184, 174, 0.06), var(--bg-surface));
  border: 0.5px solid var(--border-gold);
  border-radius: 8px;
  padding: 32px 34px;
  margin: 24px 0;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}
.defining-box::before,
.defining-box::after {
  content: "◆";
  position: absolute;
  color: rgba(228, 184, 174, 0.35);
  font-size: 10px;
}
.defining-box::before {
  top: 14px;
  left: 18px;
}
.defining-box::after {
  bottom: 14px;
  right: 18px;
}
.def-text {
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.55;
}
.def-text em {
  font-style: italic;
  color: var(--gold);
}
.def-sub {
  color: var(--teal-accent);
  letter-spacing: 0.14em;
}

/* Comparison table */
.comp-table-wrap {
  margin: 20px 0;
  border: 0.5px solid var(--border-gold-md);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}
.comp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}
.comp-table th {
  padding: 12px 14px;
  text-align: left;
  color: var(--text-ghost);
  font-weight: 400;
  border-bottom: 0.5px solid var(--border-gold-md);
  background: rgba(228, 184, 174, 0.04);
}
.comp-table th.gold {
  color: var(--gold);
}
.comp-table td {
  padding: 12px 14px;
  border-bottom: 0.5px solid var(--border-neutral);
  color: var(--text-muted);
  vertical-align: top;
  transition: background 0.2s ease;
}
.comp-table tbody tr:not(.hse-row):hover td {
  background: rgba(255, 255, 255, 0.02);
}
.comp-table td.profession {
  font-weight: 500;
  color: var(--text-main);
}
.comp-table td.hse-col {
  color: var(--gold);
  background: var(--gold-dim2);
}
.comp-table td.hse-col.profession {
  font-weight: 600;
}
.comp-table tr.hse-row td {
  background: linear-gradient(90deg, rgba(228, 184, 174, 0.12), rgba(14, 207, 180, 0.04));
  border-top: 0.5px solid rgba(228, 184, 174, 0.35);
}
.comp-table tr:last-child td {
  border-bottom: none;
}
.comp-table .hse-row-name {
  color: var(--gold);
  font-weight: 600;
}
.comp-table .hse-row-dash {
  font-style: italic;
  color: var(--teal-accent);
}

/* Competency accordion */
.comp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}
.comp-card {
  padding: 18px 20px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border-neutral);
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.2s ease;
}
.comp-card:hover {
  border-color: var(--border-gold);
  background: var(--bg-surface-light);
  transform: translateY(-2px);
}
.comp-card.open {
  border-color: rgba(228, 184, 174, 0.4);
  background: linear-gradient(160deg, var(--gold-dim2), var(--bg-surface));
  box-shadow: 0 8px 28px rgba(228, 184, 174, 0.1);
}
.cc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.cc-num {
  color: var(--gold);
  opacity: 0.85;
  padding: 4px 8px;
  border: 0.5px solid rgba(228, 184, 174, 0.3);
  border-radius: 4px;
  flex-shrink: 0;
  background: rgba(228, 184, 174, 0.06);
}
.cc-title {
  color: var(--text-main);
  flex: 1;
}
.cc-arr {
  color: var(--text-ghost);
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}
.comp-card.open .cc-arr {
  transform: rotate(180deg);
  color: var(--gold);
}
.cc-body {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 0.5px solid var(--border-neutral);
}
.comp-card.open .cc-body {
  display: block;
}
.cc-desc {
  color: var(--text-muted);
  margin-bottom: 8px;
}
.cc-tools {
  color: var(--text-ghost);
}

/* Who becomes HSE */
.who-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.who-card {
  padding: 18px 18px 16px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border-neutral);
  border-radius: var(--radius-card);
  transition: border-color 0.25s ease, transform 0.25s ease;
  border-top: 2px solid transparent;
}
.who-card:hover {
  border-color: var(--border-gold);
  border-top-color: var(--gold);
  transform: translateY(-3px);
}
.wc-prof {
  color: var(--text-main);
  margin-bottom: 6px;
}
.wc-desc {
  color: var(--text-ghost);
}
.wc-why {
  color: var(--teal-accent);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 0.5px solid var(--border-neutral);
}

/* Certification path */
.cert-path {
  margin: 24px 0;
  position: relative;
  --cert-fill: 0%;
}
.cert-path::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: var(--border-neutral);
  border-radius: 2px;
}
.cert-path::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 20px;
  width: 2px;
  height: var(--cert-fill);
  max-height: calc(100% - 40px);
  background: linear-gradient(to bottom, var(--gold), var(--teal-accent));
  border-radius: 2px;
  transition: height 0.15s ease-out;
  box-shadow: 0 0 12px rgba(228, 184, 174, 0.35);
}
.cert-path.is-active::after {
  opacity: 1;
}
.cert-step {
  display: flex;
  gap: 18px;
  margin-bottom: 16px;
  position: relative;
}
.cert-step:last-child {
  margin-bottom: 0;
}
.cs-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.cert-path.is-active .cert-step:nth-child(-n+2) .cs-dot {
  box-shadow: 0 0 16px rgba(228, 184, 174, 0.25);
}
.cs-dot.done {
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
}
.cs-dot.active {
  background: var(--bg-surface-light);
  border: 0.5px solid var(--gold);
  color: var(--gold);
  font-weight: 500;
}
.cs-dot.future {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-neutral-md);
  color: var(--text-ghost);
}
.cs-dot.cert-final {
  background: linear-gradient(135deg, var(--gold), rgba(228, 184, 174, 0.6));
  color: var(--bg-main);
  font-size: 16px;
}
.cs-body {
  padding-top: 8px;
  flex: 1;
  padding: 8px 16px 12px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border-neutral);
  border-radius: 8px;
  transition: border-color 0.25s ease;
}
.cert-step:hover .cs-body {
  border-color: rgba(228, 184, 174, 0.3);
}
.cs-title {
  color: var(--text-main);
  margin-bottom: 3px;
}
.cs-title--gold {
  color: var(--gold);
}
.cs-desc {
  color: var(--text-ghost);
}
.cs-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  margin-top: 6px;
}
.cs-tag.gold {
  border: 0.5px solid rgba(228, 184, 174, 0.35);
  color: var(--gold);
  background: var(--gold-dim2);
}
.cs-tag.teal {
  border: 0.5px solid rgba(14, 207, 180, 0.3);
  color: var(--teal-accent);
  background: var(--teal-dim2);
}

/* Dr K quote */
.drk-box {
  background: linear-gradient(145deg, rgba(228, 184, 174, 0.07), var(--bg-surface));
  border: 0.5px solid var(--border-gold);
  border-radius: 8px;
  padding: 28px 32px;
  margin: 24px 0;
  position: relative;
}
.drk-box::before {
  content: "\201C";
  position: absolute;
  top: 12px;
  left: 20px;
  font-size: 48px;
  line-height: 1;
  color: rgba(228, 184, 174, 0.2);
  font-family: Georgia, serif;
}
.drk-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.drk-av {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(228, 184, 174, 0.85), rgba(228, 184, 174, 0.25));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--bg-main);
  flex-shrink: 0;
  border: 0.5px solid rgba(228, 184, 174, 0.4);
  overflow: hidden;
}
.drk-name {
  color: var(--gold);
}
.drk-role {
  color: var(--text-ghost);
  margin-top: 2px;
}
.drk-text {
  color: var(--text-muted);
  padding-left: 4px;
}
.drk-text em {
  color: var(--gold);
  font-style: italic;
}

.cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 0.5px solid var(--border-gold-md);
}

@media (max-width: 1023px) {
  .comp-grid,
  .who-grid {
    grid-template-columns: 1fr;
  }
  .comp-table-wrap {
    overflow-x: auto;
  }
  .prof-hero-seal {
    width: 64px;
    height: 64px;
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .prof-enter {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }
  .prof-hero-seal svg {
    animation: none;
  }
}
