.opening-wipe, .glow-cursor { display: none; }
.skip-link { z-index: 12; }

.wordmark-word, .wordmark-letter { display: inline-block; }

.dock-nav {
  padding: .3rem .7rem;
  border: 1px solid var(--blue-line);
  border-radius: 100px;
}
.dock-nav ul { gap: clamp(.3rem, 1.25vw, 1.5rem); }
.dock-nav li { display: grid; align-items: end; }
.dock-nav a {
  padding: .43rem .66rem;
  border-radius: 100px;
  transform-origin: center bottom;
}
.dock-nav a[aria-current="page"] { background: var(--blue); color: var(--white); text-decoration: none; }

.accordion-gallery {
  display: flex;
  gap: clamp(.55rem, 1.5vw, 1.2rem);
  align-items: start;
}
.gallery-project {
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid var(--blue);
  background: var(--white);
}
.gallery-project[open] { flex-grow: 2.65; }
.gallery-project summary {
  display: block;
  color: var(--blue);
  cursor: pointer;
  list-style: none;
}
.gallery-project summary::-webkit-details-marker { display: none; }
.gallery-project summary:focus-visible { outline-offset: 4px; }
.gallery-cover, .gallery-cover .project-visual {
  display: block;
  height: clamp(210px, 33vw, 420px);
  aspect-ratio: auto;
}
.gallery-cover .project-illustration > span { font-size: clamp(7rem, 17.5vw, 17rem); }
.gallery-project:nth-child(even) .project-illustration { color: var(--blue); background: var(--lime); }
.gallery-title {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .8rem;
  padding: .95rem clamp(.65rem, 2.4vw, 2.3rem);
  font: 640 clamp(2.3rem, 5vw, 5.2rem)/.88 var(--display);
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.gallery-toggle { flex: 0 0 28px; height: 28px; position: relative; border: 1px solid var(--blue); border-radius: 50%; }
.gallery-toggle::before, .gallery-toggle::after { position: absolute; content: ""; inset: calc(50% - 1px) 7px auto; height: 2px; background: var(--blue); }
.gallery-toggle::after { transform: rotate(90deg); }
.gallery-project[open] .gallery-toggle { background: var(--blue); }
.gallery-project[open] .gallery-toggle::before, .gallery-project[open] .gallery-toggle::after { background: var(--white); }
.gallery-project[open] .gallery-toggle::after { transform: rotate(0); }
.gallery-detail { padding: 0 clamp(.65rem, 2.4vw, 2.3rem) 1.25rem; }
.gallery-detail p { margin-bottom: .5rem; }

@media (max-width: 760px) {
  .accordion-gallery { display: grid; }
  .gallery-cover, .gallery-cover .project-visual { height: clamp(180px, 57vw, 365px); }
  .gallery-project:not([open]) .gallery-cover,
  .gallery-project:not([open]) .gallery-cover .project-visual { height: clamp(100px, 32vw, 175px); }
  .gallery-project:not([open]) .gallery-cover .project-illustration > span { font-size: clamp(5rem, 19vw, 10rem); }
  .gallery-title { font-size: clamp(2.65rem, 10vw, 4.35rem); }
}

@media (prefers-reduced-motion: no-preference) {
  .opening-active .opening-wipe, .opening-wipe.is-leaving {
    display: grid;
    position: fixed;
    z-index: 11;
    inset: 0;
    background: var(--lime);
    color: var(--white);
    padding: clamp(8px, 2vw, 32px);
    pointer-events: none;
    animation: opening-failsafe 1ms 2700ms both;
  }
  .opening-wipe[hidden] { display: none; }
  .opening-panel {
    position: relative;
    display: grid;
    align-items: center;
    justify-items: center;
    padding: 1rem;
    overflow: hidden;
    background: var(--blue);
  }
  .opening-name {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .1em .17em;
    font: 650 clamp(4rem, 17.4vw, 19rem)/.9 var(--display);
    text-transform: uppercase;
  }
  .opening-name .wordmark-letter {
    --start-angle: -43deg;
    --start-height: -.55em;
    animation: assemble-letter 780ms cubic-bezier(.21,.65,.19,1.15) both;
    animation-delay: calc(var(--letter-index) * 21ms);
  }
  .opening-name .wordmark-letter:nth-child(2n) { --start-angle: 58deg; --start-height: .75em; }
  .opening-name .wordmark-letter:nth-child(3n) { --start-angle: -76deg; --start-height: .35em; }
  .opening-progress {
    display: grid;
    justify-items: center;
    gap: .6rem;
    position: absolute;
    bottom: max(1.75rem, 6vh);
    width: min(34vw, 194px);
    font: 600 clamp(2.5rem, 6vw, 4.2rem)/.83 var(--display);
    font-variant-numeric: tabular-nums;
  }
  .opening-track { width: 100%; height: 2px; background: var(--white-line); }
  .opening-track > span { display: block; height: 100%; background: var(--lime); transform: scaleX(0); transform-origin: left; }
  .opening-wipe.is-leaving { animation: opening-out 590ms cubic-bezier(.72,.03,.15,1) both; }
  .opening-active .hero-line > span, .opening-active .hero-identity,
  .opening-active .hero-intro, .opening-active .hero-actions, .opening-active .hero-photo { animation: none; }
  @keyframes assemble-letter {
    from { opacity: 0; transform: translateY(var(--start-height)) rotate(var(--start-angle)) scale(.72); }
    to { opacity: 1; transform: none; }
  }
  @keyframes opening-failsafe { to { visibility: hidden; } }
  @keyframes opening-out { from { clip-path: inset(0); } to { clip-path: inset(0 0 100%); visibility: hidden; } }
  .gallery-project { transition: flex-grow 470ms cubic-bezier(.22,.75,.22,1); }
  .gallery-project[open] .gallery-detail { animation: entrance 320ms ease-out both; }
  .gallery-toggle::after { transition: transform 220ms ease; }
  .dock-nav a {
    transform: translateY(calc(var(--dock-lift, 0) * -1px)) scale(var(--dock-size, 1));
    transition: transform 190ms cubic-bezier(.2,.7,.24,1.34), background 150ms ease;
  }
  .dock-nav a:hover, .dock-nav a:focus-visible { text-decoration: none; background: var(--blue); color: var(--white); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .glow-cursor {
    display: block;
    position: fixed;
    z-index: 9;
    top: 0;
    left: 0;
    width: 37px;
    height: 37px;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(var(--cursor-x, -100px), var(--cursor-y, -100px), 0);
    transition: opacity 150ms ease;
  }
  .glow-cursor::before {
    position: absolute;
    inset: 0;
    border: 1px solid var(--blue);
    border-radius: 50%;
    background: radial-gradient(circle, var(--lime) 8%, transparent 66%);
    transform: scale(var(--cursor-scale, 1));
    transition: transform 190ms ease-out;
    content: "";
  }
  .glow-cursor.is-visible { opacity: .72; }
  .glow-cursor.is-interactive { --cursor-scale: 1.45; }
  .glow-cursor.is-interactive::before { border-color: var(--lime); }
  .opening-active .glow-cursor { opacity: 0; }
}
