@font-face {
  font-family: "Hack";
  src: url("./assets/fonts/Hack.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gen Gothic";
  src: url("./assets/fonts/Gen-Gothic-L-P-Subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-sub: #f8fafd;
  --ink: #0f172a;
  --ink-mid: #475569;
  --ink-dim: #94a3b8;
  --line: #dbe2ef;
  --line-strong: #cbd5e1;

  --cobalt: #2563eb;
  --cobalt-soft: rgba(37, 99, 235, 0.08);
  --rose: #e11d48;
  --rose-soft: rgba(225, 29, 72, 0.08);
  --teal: #0d9488;
  --teal-soft: rgba(13, 148, 136, 0.08);
  --violet: #7c3aed;
  --amber: #d97706;

  --font-display: "Outfit", "Zen Kaku Gothic New", "Gen Gothic", system-ui, sans-serif;
  --font-sans: "Zen Kaku Gothic New", "Gen Gothic", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "Hack", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shadow-card: 0 8px 24px -8px rgba(15, 23, 42, 0.07), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-hub: 0 20px 50px -12px rgba(37, 99, 235, 0.14), 0 4px 14px -2px rgba(15, 23, 42, 0.06);
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(#cbd5e1 1.1px, transparent 1.1px),
    linear-gradient(to right, rgba(203, 213, 225, 0.28) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(203, 213, 225, 0.28) 1px, transparent 1px);
  background-size: 24px 24px, 120px 120px, 120px 120px;
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

.board {
  position: relative;
  z-index: 2;
  max-width: 1380px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1fr 370px 1fr;
  gap: 40px;
  align-items: center;
}

.wing {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.wing-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cluster-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: fit-content;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.wing-left .cluster-header {
  margin-left: auto;
}

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

.dot-cobalt { background: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
.dot-rose { background: var(--rose); box-shadow: 0 0 0 3px var(--rose-soft); }
.dot-teal { background: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }

.cluster-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.cluster-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-dim);
}

.node-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.node-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.node-card:hover,
.node-card.is-highlighted {
  border-color: var(--cobalt);
  box-shadow: 0 12px 28px -8px rgba(37, 99, 235, 0.16);
  transform: translateY(-2px);
}

.node-featured:hover,
.node-featured.is-highlighted {
  border-color: var(--rose);
  box-shadow: 0 12px 28px -8px rgba(225, 29, 72, 0.16);
}

.node-anchor {
  display: block;
  padding: 15px 18px;
  color: inherit;
  text-decoration: none;
}

.node-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.node-name {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
  transition: color 0.18s ease;
}

.node-card:hover .node-name {
  color: var(--cobalt);
}

.node-featured:hover .node-name {
  color: var(--rose);
}

.node-lang {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.lang-cs { background: rgba(124, 58, 237, 0.1); color: var(--violet); }
.lang-py { background: rgba(37, 99, 235, 0.1); color: var(--cobalt); }
.lang-rs { background: rgba(217, 119, 6, 0.12); color: var(--amber); }
.lang-jv { background: rgba(225, 29, 72, 0.1); color: var(--rose); }
.lang-cpp { background: rgba(15, 23, 42, 0.08); color: var(--ink); }
.lang-web { background: rgba(13, 148, 136, 0.1); color: var(--teal); }

.node-host {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-dim);
}

.node-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-mid);
  line-height: 1.55;
}

.center-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.core-hub {
  position: relative;
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: 24px;
  padding: 24px 24px 22px;
  box-shadow: var(--shadow-hub);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.core-top-tag {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-dim);
  letter-spacing: 0.06em;
}

.avatar-ring-wrap {
  position: relative;
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
}

.orbit-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px dashed var(--cobalt);
  opacity: 0.45;
  animation: spin-slow 28s linear infinite;
}

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

.core-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}

.core-name {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.core-name-en {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.core-name-ja {
  font-size: 13px;
  font-weight: 700;
  color: var(--cobalt);
  letter-spacing: 0.14em;
}

.core-pills {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.meta-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 999px;
}

.pill-pronouns {
  border: 1px solid var(--line-strong);
  color: var(--ink-mid);
  background: var(--surface-sub);
}

.pill-location {
  background: var(--cobalt-soft);
  color: var(--cobalt);
  font-weight: 600;
}

.core-bio {
  margin: 10px 0 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}

.core-favs {
  width: 100%;
  background: var(--surface-sub);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px 12px;
}

.favs-caption {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  margin-bottom: 6px;
}

.favs-cloud {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.fav-node {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 3px 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  transition: all 0.18s ease;
}

.fav-node[data-fav-lang] {
  cursor: pointer;
  border-color: rgba(37, 99, 235, 0.3);
}

.fav-node[data-fav-lang]:hover {
  background: var(--cobalt);
  color: #fff;
  border-color: var(--cobalt);
  transform: translateY(-1px);
}

.core-sns {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sns-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-sub);
  color: var(--ink);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.sns-pill:hover {
  border-color: var(--cobalt);
  background: var(--cobalt-soft);
  transform: translateY(-1px);
}

.sns-pill svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}

.sns-handle {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-mid);
}

.contact-node {
  position: relative;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: var(--shadow-card);
}

.contact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.contact-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--cobalt-soft);
  color: var(--cobalt);
}

.contact-comment {
  font-size: 11.5px;
  color: var(--ink-mid);
}

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

.discord-display {
  display: flex;
  align-items: center;
  gap: 7px;
}

.discord-icon {
  width: 18px;
  height: 18px;
  fill: #5865f2;
}

.discord-label {
  font-size: 13.5px;
  font-weight: 700;
}

.discord-id {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--cobalt);
}

.copy-chip {
  padding: 4px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-sub);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-chip:hover {
  background: var(--cobalt);
  color: #fff;
  border-color: var(--cobalt);
}

.board-footer {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-dim);
}

@media (max-width: 1120px) {
  .board {
    grid-template-columns: 1fr;
    max-width: 680px;
    gap: 28px;
  }

  .center-column {
    order: -1;
  }

  .wing-left .cluster-header {
    margin-left: 0;
  }
}
