:root {
  color-scheme: light dark;
  --bg: #0b0c0e;
  --fg: #f2f2f0;
  --muted: #9a9a95;
  --card: #17181a;
}

* { box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

main {
  max-width: 640px;
  width: 100%;
  display: flex;
  gap: 36px;
  align-items: center;
}

/* --- Polaroid photo --- */

.photo-wrap {
  flex: none;
  perspective: 600px;
}

.polaroid {
  background: #fdfdfb;
  padding: 10px 10px 12px;
  border-radius: 3px;
  width: 168px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
  transform: rotate(var(--rest-rotate, -6deg));
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease;
  cursor: pointer;
  animation: float 5s ease-in-out infinite;
  position: relative;
  user-select: none;
  display: flex;
  flex-direction: column;
}

.polaroid::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 46px;
  height: 18px;
  background: rgba(230,184,0,0.55);
  transform: translateX(-50%) rotate(-3deg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.polaroid img {
  display: block;
  width: 100%;
  aspect-ratio: 896 / 1152;
  object-fit: cover;
  border-radius: 1px;
  margin-bottom: 8px;
  filter: grayscale(45%) contrast(1.02);
  transition: filter 0.35s ease;
}

.polaroid:hover,
.polaroid:focus-visible {
  transform: rotate(0deg) translateY(-4px) scale(1.03);
  box-shadow: 0 18px 34px rgba(0,0,0,0.4);
  animation-play-state: paused;
}

.polaroid:hover img { filter: grayscale(0%) contrast(1); }

.polaroid:active { transform: rotate(0deg) scale(0.98); }

.caption {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6em;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #4a4a44;
  font-style: italic;
  padding: 0 4px;
  transition: opacity 0.15s ease;
}

.hint {
  flex: none;
  text-align: center;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 8px;
  letter-spacing: 0.02em;
}

@keyframes float {
  0%, 100% { transform: rotate(var(--rest-rotate, -6deg)) translateY(0); }
  50% { transform: rotate(var(--rest-rotate, -6deg)) translateY(-6px); }
}

@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.08) rotate(2deg); }
  100% { transform: scale(1); }
}

.polaroid.pop { animation: pop 0.4s ease; }

/* --- Text column --- */

.text-col { min-width: 0; }

.name {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.identity {
  font-size: 1.3rem;
  line-height: 1.45;
  margin: 0 0 28px;
  font-weight: 400;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 8px 16px;
  margin-bottom: 32px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e6b800;
  box-shadow: 0 0 0 3px rgba(230,184,0,0.18);
  flex: none;
}

a.x-link {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 1px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

a.x-link:hover { border-color: var(--fg); }

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfbfa;
    --fg: #17181a;
    --muted: #6b6b66;
  }
  .status { border-color: rgba(0,0,0,0.12); }
  a.x-link { border-color: rgba(0,0,0,0.3); }
}

@media (max-width: 520px) {
  main { flex-direction: column; text-align: center; }
  .status { margin-left: auto; margin-right: auto; }
}
