:root {
  --bg: #f4f3ef;
  --fg: #0d0f14;
  --muted: #6e6c66;
  --muted-2: #7c7a71;
  --accent: #204dfd;
  --line: rgba(13, 15, 20, 0.13);
  --line-soft: rgba(13, 15, 20, 0.07);
  --font-display: "Bricolage Grotesque", ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-highlight: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
  --font-sans: "Inter Tight", ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 76px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

html:not(.lenis) {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html:not(.lenis) {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100svh;
  background-color: var(--bg);
  background-image:
    radial-gradient(90% 60% at 50% 0%, rgba(32, 77, 253, 0.075), transparent 62%),
    radial-gradient(70% 50% at 50% 110%, rgba(32, 77, 253, 0.04), transparent 65%);
  background-repeat: no-repeat;
  color: var(--fg);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10000;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 500;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 80;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
}

.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 150;
  height: 2px;
  background: rgba(13, 15, 20, 0.06);
}

.progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7d9bff);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
  animation: pulse 2.6s var(--ease) infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(32, 77, 253, 0.4);
  }
  55% {
    box-shadow: 0 0 0 6px rgba(32, 77, 253, 0);
  }
}

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

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.25rem var(--gutter);
  padding-top: max(1.25rem, env(safe-area-inset-top));
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
  border-bottom: 1px solid transparent;
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.site-header.is-scrolled {
  padding-top: max(0.9rem, env(safe-area-inset-top));
  padding-bottom: 0.9rem;
  background: rgba(244, 243, 239, 0.78);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom-color: var(--line-soft);
}

.brand {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.brand span {
  color: var(--accent);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Page */
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 820px;
  min-height: 100svh;
  margin-inline: auto;
  padding: calc(var(--header-h) + clamp(1.5rem, 4vh, 3rem)) var(--gutter) max(1.5rem, env(safe-area-inset-bottom));
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

/* Profile */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}

.avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(172px, min(42vw, 24vh), 248px);
  aspect-ratio: 1;
  margin-bottom: 1.1rem;
}

.avatar-orbit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--muted);
  opacity: 0.72;
  animation: spin 32s linear infinite;
}

.avatar-orbit text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0;
  fill: currentColor;
}

.avatar-orbit .orbit-highlight {
  font-family: var(--font-highlight);
  font-style: italic;
  fill: var(--accent);
}

.avatar {
  position: relative;
  z-index: 1;
  width: clamp(88px, 11vw, 118px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 60%, rgba(32, 77, 253, 0.95) 82%, transparent 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1.5px));
  animation: spin 6s linear infinite;
}

.profile-name {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(3rem, 7.5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.profile-name .word {
  display: inline-flex;
  overflow: hidden;
  padding-block: 0.06em;
}

.profile-name .char {
  display: inline-block;
  will-change: transform;
}

.profile-name .accent {
  color: var(--accent);
}

/* Links */
.links {
  display: grid;
  gap: 0.8rem;
  width: 100%;
  max-width: 610px;
  margin-top: clamp(2rem, 5vh, 3.2rem);
}

.link-card {
  position: relative;
  display: block;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 1px 2px rgba(13, 15, 20, 0.03);
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), background 0.4s var(--ease);
}

.link-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease);
}

.link-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.95rem;
  width: 100%;
  will-change: transform;
}

.link-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--muted);
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}

.link-icon svg {
  width: 21px;
  height: 21px;
}

.link-icon--play {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.38);
  color: #fff;
}

.link-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.link-title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.link-sub {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  transition: color 0.4s var(--ease);
}

.link-arrow {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.45s var(--ease);
}

.link-arrow svg {
  width: 15px;
  height: 15px;
}

.link-card--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.link-card--primary::before {
  background: var(--fg);
}

.link-card--primary .link-sub {
  color: rgba(255, 255, 255, 0.74);
}

.link-card--primary .link-arrow {
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
}

.link-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  color: #fff;
}

.link-card:hover::before {
  transform: scaleY(1);
}

.link-card:hover .link-icon {
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
}

.link-card--primary:hover {
  border-color: var(--fg);
}

.link-card:hover .link-sub {
  color: rgba(255, 255, 255, 0.74);
}

.link-card:hover .link-arrow {
  background: #fff;
  border-color: #fff;
  color: var(--accent);
  transform: rotate(45deg);
}

.link-card:active {
  transform: translateY(0) scale(0.995);
}

/* Socials */
.socials {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-top: clamp(2.2rem, 5vh, 3.4rem);
}

.socials-label {
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  color: var(--muted-2);
}

.social-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}

.social-icon {
  --brand: var(--muted);
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--brand);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), color 0.4s var(--ease), transform 0.4s var(--ease);
}

.social-icon--instagram {
  --brand: #e4405f;
}

.social-icon--tiktok {
  --brand: #010101;
}

.social-icon--youtube {
  --brand: #ff0000;
}

.social-icon svg {
  width: 19px;
  height: 19px;
}

.social-tip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  padding: 0.35rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--fg);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  white-space: nowrap;
  color: var(--bg);
  opacity: 0;
  transform: translate(-50%, -4px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  pointer-events: none;
}

.social-icon:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  transform: translateY(-4px);
}

.social-icon--instagram:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-color: transparent;
}

.social-icon:hover .social-tip {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Footer */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  width: 100%;
  max-width: 610px;
  margin-top: auto;
  padding-top: clamp(2.5rem, 6vh, 4rem);
}

.email-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 1.6rem;
  width: 100%;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  color: var(--muted-2);
}

.footer-time {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-variant-numeric: tabular-nums;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(2rem, env(safe-area-inset-bottom));
  z-index: 9400;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 20px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Responsive */
@media (max-width: 640px) {
  :root {
    --header-h: 68px;
  }

  .page {
    padding-top: calc(var(--header-h) + 1.25rem);
  }

  .profile-name {
    font-size: clamp(2.9rem, 13vw, 4rem);
  }

  .link-card {
    padding: 0.75rem 0.8rem;
    border-radius: 16px;
  }

  .link-inner {
    gap: 0.75rem;
  }

  .link-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .link-icon svg {
    width: 19px;
    height: 19px;
  }

  .link-arrow {
    width: 33px;
    height: 33px;
  }

  .link-sub {
    font-size: 0.65rem;
  }

  .social-icon {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 380px) {
  .link-icon {
    width: 38px;
    height: 38px;
  }

  .link-title {
    font-size: 1rem;
  }

  .link-arrow {
    width: 30px;
    height: 30px;
  }

  .social-icons {
    gap: 0.5rem;
  }

  .social-icon {
    width: 39px;
    height: 39px;
  }

  .header-meta {
    letter-spacing: 0.1em;
  }
}

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