:root {
  --bg-dark: #111f2e;
  --grid-line: rgba(255, 255, 255, 0.08);
  --header-bg: #1d3c4b;
  --cyan-accent: #32947a;
  --orange-accent: #b4c9ce;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background-color: var(--bg-dark);
  color: white;
  font-family: 'Courier New', Courier, monospace; 
  overflow-x: hidden;
}

.grid-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh; 
  background-image: 
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
  pointer-events: none;
}

.route-header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 75px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  padding: 0 40px;
  
  background-color: rgba(15, 23, 42, 0.85); 
  backdrop-filter: blur(10px); 
  -webkit-backdrop-filter: blur(10px); 
  
  border-bottom: 2px solid var(--cyan-accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.bottom-border {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 6px;
  background-color: var(--cyan-accent); 
  box-shadow: 0 -2px 10px rgba(50, 148, 122, 0.3); 
  z-index: 100;
}

.character-container {
  position: fixed; 
  top: 50%;
  left: 5%;
  transform: translate(-50%, -50%) scale(2); 
  z-index: 50;
}
.sprite {
  width: 32px; 
  height: 32px; 
  
  background-image: url('../assets/pkmn_bw_main_characters.png'); 
  background-repeat: no-repeat;
  image-rendering: pixelated; 
  background-position: -4px -37px; 
}
.route-header {
  display: flex;      
  flex-direction: row;  
  justify-content: end;
  gap: 50px;                 
}

.content-container {
  position: relative;
  z-index: 10; 
}

.page-section {
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px; 
}
.pokedex-container {
  display: flex;
  width: 90%;
  max-width: 1100px;
  height: 550px;
  background-color: #1e293b;
  border: 2px solid #334155;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  font-family: 'Courier New', Courier, monospace;
  overflow: hidden;
}
.dex-left {
  flex: 1;
  background-color: #0f172a; 
  background-image: linear-gradient(rgba(50, 148, 122, 0.15) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(50, 148, 122, 0.15) 1px, transparent 1px);
  background-size: 20px 20px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  border-right: 2px solid #334155;
}

.dex-left img {
  width: 180px; 
  height: 180px; 
  object-fit: contain;
  background-color: transparent; 
  border-radius: 12px;
  border: 2px solid var(--cyan-accent);
  padding: 15px;
  margin-bottom: 25px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  transition: background-color 0.3s ease;
}

.dex-left img.white-bg {
  background-color: #ffffff; 
}
.dex-info-label {
  background: var(--cyan-accent);
  color: #000;
  border-radius: 20px;
  padding: 6px 20px;
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 20px;
  letter-spacing: 2px;
  box-shadow: 0 4px 10px rgba(50, 148, 122, 0.4);
}

#dex-title {
  font-size: 24px;
  margin-bottom: 15px;
  color: white;
  font-weight: bold;
}

#dex-desc {
  font-size: 15px;
  line-height: 1.6;
  color: #94a3b8; 
  white-space: pre-line; 
  text-align: justify;
  margin: 0 auto;
}

.dex-right {
  flex: 1.2;
  background-color: #1e293b;
  padding: 25px;
  display: flex;
  flex-direction: column;
}

.dex-header-bar {
  background: #0f172a;
  color: var(--cyan-accent);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  margin-bottom: 20px;
  border-radius: 8px;
  border: 1px solid #334155;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.dex-list {
  list-style: none;
  overflow-y: auto; 
  padding-right: 10px;
}

.dex-list::-webkit-scrollbar { width: 6px; }
.dex-list::-webkit-scrollbar-track { background: #0f172a; border-radius: 4px; }
.dex-list::-webkit-scrollbar-thumb { background: #475569; border-radius: 4px; }

.dex-item {
  background-color: #0f172a;
  color: #cbd5e1;
  padding: 15px 20px;
  margin-bottom: 10px;
  cursor: pointer;
  font-weight: bold;
  border: 1px solid #334155;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: all 0.2s ease;
}

.dex-item:hover {
  background-color: #334155;
  transform: translateX(5px); 
  color: white;
}

.dex-item.active {
  background-color: var(--cyan-accent);
  color: #000;
  border-color: var(--cyan-accent);
  box-shadow: 0 4px 15px rgba(50, 148, 122, 0.4);
}

.exercise-menu {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 200px; 
      width: 100%;
}
  
.exercise-box {
  text-decoration: none;
  display: block;
  width: 180px; 
  height: 180px; 
  background-color: #32947a;
  clip-path: polygon(20px 0, calc(100% - 20px) 0, 100% 20px, 100% calc(100% - 20px), calc(100% - 20px) 100%, 20px 100%, 0 calc(100% - 20px), 0 20px);
  padding: 4px;
  transition: all 0.2s ease-in-out;
}

.exercise-content {
  background-color: white;
  color: #000;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px; 
  font-weight: bold;
  font-size: 16px; 
  letter-spacing: 1px;
  clip-path: polygon(17px 0, calc(100% - 17px) 0, 100% 17px, 100% calc(100% - 17px), calc(100% - 17px) 100%, 17px 100%, 0 calc(100% - 17px), 0 17px);
}

.exercise-content img {
  width: 60px; 
  height: 60px;
  object-fit: contain;
  image-rendering: pixelated;
}

.box-up {
  transform: translateY(-40px); 
}

.box-down {
  transform: translateY(0px);  
}

.exercise-box.box-up:hover {
  transform: translateY(-45px) scale(1.05);
  background-color: #f59e0b;
}

.exercise-box.box-down:hover {
  transform: translateY(10px) scale(1.05);
  background-color: #f59e0b; 
}

.exercise-box:hover .exercise-content {
  background-color: white;
}

.exercise-tree-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 900px; 
  position: relative;
}

.title-box {
  z-index: 2; 
  margin-bottom: 0px; 
}

.tree-lines {
  width: 100%;
  height: 80px; 
  margin-top: -15px;
  margin-bottom: -15px; 
  z-index: 1;
}

.line-1 { stroke: #32947a; stroke-width: 4px; }
.line-2 { stroke: #32947a; stroke-width: 4px; }
.line-3 { stroke: #32947a; stroke-width: 4px; }

.exercise-menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  z-index: 2;
}

.about-container {
  display: flex;
  width: 90%;
  max-width: 1100px; 
  min-height: 500px;
  background-color: #1e293b;
  border: 2px solid #334155;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  font-family: 'Courier New', Courier, monospace;
  color: white;
  overflow: hidden;
}

.about-col {
  padding: 30px 20px; 
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.col-1 { 
  flex: 1; 
  background-color: #0f172a; 
  border-right: 1px solid #334155; 
}
.col-2 { 
  flex: 1; 
  background-color: #1e293b; 
  border-right: 1px solid #334155; 
}
.col-3 { 
  flex: 1.8; 
  align-items: center; 
  justify-content: center; 
  text-align: center;
  background-color: #0f172a; 
}

.move-box {
  background-color: #334155;
  padding: 12px 15px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: all 0.2s ease;
}

.move-box:hover { 
  background-color: #475569; 
  transform: translateX(5px);
}

.move-box.active-main, .move-box.active-sub {
  background-color: var(--cyan-accent); 
  color: #000;
}

.type-badge {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 900;
  border-radius: 4px;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.3); 
}

.move-name {
  font-size: 18px;
  font-weight: bold;
  margin-left: 5px;
}

#about-image {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  border: 3px solid var(--cyan-accent);
  margin-bottom: 25px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

#about-title {
  font-size: 26px;
  color: white;
  margin-bottom: 15px;
  font-weight: bold;
  text-transform: uppercase;
}

#about-desc {
  white-space: pre-line;
  line-height: 1.6;
  color: #cbd5e1; 
  font-size: 16px;
  padding: 0 20px; 
}
.hero-container {
  display: flex;
  align-items: flex-start; 
  justify-content: center;
  gap: 60px;
  padding: 50px 20px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.hero-container {
      display: flex;
      align-items: flex-start;
      justify-content: center;
      gap: 60px;
      padding: 50px 20px;
      width: 100%;
      max-width: 1000px;
      margin: 0 auto;
      position: relative; 
    }

.sprite {
  background-repeat: no-repeat;
  image-rendering: pixelated; 
  transform-origin: top left; 
}

.hilbert-wrapper {
  width: 400px;
  height: 360px;
}

.hilbert-pose {
  background-image: url('../assets/pkmn_trainers_full_size.png'); 
  width: 36px;
  height: 72px;
  background-position: -19px -7px; 
  transform: scale(5); 
}

.lifebar-wrapper {
  display: flex;
  flex-direction: column;
  
  align-items: flex-start; 
  
  width: 345px; 
  margin-top: 25px; 
}

.lifebar {
  background-image: url('../assets/pkmn_miscellaneous.png'); 
  width: 115px;
  height: 28px;
  background-position: -12px -242px; 
  transform: scale(3); 
  
  transform-origin: top right; 
}

.hero-text {
  margin-top: 120px; 
  text-align: left;
  color: white;
  font-family: 'Courier New', Courier, monospace;
  
  margin-left: -150px; 
}
.pokemon-team {
  position: absolute; 
  bottom: 0px;
  left: 200px;
  display: flex;
  gap: 50px; 
  align-items: flex-end; 
}

.pkmn {
  background-image: url('../assets/pkmn_team_members.png'); 
  width: 32px; 
  height: 32px;
  transform: scale(2.5); 
  transform-origin: bottom left; 
}

.volcarona {
  animation: anim-volcarona 1s infinite; 
}
@keyframes anim-volcarona {
  0%, 49.9% { background-position: -264px -661px; }   
  50%, 100% { background-position: -297px -661px; } 
}

.hydreigon {
  animation: anim-hydreigon 1s infinite; 
}
@keyframes anim-hydreigon {
  0%, 49.9% { background-position: -132px -661px; }
  50%, 100% { background-position: -165px -661px; }
}

.reuniclus {
  animation: anim-reuniclus 1s infinite; 
}
@keyframes anim-reuniclus {
  0%, 49.9% { background-position: -132px -397px; }
  50%, 100% { background-position: -165px -397px; }
}

.jellicent {
  animation: anim-jellicent 1s infinite; 
}
@keyframes anim-jellicent {
  0%, 49.9% { background-position: -133px -463px; }
  50%, 100% { background-position: -166px -463px; }
}

.conkeldurr {
  animation: anim-conkeldurr 1s infinite; 
}
@keyframes anim-conkeldurr {
  0%, 49.9% { background-position: -331px -166px; }
  50%, 100% { background-position: -364px -166px; }
}

.archeops {
  animation: anim-archeops 1s infinite; 
}
@keyframes anim-archeops {
  0%, 49.9% { background-position: -265px -331px; }
  50%, 100% { background-position: -298px -331px; }
}

.profile-photo {
  width: 250px; 
  height: auto;
  border-radius: 12px; 
  border: 4px solid white;
  box-shadow: 0 4px 8px rgba(0,0,0,0.5); 
}
.header-nav {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin-top: 20px;
}

.header-nav {
  display: flex;
  gap: 15px;
  z-index: 10; 
}

.nav-link {
  color: #cbd5e1;
  text-decoration: none;
  font-family: 'Courier New', Courier, monospace;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 10px 18px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: #000;
  background-color: var(--cyan-accent);
  border-color: var(--cyan-accent);
  box-shadow: 0 0 15px rgba(50, 148, 122, 0.4);
  transform: translateY(-2px);
}

.contact-panel {
  background-color: #111827; 
  border: 2px solid var(--orange-accent);
  border-radius: 16px;
  padding: 50px;
  width: 100%;
  max-width: 700px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.contact-panel h2 {
  font-size: 32px;
  color: white;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.contact-subtitle {
  color: #9ca3af;
  font-size: 16px;
  margin-bottom: 40px;
}

.contact-links-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #1f2937;
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid #374151;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.2s ease;
}

.btn-icon {
  color: var(--orange-accent);
  font-weight: 900;
}

.contact-btn:hover {
  background-color: var(--orange-accent);
  color: #111827;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(180, 201, 206, 0.4);
}

.contact-btn:hover .btn-icon {
  color: #111827;
}
.hilbert-track {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: calc(100% - 600px); 
  pointer-events: none;
}
.hilbert-runner {
  width: 32px; 
  height: 32px;
  background-image: url('../assets/pkmn_bw_main_characters.png');
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scale(2);
  background-repeat: no-repeat;
  image-rendering: pixelated;
  animation: 
    hilbert-path 12s infinite linear,
    hilbert-sprites 12s infinite step-end;
}

/* --- THE COORDINATE SWAPPING --- */
@keyframes hilbert-sprites {
  /* STAGE 1: RUNNING RIGHT (Using Y = -102px for the right-facing row) */
  0%, 5%, 10%, 15%, 20%, 25%, 30%, 35% { background-position: -111px -102px; }
  2.5%, 7.5%, 12.5%, 17.5%, 22.5%, 27.5%, 32.5%, 37.5% { background-position: -175px -102px; }

  /* STAGE 2: THE THROW AT RIGHT EDGE */
  40%, 48%, 90%, 98% { background-position: -595px -40px; }  /* Crouched */
  42%, 92%      { background-position: -627px -40px; }  /* Low */
  44%, 94%      { background-position: -659px -40px; } /* Mid */
  46%, 96%      { background-position: -691px -40px; } /* High */

  /* STAGE 3: RUNNING LEFT (Using Y = -71px for the left-facing row) */
  50%, 55%, 60%, 65%, 70%, 75%, 80%, 85% { background-position: -111px -71px; }
  52.5%, 57.5%, 62.5%, 67.5%, 72.5%, 77.5%, 82.5%, 87.5% { background-position: -175px -71px; }
}

/* --- THE MOVEMENT PATH --- */
@keyframes hilbert-path {
  /* START: 10% from the left instead of 0% */
  0%   { left: 10%; transform: translateY(-50%) scale(2) scaleX(1); }
  
  /* ARRIVE AT NAV: Stop at 80% (adjust this if he hits your links) */
  40%  { left: 80%; transform: translateY(-50%) scale(2) scaleX(1); }
  50%  { left: 80%; transform: translateY(-50%) scale(2) scaleX(1); }
  
  /* RETURN TRIP */
  50.1% { left: 80%; transform: translateY(-50%) scale(2) scaleX(1); }
  
  /* FINISH: Back to the 10% mark */
  90%  { left: 10%; transform: translateY(-50%) scale(2) scaleX(1); }
  
  /* FLIP FOR POKEBALL: Facing center */
  90.1% { left: 10%; transform: translateY(-50%) scale(2) scaleX(-1); }
  100% { left: 10%; transform: translateY(-50%) scale(2) scaleX(-1); }
}

.section-title {
  font-size: 32px;
  margin-bottom: 40px;
  color: var(--cyan-accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px 0px rgba(0,0,0,0.5);
}

.exercise-grid {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap; 
  width: 100%;
  max-width: 1000px;
}

.project-card {
  background-color: #1e293b;
  border: 2px solid #334155;
  border-radius: 12px;
  width: 260px;
  padding: 30px 20px;
  text-align: center;
  text-decoration: none;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.project-card .card-icon img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 20px;
  border-radius: 8px; 
}

.project-card h3 {
  font-size: 20px;
  color: var(--cyan-accent);
  margin-bottom: 10px;
}

.project-card p {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.4;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: var(--cyan-accent);
  box-shadow: 0 15px 30px rgba(50, 148, 122, 0.3);
}