/* ============================================================
   grace-kang.com — kawaii pixel tamagotchi link-in-bio
   Candy checkerboard page · pink shell · mint LCD screen
   Press Start 2P (headings) + VT323 (body)
   ============================================================ */

:root {
  --check-1: #ffd9e8;
  --check-2: #ffc7dd;

  --shell: #ff9ec7;
  --shell-deep: #e2679e;

  --bezel: #5a4763;
  --lcd: #d8eec6;
  --lcd-deep: #c2dcae;

  --ink: #33203b;          /* dark plum */
  --ink-soft: #6e5a78;

  --pink: #ff6fa5;
  --pink-deep: #d94f85;
  --mint: #6fcf8e;
  --sun: #ffd166;
  --cream: #fffdf5;

  --px-font: "Press Start 2P", monospace;
  --body-font: "VT323", monospace;

  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body-font);
  color: var(--ink);
  /* candy checkerboard */
  background: repeating-conic-gradient(var(--check-1) 0% 25%, var(--check-2) 0% 50%) 0 0 / 36px 36px;
  display: flex;
  justify-content: center;
  padding: clamp(16px, 5vw, 48px) 14px;
}

/* ---------- tamagotchi shell ---------- */
.shell {
  width: 100%;
  max-width: 480px;
  background: var(--shell);
  border: 4px solid var(--ink);
  border-radius: 56px 56px 64px 64px;
  box-shadow: 10px 10px 0 rgba(51, 32, 59, 0.25);
  padding: clamp(18px, 5vw, 30px);
  height: fit-content;
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.5s steps(6) forwards;
}
@keyframes rise { to { opacity: 1; transform: none; } }

.shell__hearts {
  text-align: center;
  color: var(--cream);
  text-shadow: 2px 2px 0 var(--shell-deep);
  font-size: 1.3rem;
  letter-spacing: 10px;
  margin-bottom: 12px;
  user-select: none;
}

/* ---------- LCD screen ---------- */
.screen {
  background: var(--lcd);
  border: 4px solid var(--ink);
  border-radius: 18px;
  box-shadow: inset 0 0 0 6px var(--bezel);
  position: relative;
  overflow: hidden;
}
/* scanlines */
.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 3px,
    rgba(51, 32, 59, 0.05) 3px 6px
  );
}
.screen__inner {
  padding: clamp(24px, 7vw, 38px) clamp(18px, 5.5vw, 30px);
}

/* ---------- hero ---------- */
.hero { text-align: center; }

.avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  background: var(--cream);
  border: 4px solid var(--ink);
  box-shadow: 5px 5px 0 rgba(51, 32, 59, 0.3);
  padding: 4px;
}
.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

.name {
  font-family: var(--px-font);
  font-size: clamp(1rem, 4.6vw, 1.35rem);
  line-height: 1.4;
  margin: 0;
  color: var(--ink);
}
/* blinking cursor */
.name::after {
  content: "_";
  color: var(--pink);
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.tagline {
  font-size: 1.35rem;
  color: var(--pink-deep);
  margin: 10px 0 4px;
}

.stats {
  font-family: var(--px-font);
  font-size: 0.55rem;
  margin: 8px 0 0;
}
.stats__label { color: var(--ink-soft); margin-right: 8px; }
.stats__hearts { color: var(--pink); letter-spacing: 3px; }

.bio {
  font-size: 1.3rem;
  line-height: 1.35;
  color: var(--ink);
  margin: 14px auto 0;
  max-width: 30ch;
}

.hobbies {
  font-size: 1.2rem;
  color: var(--pink-deep);
  margin: 10px auto 22px;
}

/* ---------- primary button ---------- */
.btn-primary {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  font-family: var(--px-font);
  font-size: 0.68rem;
  line-height: 1.6;
  color: var(--cream);
  background: var(--pink);
  border: 4px solid var(--ink);
  padding: 14px 16px;
  box-shadow: 0 6px 0 var(--pink-deep), 0 6px 0 4px var(--ink);
  transition: transform 0.08s steps(2), box-shadow 0.08s steps(2);
}
.btn-primary:hover { transform: translateY(2px); box-shadow: 0 4px 0 var(--pink-deep), 0 4px 0 4px var(--ink); }
.btn-primary:active { transform: translateY(6px); box-shadow: 0 0 0 var(--pink-deep), 0 0 0 4px var(--ink); }

/* ---------- social links ---------- */
.links {
  margin: 30px 0 34px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: var(--cream);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 rgba(51, 32, 59, 0.3);
  text-decoration: none;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1.2;
  transition: transform 0.08s steps(2), box-shadow 0.08s steps(2), background 0.08s steps(2);
}
.link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(51, 32, 59, 0.3);
  background: #fff;
}
.link:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 rgba(51, 32, 59, 0.3); }
.link__heart { color: var(--pink); }
.link__arrow { color: var(--pink); font-size: 1.4rem; }
.link:hover .link__arrow { animation: nudge 0.5s steps(2) infinite; }
@keyframes nudge { 50% { transform: translateX(4px); } }

/* ---------- apps ---------- */
.section-title {
  font-family: var(--px-font);
  font-size: 0.78rem;
  color: var(--ink);
  text-align: center;
  margin: 0 0 18px;
}
.apps { display: flex; flex-direction: column; gap: 16px; }

.app {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: var(--cream);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 rgba(51, 32, 59, 0.3);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.08s steps(2), box-shadow 0.08s steps(2);
}
.app:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 rgba(51, 32, 59, 0.3); }
.app:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 rgba(51, 32, 59, 0.3); }

.app__head { display: flex; align-items: center; gap: 12px; }

.app__icon {
  width: 44px;
  height: 44px;
  flex: none;
  background: var(--lcd-deep);
  border: 3px solid var(--ink);
  display: grid;
  place-items: center;
  padding: 3px;
}
.app__icon svg { width: 100%; height: 100%; display: block; image-rendering: pixelated; }

.app__name { font-family: var(--px-font); font-size: 0.72rem; line-height: 1.4; flex: 1; text-align: left; }
.app__desc { font-size: 1.22rem; line-height: 1.2; color: var(--ink-soft); text-align: left; }
.app__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 0.95rem;
  line-height: 1;
  text-transform: uppercase;
  padding: 3px 8px;
  background: var(--sun);
  border: 2px solid var(--ink);
  color: var(--ink);
}
.app__arrow { flex: none; align-self: center; color: var(--pink); font-size: 1.4rem; }
.app:hover .app__arrow { animation: nudge 0.5s steps(2) infinite; }

/* ---------- footer ---------- */
.footer {
  margin-top: 30px;
  text-align: center;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* ---------- tamagotchi buttons ---------- */
.shell__buttons {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin-top: 18px;
  user-select: none;
}
.shell__btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 4px 0 var(--shell-deep), 0 4px 0 3px var(--ink);
  font-family: var(--px-font);
  font-size: 0.6rem;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.08s steps(2), box-shadow 0.08s steps(2);
}
.shell__btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--shell-deep), 0 0 0 3px var(--ink); }

/* ---------- mobile: the shell IS the page ---------- */
@media (max-width: 540px) {
  body { padding: 0; background: var(--shell); }
  .shell {
    max-width: none;
    min-height: 100dvh;
    border: none;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    padding: calc(14px + env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom));
  }
  .screen { flex: 1; display: flex; flex-direction: column; }
  .screen__inner { flex: 1; }
  .shell__buttons { margin-top: 16px; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .shell { opacity: 1; transform: none; }
  .name::after { content: "_"; }
}
