/* ---------- COLORS: same set as the landing page ---------- */
  :root {
    --bg: #0c0813;
    --line: #2f2246;
    --purple: #7a3fc4;
    --purple-soft: #b795ee;
    --text-main: #f3ecf4;
    --text-dim: #9a8ca8;
    --crimson: #cc1a30;
    --crimson-dim: #7a1020;
    --gold: #f2b94b;
    --gold-dim: #b8892f;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  html { scroll-padding-top: env(safe-area-inset-top, 0px); }
  * { box-sizing: border-box; }

  body {
    margin: 0;
    color: var(--text-main);
    font-family: 'Space Mono', monospace;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
      radial-gradient(ellipse 90% 55% at 50% 28%, rgba(122,63,196,0.34), transparent 70%),
      radial-gradient(ellipse 100% 40% at 50% 100%, rgba(70,24,110,0.40), transparent 70%),
      var(--bg);
  }

  /* ---------- STARS (same three layers as the landing page) ---------- */
  body::before {
    content: "";
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image:
      radial-gradient(1px 1px at 12px 18px,  rgba(255,245,250,0.55), transparent 60%),
      radial-gradient(1px 1px at 61px 88px,  rgba(255,245,250,0.45), transparent 60%),
      radial-gradient(1px 1px at 104px 41px, rgba(255,245,250,0.50), transparent 60%),
      radial-gradient(1px 1px at 143px 121px,rgba(255,245,250,0.40), transparent 60%),
      radial-gradient(1px 1px at 37px 119px, rgba(255,245,250,0.50), transparent 60%);
    background-size: 151px 149px, 173px 167px, 197px 181px, 211px 199px, 131px 137px;
  }
  body::after {
    content: "";
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image:
      radial-gradient(1.5px 1.5px at 45px 30px,   rgba(255,250,255,0.95), transparent 60%),
      radial-gradient(1.5px 1.5px at 130px 95px,  rgba(255,250,255,0.85), transparent 60%),
      radial-gradient(1.5px 1.5px at 210px 160px, rgba(255,250,255,0.90), transparent 60%);
    background-size: 257px 233px, 293px 271px, 331px 307px;
    animation: twinkle 5s ease-in-out infinite alternate;
  }
  .stars-gold {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image:
      radial-gradient(2px 2px at 80px 60px,   rgba(242,185,75,0.95), transparent 60%),
      radial-gradient(2px 2px at 190px 140px, rgba(242,185,75,0.80), transparent 60%);
    background-size: 389px 353px, 431px 397px;
    animation: twinkle 7s ease-in-out infinite alternate;
    animation-delay: -3s;
  }
  @keyframes twinkle { from { opacity: 0.45; } to { opacity: 1; } }
  @media (prefers-reduced-motion: reduce) {
    body::after, .stars-gold { animation: none; }
  }

  header, main, footer { position: relative; z-index: 1; }
  .pixel { font-family: 'Press Start 2P', monospace; }

  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
  }
  .logo { display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: 1px; }
  .login-link {
    font-size: 12px;
    color: var(--purple-soft);
    border: 1px solid var(--line);
    padding: 8px 14px;
    border-radius: 3px;
    text-decoration: none;
    background: rgba(122,63,196,0.12);
  }

  main {
    flex: 1;
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 28px 20px 56px;
  }
  .back {
    display: inline-block;
    font-size: 12px;
    color: var(--text-dim);
    text-decoration: none;
    margin-bottom: 26px;
  }
  .heading { text-align: center; margin-bottom: 34px; }
  h1.pixel {
    font-size: 16px;
    line-height: 1.9;
    margin: 0 0 16px;
    text-shadow: 0 0 14px rgba(204,26,48,0.55);
  }
  .sub { font-size: 13px; color: var(--text-dim); margin: 0; line-height: 1.6; }

  /* ---------- CARDS ---------- */
  .cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
  .card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px;
    background: rgba(23,16,36,0.88);
    border: 1px solid var(--line);
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
  }
  .card:active { border-color: var(--crimson); }
  .card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
  @media (hover: hover) {
    .card:hover {
      border-color: var(--purple);
      box-shadow: 0 0 0 1px rgba(122,63,196,0.5), 0 0 22px rgba(122,63,196,0.28);
    }
  }
  /* icon sits in a bordered "inventory slot" */
  .slot {
    flex: none;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #120a1e;
    border: 2px solid var(--gold-dim);
    border-radius: 4px;
    box-shadow: inset 0 0 0 2px #0c0813;
  }
  .slot svg { width: 44px; height: 44px; }
  .card-text { flex: 1; min-width: 0; }
  .card-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 11px;
    line-height: 1.7;
    margin: 0 0 8px;
  }
  .card-desc { font-size: 12px; line-height: 1.6; color: var(--text-dim); margin: 0; }
  .go { flex: none; color: var(--gold); font-size: 20px; }

  @media (min-width: 760px) {
    main { padding-top: 40px; }
    h1.pixel { font-size: 20px; }
    .cards { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .card { flex-direction: column; text-align: center; padding: 26px 20px 22px; gap: 20px; }
    .slot { width: 84px; height: 84px; }
    .slot svg { width: 56px; height: 56px; }
    .go { display: none; }
  }

  footer {
    border-top: 1px solid var(--line);
    padding: 22px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    font-size: 12px;
  }
  footer a { color: var(--text-dim); text-decoration: none; border-bottom: 1px dotted var(--line); }

  /* assistant button: dark face so the spellbook reads clearly */
  .assist-btn {
    position: fixed;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px)); /* lifted clear of the footer links */
    right: 18px;
    z-index: 2;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #1a0f2a;
    border: 2px solid var(--gold-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 1px var(--crimson-dim), 0 0 20px rgba(204,26,48,0.45);
    cursor: pointer;
    padding: 0;
  }
  .assist-btn svg { width: 30px; height: 30px; }

.resume-strip { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding: 14px 16px; background: rgba(23,16,36,0.88); border: 1px solid var(--gold-dim); border-left: 4px solid var(--gold); border-radius: 6px; }
.resume-strip .rs-icon { flex: none; width: 48px; height: 48px; padding: 6px; border: 2px solid var(--gold-dim); border-radius: 4px; background: var(--slot); }
.resume-strip .rs-icon svg { width: 100%; height: 100%; display: block; }
.resume-strip .rs-text { flex: 1; min-width: 0; }
.resume-strip .rs-kicker { font-family: 'Press Start 2P', monospace; font-size: 9px; line-height: 1.6; color: var(--gold); margin: 0 0 6px; }
.resume-strip .rs-title { font-size: 14px; color: var(--text-main); margin: 0 0 2px; }
.resume-strip .rs-meta { font-size: 12px; color: var(--text-dim); margin: 0 0 8px; }
.resume-strip .rs-meter { --n: 1; --done: 0; height: 6px; background: var(--slot); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.resume-strip .rs-meter::after { content: ''; display: block; height: 100%; width: calc(100% * var(--done) / var(--n)); background: var(--gold); }
.resume-strip a.rs-go { flex: none; font-family: 'Press Start 2P', monospace; font-size: 10px; color: #1a0f2a; background: var(--gold); border-radius: 4px; padding: 12px 14px; text-decoration: none; }
.resume-strip a.rs-go:hover, .resume-strip a.rs-go:focus-visible { background: #ffd98a; outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 520px) { .resume-strip { flex-wrap: wrap; } .resume-strip a.rs-go { width: 100%; text-align: center; box-sizing: border-box; } }
