/* ============================================================
   SHAHZAIB MEHMOOD – Portfolio Stylesheet
   Theme: Clean dark slate – professional, recruiter-friendly
   Fonts: Manrope (headings) + Inter (body)
   ============================================================ */

/* ---------- CSS VARIABLES ---------- */
:root {
  /* Colours */
  --bg:           #0f1117;
  --bg-section:   #13161e;
  --bg-white:     #0f1117;
  --bg-light:     #13161e;
  --bg-card:      #191d27;
  --bg-card-hover:#1e2230;
  --border:       #252a38;
  --border-light: #2e3448;

  --accent:       #3b82f6;   /* blue-500 – calm, professional */
  --accent-dark:  #2563eb;
  --accent-light: #60a5fa;
  --accent-muted: #3b82f615;

  --text:         #e2e8f4;
  --text-muted:   #7a87a3;
  --text-dim:     #3d4a63;
  --text-on-accent: #ffffff;

  /* Typography */
  --font-head: 'Manrope', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing & shape */
  --radius:    10px;
  --radius-sm: 6px;
  --max-w:     1080px;
  --transition: 0.2s ease;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 62px;
  z-index: 1000;
  transition: background var(--transition), border-bottom var(--transition), backdrop-filter var(--transition);
}

/* Scrolled state – added via JS */
.navbar.scrolled {
  background: rgba(15, 17, 23, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Logo / name */
.nav-logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: color var(--transition);
}
.nav-logo:hover { color: var(--accent-light); }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav-links a {
  display: block;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover { color: var(--text); background: var(--bg-card); }
.nav-links a.active { color: var(--accent-light); }

/* Contact CTA button in nav */
.nav-links .nav-cta {
  background: var(--accent);
  color: var(--text-on-accent);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.nav-links .nav-cta:hover { background: var(--accent-dark); color: #fff; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 1.5rem 60px;
  background: var(--bg);
  /* Subtle top radial glow – professional, not flashy */
  background-image: radial-gradient(ellipse 70% 50% at 50% 0%, #1e2d4f33, transparent);
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

/* "DevOps & Cloud Engineer" pre-title */
.hero-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 1rem;
}

/* Name */
.hero-name {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

/* Summary paragraph */
.hero-summary {
  max-width: 600px;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}

/* Action buttons */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

/* Social links under hero */
.hero-links {
  display: flex;
  gap: 1.25rem;
}
.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}
.hero-links a:hover { color: var(--accent-light); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.3rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

/* Solid blue */
.btn-primary {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
}

/* Outlined blue */
.btn-outline {
  background: transparent;
  color: var(--accent-light);
  border-color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent-muted);
  transform: translateY(-1px);
  color: var(--accent-light);
}

/* Ghost */
.btn-ghost {
  background: var(--bg-card);
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--bg-card-hover);
  color: var(--text);
  transform: translateY(-1px);
}

.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   SHARED SECTION STYLES
   ============================================================ */
.section { padding: 90px 1.5rem; }
.section-white { background: var(--bg); }
.section-light  { background: var(--bg-section); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

/* Scroll-reveal utility – toggled by JS IntersectionObserver */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 3.5rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  line-height: 1.8;
}

/* Stats sidebar */
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  text-align: center;
}
.stat-number {
  display: block;
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent-light);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============================================================
   TECHNICAL SKILLS
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  transition: border-color var(--transition);
}
.skill-group:hover { border-color: var(--border-light); }

.skill-group-title {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.badge {
  display: inline-block;
  padding: 0.22rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition);
}
.badge:hover {
  color: var(--text);
  border-color: var(--border-light);
}

/* ============================================================
   EXPERIENCE TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

/* Vertical line */
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.25rem;
}
.timeline-item:last-child { margin-bottom: 0; }

/* Dot on the line */
.timeline-marker {
  position: absolute;
  left: -1.165rem;
  top: 0.9rem;
  width: 11px; height: 11px;
  background: var(--accent);
  border: 2px solid var(--bg);
  border-radius: 50%;
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  transition: border-color var(--transition);
}
.timeline-content:hover { border-color: var(--border-light); }

/* Header row: role + date */
.tl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tl-role {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.tl-company {
  font-size: 0.82rem;
  color: var(--accent-light);
  font-weight: 500;
}

.tl-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 0.15rem;
}

/* Bullet list */
.tl-bullets {
  margin-bottom: 1.1rem;
}
.tl-bullets li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.75;
}
.tl-bullets li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--text-dim);
}

/* Tech tags at bottom of card */
.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.tl-tags span {
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: border-color var(--transition), transform var(--transition);
}
.project-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
}

/* Card header: name + github link */
.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.project-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}
.project-link:hover {
  color: var(--accent-light);
  border-color: var(--accent);
}

.project-type {
  font-size: 0.77rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.75;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.project-tags span {
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

/* ============================================================
   CERTIFICATIONS
   ============================================================ */
.certs-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 780px;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}
.cert-item:hover { border-color: var(--border-light); }

.cert-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-muted);
  border: 1px solid var(--accent)33;
  border-radius: var(--radius-sm);
  color: var(--accent-light);
}

.cert-body { flex: 1; }
.cert-body h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.cert-body p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cert-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  background: var(--accent-muted);
  border: 1px solid var(--accent)33;
  border-radius: 999px;
  color: var(--accent-light);
  white-space: nowrap;
}

/* ============================================================
   EDUCATION
   ============================================================ */
.edu-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.75rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 700px;
}

.edu-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-muted);
  border: 1px solid var(--accent)33;
  border-radius: var(--radius-sm);
  color: var(--accent-light);
}

.edu-body h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.edu-institution {
  font-size: 0.85rem;
  color: var(--accent-light);
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.edu-note {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.edu-degree-tag {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  background: var(--accent-muted);
  border: 1px solid var(--accent)33;
  border-radius: var(--radius-sm);
  color: var(--accent-light);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-intro {
  max-width: 580px;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
  align-items: start;
}

/* Contact detail rows */
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), transform var(--transition);
}
.contact-row:hover {
  border-color: var(--border-light);
  transform: translateX(3px);
  color: var(--text);
}
.contact-row.no-link { cursor: default; }
.contact-row.no-link:hover { transform: none; }

.cr-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent-light);
}

.cr-text { display: flex; flex-direction: column; }
.cr-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cr-value {
  font-size: 0.84rem;
  color: var(--text);
}

/* Contact form */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.form-group {
  margin-bottom: 1.1rem;
}
.form-group label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent)18;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }

.form-note {
  font-size: 0.8rem;
  color: var(--accent-light);
  margin-top: 0.75rem;
  text-align: center;
  min-height: 1.2em;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-section);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}
.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: 0.75rem;
}
.footer-links a {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition);
}
.footer-links a:hover {
  color: var(--accent-light);
  border-color: var(--accent);
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 1.75rem; right: 1.75rem;
  width: 40px; height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
  z-index: 99;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  color: var(--accent-light);
  border-color: var(--accent);
  transform: translateY(-2px);
}

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

/* Tablet */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(4, 1fr); margin-top: 1.5rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .edu-card { flex-wrap: wrap; }
  .edu-degree-tag { margin-left: 0; }
}

/* Mobile */
@media (max-width: 680px) {
  /* Hamburger + mobile nav */
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: 62px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 1rem 1.25rem;
    background: rgba(15, 17, 23, 0.98);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 0.9rem; padding: 0.5rem 0.75rem; width: 100%; }
  .nav-links .nav-cta { margin-top: 0.25rem; }

  .section { padding: 64px 1.1rem; }

  .hero-name { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .about-stats { grid-template-columns: repeat(2, 1fr); }

  .tl-header { flex-direction: column; gap: 0.4rem; }
  .tl-date { font-size: 0.76rem; }

  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .skills-grid { grid-template-columns: 1fr; }
  .certs-list { gap: 0.6rem; }
  .stat-number { font-size: 1.4rem; }
}
