/* ============ Vishal Kumar — Portfolio ============ */

:root {
  --bg: #070b14;
  --bg-alt: #0b1120;
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e9edf6;
  --muted: #94a0b8;
  --accent: #6c5ce7;
  --accent-2: #00d2ff;
  --gradient: linear-gradient(90deg, var(--accent), var(--accent-2));
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
body.light {
  --bg: #f4f6fb;
  --bg-alt: #eaeef7;
  --card: rgba(255, 255, 255, 0.75);
  --border: rgba(20, 30, 60, 0.1);
  --text: #16203a;
  --muted: #56617a;
  --shadow: 0 18px 40px rgba(40, 60, 120, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background 0.35s, color 0.35s;
}
h1, h2, h3, .nav-logo { font-family: "Syne", sans-serif; }

/* ---- Ambient background glows ---- */
.bg-glow { position: fixed; border-radius: 50%; filter: blur(130px); z-index: -1; opacity: 0.35; }
.glow-1 { width: 480px; height: 480px; background: var(--accent); top: -120px; right: -120px; animation: float 12s ease-in-out infinite; }
.glow-2 { width: 420px; height: 420px; background: var(--accent-2); bottom: -140px; left: -140px; animation: float 14s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translateY(40px) scale(1.08); } }

/* ---- Glass card utility ---- */
.glass {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  backdrop-filter: blur(14px);
}

/* ---- Navbar ---- */
#navbar {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 7%;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { font-size: 1.6rem; font-weight: 800; color: var(--text); text-decoration: none; }
.nav-logo span { color: var(--accent-2); }
.nav-links { display: flex; gap: 2.2rem; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem;
  position: relative; padding-bottom: 4px; transition: color 0.2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--gradient); border-radius: 2px; transition: width 0.25s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 0.6rem; }
.nav-actions button {
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  width: 40px; height: 40px; border-radius: 12px; font-size: 1.1rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: 0.2s;
}
.nav-actions button:hover { border-color: var(--accent); }
.hamburger { display: none !important; }

/* ---- Hero ---- */
#home {
  min-height: 92vh; display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center;
  padding: 4rem 7% 2rem; position: relative;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 1.1rem; border-radius: 50px; font-size: 0.85rem;
  border: 1px solid var(--border); background: var(--card); color: var(--muted);
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(46, 204, 113, 0.15); } }
.hero-title { font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.1; margin-top: 1.4rem; }
.highlight {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-role { font-size: clamp(1.2rem, 3vw, 1.7rem); margin-top: 0.8rem; font-family: "Inter", sans-serif; font-weight: 600; }
#typing { color: var(--accent-2); }
.cursor { color: var(--accent-2); animation: blink 0.8s infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-sub { color: var(--muted); max-width: 620px; margin-top: 1.2rem; line-height: 1.7; }
.hero-cta { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; justify-content: center; }
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.8rem; border-radius: 50px; font-weight: 600;
  text-decoration: none; font-size: 0.95rem; transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary { background: var(--gradient); color: #fff; }
.btn-secondary { border: 1.5px solid var(--accent); color: var(--text); }
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(108, 92, 231, 0.35); }
.hero-socials { display: flex; gap: 0.9rem; margin-top: 2.4rem; }
.hero-socials a {
  width: 46px; height: 46px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--border);
  color: var(--muted); font-size: 1.25rem; transition: 0.25s;
}
.hero-socials a:hover { color: #fff; background: var(--gradient); transform: translateY(-4px); border-color: transparent; }
.scroll-indicator {
  position: absolute; bottom: 1.6rem; display: flex; flex-direction: column;
  align-items: center; gap: 0.5rem; color: var(--muted);
  font-size: 0.72rem; letter-spacing: 2px; text-transform: uppercase;
}
.scroll-line { width: 1px; height: 42px; background: var(--muted); overflow: hidden; position: relative; }
.scroll-line::after {
  content: ""; position: absolute; top: -100%; left: 0; width: 100%; height: 100%;
  background: var(--accent-2); animation: scrollDown 1.8s infinite;
}
@keyframes scrollDown { to { top: 100%; } }

/* ---- Sections ---- */
section { padding: 5.5rem 7%; }
.section-alt { background: var(--bg-alt); }
.section-label { color: var(--accent-2); text-transform: uppercase; letter-spacing: 3px; font-size: 0.78rem; font-weight: 600; }
.section-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: 0.4rem; }
.section-divider { width: 64px; height: 4px; border-radius: 4px; background: var(--gradient); margin: 1rem 0 3rem; }

/* ---- About ---- */
.about-grid { display: grid; grid-template-columns: 320px 1fr; gap: 2.5rem; align-items: start; }
.about-card { padding: 2rem; text-align: center; position: sticky; top: 100px; }
.about-avatar {
  width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 1.2rem;
  display: flex; align-items: center; justify-content: center;
  font-family: "Syne", sans-serif; font-size: 2.2rem; font-weight: 800; color: #fff;
  background: var(--gradient); box-shadow: 0 10px 30px rgba(108, 92, 231, 0.4);
}
.about-avatar-img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;          /* crops the photo to fill the circle */
  display: block;
  margin: 0 auto 1.2rem;
  border: 3px solid transparent;
  background: var(--gradient) border-box;  /* gradient ring around photo */
  box-shadow: 0 10px 30px rgba(108, 92, 231, 0.4);
}

.about-card .role { color: var(--muted); font-size: 0.9rem; margin: 0.3rem 0 1.4rem; }
.about-stat {
  display: flex; justify-content: space-between; gap: 1rem; font-size: 0.85rem;
  padding: 0.65rem 0; border-top: 1px solid var(--border);
}
.about-stat span:first-child { color: var(--muted); }
.about-stat span:last-child { font-weight: 600; text-align: right; }
.status-open { color: #2ecc71; }
.about-text p { color: var(--muted); line-height: 1.8; margin-bottom: 1.2rem; }
.about-text strong { color: var(--text); }
.objective-card { padding: 1.5rem 1.7rem; margin: 1.6rem 0; border-left: 3px solid var(--accent); }
.objective-header {
  display: flex; align-items: center; gap: 0.55rem; font-weight: 700;
  margin-bottom: 0.7rem; color: var(--accent-2);
}
.objective-card p { margin: 0; }
.edu-card { display: flex; gap: 1.2rem; align-items: center; padding: 1.4rem 1.7rem; }
.edu-icon {
  min-width: 52px; height: 52px; border-radius: 14px; font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(108, 92, 231, 0.15); color: var(--accent);
}
.edu-info h4 { font-family: "Inter", sans-serif; font-size: 1rem; }
.edu-info p { color: var(--muted); font-size: 0.85rem; margin: 0.25rem 0 0.5rem; }
.edu-badge {
  font-size: 0.72rem; font-weight: 600; padding: 0.25rem 0.8rem; border-radius: 50px;
  background: rgba(0, 210, 255, 0.12); color: var(--accent-2);
}

/* ---- Skills ---- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.2rem; }
.skill-card { padding: 1.5rem; transition: transform 0.25s, border-color 0.25s; }
.skill-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.skill-icon {
  width: 46px; height: 46px; border-radius: 12px; font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center; margin-bottom: 0.9rem;
}
.skill-name { font-weight: 600; margin-bottom: 0.8rem; }
.skill-bar-bg { height: 6px; border-radius: 6px; background: var(--border); overflow: hidden; }
.skill-bar {
  height: 100%; width: 0; border-radius: 6px; background: var(--gradient);
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.skill-card.animated .skill-bar { width: var(--target); }
.skill-pct { margin-top: 0.5rem; font-size: 0.8rem; color: var(--muted); text-align: right; }

/* ---- Projects ---- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.5rem; }
.project-card { overflow: hidden; transition: transform 0.25s, box-shadow 0.25s; display: flex; flex-direction: column; }
.project-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.project-thumb {
  height: 130px; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--accent-2);
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.18), rgba(0, 210, 255, 0.08));
}
.project-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.project-tag {
  align-self: flex-start; font-size: 0.7rem; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--accent-2);
  background: rgba(0, 210, 255, 0.1); padding: 0.25rem 0.75rem; border-radius: 50px;
}
.project-title { font-size: 1.2rem; margin: 0.8rem 0 0.5rem; }
.project-desc { color: var(--muted); font-size: 0.88rem; line-height: 1.65; flex: 1; }
.project-footer { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.tech-pill {
  font-size: 0.72rem; font-weight: 600; padding: 0.25rem 0.7rem; border-radius: 50px;
  background: rgba(108, 92, 231, 0.14); color: var(--accent);
}
body.light .tech-pill { background: rgba(108, 92, 231, 0.12); }
.project-links { display: flex; gap: 1.2rem; margin-top: 1.1rem; }
.project-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  color: var(--accent-2); text-decoration: none; font-weight: 600; font-size: 0.85rem;
}
.project-link:hover { text-decoration: underline; }

/* ---- Contact ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
.contact-info h3 { font-size: 1.5rem; margin-bottom: 0.8rem; }
.contact-info > p { color: var(--muted); line-height: 1.7; margin-bottom: 1.8rem; }
.contact-link {
  display: flex; align-items: center; gap: 0.7rem; color: var(--text);
  text-decoration: none; font-size: 0.92rem; padding: 0.7rem 0;
  border-bottom: 1px solid var(--border); transition: color 0.2s, padding-left 0.2s;
}
.contact-link i { color: var(--accent-2); font-size: 1.2rem; }
.contact-link:hover { color: var(--accent-2); padding-left: 6px; }
.contact-form { padding: 2rem; }
.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--muted); margin-bottom: 0.45rem; }
.form-input, .form-textarea {
  width: 100%; padding: 0.85rem 1rem; border-radius: 12px;
  background: rgba(0, 0, 0, 0.18); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: 0.92rem; transition: border-color 0.2s;
}
body.light .form-input, body.light .form-textarea { background: #fff; }
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--accent); }
.form-textarea { min-height: 130px; resize: vertical; }
.form-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--gradient); color: #fff; border: none; cursor: pointer;
  padding: 0.85rem 1.9rem; border-radius: 50px; font-weight: 600; font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.form-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(108, 92, 231, 0.35); }
.form-status { margin-top: 0.9rem; font-size: 0.88rem; color: #2ecc71; min-height: 1.2em; }
.form-status.error { color: #e74c3c; }

/* ---- Footer ---- */
footer { text-align: center; padding: 2.2rem 7%; border-top: 1px solid var(--border); }
footer p { color: var(--muted); font-size: 0.9rem; }
.footer-copy { font-size: 0.78rem; margin-top: 0.4rem; opacity: 0.7; }

/* ---- Scroll to top ---- */
#scroll-top {
  position: fixed; bottom: 26px; right: 26px; z-index: 150;
  width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--gradient); color: #fff; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(12px); transition: 0.3s;
}
#scroll-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* ---- Animations ---- */
.fade-up { opacity: 0; transform: translateY(30px); animation: fadeUp 0.8s ease forwards; }
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-card { position: static; max-width: 380px; margin: 0 auto; }
}
@media (max-width: 720px) {
  .hamburger { display: inline-flex !important; }
  .nav-links {
    position: fixed; top: 70px; right: -100%; z-index: 190;
    flex-direction: column; gap: 1.6rem; padding: 2.4rem;
    width: min(75%, 300px); height: calc(100vh - 70px);
    background: var(--bg-alt); border-left: 1px solid var(--border);
    transition: right 0.3s ease;
  }
  .nav-links.open { right: 0; }
  section { padding: 4rem 6%; }
}