/* =========================
   Core Theme
   ========================= */
:root{
  --bg: #333333;
  --text: #ffffff;
  --muted: #cfd2d6;
  --card: rgba(255, 255, 255, 0.06);
  --card-stroke: rgba(255, 255, 255, 0.12);
  --accent: #09a679;
  --accent-2: #18e1b0;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

#bg-canvas{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* =========================
   Layout
   ========================= */
.wrap{
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 28px);
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid var(--card-stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* =========================
   Profile
   ========================= */
.profile{
  text-align: center;
  padding: clamp(20px, 5vw, 36px);
  position: relative;
  overflow: clip;
}

.avatar-wrap{
  position: relative;
  display: inline-block;
  margin: 6px 0 18px 0;
  width: 128px;
  height: 128px;
}

.photo{
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.18);
  box-shadow: 0 6px 30px rgba(0,0,0,.35);
}

.ring{
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  background:
    conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent));
  filter: blur(10px) saturate(1.2);
  opacity: .65;
  animation: spin 8s linear infinite;
  z-index: -1;
}

@keyframes spin { to { transform: rotate(360deg); } }

.profile_name{
  font-size: clamp(24px, 6vw, 34px);
  font-weight: 800;
  letter-spacing: .2px;
}

.at{
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .3px;
}

/* =========================
   Buttons
   ========================= */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 12px;
  font-weight: 700;
  transition: transform .2s ease, filter .2s ease, background .3s ease, border-color .3s ease;
  will-change: transform;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn i{ font-size: 1.1rem; }

.btn-primary{
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 30px rgba(9,166,121,.45);
}

.btn-ghost{
  background: transparent;
  border: 1px solid var(--card-stroke);
  color: #fff;
}

.btn:hover{ transform: translateY(-2px); }
.btn:active{ transform: translateY(0); }

.cta-row{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
}

@media (min-width: 520px){
  .cta-row{ grid-template-columns: 1fr 1fr; }
}

/* =========================
   Link Cards Grid
   ========================= */
.grid{
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.grid-2{ grid-template-columns: 1fr 1fr; }
@media (max-width: 420px){
  .grid-2{ grid-template-columns: 1fr; }
}

.link-card{
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 18px 16px;
  text-align: center;
  font-weight: 700;
  min-height: 86px;
  position: relative;
  isolation: isolate;
}

.link-card i{
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 16px rgba(9,166,121,.35));
}

.link-card::after{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius: inherit;
  padding:1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.05));
  -webkit-mask: 
    linear-gradient(#000 0 0) content-box, 
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  z-index: -1;
}

.link-card:hover{
  border-color: rgba(255,255,255,.28);
  transform: translateY(-2px);
}

/* =========================
   Footer
   ========================= */
.footer{
  text-align: center;
  color: var(--muted);
  margin: 22px 0 10px 0;
  font-size: .9rem;
}

/* =========================
   Micro Animations
   ========================= */
.pulse{
  animation: pulse 1.2s ease-in-out 2 alternate;
}
@keyframes pulse{
  from { transform: scale(1); }
  to   { transform: scale(1.05); }
}

/* Tilt (soft) */
[data-tilt]{
  transform-style: preserve-3d;
  perspective: 800px;
}

/* Ripple (JS injects .ripple) */
.ripple{
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  pointer-events: none;
  background: rgba(255,255,255,.5);
  width: 10px; height: 10px;
  animation: ripple .6s ease-out forwards;
}
@keyframes ripple{
  from { opacity: .45; transform: translate(-50%,-50%) scale(.8); }
  to   { opacity: 0;    transform: translate(-50%,-50%) scale(18); }
}

/* Accessibility: reduce motion */
@media (prefers-reduced-motion: reduce){
  .ring, .pulse, .ripple { animation: none !important; }
  [data-tilt]{ transform: none !important; }
}
