:root{
  --bg:#050816;
  --bg-secondary:#0f172a;
  --card:rgba(17,24,39,0.82);
  --card-border:rgba(255,255,255,0.08);
  --text:#f8fafc;
  --muted:#94a3b8;
  --primary:#7c3aed;
  --secondary:#06b6d4;
  --success:#22c55e;
  --danger:#ef4444;
  --shadow:0 20px 60px rgba(0,0,0,0.45);
  --radius-xl:28px;
  --radius-lg:22px;
  --radius-md:18px;
}

[data-theme="light"]{
  --bg:#f5f7fb;
  --bg-secondary:#ffffff;
  --card:rgba(255,255,255,0.88);
  --card-border:rgba(15,23,42,0.08);
  --text:#0f172a;
  --muted:#475569;
  --shadow:0 20px 40px rgba(15,23,42,0.08);
}

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

html{
  scroll-behavior:smooth;
}

body{
  font-family:"Inter",sans-serif;
  background:var(--bg);
  color:var(--text);
  overflow-x:hidden;
  min-height:100vh;
  position:relative;
}

/* =========================================================
   AURORA
========================================================= */

.aurora-bg{
  position:fixed;
  inset:0;
  overflow:hidden;
  z-index:-1;
}

.aurora-bg span{
  position:absolute;
  border-radius:50%;
  filter:blur(120px);
  opacity:.35;
}

.aurora-bg span:nth-child(1){
  width:420px;
  height:420px;
  background:#7c3aed;
  top:-120px;
  left:-100px;
}

.aurora-bg span:nth-child(2){
  width:380px;
  height:380px;
  background:#06b6d4;
  bottom:-120px;
  right:-100px;
}

.aurora-bg span:nth-child(3){
  width:300px;
  height:300px;
  background:#2563eb;
  top:40%;
  left:45%;
}

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

.app-container{
  width:min(1600px,95%);
  margin:auto;
  padding:40px 0 80px;
}

/* =========================================================
   HEADER
========================================================= */

.dashboard-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:40px;
}

.brand-group h1{
  font-size:clamp(2.5rem,5vw,4.2rem);
  font-weight:800;
  line-height:1;
  margin-bottom:16px;

  background:
    linear-gradient(
      90deg,
      #ffffff,
      #93c5fd
    );

  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.subtitle{
  max-width:720px;
  color:var(--muted);
  line-height:1.8;
  font-size:1rem;
}

.theme-toggle-btn{
  width:58px;
  height:58px;
  border-radius:18px;
  border:1px solid var(--card-border);
  background:var(--card);
  color:var(--text);
  cursor:pointer;
  backdrop-filter:blur(18px);
  transition:.3s ease;
}

.theme-toggle-btn:hover{
  transform:translateY(-2px);
}

/* =========================================================
   SEARCH
========================================================= */

.search-workspace{
  background:
    linear-gradient(
      135deg,
      rgba(124,58,237,0.18),
      rgba(15,23,42,0.96)
    );

  border:1px solid var(--card-border);

  border-radius:32px;

  padding:30px;

  backdrop-filter:blur(24px);

  box-shadow:var(--shadow);

  margin-bottom:34px;
}

.modern-search-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) 220px;
  gap:20px;
  align-items:center;
}

.compare-form-layout{
  margin-top:20px;
}

.compare-inputs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.search-input-container{
  position:relative;
  width:100%;
}

.search-input-container input,
.compare-inputs input{
  width:100%;
  height:68px;

  border-radius:20px;

  border:1px solid rgba(255,255,255,0.08);

  background:rgba(255,255,255,0.04);

  color:var(--text);

  font-size:1rem;
  font-weight:500;

  padding:0 22px 0 58px;

  outline:none;

  transition:.3s ease;
}

.compare-inputs input{
  padding-left:22px;
}

.search-input-container input:focus,
.compare-inputs input:focus{
  border-color:#7c3aed;
  box-shadow:0 0 0 4px rgba(124,58,237,0.15);
}

.search-input-container input::placeholder,
.compare-inputs input::placeholder{
  color:#94a3b8;
}

.search-icon{
  position:absolute;
  left:22px;
  top:50%;
  transform:translateY(-50%);
  color:#94a3b8;
}

.primary-search-btn{
  height:68px;

  border:none;

  border-radius:22px;

  background:
    linear-gradient(
      135deg,
      #7c3aed,
      #06b6d4
    );

  color:white;

  font-weight:700;
  font-size:1rem;

  cursor:pointer;

  transition:.35s ease;

  box-shadow:
    0 15px 35px rgba(124,58,237,0.35);
}

.primary-search-btn:hover{
  transform:translateY(-3px);
}

/* =========================================================
   TAGS
========================================================= */

.compare-examples,
.quick-suggestions{
  margin-top:22px;
  display:flex;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
}

.suggestion-label{
  color:var(--muted);
  font-size:.92rem;
  font-weight:600;
}

.suggestion-tags{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.tag-btn{
  border:none;
  border-radius:999px;
  padding:10px 16px;

  background:rgba(255,255,255,0.08);

  color:var(--text);

  cursor:pointer;

  font-weight:600;

  transition:.25s ease;
}

.tag-btn:hover{
  background:#7c3aed;
  transform:translateY(-2px);
}

/* =========================================================
   STATUS
========================================================= */

.status-banner{
  margin-bottom:24px;
  padding:18px 22px;
  border-radius:18px;
}

.status-banner.success{
  background:rgba(34,197,94,0.12);
  border:1px solid rgba(34,197,94,0.2);
  color:#bbf7d0;
}

.status-banner.error{
  background:rgba(239,68,68,0.12);
  border:1px solid rgba(239,68,68,0.2);
  color:#fecaca;
}

.hidden{
  display:none !important;
}

/* =========================================================
   GRID
========================================================= */

.dashboard-grid{
  display:grid;
  grid-template-columns:340px minmax(0,1fr);
  gap:28px;
  align-items:start;
}

/* =========================================================
   PROFILE CARD
========================================================= */

.profile-sidebar-card{
  background:var(--card);
  border:1px solid var(--card-border);
  border-radius:30px;
  overflow:hidden;
  backdrop-filter:blur(18px);
  box-shadow:var(--shadow);
  position:sticky;
  top:24px;
  width:100%;
}

.profile-banner-hero{
  height:150px;

  background:
    linear-gradient(
      135deg,
      #7c3aed,
      #06b6d4
    );
}

.profile-essence{
  margin-top:-72px;
  padding:0 28px 28px;

  display:flex;
  flex-direction:column;
  align-items:center;
}

.avatar-wrapper{
  width:148px;
  height:148px;

  border-radius:50%;

  padding:6px;

  background:var(--bg);

  margin-bottom:18px;
}

.dashboard-avatar{
  width:100%;
  height:100%;
  border-radius:50%;
  object-fit:cover;
}

.identity-block{
  text-align:center;
}

.user-fullname{
  font-size:2rem;
  margin-bottom:6px;
}

.user-handle{
  color:#38bdf8;
  font-weight:600;
}

.user-biography{
  margin-top:16px;
  text-align:center;
  color:var(--muted);
  line-height:1.8;
  word-break:break-word;
}

.external-profile-btn{
  margin-top:22px;

  width:100%;
  min-height:54px;

  border-radius:16px;

  border:1px solid var(--card-border);

  background:rgba(255,255,255,0.04);

  color:var(--text);

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

  text-decoration:none;

  font-weight:700;

  transition:.3s ease;

  padding:0 18px;

  text-align:center;
}

.external-profile-btn:hover{
  background:#7c3aed;
}

/* =========================================================
   META
========================================================= */

.detailed-metadata-list{
  border-top:1px solid var(--card-border);

  padding:26px;

  display:flex;
  flex-direction:column;
  gap:18px;
}

.meta-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.meta-icon-label{
  display:flex;
  align-items:center;
  gap:10px;

  color:var(--muted);

  min-width:120px;
}

.meta-output{
  font-weight:600;
  text-align:right;
  word-break:break-word;
}

/* =========================================================
   MAIN CONTENT
========================================================= */

.main-dashboard-content{
  display:flex;
  flex-direction:column;
  gap:28px;
  min-width:0;
}

/* =========================================================
   STATS
========================================================= */

.stats-overview{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:20px;
}

.stat-box{
  background:var(--card);

  border:1px solid var(--card-border);

  border-radius:24px;

  padding:28px;

  backdrop-filter:blur(20px);

  box-shadow:var(--shadow);

  min-width:0;
}

.stat-box span{
  display:block;
  color:var(--muted);
  margin-bottom:14px;
  font-weight:600;
}

.stat-box strong{
  font-size:clamp(1.8rem,2vw,2.5rem);
  font-weight:800;
  overflow-wrap:anywhere;
}

/* =========================================================
   ANALYTICS
========================================================= */

.analytics-panel{
  background:var(--card);

  border:1px solid var(--card-border);

  border-radius:30px;

  padding:30px;

  backdrop-filter:blur(18px);

  box-shadow:var(--shadow);

  width:100%;
  overflow:hidden;
}

.panel-header-block{
  margin-bottom:26px;
}

.title-meta h3{
  font-size:2rem;
  margin-bottom:10px;
}

.title-meta p{
  color:var(--muted);
  line-height:1.7;
}

.analytics-grid{
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(320px,.8fr);
  gap:24px;
  align-items:start;
}

.analytics-card{
  background:rgba(255,255,255,0.03);

  border:1px solid var(--card-border);

  border-radius:24px;

  padding:28px;

  min-width:0;
  overflow:hidden;
}

.analytics-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:24px;
}

.analytics-header h3{
  font-size:1.35rem;
}

.analytics-header span{
  color:var(--muted);
  font-size:.9rem;
  white-space:nowrap;
}

/* =========================================================
   HEATMAP
========================================================= */

.heatmap-wrapper{
  width:100%;
  overflow-x:auto;
  padding-bottom:8px;
}

.heatmap-grid{
  display:grid;

  grid-template-columns:repeat(53,12px);

  grid-auto-rows:12px;

  gap:5px;

  min-width:900px;
}

.heatmap-cell{
  width:12px;
  height:12px;

  border-radius:3px;

  background:#161b22;

  transition:.2s ease;
}

.heatmap-cell:hover{
  transform:scale(1.3);
}

.level-0{background:#161b22;}
.level-1{background:#0e4429;}
.level-2{background:#006d32;}
.level-3{background:#26a641;}
.level-4{background:#39d353;}

.heatmap-scale-wrapper{
  margin-top:22px;

  display:flex;
  align-items:center;
  gap:14px;

  color:var(--muted);
  font-size:.88rem;
}

.heatmap-scale{
  display:flex;
  gap:6px;
}

/* =========================================================
   LANGUAGE
========================================================= */

.language-chart-wrapper{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:26px;
  width:100%;
}

.language-pie{
  width:220px;
  height:220px;
  border-radius:50%;
  position:relative;
  flex-shrink:0;
}

.language-pie::before{
  content:"";

  position:absolute;
  inset:32px;

  background:var(--bg);

  border-radius:50%;
}

.language-center-label{
  position:absolute;
  inset:0;
  z-index:2;

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

  text-align:center;
}

.language-center-label strong{
  font-size:2rem;
  font-weight:800;
}

.language-center-label span{
  color:var(--muted);
  margin-top:6px;
  max-width:120px;
}

.language-legend{
  width:100%;

  display:flex;
  flex-direction:column;
  gap:16px;
}

.language-legend-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.language-legend-left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.language-legend-left span:last-child{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

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

/* =========================================================
   REPOSITORIES
========================================================= */

.repositories-showcase-panel{
  background:var(--card);

  border:1px solid var(--card-border);

  border-radius:30px;

  padding:30px;

  backdrop-filter:blur(18px);

  box-shadow:var(--shadow);

  overflow:hidden;
}

.repositories-bento-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:22px;
}

.repo-card{
  background:rgba(255,255,255,0.03);

  border:1px solid var(--card-border);

  border-radius:22px;

  padding:24px;

  transition:.3s ease;

  min-width:0;
}

.repo-card:hover{
  transform:translateY(-4px);
  border-color:rgba(124,58,237,0.4);
}

.repo-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}

.repo-name{
  font-size:1.08rem;
  overflow-wrap:anywhere;
}

.repo-link{
  color:white;
  text-decoration:none;
}

.repo-description{
  color:var(--muted);
  line-height:1.7;
  margin-bottom:18px;
  overflow-wrap:anywhere;
}

.repo-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.pill,
.badge{
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,0.08);
  font-size:.82rem;
  font-weight:600;
}

/* =========================================================
   COMPARISON PANEL
========================================================= */

.comparison-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(340px,1fr));
  gap:28px;
  margin-top:28px;
}

.compare-card{
  position:relative;
  overflow:hidden;

  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,0.06),
      rgba(255,255,255,0.03)
    );

  border:1px solid rgba(255,255,255,0.08);

  border-radius:28px;

  padding:28px;

  backdrop-filter:blur(18px);

  transition:
    transform .35s ease,
    border-color .35s ease,
    box-shadow .35s ease;

  box-shadow:
    0 10px 40px rgba(0,0,0,0.35);

  min-width:0;
}

.compare-card:hover{
  transform:translateY(-8px);

  border-color:rgba(139,92,246,0.55);

  box-shadow:
    0 18px 60px rgba(139,92,246,0.18);
}

.compare-card::before{
  content:"";

  position:absolute;
  top:-120px;
  right:-120px;

  width:220px;
  height:220px;

  background:
    radial-gradient(
      circle,
      rgba(139,92,246,0.35),
      transparent 70%
    );

  pointer-events:none;
}

.compare-header{
  display:flex;
  align-items:center;
  gap:20px;
  margin-bottom:24px;
}

.compare-avatar{
  width:90px;
  height:90px;

  border-radius:24px;

  object-fit:cover;

  border:3px solid rgba(255,255,255,0.08);

  box-shadow:
    0 8px 25px rgba(0,0,0,0.4);

  flex-shrink:0;
}

.compare-header h3{
  font-size:1.5rem;
  font-weight:800;
  margin-bottom:4px;
  overflow-wrap:anywhere;
}

.compare-header p{
  color:var(--muted);
  font-size:.95rem;
}

.compare-bio{
  color:var(--muted);
  line-height:1.7;
  margin-bottom:24px;
  overflow-wrap:anywhere;
}

.compare-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-bottom:26px;
}

.compare-stat{
  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,0.06),
      rgba(255,255,255,0.02)
    );

  border:1px solid rgba(255,255,255,0.06);

  border-radius:20px;

  padding:18px 14px;

  text-align:center;

  transition:all .3s ease;

  min-width:0;
}

.compare-stat:hover{
  transform:translateY(-4px);
  border-color:rgba(6,182,212,0.35);
}

.compare-stat span{
  display:block;
  color:var(--muted);
  font-size:.82rem;
  margin-bottom:10px;
}

.compare-stat strong{
  font-size:1.4rem;
  font-weight:800;
  overflow-wrap:anywhere;
}

.compare-stat.winner{
  border-color:rgba(16,185,129,0.45);

  background:
    linear-gradient(
      145deg,
      rgba(16,185,129,0.18),
      rgba(16,185,129,0.04)
    );

  box-shadow:
    0 0 24px rgba(16,185,129,0.2);
}

.compare-repos{
  margin-top:10px;
}

.compare-repos h4{
  font-size:1.05rem;
  font-weight:700;
  margin-bottom:18px;
}

.mini-repo-card{
  display:flex;
  justify-content:space-between;
  align-items:center;

  gap:16px;

  padding:14px 16px;

  margin-bottom:12px;

  border-radius:16px;

  background:rgba(255,255,255,0.03);

  border:1px solid rgba(255,255,255,0.05);

  transition:all .3s ease;

  min-width:0;
}

.mini-repo-card:hover{
  transform:translateX(4px);

  border-color:rgba(59,130,246,0.35);

  background:rgba(255,255,255,0.05);
}

.mini-repo-card a{
  font-weight:600;
  color:white;
  text-decoration:none;
  overflow-wrap:anywhere;
}

.mini-repo-card span{
  color:#facc15;
  font-weight:700;
  font-size:.9rem;
  white-space:nowrap;
}

.compare-loading{
  grid-column:1/-1;

  text-align:center;

  padding:60px;

  border-radius:28px;

  background:rgba(255,255,255,0.04);

  border:1px solid rgba(255,255,255,0.06);

  color:var(--muted);

  font-size:1.05rem;
}

/* =========================================================
   UTILITIES
========================================================= */

.fade-up{
  animation:fadeUp .5s ease;
}

@keyframes fadeUp{
  from{
    opacity:0;
    transform:translateY(18px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
}

/* =========================================================
   SCROLLBAR
========================================================= */

::-webkit-scrollbar{
  width:10px;
  height:10px;
}

::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,0.12);
  border-radius:999px;
}

::-webkit-scrollbar-track{
  background:transparent;
}

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

@media (max-width:1400px){

  .analytics-grid{
    grid-template-columns:1fr;
  }

}

@media (max-width:1200px){

  .dashboard-grid{
    grid-template-columns:1fr;
  }

  .profile-sidebar-card{
    position:relative;
    top:0;
  }

}

@media (max-width:980px){

  .modern-search-form{
    grid-template-columns:1fr;
  }

  .compare-inputs{
    grid-template-columns:1fr;
  }

  .stats-overview{
    grid-template-columns:repeat(2,1fr);
  }

  .repositories-bento-grid{
    grid-template-columns:1fr;
  }

  .comparison-grid{
    grid-template-columns:1fr;
  }

}

@media (max-width:768px){

  .compare-stats{
    grid-template-columns:1fr;
  }

  .compare-header{
    flex-direction:column;
    text-align:center;
  }

  .compare-avatar{
    width:80px;
    height:80px;
  }

}

@media (max-width:640px){

  .app-container{
    width:92%;
  }

  .dashboard-header{
    flex-direction:column;
    align-items:flex-start;
  }

  .search-workspace{
    padding:22px;
  }

  .stats-overview{
    grid-template-columns:1fr;
  }

  .analytics-panel,
  .repositories-showcase-panel{
    padding:22px;
  }

  .profile-essence{
    padding:0 20px 24px;
  }

  .title-meta h3{
    font-size:1.6rem;
  }

  .language-pie{
    width:180px;
    height:180px;
  }

  .language-pie::before{
    inset:28px;
  }

  .language-center-label strong{
    font-size:1.5rem;
  }

}