/* =============================================
   Syed Farooq Israr — Portfolio CSS
   Font: Outfit (headings) + DM Sans (body)
   ============================================= */

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

:root {
  --blue: #0072dd;
  --blue-hover: #1648c0;
  --blue-light: #eff6ff;
  --blue-mid: #bfdbfe;
  --yellow: #f9b313;
  --yellow-hover: #eca706;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg: #fffffb;
  --white: #ffffff;
  --card-bg: #ffffff;
  --nav-h: 64px;
  --radius: 14px;
  --shadow: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.10);
  --shadow-blue: 0 8px 32px rgba(26,86,219,0.15);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
  overflow-x: hidden;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* =============================================
   SCROLL REVEAL ANIMATION
   ============================================= */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0);
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 80px;
  gap: 32px;
  transition: box-shadow .3s;
  padding: 0 calc(max(40px, (100vw - 1200px) / 2 + 40px));
}
.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.nav-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo .blue { color: var(--blue); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 24px;
  margin: 0 auto;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
  transition: color .2s;
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
  transition: width .25s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ---- BUTTONS ---- */
.btn-primary, .btn-outline, .btn-yellow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, transform .12s, box-shadow .18s;
  border: 1.5px solid transparent;
}
.btn-primary { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); transform: translateY(-2px); box-shadow: var(--shadow-blue); }
.btn-outline { background: var(--white); color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: #94a3b8; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-yellow { background: var(--yellow); color: var(--white); border-color: var(--yellow); }
.btn-yellow:hover { background: var(--yellow-hover); border-color: var(--yellow-hover); transform: translateY(-2px); }

/* ---- HAMBURGER ---- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .25s;
}

/* ---- MOBILE NAV ---- */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 16px 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.mobile-nav a { text-decoration: none; color: var(--text); font-weight: 500; font-size: 15px; }

/* =============================================
   SECTION COMMONS
   ============================================= */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px;
}

.section-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.15;
}

.section-sub {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 40px;
  line-height: 1.5;
  max-width: 560px;
}

/* =============================================
   HERO
   ============================================= */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 40px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - var(--nav-h));
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--blue);
  margin-bottom: 20px;
  text-transform: uppercase;
  background: var(--blue-light);
  border: 1px solid var(--blue-mid);
  border-radius: 20px;
  padding: 5px 14px;
}

.tag-dot {
  width: 7px;
  height: 7px;
  background: var(--blue);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero-name {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(42px, 5.5vw, 64px);
  font-weight: 900;
  color: var(--text);
  line-height: 1.05;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 36px;
  max-width: 460px;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 24px;
  width: fit-content;
  box-shadow: var(--shadow);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
}

.stat-num {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* ---- Hero Right ---- */
.hero-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-photo-card {
  position: relative;
  width: 480px;
  height: 520px;
  top: -30px; 
  left: -40px;
  background: transparent;
  border: none;
  border-radius: 24px;
  box-shadow: none;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: 0;
  overflow: hidden;
}

.hero-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 24px;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  background: #f1f5f9;
}
.hero-photo-placeholder code {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--blue);
}

.hero-photo-badge {
  position: absolute;
  bottom: -14px;
  left: 59%;
  transform: translateX(-50%);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  z-index: 2;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.3); }
}

/* Tech pills floating */
.tech-pill {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  animation: float 3s ease-in-out infinite;
}
.tech-pill i { color: var(--blue); font-size: 11px; }

.pill-1 { top: 100px; right: -40px; animation-delay: 0s; }
.pill-2 { top: 60%; right: -48px; transform: translateY(-50%); animation-delay: 1s; }
.pill-3 { bottom: 60px; right: -48px; animation-delay: 2s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.pill-2 { animation: float2 3s ease-in-out infinite 1s; }
@keyframes float2 {
  0%, 100% { transform: translateY(-50%); }
  50% { transform: translateY(calc(-50% - 6px)); }
}

/* =============================================
   ABOUT
   ============================================= */
#about {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-width: 100%;
  padding: 80px 0;
}

#about > .about-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-text {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.about-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
}
.about-info-item i {
  width: 32px;
  height: 32px;
  background: var(--blue-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 13px;
  flex-shrink: 0;
}

.about-card-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-highlight-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.about-highlight-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateX(4px);
  border-color: var(--blue-mid);
}

.about-card-icon {
  width: 44px;
  height: 44px;
  background: var(--blue);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.about-highlight-card strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.about-highlight-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =============================================
   SKILLS
   ============================================= */
.skills-section { background: var(--bg); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.skill-group {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow .2s, border-color .2s;
}
.skill-group:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--blue-mid);
}

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.skill-group-icon {
  width: 38px;
  height: 38px;
  background: var(--blue-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 16px;
  flex-shrink: 0;
}

.skill-group h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.skill-tag:hover {
  border-color: var(--blue-mid);
  background: var(--blue-light);
  color: var(--blue);
  transform: translateY(-1px);
}

.skill-tag--primary {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
  font-weight: 600;
}
.skill-tag--primary:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
  color: var(--white);
}

/* =============================================
   PROJECTS
   ============================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--blue-light) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s;
}
.project-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: var(--blue-mid);
}
.project-card:hover::before { opacity: 1; }

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-icon {
  width: 40px;
  height: 40px;
  background: var(--blue-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 16px;
  position: relative;
  z-index: 1;
}

.card-view-hint {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .2s, transform .2s;
  position: relative;
  z-index: 1;
}
.project-card:hover .card-view-hint { opacity: 1; transform: translateX(0); }

.project-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  position: relative;
  z-index: 1;
}

.project-card p {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.65;
  flex: 1;
  position: relative;
  z-index: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

.tag {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--white);
}

/* =============================================
   EDUCATION SECTION
   ============================================= */
.edu-layout { margin-top: 8px; }

.edu-entry {
  display: grid;
  grid-template-columns: 130px 40px 1fr;
  cursor: pointer;
}

.edu-year-col {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-top: 18px;
  padding-right: 16px;
}

.edu-year {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.edu-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
}

.edu-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2.5px solid var(--blue);
  background: var(--white);
  flex-shrink: 0;
  z-index: 1;
  transition: transform .2s, background .2s;
}
.edu-dot--active { background: var(--blue); box-shadow: 0 0 0 4px rgba(26,86,219,0.15); }
.edu-entry:hover .edu-dot { transform: scale(1.25); }

.edu-line {
  width: 2px;
  flex: 1;
  background: linear-gradient(to bottom, var(--blue) 0%, #dbeafe 100%);
  margin-top: 4px;
  min-height: 32px;
}
.edu-entry--last .edu-line { display: none; }

.edu-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px 18px;
  margin-bottom: 20px;
  margin-left: 8px;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  position: relative;
}
.edu-card::before {
  content: '';
  position: absolute;
  left: 0; top: 16px; bottom: 16px;
  width: 3px;
  background: var(--blue);
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transition: opacity .2s;
}
.edu-card:hover::before,
.edu-card--active::before { opacity: 1; }
.edu-entry:hover .edu-card {
  box-shadow: var(--shadow-hover);
  transform: translateX(3px);
  border-color: var(--blue-mid);
}
.edu-card--active { border-color: var(--blue-mid); background: #f0f7ff; }

.edu-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.edu-degree {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.edu-institution { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

.edu-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.edu-badge--current { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.edu-badge--done { background: var(--blue-light); color: var(--blue); border: 1px solid var(--blue-mid); }

.edu-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.65; margin-bottom: 12px; }

.edu-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.edu-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 10px;
}
.edu-meta-tag i { font-size: 10px; color: var(--blue); }

.edu-view-hint {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .2s, transform .2s;
}
.edu-entry:hover .edu-view-hint { opacity: 1; transform: translateX(0); }

/* =============================================
   EDUCATION MODAL
   ============================================= */
.edu-modal-box { max-width: 680px !important; }

.edu-modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border);
}
.edu-modal-icon {
  width: 48px;
  height: 48px;
  background: var(--blue-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
  color: var(--blue);
}
.edu-modal-title { font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 800; color: var(--text); line-height: 1.3; }
.edu-modal-sub { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

.edu-modal-tabs {
  display: flex;
  gap: 4px;
  padding: 16px 28px 0;
  border-bottom: 1px solid var(--border);
}
.edu-tab-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 4px 4px 0 0;
  transition: color .15s, border-color .15s;
}
.edu-tab-btn:hover { color: var(--text); }
.edu-tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }

.edu-modal-viewer { padding: 24px 28px 28px; }

.edu-doc-preview {
  background: #f3f4f6;
  border-radius: 10px;
  overflow: hidden;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}
.edu-doc-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.edu-doc-preview iframe { width: 100%; height: 100%; border: none; display: block; }

.edu-doc-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 24px;
}
.edu-doc-placeholder i { font-size: 36px; color: #d1d5db; }
.edu-doc-placeholder code {
  font-size: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--blue);
}

.edu-doc-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

/* =============================================
   PROJECT MODAL
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-box {
  background: var(--white);
  border-radius: 18px;
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.22);
  transform: translateY(24px) scale(.97);
  transition: transform .28s cubic-bezier(.34,1.56,.64,1);
  position: relative;
  scrollbar-width: none;
}
.modal-box::-webkit-scrollbar { display: none; }
.modal-overlay.active .modal-box { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: background .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.modal-close:hover { background: #e2e8f0; }

.modal-slider {
  position: relative;
  width: 100%;
  height: 300px;
  background: #0f172a;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
}
.modal-slides { display: flex; height: 100%; transition: transform .35s ease; }
.modal-slide { min-width: 100%; height: 100%; object-fit: contain; display: block; background-color: #0f172a; }
.modal-slide-placeholder {
  min-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #475569;
  gap: 10px;
  font-size: 13px;
  background: #0f172a;
}

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: white;
  font-size: 28px;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  backdrop-filter: blur(4px);
  line-height: 1;
}
.slide-btn:hover { background: rgba(255,255,255,0.28); }
.slide-prev { left: 12px; }
.slide-next { right: 12px; }

.slide-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.35); cursor: pointer; transition: background .2s, transform .2s; }
.dot.active { background: white; transform: scale(1.2); }

.modal-content { padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.modal-title { font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 800; color: var(--text); }
.modal-desc { color: var(--text-muted); font-size: 14px; line-height: 1.7; }
.modal-features { display: flex; flex-direction: column; gap: 8px; }
.modal-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}
.feature-icon {
  flex-shrink: 0;
  width: 18px; height: 18px;
  background: var(--blue-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-links { display: flex; gap: 10px; }

/* =============================================
   CERTIFICATES
   ============================================= */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.doc-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.doc-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }

.doc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.doc-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; letter-spacing: .5px; }
.badge-pdf, .badge-img { background: var(--yellow); color: var(--white); }

.doc-preview {
  position: relative;
  height: 200px;
  background: #0f172a;
  overflow: hidden;
}
.cert-preview {
  height: 200px !important;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doc-preview .doc-iframe { width: 100%; height: 100%; border: none; display: block; }
.cert-preview img { width: 100%; height: 100%; object-fit: contain !important; display: block; }

.doc-open-btn {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,0.55);
  border-radius: 6px;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.doc-open-btn:hover { background: rgba(0,0,0,0.8); }

.doc-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
}
.doc-actions a { font-size: 13px; font-weight: 500; color: var(--text-muted); text-decoration: none; transition: color .2s; }
.doc-actions a:hover { color: var(--blue); }

/* =============================================
   CONTACT
   ============================================= */
/* =============================================
   MODERN CONTACT STYLE 
   ============================================= */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}

.contact-status-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--blue-light);
  padding: 8px 16px;
  border-radius: 30px;
  margin-top: 20px;
  border: 1px solid var(--blue-mid);
}

.contact-status-box span {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
}

.contact-methods-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Method Card Styling */
.method-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 20px 24px;
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.method-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-hover);
  transform: translateX(8px);
}

.method-icon {
  width: 50px;
  height: 50px;
  background: var(--bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 20px;
}

.method-detail {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.method-detail strong {
  font-size: 16px;
  color: var(--text);
}

.method-detail span {
  font-size: 14px;
  color: var(--text-muted);
}

.method-card .arrow {
  color: #d1d5db;
  transition: transform 0.3s;
}

.method-card:hover .arrow {
  color: var(--blue);
  transform: translateX(5px);
}

/* Social Pills Row */
.social-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.social-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all 0.2s;
}

.social-pill:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.social-pill.linkedin:hover { background: #eef2ff; color: #0077b5; border-color: #0077b5; }
.social-pill.github:hover { background: #f3f4f6; color: #000; border-color: #000; }
.social-pill.whatsapp:hover { background: #f0fdf4; color: #25d366; border-color: #25d366; }
.social-pill.facebook:hover { background: #eff6ff; color: #1877f2; border-color: #1877f2; }

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 24px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);

  padding: 24px calc(max(40px, (100% - 1200px) / 2 + 40px));
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--blue); }

/* =============================================
   FLOATING BUTTON
   ============================================= */
.floating-btn {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 200;
  width: 52px; height: 52px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
}
.floating-btn:hover { transform: scale(1.1); box-shadow: 0 8px 28px rgba(37,211,102,0.55); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-wrapper { grid-template-columns: 1fr; gap: 40px; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .hero {
    display: flex;
    flex-direction: column-reverse;
    padding: 60px 32px;
    min-height: auto;
    gap: 40px;
  }
  .about-layout { grid-template-columns: 1fr; gap: 36px; }
  .hero-right { display: flex; justify-content: center; width: 100%; }
  .tech-pill { display: none; }

  .hero-photo-card {  
  width: 340px; 
  height: 380px; 
  top: 0 !important; 
  left: -20px !important; 
  margin: 0 auto 30px; }
}

@media (max-width: 768px) {
  .navbar { padding: 0 20px; }
  .nav-links, .nav-actions { display: none; }
  .hamburger { display: flex; }
  .section { padding: 56px 20px; }
  #about { padding: 56px 0; }
  #about > .about-layout { padding: 0 20px; }
  .hero { padding: 48px 20px; }
  .section-title { font-size: 26px; }
  .hero-name { font-size: 38px; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .footer { flex-direction: column; align-items: flex-start; padding: 20px; }
  .hero-stats { margin: 0 auto 30px ; display: flex ; }
  .stat-item { padding: 0 14px; }
  .edu-entry { grid-template-columns: 80px 32px 1fr; }
  .edu-modal-header { padding: 20px; }
  .edu-modal-tabs { padding: 12px 20px 0; }
  .edu-modal-viewer { padding: 16px 20px 20px; }
  .edu-doc-preview { height: 240px; }
  .floating-btn {
    width: 50px;       
    height: 50px;
    bottom: 20px;      
    right: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  }

  .floating-btn i {
    font-size: 24px !important; 
  }
}

@media (max-width: 480px) {
  .hero-btns { flex-direction: column; }
  .hero-btns .btn-primary,
  .hero-btns .btn-outline,
  .hero-btns .btn-yellow { justify-content: center; }
  .docs-grid { grid-template-columns: 1fr; }
  .hero-photo-card { width: 280px; height: 320px; }
  .modal-slider { height: 220px; }
  .modal-content { padding: 20px 18px; }
  .edu-year { font-size: 10px; }
  .edu-card-header { flex-direction: column; gap: 6px; }
}

/* =============================================
   CERTIFICATES — New Card Style
   ============================================= */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cert-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s, transform .25s, border-color .25s;
}
.cert-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
  border-color: var(--blue-mid);
}

/* Image area */
.cert-img-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  background: #f8fafc;
  display: flex; 
  align-items: center; 
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.cert-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
 
  transition: transform .35s ease;
  padding: 8px;
}
.cert-card:hover .cert-img-wrap img {
  transform: scale(1.03);
}

.cert-open-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  background: rgba(26,86,219,0.9);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  text-decoration: none;
  opacity: 0;
  transform: scale(.85);
  transition: opacity .2s, transform .2s;
}
.cert-card:hover .cert-open-btn {
  opacity: 1;
  transform: scale(1);
}

/* Info area */
.cert-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.cert-title {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.cert-issuer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 8px;
  width: fit-content;
  margin-top: 2px;
}
.cert-issuer i { font-size: 12px; }

.cert-issuer--google {
  color: #1a73e8;
  background: #e8f0fe;
}
.cert-issuer--ibm {
  color: #0f62fe;
  background: #edf5ff;
}

.cert-year {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

.cert-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 4px;
  flex: 1;
}

.cert-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  width: fit-content;
  transition: background .15s, border-color .15s, color .15s;
}
.cert-download-btn:hover {
  background: var(--blue-light);
  border-color: var(--blue-mid);
  color: var(--blue);
}
.cert-download-btn i { font-size: 12px; }

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

/* =============================================
   PROJECT CARDS v3 — cover image + logos
   ============================================= */
.projects-grid { grid-template-columns: repeat(6, 1fr); gap: 22px; }
.project-card { padding: 0; gap: 0; grid-column: span 2; }
.project-card.span3 { grid-column: span 3; }
.project-card.wide { grid-column: span 6; flex-direction: row; }
.pc-cover { position: relative; aspect-ratio: 2 / 1; overflow: hidden; background: linear-gradient(135deg,#0b3d91,#0072dd 55%,#38bdf8); flex-shrink: 0; }
.pc-cover-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.92); font-size: 52px; }
.pc-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s ease; }
.project-card:hover .pc-cover img { transform: scale(1.04); }
.project-card.wide .pc-cover { width: 42%; aspect-ratio: auto; min-height: 240px; }
.pc-badge { position: absolute; top: 12px; left: 12px; z-index: 2; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.pc-badge--live { color: #1e8e3e; } .pc-badge--test { color: #b45309; } .pc-badge--dev { color: #1a73e8; } .pc-badge--award { color: #b06000; }
.pc-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pc-body h3 { font-family: 'Outfit', sans-serif; font-size: 19px; line-height: 1.25; }
.pc-body p { font-size: 14px; color: var(--text-muted); }
.pc-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.pc-btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text); background: #fff; border: 1px solid var(--border); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.pc-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.pc-btn--play { background: #0f172a; color: #fff; border-color: #0f172a; }
.pc-more { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--blue); }
.project-card:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.tag img, .skill-tag img { width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; }
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card, .project-card.span3 { grid-column: span 1; }
  .project-card.wide { grid-column: span 2; }
}
@media (max-width: 768px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project-card, .project-card.span3, .project-card.wide { grid-column: span 1; flex-direction: column; }
  .project-card.wide .pc-cover { width: 100%; aspect-ratio: 2 / 1; min-height: 0; }
}


/* ---- v4: mobile hero overflow fix ---- */
.hero > * { min-width: 0; }
@media (max-width: 600px) {
  .hero { padding-left: 20px; padding-right: 20px; }
  .hero-stats { width: 100%; padding: 14px 6px; }
  .stat-item { flex: 1; padding: 0 6px; text-align: center; }
  .stat-label { white-space: normal; text-align: center; line-height: 1.25; }
}
