/* ============================================================
   Mohammad Saif — Portfolio
   Vibrant, creative, fully responsive
   ============================================================ */

:root {
  --bg: #0d0b1f;
  --bg-alt: #12102a;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.10);
  --text: #f4f3ff;
  --muted: #b8b4d6;
  --grad: linear-gradient(120deg, #6d5efc 0%, #a855f7 40%, #ec4899 70%, #f97316 100%);
  --grad-btn: linear-gradient(120deg, #6d5efc, #a855f7 55%, #ec4899);
  --shadow: 0 20px 45px -20px rgba(109, 94, 252, 0.55);
  --radius: 20px;
  --max: 1200px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ---------- Animated background blobs ---------- */
.bg-decor { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: float 18s ease-in-out infinite;
}
.blob-1 { width: 40vw; height: 40vw; background: #6d5efc; top: -8%; left: -6%; }
.blob-2 { width: 38vw; height: 38vw; background: #ec4899; bottom: -12%; right: -8%; animation-delay: -6s; }
.blob-3 { width: 34vw; height: 34vw; background: #f97316; top: 40%; left: 45%; animation-delay: -11s; opacity: 0.35; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(4%, 6%) scale(1.08); }
  66% { transform: translate(-4%, -4%) scale(0.94); }
}

/* ---------- Utilities ---------- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 clamp(18px, 5vw, 48px); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.section { padding: clamp(60px, 9vw, 120px) 0; position: relative; }
.section-alt { background: var(--bg-alt); }

.section-head { text-align: center; margin-bottom: clamp(34px, 5vw, 60px); }
.eyebrow {
  display: inline-block;
  font-family: 'Space Grotesk', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a78bfa;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.9rem, 5.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--grad-btn); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-3px) scale(1.03); filter: brightness(1.1); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1.5px solid var(--card-border);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { transform: translateY(-3px); border-color: #a855f7; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s;
}
.navbar.scrolled {
  background: rgba(13, 11, 31, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 30px -12px rgba(0, 0, 0, 0.7);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px clamp(18px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--grad-btn);
  color: #fff; font-weight: 800;
  box-shadow: var(--shadow);
}
.brand-dot { color: #ec4899; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.nav-cta { background: var(--grad-btn); color: #fff; }
.nav-cta:hover { color: #fff; filter: brightness(1.1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 26px; height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: clamp(50px, 8vw, 90px) 0 clamp(60px, 9vw, 110px); }
.hero-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 48px);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(30px, 6vw, 70px);
  align-items: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
  margin-bottom: 22px;
}
.hero-title {
  font-size: clamp(2.3rem, 7vw, 4.2rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.hero-tagline { font-size: clamp(1.1rem, 2.6vw, 1.55rem); font-weight: 500; margin-bottom: 14px; }
.hero-tagline strong { color: #fbbf24; }
.hero-sub { color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); max-width: 560px; margin-bottom: 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }

.hero-stats { display: flex; flex-wrap: wrap; gap: clamp(20px, 5vw, 46px); }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-lbl { font-size: 0.82rem; color: var(--muted); }

/* Hero photo */
.hero-photo { position: relative; display: grid; place-items: center; }
.photo-ring {
  width: clamp(220px, 34vw, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 8px;
  background: var(--grad);
  box-shadow: var(--shadow);
  animation: spin-slow 14s linear infinite;
}
.photo-ring img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-alt);
  animation: spin-slow 14s linear infinite reverse; /* counter-rotate so face stays upright */
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

.float-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(20, 16, 42, 0.9);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(8px);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -12px rgba(0,0,0,0.6);
  animation: bob 4s ease-in-out infinite;
}
.fb-1 { top: 8%; left: -4%; color: #38bdf8; }
.fb-2 { bottom: 16%; left: -8%; color: #67e8f9; animation-delay: -1.4s; }
.fb-3 { top: 22%; right: -4%; color: #f472b6; animation-delay: -2.6s; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ============================================================
   ABOUT
   ============================================================ */
.about-wrap { max-width: 860px; margin: 0 auto; text-align: center; }
.about-lead { font-size: clamp(1.15rem, 2.5vw, 1.5rem); font-weight: 500; margin-bottom: 20px; }
.about-body { color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); margin-bottom: 30px; }
.about-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.about-tags span {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 20px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--card-border);
  font-weight: 600;
}
.about-tags i { color: #a78bfa; }

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.skill-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s;
}
.skill-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  opacity: 0.09;
  transition: opacity 0.3s;
}
.skill-card:hover { transform: translateY(-6px); border-color: var(--c2); }
.skill-card:hover::before { opacity: 0.18; }
.skill-card h3 {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  font-size: 1.25rem; margin-bottom: 18px;
}
.skill-card h3 i {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #fff; font-size: 1rem;
}
.badges { position: relative; display: flex; flex-wrap: wrap; gap: 9px; }
.badge {
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--card-border);
  font-size: 0.9rem; font-weight: 500;
  transition: transform 0.2s, background 0.2s;
}
.badge:hover { transform: translateY(-2px); background: rgba(255,255,255,0.14); }

/* ============================================================
   SERVICES
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.service-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s, background 0.3s;
}
.service-card i {
  font-size: 1.9rem;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
  display: inline-block;
}
.service-card h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.4; }
.service-card:hover { transform: translateY(-6px) scale(1.02); border-color: #a855f7; background: rgba(168,85,247,0.08); }

/* ============================================================
   PROJECTS
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.project-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 30px;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s;
}
.project-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--pc1), var(--pc2));
}
.project-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--pc1), var(--pc2));
  opacity: 0; transition: opacity 0.35s;
}
.project-card > * { position: relative; z-index: 1; }
.project-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 30px 55px -25px rgba(0,0,0,0.7); }
.project-card:hover::after { opacity: 0.12; }
.project-icon {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--pc1), var(--pc2));
  color: #fff; font-size: 1.5rem;
  margin-bottom: 18px;
  box-shadow: 0 12px 30px -14px var(--pc1);
}
.project-card h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; }
.project-card p { color: var(--muted); font-size: 0.98rem; margin-bottom: 18px; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-tags span {
  font-size: 0.78rem; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--card-border);
}
.projects-note {
  margin-top: 36px;
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
  color: var(--muted);
  font-size: 1rem;
  padding: 18px 24px;
  border-radius: 16px;
  background: rgba(168,85,247,0.08);
  border: 1px dashed rgba(168,85,247,0.4);
}
.projects-note i { color: #a78bfa; margin-right: 6px; }

/* ============================================================
   WHY HIRE ME
   ============================================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}
.why-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.3s, border-color 0.3s;
}
.why-card:hover { transform: translateY(-6px); border-color: #ec4899; }
.why-icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--grad-btn);
  color: #fff; font-size: 1.3rem;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.why-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.why-card p { color: var(--muted); font-size: 0.97rem; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-box {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 60px);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(109,94,252,0.14), rgba(236,72,153,0.12));
  border: 1px solid var(--card-border);
  backdrop-filter: blur(8px);
}
.contact-sub { color: var(--muted); font-size: 1.1rem; margin: 14px 0 30px; }
.contact-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.btn-mail { background: linear-gradient(120deg,#6d5efc,#a855f7); color:#fff; box-shadow: var(--shadow); }
.btn-wa { background: linear-gradient(120deg,#22c55e,#16a34a); color:#fff; box-shadow: 0 20px 45px -20px rgba(34,197,94,0.6); }
.btn-li { background: linear-gradient(120deg,#0ea5e9,#0369a1); color:#fff; box-shadow: 0 20px 45px -20px rgba(14,165,233,0.6); }
.btn-mail:hover, .btn-wa:hover, .btn-li:hover { transform: translateY(-3px) scale(1.03); filter: brightness(1.08); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid var(--card-border);
}
.footer p { font-weight: 600; }
.foot-small { color: var(--muted); font-weight: 400; font-size: 0.9rem; margin-top: 6px; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablets & below — collapse hero to single column, show mobile nav */
@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    background: rgba(13, 11, 31, 0.97);
    backdrop-filter: blur(16px);
    border-left: 1px solid var(--card-border);
    transform: translateX(100%);
    transition: transform 0.35s ease;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-link { padding: 14px 18px; font-size: 1.1rem; text-align: center; }
  .nav-toggle { display: flex; z-index: 110; }

  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-text { order: 2; }
  .hero-photo { order: 1; margin-bottom: 10px; }
  .pill { margin-inline: auto; }
  .hero-sub { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
}

/* Landscape phones / small tablets */
@media (max-width: 620px) {
  .btn { width: 100%; justify-content: center; }
  .hero-cta { flex-direction: column; }
  .contact-btns .btn { width: 100%; }
  .services-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .service-card { padding: 22px 16px; }
  .service-card h3 { font-size: 0.95rem; }
}

/* Very small phones */
@media (max-width: 380px) {
  .services-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 18px; }
  .stat { flex: 1 1 40%; }
}

/* Large desktops / PC monitors — cap growth, keep it centered */
@media (min-width: 1600px) {
  :root { --max: 1320px; }
  .hero-title { font-size: 4.4rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
