:root {
  --bg: #070a10;
  --bg-secondary: #0b1120;
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(226, 232, 240, 0.66);
  --line: rgba(148, 163, 184, 0.14);
  --card: rgba(15, 23, 42, 0.66);
  --cardHover: rgba(20, 31, 52, 0.82);
  --blue: #60a5fa;
  --blue-border: rgba(96, 165, 250, 0.52);
  --blue-glow: rgba(59, 130, 246, 0.14);
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.30);
  --r: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background-color: var(--bg);
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 5%, rgba(37, 99, 235, 0.18), transparent 34%),
    radial-gradient(circle at 88% 16%, rgba(14, 165, 233, 0.10), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(59, 130, 246, 0.07), transparent 38%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-secondary) 55%, #080d17 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.032) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.68), transparent 88%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.68), transparent 88%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 38%, rgba(0, 0, 0, 0.26) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 36px));
  margin: 0 auto;
  padding: 38px 0 72px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;

  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.top > div:first-child {
  min-width: 0;
  flex: 1;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 52px);
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.tagline {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  max-width: 70ch;
  line-height: 1.5;
}

.section {
  margin-top: 24px;
}

.sectionTitle {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.68), rgba(15, 23, 42, 0.56));
  box-shadow: var(--shadow);
  padding: 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.mini {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.03);
}

.stat strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.proj {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.70), rgba(15, 23, 42, 0.58));
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
  padding: 14px;
  min-height: 155px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    transform 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.proj:hover,
.proj:focus-visible {
  border-color: var(--blue-border);
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.78));
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.34),
    0 0 24px var(--blue-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  transform: translateY(-3px);
}

.proj:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.logoBtn {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.logoBtn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.proj:hover .logoBtn,
.proj:focus-visible .logoBtn {
  border-color: rgba(96, 165, 250, 0.42);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.12);
}

.logoFallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
  font-size: 20px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.25), rgba(34, 197, 94, 0.12));
}

.projBody {
  min-width: 0;
}

.projTitle {
  margin: 1px 0 6px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.90);
  font-weight: 700;
  line-height: 1.25;
  transition: color 0.16s ease;
}

.proj:hover .projTitle,
.proj:focus-visible .projTitle {
  color: #bfdbfe;
}

.repoMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.repoMeta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tags {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
}

.repoLinks {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.repoLinks a {
  color: var(--blue);
}

.activity {
  display: grid;
  gap: 10px;
}

.activityItem {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.activityItem strong {
  display: block;
  font-size: 13px;
  margin-bottom: 3px;
}

.activityItem span {
  color: var(--muted);
  font-size: 12px;
}

footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

footer a {
  color: rgba(255, 255, 255, 0.74);
}

.social {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 360px;
}

.iconBtn {
  position: relative;

  width: 46px;
  height: 46px;
  flex: 0 0 46px;

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

  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;

  color: rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(
      145deg,
      rgba(30, 41, 59, 0.72),
      rgba(15, 23, 42, 0.52)
    );

  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);

  cursor: pointer;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  transition:
    transform 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.iconBtn svg {
  display: block;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;

  opacity: 0.9;

  transition:
    transform 0.16s ease,
    opacity 0.16s ease;
}

.iconBtn:not(.iconBtn--disabled):hover {
  color: #ffffff;
  border-color: rgba(96, 165, 250, 0.5);

  background:
    linear-gradient(
      145deg,
      rgba(37, 99, 235, 0.22),
      rgba(15, 23, 42, 0.72)
    );

  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.28),
    0 0 20px rgba(59, 130, 246, 0.1);

  transform: translateY(-2px);
}

.iconBtn:not(.iconBtn--disabled):hover svg {
  opacity: 1;
  transform: scale(1.08);
}

.iconBtn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* Tooltip */
.iconBtn::after {
  content: attr(data-tooltip);

  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  z-index: 20;

  padding: 6px 9px;

  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;

  color: rgba(255, 255, 255, 0.88);
  background: rgba(7, 10, 16, 0.96);

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);

  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;

  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -4px);

  transition:
    opacity 0.14s ease,
    transform 0.14s ease;
}

.iconBtn:hover::after,
.iconBtn:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.iconBtn--disabled {
  color: rgba(255, 255, 255, 0.34);
  cursor: not-allowed;
}

.iconBtn--disabled svg {
  opacity: 0.45;
}

.soonDot {
  position: absolute;
  top: 7px;
  right: 7px;

  width: 7px;
  height: 7px;

  border: 1px solid rgba(7, 10, 16, 0.8);
  border-radius: 50%;

  background: #60a5fa;
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.65);
}

@media (max-width: 840px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .top {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }

  .social {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
  }

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

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
