/* kashif — personal site. black page, white text, one ascii ghost. */

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

html, body { background: #040404; }

body {
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 640px 520px at 16% 18%, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0) 68%),
    radial-gradient(ellipse 140% 120% at 40% 30%, #141414 0%, #0a0a0a 46%, #040404 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #fff; color: #0a0a0a; }

.page {
  max-width: 560px;
  padding: 12vh 24px 64px;
  margin-left: clamp(0px, 8vw, 140px);
}
@media (max-width: 480px) { .page { padding: 48px 16px 48px; } }

/* the ghost: a grid of tiny characters redrawn every frame */
.ascii {
  font-family: "Courier New", Courier, monospace;
  font-size: 5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .5px;
  white-space: pre;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
}
#ghost { width: max-content; cursor: pointer; margin-bottom: 20px; }
#ghost.away { visibility: hidden; }

/* the flight layer covers the whole screen while the ghost is flying */
#stage {
  position: fixed;
  left: 0; top: 0;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
  display: none;
}
#stage.on { display: block; }

html.intro, html.intro body { overflow: hidden; }

/* paragraphs drift in one after another once the ghost lands */
.panel p {
  margin-bottom: 18px;
  opacity: 0;
  transform: translateY(8px);
  filter: blur(4px);
  transition: opacity .9s ease, transform .9s ease, filter .9s ease;
  transition-delay: calc(var(--i, 0) * 110ms);
}
.panel.visible p { opacity: 1; transform: none; filter: none; }

.panel a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.links a { margin-right: 14px; }

@media (prefers-reduced-motion: reduce) {
  .panel p, .blog { transition: none; }
}

/* social links: icon in front of the label */
.links a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.links .lbl { text-decoration: underline; text-underline-offset: 2px; }
.links svg { width: 15px; height: 15px; flex: none; }

/* blog */
.blog { margin-top: 34px; opacity: 0; transition: opacity .9s ease .8s; }
.panel.visible .blog { opacity: 1; }
.blog h2 { font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .55); margin-bottom: 12px; }
.post { padding: 14px 0 12px; border-top: 1px solid rgba(255, 255, 255, .16); animation: rise .5s ease both; }
.post:last-child { border-bottom: 1px solid rgba(255, 255, 255, .16); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .post { animation: none; } }
.post h3 { font-size: 14px; font-weight: 600; display: inline; }
.post time { color: rgba(255, 255, 255, .55); font-size: 13px; margin-left: 10px; }
.post div { white-space: pre-wrap; margin-top: 2px; }
