/* About page styles — full-page layout */

/* Component styles */
.component {
  margin-bottom: 2.5rem;
}

.component:last-child {
  margin-bottom: 0;
}

/* Hero component */
.component--hero .hero-header {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Media component */
.component--media {
  text-align: center;
}

.component--media img,
.component--media video {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  /* Scale down profile images on desktop */
  max-width: min(60%, 600px);
}

/* On mobile, allow images to be larger */
@media (max-width: 767px) {
  .component--media img,
  .component--media video {
    max-width: 90%;
  }
}

.component--media .media-caption {
  margin-top: 1rem;
  color: var(--ink-muted);
  font-style: italic;
  font-size: 0.9em;
}

/* Gallery styles */
.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.media-gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.media-gallery img:hover {
  transform: scale(1.02);
}

/* Section component - mirrors modal sections exactly */
.component--section .section-heading {
  color: var(--primary);
  font-size: 2em;
  margin: 1.5em 0 0.8em 0;
  font-weight: 600;
}

.component--section .section-heading--h3 {
  font-size: 1.4em;
  margin: 1.5em 0 0.8em 0;
  color: var(--secondary);
}

.component--section .section-heading--h4 {
  font-size: 1.15em;
  margin: 1em 0 0.5em 0;
  color: var(--accent);
}

.component--section .section-heading--h5 {
  font-size: 1em;
  margin: 0.8em 0 0.4em 0;
  color: var(--secondary);
}

.component--section .section-heading--h6 {
  font-size: 0.9em;
  margin: 0.6em 0 0.3em 0;
  color: var(--primary);
}

.component--section:first-child .section-heading {
  margin-top: 0;
}

.component--section .section-content p {
  margin-bottom: 1.5em;
}

.component--section .section-content p:last-child {
  margin-bottom: 0;
}

/* List component - mirrors modal lists exactly */
.component--list .list-heading {
  color: var(--primary);
  font-size: 2em;
  margin: 1.5em 0 0.8em 0;
  font-weight: 600;
}

.component--list .list-heading--h3 {
  font-size: 1.4em;
  margin: 1.5em 0 0.8em 0;
  color: var(--secondary);
}

.component--list .list-heading--h4 {
  font-size: 1.15em;
  margin: 1em 0 0.5em 0;
  color: var(--accent);
}

.component--list .list-heading--h5 {
  font-size: 1em;
  margin: 0.8em 0 0.4em 0;
  color: var(--secondary);
}

.component--list .list-heading--h6 {
  font-size: 0.9em;
  margin: 0.6em 0 0.3em 0;
  color: var(--primary);
}

.component--list ul,
.component--list ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}

.component--list li {
  margin-bottom: 0.2em;
}

/* Quote component */
.component--quote {
  text-align: left;
  margin: 3rem auto;
  max-width: 85%;
}

.quote-text {
  font-size: 1.15em;
  font-style: italic;
  color: var(--primary);
  margin-bottom: 1rem;
  position: relative;
  line-height: 1.0;
}

.quote-text::before {
  content: '\201C';
  font-size: 1.3em;
  color: var(--accent);
  vertical-align: baseline;
}

.quote-text::after {
  content: '\201D';
  font-size: 1.3em;
  color: var(--accent);
  vertical-align: baseline;
}

.quote-attribution {
  color: var(--secondary);
  font-weight: 500;
}

/* Contact component - now uses shared .cta-card from components.css */

/* Text component */
.component--text p {
  margin-bottom: 1em;
}

.component--text p:last-child {
  margin-bottom: 0;
}

/* ── Collapsible Sections ───────────────────────────────── */

.section-content--collapsible {
  overflow: hidden;
}

.ts-read-toggle {
  background: none;
  border: none;
  color: var(--secondary);
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
  cursor: pointer;
  padding: 0;
  margin-left: 0.3em;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s ease;
  display: inline;
}

.ts-read-toggle:hover {
  color: var(--primary);
}

.ts-read-toggle span {
  font-size: 0.85em;
  vertical-align: middle;
}

/* ── Bubble Cloud ─────────────────────────────────────── */

.component--bubble-cloud .section-heading {
  color: var(--primary);
  font-size: 2em;
  margin: 1.5em 0 0.8em 0;
  font-weight: 600;
}

.component--bubble-cloud {
  margin-bottom: 3rem;
}

.ts-cloud-panel {
  background: var(--surface);
  margin-left: -3rem;
  margin-right: -3rem;
  padding: 2.5rem 3rem;
  border-radius: 14px;
}

/* Legend */
.ts-cloud-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0 0.25rem;
}

.ts-cloud-legend-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: all 0.25s ease;
  user-select: none;
}

.ts-cloud-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.ts-cloud-legend-pill:hover {
  border-color: var(--ink-muted);
  color: var(--ink);
}

.ts-cloud-legend-pill.active {
  border-color: var(--cat-color);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 0 8px color-mix(in srgb, var(--cat-color) 25%, transparent);
}

.ts-cloud-legend-pill.active .ts-cloud-legend-dot {
  transform: scale(1.3);
}

.ts-cloud-legend-pill.linked {
  border-color: var(--cat-color);
  color: var(--ink);
}

/* Cloud container */
.ts-cloud {
  position: relative;
  width: 100%;
  overflow: visible;
}

/* Float wrapper — drift animation layer */
.ts-cloud-float {
  position: absolute;
  transition: left 0.6s ease, top 0.6s ease, z-index 0s, opacity 0.3s ease;
}

.ts-cloud-float:hover {
  z-index: 8 !important;
}

.ts-cloud-float.paused {
  animation-play-state: paused !important;
}

/* Category highlight */
.ts-cloud-float.cat-highlight {
  z-index: 7 !important;
}

/* Elevated (flipped) — MUST come after cat-highlight to win the cascade */
.ts-cloud-float.elevated {
  z-index: 20 !important;
}

.ts-cloud-float.cat-highlight .ts-cloud-bubble:not(.flipped) {
  transform: scale(1.04);
}

.ts-cloud-float.cat-highlight .ts-cloud-front {
  border-color: var(--cat-ring, var(--border));
  box-shadow:
    0 4px 20px var(--shadow),
    0 0 20px color-mix(in srgb, var(--cat-ring, var(--primary)) 35%, transparent);
}

.ts-cloud-float.cat-highlight .ts-cloud-illustration {
  opacity: 1;
}

/* Dim non-matching when a category is active */
.ts-cloud.has-cat-filter .ts-cloud-float:not(.cat-highlight):not(.elevated) {
  opacity: 0.3;
}

/* Bubble — flip/scale layer */
.ts-cloud-bubble {
  width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ts-cloud-bubble:not(.flipped):hover {
  transform: scale(1.08);
}

.ts-cloud-bubble.flipped {
  transform: scale(var(--flip-scale, 1.5));
}

/* Illustration */
.ts-cloud-illustration {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  opacity: 0.4;
  color: var(--primary);
  filter: drop-shadow(0 2px 6px var(--shadow));
  transition: opacity 0.4s ease, transform 0.4s ease, left 0.5s ease, right 0.5s ease,
              top 0.5s ease, bottom 0.5s ease, width 0.5s ease, filter 0.4s ease;
}

.dark-mode .ts-cloud-illustration {
  opacity: 0.55;
  filter: drop-shadow(0 2px 6px var(--shadow));
}

.ts-cloud-bubble:hover .ts-cloud-illustration {
  opacity: 1;
  transform: scale(1.08);
}

.dark-mode .ts-cloud-bubble:hover .ts-cloud-illustration {
  opacity: 0.85;
  filter: drop-shadow(0 2px 8px var(--shadow));
}

/* PNG slides to the side on flip */
.ts-cloud-bubble.flipped .ts-cloud-illustration {
  top: 50% !important;
  bottom: auto !important;
  width: 70% !important;
  opacity: 1 !important;
  filter: drop-shadow(0 6px 20px var(--shadow))
          drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 50%, transparent)) !important;
  z-index: 5;
  left: auto !important;
  right: 106% !important;
  transform: translateY(-50%);
}

.dark-mode .ts-cloud-bubble.flipped .ts-cloud-illustration {
  filter: drop-shadow(0 6px 20px var(--shadow))
          drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 50%, transparent)) !important;
}

.ts-cloud-bubble.png-right.flipped .ts-cloud-illustration {
  right: auto !important;
  left: 106% !important;
  transform: translateY(-50%);
}

/* Circle — perspective + flip */
.ts-cloud-circle {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
  perspective: 600px;
}

.ts-cloud-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.ts-cloud-bubble.flipped .ts-cloud-inner {
  transform: rotateY(180deg);
}

/* Front & back faces */
.ts-cloud-front,
.ts-cloud-back {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14%;
  overflow: hidden;
}

.ts-cloud-front {
  background: radial-gradient(circle at 35% 30%, var(--surface), var(--surface-variant) 70%);
  border: 2px solid var(--border);
  box-shadow: 0 4px 20px var(--shadow),
              inset 0 -4px 12px color-mix(in srgb, var(--primary) 6%, transparent);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.ts-cloud-back {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--primary) 70%, var(--surface)),
    color-mix(in srgb, var(--primary) 90%, var(--surface)));
  border: 2px solid var(--accent);
  transform: rotateY(180deg);
  color: var(--highlight);
  padding: 12%;
  box-shadow: 0 4px 20px var(--shadow),
              inset 0 -4px 12px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.3s ease;
}

/* Hover glow */
.ts-cloud-bubble:not(.flipped):hover .ts-cloud-front {
  box-shadow: 0 4px 20px var(--shadow),
              0 0 30px 4px color-mix(in srgb, var(--accent) 40%, transparent),
              0 0 60px 10px color-mix(in srgb, var(--accent) 15%, transparent),
              inset 0 -4px 12px color-mix(in srgb, var(--primary) 6%, transparent);
}

.ts-cloud-bubble:not(.flipped):hover .ts-cloud-back {
  box-shadow: 0 4px 20px var(--shadow),
              0 0 30px 4px color-mix(in srgb, var(--accent) 40%, transparent),
              0 0 60px 10px color-mix(in srgb, var(--accent) 15%, transparent),
              inset 0 -4px 12px rgba(0, 0, 0, 0.15);
}

/* Flipped — scrim + glow */
.ts-cloud.has-flipped::before {
  content: '';
  position: absolute;
  top: 0;
  left: -20%;
  right: -20%;
  bottom: -20%;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 9;
  pointer-events: none;
  animation: ts-cloud-scrim-in 0.3s ease forwards;
}

@keyframes ts-cloud-scrim-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ts-cloud-bubble.flipped .ts-cloud-back {
  box-shadow:
    0 0 40px 8px color-mix(in srgb, var(--accent) 40%, transparent),
    0 0 80px 20px color-mix(in srgb, var(--accent) 15%, transparent),
    0 4px 20px var(--shadow),
    inset 0 -4px 12px rgba(0, 0, 0, 0.15);
}

/* Front content */
.ts-cloud-metric {
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-size: 2.4em;
  display: flex;
  align-items: center;
  gap: 0.12em;
}

.ts-cloud-topic {
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  font-size: 0.9em;
  margin-top: 0.15em;
}

.ts-cloud-float[data-importance="1"] .ts-cloud-topic,
.ts-cloud-float[data-importance="2"] .ts-cloud-topic {
  font-weight: 700;
}

/* Bubbles without a metric number — promote the topic text as the hero element */
.ts-cloud-front.no-metric .ts-cloud-topic {
  font-size: 1.15em;
  font-weight: 700;
  color: var(--primary);
  margin-top: 0;
}
.ts-cloud-float[data-importance="4"] .ts-cloud-front.no-metric .ts-cloud-topic,
.ts-cloud-float[data-importance="5"] .ts-cloud-front.no-metric .ts-cloud-topic {
  font-size: 1.35em;
}
.ts-cloud-float[data-importance="3"] .ts-cloud-front.no-metric .ts-cloud-topic {
  font-size: 1.25em;
}

/* Direction arrows */
.ts-cloud-direction {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.04em;
}

.ts-cloud-arrow {
  display: block;
  width: 0;
  height: 0;
  border-left: 0.22em solid transparent;
  border-right: 0.22em solid transparent;
}

.ts-cloud-dir-up .ts-cloud-arrow { border-bottom: 0.25em solid var(--secondary); }
.ts-cloud-dir-down .ts-cloud-arrow { border-top: 0.25em solid var(--secondary); }

.ts-cloud-dir-up .ts-cloud-arrow:nth-child(1) { opacity: 1; }
.ts-cloud-dir-up .ts-cloud-arrow:nth-child(2) { opacity: 0.5; }
.ts-cloud-dir-up .ts-cloud-arrow:nth-child(3) { opacity: 0.25; }

.ts-cloud-dir-down .ts-cloud-arrow:nth-child(1) { opacity: 0.25; }
.ts-cloud-dir-down .ts-cloud-arrow:nth-child(2) { opacity: 0.5; }
.ts-cloud-dir-down .ts-cloud-arrow:nth-child(3) { opacity: 1; }

/* Back content */
.ts-cloud-back .ts-cloud-back-title {
  font-weight: 700;
  margin-bottom: 0.25em;
  opacity: 0.95;
  line-height: 1.15;
  font-size: var(--back-title-size, 0.7em);
}

.ts-cloud-back .ts-cloud-back-detail {
  line-height: 1.35;
  opacity: 0.9;
  font-size: var(--back-detail-size, 0.55em);
}

/* Flip hint */
.ts-cloud-flip-hint {
  position: absolute;
  bottom: 14%;
  font-size: 0.6em;
  opacity: 0.3;
  font-style: italic;
  color: var(--ink-muted);
}

.ts-cloud-bubble.hint-above .ts-cloud-flip-hint {
  bottom: auto;
  top: 14%;
}

/* Bubble cloud mobile — horizontal ticker */
@media (max-width: 767px) {
  .ts-cloud.mobile-ticker {
    overflow: hidden;
    padding: 0.5rem 0;
    margin-left: calc(-1 * (50vw - 50%));
    margin-right: calc(-1 * (50vw - 50%));
    width: 100vw;
  }

  .ts-cloud-ticker-track {
    display: flex;
    gap: 0.75rem;
    animation: ts-cloud-ticker-scroll linear infinite;
    will-change: transform;
    backface-visibility: hidden;
  }

  .ts-cloud-ticker-track.paused {
    animation-play-state: paused;
  }

  @keyframes ts-cloud-ticker-scroll {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(var(--ticker-distance, -50%), 0, 0); }
  }

  .ts-cloud.mobile-ticker .ts-cloud-float {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    flex-shrink: 0;
    animation: none !important;
  }

  /* Hide PNG in ticker but keep it loadable (visibility, not display) */
  .ts-cloud.mobile-ticker .ts-cloud-illustration {
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
  }

  .ts-cloud-legend { gap: 0.35rem; }
  .ts-cloud-legend-pill { font-size: 0.7rem; padding: 4px 10px; }
}

/* Ticker overlay — viewport-centered flipped bubble */
.ts-cloud-ticker-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  animation: ts-cloud-overlay-in 0.3s ease forwards;
  /* Fade blur at top/bottom edges */
  -webkit-mask-image: linear-gradient(to bottom,
    transparent 0%, black 18%, black 82%, transparent 100%);
  mask-image: linear-gradient(to bottom,
    transparent 0%, black 18%, black 82%, transparent 100%);
}

@keyframes ts-cloud-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.ts-cloud-ticker-overlay .ts-cloud-ticker-center {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: min(78vw, 340px) !important;
  height: min(78vw, 340px) !important;
  animation: none !important;
}

.ts-cloud-ticker-overlay .ts-cloud-bubble {
  transform: scale(1) !important;
}

.ts-cloud-ticker-overlay .ts-cloud-bubble.flipped {
  transform: scale(1) !important;
}

/* Back face text — readable at overlay size */
.ts-cloud-ticker-overlay .ts-cloud-back-title {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.ts-cloud-ticker-overlay .ts-cloud-back-detail {
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-y: auto;
  max-height: 65%;
}

/* Show illustration below the bubble in overlay */
.ts-cloud-ticker-overlay .ts-cloud-illustration {
  visibility: visible !important;
  position: relative !important;
  width: min(29vw, 115px) !important;
  height: auto !important;
  overflow: visible !important;
  margin-top: -0.75rem;
  opacity: 1 !important;
  filter: drop-shadow(0 6px 20px var(--shadow))
          drop-shadow(0 0 12px color-mix(in srgb, var(--accent) 35%, transparent)) !important;
}

.dark-mode .ts-cloud-ticker-overlay .ts-cloud-illustration {
  filter: drop-shadow(0 6px 20px var(--shadow))
          drop-shadow(0 0 12px color-mix(in srgb, var(--accent) 35%, transparent)) !important;
}

/* In overlay, show back face (it's flipped) */
.ts-cloud-ticker-overlay .ts-cloud-back {
  padding: 1rem;
}

/* ── Timeline ──────────────────────────────────────────── */

/* Category color tokens — scoped to timeline */
.component--timeline {
  --cat-career: var(--primary);
  --cat-education: var(--secondary);
  --cat-award: var(--accent);
  margin-top: 1rem;
}

.component--timeline .section-heading {
  color: var(--primary);
  font-size: 2em;
  margin: 1.5em 0 0.8em 0;
  font-weight: 600;
}

/* Prevent nth-child alternating background from clashing */
.component--timeline:nth-child(even) {
  background: transparent;
  margin-left: 0;
  margin-right: 0;
  padding: 0;
}

/* ── Desktop: Meandering Wave ─────────────────────────── */

.ts-tl {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: visible;
}

.ts-tl svg.ts-tl__wave {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}

.ts-tl svg.ts-tl__wave path.ts-tl__wave-path {
  fill: none;
  stroke: url(#tl-line-gradient);
  stroke-width: 3.5;
  stroke-linecap: round;
}

/* Entry wrapper: positioned by JS so the node sits on the wave */
.ts-tl__entry {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

/* Node: filled shape with icon inside */
.ts-tl__node {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cat-career);
  flex-shrink: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 0 3px var(--surface);
}

.ts-tl__node svg {
  width: 12px; height: 12px;
  fill: #fff;
  flex-shrink: 0;
}

.ts-tl__node--education {
  border-radius: 4px;
  background: var(--cat-education);
}

.ts-tl__node--award {
  border-radius: 3px;
  background: var(--cat-award);
  transform: rotate(45deg);
}

.ts-tl__node--award svg {
  transform: rotate(-45deg);
}

.ts-tl__node--large {
  width: 26px;
  height: 26px;
}

.ts-tl__node--large svg {
  width: 14px; height: 14px;
}

/* Stem */
.ts-tl__stem {
  width: 2px;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.2s;
}

/* Mini-Card: shape matches category */
.ts-tl__mini-card {
  text-align: center;
  padding: 0.35rem 0.55rem;
  background: var(--surface-variant);
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 8px var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
  position: relative;
  min-width: 82px;
  max-width: 112px;
}

.ts-tl__mini-card .ts-tl__year {
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.1;
}

.ts-tl__mini-card .ts-tl__short-title {
  font-size: 0.58rem;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 0.05rem;
}

/* Career: pill — solid primary, larger */
.ts-tl__mini-card--career {
  border-radius: 20px;
  border-color: transparent;
  background: var(--cat-career);
  color: var(--bg);
  min-width: 100px;
  max-width: 130px;
  padding: 0.4rem 0.7rem;
}

.ts-tl__mini-card--career .ts-tl__year,
.ts-tl__mini-card--career .ts-tl__short-title { color: var(--bg); }
.ts-tl__mini-card--career .ts-tl__year { opacity: 0.8; font-size: 0.65rem; }
.ts-tl__mini-card--career .ts-tl__short-title { font-size: 0.64rem; }

/* Education: square — solid secondary */
.ts-tl__mini-card--education {
  border-radius: 4px;
  border-color: transparent;
  background: var(--cat-education);
  color: var(--bg);
}

.ts-tl__mini-card--education .ts-tl__year,
.ts-tl__mini-card--education .ts-tl__short-title { color: var(--bg); }
.ts-tl__mini-card--education .ts-tl__year { opacity: 0.8; }

/* Award: diamond — solid accent, smaller */
.ts-tl__mini-card--award {
  border-radius: 4px;
  border-color: transparent;
  background: var(--cat-award);
  transform: rotate(45deg);
  padding: 0.35rem;
  min-width: 56px;
  max-width: 64px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ts-tl__mini-card--award .ts-tl__year { color: var(--bg); opacity: 0.7; font-size: 0.5rem; }
.ts-tl__mini-card--award .ts-tl__short-title { color: var(--bg); font-size: 0.48rem; }
.ts-tl__mini-card--award .ts-tl__mini-inner {
  transform: rotate(-45deg);
}

/* Hover: lift the whole entry so its popup clears neighbouring cards */
.ts-tl__entry:hover {
  z-index: 50;
}

/* Hover: entry level */
.ts-tl__entry:hover .ts-tl__mini-card {
  box-shadow: 0 4px 16px var(--shadow);
}

.ts-tl__entry:hover .ts-tl__mini-card--career {
  background: color-mix(in srgb, var(--cat-career) 85%, #fff);
  transform: translateY(-2px);
}

.ts-tl__entry:hover .ts-tl__mini-card--education {
  background: color-mix(in srgb, var(--cat-education) 85%, #fff);
  transform: translateY(-2px);
}

.ts-tl__entry:hover .ts-tl__mini-card--award {
  background: color-mix(in srgb, var(--cat-award) 85%, #fff);
  transform: rotate(45deg) scale(1.05);
}

.ts-tl__entry:hover .ts-tl__node {
  transform: scale(1.25);
  box-shadow: 0 0 0 3px var(--surface), 0 0 12px color-mix(in srgb, var(--cat-career) 50%, transparent);
}

.ts-tl__entry:hover .ts-tl__node--education {
  box-shadow: 0 0 0 3px var(--surface), 0 0 12px color-mix(in srgb, var(--cat-education) 50%, transparent);
}

.ts-tl__entry:hover .ts-tl__node--award {
  transform: rotate(45deg) scale(1.25);
  box-shadow: 0 0 0 3px var(--surface), 0 0 12px color-mix(in srgb, var(--cat-award) 50%, transparent);
}

.ts-tl__entry:hover .ts-tl__stem {
  background: var(--ink-muted);
}

/* Popup */
.ts-tl__popup {
  position: absolute;
  left: 50%;
  background: var(--surface-variant);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  text-align: center;
  width: 200px;
  box-shadow: 0 8px 32px var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 30;
}

.ts-tl__entry--above .ts-tl__popup {
  bottom: 100%;
  margin-bottom: 8px;
  transform: translate(-50%, 8px);
}

.ts-tl__entry--below .ts-tl__popup {
  top: 100%;
  margin-top: 8px;
  transform: translate(-50%, -8px);
}

.ts-tl__entry:hover .ts-tl__popup {
  opacity: 1;
  pointer-events: auto;
}

.ts-tl__entry--above:hover .ts-tl__popup { transform: translate(-50%, 0); }
.ts-tl__entry--below:hover .ts-tl__popup { transform: translate(-50%, 0); }

.ts-tl__popup--career {
  border-top: 3px solid var(--cat-career);
  background: color-mix(in srgb, var(--cat-career) 12%, var(--surface));
}

.ts-tl__popup--education {
  border-top: 3px solid var(--cat-education);
  background: color-mix(in srgb, var(--cat-education) 12%, var(--surface));
}

.ts-tl__popup--award {
  border-top: 3px solid var(--cat-award);
  background: color-mix(in srgb, var(--cat-award) 18%, var(--surface));
}

.ts-tl__popup-date {
  font-size: 0.7rem;
  color: var(--ink-muted);
  margin-bottom: 0.2rem;
}

.ts-tl__popup-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.3;
}

.ts-tl__popup-org {
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-top: 0.15rem;
}

.ts-tl__popup-detail {
  font-size: 0.68rem;
  color: var(--ink-muted);
  margin-top: 0.4rem;
  line-height: 1.4;
  border-top: 1px solid var(--border);
  padding-top: 0.4rem;
}

/* Legend */
.ts-tl__legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.ts-tl__legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ts-tl__legend-node {
  width: 18px; height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ts-tl__legend-node svg {
  width: 10px; height: 10px;
  fill: #fff;
}

.ts-tl__legend-node--career {
  border-radius: 50%;
  background: var(--cat-career);
}

.ts-tl__legend-node--education {
  border-radius: 3px;
  background: var(--cat-education);
}

.ts-tl__legend-node--award {
  border-radius: 2px;
  background: var(--cat-award);
  transform: rotate(45deg);
  width: 14px; height: 14px;
}

.ts-tl__legend-node--award svg {
  transform: rotate(-45deg);
}

/* ── Mobile: Center Spine ─────────────────────────────── */

.ts-tl-mob {
  display: none;
  position: relative;
  padding: 0.5rem 0 1rem;
}

.ts-tl-mob__line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--secondary), var(--accent));
  border-radius: 2px;
  transform: translateX(-50%);
}

.ts-tl-mob__entries {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}

.ts-tl-mob__entry {
  position: relative;
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: flex-start;
}

/* Node — centered on spine */
.ts-tl-mob__node {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cat-career);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--bg);
}

.ts-tl-mob__node svg {
  width: 9px; height: 9px;
  fill: #fff;
}

.ts-tl-mob__node--education {
  border-radius: 3px;
  background: var(--cat-education);
}

.ts-tl-mob__node--award {
  background: var(--cat-award);
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px;
  width: 14px; height: 14px;
}

.ts-tl-mob__node--award svg {
  transform: rotate(-45deg);
  width: 8px; height: 8px;
}

/* Nub from node to card */
.ts-tl-mob__nub {
  position: absolute;
  top: 10px;
  height: 2px;
  background: var(--border);
  z-index: 1;
}

.ts-tl-mob__entry--left .ts-tl-mob__nub {
  right: 50%;
  width: 8%;
  margin-right: 8px;
}

.ts-tl-mob__entry--right .ts-tl-mob__nub {
  left: 50%;
  width: 8%;
  margin-left: 8px;
}

/* Card */
.ts-tl-mob__card {
  position: relative;
  padding: 0.3rem 0.5rem;
  box-shadow: 0 1px 6px var(--shadow);
  cursor: pointer;
  z-index: 2;
  max-width: 42%;
  border: 1px solid var(--border);
  transition: background 0.2s, box-shadow 0.2s;
}

.ts-tl-mob__entry--left .ts-tl-mob__card {
  margin-left: auto;
  margin-right: calc(50% + 16px);
  text-align: right;
}

.ts-tl-mob__entry--right .ts-tl-mob__card {
  margin-left: calc(50% + 16px);
  margin-right: auto;
  text-align: left;
}

/* Card styles by category */
.ts-tl-mob__card--career {
  border-radius: 12px;
  background: var(--cat-career);
  border-color: transparent;
}

.ts-tl-mob__card--career .ts-tl-mob__date,
.ts-tl-mob__card--career .ts-tl-mob__title,
.ts-tl-mob__card--career .ts-tl-mob__org,
.ts-tl-mob__card--career .ts-tl-mob__detail { color: var(--bg); }
.ts-tl-mob__card--career .ts-tl-mob__date,
.ts-tl-mob__card--career .ts-tl-mob__org,
.ts-tl-mob__card--career .ts-tl-mob__detail { opacity: 0.8; }

.ts-tl-mob__card--education {
  border-radius: 3px;
  background: var(--cat-education);
  border-color: transparent;
}

.ts-tl-mob__card--education .ts-tl-mob__date,
.ts-tl-mob__card--education .ts-tl-mob__title,
.ts-tl-mob__card--education .ts-tl-mob__org,
.ts-tl-mob__card--education .ts-tl-mob__detail { color: var(--bg); }
.ts-tl-mob__card--education .ts-tl-mob__date,
.ts-tl-mob__card--education .ts-tl-mob__org,
.ts-tl-mob__card--education .ts-tl-mob__detail { opacity: 0.8; }

.ts-tl-mob__card--award {
  border-radius: 3px;
  background: var(--cat-award);
  border-color: transparent;
}

.ts-tl-mob__card--award .ts-tl-mob__title { color: var(--bg); }
.ts-tl-mob__card--award .ts-tl-mob__date,
.ts-tl-mob__card--award .ts-tl-mob__org,
.ts-tl-mob__card--award .ts-tl-mob__detail { color: var(--bg); opacity: 0.7; }

/* Mobile card typography */
.ts-tl-mob__date {
  font-size: 0.58rem;
  line-height: 1.1;
}

.ts-tl-mob__title {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}

.ts-tl-mob__org {
  font-size: 0.58rem;
  line-height: 1.1;
}

.ts-tl-mob__detail {
  font-size: 0.56rem;
  line-height: 1.3;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-top: 0;
}

.ts-tl-mob__card.expanded .ts-tl-mob__detail {
  max-height: 100px;
  margin-top: 0.2rem;
}

.ts-tl-mob__card:active {
  box-shadow: 0 2px 12px var(--shadow);
}

/* ── Timeline responsive: swap desktop/mobile ─────────── */

@media (max-width: 767px) {
  .ts-tl {
    display: none;
  }

  .ts-tl-mob {
    display: block;
  }
}

/* Tooltip styles moved to shared/css/text-formatting.css */

/* Tablet breakpoint */
@media (max-width: 1024px) {
  .component--hero .hero-title {
    font-size: 1.8em;
  }

}

/* Responsive adjustments */
@media (max-width: 767px) {
  .component--hero {
    flex-direction: column;
    align-items: center;
  }

  .component--hero .hero-title {
    font-size: 1.5em;
    text-align: center;
  }

  .component--hero .hero-subtitle {
    font-size: 1.4em; /* Back to modal size */
  }

  .component--section .section-heading,
  .component--list .list-heading,
  .component--bubble-cloud .section-heading {
    font-size: 1.5em; /* Match modal mobile h2 size */
  }

  .ts-cloud-panel {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    padding: 2rem 1.25rem;
    border-radius: 0;
  }

  .component--section .section-heading--h3,
  .component--list .list-heading--h3 {
    font-size: 1.4em; /* Keep h3 at standard size */
  }

}

/* Mobile Landscape - Override to horizontal layout */
@media (max-width: 767px) and (orientation: landscape) {
  .component--hero {
    flex-direction: row;
    align-items: flex-start;
  }

  .component--hero .hero-title {
    text-align: left;
  }
}

/* ── Reduced Motion ────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .ts-cloud-float {
    animation: none !important;
    transition: none;
  }

  .ts-cloud-bubble {
    transition: none;
  }

  .ts-cloud-bubble:not(.flipped):hover {
    transform: none;
  }

  .ts-cloud-inner {
    transition: none;
  }

  .ts-cloud-front,
  .ts-cloud-back {
    transition: none;
  }

  .ts-cloud-illustration {
    transition: none;
  }

  .ts-cloud-ticker-track {
    animation: none !important;
  }

  .ts-cloud-legend-pill,
  .ts-cloud-legend-dot {
    transition: none;
  }

  .ts-tl__mini-card,
  .ts-tl__node,
  .ts-tl__stem {
    transition: none;
  }

  .ts-tl__entry:hover .ts-tl__mini-card,
  .ts-tl__entry:hover .ts-tl__node {
    transform: none;
  }

  .ts-tl__popup {
    transition: none;
  }

  .ts-tl__entry {
    opacity: 1;
  }

  .ts-tl-mob__card,
  .ts-tl-mob__detail {
    transition: none;
  }

  .ts-read-toggle {
    transition: none;
  }
}
