/* ==========================================================================
   About — intro, projects list, contact links
   ========================================================================== */

/* The block sits in the exact middle of the screen. */
.view-about {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: var(--header-h) 16px;
}

.about-inner {
  width: 540px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* ---------- Intro ---------- */
.intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 8px;
}

.avatar {
  position: relative;
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  transition: rotate 0.5s var(--spring), scale 0.5s var(--spring);
}
.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.6s var(--ease-out);
}
/* small springy tilt, the photo zooms slightly inside its frame */
.avatar:hover { rotate: -6deg; scale: 1.08; }
.avatar:hover img { scale: 1.12; }

.label {
  color: var(--muted);
  font-weight: 400;
  font-size: 16px;
  line-height: 21px;
  letter-spacing: -0.16px;
}

.bio p {
  font-size: 16px;
  line-height: 21px;
  letter-spacing: -0.16px;
}
.bio p + p { margin-top: 21px; }

/* Inline link: grey rule, ink rule draws in on hover */
.u { position: relative; white-space: nowrap; }
.u::before,
.u::after {
  content: "";
  position: absolute;
  left: 0;
  right: -3px;
  bottom: -0.5px;
  height: 1px;
}
.u::after { background: var(--rule); }
.u::before {
  z-index: 1;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}
.u:hover::before { transform: scaleX(1); transform-origin: left; }

/* ---------- Projects ---------- */
.projects { display: flex; flex-direction: column; gap: 12px; }
.projects .label { padding: 0 8px; }

.list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
}

/* Grey background sliding to the hovered row */
.highlight {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45px;
  border-radius: 12px;
  background: var(--fill-04);
  pointer-events: none;
  opacity: 0;
  transition: transform 0.4s var(--ease-out), opacity 0.25s;
}
.highlight.is-on { opacity: 1; }

.row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 4px 8px;
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
}
a.row { cursor: pointer; }
.row.is-unknown { cursor: help; }

.row-text { display: flex; flex-direction: column; white-space: nowrap; }
.row-title {
  color: var(--ink);
  font-weight: 500;
  font-size: 16px;
  line-height: 21px;
  letter-spacing: -0.16px;
}
.row-sub {
  color: var(--ink-40);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: -0.12px;
}

.thumb {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
}
.thumb img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.thumb.fill,
.thumb.empty { background: var(--fill-05); }

/* Hairline around images so dark logos don't melt into the dark theme */
.avatar::after,
.thumb:not(.empty)::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--ring);
  pointer-events: none;
}

.arrow {
  position: absolute;
  top: 50%;
  right: 48px;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  color: var(--ink-40);
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: opacity 0.2s, transform 0.35s var(--ease-out);
}
a.row:hover .arrow,
a.row:focus-visible .arrow { opacity: 1; transform: none; }

/* ---------- Contact links (pinned to the bottom of the screen) ---------- */
.footer {
  position: absolute;
  left: 50%;
  bottom: 20px;
  translate: -50% 0;
  color: var(--ink-40);
  font-size: 14px;
  line-height: 18px;
  letter-spacing: -0.14px;
  white-space: pre;
}
.footer a,
.footer button {
  position: relative;
  display: inline-block;
  letter-spacing: inherit;
  transition: color 0.2s, transform 0.3s var(--spring);
}
.footer a::after,
.footer button::after { content: ""; position: absolute; inset: -12px -4px; }
.footer a:active,
.footer button:active { transform: scale(0.97); }

/* Rolling label: the word slides up and an ink copy rolls in from below */
.roll {
  display: inline-block;
  vertical-align: top;
  height: 18px;
  overflow: hidden;
}
.roll > span {
  display: block;
  transition: transform 0.5s var(--ease-out);
}
.roll > span::after {
  content: attr(data-text);
  display: block;
  color: var(--ink);
}
.footer a:hover .roll > span,
.footer button:hover .roll > span,
.footer :focus-visible .roll > span { transform: translateY(-18px); }

/* "Email" → "Copied" (width animated in js/about.js) */
.copy-text {
  position: relative;
  display: inline-block;
  vertical-align: top;
  text-align: center;
  transition: width 0.4s var(--ease-out);
}
.copy-text > span {
  display: inline-block;
  transition: opacity 0.2s, transform 0.3s var(--ease-out), filter 0.3s;
}
.copy-text .done {
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% 0;
  white-space: nowrap;
  user-select: none;
  opacity: 0;
  transform: translateY(6px);
  filter: blur(2px);
}
.copied { color: var(--ink) !important; }
.copied .copy-text .idle { opacity: 0; transform: translateY(-6px); filter: blur(2px); }
.copied .copy-text .done { opacity: 1; transform: none; filter: none; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .view-about { padding: calc(var(--header-h) + 16px) 16px 96px; }
  .footer { bottom: 46px; } /* the clock sits below */
}

/* ---------- 3D ring of Playground images (js/strip.js, WebGL) ----------
   A transparent canvas behind the content; the images are drawn and warped in it. */
.strip {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y; /* horizontal drag scrolls the row, vertical still scrolls the page */
  animation: strip-in 1.2s var(--ease-out) 0.5s backwards;
}
@keyframes strip-in { from { opacity: 0; } }
.strip.is-dragging { cursor: grabbing !important; }
/* while turning the ring: no text selection, grabbing cursor even over the content */
.is-strip-dragging,
.is-strip-dragging * { user-select: none !important; cursor: grabbing !important; }

.about-inner { position: relative; z-index: 1; }
.footer { z-index: 1; }

/* On phones the content takes the full width: no room for the row. */
@media (max-width: 720px) {
  .strip { display: none; }
}
