:root {
  --bg:#0f1724;
  --card:#0b1220;
  --muted:#9aa4b2;
  --accent:#4f46e5;
  --link:#f59e0b;
  --max-width:1100px;
}

* { box-sizing: border-box; }
html, body { height: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
  background: linear-gradient(180deg, #071026 0%, #0b1220 100%);
  color: #e6eef6;
  line-height: 1.5;
  padding: 32px 20px;
  display: flex;
  justify-content: center;
}

.wrap { width: 100%; max-width: var(--max-width); }
header { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 28px; gap: 16px; }
.brand { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.avatar { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; box-shadow: 0 6px 18px rgba(79,70,229,0.16); flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
h1 { font-size: 22px; margin: 0; }
p.lead { margin: 0; color: var(--muted); }

.summary, .work-experience, .skills, .portfolio {
  margin-top: 20px;
  background: var(--card);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(2,6,23,0.5);
}
.summary p { font-size: 14px; color: #dbeafe; }

.skills h2, .work-experience h2, .portfolio-header h2 {
  font-size: 18px;
  color: white;
  margin-bottom: 12px;
  font-weight: 700;
}
.skills-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-badge {
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 30px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 10px rgba(79,70,229,0.2);
}
.skill-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(79,70,229,0.35);
}

.role { margin-bottom: 18px; }
.role-header { display: flex; align-items: center; gap: 6px; }
.designation { font-size: 15px; color: #e6eef6; font-weight: 600; }
.company { color: var(--link); font-weight: 600; }
.role .meta { font-size: 13px; color: var(--muted); margin-top: 6px; }
.role p { font-size: 14px; color: #dbeafe; margin-top: 8px; }

.contact-header {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.contact-header a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.contact-header img { width: 20px; height: 20px; }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.project {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}
.project img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
}
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 15px;
}
.project:hover .overlay { opacity: 1; }
.overlay h3 { margin-bottom: 8px; color: var(--link); }
.overlay p { font-size: 14px; color: #d1d5db; }

footer {
  margin-top: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

#backToTop {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  background-color: var(--accent);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(79,70,229,0.4);
  transition: all 0.3s ease;
}
#backToTop:hover {
  background-color: var(--link);
  transform: scale(1.1);
}
