/* Musharaf Ali Portfolio — Premium Red/Black UI (Static) */
:root{
  --bg0:#07080b;
  --bg1:#0b0d12;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.12);
  --text:#f5f7ff;
  --muted: rgba(245,247,255,.72);

  --red:#ff2d2d;
  --red2:#ff4d4d;
  --glow: 0 0 20px rgba(255,45,45,.25), 0 0 60px rgba(255,45,45,.12);

  --radius: 18px;
  --radius2: 26px;
  --shadow: 0 12px 40px rgba(0,0,0,.35);

  --max: 1180px;
  --trans: 220ms cubic-bezier(.2,.8,.2,1);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans";
  color:var(--text);
  background:
    radial-gradient(800px 500px at 20% 10%, rgba(255,45,45,.12), transparent 55%),
    radial-gradient(700px 400px at 80% 0%, rgba(255,45,45,.10), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 35%, #06070a 100%);
  overflow-x:hidden;
}
a{color:inherit; text-decoration:none}
img{max-width:100%; display:block}
button{font:inherit}
.container{width:min(var(--max), calc(100% - 40px)); margin-inline:auto}

/* Top progress bar */
#topProgress{
  position:fixed; inset:0 0 auto 0;
  height:3px; background: linear-gradient(90deg, var(--red), var(--red2));
  transform-origin:left;
  transform: scaleX(0);
  z-index:9999;
  box-shadow: var(--glow);
}

/* Header */
.header{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(14px);
  background: rgba(7,8,11,.55);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0;
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-weight:800; letter-spacing:.3px;
}
.brand-badge{
  width:34px; height:34px; border-radius:12px;
  background: linear-gradient(135deg, rgba(255,45,45,.9), rgba(255,45,45,.25));
  box-shadow: var(--glow);
  border:1px solid rgba(255,255,255,.12);
}
.brand span{opacity:.95}
.brand small{opacity:.7; font-weight:600}

.navlinks{
  display:flex; gap:18px; align-items:center;
}
.navlinks a{
  color: var(--muted);
  font-weight:650;
  font-size:14px;
  padding:10px 12px;
  border-radius:12px;
  transition: var(--trans);
}
.navlinks a:hover{color:var(--text); background:rgba(255,255,255,.05)}
.navlinks a.active{
  color:var(--text);
  background:rgba(255,45,45,.12);
  border:1px solid rgba(255,45,45,.22);
}

.actions{display:flex; gap:10px; align-items:center}
.btn{
  display:inline-flex; align-items:center; gap:10px;
  padding:11px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color:var(--text);
  transition: var(--trans);
  cursor:pointer;
  user-select:none;
}
.btn:hover{transform: translateY(-1px); background: rgba(255,255,255,.06)}
.btn-primary{
  border-color: rgba(255,45,45,.35);
  background: linear-gradient(135deg, rgba(255,45,45,.95), rgba(255,45,45,.55));
  box-shadow: var(--glow);
}
.btn-primary:hover{filter:saturate(1.1); transform: translateY(-1px)}
.btn-ghost{
  background: transparent;
  border-color: rgba(255,255,255,.16);
}
.icon{
  width:18px; height:18px; display:inline-block;
  opacity:.95;
}
.burger{display:none}

/* Hero */
.hero{
  padding: 56px 0 20px;
  position:relative;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap:26px;
  align-items:stretch;
}
.kicker{
  display:inline-flex; align-items:center; gap:10px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  width:fit-content;
  color: var(--muted);
  font-weight:650;
  font-size:13px;
}
.dot{
  width:10px; height:10px; border-radius:999px;
  background: var(--red);
  box-shadow: var(--glow);
}
.h1{
  font-size: clamp(34px, 4.2vw, 54px);
  line-height:1.05;
  margin:16px 0 10px;
  letter-spacing:-.6px;
}
.h1 .accent{color:var(--red)}
.lead{
  color: var(--muted);
  font-size: 16px;
  line-height:1.65;
  margin:0 0 18px;
}
.hero-ctas{display:flex; gap:12px; flex-wrap:wrap; margin-top:16px}
.hero-meta{
  display:flex; gap:14px; flex-wrap:wrap;
  margin-top:18px;
}
.pill{
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  color:var(--muted);
  font-weight:650;
  font-size:13px;
}

.hero-card{
  border-radius: var(--radius2);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
  position:relative;
  overflow:hidden;
}
.hero-card::before{
  content:"";
  position:absolute; inset:-2px;
  background: radial-gradient(380px 260px at 70% 20%, rgba(255,45,45,.22), transparent 55%);
  pointer-events:none;
}
.hero-card-inner{
  position:relative;
  padding:22px;
  height:100%;
  display:grid;
  grid-template-rows:auto 1fr auto;
  gap:14px;
}
.profile-wrap{
  border-radius: 22px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.2);
}
.profile-wrap img{
  width:100%;
  height: 360px;
  object-fit: cover;
  filter: contrast(1.02) saturate(1.05);
}
.badges{
  display:flex; gap:10px; flex-wrap:wrap;
}
.badge{
  padding:9px 11px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.12);
  color: var(--muted);
  font-weight:650;
  font-size:13px;
}
.badge strong{color:var(--text)}
.socials{
  display:flex; gap:10px; align-items:center; justify-content:flex-start;
}
.sbtn{
  width:42px; height:42px;
  border-radius: 14px;
  display:grid; place-items:center;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  transition: var(--trans);
}
.sbtn:hover{transform: translateY(-2px); border-color: rgba(255,45,45,.35); box-shadow: var(--glow)}

/* Marquee */
.marquee{
  margin: 18px 0 26px;
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  overflow:hidden;
}
.track{
  display:flex;
  gap:22px;
  padding: 12px 0;
  will-change: transform;
  animation: scroll 22s linear infinite;
}
.track span{
  color: rgba(245,247,255,.78);
  font-weight:800;
  letter-spacing:.4px;
  text-transform: uppercase;
  font-size: 12px;
  display:inline-flex; gap:10px; align-items:center;
}
.track .mini{width:7px; height:7px; border-radius:999px; background:var(--red); box-shadow: var(--glow)}
@keyframes scroll{
  from{transform: translateX(0)}
  to{transform: translateX(-50%)}
}

/* Section */
.section{padding: 52px 0}
.section-head{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:20px; margin-bottom: 18px;
}
.h2{
  font-size: clamp(24px, 3vw, 34px);
  margin:0;
  letter-spacing:-.4px;
}
.sub{
  color: var(--muted);
  margin:6px 0 0;
  line-height:1.6;
  max-width: 640px;
}
.grid-2{display:grid; grid-template-columns: 1fr 1fr; gap:18px}
.grid-3{display:grid; grid-template-columns: repeat(3, 1fr); gap:16px}
.grid-4{display:grid; grid-template-columns: repeat(4, 1fr); gap:14px}
.panel{
  border-radius: var(--radius2);
  border:1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow: var(--shadow);
  overflow:hidden;
}
.p16{padding:16px}
.p20{padding:20px}
.p24{padding:24px}

/* Feature stats */
.stats{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:10px;
}
.stat{
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  padding:14px;
}
.stat b{
  font-size:18px;
  letter-spacing:-.3px;
}
.stat p{
  margin:6px 0 0;
  color:var(--muted);
  font-weight:650;
  font-size:12px;
}

/* Service cards */
.card{
  border-radius: 22px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  padding:18px;
  position:relative;
  overflow:hidden;
  transition: var(--trans);
}
.card:hover{
  transform: translateY(-4px);
  border-color: rgba(255,45,45,.30);
  box-shadow: var(--shadow), var(--glow);
}
.card .top{
  display:flex; align-items:flex-start; justify-content:space-between; gap:14px;
}
.card h3{margin:0 0 8px; font-size:18px; letter-spacing:-.2px}
.card p{margin:0; color:var(--muted); line-height:1.65; font-size:14px}
.corner{
  width:38px; height:38px;
  border-radius: 14px;
  display:grid; place-items:center;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}
.corner:hover{border-color: rgba(255,45,45,.35); box-shadow: var(--glow)}
.chiprow{display:flex; gap:8px; flex-wrap:wrap; margin-top:12px}
.chip{
  padding:8px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color: rgba(245,247,255,.78);
  font-weight:700;
  font-size:12px;
}

/* Portfolio cards */
.work-grid{display:grid; grid-template-columns: repeat(3, 1fr); gap:16px}
.work{
  border-radius: 26px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  position:relative;
  transition: var(--trans);
}
.work:hover{transform: translateY(-4px); border-color: rgba(255,45,45,.28); box-shadow: var(--shadow), var(--glow)}
.work .thumb{
  height: 160px;
  background:
    radial-gradient(600px 220px at 20% 0%, rgba(255,45,45,.22), transparent 60%),
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
}
.work .body{padding:16px}
.work h4{margin:0 0 6px; font-size:16px}
.work .meta{color:var(--muted); font-weight:650; font-size:13px; line-height:1.45}
.work .actions{
  margin-top:12px;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.work .tag{
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color: rgba(245,247,255,.78);
  font-weight:750;
  font-size:12px;
}

/* Skills */
.skills{display:grid; grid-template-columns: repeat(2, 1fr); gap:12px}
.skill{
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  padding:14px;
}
.skill .row{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  font-weight:800;
  font-size:14px;
}
.skill .row span{color: var(--muted); font-weight:750}
.bar{
  height:10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow:hidden;
  margin-top:10px;
  border:1px solid rgba(255,255,255,.08);
}
.fill{
  height:100%;
  width:0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--red2));
  box-shadow: var(--glow);
  transition: width 900ms cubic-bezier(.2,.8,.2,1);
}

/* Process */
.process{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
}
.steps{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
}
.step{
  border-radius: 22px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  padding:16px;
  transition: var(--trans);
}
.step:hover{transform: translateY(-3px); border-color: rgba(255,45,45,.28); box-shadow: var(--shadow), var(--glow)}
.step h4{margin:8px 0 6px}
.step p{margin:0; color:var(--muted); font-size:13px; line-height:1.6}
.step .num{
  width:38px; height:38px; border-radius: 14px;
  display:grid; place-items:center;
  background: rgba(255,45,45,.12);
  border:1px solid rgba(255,45,45,.22);
  box-shadow: var(--glow);
  font-weight:900;
}
.centerGlow{
  border-radius: var(--radius2);
  padding:18px;
  border:1px solid rgba(255,255,255,.12);
  background: radial-gradient(450px 250px at 50% 30%, rgba(255,45,45,.18), rgba(255,255,255,.03));
}

/* Testimonials */
.slider{
  position:relative;
}
.trow{display:grid; grid-template-columns: repeat(3, 1fr); gap:12px}
.testi{
  border-radius: 22px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  padding:16px;
  min-height: 170px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:12px;
}
.testi p{margin:0; color: rgba(245,247,255,.80); line-height:1.65; font-size:14px}
.testi .who{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  color: var(--muted);
  font-weight:750;
  font-size:13px;
}
.stars{letter-spacing:1px; color: var(--red); text-shadow: var(--glow)}

/* FAQ */
.faq{display:grid; grid-template-columns: 1.15fr .85fr; gap:14px}
.acc{
  border-radius: 22px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  overflow:hidden;
}
.qa{border-top:1px solid rgba(255,255,255,.10)}
.qa:first-child{border-top:none}
.qbtn{
  width:100%;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  background: transparent;
  border:none;
  padding:16px;
  color:var(--text);
  cursor:pointer;
  text-align:left;
  font-weight:850;
}
.qbtn span{color:var(--muted); font-weight:800; font-size:13px}
.ans{
  max-height:0;
  overflow:hidden;
  transition: max-height 260ms ease;
  padding: 0 16px;
}
.ans p{
  margin:0 0 16px;
  color:var(--muted);
  line-height:1.7;
  font-size:14px;
}
.qa.open .ans{max-height:220px}
.help{
  border-radius: 22px;
  border:1px solid rgba(255,255,255,.12);
  background: radial-gradient(420px 220px at 30% 0%, rgba(255,45,45,.16), rgba(255,255,255,.03));
  padding:18px;
  box-shadow: var(--shadow);
}
.help h4{margin:0 0 8px}
.help p{margin:0 0 12px; color:var(--muted); line-height:1.65; font-size:14px}

/* Contact */
.contact{
  display:grid; grid-template-columns: 1fr 1fr; gap:14px;
}
.field{
  display:flex; flex-direction:column; gap:8px;
  margin-bottom:12px;
}
label{font-weight:800; font-size:13px; color: rgba(245,247,255,.85)}
input, textarea{
  background: rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding:12px 12px;
  color:var(--text);
  outline:none;
  transition: var(--trans);
}
textarea{min-height: 120px; resize:vertical}
input:focus, textarea:focus{
  border-color: rgba(255,45,45,.35);
  box-shadow: var(--glow);
}
.note{color:var(--muted); font-size:13px; line-height:1.6}

/* Footer */
.footer{
  padding: 34px 0 46px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.18);
}
.foot{
  display:grid;
  grid-template-columns: 1.3fr .9fr .9fr;
  gap:14px;
}
.foot h4{margin:0 0 10px}
.foot a{display:block; color: var(--muted); padding:8px 0; font-weight:700}
.foot a:hover{color:var(--text)}
.copy{margin-top:16px; color: rgba(245,247,255,.55); font-size:13px}

/* Reveal animations (JS adds .in) */
.reveal{
  opacity:0;
  transform: translateY(18px);
  transition: 700ms cubic-bezier(.2,.8,.2,1);
}
.reveal.in{
  opacity:1;
  transform: translateY(0px);
}

/* Responsive */
@media (max-width: 980px){
  .hero-grid{grid-template-columns: 1fr}
  .profile-wrap img{height: 320px}
  .stats{grid-template-columns: repeat(2, 1fr)}
  .grid-3{grid-template-columns: 1fr}
  .grid-4{grid-template-columns: repeat(2, 1fr)}
  .work-grid{grid-template-columns: 1fr}
  .skills{grid-template-columns: 1fr}
  .steps{grid-template-columns: 1fr}
  .trow{grid-template-columns: 1fr}
  .faq{grid-template-columns: 1fr}
  .contact{grid-template-columns: 1fr}
  .foot{grid-template-columns: 1fr}
  .navlinks{display:none}
  .burger{display:inline-flex}
}

@media (prefers-reduced-motion: reduce){
  .track{animation:none}
  .reveal{transition:none}
  .btn, .card, .work, .step, .sbtn{transition:none}
}

/* =========================
   Responsive Fix Patch
   Paste at END of style.css
========================= */

/* Prevent horizontal overflow due to long text/buttons */
.container, .panel, .card, .work, .hero-card { min-width: 0; }
h1,h2,h3,h4,p { overflow-wrap: anywhere; }
.nav, .section-head, .hero-ctas, .hero-meta, .actions { flex-wrap: wrap !important; }

/* Earlier breakpoint for small laptops (your main issue) */
@media (max-width: 1150px){
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-card{ max-width: 620px; margin-inline:auto; }
  .profile-wrap img{ height: 320px; }

  .section-head{ align-items:flex-start; }
  .section-head .btn{ margin-top:10px; }
}

/* Make nav behave better before mobile */
@media (max-width: 1050px){
  .navlinks{ display:none; }
  .burger{ display:inline-flex; }
  .actions{ justify-content:flex-end; width:100%; }
}

/* Better layout for tablets */
@media (max-width: 900px){
  .stats{ grid-template-columns: repeat(2, 1fr); }
  .grid-2{ grid-template-columns: 1fr; }
  .grid-3{ grid-template-columns: 1fr; }
  .grid-4{ grid-template-columns: repeat(2, 1fr); }
  .work-grid{ grid-template-columns: 1fr; }
  .faq{ grid-template-columns: 1fr; }
  .foot{ grid-template-columns: 1fr; }
}

/* Mobile refinements */
@media (max-width: 560px){
  .container{ width: calc(100% - 24px); }
  .hero{ padding-top: 34px; }
  .h1{ font-size: 34px; }
  .profile-wrap img{ height: 280px; }
  .btn{ padding: 10px 12px; }
  .hero-ctas{ gap:10px; }
  .hero-meta{ gap:10px; }
  .pill{ width: fit-content; }
}

