/* ============================================================
   style.css — KVishal Portfolio
   ============================================================ */

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

:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --border: rgba(255,255,255,0.06);
  --accent: #64ffda;
  --accent2: #ff6584;
  --accent3: #ffd166;
  --text: #e8eaf6;
  --muted: #5c6080;
  --card: rgba(255,255,255,0.025);
  --glow: rgba(100,255,218,0.12);
}

html { scroll-behavior: smooth; }
#particles-canvas { will-change: contents; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Cabinet Grotesk', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Backgrounds ── */
.bg-mesh {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  transform: translateZ(0);
  background:
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(100,255,218,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 80%, rgba(255,101,132,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 60% 30%, rgba(255,209,102,0.04) 0%, transparent 60%);
}

.bg-dots {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  transform: translateZ(0);
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ── Layout ── */
.container {
  position: relative; z-index: 1;
  max-width: 1000px; margin: 0 auto; padding: 0 32px;
}

/* ── Nav ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,15,0.88);
  transform: translateZ(0);
}

.nav-inner {
  max-width: 1000px; margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  font-family: 'Clash Display', sans-serif;
  font-weight: 700; font-size: 1.1rem;
  color: var(--accent); letter-spacing: -0.02em;
}

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--muted); text-decoration: none;
  font-size: 0.82rem; font-weight: 500; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  padding: 8px 18px;
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  border-radius: 6px;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--glow) !important; }

/* ── Hero ── */
.hero {
  padding: 140px 0 80px;
  display: grid; grid-template-columns: 1fr auto; gap: 60px; align-items: center;
}

.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.72rem; letter-spacing: 0.15em; color: var(--accent);
  margin-bottom: 24px; opacity: 0;
  animation: fadeUp 0.7s ease 0.1s forwards;
}
.hero-tag::before { content: ''; width: 20px; height: 1px; background: var(--accent); }

.hero-name {
  font-family: 'Clash Display', sans-serif;
  font-size: clamp(2.8rem, 6vw, 4.5rem); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 8px;
  opacity: 0; animation: fadeUp 0.7s ease 0.2s forwards;
}

.hero-role {
  font-size: clamp(1rem, 2.5vw, 1.4rem); font-weight: 300;
  color: var(--muted); margin-bottom: 24px;
  opacity: 0; animation: fadeUp 0.7s ease 0.3s forwards;
}
.hero-role span { color: var(--accent2); font-weight: 500; }

.hero-bio {
  font-size: 0.92rem; color: var(--muted); line-height: 1.85;
  max-width: 480px; margin-bottom: 36px;
  opacity: 0; animation: fadeUp 0.7s ease 0.4s forwards;
}

.hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  opacity: 0; animation: fadeUp 0.7s ease 0.5s forwards;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 8px;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 0.82rem; font-weight: 600;
  text-decoration: none; transition: all 0.25s ease;
}
.btn-accent { background: var(--accent); color: var(--bg); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(100,255,218,0.3); }
.btn-outline { border: 1px solid var(--border); color: var(--muted); background: var(--card); }
.btn-outline:hover { border-color: rgba(255,255,255,0.15); color: var(--text); transform: translateY(-2px); }

/* ── Avatar ── */

.avatar-ring {
  width: 160px; height: 160px; border-radius: 50%; padding: 3px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  position: relative;
}

.avatar-inner {
  width: 100%; height: 100%; border-radius: 50%;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Clash Display', sans-serif;
  font-size: 3.5rem; font-weight: 700; color: var(--accent);
  border: 3px solid var(--bg);
}

.avatar-badge {
  position: absolute; bottom: 8px; right: 0;
  background: var(--accent3); color: var(--bg);
  font-size: 0.6rem; font-weight: 700;
  padding: 3px 8px; border-radius: 20px; letter-spacing: 0.08em;
}

/* ── Stats Row ── */
.stats-row {
  display: flex; border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; margin-bottom: 80px; background: var(--card);
  opacity: 0; animation: fadeUp 0.7s ease 0.6s forwards;
}

.stat-item {
  flex: 1; padding: 24px 20px; text-align: center;
  border-right: 1px solid var(--border); transition: background 0.2s;
}
.stat-item:last-child { border-right: none; }
.stat-item:hover { background: rgba(100,255,218,0.04); }
.stat-num {
  font-family: 'Clash Display', sans-serif; font-size: 1.8rem;
  font-weight: 700; color: var(--accent); display: block;
}
.stat-label { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.1em; margin-top: 4px; display: block; }

/* ── Sections ── */
.section { margin-bottom: 80px; }

.section-header { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.section-num { font-family: 'Clash Display', sans-serif; font-size: 0.75rem; color: var(--accent); letter-spacing: 0.1em; }
.section-title { font-family: 'Clash Display', sans-serif; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; }
.section-line { flex: 1; height: 1px; background: var(--border); }

/* ── Package Card ── */
.package-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 32px; transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  position: relative; overflow: hidden;
  text-decoration: none; display: block; color: inherit;
  will-change: transform;
}
.package-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;
}
.package-card:hover { border-color: rgba(100,255,218,0.15); transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.package-card:hover::before { transform: scaleX(1); }

.pkg-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }

.pkg-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(100,255,218,0.15), rgba(100,255,218,0.05));
  border: 1px solid rgba(100,255,218,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}

.pkg-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { font-size: 0.62rem; padding: 4px 10px; border-radius: 20px; font-weight: 600; letter-spacing: 0.05em; }
.badge-green  { background: rgba(100,255,218,0.1); color: var(--accent);  border: 1px solid rgba(100,255,218,0.2); }
.badge-pink   { background: rgba(255,101,132,0.1); color: var(--accent2); border: 1px solid rgba(255,101,132,0.2); }
.badge-yellow { background: rgba(255,209,102,0.1); color: var(--accent3); border: 1px solid rgba(255,209,102,0.2); }
.badge-blue   { background: rgba(100,180,255,0.1); color: #64b4ff;        border: 1px solid rgba(100,180,255,0.2); }

.pkg-name { font-family: 'Clash Display', sans-serif; font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.pkg-desc { font-size: 0.84rem; color: var(--muted); line-height: 1.7; margin-bottom: 20px; }

.pkg-features { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.pkg-feature {
  font-size: 0.7rem; padding: 4px 10px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 4px; color: var(--muted);
}

.pkg-stats {
  display: flex; flex-direction: row; flex-wrap: nowrap; gap: 24px;
  padding-top: 20px; border-top: 1px solid var(--border);
  align-items: center;
}
.pkg-stat { display: flex; flex-direction: row; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.pkg-stat-link { color: inherit; text-decoration: none; white-space: nowrap; }
.pkg-stat-link:hover { color: var(--accent); }

.coming-soon {
  margin-top: 12px; padding: 24px 32px;
  border: 1px dashed var(--border); border-radius: 16px;
  text-align: center; color: var(--muted); font-size: 0.82rem;
}

/* ── Skills ── */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }

.skill-item {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; text-align: center;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  will-change: transform;
}
.skill-item:hover { border-color: rgba(100,255,218,0.2); background: rgba(100,255,218,0.04); transform: translateY(-2px); }
.skill-emoji { font-size: 1.5rem; display: block; margin-bottom: 8px; }
.skill-name { font-size: 0.75rem; color: var(--muted); font-weight: 500; }

/* ── Contact ── */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }

.contact-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px 24px; display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: inherit; transition: all 0.2s;
}
.contact-card:hover { border-color: rgba(100,255,218,0.2); transform: translateY(-2px); }
.contact-icon { font-size: 1.3rem; }
.contact-label { font-size: 0.7rem; color: var(--muted); margin-bottom: 2px; }
.contact-value { font-size: 0.85rem; font-weight: 600; }

/* ── Experience / Timeline ── */
.timeline { display: flex; flex-direction: column; gap: 0; }

.timeline-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0 32px;
  position: relative;
  padding-bottom: 40px;
}

/* vertical line */
.timeline-item::after {
  content: '';
  position: absolute;
  left: 168px;
  top: 8px; bottom: 0;
  width: 1px;
  background: var(--border);
}
.timeline-item:last-child::after { display: none; }

.tl-left { text-align: right; padding-right: 0; position: relative; }

/* dot */
.tl-left::after {
  content: '';
  position: absolute;
  right: -36px; top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--accent);
  z-index: 1;
}

.tl-date {
  font-size: 0.72rem; color: var(--muted);
  line-height: 1.6; font-family: 'Cabinet Grotesk', sans-serif;
}

.tl-badge {
  display: inline-block; margin-top: 6px;
  font-size: 0.58rem; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 20px;
  background: rgba(100,255,218,0.08);
  color: var(--accent);
  border: 1px solid rgba(100,255,218,0.2);
}

.tl-duration {
  margin-top: 6px;
  font-size: 0.65rem; color: var(--muted);
  letter-spacing: 0.04em;
}

.tl-right { padding-left: 32px; }

.tl-company {
  font-size: 0.72rem; letter-spacing: 0.08em;
  color: var(--accent2); margin-bottom: 4px;
  font-weight: 600; text-transform: uppercase;
}

.tl-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 1.1rem; font-weight: 600;
  letter-spacing: -0.01em; margin-bottom: 12px;
}

.tl-points {
  list-style: none; margin-bottom: 14px;
}
.tl-points li {
  font-size: 0.82rem; color: var(--muted);
  line-height: 1.75; padding-left: 14px;
  position: relative; margin-bottom: 4px;
}
.tl-points li::before {
  content: '→';
  position: absolute; left: 0;
  color: var(--accent); font-size: 0.7rem;
  top: 1px;
}

.tl-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tl-tag {
  font-size: 0.65rem; padding: 3px 9px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 4px; color: var(--muted);
}

/* ── Education ── */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }

.edu-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px 28px; transition: all 0.2s;
}
.edu-card:hover { border-color: rgba(255,209,102,0.2); transform: translateY(-2px); }

.edu-year {
  font-size: 0.68rem; letter-spacing: 0.1em;
  color: var(--accent3); margin-bottom: 8px; font-weight: 600;
}
.edu-degree {
  font-family: 'Clash Display', sans-serif;
  font-size: 1rem; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em;
}
.edu-institute { font-size: 0.78rem; color: var(--muted); line-height: 1.6; }

/* ── Footer ── */
footer { border-top: 1px solid var(--border); padding: 32px 0; text-align: center; }
footer p { font-size: 0.75rem; color: var(--muted); }
footer span { color: var(--accent); }

/* ── Hero Avatar layout ── */
.hero-avatar {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  opacity: 0; animation: fadeUp 0.7s ease 0.3s forwards;
}

/* ── Freelance Badge ── */
.freelance-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 40px;
  background: rgba(100,255,218,0.06);
  border: 1px solid rgba(100,255,218,0.28);
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 0.75rem; font-weight: 700;
  color: var(--accent); letter-spacing: 0.06em;
  cursor: pointer; user-select: none;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  white-space: nowrap;
}
.freelance-badge:hover {
  background: rgba(100,255,218,0.12);
  border-color: rgba(100,255,218,0.5);
  box-shadow: 0 0 24px rgba(100,255,218,0.15);
  transform: translateY(-2px);
}
.freelance-badge:active { transform: translateY(0); }

.fl-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
  animation: fl-pulse 2s ease-in-out infinite;
}
.fl-arrow {
  font-size: 0.7rem; opacity: 0.6;
  transition: opacity 0.2s, transform 0.2s;
}
.freelance-badge:hover .fl-arrow { opacity: 1; transform: translate(2px, -2px); }

@keyframes fl-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(100,255,218,0.55); }
  50%       { box-shadow: 0 0 0 5px rgba(100,255,218,0); }
}

/* ── Freelance Modal ── */
.fl-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.fl-backdrop.open {
  opacity: 1; pointer-events: all;
}
.fl-backdrop.open .fl-modal {
  transform: translateY(0) scale(1);
}

.fl-modal {
  background: #0d0d18;
  border: 1px solid rgba(100,255,218,0.18);
  border-radius: 20px;
  padding: 36px 32px 32px;
  max-width: 500px; width: 100%;
  position: relative;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(100,255,218,0.06);
}

.fl-modal-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--muted); border-radius: 8px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.75rem;
  transition: background 0.15s, color 0.15s;
}
.fl-modal-close:hover { background: rgba(255,255,255,0.1); color: var(--text); }

.fl-modal-top { margin-bottom: 28px; }

.fl-modal-status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
  color: var(--accent); margin-bottom: 12px;
}

.fl-modal-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 1.7rem; font-weight: 700;
  letter-spacing: -0.03em; margin-bottom: 8px;
}

.fl-modal-sub {
  font-size: 0.84rem; color: var(--muted); line-height: 1.7;
}

.fl-services {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 24px;
}

.fl-service {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; color: var(--muted); font-weight: 500;
  padding: 10px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}
.fl-service span { font-size: 1rem; }

.fl-meta-row {
  display: flex; align-items: stretch; gap: 0;
  border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; margin-bottom: 24px;
}
.fl-meta-item {
  flex: 1; padding: 14px 16px; text-align: center;
  display: flex; flex-direction: column; gap: 4px;
}
.fl-meta-sep { width: 1px; background: var(--border); flex-shrink: 0; }
.fl-meta-label {
  font-size: 0.6rem; letter-spacing: 0.1em;
  color: var(--muted); font-weight: 600;
}
.fl-meta-val {
  font-size: 0.8rem; font-weight: 600; color: var(--text);
}

.fl-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px;
  background: var(--accent); color: var(--bg);
  border-radius: 12px; text-decoration: none;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 0.88rem; font-weight: 700;
  transition: opacity 0.2s, transform 0.2s;
}
.fl-cta:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── Email contact card highlight ── */
.contact-card--email {
  border-color: rgba(100,255,218,0.2);
  background: rgba(100,255,218,0.04);
  grid-column: 1 / -1;
}
.contact-card--email:hover { border-color: rgba(100,255,218,0.4); }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

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

/* ── Responsive ── */
@media (max-width: 680px) {
  /* layout */
  .hero { grid-template-columns: 1fr; padding: 120px 0 60px; }
  .hero-avatar { order: -1; }
  .avatar-ring { width: 100px; height: 100px; }
  .avatar-inner { font-size: 2.2rem; }
  .nav-links { display: none; }
  .stats-row { flex-wrap: wrap; }
  .stat-item { min-width: 50%; }
  .container { padding: 0 20px; }
  .timeline-item { grid-template-columns: 1fr; }
  .timeline-item::after { display: none; }
  .tl-left { text-align: left; }
  .tl-left::after { display: none; }
  .tl-right { padding-left: 0; }
  .edu-grid { grid-template-columns: 1fr; }

  /* performance — kill expensive GPU ops on mobile */
  nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(10,10,15,0.97);
  }
  .bg-dots { display: none; }
  .skill-item { will-change: auto; }
  .package-card { will-change: auto; }
  .package-card:hover { transform: none; box-shadow: none; }
  .contact-card:hover { transform: none; }
  .edu-card:hover { transform: none; }
  .skill-item:hover { transform: none; }
  .reveal { transition-duration: 0.35s; }
  /* modal on mobile — bottom sheet */
  .fl-backdrop { align-items: flex-end; padding: 0; }
  .fl-modal {
    border-radius: 20px 20px 0 0;
    max-width: 100%; padding: 28px 20px 36px;
    transform: translateY(100%);
  }
  .fl-backdrop.open .fl-modal { transform: translateY(0); }
  .fl-services { grid-template-columns: 1fr; }
  .fl-meta-row { flex-direction: column; }
  .fl-meta-sep { width: auto; height: 1px; }
  .fl-meta-item { text-align: left; flex-direction: row; align-items: center; justify-content: space-between; }
  .contact-card--email { grid-column: auto; }
}
