/* Shared look for lichiachiang336.com — matches orbit31 / happy30 */
:root {
  --bg: #0e0e0e;
  --text: #ffffff;
  --gray-300: #d1d5dc;
  --gray-400: #99a1af;
  --gold: #d0a760;
  --terracotta: #cb6947;
  --nocturne: #6760ab;
  --sky: #84b2db;
  --footer-h: 2rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  letter-spacing: 0.1em;
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--text);
  font-family: "EB Garamond", "Shippori Mincho", "Noto Serif TC", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
}

/* Star background (generated by /assets/js/stars.js) */
.stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background-color: #fff;
  opacity: 0.7;
  box-shadow: 0 0 6px #fffc;
  animation: twinkle 3s ease-in-out infinite;
}

@media (min-width: 768px) {
  .star {
    width: 3px;
    height: 3px;
  }
}

@media (min-width: 1024px) {
  .star {
    width: 4px;
    height: 4px;
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
    box-shadow: 0 0 7px #ffffffe6;
  }
  50% {
    opacity: 0.1;
    transform: scale(1.3);
    box-shadow: 0 0 14px #fff;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Decrypted text (/assets/js/decrypt-text.js) */
.decrypt-char {
  position: relative;
}

.decrypt-real {
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

.decrypt-fake {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gray-400);
  transition: opacity 0.2s ease-out;
}

.decrypt-char.is-revealed .decrypt-real {
  opacity: 1;
}

.decrypt-char.is-revealed .decrypt-fake {
  opacity: 0;
}

/* Coming soon placeholder (/ and /project/) */
.coming-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 1rem 1rem calc(var(--footer-h) + 1rem + env(safe-area-inset-bottom));
  text-align: center;
}

.coming-soon h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 4.5rem);
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1.2;
  padding-left: 0.2em; /* balance the trailing letter-spacing so it's truly centered */
}

/* Footer */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 0.5rem 1rem;
  background-color: var(--bg);
  color: var(--gray-300);
  font-size: 0.75rem;
  line-height: 1rem;
  text-align: center;
}

.site-footer a {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .star {
    animation: none;
  }
}
