/* ════════════════════════════════════════════════════════
   STYLE.CSS — Global Design System
   Portfolio of Sasindu Maleesha
   ════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

/* ─── CSS Custom Properties ─── */
:root {
  --bg:               #050505;
  --bg-secondary:     #0a0a0f;
  --glass-bg:         rgba(255, 255, 255, 0.04);
  --glass-bg-hover:   rgba(255, 255, 255, 0.07);
  --glass-border:     rgba(255, 255, 255, 0.08);
  --glass-border-h:   rgba(255, 255, 255, 0.15);

  /* Accent palette */
  --lavender:         #a78bfa;
  --lavender-dim:     rgba(167, 139, 250, 0.15);
  --lavender-glow:    rgba(167, 139, 250, 0.35);
  --blue:             #60a5fa;
  --blue-dim:         rgba(96, 165, 250, 0.12);
  --blue-glow:        rgba(96, 165, 250, 0.3);

  /* Text */
  --text-primary:     #f0f0f8;
  --text-secondary:   #8b8ba7;
  --text-muted:       #4a4a6a;

  /* Spacing */
  --radius-sm:        8px;
  --radius-md:        16px;
  --radius-lg:        24px;
  --radius-xl:        32px;

  /* Transitions */
  --ease-out-expo:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:      cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--lavender-dim); color: var(--lavender); }
a { text-decoration: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--lavender-dim); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--lavender); }

/* ─── Glassmorphism Utility ─── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}
.glass:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-h);
}

/* ─── Glow Utilities ─── */
.glow-lavender {
  box-shadow: 0 0 30px var(--lavender-glow), 0 0 60px rgba(167,139,250,0.12);
}
.glow-blue {
  box-shadow: 0 0 30px var(--blue-glow), 0 0 60px rgba(96,165,250,0.1);
}
.text-glow-lavender { text-shadow: 0 0 20px var(--lavender-glow); }
.text-glow-blue { text-shadow: 0 0 20px var(--blue-glow); }

/* ─── Background Orbs ─── */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
}
.orb-lavender {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--lavender) 0%, transparent 70%);
  top: -200px; right: -200px;
  animation: orb-drift-1 18s ease-in-out infinite alternate;
}
.orb-blue {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--blue) 0%, transparent 70%);
  bottom: -150px; left: -150px;
  animation: orb-drift-2 22s ease-in-out infinite alternate;
}

@keyframes orb-drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-80px, 80px) scale(1.1); }
}
@keyframes orb-drift-2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, -60px) scale(1.08); }
}

/* ─── Float animation (passive) ─── */
@keyframes float-passive {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-8px) rotate(0.5deg); }
  66% { transform: translateY(-4px) rotate(-0.5deg); }
}
.float-passive { animation: float-passive 6s ease-in-out infinite; }

/* ─── Section reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.06);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn:hover::after { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--lavender), var(--blue));
  color: #fff;
  box-shadow: 0 4px 24px rgba(167,139,250,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(167,139,250,0.45);
}

.btn-ghost {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  border-color: var(--lavender);
  color: var(--lavender);
  box-shadow: 0 0 20px var(--lavender-dim);
  transform: translateY(-2px);
}

/* ─── Section container ─── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
section { position: relative; z-index: 1; padding: 100px 0; }

/* ─── Section label ─── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--lavender);
  margin-bottom: 16px;
}
.section-label::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--lavender);
  display: block;
}

/* ─── Divider ─── */
.divider {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
  margin: 0 auto;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  section { padding: 70px 0; }
  .container { padding: 0 20px; }
}

/* ════════════ MARQUEE & OTP ════════════ */
.marquee-wrapper {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  margin-top: 15px;
}
.marquee {
  display: inline-flex;
  gap: 15px;
  animation: marquee-scroll 20s linear infinite;
  padding: 10px 0;
}
.marquee:hover { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ════════════ PREMIUM ABOUT SECTION ════════════ */
.about-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 40px;
}

@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
}

.profile-pic-wrapper {
    position: relative;
    padding: 15px;
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-pic-wrapper:hover {
    transform: translateY(-10px);
}

.glow-ring {
    position: absolute;
    inset: 0;
    border-radius: 30px;
    border: 2px dashed rgba(139, 92, 246, 0.5);
    animation: rotateRing 20s linear infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes rotateRing {
    100% { transform: rotate(360deg); }
}

.profile-pic {
    width: 100%;
    border-radius: 20px;
    border: 3px solid #8b5cf6;
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.4);
    position: relative;
    z-index: 2;
}

.about-content {
    padding: 3rem;
    border-radius: 25px;
}

.about-bio {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #c7d2fe;
    letter-spacing: 0.3px;
}

.skills-heading {
    color: #a78bfa;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#cf-step-2.active {
  opacity: 1 !important;
  pointer-events: all !important;
}
#cf-step-1 { transition: 0.4s; }
#cf-step-1.hidden { opacity: 0; pointer-events: none; transform: scale(0.95); }

/* ════════════ SOCIAL ICONS ════════════ */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    color: #e0e7ff;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 1.2rem;
    text-decoration: none;
}

.social-icon:hover {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border-color: #8b5cf6;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
    color: white;
}

/* ════════════ PREMIUM SKILL CATEGORIES ════════════ */
.skills-content {
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.skill-category::before {
  content: '';
  position: absolute;
  top: -50px; left: -50px;
  width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
}

.skill-cat-title {
    color: #c4b5fd;
    font-size: 1.4rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.skill-bar-wrapper { 
  width: 100%; 
  transition: transform 0.3s ease;
  margin-bottom: 24px;
}

.skill-bar-wrapper:last-child {
  margin-bottom: 0;
}

.skill-bar-wrapper:hover {
  transform: translateX(5px);
}

.sb-info {
  display: flex; justify-content: space-between; align-items: flex-end;
  font-size: 0.9rem; font-weight: 500; margin-bottom: 10px;
  color: #e2e8f0;
  letter-spacing: 0.5px;
}

.sb-name {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sb-name::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lavender);
  box-shadow: 0 0 8px var(--lavender);
}

.sb-pct { 
  color: #fff; 
  font-weight: 800; 
  font-size: 1rem;
  background: linear-gradient(135deg, #fff, var(--lavender));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(167,139,250,0.5);
}

.sb-track {
  width: 100%; height: 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}

.sb-fill {
  width: 0%; height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #3b82f6);
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.6);
  transition: width 2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

/* Add a shimmering highlight inside the progress bar */
.sb-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: translateX(-100%);
  animation: shimmer 2.5s infinite linear;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

/* ════════════ RESPONSIVE ABOUT BIO CARD ════════════ */
.about-bio-card {
    margin-top: 30px;
    max-width: 900px;
    text-align: center;
    padding: 4rem;
    position: relative;
    width: 100%;
}

.about-bio-card p.about-bio {
    font-size: 1.25rem;
    line-height: 1.9;
}

.bio-glow-backdrop {
    position: absolute; 
    top: -50px; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 200px; 
    height: 200px; 
    background: radial-gradient(circle, rgba(167, 139, 250, 0.15) 0%, transparent 70%); 
    border-radius: 50%; 
    pointer-events: none; 
    z-index: -1;
}

/* Base style for Social Links in Contact Section */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap; /* Prevents overflow */
}

/* ─── Mobile specific alignments ─── */
@media (max-width: 768px) {
    .about-bio-card {
        padding: 2.5rem 1.5rem; /* Shrink the massive desktop padding */
        margin-top: 15px;
    }
    .about-bio-card p.about-bio {
        font-size: 1.05rem; /* Optimize typography for smaller screens */
        line-height: 1.6;
    }
    .social-links {
        justify-content: center !important; /* Force social icons to center inside the contact box on mobile */
    }
    .contact-info {
        text-align: center; /* Center the text above the social links too */
    }
    .contact-links {
        justify-content: center;
    }
    .contact-link {
        justify-content: center;
    }
}
