html,body{
    height:100%;
    margin:0
}

body{
    background:#0b0f14;
    color:#e6eef6;
    font-family:system-ui, -apple-system, "Segoe UI", Roboto, Arial;
}

.mainhead {
  position: fixed;
  top: 22%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  width: min(90vw, 900px);
}

.signature {
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: clamp(2.5rem, 8vw, 4rem);
  animation: colorShift 23s infinite linear;
}

.title-row {
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-size: clamp(1rem, 3vw, 28px);
}

.title-item {
  flex: 1;
  white-space: nowrap;
  transition: letter-spacing 0.3s ease;
  cursor: pointer;
}

.title-item.left {
  text-align: right;
  padding-right: clamp(1rem, 5vw, 5rem);
}

.title-item.right {
  text-align: left;
  padding-left: clamp(1rem, 5vw, 5rem);
}

.title-item.left:hover,
.title-item.right:hover {
  letter-spacing: 0.12em;
  animation: colorShift 0.5s linear infinite;
}

.separator {
  width: 1px;
  height: 1.5em;
  background: currentColor;
  opacity: 0.5;
  flex: 0 0 auto;
}

#citations {
  position: fixed;
  bottom: 20px;
  left: 20px;
  max-width: min(600px, calc(100vw - 40px));
  color: white;
  font-size: 1rem;
  line-height: 1.5;
  transition: opacity 2s ease;
  opacity: 1;
  text-align: left;
}

#citations.fade-out {
  opacity: 0;
}

.quote {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
}

.quote-text {
  flex: 1;
}

.quote-author {
  white-space: nowrap;
  font-style: italic;
  opacity: 0.8;
}

@media (max-width: 480px) {
  .mainhead {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 8vh);
    left: 50%;
    transform: translateX(-50%);
    width: 92vw;
  }

  .title-row {
    flex-wrap: nowrap;
    gap: 0;
    font-size: clamp(0.9rem, 4vw, 1.2rem);
  }

  .title-item {
    white-space: nowrap;
    flex: 1;
    padding: 0;
  }

  .title-item.left {
    padding-right: 0.6rem;
  }

  .title-item.right {
    padding-left: 0.6rem;
  }

  .separator {
    display: block;
    width: 1px;
    height: 1.2em;
    margin: 0 0.4rem;
  }

  #citations {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    font-size: 0.9rem;
  }

  .quote {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .quote-author {
    white-space: normal;
  }
}

@keyframes colorShift {
  0%   { color: hsl(0, 100%, 50%); }
  25%  { color: hsl(90, 100%, 50%); }
  50%  { color: hsl(180, 100%, 50%); }
  75%  { color: hsl(270, 100%, 50%); }
  100% { color: hsl(360, 100%, 50%); }
}