:root {
  /* Dark Theme Colors */
  --bg-dark: #0a0f1c;
  --bg-card: rgba(20, 27, 45, 0.6);
  --primary: #7c5cff; /* Main Accent Purple */
  --primary-glow: rgba(124, 92, 255, 0.4);
  --secondary: #22d3ee; /* Cyan for tech vibes */
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --font-main: 'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Ambient Background Glow --- */
.bg-glow {
  position: fixed;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle at 50% 50%, rgba(124, 92, 255, 0.08), transparent 60%);
  z-index: -1;
  pointer-events: none;
}

.container { width: min(1200px, 90%); margin: 0 auto; }

/* --- Typography --- */
h1, h2, h3 { color: #fff; font-weight: 700; letter-spacing: -0.02em; }
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.section-title { 
  font-size: 2rem; margin-bottom: 2.5rem; position: relative; display: inline-block; 
}
.section-title::after {
  content: ''; position: absolute; left: 0; bottom: -8px; 
  width: 60px; height: 4px; background: var(--primary); border-radius: 2px;
}
.section-pad { padding: 80px 0; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 8px;
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn.primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--primary-glow); }
.btn.outline { border: 1px solid var(--border); color: var(--text-muted); background: rgba(255,255,255,0.02); }
.btn.outline:hover { border-color: var(--text-main); color: #fff; background: rgba(255,255,255,0.05); }

/* --- Topbar & Navigation --- */
.topbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(10, 15, 28, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 70px;
  display: flex; align-items: center;
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; }

.logo { font-size: 1.5rem; font-weight: 800; color: #fff; text-decoration: none; z-index: 1002; }
.logo .dot { color: var(--primary); }

/* Desktop Menu */
.header-menu { display: flex; align-items: center; }

/* Spacing fix for desktop nav */
.nav { display: flex; align-items: center; gap: 40px; }
.nav a { 
  color: var(--text-muted); text-decoration: none; 
  font-size: 0.95rem; font-weight: 500; transition: 0.2s; 
}
.nav a:hover { color: #fff; }

.socials { margin-left: 40px; border-left: 1px solid var(--border); padding-left: 30px; display: flex; gap: 20px; }
.socials a { color: var(--text-muted); font-size: 1.2rem; transition: 0.2s; }
.socials a:hover { color: #fff; transform: translateY(-2px); }

/* --- Mobile Menu Toggle --- */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; z-index: 1002; }
.menu-toggle .bar { 
  display: block; width: 28px; height: 3px; background: #fff; 
  margin: 6px 0; border-radius: 3px; transition: 0.4s; 
}

/* --- Hero Section --- */
.hero { padding: 120px 0 80px; min-height: 90vh; display: flex; align-items: center; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 3.5rem; line-height: 1.1; margin: 20px 0; }
.hero .lead { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 32px; max-width: 540px; }

/* Badges & Tech Stack */
.badge {
  display: inline-block; padding: 6px 12px; background: rgba(34, 211, 238, 0.1); 
  color: var(--secondary); font-size: 0.85rem; font-weight: 600; border-radius: 20px;
}
.hero-ctas { display: flex; gap: 16px; margin-bottom: 40px; }
.tech-stack-mini { display: flex; gap: 20px; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; flex-wrap: wrap; }
.tech-stack-mini i { color: var(--text-main); margin-right: 6px; }

/* Profile Card */
.profile-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  padding: 24px; border-radius: 24px;
  text-align: center;
  backdrop-filter: blur(10px);
}
.img-wrapper {
  width: 160px; height: 170px; margin: 0 auto 20px;
  padding: 4px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}
.profile-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 4px solid var(--bg-dark); }
.status { 
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  font-size: 0.85rem; color: var(--text-muted); background: rgba(0,0,0,0.2); 
  padding: 4px 12px; border-radius: 20px; 
}
.indicator { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; box-shadow: 0 0 8px #22c55e; }

/* --- About Content --- */
.about-content p { color: var(--text-muted); margin-bottom: 1rem; font-size: 1.05rem; }
.about-content strong { color: var(--text-main); }

/* --- Skills Grid --- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.skill-category {
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 24px; border-radius: 16px; transition: transform 0.3s;
}
.skill-category:hover { border-color: rgba(124, 92, 255, 0.3); }
.skill-category h3 { font-size: 1.1rem; margin-bottom: 16px; color: #fff; display: flex; align-items: center; gap: 10px; }
.skill-category h3 i { color: var(--primary); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tags span {
  font-size: 0.85rem; color: var(--text-muted);
  background: rgba(255,255,255,0.05); padding: 6px 12px; border-radius: 6px;
  border: 1px solid transparent; transition: 0.2s;
}

/* --- Projects --- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 24px; }
.project-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px; transition: transform 0.3s ease, border-color 0.3s ease;
  display: flex; flex-direction: column; height: 100%;
}
.project-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.icon-bg { 
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: rgba(124, 92, 255, 0.1); color: var(--primary); border-radius: 10px; 
}
.card-body p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; flex-grow: 1; }
.tech-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.pill { font-size: 0.75rem; color: var(--secondary); background: rgba(34, 211, 238, 0.08); padding: 4px 10px; border-radius: 4px; }
.card-links a { color: #fff; text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.card-links a:hover { color: var(--primary); }

/* --- Education Timeline --- */
.timeline { position: relative; border-left: 2px solid var(--border); margin-left: 10px; padding-left: 30px; }
.timeline-item { margin-bottom: 40px; position: relative; }
.timeline-dot {
  position: absolute; left: -36px; top: 5px; width: 14px; height: 14px;
  background: var(--bg-dark); border: 2px solid var(--primary); border-radius: 50%;
}
.timeline-content h3 { font-size: 1.1rem; margin-bottom: 4px; }
.timeline-content .inst { color: var(--text-muted); margin-bottom: 4px; }
.timeline-content .time { font-size: 0.85rem; color: var(--secondary); font-weight: 600; }

/* --- Contact & Footer --- */
.contact-box {
  text-align: center; background: linear-gradient(180deg, rgba(124, 92, 255, 0.05), transparent);
  border: 1px solid var(--border); border-radius: 24px; padding: 60px 20px;
}
.contact-box h2 { font-size: 2.2rem; margin-bottom: 16px; }
.contact-box p { color: var(--text-muted); margin-bottom: 32px; max-width: 500px; margin-left: auto; margin-right: auto; }
.big-btn { padding: 16px 32px; font-size: 1.1rem; }
.footer-links { margin-top: 32px; }
.footer-links a { margin: 0 12px; color: var(--text-muted); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: #fff; }

.site-footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--text-muted); font-size: 0.9rem; }
.text-center { text-align: center; }

/* --- Animations --- */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.delay { transition-delay: 0.2s; }


/* =========================================
   RESPONSIVE (Mobile & Tablet)
   ========================================= */

@media (max-width: 900px) {
  /* --- Beautiful Full-Screen Mobile Menu --- */
  .menu-toggle { display: block; }

  .header-menu {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: rgba(10, 15, 28, 0.98); /* Deep dark background */
    backdrop-filter: blur(20px); /* Heavy blur for premium feel */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.4s ease-in-out;
    pointer-events: none;
    z-index: 1001;
  }

  /* When menu is open */
  .header-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: all;
  }

  .nav { flex-direction: column; gap: 32px; text-align: center; }
  .nav a { font-size: 1.8rem; font-weight: 700; color: #fff; display: block; }
  
  .socials { border: none; margin: 0; padding: 0; margin-top: 20px; gap: 32px; }
  .socials a { font-size: 1.5rem; }

  /* Hamburger Animation */
  .menu-toggle.is-active .bar:nth-child(1) { transform: rotate(-45deg) translate(-7px, 6px); }
  .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
  .menu-toggle.is-active .bar:nth-child(3) { transform: rotate(45deg) translate(-7px, -6px); }
}

@media (max-width: 768px) {
  /* Hero Adjustments */
  .hero h1 { font-size: 2.2rem; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero-text { order: 2; }
  .hero-profile { order: 1; display: flex; justify-content: center; }
  
  .hero-ctas, .tech-stack-mini { justify-content: center; }
  .img-wrapper { margin: 0 auto 20px; }
  
  /* Skills Grid Mobile */
  .skills-grid { grid-template-columns: 1fr; }
}