/* ============================================================
   PREMIUM EFFECTS
   ============================================================ */

/* ── Loading Screen ── */
#loader {
  position: fixed; inset: 0; z-index: 99999;
  background: #0f0520;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2rem;
  transition: opacity .6s ease, visibility .6s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-logo {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.4rem; color: #fff;
  letter-spacing: .1em;
  animation: loader-glow 1.5s ease-in-out infinite alternate;
}
.loader-logo span { color: #f472b6; }
@keyframes loader-glow {
  from { text-shadow: 0 0 10px rgba(244,114,182,.4), 0 0 30px rgba(244,114,182,.2); }
  to   { text-shadow: 0 0 20px rgba(244,114,182,.8), 0 0 60px rgba(244,114,182,.4); }
}

.loader-bar-wrap {
  width: 180px; height: 3px;
  background: rgba(255,255,255,.08);
  border-radius: 0; overflow: hidden;
}
.loader-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #f472b6, #fbcfe8);
  animation: loader-fill 1.2s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes loader-fill { to { width: 100%; } }

.loader-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem; color: rgba(255,255,255,.3);
  letter-spacing: .2em; text-transform: uppercase;
}

/* ── Custom Cursor ring (desktop only — default pointer stays visible) ── */

#cursor-dot {
  position: fixed; pointer-events: none; z-index: 99998;
  width: 8px; height: 8px; border-radius: 50%;
  background: #f472b6;
  transform: translate(-50%, -50%);
  transition: width .15s, height .15s, background .15s, opacity .3s;
  will-change: transform;
}
#cursor-ring {
  position: fixed; pointer-events: none; z-index: 99997;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid rgba(244,114,182,.5);
  transform: translate(-50%, -50%);
  transition: width .25s ease, height .25s ease, border-color .25s, opacity .3s, background .2s;
  will-change: transform;
}

body.cursor-hover #cursor-ring {
  width: 52px; height: 52px;
  border-color: rgba(244,114,182,.7);
  background: rgba(244,114,182,.06);
}

#cursor-dot { display: none; }
@media (pointer: coarse) { #cursor-ring { display: none; } }

/* ── Hero Floating Tech Badges ── */
.hero-float-badges {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  overflow: hidden;
}
.float-badge {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem; font-weight: 500;
  padding: .3rem .7rem; border-radius: 4px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(244,114,182,.2);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.45);
  white-space: nowrap;
  animation: float-drift 6s ease-in-out infinite;
  display: none;
}
@media (min-width: 1024px) { .float-badge { display: block; } }

.float-badge:nth-child(1) { top: 18%; left: 62%; animation-delay: 0s; animation-duration: 7s; }
.float-badge:nth-child(2) { top: 32%; left: 75%; animation-delay: -2s; animation-duration: 8s; }
.float-badge:nth-child(3) { top: 55%; left: 68%; animation-delay: -1s; animation-duration: 6.5s; }
.float-badge:nth-child(4) { top: 70%; left: 58%; animation-delay: -3s; animation-duration: 9s; }
.float-badge:nth-child(5) { top: 22%; left: 88%; animation-delay: -1.5s; animation-duration: 7.5s; }
.float-badge:nth-child(6) { top: 78%; left: 80%; animation-delay: -0.5s; animation-duration: 8.5s; }

@keyframes float-drift {
  0%, 100% { transform: translateY(0) translateX(0); opacity: .45; }
  33%  { transform: translateY(-10px) translateX(4px); opacity: .65; }
  66%  { transform: translateY(6px) translateX(-3px); opacity: .38; }
}

/* ── Resume button in nav ── */
.nav-resume {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .38rem .9rem; border-radius: 4px;
  font-size: .75rem; font-weight: 700; letter-spacing: .02em;
  background: transparent;
  color: rgba(255,255,255,.6);
  border: 1.5px solid rgba(255,255,255,.18);
  transition: all .2s;
  white-space: nowrap;
}
.nav-resume svg { width: 12px; height: 12px; }
.nav-resume:hover {
  background: rgba(244,114,182,.12);
  border-color: rgba(244,114,182,.5);
  color: var(--violet-glow);
}
#navbar.light-nav .nav-resume {
  color: var(--text-muted);
  border-color: var(--border);
}
#navbar.light-nav .nav-resume:hover {
  background: var(--violet-soft);
  border-color: var(--violet);
  color: var(--violet);
}
@media (max-width: 768px) { .nav-resume { display: none; } }

/* ── "What I Build" service cards ── */
#services {
  background: var(--white);
  border-top: 1px solid var(--border);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 900px) { .services-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px; padding: 2rem 1.75rem;
  position: relative; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
  box-shadow: 4px 4px 0 0 rgba(0,0,0,.07);
}
.service-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--service-color, var(--violet)), transparent);
  opacity: 0; transition: opacity .3s;
}
.service-card:hover { transform: translate(-3px, -3px); border-color: var(--service-color, var(--violet)); }
.service-card:hover::before { opacity: 1; }
.service-card:hover { box-shadow: 6px 6px 0 0 var(--service-color, var(--violet)); }

.service-card:nth-child(1) { --service-color: #f472b6; }
.service-card:nth-child(2) { --service-color: #34d399; }
.service-card:nth-child(3) { --service-color: #60a5fa; }

.service-icon {
  width: 48px; height: 48px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem; font-size: 1.4rem;
  background: var(--service-bg, var(--violet-soft));
  border: 1.5px solid var(--service-border, rgba(244,114,182,.2));
}
.service-card:nth-child(1) .service-icon { --service-bg: rgba(244,114,182,.08); --service-border: rgba(244,114,182,.2); }
.service-card:nth-child(2) .service-icon { --service-bg: rgba(52,211,153,.08); --service-border: rgba(52,211,153,.2); }
.service-card:nth-child(3) .service-icon { --service-bg: rgba(96,165,250,.08); --service-border: rgba(96,165,250,.2); }

.service-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.05rem; font-weight: 800;
  color: var(--text); margin-bottom: .6rem;
  letter-spacing: -.02em;
}
.service-desc {
  font-size: .85rem; color: var(--text-muted);
  line-height: 1.7;
}
.service-tags {
  display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1rem;
}
.service-tag {
  font-size: .68rem; font-weight: 600; padding: .2rem .55rem;
  border-radius: 3px; background: var(--light-2);
  color: var(--text-muted); border: 1px solid var(--border);
}

/* ── Skill level dots ── */
.skill-level {
  display: inline-flex; gap: 3px; align-items: center;
  margin-left: auto; flex-shrink: 0;
}
.skill-level-dot {
  width: 5px; height: 5px; border-radius: 0;
  background: var(--border);
}
.skill-level-dot.filled { background: var(--violet); }

/* ── Glassmorphism card variant ── */
.glass-card {
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
}

/* ── Gradient border on section headers ── */
.section-header::after {
  content: '';
  display: block;
  width: 40px; height: 3px;
  background: linear-gradient(90deg, var(--violet), var(--violet-glow));
  margin-top: 1.25rem;
  border-radius: 0;
}

/* ── Better hero gradient mesh background ── */
.hero-mesh {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 30% 40% at 20% 40%, rgba(244,114,182,.07) 0%, transparent 100%),
    radial-gradient(ellipse 25% 35% at 70% 20%, rgba(192,132,252,.1) 0%, transparent 100%),
    radial-gradient(ellipse 20% 25% at 50% 80%, rgba(96,165,250,.06) 0%, transparent 100%);
}

/* ── Stats enhancement ── */
.stat-icon {
  width: 28px; height: 28px; border-radius: 4px;
  background: var(--violet-soft);
  border: 1px solid rgba(244,114,182,.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 13px; height: 13px; color: var(--violet); }

/* ── Timeline enhancements ── */
.timeline-body { position: relative; overflow: hidden; }
.timeline-body::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(244,114,182,.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Back to top glow ── */
#back-to-top {
  box-shadow: 4px 4px 0 0 rgba(0,0,0,.2), 0 0 20px rgba(244,114,182,.0);
  transition: opacity .3s ease, transform .3s ease, background .2s, box-shadow .2s;
}
#back-to-top.visible {
  animation: btop-appear .3s ease forwards;
}
@keyframes btop-appear {
  from { opacity: 0; transform: translateY(16px) scale(.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Scroll progress shimmer ── */
#scroll-progress {
  background: linear-gradient(90deg, #ec4899, #f472b6, #fbcfe8, #f472b6);
  background-size: 200% 100%;
  animation: progress-shimmer 2s linear infinite;
}
@keyframes progress-shimmer {
  from { background-position: 100% 0; }
  to   { background-position: -100% 0; }
}

/* ── Project card "live" indicator ── */
.project-live-dot {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .66rem; font-weight: 600; color: #059669;
}
.project-live-dot::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74,222,128,.8);
  animation: dot-pulse 2s step-end infinite;
  flex-shrink: 0;
}

/* ── Dark mode overrides for premium ── */
[data-theme="dark"] #services {
  background: #130926;
  background-image: radial-gradient(circle, rgba(244,114,182,.07) 1px, transparent 1px);
  background-size: 22px 22px;
}
[data-theme="dark"] .service-card {
  background: #231050; border-color: rgba(244,114,182,.12);
  box-shadow: 4px 4px 0 0 rgba(0,0,0,.4);
}
[data-theme="dark"] .service-card:hover { border-color: var(--service-color); box-shadow: 6px 6px 0 0 var(--service-color); }
[data-theme="dark"] .service-title { color: #f3e8ff; }
[data-theme="dark"] .service-desc { color: rgba(255,255,255,.55); }
[data-theme="dark"] .service-tag { background: rgba(244,114,182,.06); color: rgba(255,255,255,.45); border-color: rgba(244,114,182,.15); }
[data-theme="dark"] .service-card:nth-child(1) .service-icon { --service-bg: rgba(244,114,182,.12); }
[data-theme="dark"] .service-card:nth-child(2) .service-icon { --service-bg: rgba(52,211,153,.1); }
[data-theme="dark"] .service-card:nth-child(3) .service-icon { --service-bg: rgba(96,165,250,.1); }

[data-theme="dark"] .glass-card {
  background: rgba(35,16,80,.65);
  border-color: rgba(244,114,182,.15);
}
[data-theme="dark"] .float-badge {
  background: rgba(15,5,32,.5);
  border-color: rgba(244,114,182,.2);
  color: rgba(255,255,255,.3);
}
[data-theme="dark"] .section-header::after {
  background: linear-gradient(90deg, var(--violet), var(--violet-glow));
}
[data-theme="dark"] .skill-level-dot.filled { background: var(--violet-glow); }
[data-theme="dark"] .skill-level-dot { background: rgba(244,114,182,.15); }
