/* ==========================================
   MUBASHIR PORTFOLIO - Premium Design System
   ========================================== */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap");

:root {
  --bg: #04060f;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 210, 255, 0.3);
  --primary: #00d2ff;
  --primary-dark: #3a7bd5;
  --purple: #9d50bb;
  --pink: #f64f59;
  --grad-blue: linear-gradient(135deg, #00d2ff, #3a7bd5);
  --grad-purple: linear-gradient(135deg, #9d50bb, #6e48aa);
  --grad-pink: linear-gradient(135deg, #f64f59, #c471ed);
  --text: #f1f5f9;
  --text-muted: #64748b;
  --text-sub: #94a3b8;
  --nav-h: 75px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

/* Ambient background orbs */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(0, 210, 255, 0.07) 0%,
    transparent 70%
  );
  top: -200px;
  left: -200px;
}
body::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(157, 80, 187, 0.07) 0%,
    transparent 70%
  );
  bottom: -150px;
  right: -150px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ── UTILITIES ── */
.gradient-text {
  background: var(--grad-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.glass {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.text-muted {
  color: var(--text-muted);
}
.text-sub {
  color: var(--text-sub);
}
section {
  padding: 70px 0;
}
#about {
  padding-top: 5px;
}

/* ── NAVIGATION ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1000;
  transition: all 0.4s var(--ease);
}
nav.scrolled {
  background: rgba(4, 6, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 65px;
}
nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.04em;
}
.logo span {
  background: var(--grad-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-sub);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-blue);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover {
  color: var(--text);
}
.nav-links a:hover::after {
  transform: scaleX(1);
}

.mobile-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.mobile-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}
.mobile-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-btn.open span:nth-child(2) {
  opacity: 0;
}
.mobile-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── HERO ── */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-h);
  padding-bottom: 20px;
  position: relative;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 4rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.25);
  border-radius: 50px;
  padding: 0.4rem 1.1rem;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.6s var(--ease) both;
}
.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s infinite;
}

.hero-text h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.2rem;
  animation: fadeInUp 0.7s var(--ease) 0.1s both;
}

.hero-text .role {
  font-size: 1.3rem;
  color: var(--text-sub);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.7s var(--ease) 0.2s both;
}

.hero-text p {
  color: var(--text-sub);
  font-size: 1.05rem;
  max-width: 540px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.7s var(--ease) 0.3s both;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s var(--ease) 0.4s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.3s var(--ease);
}
.btn-primary {
  background: var(--grad-blue);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 210, 255, 0.25);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 210, 255, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

/* Profile Photo */
.hero-photo {
  position: relative;
  animation: fadeInRight 0.8s var(--ease) 0.3s both;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-photo img {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border: 3px solid rgba(0, 210, 255, 0.4);
  box-shadow: 0 0 0 8px rgba(0, 210, 255, 0.08), 0 0 40px rgba(0, 210, 255, 0.2),
    0 20px 60px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.4s var(--ease);
}
.hero-photo img:hover {
  box-shadow: 0 0 0 10px rgba(0, 210, 255, 0.12),
    0 0 60px rgba(0, 210, 255, 0.3), 0 20px 60px rgba(0, 0, 0, 0.5);
}
.hero-photo .floating-badge {
  position: absolute;
  z-index: 2;
  background: rgba(4, 6, 15, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.7rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.hero-photo .fb-exp {
  bottom: 10px;
  left: -10px;
}
.hero-photo .fb-apps {
  top: 10px;
  right: -10px;
}
.fb-icon {
  font-size: 1.4rem;
}

/* ── SECTION HEADERS ── */

.section-head {
  text-align: center;
  margin-bottom: 40px;
}
.section-head .label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.section-head h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about-text h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.about-text p {
  color: var(--text-sub);
  line-height: 1.85;
  margin-bottom: 1rem;
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
.stat {
  padding: 1.5rem;
  text-align: center;
}
.stat .num {
  font-size: 2.2rem;
  font-weight: 800;
  display: block;
}
.stat .desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ── SKILLS ── */
#skills {
  background: rgba(255, 255, 255, 0.01);
}
.skills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.skill-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: default;
  transition: all 0.3s var(--ease);
}
.skill-chip:hover {
  background: rgba(0, 210, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.35);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 210, 255, 0.1);
}
.skill-chip i {
  font-size: 1.1rem;
}

/* ── EXPERIENCE ── */
.timeline {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
  transform: translateX(-50%);
}
.t-item {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
  position: relative;
}
.t-item:nth-child(odd) {
  flex-direction: row;
  padding-right: calc(50% + 2rem);
}
.t-item:nth-child(even) {
  flex-direction: row-reverse;
  padding-left: calc(50% + 2rem);
}
.t-dot {
  position: absolute;
  left: 50%;
  top: 2rem;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: var(--grad-blue);
  border-radius: 50%;
  border: 3px solid var(--bg);
  z-index: 2;
  box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.2);
}
.t-card {
  padding: 1.8rem;
  width: 100%;
}
.t-card .period {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.t-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.3rem 0;
}
.t-card .company {
  color: var(--text-sub);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.t-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ── PROJECTS ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}
.proj-card {
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  cursor: pointer;
}
.proj-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 210, 255, 0.15);
}

.proj-img {
  height: 280px;
  overflow: hidden;
  position: relative;
  background: #0d1120;
}
.proj-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  transition: transform 0.5s var(--ease);
  padding: 8px;
}
.proj-card:hover .proj-img img {
  transform: scale(1.04);
}

.proj-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.proj-card:hover .proj-overlay {
  opacity: 1;
}
.proj-overlay span {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-weight: 600;
}

.proj-body {
  padding: 1.5rem;
}
.proj-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.proj-body p {
  color: var(--text-sub);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.proj-tag {
  font-size: 0.73rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  background: rgba(0, 210, 255, 0.07);
  border: 1px solid rgba(0, 210, 255, 0.15);
  border-radius: 50px;
  color: var(--primary);
}

.proj-links {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.1rem;
}
.proj-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text-sub);
  transition: all 0.25s;
}
.proj-links a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 210, 255, 0.07);
}
.proj-links a.play {
  border-color: rgba(52, 199, 89, 0.3);
  color: #34c759;
}
.proj-links a.play:hover {
  background: rgba(52, 199, 89, 0.07);
}
.proj-links a.store {
  border-color: rgba(0, 122, 255, 0.3);
  color: #007aff;
}
.proj-links a.store:hover {
  background: rgba(0, 122, 255, 0.07);
}

/* ── GALLERY MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
}
.modal-overlay.active {
  display: flex;
}
.modal-box {
  background: #0a0f1e;
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 90vw;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  animation: scaleIn 0.3s var(--ease);
}
.modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s;
}
.modal-close:hover {
  background: var(--surface-hover);
}
.modal-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.modal-tagline {
  color: var(--text-sub);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.modal-gallery img {
  width: 100%;
  border-radius: 12px;
  object-fit: contain;
  object-position: top center;
  aspect-ratio: 9/16;
  background: #0d1120;
  cursor: pointer;
  transition: transform 0.3s;
}
.modal-gallery img:hover {
  transform: scale(1.03);
}
.modal-desc {
  color: var(--text-sub);
  font-size: 0.92rem;
  line-height: 1.8;
  white-space: pre-line;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.97);
  align-items: center;
  justify-content: center;
}
.lightbox.active {
  display: flex;
}
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.7;
}
.lightbox-close:hover {
  opacity: 1;
}

/* ── CONTACT ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.contact-info h3 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.contact-info p {
  color: var(--text-sub);
  line-height: 1.8;
  margin-bottom: 2rem;
}
.contact-list {
  list-style: none;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 0.8rem;
  color: var(--text-sub);
  font-size: 0.92rem;
}
.contact-list li i {
  color: var(--primary);
  font-size: 1rem;
  width: 18px;
}
.contact-list li a {
  color: var(--text-sub);
  text-decoration: none;
}
.contact-list li a:hover {
  color: var(--primary);
}

.socials {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}
.social-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-sub);
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.3s var(--ease);
}
.social-btn:hover {
  background: rgba(0, 210, 255, 0.1);
  border-color: var(--border-glow);
  color: var(--primary);
  transform: translateY(-3px);
}

/* Contact card side */
.contact-card {
  padding: 2.5rem;
}
.contact-card h4 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.contact-card p {
  color: var(--text-sub);
  margin-bottom: 1.5rem;
}
.contact-card .btn-primary {
  width: 100%;
  justify-content: center;
  font-size: 1rem;
  padding: 1rem;
  border-radius: 14px;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}
footer strong {
  color: var(--text-sub);
}

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.93);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 210, 255, 0.6);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(0, 210, 255, 0);
  }
}
[data-aos] {
  transition-property: opacity, transform !important;
}

/* ── MOBILE MENU ── */
@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: 70%;
    max-width: 320px;
    flex-direction: column;
    gap: 0;
    background: rgba(4, 6, 15, 0.97);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    padding: 5rem 2rem 2rem;
    transition: right 0.35s var(--ease);
  }
  .nav-links.open {
    right: 0;
  }
  .nav-links li a {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border);
  }
  .mobile-btn {
    display: flex;
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-photo {
    max-width: 320px;
    margin: 0 auto;
  }
  .hero-text p {
    margin: 0 auto 2.5rem;
  }
  .hero-btns {
    justify-content: center;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .timeline::before {
    left: 20px;
  }
  .t-item:nth-child(odd),
  .t-item:nth-child(even) {
    flex-direction: column;
    padding: 0 0 0 50px;
  }
  .t-dot {
    left: 14px;
  }
}

@media (max-width: 600px) {
  section {
    padding: 80px 0;
  }
  .hero {
    min-height: auto;
    padding: 120px 0 60px;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .modal-box {
    padding: 1.5rem;
  }
  .modal-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
