:root {
  --bg: #0a0a0a;
  --ink: #e9e7e6;
  --muted: #a19f9d;
  --accent: #82c6ff;
  --maxw: 820px;
  --pad: clamp(16px, 2.4vw, 28px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16.5px/1.75 "Segoe UI", SegoeUI, "Helvetica Neue", Arial, sans-serif;
  cursor: none;
}

.side-visual {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(24vw, 300px);
  background: #0d0d0d url("../img/side.jpg") center/cover no-repeat;
  filter: brightness(0.9) contrast(1);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.05);
}

@media (max-width: 980px) {
  .side-visual {
    display: none;
  }
}

.top-logo {
  --badge-size: 54px;
  --icon-size: 34px;

  position: fixed;
  top: 22px;
  right: 26px;
  width: var(--badge-size);
  height: var(--badge-size);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(130, 198, 255, 0.28);
  border-radius: 12px;
  background: rgba(130, 198, 255, 0.06);
  backdrop-filter: blur(6px);
  color: var(--accent);
  z-index: 8000;
  user-select: none;
  padding: 0;
}

.top-logo .eb-svg {
  width: var(--icon-size);
  height: var(--icon-size);
  display: block;
}

.wrap {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 22px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10vh var(--pad);
  position: relative;
}

@media (min-width: 981px) {
  .wrap {
    margin-left: clamp(260px, 26vw, 340px);
  }
}

.title {
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 1.04;
  margin: 0;
}

.tag {
  margin: -6px 0 6px;
  color: var(--muted);
}

.keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  opacity: 0.95;
}

.keywords span {
  border: 1px solid rgba(130, 198, 255, 0.35);
  color: #cfe6ff;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(130, 198, 255, 0.08);
  font-size: 0.92rem;
  backdrop-filter: blur(2px);
}

.about {
  max-width: 60ch;
  color: #d6d3d1;
}

.pubs {
  max-width: 70ch;
}

.pubs ol {
  list-style: decimal;
  padding-left: 1.2rem;
  margin: 0.5rem 0 0;
}

.pubs li {
  margin: 0.45rem 0;
}

.pubs .t {
  display: block;
}

.pubs .d {
  display: block;
  color: var(--muted);
}

.links {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: flex;
  gap: 18px;
  opacity: 0.8;
  flex-wrap: wrap;
}

@media (max-width: 680px) {
  .links {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
  }
}

.links a {
  color: #bdb7b2;
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px dotted transparent;
}

.links a:hover {
  color: var(--ink);
  border-bottom-color: #595551;
}

.scan-toggle {
  position: fixed;
  right: 28px;
  bottom: 74px;
  padding: 8px 12px;
  border: 1px solid rgba(130, 198, 255, 0.35);
  border-radius: 999px;
  background: rgba(130, 198, 255, 0.08);
  color: var(--ink);
  font: 13px/1 "Segoe UI", SegoeUI, Arial, sans-serif;
  letter-spacing: 0.3px;
  backdrop-filter: blur(6px);
  cursor: pointer;
  z-index: 8000;
}

.scan-toggle:hover {
  background: rgba(130, 198, 255, 0.16);
}

.page-scan {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 7000;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.page-scan.active {
  opacity: 1;
}

.scan-beam {
  position: absolute;
  left: 0;
  right: 0;
  height: 22vh;
  top: -25vh;
  background:
    radial-gradient(
      50% 200% at 50% 0%,
      rgba(130, 198, 255, 0.35),
      rgba(130, 198, 255, 0.06) 40%,
      transparent 70%
    ),
    linear-gradient(
      180deg,
      rgba(130, 198, 255, 0.6),
      rgba(130, 198, 255, 0.18) 40%,
      transparent 70%
    );
  box-shadow:
    0 0 40px rgba(130, 198, 255, 0.35),
    inset 0 0 30px rgba(130, 198, 255, 0.25);
  filter: saturate(1.1) blur(0.2px);
}

.page-scan.anim .scan-beam {
  animation: scanDown 1.6s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes scanDown {
  0% {
    top: -25vh;
  }

  100% {
    top: 110vh;
  }
}

.mri-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}

.mri-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(130, 198,  255, 0.22),
    rgba(130, 198, 255, 0.05) 60%,
    transparent 61%
  );
  box-shadow:
    0 0 22px rgba(130, 198, 255, 0.25),
    inset 0 0 12px rgba(130, 198, 255, 0.12);
}

.mri-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #82c6ff66;
}

.mri-beam {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 46px;
  transform-origin: 0 0;
  transform: rotate(0deg) translate(0, -23px);
  background: linear-gradient(180deg, #82c6ff, transparent);
  mix-blend-mode: screen;
  opacity: 0.9;
}

@media (hover: none) {
  body {
    cursor: auto;
  }

  .mri-cursor {
    display: none;
  }
}
