:root {
  --bg: #04060d;
  --bg2: #070b16;
  --card: rgba(7, 12, 24, 0.72);
  --card-border: rgba(132, 156, 214, 0.14);
  --text: #f3f6ff;
  --muted: #a8b1c7;
  --line: rgba(148, 174, 255, 0.18);
  --white-glow: 168, 208, 255;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 146, 255, 0.08), transparent 28%),
    radial-gradient(circle at 80% 12%, rgba(104, 84, 255, 0.08), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  color: var(--text);
  overflow: hidden;
  cursor: none;
}

@media (pointer: coarse) {
  body { cursor: auto; overflow: auto; }
  .cursor-dot, .cursor-ring { display: none; }
}

#ambient-canvas,
.grid-layer,
.grain-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#ambient-canvas { opacity: 0.36; }
.grid-layer {
  background-image:
    linear-gradient(rgba(136, 162, 220, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(136, 162, 220, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 86%);
  opacity: 0.25;
}
.grid-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(78, 104, 164, 0.06), transparent 55%),
    radial-gradient(circle at 50% 50%, rgba(23, 193, 232, 0.05), transparent 35%);
}
.grain-layer {
  opacity: 0.045;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.15' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

.page-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
  position: relative;
  z-index: 2;
}

.hub-card {
  width: min(980px, calc(100vw - 56px));
  min-height: 430px;
  padding: 42px 38px 36px;
  background: linear-gradient(180deg, rgba(5, 10, 22, 0.78), rgba(7, 12, 24, 0.72));
  border: 1px solid var(--card-border);
  border-radius: 34px;
  box-shadow:
    0 18px 70px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -30px 80px rgba(8, 24, 60, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}
.hub-card::before {
  content: "";
  position: absolute;
  inset: auto auto -90px -60px;
  width: 320px;
  height: 220px;
  background: radial-gradient(circle at center, rgba(0, 162, 255, 0.16), transparent 66%);
  filter: blur(20px);
}

.top-rail {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  position: relative;
  margin-bottom: 28px;
}
.top-rail-line {
  display: block;
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, rgba(162, 185, 255, 0.22), rgba(162, 185, 255, 0.08));
}
.top-orbit-dot {
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgb(255, 90, 120);
  box-shadow: 0 0 0 8px rgba(255,255,255,0.04), 0 0 18px rgba(255,255,255,0.2);
  animation: rgbShift 5.6s linear infinite;
}

@keyframes rgbShift {
  0%   { background: rgb(255, 72, 72); box-shadow: 0 0 0 10px rgba(255,72,72,0.08), 0 0 18px rgba(255,72,72,0.42); }
  20%  { background: rgb(255, 182, 43); box-shadow: 0 0 0 10px rgba(255,182,43,0.08), 0 0 18px rgba(255,182,43,0.42); }
  40%  { background: rgb(92, 255, 120); box-shadow: 0 0 0 10px rgba(92,255,120,0.08), 0 0 18px rgba(92,255,120,0.42); }
  60%  { background: rgb(45, 197, 255); box-shadow: 0 0 0 10px rgba(45,197,255,0.08), 0 0 18px rgba(45,197,255,0.42); }
  80%  { background: rgb(153, 88, 255); box-shadow: 0 0 0 10px rgba(153,88,255,0.08), 0 0 18px rgba(153,88,255,0.42); }
  100% { background: rgb(255, 72, 72); box-shadow: 0 0 0 10px rgba(255,72,72,0.08), 0 0 18px rgba(255,72,72,0.42); }
}

.content-wrap {
  display: grid;
  gap: 28px;
}
.name {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
  font-weight: 800;
}
.role {
  margin-top: 10px;
  letter-spacing: 0.22em;
  font-size: 0.92rem;
  font-weight: 700;
  color: #f0f5ff;
}
.summary {
  max-width: 650px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.05rem;
}

.links-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.social-btn {
  --hover-rgb: 255,255,255;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 16px 18px;
  border-radius: 22px;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
  position: relative;
  z-index: 4;
  isolation: isolate;
}
.social-btn:hover,
.social-btn:focus-visible,
.social-btn.is-hovered {
  transform: translateY(-2px);
  border-color: rgba(var(--hover-rgb), 0.42);
  box-shadow: 0 0 0 1px rgba(var(--hover-rgb), 0.14), 0 18px 44px rgba(var(--hover-rgb), 0.16);
  background: linear-gradient(180deg, rgba(var(--hover-rgb),0.1), rgba(255,255,255,0.025));
  outline: none;
}
.social-btn.github { --hover-rgb: 255,255,255; }
.social-btn.linkedin { --hover-rgb: 10,102,194; }
.social-btn.instagram { --hover-rgb: 225,48,108; }
.social-btn.mail { --hover-rgb: 34,197,94; }

 .social-btn:hover .icon-wrap,
.social-btn:focus-visible .icon-wrap {
  background: rgba(var(--hover-rgb), 0.12);
  border-color: rgba(var(--hover-rgb), 0.28);
}

.social-btn.github:hover,
.social-btn.github:focus-visible,
.social-btn.github.is-hovered {
  border-color: rgba(248,250,255,0.44);
  box-shadow: 0 0 0 1px rgba(248,250,255,0.2), 0 18px 46px rgba(248,250,255,0.18);
  background: linear-gradient(180deg, rgba(248,250,255,0.12), rgba(255,255,255,0.03));
}
.social-btn.mail:hover,
.social-btn.mail:focus-visible,
.social-btn.mail.is-hovered {
  border-color: rgba(34,197,94,0.4);
  box-shadow: 0 0 0 1px rgba(34,197,94,0.16), 0 18px 46px rgba(34,197,94,0.16);
}
.social-btn.github:hover .icon-wrap,
.social-btn.github:focus-visible .icon-wrap,
.social-btn.github.is-hovered .icon-wrap {
  background: rgba(248,250,255,0.11);
  border-color: rgba(248,250,255,0.22);
}
.social-btn.mail:hover .icon-wrap,
.social-btn.mail:focus-visible .icon-wrap,
.social-btn.mail.is-hovered .icon-wrap {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.22);
}

.icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.icon-wrap svg {
  width: 20px;
  height: 20px;
  fill: #f8fbff;
}
.text-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.text-wrap strong {
  font-size: 1rem;
  font-weight: 700;
}
.text-wrap small {
  color: #9da8c2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.9rem;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 999px;
  pointer-events: none;
  z-index: 999;
  mix-blend-mode: screen;
}
.cursor-dot {
  width: 8px;
  height: 8px;
  background: rgb(var(--white-glow));
  transform: translate(-50%, -50%);
  box-shadow: 0 0 16px rgba(255,255,255,0.7);
}
.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.35);
  transform: translate(-50%, -50%);
  transition: width .2s ease, height .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
  background: rgba(255,255,255,0.02);
}
.cursor-ring.active {
  width: 56px;
  height: 56px;
}

@media (max-width: 980px) {
  body { overflow: auto; }
  .hub-card {
    width: min(760px, calc(100vw - 28px));
    padding: 30px 22px 24px;
    min-height: auto;
  }
  .links-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page-shell { padding: 14px; }
  .hub-card { width: min(100%, calc(100vw - 20px)); border-radius: 24px; }
  .summary { font-size: 0.98rem; line-height: 1.7; }
  .links-row { grid-template-columns: 1fr; }
  .social-btn { padding: 15px; }
}
