/* Circular reveal and cursor */
body.has-scan-cursor {
  --cursor-shadow-x: 50vw;
  --cursor-shadow-y: 50vh;
  cursor: none;
}

body.has-scan-cursor * {
  cursor: none !important;
}

body.has-scan-cursor::before {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background:
    radial-gradient(
      circle 210px at var(--cursor-shadow-x) var(--cursor-shadow-y),
      rgba(53, 65, 90, 0.13),
      rgba(53, 65, 90, 0.04) 42%,
      rgba(246, 243, 236, 0) 70%
    );
  content: "";
  mix-blend-mode: multiply;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

body.has-scan-cursor.is-cursor-visible::before {
  opacity: 1;
}

.scan-cursor {
  --cursor-size: 22px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  width: var(--cursor-size);
  height: var(--cursor-size);
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  mix-blend-mode: difference;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-100px, -100px, 0);
  transition:
    width 90ms ease,
    height 90ms ease,
    opacity 80ms ease,
    background 90ms ease;
  will-change: transform, width, height;
}

.scan-cursor::after {
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  content: "";
  opacity: 0;
  transition:
    inset 90ms ease,
    opacity 90ms ease;
}

.scan-cursor.is-visible {
  opacity: 1;
}

.scan-cursor.is-over-reveal {
  --cursor-size: 34px;
  background: rgba(255, 255, 255, 0.12);
}

.scan-cursor.is-over-block {
  --cursor-size: 48px;
  background: rgba(255, 255, 255, 0.16);
}

.scan-cursor.is-over-reveal::after {
  opacity: 0.75;
}

.scan-cursor.is-over-block::after {
  inset: -10px;
  opacity: 0.95;
}

.scan-cursor__dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

[data-scan-reveal],
.scan-reveal--block {
  position: relative;
  isolation: isolate;
  --scan-x: 50%;
  --scan-y: 50%;
  --scan-radius: clamp(72px, 9vw, 128px);
}

.scan-reveal--block {
  --scan-radius: clamp(280px, 36vw, 520px);
}

.index-title [data-scan-reveal],
.index-nav [data-scan-reveal],
.home-meta [data-scan-reveal] {
  display: inline-block;
}

[data-scan-reveal]::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #111111;
  color: #f6f3ec;
  clip-path: circle(0 at var(--scan-x) var(--scan-y));
  content: attr(data-scan-reveal);
  opacity: 0;
  padding: inherit;
  pointer-events: none;
  text-align: center;
  transition:
    opacity 120ms ease,
    clip-path 180ms cubic-bezier(0.2, 0.9, 0.2, 1);
  will-change: clip-path;
}

[data-scan-reveal].is-scan-active::after {
  clip-path: circle(var(--scan-radius) at var(--scan-x) var(--scan-y));
  opacity: 1;
}

.radical-panel [data-scan-reveal]::after,
.scan-reveal--dark::after {
  background: #f6f3ec;
  color: #111111;
}

.scan-reveal-inline {
  display: inline-block;
}

.scan-reveal--block::after {
  display: none;
  content: none;
}

.scan-reveal--block::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(
      circle at var(--scan-x) var(--scan-y),
      rgba(246, 243, 236, 0.1),
      rgba(246, 243, 236, 0.025) 34%,
      rgba(246, 243, 236, 0) 62%
    );
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.scan-reveal--block.is-scan-active::before {
  opacity: 1;
}

.scan-reveal--block > :not(.scan-reveal-content) {
  position: relative;
  z-index: 1;
}

.scan-reveal-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background: #f6f3ec;
  color: #111111;
  clip-path: circle(0 at var(--scan-x) var(--scan-y));
  opacity: 0;
  padding: var(--radical-panel-padding);
  pointer-events: none;
  transition:
    opacity 120ms ease,
    clip-path 180ms cubic-bezier(0.2, 0.9, 0.2, 1);
  will-change: clip-path;
}

.scan-reveal--block.is-scan-active .scan-reveal-content {
  clip-path: circle(var(--scan-radius) at var(--scan-x) var(--scan-y));
  opacity: 1;
}

.scan-reveal-content h1,
.scan-reveal-content h2 {
  color: #111111;
}

.scan-reveal-content .section-kicker,
.scan-reveal-content p,
.scan-reveal-content .identity-index,
.scan-reveal-content h2 span {
  color: #35415a;
}

.scan-reveal-content h1 {
  font-size: clamp(38px, 5.4vw, 76px);
}

.scan-reveal-content p {
  text-wrap: pretty;
}

.scan-reveal-soft::after {
  background: #f6f3ec;
  color: #111111;
}

.home-meta [data-scan-reveal]::after,
.index-nav [data-scan-reveal]::after {
  padding: 0 0.35em;
  text-align: center;
}

.hello-reveal {
  position: relative;
  display: grid;
  place-items: center;
  width: min(82vw, 638px);
}

.hello-reveal .hello-svg {
  grid-area: 1 / 1;
  width: 100%;
}

.identity-panel .scan-reveal-content h2 {
  font-size: clamp(64px, 13vw, 156px);
}

.identity-panel .scan-reveal-content p {
  max-width: 660px;
  font-size: clamp(18px, 1.55vw, 23px);
  line-height: 1.58;
}

/* About timeline */
.timeline-section {
  padding: 40px 8vw 120px;
}

.timeline-shell {
  display: grid;
  gap: 42px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.timeline-heading {
  max-width: 760px;
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 760ms ease,
    transform 760ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.timeline-heading h2 {
  margin: 0;
  color: #111111;
  font-size: clamp(38px, 6vw, 86px);
  font-weight: 400;
  line-height: 1;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 5vw, 72px);
}

.timeline-group {
  opacity: 0;
  transform: translateY(42px);
  transition:
    opacity 820ms ease,
    transform 820ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.timeline-group:nth-child(2) {
  transition-delay: 120ms;
}

.timeline-group h3 {
  margin: 0 0 22px;
  color: #35415a;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0 0 0 34px;
  list-style: none;
}

.timeline-list::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 8px;
  width: 1px;
  background: #111111;
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(74px, 0.28fr) minmax(0, 1fr);
  gap: 18px;
  border: 1px solid rgba(17, 17, 17, 0.18);
  background: rgba(246, 243, 236, 0.82);
  padding: 22px 24px;
  box-shadow: 12px 14px 0 rgba(0, 0, 0, 0.07);
  transition:
    background 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

.timeline-item::before {
  position: absolute;
  top: 26px;
  left: -32px;
  width: 12px;
  height: 12px;
  border: 2px solid #111111;
  background: #f6f3ec;
  border-radius: 50%;
  content: "";
}

.timeline-item time {
  color: #35415a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-item h4 {
  margin: 0 0 8px;
  color: #111111;
  font-size: clamp(21px, 2.3vw, 31px);
  font-weight: 400;
  line-height: 1.05;
}

.timeline-item p {
  max-width: 420px;
  margin: 0;
  color: #35415a;
  font-size: 16px;
  line-height: 1.55;
}

.timeline-section.is-visible .timeline-heading,
.timeline-section.is-visible .timeline-group {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 700px) {
  .timeline-section {
    padding: 24px 24px 96px;
  }

  .timeline-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .timeline-list {
    padding-left: 24px;
  }

  .timeline-list::before {
    left: 6px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 20px;
    box-shadow: 9px 10px 0 rgba(0, 0, 0, 0.08);
  }

  .timeline-item::before {
    left: -24px;
  }
}
