/* =========================================================
   1. DESIGN TOKENS
   ========================================================= */
:root {
  --black:       #0a0e17;
  --panel:       #10141f;
  --line:        #232a3d;
  --line-bright: #3a4260;
  --white:       #eef2f6;
  --gray-1:      #b8c0cc;
  --gray-2:      #6f7890;
  --cyan:   #2fe5ff;
  --violet: #9b6bff;
  --amber:  #ffb454;
  --pink:   #ff6fb1;
  --purple-hover: #a855f7;
  --yellow-hover: #eab308;
  --orange-hover: #f97316;
  --font: 'JetBrains Mono', monospace;
  --gap: 1.5rem;
  --radius: 18px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================
   2. BASE & RESET
   ========================================================= */
* { box-sizing: border-box; }
body {
  background: var(--black);
  color: var(--gray-1);
  font-family: var(--font);
  position: relative;
  overflow-x: hidden;
}
a { color: inherit; }
::selection { background: var(--white); color: var(--black); }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* =========================================================
   3. BACKGROUND
   ========================================================= */
.hud-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.25;
  animation: drift 40s linear infinite;
}
@keyframes drift {
  from { background-position: 0 0; }
  to   { background-position: 48px 48px; }
}
.hud-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(480px circle at 12% 8%,  rgba(47, 229, 255, 0.16), transparent 60%),
    radial-gradient(520px circle at 90% 20%, rgba(155, 107, 255, 0.14), transparent 60%),
    radial-gradient(460px circle at 25% 95%, rgba(255, 111, 177, 0.10), transparent 60%);
}
.hud-scanline {
  position: fixed;
  left: 0;
  right: 0;
  height: 2px;
  z-index: -1;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent);
  opacity: 0.5;
  animation: scan 8s linear infinite;
}
@keyframes scan {
  0%   { top: 0%; }
  100% { top: 100%; }
}

/* =========================================================
   4. HEADER
   ========================================================= */
.site-header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
  backdrop-filter: blur(6px);
}
.brand {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand i { color: var(--cyan); -webkit-text-fill-color: var(--cyan); }
.cursor {
  animation: blink 1s step-end infinite;
  color: var(--cyan);
  -webkit-text-fill-color: var(--cyan);
}
@keyframes blink { 50% { opacity: 0; } }
.nav-links a {
  color: var(--gray-2);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  margin-left: 1.75rem;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.25s var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width 0.25s var(--ease);
}
.nav-links a:hover { color: var(--cyan); }
.nav-links a:hover::after { width: 100%; }

/* =========================================================
   5. PROFILE SECTION
   ========================================================= */
.profile-section { margin-bottom: 4rem; }
.eyebrow {
  color: var(--gray-2);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.profile-text {
  color: var(--gray-1);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}
.avatar-ring {
  width: clamp(100px, 22vw, 160px);
  height: clamp(100px, 22vw, 160px);
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

/* =========================================================
   6. TIMELINE & HUD PANELS
   ========================================================= */
.timeline-section { margin-bottom: 4rem; }
.hud-panel {
  --panel-accent: var(--line-bright);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.hud-panel:hover {
  border-color: var(--panel-accent);
  transform: translateY(-6px);
  box-shadow: 0 12px 28px -12px var(--panel-accent);
}
.hud-panel.panel-compact {
  padding: 1.25rem;
  flex: 0 0 auto;
}
.hud-panel.panel-compact .panel-title {
  margin-bottom: 0.75rem;
}
.hud-panel.panel-purple { --panel-accent: var(--purple-hover); }
.hud-panel.panel-yellow { --panel-accent: var(--yellow-hover); }
.hud-panel.panel-orange { --panel-accent: var(--orange-hover); }
.hud-panel.panel-pink   { --panel-accent: var(--pink); }

.panel-title {
  color: var(--cyan);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}
.timeline {
  list-style: none;
  margin: 0;
  padding-left: 1.25rem;
  border-left: 1px solid var(--line);
}
.timeline li {
  position: relative;
  padding-bottom: 1.25rem;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.4rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 8px var(--violet);
}
.timeline li:nth-child(1)::before { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.timeline li:nth-child(2)::before { background: var(--violet); box-shadow: 0 0 8px var(--violet); }
.timeline li:nth-child(3)::before { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.timeline li:nth-child(4)::before { background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.timeline li:nth-child(5)::before { background: var(--purple-hover); box-shadow: 0 0 8px var(--purple-hover); }
.timeline li:nth-child(6)::before { background: var(--orange-hover); box-shadow: 0 0 8px var(--orange-hover); }
.timeline-year {
  display: block;
  color: var(--white);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
.timeline-text {
  color: var(--gray-2);
  font-size: 0.9rem;
}

/* =========================================================
   7. CARDS
   ========================================================= */
.cards-section { margin-bottom: 4rem; }
.hud-card {
  --accent: var(--cyan);
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  height: 100%;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.hud-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0.7;
}
.hud-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 12px 28px -12px var(--accent);
}
.hud-card--cyan   { --accent: var(--cyan); }
.hud-card--violet { --accent: var(--violet); }
.hud-card--amber  { --accent: var(--amber); }
.hud-card--pink   { --accent: var(--pink); }
.hud-card-title {
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.hud-card-title i { color: var(--accent); }
.hud-card-text {
  color: var(--gray-2);
  font-size: 0.85rem;
  margin: 0;
}

/* ---- Project stat cards (repositories / favorites / stars / forks) ---- */
.project-stat-card {
  --accent: var(--cyan);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.project-stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -12px var(--accent);
}
.project-stat-card--cyan   { --accent: var(--cyan); }
.project-stat-card--pink   { --accent: var(--pink); }
.project-stat-card--amber  { --accent: var(--amber); }
.project-stat-card--violet { --accent: var(--violet); }
.project-stat-card--orange { --accent: var(--orange-hover); }
.project-stat-card--yellow { --accent: var(--yellow-hover); }
.project-stat-icon {
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.project-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font);
  color: var(--white);
  line-height: 1.2;
}
.project-stat-label {
  font-size: 0.7rem;
  color: var(--gray-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.15rem;
}

/* ---- Staggered tech / language chip cards ---- */
.stagger-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 1.25rem;
  padding-top: 1.5rem;
}
.stagger-card {
  --accent: var(--cyan);
  width: 108px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 0.5rem;
  text-align: center;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.stagger-card:nth-child(even) {
  margin-top: 1.75rem;
}
.stagger-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 12px 24px -12px var(--accent);
}
.stagger-card i {
  display: block;
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.stagger-card span {
  display: block;
  font-size: 0.7rem;
  font-family: var(--font);
  color: var(--gray-1);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stagger-card--cyan   { --accent: var(--cyan); }
.stagger-card--pink   { --accent: var(--pink); }
.stagger-card--amber  { --accent: var(--amber); }
.stagger-card--violet { --accent: var(--violet); }
.stagger-card--orange { --accent: var(--orange-hover); }
.stagger-card--yellow { --accent: var(--yellow-hover); }

/* =========================================================
   8. FOOTER
   ========================================================= */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  text-align: center;
}
.social-links { margin-bottom: 0.75rem; }
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 0.4rem;
  color: var(--gray-2);
  font-size: 1.1rem;
  border: 1px solid var(--line);
  text-decoration: none;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.social-links a:hover {
  color: var(--white);
  border-color: var(--line-bright);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}
.footer-copy {
  color: var(--gray-2);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  margin: 0;
}

/* =========================================================
   9. SCROLL REVEAL
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   10. RESPONSIVE
   ========================================================= */
@media (max-width: 576px) {
  .nav-links a { margin-left: 1rem; font-size: 0.7rem; }
}

/* =========================================================
   11. PANEL COMPONENTS
   ========================================================= */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.panel-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}
.panel-body { flex: 1; }
.stat-number {
  font-size: 22px;
  font-weight: 700;
  color: var(--violet);
  font-family: var(--font);
}
.stat-label {
  font-size: 8px;
  color: var(--gray-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hud-panel .panel-body.p-0 { padding: 0 !important; }
.hud-panel canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ---- Group / Community cards: fixed icon size + safe text wrapping ---- */
.group-card-body {
  display: flex;
  gap: 0.85rem;
  min-width: 0; /* required so flex children can shrink instead of overflowing */
}
.group-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.group-text {
  min-width: 0; /* prevents text from forcing the flex item wider than its parent */
  flex: 1;
}
.group-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.35rem;
}
.group-description {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--gray-2);
  line-height: 1.4;
}
.panel-header .group-members {
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--gray-2);
  flex-shrink: 0;
  margin-left: 0.5rem;
}
.panel-header .panel-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  margin-bottom: 0;
}

/* ---- Live-data badge: reinforces that stats are fetched, not hardcoded ---- */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #34d399;
  font-weight: 600;
}
.sync-timestamp {
  font-size: 0.72rem;
  color: var(--gray-2);
  font-style: italic;
}

.goals-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.goals-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--gray-1, #d1d5db);
  line-height: 1.4;
}
.goals-item i {
  color: var(--orange-hover, #f39c4a);
  margin-top: 0.15rem;
  flex-shrink: 0;
}
.goals-content { flex: 1; min-width: 0; }
.goals-bar {
  height: 5px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  margin: 0.3rem 0 0.2rem;
  overflow: hidden;
}
.goals-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--orange-hover, #f39c4a);
}
.goals-pct {
  font-size: 0.68rem;
  color: var(--gray-2, #8892a6);
}

.repo-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.6rem;
}

.repo-loading,
.repo-error {
  color: var(--text-secondary, #8892a6);
  font-size: 0.85rem;
  margin: 0;
}

.repo-card {
  display: block;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.75rem 0.85rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.repo-card:hover {
  border-color: var(--orange-hover, #f39c4a);
  transform: translateY(-1px);
}

.repo-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  flex-wrap: nowrap;
}

.repo-card-name {
  font-weight: 600;
  color: var(--orange-hover, #f39c4a);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.repo-card-badge {
  font-size: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  color: var(--text-secondary, #8892a6);
  flex-shrink: 0;
}

.repo-card-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-secondary, #8892a6);
}

.repo-lang-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}

/* Container for the 10 segmented blocks */
.goals-bar-segmented {
  display: flex;
  gap: 4px; /* Space between every curved block */
  width: 100%;
  height: 10px;
}

/* Base style for every segment block (rounded front & back) */
.goals-segment {
  flex: 1;
  height: 100%;
  background-color: var(--line-bright, #2a3142);
  border-radius: 999px; /* Pill shape curves both front and back */
  position: relative;
  overflow: hidden; /* Restricts the glowing sheen strictly inside filled blocks */
  transition: background-color 0.3s ease;
}

/* Active Orange Filled Blocks */
.goals-segment.active {
  background-color: var(--orange, #f97316);
  box-shadow: 0 0 6px rgba(249, 115, 22, 0.4); /* Glow restricted ONLY to orange blocks */
}

/* Moving glow effect constrained strictly inside active blocks */
.goals-segment.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.6) 50%,
    transparent 100%
  );
  animation: BlockShine 2s infinite ease-in-out;
}

@keyframes BlockShine {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Active Page Nav Link Highlight */
.nav-links a.active {
  color: var(--cyan, #38bdf8) !important; /* Blue/Cyan color */
  font-size: 1.05rem; /* Slightly larger size */
  font-weight: 700;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.7), 
               0 0 20px rgba(56, 189, 248, 0.4); /* Blue glow effect */
  transition: all 0.2s ease-in-out;
}

/* Blue glowing text for name */
.text-cyan {
  color: var(--cyan, #38bdf8);
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* Greeting Title: Larger font with warm gradient fill */
.greeting-title {
  font-size: 1.75rem; /* Noticeably larger than the fs-5 (1.25rem) name text below */
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--white, #eef2f6);
}

/* Blue glowing text for name */
.text-cyan {
  color: var(--cyan, #38bdf8);
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* Styling to enlarge and highlight key terms */
.highlight-text {
  font-size: 1.2rem; /* Noticeably larger font size */
  font-weight: 700;
  color: #ffffff; /* Bright white color so it stands out */
}

/* Default fallback for the CSS variable */
.status-panel {
  --status-theme: #6c757d;
  transition: all 0.3s ease;
}

.status-panel:hover {
  border-color: var(--status-theme) !important;
  box-shadow: 0 0 15px var(--status-theme) !important;
}

/* Base card transition */
.hud-panel {
  transition: all 0.3s ease;
}

/* Define distinct theme colors for each card */
.hud-joined { --card-theme: #0dcaf0; }    /* Cyan */
.hud-badges { --card-theme: #0d6efd; }    /* Blue */
.hud-friends { --card-theme: #20c997; }   /* Teal */
.hud-followers { --card-theme: #a855f7; } /* Purple */
.hud-favorites { --card-theme: #ff4d6d; } /* Pink/Red */
.hud-mathematics { --card-theme: #eab308; } /* Yellow */
.hud-philosophy { --card-theme: #9b6bff; }  /* Violet */
.hud-finance { --card-theme: #f97316; }     /* Orange */

/* Generic hover rule applying the card's specific theme */
.hud-joined:hover,
.hud-badges:hover,
.hud-friends:hover,
.hud-followers:hover,
.hud-favorites:hover,
.hud-mathematics:hover,
.hud-philosophy:hover,
.hud-finance:hover {
  border-color: var(--card-theme) !important;
  box-shadow: 0 0 15px var(--card-theme) !important;
}

/* Status panel relies on JS to dynamically set --status-theme */
.status-panel:hover {
  border-color: var(--status-theme, #6c757d) !important;
  box-shadow: 0 0 15px var(--status-theme, #6c757d) !important;
}

/* Make all stat numbers pure, bright white with a subtle glow */
.hud-panel strong {
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Base style for icons to pop */
.hud-panel i {
  display: inline-block;
  transition: transform 0.2s ease, color 0.2s ease;
}

.hud-panel:hover i {
  transform: scale(1.1);
}

/* Custom Icon Colors to match card themes */
.hud-joined i { color: #0dcaf0 !important; }    /* Cyan */
.hud-badges i { color: #0d6efd !important; }    /* Primary Blue */
.hud-friends i { color: #20c997 !important; }   /* Teal/Green */
.hud-followers i { color: #a855f7 !important; } /* Purple */
.hud-favorites i { color: #ff4d6d !important; } /* Heart Pink/Red */
.hud-mathematics i { color: #eab308 !important; } /* Yellow */
.hud-philosophy i { color: #9b6bff !important; }  /* Violet */
.hud-finance i { color: #f97316 !important; }     /* Orange */

/* Card Container Layout */
.my-game-card {
  display: flex;
  flex-direction: column;
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 12px;
  overflow: hidden;
  height: 100%; /* Keeps cards in a row equal height */
}

.card-content {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  flex-grow: 1; /* Fills remaining height */
}

.my-game-name {
  font-size: 1.1rem;
  color: #00f2ff;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

/* Line-clamping for Description (CSS alternative/backup to JS truncation) */
.my-game-desc {
  color: #8b949e;
  font-size: 0.875rem;
  line-height: 1.4;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Truncates after 3 lines */
  -webkit-box-orient: vertical;  
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Categorized Columns for Metadata */
.game-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 1.25rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7681;
}

.meta-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #c9d1d9;
  margin-top: 2px;
}

/* Pin Action Button to Bottom */
.card-actions {
  margin-top: auto; /* Pushes button to bottom of card regardless of description length */
}

.btn-play-experience {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid #00f2ff;
  color: #00f2ff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.btn-play-experience:hover {
  background: rgba(0, 242, 255, 0.1);
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  .game-meta-grid {
    grid-template-columns: repeat(3, 1fr); /* Stays 3 columns or drops to 1 on extremely small screens */
    gap: 0.25rem;
  }

  .meta-label {
    font-size: 0.65rem;
  }

  .meta-value {
    font-size: 0.75rem;
  }

  .btn-play-experience {
    width: 100%; /* Touch-friendly full width button on mobile */
    justify-content: center;
  }
}

/* Container box for description */
.game-desc-box {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.05));
}

/* Allow text to stretch full width with line-clamp */
.my-game-desc {
  width: 100%;
  color: #8b949e;
  font-size: 0.875rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4; /* Allows up to 4 full-width lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================
   12. CARD HOVER VARIETY UTILITIES
   (used across books.html / hobbies.html / projects.html so
   every card group gets a distinctly different hover feel,
   mirroring the mixed hover styles already on index/roblox)
   ========================================================= */

/* --- Glow only: border + glow, icon pops, no lift (like hud-joined/status-panel) --- */
.glow-card {
  --tone: var(--cyan);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.glow-card:hover {
  border-color: var(--tone) !important;
  box-shadow: 0 0 16px var(--tone) !important;
}
.glow-card i { color: var(--tone); transition: transform 0.25s ease; }
.glow-card:hover i { transform: scale(1.18); }

/* --- Soft lift: subtle rise + border color shift, no glow (like repo-card) --- */
.soft-card {
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.soft-card:hover {
  transform: translateY(-3px);
  border-color: var(--soft-accent, var(--line-bright));
  background: rgba(255, 255, 255, 0.02);
}

/* --- Tint fill: background wash + accent border, no movement (like btn-play-experience) --- */
.tint-card {
  transition: background 0.3s ease, border-color 0.3s ease;
}
.tint-card:hover {
  background: var(--tint-bg, rgba(47, 229, 255, 0.08));
  border-color: var(--tone, var(--cyan)) !important;
}

/* --- Icon pop: icon rotates & scales on top of the panel's own lift+glow --- */
.pop-card i {
  transition: transform 0.35s var(--ease);
  display: inline-block;
}
.pop-card:hover i {
  transform: scale(1.22) rotate(-8deg);
}

/* --- 3D tilt: gentle perspective tilt + lift + glow (favorites / highlight cards) --- */
.tilt-card {
  transition: transform 0.35s var(--ease), border-color 0.3s ease, box-shadow 0.3s ease;
}
.tilt-card:hover {
  transform: perspective(700px) rotateX(3deg) rotateY(-3deg) translateY(-5px);
  border-color: var(--accent, var(--cyan)) !important;
  box-shadow: 0 16px 30px -14px var(--accent, var(--cyan));
}

/* --- Skill pill: small badge hover, fills with its own accent color --- */
.skill-pill {
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
  cursor: default;
}
.skill-pill:hover {
  background: var(--pill-tone, var(--cyan));
  color: var(--black) !important;
  transform: translateY(-2px);
}

 /* Consistent book-cover container */
  .book-cover {
    height: 320px;
    width: 100%;
    overflow: hidden;
    background-color: #212529;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Consistent image sizing */
  .book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }

  /* Consistent title area */
  .book-title {
    min-height: 48px;
    margin-bottom: 8px;
  }

  /* Consistent author area */
  .book-author {
    min-height: 24px;
    line-height: 1.4;
  }

  /* Consistent description area */
  .book-description {
    min-height: 72px;
    line-height: 1.5;
  }

  .badge-outline {
  background-color: transparent !important;
  color: white !important;
  border: 1px solid;
  transition: transform 0.2s ease;
}

.badge-outline:hover {
  transform: scale(1.1);
}

/* Individual outline colours */
.badge-blue {
  border-color: #0dcaf0;
}

.badge-yellow {
  border-color: #ffc107;
}

.badge-green {
  border-color: #198754;
}

.badge-purple {
  border-color: #6f42c1;
}

.badge-red {
  border-color: #dc3545;
}

.badge-cyan {
  border-color: #20c997;
}

.badge-white {
  border-color: #ffffff;
}

.roblox-badge-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  height: 100%;
  border: 1px solid #444;
  border-radius: 8px;
  background: transparent;
  color: white;
  transition: transform .2s ease, border-color .2s ease;
}

.roblox-badge-card:hover {
  transform: scale(1.05);
  border-color: #888;
}

.roblox-badge-icon {
  width: 45px;
  height: 45px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}

.roblox-badge-icon:hover {
  transform: scale(1.1);
}

.skill-bars{display:flex;flex-direction:column;gap:.85rem;padding:.5rem 0}.skill-bar-row{display:grid;grid-template-columns:1fr auto;align-items:center;row-gap:.25rem}.skill-bar-name{font-family:'JetBrains Mono',monospace;font-size:.85rem;color:#e8e8e8}.skill-bar-label{font-size:.75rem;color:#ff9d3d;text-transform:uppercase;letter-spacing:.05em}.skill-bar-track{grid-column:1/-1;height:6px;background:rgba(255,157,61,.12);border:1px solid rgba(255,157,61,.2);border-radius:3px;overflow:hidden;box-shadow:0 0 5px rgba(255,157,61,.15),inset 0 0 5px rgba(255,157,61,.1)}.skill-bar-fill{position:relative;height:100%;width:0;background:linear-gradient(90deg,#ff7a00,#ff9d3d,#ffd08a);border-radius:3px;box-shadow:0 0 4px #ff9d3d,0 0 10px rgba(255,157,61,.7),0 0 20px rgba(255,157,61,.35);transition:width .8s ease;overflow:hidden}.skill-bar-fill::after{content:"";position:absolute;top:0;left:-40%;width:40%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.9),rgba(255,220,150,1),transparent);filter:blur(1px);animation:skill-scan 2s linear infinite}.skill-bar-fill::before{content:"";position:absolute;top:-5px;left:-30%;width:30%;height:16px;background:rgba(255,180,90,.8);filter:blur(8px);animation:skill-glow 2s linear infinite}@keyframes skill-scan{0%{left:-40%}100%{left:110%}}@keyframes skill-glow{0%{left:-30%;opacity:0}15%{opacity:1}50%{opacity:.8}85%{opacity:1}100%{left:110%;opacity:0}}

/* Custom Scrollbar for Terminal */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(13, 17, 23, 0.5);
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--line, #21262d);
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--accent, #ff7a00);
}

/* =========================================================
   DEVELOPMENT PROFILE
   ========================================================= */

.dev-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

.dev-skill {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .015);
  transition: border-color .2s ease, transform .2s ease;
}

.dev-skill:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.dev-skill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--cyan);
  background: rgba(0, 220, 255, .08);
  font-size: .95rem;
}

.dev-skill-title {
  display: block;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
}

.dev-skill-desc {
  display: block;
  margin-top: .15rem;
  color: #8b949e;
  font-size: .65rem;
  line-height: 1.4;
}


/* =========================================================
   ROBLOX TIMELINE
   ========================================================= */

.roblox-timeline {
  position: relative;
  padding-left: 1.75rem;
}

.roblox-timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 10px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    var(--cyan),
    var(--violet),
    transparent
  );
}

.timeline-item {
  position: relative;
  display: flex;
  gap: .85rem;
  padding-bottom: 1.15rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -1.75rem;
  top: 0;
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 21px;
  height: 21px;

  border: 1px solid var(--cyan);
  border-radius: 50%;

  background: #0d1117;
  color: var(--cyan);

  font-size: .55rem;
}

.timeline-content {
  min-width: 0;
}

.timeline-year {
  display: inline-block;
  margin-bottom: .15rem;

  color: var(--cyan);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.timeline-content h6 {
  margin: 0;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
}

.timeline-content p {
  margin: .2rem 0 0;
  color: #8b949e;
  font-size: .65rem;
  line-height: 1.5;
}

.timeline-current .timeline-marker {
  box-shadow: 0 0 12px rgba(0, 220, 255, .35);
  background: rgba(0, 220, 255, .08);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 575.98px) {
  .dev-profile-grid {
    grid-template-columns: 1fr;
  }
}

.gallery-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem}
.gallery-item{display:flex;flex-direction:column;height:100%}
.gallery-image{width:100%;aspect-ratio:16/9;overflow:hidden;border:3px solid var(--line);background:#111;border-radius:4px;transition:.3s ease}
.gallery-image img{width:100%;height:100%;object-fit:contain;display:block;transition:transform .3s ease}
.gallery-item:hover .gallery-image img{transform:scale(1.01)}

.gallery-item:nth-child(1){--glow:#00f3ff}
.gallery-item:nth-child(2){--glow:#ffc107}
.gallery-item:nth-child(3){--glow:#5865F2}
.gallery-item:nth-child(4){--glow:#ff3344}
.gallery-item:hover .gallery-image{border-color:var(--glow);box-shadow:0 0 12px color-mix(in srgb,var(--glow) 50%,transparent),inset 0 0 6px color-mix(in srgb,var(--glow) 20%,transparent)}

.gallery-info{padding:.7rem 0 0;flex:1}
.gallery-info h6{margin:0 0 .35rem;font-size:.85rem;color:#4da6ff;text-transform:uppercase}
.gallery-info p{margin:0;font-size:.8rem;line-height:1.5;color:#fff}

@media(max-width:576px){.gallery-grid{grid-template-columns:1fr}}

.navbar-toggler {
  border-color: var(--cyan);
  box-shadow: none;
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%232fe5ff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(47, 229, 255, 0.35);
}

/* =========================================================
   13. GLOBAL SCROLLBAR — NEON HUD
   ========================================================= */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--cyan) var(--black);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--black);
  border-left: 1px solid var(--line);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan), var(--violet));
  border-radius: 999px;
  border: 2px solid var(--black);
  box-shadow: 0 0 6px var(--cyan), 0 0 14px rgba(47, 229, 255, 0.35);
  transition: box-shadow 0.25s var(--ease);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan), 0 0 22px rgba(47, 229, 255, 0.6);
}
::-webkit-scrollbar-corner {
  background: var(--black);
}
/* ---- Day/Month/Year passed mini-cards: hover glow matching their bar color ---- */
.passed-card {
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.passed-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent) !important;
  box-shadow: 0 10px 22px -12px var(--accent);
}
.passed-card--cyan   { --accent: var(--cyan); }
.passed-card--violet { --accent: var(--violet); }
.passed-card--amber  { --accent: var(--amber); }

/* --- HUD button: outline that fills with its accent + glow on hover --- */
.btn-hud {
  --btn-accent: var(--cyan);
  border: 1px solid var(--btn-accent);
  color: var(--btn-accent) !important;
  background: transparent;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn-hud:hover {
  background: var(--btn-accent);
  color: var(--black) !important;
  box-shadow: 0 0 14px var(--btn-accent);
  transform: translateY(-2px);
}

/* =========================================================
   8. FOOTER
   ========================================================= */
.site-footer {
  position: relative;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  text-align: center;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent);
  opacity: 0.6;
}
.social-links { margin-bottom: 0.75rem; }
.social-links a {
  --icon-accent: var(--cyan);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 0.4rem;
  color: var(--gray-2);
  font-size: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.social-links a:hover {
  color: var(--icon-accent);
  border-color: var(--icon-accent);
  box-shadow: 0 0 12px var(--icon-accent);
  transform: translateY(-2px);
}
.footer-copy {
  color: var(--gray-2);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  font-family: var(--font);
  margin: 0;
}