.experience-toolkit {
  width: 100%;
}

.technology-scene {
  position: relative;
  height: 100svh;
  isolation: isolate;
}

.technology-background {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../images/experience/experience-bg.png") center /
    min(85vw, 900px) auto no-repeat;
  opacity: 0.3;
}

#toolkit-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92%, 1100px);
  margin: 0;
  text-align: center;
  font-size: clamp(1.8rem, 5vw, 4rem);
  line-height: 1.15;
}

.toolkit-subtitle {
  display: block;
  margin-top: 20px;
  font-size: clamp(0.95rem, 1.8vw, 1.25rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted-color);
  letter-spacing: normal;
}

@media (min-width: 701px) {
  #toolkit-title {
    white-space: nowrap;
  }

  .toolkit-subtitle {
    white-space: normal;
  }
}

.technology-label {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;

  width: clamp(64px, 8vw, 100px);
  height: clamp(64px, 8vw, 100px);
  padding: 0;
  border-radius: 50%;
  isolation: isolate;

  border: 1px solid rgb(255 255 255 / 45%);
  background:
    radial-gradient(
      ellipse at 28% 20%,
      rgb(255 255 255 / 65%),
      transparent 35%
    ),
    radial-gradient(
      ellipse at 75% 82%,
      rgb(130 190 255 / 25%),
      transparent 45%
    ),
    radial-gradient(
      circle,
      transparent 45%,
      rgb(255 255 255 / 18%) 78%,
      rgb(255 255 255 / 40%) 100%
    );

  box-shadow:
    inset 2px 3px 8px rgb(255 255 255 / 45%),
    inset -3px -5px 10px rgb(70 120 180 / 18%),
    0 8px 20px rgb(0 0 0 / 12%);

  backdrop-filter: blur(2px);
}

.technology-label img {
  display: block;
  width: 52%;
  height: 52%;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / 15%));
}

.technology-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--accent-soft);
  opacity: 0;
}

.technology-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: auto;
  padding: 24px;
}

.technology-card {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--muted-color);
  border-radius: 24px;
  background: var(--accent-soft);
}

.technology-card h2 {
  margin: 0 0 20px;
  color: var(--accent-color);
  font-size: 1.8rem;
}

.technology-card h3 {
  margin: 20px 0 8px;
  font-size: 1rem;
}

.technology-card p {
  margin: 0;
  color: var(--muted-color);
}

/* Activated by JavaScript. */
.technology-scroll-track {
  position: relative;
  height: 400svh;
}

.technology-scene.is-animated {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}

.is-animated .technology-cards {
  position: absolute;
  inset: 0;
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
}

.is-animated .technology-card {
  position: absolute;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.technology-card-content {
  height: 100%;
  padding: 28px;
  overflow-y: auto;
}

@media (max-width: 700px) {
  .technology-cards {
    grid-template-columns: 1fr;
  }

  .technology-card-content {
    padding: 18px;
  }

  .technology-card h2 {
    margin-bottom: 12px;
    font-size: 1.4rem;
  }

  .technology-card h3 {
    margin-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .technology-labels,
  .technology-circle {
    display: none;
  }

  .technology-scene {
    height: 280px;
  }
}

.technology-circle,
.technology-card {
  border: 1px solid rgb(255 255 255 / 45%);

  background:
    radial-gradient(
      ellipse at 28% 20%,
      rgb(255 255 255 / 55%),
      transparent 35%
    ),
    radial-gradient(
      ellipse at 75% 82%,
      rgb(130 190 255 / 25%),
      transparent 45%
    ),
    radial-gradient(
      ellipse,
      transparent 45%,
      rgb(255 255 255 / 18%) 78%,
      rgb(255 255 255 / 35%) 100%
    );

  box-shadow:
    inset 2px 3px 8px rgb(255 255 255 / 45%),
    inset -3px -5px 10px rgb(70 120 180 / 18%),
    0 8px 20px rgb(0 0 0 / 12%);

  backdrop-filter: blur(8px);
}

.technology-card {
  position: relative;
  isolation: isolate;
}

.technology-card-content {
  position: relative;
  z-index: 1;
}

.toolkit-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.toolkit-card-number {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--accent-color);
  border-radius: 14px;
  color: var(--accent-color);
  font-size: 0.85rem;
  font-weight: 700;
}

.toolkit-card-heading h2 {
  margin: 0 0 6px;
}

.toolkit-card-heading p {
  font-size: 0.9rem;
}

.toolkit-group {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--muted-color) 25%, transparent);
}

.toolkit-group h3 {
  margin: 0 0 12px;
  color: var(--muted-color);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.technology-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.technology-tags li {
  max-width: 100%;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--accent-color) 25%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--page-background) 65%, transparent);
  color: var(--text-color);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .toolkit-card-heading {
    gap: 12px;
    margin-bottom: 16px;
  }

  .technology-tags li {
    padding: 5px 9px;
    font-size: 0.8rem;
  }
}

@media (min-width: 701px) {
  .toolkit-card-heading {
    margin-bottom: 16px;
  }

  .toolkit-group {
    padding-top: 12px;
    margin-top: 12px;
  }

  .toolkit-group h3 {
    margin: 0 0 8px;
  }
}

.professional-experience {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100svh;
  padding: 110px max(24px, calc((100% - 1100px) / 2)) 80px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;

  background: radial-gradient(
    ellipse at 15% 25%,
    var(--accent-soft),
    transparent 65%
  );
}

.professional-experience::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 15%;
  right: 5%;
  width: clamp(140px, 25vw, 340px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent-color) 20%, transparent);
  box-shadow: 0 0 0 35px color-mix(in srgb, var(--accent-color) 5%, transparent);
  pointer-events: none;
}

.professional-experience > h2 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.work-experience {
  position: relative;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid color-mix(in srgb, var(--muted-color) 25%, transparent);
  border-radius: 28px;
  background: color-mix(in srgb, var(--page-background) 75%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgb(0 0 0 / 8%);
}

.work-period {
  display: inline-block;
  margin: 0 0 24px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-color);
  font-size: 0.9rem;
  font-weight: 600;
}

.work-experience h3 {
  max-width: 30ch;
  margin: 0 0 24px;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.2;
}

.work-experience > p:not(.work-period) {
  max-width: 70ch;
  margin: 16px 0 0;
  color: var(--muted-color);
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  line-height: 1.8;
}

@media (max-width: 700px) {
  .professional-experience {
    padding: 100px 20px 60px;
    gap: 28px;
  }
}

.technology-scroll-track {
  height: 650svh;
}

.is-animated .professional-experience {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 0;
  padding: 0;
  display: block;
  background: none;
  visibility: hidden;
  pointer-events: none;
}

.is-animated .professional-experience::before {
  display: none;
}

.is-animated #experience-heading {
  position: absolute;
  top: 90px;
  left: 50%;
  width: calc(100% - 40px);
  max-width: 1000px;
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.is-animated .work-experience {
  box-sizing: border-box;
  overflow-y: auto;
  pointer-events: auto;

  background:
    radial-gradient(
      ellipse at 28% 20%,
      rgb(255 255 255 / 55%),
      transparent 35%
    ),
    radial-gradient(
      ellipse at 75% 82%,
      rgb(130 190 255 / 25%),
      transparent 45%
    ),
    radial-gradient(
      ellipse,
      transparent 45%,
      rgb(255 255 255 / 18%) 78%,
      rgb(255 255 255 / 35%) 100%
    );

  border: 1px solid rgb(255 255 255 / 45%);
  backdrop-filter: blur(8px);

  box-shadow:
    inset 2px 3px 8px rgb(255 255 255 / 45%),
    inset -3px -5px 10px rgb(70 120 180 / 18%),
    0 8px 20px rgb(0 0 0 / 12%);
}

.technology-label::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, 5px);

  width: max-content;
  padding: 7px 12px;
  border-radius: 10px;

  background: var(--accent-soft);
  color: var(--text-color);
  border: 1px solid
    color-mix(in srgb, var(--accent-color) 25%, transparent);
  box-shadow: 0 4px 14px rgb(0 0 0 / 12%);

  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
}

.is-animated .technology-cards {
  pointer-events: none;
}

.is-animated .technology-card {
  pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
  .technology-label:hover {
    z-index: 10;
  }

  .technology-label:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .technology-label::after {
    transition: none;
  }
}

.work-experience {
  display: flex;
  flex-direction: column;
}

.work-experience .work-period {
  align-self: flex-start;
}

.work-experience-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 12px;
  text-align: right;
}


@media (max-width: 700px) {
  .is-animated .work-experience .work-period {
    margin-bottom: 16px;
  }

  .is-animated .work-experience h3 {
    margin-bottom: 16px;
  }

  .is-animated .work-experience > p:not(.work-period) {
    margin-top: 12px;
    line-height: 1.55;
  }

  .work-experience-footer {
    padding-top: 8px;
  }
}
