:root {
  --bg: #f4f8fb;
  --bg-soft: rgba(255, 255, 255, 0.75);
  --card: rgba(255, 255, 255, 0.85);

  --border: rgba(0, 120, 150, 0.12);

  --text: #0f2a33;
  --muted: #5f7f8a;

  --accent: #2bbbd8;
  --accent-soft: #007f97;
  --accent-deep: #1f8ea3;

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);

  --radius: 24px;
  --radius-sm: 16px;
  --maxw: 1180px;
}

body.dark-theme {
  --bg: #06131a;
  --bg-soft: rgba(10, 28, 38, 0.72);
  --card: rgba(10, 35, 48, 0.78);

  --border: rgba(110, 222, 255, 0.18);

  --text: #ecfeff;
  --muted: #9fd3de;

  --accent: #3dd9ff;
  --accent-soft: #6ee7ff;
  --accent-deep: #0ea5c6;

  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px; /* optional, remove if not needed */
}

body {
  margin: 0;
  font-family: "Fira Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 220ms ease, color 220ms ease;
}

h1,
h2,
h3,
.brand-text > small {
  font-family: "Roboto Slab", Georgia, serif;
}

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

body {
  font-weight: 400;
}

.nav a,
.button,
.card-link,
.final-info-link {
  font-weight: 500;
}

body:not(.dark-theme) {
  background:
    radial-gradient(circle at top left, rgba(43, 187, 216, 0.12), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(111, 211, 230, 0.12), transparent 25%),
    linear-gradient(180deg, #f7fbfd 0%, #eef6f9 50%, #f4f8fb 100%);
}

body.dark-theme {
  background:
    radial-gradient(circle at top left, rgba(61, 217, 255, 0.16), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(14, 165, 198, 0.18), transparent 20%),
    radial-gradient(circle at 50% 100%, rgba(110, 231, 255, 0.08), transparent 24%),
    linear-gradient(180deg, #041017 0%, #071720 45%, #031018 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 120, 150, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 120, 150, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(255,255,255,0.55), transparent 85%);
}

.theme-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: 200ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  background: var(--card);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  transition: 200ms ease;
}

.menu-toggle:hover {
  background: var(--card);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transition: 200ms ease;
}

/* icons base */
.icon {
  position: absolute;
  width: 20px;
  height: 20px;
  transition: 300ms ease;
}

/* ☀️ sun */
.icon.sun {
  border-radius: 50%;
  background: #ffb347;
  box-shadow:
    0 0 0 4px rgba(255, 180, 70, 0.15),
    0 0 20px rgba(255, 180, 70, 0.1);
}

/* 🌙 moon */
.icon.moon {
  border-radius: 50%;
  background: var(--text);
  transform: translateY(40px);
  box-shadow: inset -6px -6px 0 0 var(--bg);
}

/* DARK MODE STATE */
body.dark-theme .icon.sun {
  transform: translateY(-40px);
  opacity: 0;
}

body.dark-theme .icon.moon {
  transform: translateY(0);
  opacity: 1;
}

/* LIGHT MODE STATE */
body:not(.dark-theme) .icon.sun {
  transform: translateY(0);
  opacity: 1;
}

body:not(.dark-theme) .icon.moon {
  transform: translateY(40px);
  opacity: 0;
}

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

.container {
  width: min(calc(100% - 2rem), var(--maxw));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 200ms ease;
}

/* LIGHT MODE */
body:not(.dark-theme) .topbar {
  background: rgba(255, 255, 255, 0.7);
}

/* DARK MODE */
body.dark-theme .topbar {
  background: rgba(4, 16, 23, 0.75);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  position: relative;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  position: relative;
  background: linear-gradient(135deg, rgba(61, 217, 255, 0.24), rgba(14, 165, 198, 0.18));
  border: 1px solid rgba(110, 231, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 30px rgba(12, 110, 140, 0.25);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
  opacity: 0.95;
}

.brand-mark::before {
  width: 20px;
  height: 3px;
  top: 12px;
  left: 10px;
  box-shadow: 0 8px 0 rgba(61, 217, 255, 0.7), 0 16px 0 rgba(61, 217, 255, 0.45);
}

.brand-mark::after {
  width: 3px;
  height: 22px;
  top: 10px;
  right: 11px;
  opacity: 0.45;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text small {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.nav a,
.button,
.card-link {
  transition: 180ms ease;
}

.nav a {
  color: var(--muted);
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: 180ms ease;
}

.nav a:hover {
  color: var(--text);
  border-color: rgba(110, 231, 255, 0.12);
  background: rgba(110, 231, 255, 0.04);
  transform: translateY(-1px);
}

body:not(.dark-theme) .nav a:hover {
  color: var(--accent-deep); /* darker cyan, readable on white */
  background: rgba(43, 187, 216, 0.10);
  border-color: rgba(43, 187, 216, 0.25);
}

body.dark-theme .nav a:hover {
  color: #ffffff;
  background: rgba(110, 231, 255, 0.08);
  border-color: rgba(110, 231, 255, 0.25);
}


@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -280px;
    width: 260px;
    height: 100vh;
    padding: 5.5rem 1rem 1rem;
    background: var(--card);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    flex-wrap: nowrap;
    transition: right 220ms ease;
    z-index: 60;
  }

  .nav a {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 14px;
  }

  .nav.nav-open {
    right: 0;
  }

  .topbar-inner {
    flex-wrap: nowrap;
  }

  .brand {
    min-width: 0;
  }

  body.menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.22);
    z-index: 55;
  }
}

.hero {
  position: relative;
  padding: 3rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--accent-soft);
  background: rgba(61, 217, 255, 0.08);
  border: 1px solid rgba(110, 231, 255, 0.14);
  margin-bottom: 1.2rem;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(61, 217, 255, 0.7);
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 10ch;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #b7f5ff 35%, #67e8f9 70%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 1.4rem 0 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid rgba(110, 231, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(110, 231, 255, 0.32);
  background: rgba(255, 255, 255, 0.055);
}

.button.primary {
  background: linear-gradient(135deg, rgba(61, 217, 255, 0.22), rgba(14, 165, 198, 0.22));
  border-color: rgba(110, 231, 255, 0.22);
  box-shadow: 0 18px 40px rgba(8, 93, 114, 0.24);
}

.hero-card {
  position: relative;
  padding: 1.35rem;
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(180deg, rgba(10, 35, 48, 0.85), rgba(5, 21, 29, 0.72));
  border: 1px solid rgba(110, 231, 255, 0.16);
  box-shadow: var(--shadow);
  min-height: 360px;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: auto -15% -38% auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61, 217, 255, 0.32), transparent 70%);
  filter: blur(8px);
}

.sonar {
  position: relative;
  width: 100%;
  height: 220px;
  display: grid;
  place-items: center;
  margin-bottom: 1.3rem;
}

.ring,
.beam,
.core {
  position: absolute;
  border-radius: 50%;
}

.ring {
  border: 1px solid rgba(37, 131, 149, 0.16);
  box-shadow: inset 0 0 25px rgba(61, 217, 255, 0.03);
}

.ring.r1 { width: 78px; height: 78px; }
.ring.r2 { width: 132px; height: 132px; }
.ring.r3 { width: 188px; height: 188px; }
.ring.r4 { width: 240px; height: 240px; }

.beam {
  width: 190px;
  height: 190px;
  background: conic-gradient(from 220deg, transparent 0deg, rgba(61, 217, 255, 0.02) 250deg, rgba(110, 231, 255, 0.34) 310deg, rgba(61, 217, 255, 0.08) 340deg, transparent 360deg);
  animation: sweep 10s linear infinite;
  filter: blur(1px);
}

.core {
  width: 16px;
  height: 16px;
  background: radial-gradient(circle, #ffffff 0%, var(--accent-soft) 40%, var(--accent) 100%);
  box-shadow: 0 0 30px rgba(61, 217, 255, 0.6);
}

@keyframes sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.stat {
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(110, 231, 255, 0.1);
}

.stat strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  padding: 2rem 0 5rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  max-width: 62ch;
}

.repo-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.15rem;
}

.card {
  grid-column: span 6;
  position: relative;
  padding: 1.5rem;
  border-radius: var(--radius);

  /* clean, neutral surface */
  background: var(--card);

  border: 1px solid var(--border);
  box-shadow: var(--shadow);

  overflow: hidden;
  transition: 180ms ease;
}

/* subtle top highlight line */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;

  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-soft),
    transparent
  );

  opacity: 0.25;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(110, 231, 255, 0.26);
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(61, 217, 255, 0.08);
  color: var(--accent-soft);
  font-size: 0.78rem;
  border: 1px solid rgba(110, 231, 255, 0.14);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card h3 {
  margin: 1rem 0 0.55rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.3rem;
  flex-wrap: wrap;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent-soft);
  font-weight: 600;
}

/* base */
.card-link:hover {
  transform: translateX(2px);
}

/* light mode */
body:not(.dark-theme) .card-link:hover {
  color: var(--accent-deep);
}

/* dark mode */
body.dark-theme .card-link:hover {
  color: #ffffff;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(110, 231, 255, 0.08);
  color: var(--muted);
  font-size: 0.84rem;
}

.footer {
  border-top: 1px solid rgba(110, 231, 255, 0.1);
  padding: 1.25rem 0 2.5rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.muted-link {
  color: var(--accent-soft);
}

.muted-link:hover {
  color: var(--text);
}

@media (max-width: 920px) {
  .hero-grid,
  .repo-grid {
    grid-template-columns: 1fr;
  }

  .card {
    grid-column: span 1;
  }

  .hero {
    padding-top: 4rem;
  }
}

@media (max-width: 640px) {
  .topbar-inner,
  .section-head,
  .footer-inner {
    align-items: flex-start;
  }

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

  h1 {
    max-width: 100%;
  }
}

.final-info {
  border-top: 1px solid rgba(110, 231, 255, 0.08);
  padding-top: 3rem;
}

.final-info-inner {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.final-info-text {
  color: var(--muted);
  margin-bottom: 1.2rem;
  font-size: 1rem;
}

.final-info-link {
  display: inline-block;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  color: var(--accent-soft);
  border: 1px solid rgba(110, 231, 255, 0.2);
  background: rgba(61, 217, 255, 0.06);
  transition: 180ms ease;
}

.final-info-link:hover {
  transform: translateY(-1px);
}

/* light mode */
body:not(.dark-theme) .final-info-link:hover {
  color: var(--accent-deep);
  background: rgba(43, 187, 216, 0.12);
  border-color: rgba(43, 187, 216, 0.35);
}

/* dark mode */
body.dark-theme .final-info-link:hover {
  color: #ffffff;
  background: rgba(61, 217, 255, 0.12);
  border-color: rgba(110, 231, 255, 0.4);
}

/* sonar interaction layer */
.sonar {
  position: relative;
  cursor: crosshair;
}

.ping {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, #ffffff 0%, var(--accent-soft) 40%, transparent 70%);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
}

.ping.active {
  animation: ping-fade 1.2s ease-out forwards;
}

@keyframes ping-fade {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.6);
    box-shadow: 0 0 12px rgba(61, 217, 255, 0.6);
  }
  60% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.8);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.5);
  }
}
