@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f1528;
  --bg-card: rgba(15, 23, 50, 0.6);
  --text-primary: #e8eaf0;
  --text-secondary: #8a92a6;
  --accent: #4f6ef7;
  --accent-glow: rgba(79, 110, 247, 0.3);
  --accent-hover: #6b85ff;
  --gradient-1: linear-gradient(135deg, #4f6ef7, #a855f7);
  --gradient-2: linear-gradient(135deg, #0a0e1a 0%, #111b36 50%, #0a0e1a 100%);
  --border-color: rgba(79, 110, 247, 0.15);
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  padding: 1rem 2rem;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}
.navbar.scrolled { padding: 0.6rem 2rem; box-shadow: 0 4px 30px rgba(0,0,0,0.4); }
.nav-container {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.nav-logo {
  font-size: 1.5rem; font-weight: 800;
  background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-decoration: none;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--text-secondary); font-weight: 500; font-size: 0.95rem;
  position: relative; transition: color 0.3s;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--gradient-1); transition: width 0.3s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; }
.hamburger span { width: 25px; height: 2px; background: var(--text-primary); transition: 0.3s; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 8rem 2rem 4rem;
  background: var(--gradient-2);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(79,110,247,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(168,85,247,0.06) 0%, transparent 50%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-3%, 3%) scale(1.05); }
}
.hero-content { position: relative; z-index: 1; max-width: 750px; }
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900;
  margin-bottom: 0.5rem; letter-spacing: -1px;
  animation: fadeUp 0.8s ease forwards;
}
.hero .tagline {
  font-size: clamp(1rem, 2.5vw, 1.3rem); font-weight: 600;
  background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  animation: fadeUp 0.8s 0.15s ease both;
}
.hero .description {
  font-size: 1.05rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 2rem;
  animation: fadeUp 0.8s 0.3s ease both;
}
.hero-buttons {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  animation: fadeUp 0.8s 0.45s ease both;
}
.btn {
  padding: 0.8rem 2rem; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
  text-decoration: none; transition: all 0.3s; cursor: pointer; border: none;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-primary {
  background: var(--gradient-1); color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow); }
.btn-outline {
  background: transparent; color: var(--accent); border: 2px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }

/* ===== SECTIONS ===== */
section { padding: 5rem 2rem; }
.section-container { max-width: 1100px; margin: 0 auto; }
.section-title {
  font-size: 2.2rem; font-weight: 800; margin-bottom: 0.5rem;
  position: relative; display: inline-block;
}
.section-title::after {
  content: ''; display: block; width: 60px; height: 4px; margin-top: 8px;
  background: var(--gradient-1); border-radius: 2px;
}
.section-subtitle { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 3rem; }

/* ===== ABOUT ===== */
#about { background: var(--bg-secondary); }
.about-content {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius); padding: 2.5rem;
  backdrop-filter: blur(10px); box-shadow: var(--shadow);
}
.about-content p { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.9; }

/* ===== SKILLS ===== */
.skills-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem;
}
.skill-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius); padding: 2rem;
  backdrop-filter: blur(10px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.skill-card:hover {
  transform: translateY(-8px); border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(79, 110, 247, 0.15);
}
.skill-icon {
  width: 50px; height: 50px; border-radius: 12px;
  background: var(--gradient-1); display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 1rem;
}
.skill-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.75rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag {
  padding: 0.3rem 0.75rem; border-radius: 20px; font-size: 0.8rem; font-weight: 500;
  background: rgba(79, 110, 247, 0.1); color: var(--accent); border: 1px solid rgba(79,110,247,0.2);
}

/* ===== PROJECTS ===== */
#projects { background: var(--bg-secondary); }
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem;
}
.project-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius); padding: 2rem; position: relative; overflow: hidden;
  backdrop-filter: blur(10px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-1); transform: scaleX(0); transition: transform 0.4s;
  transform-origin: left;
}
.project-card:hover::before { transform: scaleX(1); }
.project-card:hover {
  transform: translateY(-8px); border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(79, 110, 247, 0.12);
}
.project-year {
  font-size: 0.8rem; font-weight: 600; color: var(--accent);
  background: rgba(79,110,247,0.1); padding: 0.2rem 0.7rem;
  border-radius: 20px; display: inline-block; margin-bottom: 0.75rem;
}
.project-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.project-tech {
  font-size: 0.85rem; color: var(--accent); font-weight: 500; margin-bottom: 0.75rem;
  font-style: italic;
}
.project-card ul { list-style: none; margin-bottom: 1.25rem; }
.project-card li {
  color: var(--text-secondary); font-size: 0.9rem; padding: 0.2rem 0;
  padding-left: 1.2rem; position: relative;
}
.project-card li::before {
  content: '▹'; position: absolute; left: 0; color: var(--accent); font-weight: 700;
}
.project-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.9rem;
  transition: 0.3s;
}
.project-link:hover { color: var(--accent-hover); gap: 0.6rem; }

/* ===== EDUCATION ===== */
.edu-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius); padding: 2rem;
  backdrop-filter: blur(10px); box-shadow: var(--shadow);
}
.edu-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.3rem; }
.edu-card .degree { color: var(--accent); font-weight: 500; margin-bottom: 0.3rem; }
.edu-card .year { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 0.5rem; }
.edu-card .grades { color: var(--text-secondary); font-size: 0.9rem; }

/* ===== CERTIFICATIONS ===== */
#certifications { background: var(--bg-secondary); }
.cert-list { display: flex; flex-direction: column; gap: 1rem; }
.cert-item {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius); padding: 1.5rem 2rem;
  display: flex; align-items: center; gap: 1rem;
  transition: all 0.3s; backdrop-filter: blur(10px);
}
.cert-item:hover { transform: translateX(8px); border-color: var(--accent); }
.cert-icon {
  width: 40px; height: 40px; min-width: 40px; border-radius: 10px;
  background: var(--gradient-1); display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.cert-item h4 { font-size: 1rem; font-weight: 600; }
.cert-item p { color: var(--text-secondary); font-size: 0.85rem; }

/* ===== CONTACT ===== */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem;
}
.contact-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius); padding: 2rem; text-align: center;
  transition: all 0.3s; backdrop-filter: blur(10px);
}
.contact-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.contact-icon {
  width: 50px; height: 50px; border-radius: 12px; margin: 0 auto 1rem;
  background: var(--gradient-1); display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.contact-card h4 { font-weight: 600; margin-bottom: 0.3rem; }
.contact-card a {
  color: var(--accent); text-decoration: none; font-size: 0.9rem; word-break: break-all;
}
.contact-card a:hover { color: var(--accent-hover); }
.contact-card span { color: var(--text-secondary); font-size: 0.9rem; }

/* ===== FOOTER ===== */
footer {
  text-align: center; padding: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary); font-size: 0.85rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; width: 100%;
    flex-direction: column; background: rgba(10,14,26,0.95); padding: 1.5rem; gap: 1rem;
    backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-color);
  }
  .nav-links.active { display: flex; }
  .hamburger { display: flex; }
  .hero h1 { font-size: 2.2rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  section { padding: 3.5rem 1.25rem; }
}
