:root {
  --bg-0: #000000;
  --bg-1: #05060a;
  --bg-2: #0b0d18;
  --fg: #ffffff;
  --fg-dim: rgba(255, 255, 255, 0.72);
  --fg-mute: rgba(255, 255, 255, 0.5);
  --border: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(255, 255, 255, 0.35);
  --accent: #ffffff;
  --glow: rgba(255, 255, 255, 0.55);
  --card-bg: rgba(255, 255, 255, 0.035);
  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  --transition: 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background:
    radial-gradient(ellipse at 50% -20%, #1a1d36 0%, transparent 55%),
    radial-gradient(ellipse at 50% 120%, #0a1426 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
  background-attachment: fixed;
  min-height: 100svh;
  overflow-x: hidden;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: #fff;
  color: #000;
  padding: 8px 12px;
  border-radius: 8px;
}

.card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: clamp(20px, 4vw, 32px) clamp(16px, 3vw, 28px) clamp(28px, 5vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  isolation: isolate;
  animation: cardIn 800ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.logo-wrap {
  position: relative;
  width: clamp(180px, 44vw, 260px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  margin: 8px 0 4px;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}

.logo-wrap::before {
  content: "";
  position: absolute;
  inset: -30%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.32) 0%, rgba(180, 200, 255, 0.12) 35%, transparent 70%);
  filter: blur(24px);
  z-index: -1;
  animation: pulse 4.5s ease-in-out infinite;
}

.logo-wrap::after {
  content: "";
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 60%);
  filter: blur(8px);
  z-index: -1;
  animation: pulse 3s ease-in-out infinite reverse;
}

.logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #f1f4ff 60%, #d6deff 100%);
  -webkit-mask-image: url("assets/logo-mask.png");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
          mask-image: url("assets/logo-mask.png");
          mask-repeat: no-repeat;
          mask-position: center;
          mask-size: contain;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.55)) drop-shadow(0 0 44px rgba(180, 200, 255, 0.25));
  animation: float 7s ease-in-out infinite, drift 11s ease-in-out infinite, sway 9s ease-in-out infinite;
  transform-origin: 50% 50%;
  user-select: none;
  -webkit-user-drag: none;
}

.logo-img {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -14px; }
}

@keyframes drift {
  0%, 100% { rotate: -1.5deg; }
  50%      { rotate:  1.5deg; }
}

@keyframes sway {
  0%, 100% { scale: 1; }
  50%      { scale: 1.04; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.08); }
}

.title {
  margin: 22px 0 8px;
  font-size: clamp(34px, 6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}

.title-main {
  background: linear-gradient(180deg, #ffffff 0%, #cfd3e6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.title-dot,
.title-tld {
  color: var(--fg-mute);
  font-weight: 500;
}

.tagline {
  margin: 0 0 28px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--fg-mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.02em;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.8);
  animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}

.link {
  --link-glow: rgba(255, 255, 255, 0.25);
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--fg);
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
  overflow: hidden;
}

.link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120px 80px at var(--mx, 50%) var(--my, 50%), var(--link-glow), transparent 70%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.link:hover,
.link:focus-visible {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
  outline: none;
}

.link:hover::before,
.link:focus-visible::before {
  opacity: 1;
}

.link:active {
  transform: translateY(0);
}

.link .icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px var(--link-glow));
  transition: transform var(--transition);
}

.link:hover .icon {
  transform: scale(1.1);
}

.link-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 1;
  text-align: left;
  min-width: 0;
}

.link-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

.link-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.arrow {
  width: 18px;
  height: 18px;
  color: var(--fg-mute);
  flex-shrink: 0;
  transition: transform var(--transition), color var(--transition);
}

.link:hover .arrow {
  color: var(--fg);
  transform: translate(2px, -2px);
}

.link.tg { --link-glow: rgba(56, 165, 240, 0.4); }
.link.gh { --link-glow: rgba(168, 168, 255, 0.35); }
.link.mail { --link-glow: rgba(255, 200, 120, 0.35); }

.link.tg:hover .icon { color: #38a5f0; }
.link.gh:hover .icon { color: #ffffff; }
.link.mail:hover .icon { color: #ffc878; }

.footer {
  margin-top: 28px;
  font-size: 12px;
  color: var(--fg-mute);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer a {
  color: var(--fg-dim);
  text-decoration: none;
  transition: color var(--transition);
}

.footer a:hover {
  color: var(--fg);
}

.sep {
  opacity: 0.5;
}

@media (max-width: 420px) {
  .card {
    padding: 28px 20px;
    border-radius: 22px;
  }
  .link {
    padding: 12px 14px;
    gap: 12px;
  }
  .link-value {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  #starfield {
    display: none;
  }
}
