/* ============================================================
   MOGAHID GAFFAR — Portfolio 2025
   style.css
   ============================================================ */

/* ---- Design Tokens ---- */
:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Colors */
  --bg:           #ffffff;
  --bg-alt:       #f8fafc;
  --bg-dark:      #0f172a;
  --bg-dark-2:    #1e293b;
  --border:       #e2e8f0;
  --text:         #0f172a;
  --text-muted:   #64748b;
  --accent:       #2563eb;
  --accent-dark:  #1d4ed8;
  --accent-light: #eff6ff;

  /* Spacing */
  --section-py:   96px;
  --container:    1200px;

  /* UI */
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    20px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow:       0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.12);
  --transition:   .25s cubic-bezier(.4,0,.2,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }

/* ---- Utility ---- */
.container {
  width: min(var(--container), 100%);
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: var(--section-py) 0;
}
.section-alt { background: var(--bg-alt); }
.section-dark {
  background: var(--bg-dark);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #334155;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin-top: 8px;
}
.section-header h2.light,
.section-header .light { color: #f1f5f9; }
.section-header .section-desc { color: var(--text-muted); margin-top: 12px; max-width: 560px; margin-left: auto; margin-right: auto; }
.section-header .section-desc.light { color: #94a3b8; }
.section-tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 12px;
  border-radius: 100px;
}
.section-tag.light {
  background: rgba(37,99,235,.2);
  color: #93c5fd;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.btn-lg { padding: 13px 28px; font-size: .95rem; }
.btn-full { width: 100%; justify-content: center; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37,99,235,.3);
}
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 6px 20px rgba(37,99,235,.4); transform: translateY(-1px); }

.btn-outline {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn-outline:hover { background: var(--accent-light); }

.btn-ghost {
  color: var(--text-muted);
  border: 2px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: background var(--transition), padding var(--transition), box-shadow var(--transition);
}
.navbar.scrolled {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 12px 0;
}
.navbar-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.04em;
  flex-shrink: 0;
}
.nav-logo .dot { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--bg-alt); }
.nav-cta { flex-shrink: 0; }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 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); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15,23,42,.97);
  padding: 80px 24px 40px;
  flex-direction: column;
  gap: 0;
}
.mobile-nav.open { display: flex; }
.mobile-link {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: #f1f5f9;
  padding: 16px 0;
  border-bottom: 1px solid #1e293b;
  transition: color var(--transition);
}
.mobile-link:hover { color: var(--accent); }

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-dark);
  color: #f1f5f9;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(37,99,235,.12) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.hero-grid-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 50%, rgba(37,99,235,.08) 0%, transparent 60%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: center;
  gap: 60px;
  padding-top: 40px;
  padding-bottom: 80px;
}
.hero-content { display: flex; flex-direction: column; gap: 20px; }
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #93c5fd;
  background: rgba(37,99,235,.15);
  border: 1px solid rgba(37,99,235,.3);
  padding: 6px 14px;
  border-radius: 100px;
  width: fit-content;
}
.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 6px #4ade80;
}
.hero-name {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.04em;
  color: #f8fafc;
}
.hero-name span { color: var(--accent); }
.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  color: #94a3b8;
  min-height: 2em;
}
.typed-wrap { display: inline-block; }
.typed { font-weight: 600; color: #93c5fd; }
.typed-cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink .7s infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
.hero-desc { color: #94a3b8; font-size: 1.05rem; max-width: 520px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-social {
  display: flex;
  gap: 14px;
  margin-top: 4px;
}
.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  color: #94a3b8;
  font-size: 1.1rem;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,.1);
}
.hero-social a:hover { background: rgba(37,99,235,.3); color: #93c5fd; border-color: rgba(37,99,235,.4); transform: translateY(-2px); }

/* Hero photo */
.hero-photo {
  position: relative;
  width: 400px;
  height: 400px;
  flex-shrink: 0;
  justify-self: end;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(37,99,235,.2);
}
.photo-ring {
  position: absolute;
  inset: -8px;
  border-radius: calc(var(--radius-lg) + 8px);
  border: 2px solid rgba(37,99,235,.3);
  z-index: 0;
  animation: ring-pulse 3s ease-in-out infinite;
}
@keyframes ring-pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.02); }
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  color: #64748b;
  animation: bounce 2s ease-in-out infinite;
  transition: color var(--transition);
  font-size: 1rem;
}
.scroll-hint:hover { color: #93c5fd; }
@keyframes bounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(6px); } }

/* Scroll animations */
.reveal, .fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s cubic-bezier(.4,0,.2,1), transform .6s cubic-bezier(.4,0,.2,1);
}
.reveal.visible, .fade-up.visible {
  opacity: 1;
  transform: none;
}

/* ---- About ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 60px;
  align-items: start;
  margin-bottom: 56px;
}
.about-text p { color: var(--text-muted); line-height: 1.8; margin-bottom: 16px; }
.about-text p strong { color: var(--text); }
.about-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stat-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
}
.stat-number {
  display: block;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -.04em;
  line-height: 1;
}
.stat-plus { font-size: 1.5rem; }
.stat-label { font-size: .8rem; font-weight: 500; color: var(--text-muted); margin-top: 6px; display: block; text-transform: uppercase; letter-spacing: .05em; }

.about-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.pillar {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.pillar:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.pillar-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
  color: #fff;
}
.bg-blue   { background: #2563eb; }
.bg-purple { background: #7c3aed; }
.bg-green  { background: #059669; }
.bg-orange { background: #ea580c; }
.pillar h3 { font-size: .95rem; font-weight: 600; margin-bottom: 8px; }
.pillar p  { font-size: .85rem; color: var(--text-muted); line-height: 1.6; }

/* ---- Skills ---- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 60px;
  align-items: start;
}
.skill-bar { margin-bottom: 24px; }
.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.skill-name { font-size: .9rem; font-weight: 600; }
.skill-pct  { font-size: .8rem; font-weight: 700; color: var(--accent); }
.skill-track {
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
  border-radius: 100px;
  width: 0;
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
}

.tech-tags { margin-bottom: 36px; }
.tech-tags h3, .languages-wrap h3 { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 14px; }
.tags-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: .8rem;
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
  color: var(--text-muted);
  transition: var(--transition);
}
.tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.lang-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.lang-item:last-child { border-bottom: none; }
.lang-flag { font-size: 1.4rem; }
.lang-info { flex: 1; }
.lang-name  { display: block; font-weight: 600; font-size: .9rem; }
.lang-level { font-size: .75rem; color: var(--text-muted); }
.lang-dots  { display: flex; gap: 4px; }
.lang-dots .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.lang-dots .dot.filled { background: var(--accent); }

/* ---- Services ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.section-alt .service-card { background: var(--bg); }
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: var(--accent); }
.service-icon {
  width: 48px; height: 48px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 16px;
}
.service-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: 10px; }
.service-card p  { font-size: .85rem; color: var(--text-muted); line-height: 1.65; }

/* ---- Projects ---- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.project-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.project-img {
  position: relative;
  overflow: hidden;
  height: 200px;
}
.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.project-card:hover .project-img img { transform: scale(1.05); }
.project-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(15,23,42,.75));
  padding: 16px 14px 10px;
}
.project-category {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #93c5fd;
}
.project-body { padding: 20px; }
.project-body h3 { font-size: .95rem; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.project-body p  { font-size: .83rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 14px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tags span {
  font-size: .72rem;
  font-weight: 600;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 100px;
  padding: 3px 10px;
}
.projects-more { text-align: center; margin-top: 48px; }

/* ---- Experience / Timeline ---- */
.timeline {
  position: relative;
  padding-left: 32px;
  max-width: 800px;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 40px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -40px;
  top: 6px;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline-dot.dot-accent { background: var(--bg-dark); box-shadow: 0 0 0 2px var(--text-muted); }
.timeline-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: box-shadow var(--transition);
}
.timeline-card:hover { box-shadow: var(--shadow); }
.timeline-card-edu { border-left: 3px solid var(--text-muted); }
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.timeline-header h3 { font-size: 1rem; font-weight: 700; }
.timeline-company {
  display: block;
  font-size: .85rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 2px;
}
.timeline-date {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.timeline-card > p { font-size: .875rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 14px; }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.timeline-tags span {
  font-size: .72rem;
  font-weight: 600;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 100px;
  padding: 3px 10px;
}

/* ---- Education ---- */
.education-card {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
  max-width: 720px;
  margin: 0 auto;
}
.edu-icon {
  width: 56px; height: 56px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--accent);
  flex-shrink: 0;
}
.edu-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.edu-school {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}
.edu-date {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.edu-body p { font-size: .875rem; color: var(--text-muted); line-height: 1.7; }

@media (max-width: 480px) {
  .education-card { flex-direction: column; padding: 24px 20px; }
}

/* ---- Certifications ---- */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.cert-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.cert-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.cert-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-dark);
}
.cert-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.cert-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.cert-body h3 { font-size: .95rem; font-weight: 700; line-height: 1.4; }
.cert-issuer {
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
}
.cert-body p { font-size: .82rem; color: var(--text-muted); line-height: 1.65; margin-top: 4px; }

@media (max-width: 1024px) { .certs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .certs-grid { grid-template-columns: 1fr; } }

/* ---- Testimonials ---- */
.section-cta { text-align: center; margin-top: 40px; }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.testimonial-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.testimonials-grid .testimonial-card:nth-child(4) { grid-column: 1; }
.testimonials-grid .testimonial-card:nth-child(5) { grid-column: 2 / 4; }
.quote-icon { font-size: 1.5rem; color: var(--accent); opacity: .4; }
.testimonial-text {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.75;
  font-style: italic;
  flex: 1;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.testimonial-author img {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.testimonial-avatar-placeholder {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.testimonial-author strong { display: block; font-size: .875rem; font-weight: 700; }
.testimonial-author span  { font-size: .75rem; color: var(--text-muted); }

/* ---- Blog ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.blog-img-wrap {
  display: block;
  overflow: hidden;
  height: 200px;
}
.blog-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.blog-card:hover .blog-img-wrap img { transform: scale(1.05); }
.blog-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.blog-tag {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}
.blog-body h3 { font-size: .95rem; font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.blog-body h3 a:hover { color: var(--accent); }
.blog-body p  { font-size: .83rem; color: var(--text-muted); line-height: 1.65; flex: 1; margin-bottom: 16px; }
.blog-link {
  font-size: .83rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition);
  margin-top: auto;
}
.blog-link:hover { gap: 8px; }
.blog-more { text-align: center; margin-top: 48px; }

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 60px;
  align-items: start;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #1e293b;
}
.contact-item:last-of-type { border-bottom: none; margin-bottom: 20px; }
.contact-icon {
  width: 44px; height: 44px;
  background: rgba(37,99,235,.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #93c5fd;
  flex-shrink: 0;
}
.contact-label { display: block; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #64748b; margin-bottom: 3px; }
.contact-item a, .contact-item span { color: #cbd5e1; font-size: .9rem; font-weight: 500; }
.contact-item a:hover { color: #93c5fd; }
.contact-availability {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
  font-weight: 600;
  color: #4ade80;
  background: rgba(74,222,128,.1);
  border: 1px solid rgba(74,222,128,.2);
  border-radius: 100px;
  padding: 8px 16px;
  margin-top: 4px;
}
.avail-dot {
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 8px #4ade80;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* Contact form */
.contact-form-wrap {
  background: rgba(255,255,255,.04);
  border: 1px solid #1e293b;
  border-radius: var(--radius-lg);
  padding: 36px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label { font-size: .82rem; font-weight: 600; color: #94a3b8; }
.form-group label span { color: var(--accent); }
.form-group input,
.form-group textarea {
  background: rgba(255,255,255,.05);
  border: 1px solid #334155;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: #f1f5f9;
  font-size: .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  resize: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #475569; }
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.form-group input.error,
.form-group textarea.error { border-color: #f87171; }
.field-error { font-size: .75rem; color: #f87171; min-height: 1em; }
.form-feedback {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  display: none;
}
.form-feedback.success {
  display: block;
  background: rgba(74,222,128,.1);
  border: 1px solid rgba(74,222,128,.25);
  color: #4ade80;
}
.form-feedback.error {
  display: block;
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.25);
  color: #f87171;
}
#submit-btn .btn-loading { display: none; }
#submit-btn.loading .btn-text { display: none; }
#submit-btn.loading .btn-loading { display: inline; }
#submit-btn.loading { opacity: .7; cursor: not-allowed; }

/* ---- Footer ---- */
.footer {
  background: #080e1a;
  color: #64748b;
  padding: 48px 0 0;
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  gap: 48px;
  padding-bottom: 48px;
  flex-wrap: wrap;
}
.footer-left p { font-size: .85rem; color: #475569; margin-top: 8px; line-height: 1.6; }
.footer-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
  flex-wrap: wrap;
}
.footer-links a { font-size: .875rem; color: #475569; transition: color var(--transition); }
.footer-links a:hover { color: #93c5fd; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px; height: 36px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 1rem;
  transition: var(--transition);
}
.footer-social a:hover { background: rgba(37,99,235,.2); color: #93c5fd; border-color: rgba(37,99,235,.3); }
.footer-bottom {
  border-top: 1px solid #0f172a;
  padding: 16px 24px;
  text-align: center;
  font-size: .8rem;
  color: #334155;
}

/* ---- Back to top ---- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px; height: 44px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 14px rgba(37,99,235,.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 500;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: none; }
.back-to-top:hover { background: var(--accent-dark); }

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

/* Tablet: ≤1024px */
@media (max-width: 1024px) {
  :root { --section-py: 72px; }

  .hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-content { align-items: center; }
  .hero-photo { width: 280px; height: 280px; justify-self: center; }
  .hero-desc { margin: 0 auto; }

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

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

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

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

  .testimonials-grid { grid-template-columns: 1fr 1fr; }
  .testimonials-grid .testimonial-card:nth-child(5) { grid-column: 1 / 3; }

  .contact-grid { grid-template-columns: 1fr; }
  .contact-info { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }

  .footer-inner { flex-direction: column; gap: 28px; }
  .footer-links { margin-left: 0; }
}

/* Mobile: ≤768px */
@media (max-width: 768px) {
  :root { --section-py: 56px; }

  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }

  .hero-inner { padding-bottom: 60px; }
  .hero-photo { width: 220px; height: 220px; }
  .hero-actions { justify-content: center; }
  .hero-social { justify-content: center; }

  .about-stats { grid-template-columns: 1fr 1fr; }
  .about-pillars { grid-template-columns: 1fr 1fr; }

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

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

  .timeline { padding-left: 24px; }
  .timeline-dot { left: -32px; }

  .testimonials-grid { grid-template-columns: 1fr; }
  .testimonials-grid .testimonial-card:nth-child(4) { grid-column: auto; }
  .testimonials-grid .testimonial-card:nth-child(5) { grid-column: auto; }

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

  .contact-info { grid-template-columns: 1fr; }
  .contact-form-wrap { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; }

  .timeline-header { flex-direction: column; }
}

/* Small mobile: ≤480px */
@media (max-width: 480px) {
  .hero-actions .btn { flex: 1; justify-content: center; min-width: 0; }
  .about-pillars { grid-template-columns: 1fr; }
}
