:root {
  --red: #d90000;
  --red-dark: #8f0000;
  --red-soft: #ffeded;
  --ink: #080808;
  --muted: #555b66;
  --line: rgba(8, 8, 8, 0.12);
  --surface: rgba(255, 255, 255, 0.88);
  --white: #ffffff;
  --shadow: 0 24px 60px rgba(8, 8, 8, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #f4f5f7;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  margin: 0;
  background:
    linear-gradient(130deg, transparent 0 69%, rgba(217, 0, 0, 0.1) 69% 73%, transparent 73%),
    linear-gradient(132deg, transparent 0 78%, rgba(217, 0, 0, 0.95) 78% 89%, rgba(16, 0, 0, 0.98) 89% 100%),
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.95), transparent 34%),
    #eef0f3;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    repeating-linear-gradient(135deg, transparent 0 58px, rgba(255, 255, 255, 0.75) 59px 60px, transparent 61px 130px),
    radial-gradient(circle at 18% 28%, rgba(217, 0, 0, 0.08) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 17%, rgba(217, 0, 0, 0.16) 0 2px, transparent 3px);
  background-size: auto, 28px 28px, 26px 26px;
  opacity: 0.9;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: min(100%, 780px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 36px) clamp(18px, 4vw, 32px) 40px;
}

.share-backdrop {
  position: fixed;
  inset: 0;
  z-index: 6;
  background: rgba(244, 245, 247, 0.42);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity 220ms ease;
}

.share-backdrop[hidden] {
  display: none;
}

.share-backdrop.is-visible {
  opacity: 1;
}

.profile {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(8, 8, 8, 0.08);
  border-radius: 34px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.profile::before,
.profile::after {
  display: none;
  position: absolute;
  content: "";
  pointer-events: none;
}

.profile::before {
  inset: 0;
  background:
    linear-gradient(132deg, transparent 0 66%, rgba(217, 0, 0, 0.08) 66% 70%, transparent 70%),
    repeating-linear-gradient(135deg, transparent 0 54px, rgba(8, 8, 8, 0.035) 55px 56px, transparent 57px 116px);
}

.profile::after {
  right: -90px;
  bottom: -86px;
  width: 280px;
  height: 310px;
  background: linear-gradient(135deg, rgba(217, 0, 0, 0.9), rgba(72, 0, 0, 0.98));
  clip-path: polygon(52% 0, 100% 0, 48% 100%, 0 100%);
}

.brand-mark {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 20px 10px;
  letter-spacing: 0;
}

.brand-mark img {
  width: min(72vw, 360px);
  height: auto;
  object-fit: contain;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  height: clamp(240px, 58vw, 420px);
  margin-top: 2px;
}

.visual-board {
  position: absolute;
  inset: 8px 22px 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 22px;
  background:
    linear-gradient(132deg, transparent 0 58%, rgba(217, 0, 0, 0.1) 58% 63%, transparent 63%),
    linear-gradient(132deg, transparent 0 70%, rgba(217, 0, 0, 0.9) 70% 82%, rgba(22, 0, 0, 0.98) 82%),
    repeating-linear-gradient(135deg, transparent 0 58px, rgba(255, 255, 255, 0.8) 59px 60px, transparent 61px 118px),
    linear-gradient(180deg, #ffffff, #eef0f3);
  box-shadow: inset 0 0 0 1px rgba(8, 8, 8, 0.03), 0 22px 44px rgba(8, 8, 8, 0.12);
}

.visual-board::before {
  position: absolute;
  right: 7%;
  bottom: 8%;
  width: 42%;
  height: 44%;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(8, 8, 8, 0.9), rgba(8, 8, 8, 0.76)),
    repeating-linear-gradient(90deg, transparent 0 16px, rgba(217, 0, 0, 0.5) 17px 18px);
  box-shadow: 0 22px 34px rgba(8, 8, 8, 0.22);
  content: "";
}

.visual-board::after {
  position: absolute;
  right: 12%;
  bottom: 15%;
  width: 29%;
  height: 25%;
  border: 2px solid rgba(217, 0, 0, 0.75);
  border-radius: 14px;
  content: "";
}

.code-line {
  position: absolute;
  left: 9%;
  height: 4px;
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.18);
}

.line-one {
  top: 27%;
  width: 94px;
}

.line-two {
  top: 32%;
  width: 60px;
}

.line-three {
  top: 37%;
  width: 124px;
  background: rgba(217, 0, 0, 0.32);
}

.dot-grid {
  position: absolute;
  width: 64px;
  height: 64px;
  background-image: radial-gradient(circle, var(--red) 0 2px, transparent 2px);
  background-size: 16px 16px;
  opacity: 0.75;
}

.grid-one {
  top: 18%;
  left: 12%;
}

.grid-two {
  right: 15%;
  top: 25%;
}

.red-stack {
  position: absolute;
  top: 15%;
  left: 11%;
  width: 40px;
  height: 40px;
}

.red-stack::before,
.red-stack::after {
  position: absolute;
  width: 13px;
  height: 13px;
  background: var(--red);
  content: "";
  box-shadow: 16px -12px 0 var(--red), 16px 4px 0 rgba(217, 0, 0, 0.55);
}

.red-stack::after {
  left: 0;
  top: 16px;
  opacity: 0.35;
}

.device-frame {
  position: absolute;
  background: linear-gradient(180deg, #171717, #050505);
  box-shadow: 0 20px 34px rgba(8, 8, 8, 0.2);
}

.frame-one {
  right: 32%;
  bottom: 15%;
  width: 30%;
  height: 28%;
  border-radius: 16px 16px 10px 10px;
}

.frame-two {
  right: 17%;
  bottom: 8%;
  width: 16%;
  height: 46%;
  border-radius: 14px;
}

.pulse-dot {
  position: absolute;
  right: 20%;
  bottom: 28%;
  width: 54px;
  height: 54px;
  border: 2px solid rgba(217, 0, 0, 0.85);
  border-radius: 50%;
  box-shadow: 0 0 0 12px rgba(217, 0, 0, 0.12), inset 0 0 20px rgba(217, 0, 0, 0.36);
}

.profile-copy {
  position: relative;
  z-index: 2;
  margin: 18px auto 0;
  padding: 0 24px;
  text-align: center;
}

.eyebrow,
.tag {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.profile h1,
.section-heading h2,
.featured-content h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: 0;
}

.profile h1 {
  font-size: clamp(2.2rem, 9vw, 4.4rem);
  line-height: 0.9;
  text-wrap: balance;
}

.summary {
  max-width: 560px;
  margin: 16px auto 0;
  color: #252932;
  font-size: clamp(1rem, 3.5vw, 1.15rem);
  line-height: 1.55;
}

.social-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 56px);
  justify-content: center;
  gap: 14px;
  padding: 24px 20px 30px;
}

.social-strip a,
.utility-button {
  display: inline-flex;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(8, 8, 8, 0.12);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 12px 24px rgba(8, 8, 8, 0.12);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.social-strip a {
  width: 56px;
  height: 56px;
}

.social-strip i,
.utility-button i {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  font-size: 1.35rem;
  line-height: 1;
}

.social-strip a:hover,
.utility-button:hover,
.link-card:hover {
  border-color: rgba(217, 0, 0, 0.32);
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(8, 8, 8, 0.17);
}

.social-strip a:focus-visible,
.utility-button:focus-visible,
.link-card:focus-visible {
  outline: 3px solid rgba(217, 0, 0, 0.36);
  outline-offset: 3px;
}

.featured-card {
  position: relative;
  overflow: hidden;
  margin-top: 22px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 26px;
  background:
    linear-gradient(132deg, transparent 0 64%, rgba(217, 0, 0, 0.12) 64% 69%, transparent 69%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.84));
  box-shadow: 0 18px 46px rgba(8, 8, 8, 0.14);
}

.featured-card::before {
  position: absolute;
  right: -36px;
  bottom: -56px;
  width: 220px;
  height: 190px;
  background: linear-gradient(135deg, var(--red), #170000);
  clip-path: polygon(45% 0, 100% 0, 55% 100%, 0 100%);
  content: "";
}

.featured-card::after {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 74px;
  height: 74px;
  background-image: radial-gradient(circle, var(--red) 0 2px, transparent 2px);
  background-size: 14px 14px;
  content: "";
  opacity: 0.5;
}

.featured-content {
  position: relative;
  z-index: 1;
  padding: 22px 20px 24px;
}

.featured-content h2 {
  font-size: clamp(1.22rem, 4vw, 1.8rem);
  line-height: 1.05;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.feature-pills span {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid rgba(8, 8, 8, 0.1);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.78);
  color: #252932;
  font-size: 0.85rem;
  font-weight: 800;
}

.link-section {
  margin-top: 28px;
}

.section-heading {
  padding: 0 4px 14px;
}

.section-heading h2 {
  font-size: clamp(1.6rem, 6vw, 2.7rem);
  line-height: 1;
}

.link-grid {
  display: grid;
  gap: 14px;
}

.link-card {
  display: grid;
  min-height: 82px;
  grid-template-columns: 54px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 14px;
  padding: 14px 18px 14px 14px;
  border: 1px solid rgba(8, 8, 8, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 28px rgba(8, 8, 8, 0.12);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.link-card.primary {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: var(--white);
}

.link-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
}

.primary .link-icon {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
}

.link-icon i {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  font-size: 1.35rem;
  line-height: 1;
}

.link-card strong {
  display: block;
  font-size: clamp(1rem, 3.7vw, 1.16rem);
  line-height: 1.1;
}

.link-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.25;
}

.primary small {
  color: rgba(255, 255, 255, 0.84);
}

.arrow {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: currentColor;
  font-size: 0.98rem;
  line-height: 1;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 24px 0 0;
}

.utility-button {
  min-height: 56px;
  gap: 9px;
  border: 0;
  color: var(--white);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  background: var(--ink);
}

.utility-button:last-child {
  background: var(--red);
}

.share-menu {
  position: relative;
  z-index: 9;
  min-width: 0;
}

.share-menu .utility-button {
  width: 100%;
}

.share-menu.is-open #shareButton {
  box-shadow:
    0 18px 32px rgba(8, 8, 8, 0.18),
    0 0 0 4px rgba(217, 0, 0, 0.14);
}

.share-menu.is-open .share-icon {
  opacity: 0;
  transform: rotate(180deg) scale(0.6);
}

.share-menu.is-open .close-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.share-button-icons {
  position: relative;
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
}

.share-button-icons i {
  position: absolute;
  transition: opacity 180ms ease, transform 260ms ease;
}

.close-icon {
  opacity: 0;
  transform: rotate(-180deg) scale(0.6);
}

.share-panel {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 16px);
  z-index: 8;
  width: min(300px, calc(100vw - 42px));
  height: 150px;
  pointer-events: none;
  transform: translateX(-50%);
}

.share-panel[hidden] {
  display: none;
}

.share-panel.is-visible {
  pointer-events: auto;
}

.share-option {
  position: absolute;
  left: 50%;
  bottom: -6px;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(8, 8, 8, 0.08);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(8, 8, 8, 0.16);
  opacity: 0;
  transform:
    translate(-50%, 50%)
    rotate(var(--angle))
    translateX(108px)
    rotate(var(--undo))
    scale(0);
  transform-origin: center;
  transition:
    opacity 180ms ease,
    transform 260ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.share-option i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  font-size: 1.45rem;
  line-height: 1;
}

.share-option span {
  position: absolute;
  left: 50%;
  top: calc(100% + 7px);
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.88);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3px);
  transition: opacity 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.share-panel.is-visible .share-option {
  opacity: 1;
  transform:
    translate(-50%, 50%)
    rotate(var(--angle))
    translateX(108px)
    rotate(var(--undo))
    scale(1);
  transition-delay: var(--delay), var(--delay), 0ms, 0ms;
}

.share-option:hover,
.share-option:focus-visible {
  border-color: currentColor;
  box-shadow: 0 14px 24px rgba(8, 8, 8, 0.12);
}

.share-panel.is-visible .share-option:hover,
.share-panel.is-visible .share-option:focus-visible {
  transform:
    translate(-50%, 50%)
    rotate(var(--angle))
    translateX(108px)
    rotate(var(--undo))
    scale(1.1);
}

.share-option:hover span,
.share-option:focus-visible span {
  opacity: 1;
  transform: translate(-50%, 0);
}

.share-option:focus-visible {
  outline: 3px solid rgba(217, 0, 0, 0.28);
  outline-offset: 3px;
}

.share-option.whatsapp {
  color: #128c7e;
}

.share-option.facebook {
  color: #1877f2;
}

.share-option.telegram {
  color: #229ed9;
}

.share-option.x-twitter {
  color: #080808;
}

.share-option.native-share {
  color: var(--red);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(340px, calc(100vw - 36px));
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(8, 8, 8, 0.92);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 720px) {
  .profile {
    display: flex;
    min-height: auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 54px 42px;
  }

  .brand-mark {
    justify-content: center;
    padding: 0;
  }

  .hero-visual {
    grid-column: 2;
    grid-row: 2 / span 2;
    height: 500px;
    margin: 0;
  }

  .profile-copy {
    margin: 0;
    padding: 0;
    text-align: center;
  }

  .summary {
    margin-left: auto;
    margin-right: auto;
  }

  .social-strip {
    justify-content: center;
    padding: 28px 0 0;
  }

  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .link-card.primary {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .page-shell {
    padding-inline: 14px;
  }

  .profile,
  .featured-card {
    border-radius: 24px;
  }

  .link-card {
    min-height: 76px;
    grid-template-columns: 48px minmax(0, 1fr) 20px;
    gap: 10px;
    padding: 12px 14px 12px 12px;
  }

  .link-icon {
    width: 48px;
    height: 48px;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }
}

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