/* ==========================================================================
   SHREYAS — COSMIC DEVELOPER & CHESS BIO PAGE (v2.7)
   Design System: Syne (Bold Display) + DM Sans (Clean Sans) + JetBrains Mono
   Aesthetic: Cyber Space Glassmorphism, Deep Obsidian & Radiant Nebula Glows
   ========================================================================== */

:root {
  /* Dark Cosmic Theme (Default) */
  --bg-space: #04040E;
  --bg-card: rgba(14, 14, 28, 0.7);
  --bg-card-hover: rgba(22, 22, 44, 0.9);
  --border-space: rgba(124, 109, 250, 0.18);
  --border-glow: rgba(192, 132, 252, 0.45);

  --text-main: #F1F1F8;
  --text-dim: #9090B8;
  --text-muted: #585888;

  --accent-violet: #7C6DFA;
  --accent-purple: #C084FC;
  --accent-cyan: #38BDF8;
  --accent-gold: #F59E0B;
  --accent-green: #43B581;
  --accent-red: #F04747;

  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 35px -5px rgba(124, 109, 250, 0.25);

  --transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background-color: var(--bg-space);
  color: var(--text-main);
  font-family: var(--font-body), sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition), color var(--transition);
}

/* ==========================================================================
   COSMIC CANVAS & NEBULA LIGHTING
   ========================================================================== */

#starfield {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

.nebula-glow-1 {
  position: fixed;
  top: -100px;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124, 109, 250, 0.16) 0%, rgba(192, 132, 252, 0.08) 45%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: floatNebula1 16s ease-in-out infinite alternate;
}

.nebula-glow-2 {
  position: fixed;
  bottom: 50px;
  right: -50px;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, rgba(124, 109, 250, 0.06) 50%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  animation: floatNebula2 20s ease-in-out infinite alternate;
}

.cosmic-grid {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

@keyframes floatNebula1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 30px) scale(1.15); }
}

@keyframes floatNebula2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-30px, -40px) scale(1.1); }
}

/* ==========================================================================
   LAYOUT CONTAINER
   ========================================================================== */

.page-shell {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  padding: 24px 18px 60px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ==========================================================================
   TOP NAVIGATION
   ========================================================================== */

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2px;
}

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-space);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  box-shadow: var(--shadow-subtle);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(67, 181, 129, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(67, 181, 129, 0.7); }
  70% { box-shadow: 0 0 0 7px rgba(67, 181, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(67, 181, 129, 0); }
}

.nav-controls {
  display: flex;
  gap: 8px;
}

.control-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-space);
  border-radius: 50%;
  color: var(--text-main);
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition);
}

.terminal-btn:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
  box-shadow: 0 0 14px rgba(67, 181, 129, 0.4);
}

.control-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-purple);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(192, 132, 252, 0.25);
}

.control-btn svg {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   REACTBITS SPOTLIGHT CARD
   ========================================================================== */

.spotlight-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-space);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.spotlight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: radial-gradient(
    550px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(192, 132, 252, 0.15),
    transparent 40%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 12px 36px -6px rgba(0, 0, 0, 0.5), var(--shadow-glow);
}

/* ==========================================================================
   HERO IDENTITY CARD
   ========================================================================== */

.hero-card {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.avatar-container {
  position: relative;
  width: 76px;
  height: 76px;
}

.avatar-ring {
  width: 100%;
  height: 100%;
  padding: 2px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-purple), var(--accent-cyan));
  box-shadow: 0 0 20px rgba(124, 109, 250, 0.35);
}

.hero-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--bg-space);
  background: #111124;
}

.status-indicator {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid #080816;
  background: #747F8D;
  transition: all 0.3s ease;
  z-index: 2;
}

.status-indicator.online {
  background: #43B581;
  box-shadow: 0 0 12px #43B581, 0 0 4px #43B581;
  animation: statusPulseGreen 2.2s infinite;
}

.status-indicator.idle {
  background: #FAA61A;
  box-shadow: 0 0 12px #FAA61A;
}

.status-indicator.dnd {
  background: #F04747;
  box-shadow: 0 0 12px #F04747;
}

.status-indicator.spotify {
  background: #1DB954;
  box-shadow: 0 0 14px #1DB954;
  animation: statusPulseSpotify 1.8s infinite;
}

.status-indicator.offline {
  background: #747F8D;
}

@keyframes statusPulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(67, 181, 129, 0.7), 0 0 8px rgba(67, 181, 129, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(67, 181, 129, 0), 0 0 12px rgba(67, 181, 129, 0.3); }
  100% { box-shadow: 0 0 0 0 rgba(67, 181, 129, 0), 0 0 8px rgba(67, 181, 129, 0.5); }
}

@keyframes statusPulseSpotify {
  0% { box-shadow: 0 0 0 0 rgba(29, 185, 84, 0.7), 0 0 10px rgba(29, 185, 84, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(29, 185, 84, 0), 0 0 14px rgba(29, 185, 84, 0.3); }
  100% { box-shadow: 0 0 0 0 rgba(29, 185, 84, 0), 0 0 10px rgba(29, 185, 84, 0.5); }
}

.hero-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.accent-chip {
  background: rgba(124, 109, 250, 0.15);
  border: 1px solid rgba(124, 109, 250, 0.3);
  color: var(--accent-purple);
}

.chess-chip {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--accent-gold);
}

.hero-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-cyan);
}

.alias-hint {
  padding: 1px 6px;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 4px;
  font-size: 0.68rem;
  color: var(--text-dim);
}

.ws-telemetry-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  background: rgba(67, 181, 129, 0.12);
  border: 1px solid rgba(67, 181, 129, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  color: var(--accent-green);
  font-weight: 600;
  margin-left: auto;
}

.ecg-line {
  width: 28px;
  height: 10px;
  color: var(--accent-green);
  animation: pulseEcg 1.8s ease-in-out infinite;
}

@keyframes pulseEcg {
  0%, 100% { opacity: 0.5; transform: scaleX(1); }
  50% { opacity: 1; transform: scaleX(1.15); }
}

.hero-name {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
}

@keyframes glitch{0%,88%,100%{text-shadow:none;}89%{text-shadow:-3px 0 #f04747,3px 0 #43b581;}90%{text-shadow:2px 0 var(--accent-violet);}91%{text-shadow:none;}92%{text-shadow:-2px 0 var(--accent-purple);}93%{text-shadow:none;}}
.glitch{animation:glitch 7s infinite;}

.hero-tagline {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.4;
  margin-top: 2px;
}

.hero-bio {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-top: 4px;
}

.age-highlight {
  color: var(--accent-purple);
  font-weight: 700;
}

/* ==========================================================================
   LIVE ACTIVITY STACK (Discord + Last.fm)
   ========================================================================== */

.live-activity-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.live-activity-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-space);
  border-radius: var(--radius-md);
  transition: border-color var(--transition);
}

.activity-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.discord-wrap {
  background: rgba(124, 109, 250, 0.15);
  color: var(--accent-violet);
}

.lastfm-wrap {
  background: #ba121a;
  color: #ffffff;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lastfm-art-img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}

.lastfm-svg {
  width: 18px;
  height: 18px;
}

.lastfm-bar.playing {
  border-color: rgba(186, 18, 26, 0.5);
  box-shadow: 0 0 18px rgba(186, 18, 26, 0.2);
}

.activity-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex-grow: 1;
}

.lastfm-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.activity-label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}

.activity-value {
  font-size: 0.84rem;
  color: var(--text-main);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Last.fm Scrobbler EQ Bars */
.lastfm-eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.lastfm-eq span {
  width: 3px;
  background: #ba121a;
  border-radius: 2px;
  animation: eqBounce 1s ease-in-out infinite;
}

.lastfm-eq span:nth-child(1) { height: 40%; animation-delay: 0s; }
.lastfm-eq span:nth-child(2) { height: 85%; animation-delay: 0.15s; }
.lastfm-eq span:nth-child(3) { height: 55%; animation-delay: 0.3s; }
.lastfm-eq span:nth-child(4) { height: 75%; animation-delay: 0.08s; }

@keyframes eqBounce {
  0%, 100% { transform: scaleY(0.8); }
  50% { transform: scaleY(2); }
}

/* ==========================================================================
   QUICK LINKS GRID
   ========================================================================== */

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  text-decoration: none;
  color: var(--text-main);
  border-radius: var(--radius-md);
}

.card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  transition: transform var(--transition);
}

.auth-icon {
  width: 22px;
  height: 22px;
}

.github-icon { background: #24292e; }
.discord-icon { background: #5865F2; }
.insta-icon { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.spotify-icon { background: #1DB954; }

.card-text {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
}

.card-desc {
  font-size: 0.74rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-arrow {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--transition), color var(--transition);
}

.link-card:hover { transform: translateY(-2px); }
.link-card:hover .card-icon { transform: scale(1.08); }
.link-card:hover .card-arrow { color: var(--accent-purple); transform: translate(2px, -2px); }

/* ==========================================================================
   BENTO GRID & AUTHENTIC TECH VECTOR CARDS
   ========================================================================== */

.bento-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bento-item {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.bento-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tech-color { background: rgba(124, 109, 250, 0.15); border: 1px solid rgba(124, 109, 250, 0.3); }
.chess-color { background: rgba(245, 158, 11, 0.15); color: var(--accent-gold); border: 1px solid rgba(245, 158, 11, 0.3); }
.astro-color { background: rgba(56, 189, 248, 0.15); border: 1px solid rgba(56, 189, 248, 0.3); }
.like-color { background: rgba(67, 181, 129, 0.15); border: 1px solid rgba(67, 181, 129, 0.3); }
.music-color { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); border: 1px solid rgba(239, 68, 68, 0.3); }

.bento-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.bento-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Authentic Tech Vectors Grid */
.tech-custom-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.tech-custom-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-space);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  cursor: default;
  text-align: center;
}

.tech-custom-card:hover {
  background: rgba(124, 109, 250, 0.1);
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(124, 109, 250, 0.2);
}

.tech-svg {
  width: 28px;
  height: 28px;
}

.tech-custom-card span {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tech-custom-card:hover span {
  color: #ffffff;
}

/* ==========================================================================
   CHESS AI ROBOT ARENA STYLES
   ========================================================================== */

.chess-bot-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-space);
  border-radius: var(--radius-md);
}

.bot-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bot-avatar-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bot-svg-icon {
  width: 20px;
  height: 20px;
  stroke: var(--accent-gold);
}

.bot-pulse {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  transition: background-color 0.3s ease;
}

.bot-pulse.thinking {
  background: var(--accent-gold);
  box-shadow: 0 0 10px var(--accent-gold);
  animation: pulseGold 0.8s infinite alternate;
}

@keyframes pulseGold {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.4); opacity: 1; }
}

.bot-info {
  display: flex;
  flex-direction: column;
}

.bot-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

.bot-name small {
  color: var(--accent-gold);
  font-weight: 600;
  font-size: 0.72rem;
}

.bot-status {
  font-size: 0.74rem;
  color: var(--text-dim);
}

.chess-diff-select {
  background: rgba(14, 14, 28, 0.9);
  border: 1px solid var(--border-space);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}

.chess-diff-select:focus {
  border-color: var(--accent-gold);
}

/* Captured Pieces */
.captured-pieces-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  font-size: 0.85rem;
  min-height: 24px;
}

.captured-tray {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  min-height: 18px;
  color: var(--text-dim);
}

.advantage-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-gold);
  padding: 1px 6px;
  background: rgba(245, 158, 11, 0.1);
  border-radius: var(--radius-full);
}

/* 8x8 Chessboard */
/* 8x8 Chessboard (Rock-Solid CSS Grid) */
.playable-chess-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

.mini-chessboard {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid rgba(124, 109, 250, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1/1;
  margin: 0 auto;
  user-select: none;
  background: #080814;
}

.sq {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.3rem, 4.4vw, 1.85rem);
  line-height: 1;
  user-select: none;
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s ease;
}

.sq.dark { background: rgba(124, 109, 250, 0.28); color: #F1F1F8; }
.sq.light { background: rgba(255, 255, 255, 0.08); color: #F1F1F8; }

.sq.selected {
  background: rgba(245, 158, 11, 0.6) !important;
  color: #000000 !important;
}

.sq.last-move {
  background: rgba(124, 109, 250, 0.45) !important;
}

.sq.valid-move::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(67, 181, 129, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(67, 181, 129, 0.9);
  pointer-events: none;
}

.sq.valid-capture::after {
  content: '';
  position: absolute;
  inset: 2px;
  border: 2px solid rgba(240, 71, 71, 0.85);
  border-radius: var(--radius-sm);
  pointer-events: none;
}

.sq.hint-from {
  background: rgba(56, 189, 248, 0.5) !important;
  box-shadow: inset 0 0 10px var(--accent-cyan);
  animation: pulseCyan 1.2s infinite alternate;
}

.sq.hint-to {
  background: rgba(245, 158, 11, 0.5) !important;
  box-shadow: inset 0 0 10px var(--accent-gold);
  animation: pulseGold 1.2s infinite alternate;
}

@keyframes pulseCyan {
  0% { opacity: 0.7; }
  100% { opacity: 1; filter: brightness(1.3); }
}

.sq.in-check {
  background: rgba(240, 71, 71, 0.6) !important;
  animation: flashRed 1s infinite alternate;
}

@keyframes flashRed {
  0% { opacity: 0.8; }
  100% { opacity: 1; box-shadow: inset 0 0 12px #f04747; }
}

.sq:hover {
  filter: brightness(1.2);
}

/* Controls Row */
.chess-controls-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.chess-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 4px;
}

.chess-quote {
  font-style: italic;
  color: var(--text-dim);
  font-size: 0.78rem;
}

.chess-action-btn {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--accent-gold);
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all var(--transition);
}

.chess-action-btn:hover {
  background: var(--accent-gold);
  color: #000000;
  transform: translateY(-1px);
}

.chess-action-btn.hint-btn {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
  color: var(--accent-cyan);
}

.chess-action-btn.hint-btn:hover {
  background: var(--accent-cyan);
  color: #000000;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.chess-action-btn.alt-btn {
  background: rgba(124, 109, 250, 0.12);
  border-color: rgba(124, 109, 250, 0.3);
  color: var(--accent-purple);
}

.chess-action-btn.alt-btn:hover {
  background: var(--accent-purple);
  color: #ffffff;
}

/* ==========================================================================
   ASTRONOMY & AUTHENTIC BLACK HOLE ARTWORK
   ========================================================================== */

.astro-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.astro-snippet {
  padding: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-space);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.astro-snippet-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.astro-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  opacity: 0.9;
}

.astro-icon-sm {
  width: 24px;
  height: 24px;
}

.astro-snippet strong {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--accent-purple);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.astro-snippet p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* Black Hole Presentation Frame */
.blackhole-frame {
  margin-top: 6px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(124, 109, 250, 0.3);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(124, 109, 250, 0.2);
  background: #04040E;
  position: relative;
}

.blackhole-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.blackhole-frame:hover .blackhole-img {
  transform: scale(1.03);
}

.blackhole-caption {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(4, 4, 14, 0.85);
  border-top: 1px solid var(--border-space);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
}

.blackhole-caption svg {
  width: 14px;
  height: 14px;
}



.game-color { background: rgba(192, 132, 252, 0.15); color: var(--accent-purple); border: 1px solid rgba(192, 132, 252, 0.3); }

/* ==========================================================================
   3D MINECRAFT AVATAR (skinview3d)
   ========================================================================== */

/* 3D Viewport Stage */
.char3d-viewport {
  position: relative;
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 900px;
  background: radial-gradient(circle at 50% 70%, rgba(124, 109, 250, 0.12) 0%, rgba(4, 4, 14, 0.6) 70%);
  border: 1px solid var(--border-space);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: grab;
  user-select: none;
}

.char3d-viewport:active {
  cursor: grabbing;
}

.holo-grid-plane {
  position: absolute;
  bottom: 0;
  width: 220px;
  height: 80px;
  background-image: linear-gradient(rgba(124, 109, 250, 0.15) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(124, 109, 250, 0.15) 1px, transparent 1px);
  background-size: 16px 16px;
  transform: rotateX(65deg);
  border-radius: 50%;
  filter: blur(0.5px);
  pointer-events: none;
}

.holo-pedestal-ring {
  position: absolute;
  bottom: 25px;
  width: 140px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(192, 132, 252, 0.5);
  box-shadow: 0 0 16px rgba(124, 109, 250, 0.4), inset 0 0 12px rgba(192, 132, 252, 0.3);
  pointer-events: none;
  animation: pulseHoloRing 3s ease-in-out infinite alternate;
}

@keyframes pulseHoloRing {
  0% { transform: scale(0.96); opacity: 0.6; }
  100% { transform: scale(1.04); opacity: 1; filter: drop-shadow(0 0 8px #c084fc); }
}

.char3d-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  z-index: 3;
  position: relative;
  touch-action: none;
}

/* 3D Floating Control Pill */
.char3d-controls-pill {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
  z-index: 10;
  background: rgba(10, 10, 22, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-space);
  padding: 4px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  color: var(--text-dim);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.pill-btn svg {
  width: 12px;
  height: 12px;
}

.pill-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.pill-btn.active {
  background: linear-gradient(135deg, #7c6dfa, #c084fc);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(124, 109, 250, 0.4);
}

/* Character Meta Footer */
.char-meta-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-space);
  border-radius: var(--radius-md);
}

.char-meta-info {
  display: flex;
  flex-direction: column;
}

.char-main-tag {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

.char-sub-tag {
  font-size: 0.74rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.char-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: rgba(124, 109, 250, 0.12);
  border: 1px solid rgba(124, 109, 250, 0.3);
  border-radius: var(--radius-sm);
  color: var(--accent-purple);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition);
}

.char-profile-link:hover {
  background: var(--accent-purple);
  color: #ffffff;
  transform: translateY(-1px);
}

.char-profile-link svg {
  width: 14px;
  height: 14px;
}

.github-color { background: rgba(192, 132, 252, 0.15); color: var(--accent-purple); border: 1px solid rgba(192, 132, 252, 0.3); }

/* ==========================================================================
   OPEN SOURCE & ACTIVE REPOSITORIES
   ========================================================================== */

.github-repo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.repo-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-space);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
}

.repo-card:hover {
  background: rgba(124, 109, 250, 0.08);
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 109, 250, 0.2);
}

.repo-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.repo-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.repo-icon {
  width: 16px;
  height: 16px;
  color: var(--accent-purple);
  flex-shrink: 0;
}

.repo-name {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.repo-visibility {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
}

.repo-desc {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-dim);
  margin: 0;
}

.repo-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.repo-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-weight: 600;
}

.lang-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.js-dot { background: #f1e05a; box-shadow: 0 0 6px rgba(241, 224, 90, 0.6); }
.rust-dot { background: #dea584; box-shadow: 0 0 6px rgba(222, 165, 132, 0.6); }
.py-dot { background: #3572A5; box-shadow: 0 0 6px rgba(53, 114, 165, 0.6); }
.cpp-dot { background: #f34b7d; box-shadow: 0 0 6px rgba(243, 75, 125, 0.6); }

.repo-stars, .repo-forks {
  display: flex;
  align-items: center;
  gap: 4px;
}

.repo-stars svg, .repo-forks svg {
  width: 12px;
  height: 12px;
}

.repo-footer-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.github-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(124, 109, 250, 0.1);
  border: 1px solid rgba(124, 109, 250, 0.3);
  border-radius: var(--radius-full);
  color: var(--accent-purple);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition);
}

.github-profile-pill:hover {
  background: var(--accent-purple);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(192, 132, 252, 0.3);
}

.github-profile-pill svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   LIKES & DISLIKES SECTION
   ========================================================================== */

.interests-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.interests-col {
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-space);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.interests-col h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.likes-col h4 { color: var(--accent-green); }
.dislikes-col h4 { color: var(--accent-red); }

.col-icon {
  width: 16px;
  height: 16px;
}

.interest-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.interest-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.like-dot { background: var(--accent-green); box-shadow: 0 0 6px rgba(67, 181, 129, 0.6); }
.dislike-dot { background: var(--accent-red); box-shadow: 0 0 6px rgba(240, 71, 71, 0.6); }

.hardware-color { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }

/* ==========================================================================
   HARDWARE EVOLUTION & FLEET SECTION
   ========================================================================== */

.hardware-fleet-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hw-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-space);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  transition: all var(--transition);
  position: relative;
}

.hw-card-layout {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hw-thumb-container {
  width: 110px;
  height: 82px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: #060710;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hw-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  transition: transform var(--transition);
}

.hw-card:hover .hw-thumb-img {
  transform: scale(1.05);
}

.hw-card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.hw-card:hover {
  background: rgba(124, 109, 250, 0.06);
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Greyed-out retired / handed-down legacy states */
.hw-card.is-retired,
.hw-card.is-legacy {
  opacity: 0.55;
  filter: grayscale(0.85);
  background: rgba(255, 255, 255, 0.012);
  border-color: rgba(255, 255, 255, 0.07);
}

.hw-card.is-retired:hover,
.hw-card.is-legacy:hover {
  opacity: 0.9;
  filter: grayscale(0.15);
}

/* Active & Flagship states */
.hw-card.is-active {
  border-color: rgba(124, 109, 250, 0.35);
}

.hw-card.is-driver {
  border-color: rgba(192, 132, 252, 0.45);
  box-shadow: 0 0 20px -5px rgba(192, 132, 252, 0.15);
}

.hw-card.is-flagship {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(74, 222, 128, 0.06));
  border-color: rgba(74, 222, 128, 0.4);
  box-shadow: 0 0 25px -4px rgba(74, 222, 128, 0.18);
}

.hw-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.hw-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hw-badge-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-purple);
  background: rgba(124, 109, 250, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.hw-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.hw-status-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-full);
}

.status-retired {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-legacy {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.status-active {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.status-driver {
  background: rgba(192, 132, 252, 0.15);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.4);
}

.status-flagship {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.4);
}

.hw-chassis {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: -2px;
}

.hw-spec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0;
}

.hw-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-space);
  color: var(--text-dim);
}

.hw-tag svg {
  width: 12px;
  height: 12px;
  color: var(--accent-purple);
}

.hw-tag.highlight-tag {
  border-color: rgba(192, 132, 252, 0.3);
  color: #ffffff;
  background: rgba(192, 132, 252, 0.08);
}

.hw-tag.flagship-tag {
  border-color: rgba(74, 222, 128, 0.3);
  color: #ffffff;
  background: rgba(74, 222, 128, 0.08);
}

.hw-tag.flagship-gpu-tag {
  border-color: rgba(74, 222, 128, 0.5);
  color: #4ade80;
  font-weight: 700;
  background: rgba(74, 222, 128, 0.12);
}

.hw-tag.os-tag {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
}

.hw-tag.mac-tag {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.hw-memories {
  font-size: 0.78rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   AUDIO SYNTH SECTION
   ========================================================================== */

.eq-visualizer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 32px;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 12px;
  border-radius: var(--radius-md);
}

.bar {
  width: 4px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: height 0.2s ease, background-color 0.3s ease;
}

.audio-bento.playing .bar {
  background: var(--accent-violet);
  animation: bounceBar 0.75s ease-in-out infinite alternate;
}

.audio-bento.playing .bar:nth-child(2) { animation-delay: 0.1s; }
.audio-bento.playing .bar:nth-child(3) { animation-delay: 0.25s; }
.audio-bento.playing .bar:nth-child(4) { animation-delay: 0.4s; }
.audio-bento.playing .bar:nth-child(5) { animation-delay: 0.15s; }
.audio-bento.playing .bar:nth-child(6) { animation-delay: 0.3s; }
.audio-bento.playing .bar:nth-child(7) { animation-delay: 0.5s; }
.audio-bento.playing .bar:nth-child(8) { animation-delay: 0.2s; }

@keyframes bounceBar {
  0% { height: 5px; }
  100% { height: 26px; }
}

.audio-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-synth {
  background: rgba(124, 109, 250, 0.15);
  border: 1px solid rgba(124, 109, 250, 0.4);
  color: var(--accent-violet);
}

.btn-synth:hover {
  background: var(--accent-violet);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(124, 109, 250, 0.4);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-purple));
  color: #fff;
  box-shadow: 0 4px 16px rgba(124, 109, 250, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 109, 250, 0.45);
}

.btn-full { width: 100%; }

.synth-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.page-footer {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.footer-logo svg {
  width: 16px;
  height: 16px;
  color: var(--accent-purple);
}

.footer-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color var(--transition);
}

.footer-btn:hover { color: var(--accent-purple); }

/* ==========================================================================
   INTERACTIVE WEB TERMINAL CLI MODAL
   ========================================================================== */

.terminal-card {
  max-width: 860px;
  width: 92vw;
  background: #05060f;
  border: 1px solid rgba(124, 109, 250, 0.45);
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.9), 0 0 45px rgba(124, 109, 250, 0.25);
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border-space);
}

.term-dots { display: flex; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; cursor: pointer; transition: opacity var(--transition); }
.dot:hover { opacity: 0.8; }
.dot.red { background: #FF5F56; }
.dot.yellow { background: #FFBD2E; }
.dot.green { background: #27C93F; }

.term-title { font-family: var(--font-mono); font-size: 0.82rem; color: #cbd5e1; font-weight: 600; }
.term-esc-hint { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dim); }

.terminal-screen {
  padding: 20px 24px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.94rem;
  line-height: 1.65;
  color: #f1f5f9;
  height: 480px;
  max-height: 65vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 109, 250, 0.4) transparent;
}

.terminal-screen::-webkit-scrollbar {
  width: 7px;
}
.terminal-screen::-webkit-scrollbar-track {
  background: transparent;
}
.terminal-screen::-webkit-scrollbar-thumb {
  background: rgba(124, 109, 250, 0.4);
  border-radius: 4px;
}

.term-welcome { color: #4ade80; font-weight: 700; font-size: 0.98rem; }
.term-dim { color: #94a3b8; }
.term-cmd {
  color: var(--accent-cyan);
  font-weight: 700;
  background: rgba(56, 189, 248, 0.14);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.92rem;
}
.term-res { color: #f8fafc; margin-bottom: 8px; font-size: 0.93rem; }
.term-err { color: #f87171; font-weight: 600; }
.term-hl { color: #facc15; font-weight: 700; }
.term-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(124, 109, 250, 0.22);
  color: #c084fc;
  margin-right: 6px;
}

.term-ascii {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: #c084fc;
  line-height: 1.22;
  white-space: pre;
  overflow-x: auto;
  margin: 6px 0;
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.4);
}

.term-table {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 6px 14px;
  margin: 8px 0;
  font-size: 0.88rem;
  line-height: 1.55;
}

.term-table-key { color: #94a3b8; }
.term-table-val { color: #ffffff; }

.term-link {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}
.term-link:hover { color: #c084fc; }

.terminal-input-row {
  display: flex;
  align-items: center;
  padding: 14px 22px;
  background: rgba(0, 0, 0, 0.6);
  border-top: 1px solid var(--border-space);
}

.term-prompt-sym {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92rem;
  color: #4ade80;
  font-weight: 700;
  flex-shrink: 0;
  margin-right: 10px;
}

.term-cli-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  outline: none;
}

/* ==========================================================================
   MODAL & TOAST
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 3, 10, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-backdrop.active { opacity: 1; pointer-events: auto; }

.modal-card {
  width: 100%;
  max-width: 360px;
  background: #0D0E1C;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  transform: translateY(20px) scale(0.96);
  transition: transform var(--transition);
}

.modal-backdrop.active .modal-card { transform: translateY(0) scale(1); }

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
}

.modal-close-btn:hover { color: var(--text-main); }

.modal-icon-header {
  width: 44px;
  height: 44px;
  background: rgba(124, 109, 250, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-purple);
  margin: 0 auto 12px auto;
}

.modal-card h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.modal-card p { font-size: 0.82rem; color: var(--text-dim); margin-top: 4px; }

.qr-container {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: #fff;
  border-radius: var(--radius-md);
  margin: 16px 0;
}

.toast-popup {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #121324;
  border: 1px solid var(--accent-purple);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
}

.toast-popup.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast-check { width: 16px; height: 16px; color: var(--accent-green); }

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (Mobile & Tablet)
   ========================================================================== */

@media (max-width: 600px) {
  .page-shell {
    padding: 14px 10px 48px 10px;
    gap: 14px;
  }
  .hero-card {
    padding: 20px 16px;
    gap: 14px;
  }
  .hero-name {
    font-size: 2.2rem;
  }
  .bento-item {
    padding: 18px 14px;
    gap: 12px;
  }
  .quick-links-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .tech-custom-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .interests-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .github-repo-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .hw-card-layout {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .hw-thumb-container {
    width: 100%;
    height: 110px;
  }
  .mini-chessboard {
    max-width: min(320px, 88vw);
  }
  .sq {
    font-size: clamp(1.2rem, 6.5vw, 1.6rem);
  }
  .chess-controls-row {
    gap: 6px;
  }
  .chess-action-btn {
    padding: 6px 10px;
    font-size: 0.74rem;
  }
  .chess-bot-status-row {
    padding: 8px 10px;
  }
  .terminal-screen {
    padding: 14px 16px;
    height: 420px;
    font-size: 0.88rem;
  }
  .term-table {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .term-table-key {
    color: var(--accent-cyan);
    font-weight: 600;
  }
}

@media (max-width: 380px) {
  .hero-name {
    font-size: 1.95rem;
  }
  .mini-chessboard {
    max-width: min(290px, 88vw);
  }
  .chess-controls-row button span,
  .chess-controls-row button {
    font-size: 0.7rem;
    padding: 5px 8px;
  }
}

/* ==========================================================================
   PC & DESKTOP ENHANCED EXPANSIVE STYLING (min-width: 860px & 1100px)
   ========================================================================== */

@media (min-width: 860px) {
  .page-shell {
    max-width: 940px;
    padding: 36px 28px 72px 28px;
    gap: 22px;
  }

  .hero-card {
    padding: 34px 40px;
    gap: 20px;
    border-radius: var(--radius-xl);
  }

  .avatar-container {
    width: 92px;
    height: 92px;
  }

  .hero-name {
    font-size: 3.1rem;
    letter-spacing: -0.04em;
  }

  .hero-bio {
    font-size: 1.04rem;
    line-height: 1.7;
  }

  .tag-chip {
    padding: 6px 14px;
    font-size: 0.78rem;
  }

  .activity-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .activity-label {
    font-size: 0.72rem;
  }

  .activity-value {
    font-size: 0.92rem;
  }

  .bento-grid {
    gap: 22px;
  }

  .bento-item {
    padding: 30px 36px;
    gap: 18px;
    border-radius: var(--radius-xl);
  }

  .bento-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .bento-icon svg {
    width: 22px;
    height: 22px;
  }

  .bento-title {
    font-size: 1.32rem;
  }

  .bento-sub {
    font-size: 0.86rem;
  }

  .tech-custom-grid {
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
  }

  .tech-custom-card {
    padding: 18px 8px;
    gap: 12px;
  }

  .tech-svg {
    width: 32px;
    height: 32px;
  }

  .tech-custom-card span {
    font-size: 0.76rem;
  }

  .mini-chessboard {
    max-width: 450px;
  }

  .sq {
    font-size: 2.25rem;
    min-height: 46px;
  }

  .chess-bot-status-row {
    padding: 12px 18px;
  }

  .char3d-viewport {
    height: 380px;
  }

  .holo-grid-plane {
    width: 320px;
    height: 110px;
  }

  .holo-pedestal-ring {
    width: 190px;
    height: 36px;
  }

  .pill-btn {
    padding: 6px 14px;
    font-size: 0.78rem;
  }

  .astro-viewer {
    height: 380px;
  }

  .interests-grid {
    gap: 18px;
  }

  .interests-col {
    padding: 22px 24px;
  }

  .interests-col li {
    font-size: 0.94rem;
    padding: 8px 0;
  }

  .quick-links-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .link-card {
    padding: 18px 22px;
    border-radius: var(--radius-md);
  }

  .card-icon {
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
  }

  .card-title {
    font-size: 1.02rem;
  }

  .card-subtitle {
    font-size: 0.85rem;
  }
}

@media (min-width: 1100px) {
  .page-shell {
    max-width: 1040px;
    padding: 44px 32px 84px 32px;
    gap: 26px;
  }

  .hero-card {
    padding: 38px 44px;
  }

  .avatar-container {
    width: 100px;
    height: 100px;
  }

  .hero-name {
    font-size: 3.4rem;
  }

  .bento-item {
    padding: 34px 42px;
    gap: 22px;
  }

  .bento-title {
    font-size: 1.4rem;
  }

  .mini-chessboard {
    max-width: 490px;
  }

  .sq {
    font-size: 2.5rem;
    min-height: 52px;
  }

  .char3d-viewport {
    height: 420px;
  }

  .astro-viewer {
    height: 420px;
  }
}
