/* ================================================
   SHAHNAWAZ HUSSAIN — Ultimate Final CSS
   ================================================ */

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

:root {
  --bg:            #06060a;
  --bg-card:       rgba(255,255,255,0.026);
  --bg-card-glass: rgba(12,12,18,0.6);

  --text-main:  #f4f4f6;
  --text-sub:   #a1a1aa;
  --text-dim:   #52525b;

  --violet: #8b5cf6;
  --cyan:   #22d3ee;
  --rose:   #f43f5e;
  --green:  #4ade80;

  --border: rgba(255,255,255,0.08);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --smooth: cubic-bezier(0.25, 1, 0.5, 1);
}

html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-main);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--violet); color: #fff; }

/* ── PROGRESS BAR ─────────────────────────────── */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--violet), var(--cyan), var(--rose));
  background-size: 200% 100%;
  animation: shimmer-bar 1.5s linear infinite;
  z-index: 10000;
  pointer-events: none;
  transition: width 0.6s var(--smooth), opacity 0.4s;
}
@keyframes shimmer-bar {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* ── CANVAS PARTICLES ─────────────────────────── */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

/* ── CURSOR ───────────────────────────────────── */
.cursor {
  position: fixed;
  width: 34px; height: 34px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--smooth), height 0.25s var(--smooth),
              border-color 0.25s, background 0.25s, opacity 0.3s;
  mix-blend-mode: difference;
}
.cursor.hovering {
  width: 50px; height: 50px;
  border-color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.05);
}
.cursor-dot {
  position: fixed;
  width: 4px; height: 4px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}

/* ── AMBIENT ORBS ─────────────────────────────── */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.bg-orb-1 {
  width: 650px; height: 650px;
  top: -20%; left: -15%;
  background: radial-gradient(circle, rgba(139,92,246,0.16), transparent 70%);
  animation: drift-a 20s ease-in-out infinite alternate;
}
.bg-orb-2 {
  width: 550px; height: 550px;
  top: 5%; right: -18%;
  background: radial-gradient(circle, rgba(34,211,238,0.14), transparent 70%);
  animation: drift-b 24s ease-in-out infinite alternate;
}
.bg-orb-3 {
  width: 450px; height: 450px;
  bottom: -5%; left: 25%;
  background: radial-gradient(circle, rgba(244,63,94,0.09), transparent 70%);
  animation: drift-c 16s ease-in-out infinite alternate;
}
@keyframes drift-a { from { transform: translate(0,0); } to { transform: translate(70px, 90px) scale(1.12); } }
@keyframes drift-b { from { transform: translate(0,0); } to { transform: translate(-55px, 65px) scale(1.09); } }
@keyframes drift-c { from { transform: translate(0,0); } to { transform: translate(40px, -55px) scale(1.06); } }

.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 10%, transparent 75%);
}
.bg-vignette {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.75) 100%);
}

/* ── TOAST ────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(20,20,28,0.95);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #fff;
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 9000;
  opacity: 0;
  transition: all 0.4s var(--spring);
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast svg { color: var(--green); }

/* ── LAYOUT ───────────────────────────────────── */
.page-container {
  position: relative; z-index: 10;
  max-width: 560px; margin: 0 auto;
  padding: 94px 24px 72px;
  display: flex; flex-direction: column;
  align-items: center; gap: 52px;
}

/* ── STATUS BADGE ─────────────────────────────── */
.status-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 100px;
  font-size: 0.72rem; color: var(--text-sub);
  letter-spacing: 0.05em; font-weight: 500;
  margin-bottom: 20px;
  backdrop-filter: blur(12px);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green), 0 0 16px rgba(74,222,128,0.4);
  animation: pulse-dot 2.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.8); }
}

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

/* ── NAME ─────────────────────────────────────── */
.profile-name {
  font-size: clamp(2.6rem, 9vw, 3.9rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 30px;
  background: linear-gradient(125deg, #fff 0%, #d4d4d8 40%, #fff 55%, #a1a1aa 80%, #fff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer-name 5s ease-in-out infinite;
  white-space: nowrap;
  min-height: 1.1em; /* reserve space during typewriter */
}
@keyframes shimmer-name {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Typewriter cursor */
.type-cursor {
  display: inline-block;
  width: 3px; margin-left: 2px;
  background: var(--violet);
  border-radius: 2px;
  animation: blink 0.85s step-end infinite;
  vertical-align: baseline;
  font-size: 0.75em;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
.type-cursor.done { animation: none; opacity: 0; }

/* ── QUOTE CARD ───────────────────────────────── */
.profile-quote {
  position: relative;
  padding: 26px 34px;
  background: linear-gradient(145deg, rgba(255,255,255,0.055), rgba(255,255,255,0.012));
  border-radius: 22px;
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  box-shadow: 0 30px 60px -15px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.12);
  max-width: 91%; margin: 0 auto;
  display: flex; align-items: flex-start; gap: 10px;
  transition: transform 0.45s var(--spring), box-shadow 0.45s ease;
  cursor: default;
}
/* Animated gradient border */
.profile-quote::before {
  content: "";
  position: absolute; inset: -1.5px;
  border-radius: 23.5px;
  background: linear-gradient(135deg, rgba(139,92,246,0.5), rgba(34,211,238,0.4), rgba(244,63,94,0.4), rgba(139,92,246,0.5));
  background-size: 300% 300%;
  animation: border-rotate 5s linear infinite;
  z-index: -1;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 1.5px;
  opacity: 0.65;
  transition: opacity 0.4s;
}
@keyframes border-rotate {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.profile-quote:hover { transform: translateY(-3px) scale(1.015); }
.profile-quote:hover::before { opacity: 1; }

.quote-mark {
  font-size: 2rem; font-family: Georgia, serif; line-height: 1;
  color: rgba(139,92,246,0.5); user-select: none; flex-shrink: 0; margin-top: -2px;
}
.quote-mark-close { align-self: flex-end; margin-bottom: -4px; }

.profile-quote p {
  font-size: 1.2rem; color: #ebebee;
  font-weight: 400; line-height: 1.68;
  letter-spacing: 0.01em; text-align: center; flex: 1;
}

/* ── SECTION LABEL ────────────────────────────── */
.links-section { width: 100%; display: flex; flex-direction: column; gap: 18px; }
.section-label-container { display: flex; align-items: center; gap: 14px; }
.label-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }
.section-label {
  font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.22em; color: var(--text-dim); font-weight: 700; white-space: nowrap;
}

/* ── CARDS ────────────────────────────────────── */
.cards-grid { display: flex; flex-direction: column; gap: 10px; width: 100%; }

/* Card click ripple */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(var(--brand-color-rgb, 139,92,246), 0.25);
  transform: scale(0);
  animation: ripple-out 0.55s var(--smooth) forwards;
  pointer-events: none;
  z-index: 10;
}
@keyframes ripple-out {
  to { transform: scale(4); opacity: 0; }
}

.card {
  position: relative; border-radius: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  cursor: none; text-decoration: none;
  transition: transform 0.5s var(--spring), border-color 0.3s, box-shadow 0.3s;
  transform-style: preserve-3d; will-change: transform; overflow: hidden;
}
/* Card shine sweep on hover */
.card::after {
  content: "";
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.04) 50%, transparent 70%);
  opacity: 0; transition: opacity 0.3s; pointer-events: none; z-index: 3;
}
.card:hover::after { opacity: 1; }

.card-spotlight {
  position: absolute; inset: -1px; border-radius: inherit;
  background: radial-gradient(
    480px circle at var(--mx, -400px) var(--my, -400px),
    rgba(var(--brand-color-rgb,139,92,246), 0.16), transparent 55%
  );
  z-index: 1; pointer-events: none;
  opacity: 0; transition: opacity 0.45s;
}
.card:hover .card-spotlight { opacity: 1; }

.card-content {
  position: relative; z-index: 2;
  display: flex; align-items: center;
  padding: 18px 20px; gap: 15px;
  background: var(--bg-card-glass);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-radius: inherit;
  transform: translateZ(20px);
}

.card-icon-wrap {
  width: 40px; height: 40px; border-radius: 11px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.4s var(--spring);
}
.card-icon { width: 19px; height: 19px; color: var(--text-sub); transition: color 0.3s, transform 0.35s var(--spring); }

.card-text { flex: 1; min-width: 0; }
.card-text h3 { font-size: 0.95rem; font-weight: 700; color: var(--text-main); letter-spacing: -0.01em; }
.card-text span { font-size: 0.78rem; color: var(--text-sub); margin-top: 2px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.card-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.copy-btn {
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-dim); cursor: none;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateX(-6px);
  transition: all 0.35s var(--spring);
}
.copy-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-main); }

.card-arrow {
  color: var(--text-dim);
  opacity: 0; transform: translateX(-8px);
  transition: all 0.4s var(--spring); flex-shrink: 0;
}

/* ── CARD HOVER STATES ────────────────────────── */
.card:hover {
  border-color: rgba(var(--brand-color-rgb,139,92,246), 0.3);
  box-shadow: 0 0 0 1px rgba(var(--brand-color-rgb,139,92,246),0.08),
              0 18px 40px -10px rgba(0,0,0,0.55),
              0 4px 12px -4px rgba(var(--brand-color-rgb,139,92,246),0.1);
}
.card:hover .card-icon-wrap {
  background: rgba(var(--brand-color-rgb,139,92,246), 0.12);
  border-color: rgba(var(--brand-color-rgb,139,92,246), 0.28);
}
.card:hover .card-icon { color: var(--brand-color, #fff); transform: scale(1.1); }
.card:hover .copy-btn  { opacity: 1; transform: translateX(0); }
.card:hover .card-arrow { opacity: 1; transform: translateX(0); color: var(--brand-color, var(--text-sub)); }

/* ── FOOTER ───────────────────────────────────── */
.footer { text-align: center; }
.footer p {
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  transition: color 0.3s;
}
.footer p:hover { color: var(--text-sub); }

/* ── ANIMATIONS ───────────────────────────────── */
.fade-in-up {
  opacity: 0; transform: translateY(22px);
  animation: fadeUp 0.85s var(--smooth) forwards;
}
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 520px) {
  body { cursor: auto; }
  .cursor, .cursor-dot { display: none; }
  .page-container { padding: 56px 18px 48px; gap: 36px; }
  .profile-name { font-size: clamp(1.9rem, 8vw, 2.4rem); white-space: normal; word-break: break-word; }
  .profile-quote { padding: 22px 20px; max-width: 100%; }
  .profile-quote p { font-size: 1.05rem; }
  .card-content { padding: 15px 16px; }
}
