/* unified subpages for lab / projects / elsewhere / shrink / impressum */
/* soft timing revision: calmer hover, slightly organic breathing */

html, body {
  overflow: auto;
}

body {
  min-height: 100vh;
}

.subpage-wrap {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 3.6rem 1.4rem 5rem 1.4rem;
}

.subpage-center {
  width: min(92vw, 880px);
  text-align: center;
}

.subpage-brand {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  text-indent: 0.14em;
  line-height: 1;
}

.subpage-brand .pulse {
  opacity: 0.94;
  animation: breathePulse 6.8s ease-in-out infinite;
  animation-fill-mode: both;
}

.subpage-brand .wave {
  font-style: italic;
  opacity: 0.84;
  animation: breatheWave 7.5s ease-in-out infinite;
  animation-delay: 1.35s;
  animation-fill-mode: both;
}

.subpage-nav {
  margin-top: 1.2rem;
  display: flex;
  justify-content: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.subpage-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  padding: 0.4rem 0.1rem;
  border-bottom: 1px solid transparent;
  opacity: 0.72;
  transition: border-color 0.42s ease, opacity 0.42s ease;
}

.subpage-nav a:hover,
.subpage-nav a:focus-visible {
  border-bottom-color: var(--text);
  opacity: 0.96;
  outline: none;
}

.subpage-title {
  margin: 3.1rem 0 2.6rem 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 1.02;
  text-transform: lowercase;
}

.subpage-intro {
  margin: 0 auto 2.8rem auto;
  max-width: 700px;
  font-size: clamp(1rem, 1.8vw, 1.14rem);
  line-height: 1.75;
  color: var(--muted);
}

.subpage-list {
  width: min(100%, 680px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.subpage-item {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 0.2rem 0;
  opacity: 0.88;
  transition: opacity 0.34s ease;
}

.subpage-item:hover {
  opacity: 1;
}

.subpage-item-title {
  font-size: 1.08rem;
  font-weight: 400;
  margin-bottom: 0.34rem;
}

.subpage-item-text {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--muted);
}

.subpage-links {
  width: min(100%, 760px);
  margin: 0 auto;
  display: grid;
  gap: 1.2rem;
}

.subpage-linkcard {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 0.6rem 0;
  opacity: 0.88;
  transition: opacity 0.34s ease;
}

.subpage-linkcard:hover {
  opacity: 1;
}

.subpage-linkcard-title {
  font-size: 1.02rem;
  font-weight: 400;
  margin-bottom: 0.22rem;
}

.subpage-linkcard-text {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}

.subpage-note {
  margin-top: 2.8rem;
  font-size: 0.88rem;
  color: rgba(0,0,0,0.46);
  line-height: 1.6;
}

@keyframes breathePulse {
  0%, 100% { opacity: 0.94; }
  52% { opacity: 1; }
}

@keyframes breatheWave {
  0%, 100% { opacity: 0.84; }
  47% { opacity: 0.965; }
}

@media (max-width: 640px) {
  .subpage-wrap {
    padding-top: 2.3rem;
  }

  .subpage-nav {
    gap: 0.9rem 1.1rem;
  }

  .subpage-nav a {
    letter-spacing: 0.14em;
  }

  .subpage-title {
    margin-top: 2.4rem;
  }
}
