/* =========================================================
   Pikachu — Pokémon Profile #025
   Design system: electric field guide / "lightning ledger"
   ========================================================= */

:root {
  --ink: #151a22;
  --ink-soft: #262c37;
  --yellow: #ffd628;
  --amber: #f0a400;
  --cream: #fcf6e2;
  --cheek: #e8402a;
  --slate: #5a6472;
  --paper: var(--cream);
  --line: var(--ink);
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --shadow: 5px 6px 0 var(--ink);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(circle at 20% 8%, rgba(21, 26, 34, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, rgba(21, 26, 34, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 60% 90%, rgba(21, 26, 34, 0.06) 1px, transparent 1px);
  background-size: 34px 34px, 46px 46px, 52px 52px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--yellow);
  color: var(--ink);
  padding: 0.6rem 1rem;
  font-weight: 600;
  font-size: 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--cheek);
  outline-offset: 3px;
}

/* ---------- Masthead ---------- */
.masthead {
  background: var(--ink);
  color: var(--yellow);
  position: sticky;
  top: 0;
  z-index: 50;
}
.masthead-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--yellow);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 1.02rem;
}
.brand-bolt {
  width: 18px;
  height: 24px;
  clip-path: polygon(62% 0, 100% 0, 100% 52%, 100% 55%, 55% 55%, 70% 100%, 26% 100%, 35% 55%, 0 55%);
  background: var(--yellow);
}
.site-nav {
  display: flex;
  gap: 0.3rem;
}
.site-nav a {
  color: var(--yellow);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
  border-radius: 2px;
}
.site-nav a:hover {
  background: rgba(255, 214, 40, 0.14);
}
.site-nav a[aria-current="true"] {
  background: var(--yellow);
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 28%;
  background: var(--yellow);
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
  z-index: -1;
  opacity: 0.9;
}
.kicker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  color: var(--ink);
  border: 2px solid var(--ink);
  background: var(--yellow);
  padding: 0.35rem 0.7rem;
  width: fit-content;
  margin-bottom: 1.1rem;
}
.kicker .bar {
  width: 14px;
  height: 2px;
  background: var(--ink);
}
.hero-title {
  font-size: clamp(4.2rem, 15vw, 9.5rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--ink);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 6px 6px 0 var(--yellow), 12px 12px 0 var(--amber);
  margin-bottom: 0.35rem;
}
.sub {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 1.4rem;
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.badge {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.98rem;
  padding: 0.35rem 0.7rem;
  border: 2px solid var(--ink);
}
.badge-type {
  background: var(--amber);
  color: var(--ink);
  text-transform: uppercase;
}
.badge-height {
  background: var(--ink);
  color: var(--cream);
}
.lead {
  max-width: 52ch;
  font-size: 1.06rem;
  color: var(--ink-soft);
}

.hero-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero-art svg {
  width: min(100%, 340px);
  height: auto;
  filter: drop-shadow(8px 8px 0 rgba(21, 26, 34, 0.25));
}
.hero-art figcaption {
  margin-top: 1.2rem;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.2em;
  font-size: 0.82rem;
  color: var(--slate);
  border-top: 2px solid var(--ink);
  padding: 0.4rem 1.6rem;
}

/* ---------- Panels ---------- */
.panel {
  max-width: 1120px;
  margin: 0 auto 2.2rem;
  padding: 2.2rem 1.5rem;
  border-top: 6px solid var(--ink);
  border-left: 1px solid rgba(21, 26, 34, 0.25);
  border-right: 1px solid rgba(21, 26, 34, 0.25);
  border-bottom: 1px solid rgba(21, 26, 34, 0.25);
}
.panel-head {
  margin-bottom: 1.7rem;
}
.panel-title {
  font-size: 2.1rem;
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}
.num {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--cream);
  background: var(--ink);
  border: 2px solid var(--amber);
  padding: 0.1rem 0.45rem;
  align-self: center;
}
.panel-sub {
  margin-top: 0.35rem;
  color: var(--slate);
  font-size: 0.98rem;
}

/* ---------- Fact grid ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem 1.5rem;
  border-top: 2px solid var(--ink);
  padding-top: 1.2rem;
}
.fact {
  border-left: 3px solid var(--amber);
  padding-left: 0.85rem;
}
.fact dt {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.2rem;
}
.fact dd {
  font-size: 1.02rem;
  font-weight: 500;
}
.data-note {
  margin-top: 1.6rem;
  padding: 1rem 1.2rem;
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  max-width: 60ch;
}

/* ---------- Stats ---------- */
.stats-panel {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--amber);
}
.stats-panel .panel-sub {
  color: rgba(252, 246, 226, 0.65);
}
.stats-panel .num {
  background: var(--amber);
  color: var(--ink);
  border-color: var(--cream);
}
.stat {
  margin-bottom: 1.15rem;
}
.stat-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}
.stat-note {
  color: var(--amber);
}
.track {
  height: 16px;
  background: rgba(252, 246, 226, 0.12);
  border-bottom: 2px solid rgba(252, 246, 226, 0.4);
}
.fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--cream);
  animation: grow 900ms ease-out forwards;
}
@keyframes grow {
  from { width: 0; }
  to { width: var(--w); }
}
.stat:hover .fill {
  background: var(--yellow);
}
.fill-gold {
  background: var(--yellow);
}
.stat-total {
  font-size: 0.98rem;
  color: rgba(252, 246, 226, 0.85);
}
.stat-total strong {
  color: var(--yellow);
}

/* ---------- Moves ---------- */
.moves-list {
  list-style: none;
  border-top: 2px solid var(--ink);
}
.move {
  display: grid;
  grid-template-columns: 170px 96px 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 0.9rem 0.3rem;
  border-bottom: 1px dashed rgba(21, 26, 34, 0.35);
}
.move-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}
.move-type {
  justify-self: start;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--amber);
  color: var(--ink);
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--ink);
}
.move-desc {
  font-size: 0.96rem;
  color: var(--ink-soft);
}

/* ---------- Evolution ---------- */
.evo-chain {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0.8rem;
  align-items: end;
}
.evo-node {
  text-align: center;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  padding: 1.4rem 1rem 1.2rem;
  position: relative;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.evo-node-current {
  background: var(--yellow);
  color: var(--ink);
  outline: 4px solid var(--cream);
  outline-offset: -8px;
}
.evo-node h3 {
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  margin-top: 1rem;
}
.evo-node p {
  font-size: 0.92rem;
  margin-top: 0.5rem;
  color: rgba(252, 246, 226, 0.9);
}
.evo-node-current p {
  color: var(--ink-soft);
}
.evo-rule {
  display: block;
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px solid currentColor;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--amber);
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
}
.evo-node-current .evo-rule {
  color: var(--cheek);
  border-color: var(--ink);
}
.evo-art {
  width: 150px;
  height: 150px;
  margin: 0 auto;
  display: block;
}
.evo-arrow {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--amber);
  margin-bottom: 1rem;
}

/* ---------- Flavor ---------- */
.flavor {
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.4rem;
  font-size: 1.08rem;
  font-weight: 500;
  max-width: 68ch;
}
.flavor::before {
  content: "“";
  display: block;
  font-family: var(--display);
  font-size: 2.4rem;
  line-height: 0.6;
  color: var(--cheek);
  margin-bottom: 0.3rem;
}
.notes-list {
  list-style: none;
  border-top: 2px solid var(--ink);
}
.notes-list li {
  padding: 0.8rem 0.3rem;
  border-bottom: 1px dashed rgba(21, 26, 34, 0.35);
  font-size: 1rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  padding: 1.8rem 1.5rem 2.2rem;
  font-size: 0.95rem;
}
.site-footer p {
  max-width: 60ch;
  margin: 0 auto;
}
.footer-legal {
  margin-top: 0.4rem;
  color: rgba(252, 246, 226, 0.55);
  font-size: 0.85rem;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fill { animation: none; width: var(--w); }
  .hero-title { text-shadow: 4px 4px 0 var(--yellow), 8px 8px 0 var(--amber); }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 2.6rem;
    text-align: left;
  }
  .hero::before {
    width: 100%;
    height: 46%;
    top: 0;
    bottom: auto;
    clip-path: polygon(0 0, 100% 0, 100% 38%, 0 100%);
  }
  .hero-art {
    order: -1;
    margin-bottom: 1rem;
  }
  .hero-title {
    text-shadow: 4px 4px 0 var(--yellow), 8px 8px 0 var(--amber);
  }
}

@media (max-width: 640px) {
  .masthead-inner {
    padding: 0.7rem 1rem;
  }
  .site-nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.2rem;
  }
  .site-nav a {
    flex: 0 0 auto;
    padding: 0.35rem 0.55rem;
    font-size: 0.95rem;
  }
  .hero {
    padding: 2.2rem 1rem 2.8rem;
    gap: 1.4rem;
  }
  .panel {
    padding: 1.7rem 1rem;
    margin-bottom: 1.5rem;
  }
  .move {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
  .move-type {
    width: fit-content;
  }
  .evo-chain {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .evo-arrow {
    display: none;
  }
  .evo-node {
    min-height: 0;
  }
  .facts {
    grid-template-columns: 1fr;
  }
}
