:root {
  --bg: #0a0a0f;
  --border: #1e1e2e;
  --accent: #5b8cff;
  --accent2: #00b5a8;
  --danger: #f06060;
  --text: #e8e8f0;
  --muted: #6a6a80;
  --card-bg: #13131c;
  --input-bg: #0e0e18;
  --accent-dim: rgba(0, 229, 195, 0.08);
  --accent-glow: rgba(0, 229, 195, 0.15);
  --text-muted: #7a8ba0;
  --text-faint: #3e4f61;
  --sans: 'Sora', system-ui, sans-serif;
}

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

body {
  font-family: 'DM Mono', monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-top: 48px;
  overflow-x: hidden;
}

body::after {
  content: '';
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: min(700px, 90vw);
  height: 500px;
  background: radial-gradient(ellipse, rgba(200, 240, 96, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ── */

.wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 70px 40px 80px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ── Header ── */

header {
  animation: fadeUp 0.6s ease both;
}

.eyebrow {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.eyebrow::after {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

h1 em {
  font-style: italic;
  color: var(--accent);
}

.subtitle {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 500px;
}

/* ── Search ── */

.search-box {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color 0.2s;
  animation: fadeUp 0.6s 0.1s ease both;
}

.search-box:focus-within {
  border-color: var(--accent);
}

.search-at {
  padding: 0 16px;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  border-right: 1px solid var(--border);
  height: 52px;
  display: flex;
  align-items: center;
}

#input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 18px;
  font-family: 'DM Mono', monospace;
  font-size: 0.9rem;
  color: var(--text);
  height: 52px;
}

#input::placeholder {
  color: var(--muted);
}

#btn {
  background: var(--accent);
  color: #0a0a0f;
  border: none;
  padding: 0 24px;
  height: 52px;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, gap 0.2s;
  white-space: nowrap;
}

#btn:hover {
  background: var(--accent2);
  box-shadow: 0 0 20px rgba(96, 200, 240, 0.2);
}

#btn:active {
  transform: scale(0.98);
}

/* ── Error ── */

.error-msg {
  font-size: 0.75rem;
  color: var(--danger);
  letter-spacing: 0.06em;
  text-align: center;
  min-height: 1.2em;
}

/* ── Loading ── */

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px;
}

.loading p {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.loading-dots {
  display: flex;
  gap: 8px;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: dot 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

/* ── Profile Card ── */

.profile-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.5s ease both;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.profile-left {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

#avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
}

.profile-info h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.login {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 10px;
}

.bio {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
}

.profile-stats {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 0;
  border-right: 1px solid var(--border);
}

.stat:last-child {
  border-right: none;
}

.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
}

.stat-lbl {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  transition: gap 0.2s;
}

.profile-link:hover {
  gap: 12px;
}

/* ── Divider ── */

.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider-label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

/* ── Chart ── */

.chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 40px;
  animation: fadeUp 0.5s ease both;
}

#chart {
  width: 180px !important;
  height: 180px !important;
  flex-shrink: 0;
}

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.legend-name {
  font-size: 0.75rem;
  color: var(--text);
  flex: 1;
}

.legend-count {
  font-size: 0.68rem;
  color: var(--muted);
}

/* ── Repos Grid ── */

.repos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  animation: fadeUp 0.5s ease both;
}

.repo-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}

.repo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent2), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.repo-card:hover {
  border-color: rgba(96, 200, 240, 0.3);
  transform: translateY(-3px);
}

.repo-card:hover::before {
  transform: scaleX(1);
}

.repo-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent2);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.repo-name:hover {
  color: #fff;
}

.repo-desc {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.repo-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.repo-lang {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.repo-lang-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.repo-stars {
  font-size: 0.62rem;
  color: var(--muted);
  margin-left: auto;
}

/* Footer */
footer {
  width: 100%;
  margin-top: 80px;
  padding-top: 28px;
  border-top: 1px solid var(--border);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.footer-name {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text);
}

.footer-social {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: transparent;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s, background 0.25s;
  position: relative;
  overflow: hidden;
}

.footer-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

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

.footer-btn--github::before {
  background: rgba(91, 140, 255, 0.06);
}

.footer-btn--github:hover {
  border-color: rgba(91, 140, 255, 0.4);
  box-shadow: 0 0 16px rgba(91, 140, 255, 0.12);
  transform: translateY(-2px);
}

.footer-btn--github:hover::before {
  opacity: 1;
}

.footer-btn--linkedin {
  color: var(--accent2);
}

.footer-btn--linkedin::before {
  background: rgba(61, 255, 208, 0.06);
}

.footer-btn--linkedin:hover {
  border-color: rgba(61, 255, 208, 0.4);
  box-shadow: 0 0 16px rgba(61, 255, 208, 0.12);
  transform: translateY(-2px);
}

.footer-btn--linkedin:hover::before {
  opacity: 1;
}


.project-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid #1e1e2e;
  font-family: 'DM Mono', monospace;
}

.project-nav::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 28px;
  width: 60px;
  height: 1px;
  background: var(--accent);
}

.nav-home {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #e8e8f0;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-home svg {
  color: var(--accent);
  transition: transform 0.2s;
}

.nav-home:hover {
  color: var(--accent);
}

.nav-home:hover svg {
  transform: translateX(-3px);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
  margin: 0 auto;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

/* ── LANGUAGE TOGGLE ── */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
}

.lang-btn {
  padding: 0.22rem 0.52rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 5px;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-faint);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  line-height: 1;
}

.lang-btn:hover {
  color: var(--accent);
  border-color: rgba(0, 229, 195, 0.3);
}

.lang-btn.active {
  background: rgba(0, 229, 195, 0.12);
  border-color: rgba(0, 229, 195, 0.35);
  color: var(--accent);
}

/* ── Utility ── */

.hidden {
  display: none !important;
}

/* ── Animations ── */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dot {

  0%,
  80%,
  100% {
    transform: scale(0.5);
    opacity: 0.3;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── Responsive ── */


/* ── Mobile Back Button ── */
.back-btn {
  display: none;
  /* Desktop: versteckt */
}



/* Tablet (≤ 860px) */
@media (max-width: 860px) {
  .wrapper {
    padding: 64px 32px 72px;
    gap: 36px;
  }
}

/* Tablet small (≤ 768px) */
@media (max-width: 768px) {
  .wrapper {
    padding: 56px 24px 64px;
    gap: 32px;
  }

  .repos-grid {
    gap: 14px;
  }

  .chart-card {
    gap: 28px;
    padding: 28px;
  }

  .profile-card {
    padding: 28px;
  }

  .repo-card {
    padding: 20px;
  }
}

/* Mobile (≤ 640px) */
@media (max-width: 640px) {
  .wrapper {
    padding: 48px 18px 56px;
    gap: 24px;
  }

  .repos-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .chart-card {
    flex-direction: column;
    align-items: center;
    padding: 24px;
    gap: 24px;
  }

  .chart-legend {
    width: 100%;
  }

  .profile-card {
    padding: 22px;
  }

  .profile-left {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
  }

  .profile-stats {
    margin-bottom: 18px;
  }

  .search-box {
    flex-wrap: wrap;
  }

  #input {
    font-size: 16px;
    /* prevents iOS auto-zoom */
    min-width: 0;
    height: 48px;
  }

  #btn {
    width: 100%;
    justify-content: center;
    height: 48px;
    border-radius: 0;
  }

  .search-at {
    height: 48px;
  }

  .repo-card {
    padding: 18px;
  }
}


/* Nav responsive */
@media (max-width: 600px) {

    .wrapper {
    padding: 14px 14px 18px;
    gap: 20px;
  }

  .nav-links {
    display: none;
  }

  .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    align-self: flex-start;
    padding: 8px 16px;
    font-family: 'DM Mono', monospace;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--accent);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 2px;
    margin-bottom: 3vh;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s, background 0.25s;
    animation: fadeUp 0.5s ease both;
  }

  .back-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(91, 140, 255, 0.06);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
  }

  .back-btn:hover {
    border-color: rgba(91, 140, 255, 0.4);
    box-shadow: 0 0 16px rgba(91, 140, 255, 0.12);
    transform: translateY(-2px);
  }

  .back-btn:hover::before {
    opacity: 1;
  }

  .back-btn:active {
    transform: scale(0.97);
  }

}


/* Small phones (≤ 480px) */
@media (max-width: 480px) {
  .wrapper {
    padding: 14px 14px 18px;
    gap: 20px;
  }

  h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 0.76rem;
  }

  #avatar {
    width: 60px;
    height: 60px;
  }

  .profile-info h2 {
    font-size: 1.35rem;
  }

  .stat-num {
    font-size: 1.35rem;
  }

  .stat {
    padding: 12px 0;
  }

  #chart {
    width: 150px !important;
    height: 150px !important;
  }

  .chart-card {
    padding: 18px;
  }

  .profile-card {
    padding: 18px;
  }

  .repo-card {
    padding: 16px;
    gap: 8px;
  }

  .section-divider {
    padding: 10px;
    gap: 10px;
  }

  .divider-label {
    font-size: 0.56rem;
    letter-spacing: 0.14em;
  }

  .search-at {
    padding: 0 12px;
  }

  #input {
    padding: 0 12px;
  }

  #btn {
    padding: 0 18px;
  }
}

@media (max-width: 380px) {
  .project-nav {
    padding: 0 10px;
  }

  .nav-home {
    font-size: 0.65rem;
  }
}