* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(30, 20, 60, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(80, 20, 40, 0.25) 0%, transparent 60%),
    #050508;
  color: #ffffff;
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-feature-settings: "ss01", "ss02";
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
  z-index: 1;
}

main {
  position: relative;
  z-index: 2;
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3vmin 1.5vmin 4.5vmin;
  gap: 2.2vmin;
}

.clock {
  width: min(88vh, 96vw);
  height: min(88vh, 96vw);
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  grid-template-rows: repeat(15, 1fr);
  padding: min(1.2vh, 1.2vw);
  background:
    radial-gradient(ellipse at 35% 25%, rgba(255,255,255,0.05) 0%, transparent 50%),
    linear-gradient(150deg, #15151c 0%, #0a0a10 45%, #050508 100%);
  border-radius: 2px;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 0 80px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  position: relative;
}

.clock::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 2px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 40%, rgba(0, 0, 0, 0.35) 100%);
}

.cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.7rem, 4.2vmin, 2.8rem);
  font-weight: 500;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 0;
  user-select: none;
  line-height: 1;
  transition:
    color 700ms cubic-bezier(.2, .8, .2, 1),
    text-shadow 700ms cubic-bezier(.2, .8, .2, 1),
    transform 700ms cubic-bezier(.2, .8, .2, 1);
  will-change: color, text-shadow;
}

.cell.lit {
  color: rgba(255, 248, 230, 0.98);
  text-shadow:
    0 0 6px rgba(255, 245, 220, 0.55),
    0 0 14px rgba(255, 210, 160, 0.35),
    0 0 28px rgba(255, 180, 120, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .cell {
    transition: none;
  }
}

.credit {
  display: flex;
  align-items: center;
  gap: 0.8em;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: clamp(0.65rem, 1.3vmin, 0.85rem);
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.02em;
}

.credit a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 1px;
  transition: color 300ms, border-color 300ms;
}

.credit a:hover {
  color: rgba(255, 245, 220, 0.8);
  border-color: rgba(255, 245, 220, 0.4);
}

.credit .gh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-bottom: none;
  padding: 0;
  opacity: 0.6;
  transition: opacity 300ms, color 300ms;
}

.credit .gh:hover {
  opacity: 1;
  color: rgba(255, 245, 220, 0.9);
}
