/* Shared tabbed portfolio layout — photo header + horizontal section tabs */
body.pb-theme-tabbed .portfolio-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.pb-theme-tabbed .container {
  max-width: var(--header-max, 960px);
  margin: 0 auto;
  padding: 0 1.25rem;
}

body.pb-theme-tabbed {
  font-family: var(--font-body, system-ui, sans-serif);
  color: var(--text, #1e293b);
  line-height: 1.65;
  background: var(--bg, #f8fafc);
  scroll-behavior: auto;
}

html:has(body.pb-theme-tabbed) {
  scroll-behavior: auto;
}

/* ── Profile header + sticky tab bar ── */
body.pb-theme-tabbed .navbar {
  order: 2;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-bg, rgba(255, 255, 255, 0.96));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border, #e2e8f0);
  box-shadow: var(--nav-shadow, 0 2px 16px rgba(0, 0, 0, 0.06));
}

body.pb-theme-tabbed .hero {
  order: 1;
  min-height: auto;
  padding: 3rem 1.5rem 2.25rem;
  background: var(--hero-gradient, linear-gradient(135deg, #eef2ff 0%, #f8fafc 55%, #fff 100%));
  border-bottom: 1px solid var(--border, #e2e8f0);
  text-align: left;
  scroll-margin-top: 0;
  display: flex;
  align-items: center;
}

body.pb-theme-tabbed .hero-content {
  max-width: var(--header-max, 960px);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  animation: pb-tab-fade-in 0.6s ease both;
}

body.pb-theme-tabbed .hero-image {
  width: 180px;
  height: 180px;
  min-width: 180px;
  border-radius: var(--avatar-radius, 20px);
  object-fit: cover;
  margin: 0;
  border: 4px solid var(--image-border, #fff);
  box-shadow: var(--shadow, 0 4px 24px rgba(0, 0, 0, 0.08));
}

body.pb-theme-tabbed .hero-image-placeholder {
  width: 180px;
  height: 180px;
  min-width: 180px;
  border-radius: var(--avatar-radius, 20px);
  margin: 0;
  background: var(--accent-soft, #eef2ff);
  border: 2px dashed var(--placeholder-border, #c7d2fe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: var(--accent, #6366f1);
}

body.pb-theme-tabbed .hero-text-wrap { flex: 1; min-width: 0; }

body.pb-theme-tabbed .hero h1 {
  font-family: var(--font-heading, Georgia, serif);
  font-size: clamp(2.35rem, 5vw, 3.5rem);
  color: var(--primary, #1e1b4b);
  margin-bottom: 0.5rem;
  font-weight: var(--heading-weight, 400);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

body.pb-theme-tabbed .hero-title {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  color: var(--secondary, #4338ca);
  margin-bottom: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.pb-theme-tabbed .hero-buttons {
  display: flex;
  gap: 0.85rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

body.pb-theme-tabbed .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.975rem;
  transition: all 0.22s;
  border: none;
  cursor: pointer;
}

body.pb-theme-tabbed .btn-primary {
  background: var(--secondary, #4338ca);
  color: var(--btn-primary-text, #fff);
  box-shadow: var(--btn-primary-shadow, 0 2px 12px rgba(67, 56, 202, 0.35));
}

body.pb-theme-tabbed .btn-primary:hover {
  background: var(--primary, #1e1b4b);
  transform: translateY(-1px);
}

body.pb-theme-tabbed .btn-secondary {
  background: var(--btn-secondary-bg, #fff);
  color: var(--secondary, #4338ca);
  border: 1.5px solid var(--btn-secondary-border, #c7d2fe);
}

body.pb-theme-tabbed .btn-secondary:hover {
  background: var(--accent-soft, #eef2ff);
  border-color: var(--accent, #6366f1);
}

body.pb-theme-tabbed .nav-container {
  max-width: var(--header-max, 960px);
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  min-height: var(--tab-height, 52px);
  position: relative;
}

body.pb-theme-tabbed .nav-brand { display: none; }

body.pb-theme-tabbed .nav-toggle { display: none !important; }

body.pb-theme-tabbed .nav-menu {
  display: flex;
  flex-direction: row;
  list-style: none;
  gap: 0;
  margin: 0;
  padding: 0 0.25rem;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.pb-theme-tabbed .nav-menu::-webkit-scrollbar { display: none; }

body.pb-theme-tabbed .nav-menu li {
  flex-shrink: 0;
  scroll-snap-align: start;
}

body.pb-theme-tabbed .nav-menu li:first-child { display: none; }

body.pb-theme-tabbed .nav-menu a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 1.1rem;
  height: var(--tab-height, 52px);
  text-decoration: none;
  color: var(--text-muted, #64748b);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

body.pb-theme-tabbed .nav-menu a::after { display: none !important; }

body.pb-theme-tabbed .nav-menu a:hover {
  color: var(--secondary, #4338ca);
  background: var(--tab-hover-bg, rgba(99, 102, 241, 0.06));
}

body.pb-theme-tabbed .nav-menu a.tab-active {
  color: var(--secondary, #4338ca);
  border-bottom-color: var(--accent, #6366f1);
  background: var(--tab-active-bg, rgba(99, 102, 241, 0.08));
}

/* Scroll fade hints on tab bar */
body.pb-theme-tabbed .nav-container::before,
body.pb-theme-tabbed .nav-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.25rem;
  pointer-events: none;
  z-index: 2;
}

body.pb-theme-tabbed .nav-container::before {
  left: 0;
  background: linear-gradient(to right, var(--nav-bg-solid, #fff), transparent);
}

body.pb-theme-tabbed .nav-container::after {
  right: 0;
  background: linear-gradient(to left, var(--nav-bg-solid, #fff), transparent);
}

/* ── Tab panels ── */
body.pb-theme-tabbed .section {
  order: 3;
  padding: 2.25rem 0 3rem;
  background: transparent;
  display: none;
  opacity: 0;
  transform: none !important;
  transition: opacity 0.3s ease;
}

body.pb-theme-tabbed .section.tab-active {
  display: block !important;
  opacity: 1 !important;
  transform: none !important;
  animation: pb-tab-panel-in 0.35s ease both;
}

body.pb-theme-tabbed .section:nth-child(even) { background: transparent; }

body.pb-theme-tabbed .section-title {
  font-family: var(--font-heading, Georgia, serif);
  font-size: clamp(1.6rem, 3vw, 2rem);
  text-align: left;
  color: var(--primary, #1e1b4b);
  margin-bottom: 1.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--accent-soft, #eef2ff);
  position: relative;
  width: 100%;
  display: block;
}

body.pb-theme-tabbed .section-title::after { display: none !important; }

body.pb-theme-tabbed .about-text {
  max-width: none;
  text-align: left;
  color: var(--text-muted, #64748b);
  font-size: 1.02rem;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius, 12px);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow, 0 4px 24px rgba(0, 0, 0, 0.08));
}

body.pb-theme-tabbed .experience-grid,
body.pb-theme-tabbed .projects-grid,
body.pb-theme-tabbed .education-grid,
body.pb-theme-tabbed .certifications-grid,
body.pb-theme-tabbed .services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

body.pb-theme-tabbed .experience-card,
body.pb-theme-tabbed .project-card,
body.pb-theme-tabbed .education-card,
body.pb-theme-tabbed .cert-card,
body.pb-theme-tabbed .service-card {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius, 12px);
  padding: 1.5rem;
  box-shadow: var(--shadow, 0 4px 24px rgba(0, 0, 0, 0.08));
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}

body.pb-theme-tabbed .experience-card:hover,
body.pb-theme-tabbed .project-card:hover,
body.pb-theme-tabbed .cert-card:hover,
body.pb-theme-tabbed .service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-hover-shadow, 0 12px 32px rgba(67, 56, 202, 0.12));
  border-color: var(--card-hover-border, #c7d2fe);
}

body.pb-theme-tabbed .experience-card h3,
body.pb-theme-tabbed .project-content h3,
body.pb-theme-tabbed .education-card h3,
body.pb-theme-tabbed .cert-card h3,
body.pb-theme-tabbed .service-card h3 {
  font-family: var(--font-body, system-ui, sans-serif);
  color: var(--primary, #1e1b4b);
  margin-bottom: 0.3rem;
  font-size: 1.08rem;
  font-weight: 700;
}

body.pb-theme-tabbed .company,
body.pb-theme-tabbed .institution { color: var(--accent, #6366f1); font-weight: 600; font-size: 0.92rem; }

body.pb-theme-tabbed .duration,
body.pb-theme-tabbed .year,
body.pb-theme-tabbed .grade,
body.pb-theme-tabbed .cert-date { color: var(--text-muted, #64748b); font-size: 0.85rem; margin: 0.2rem 0; }

body.pb-theme-tabbed .experience-description,
body.pb-theme-tabbed .project-content p,
body.pb-theme-tabbed .service-card p { color: var(--text-muted, #64748b); margin-top: 0.65rem; font-size: 0.92rem; }

body.pb-theme-tabbed .project-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: calc(var(--radius, 12px) - 2px);
  margin-bottom: 1rem;
}

body.pb-theme-tabbed .project-image-placeholder {
  width: 100%;
  height: 180px;
  background: var(--accent-soft, #eef2ff);
  border-radius: calc(var(--radius, 12px) - 2px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent, #6366f1);
  font-size: 2.25rem;
}

body.pb-theme-tabbed .tech-stack { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.85rem 0; }

body.pb-theme-tabbed .tech-tag {
  background: var(--accent-soft, #eef2ff);
  color: var(--secondary, #4338ca);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

body.pb-theme-tabbed .project-links { margin-top: 0.85rem; display: flex; gap: 0.85rem; flex-wrap: wrap; }

body.pb-theme-tabbed .project-link,
body.pb-theme-tabbed .cert-link { color: var(--accent, #6366f1); text-decoration: none; font-weight: 600; font-size: 0.85rem; }

body.pb-theme-tabbed .cert-card i,
body.pb-theme-tabbed .service-card i { font-size: 1.5rem; color: var(--accent, #6366f1); margin-bottom: 0.65rem; }

body.pb-theme-tabbed .service-price { margin-top: 0.85rem; font-weight: 700; color: var(--secondary, #4338ca); font-size: 1.05rem; }

body.pb-theme-tabbed .contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.5rem;
  align-items: start;
  max-width: none;
  margin: 0;
}

body.pb-theme-tabbed .contact-info {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius, 12px);
  padding: 1.5rem;
  box-shadow: var(--shadow, 0 4px 24px rgba(0, 0, 0, 0.08));
}

body.pb-theme-tabbed .contact-item { margin: 0.65rem 0; color: var(--text-muted, #64748b); font-size: 0.92rem; }
body.pb-theme-tabbed .contact-item a { color: var(--accent, #6366f1); text-decoration: none; }

body.pb-theme-tabbed .social-links { display: flex; gap: 0.65rem; margin-top: 1.25rem; flex-wrap: wrap; }

body.pb-theme-tabbed .social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft, #eef2ff);
  border-radius: 10px;
  color: var(--secondary, #4338ca);
  text-decoration: none;
  transition: all 0.22s;
}

body.pb-theme-tabbed .social-link:hover {
  background: var(--secondary, #4338ca);
  color: var(--btn-primary-text, #fff);
}

@keyframes pb-tab-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pb-tab-panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 1024px) {
  body.pb-theme-tabbed .hero {
    padding: 4rem 2.5rem 3rem;
    min-height: 380px;
  }

  body.pb-theme-tabbed .hero-content {
    max-width: 1100px;
    gap: 3.5rem;
  }

  body.pb-theme-tabbed .hero-image,
  body.pb-theme-tabbed .hero-image-placeholder {
    width: 220px;
    height: 220px;
    min-width: 220px;
    font-size: 4.25rem;
    border-width: 5px;
  }

  body.pb-theme-tabbed .hero h1 {
    font-size: clamp(3rem, 4.5vw, 4.25rem);
    margin-bottom: 0.65rem;
  }

  body.pb-theme-tabbed .hero-title {
    font-size: clamp(1.35rem, 1.8vw, 1.75rem);
    margin-bottom: 2rem;
  }

  body.pb-theme-tabbed .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
  }

  body.pb-theme-tabbed .hero-buttons {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  body.pb-theme-tabbed .hero {
    min-height: 58vh;
    min-height: 58dvh;
    padding: 2.25rem 1.25rem 2.5rem;
    justify-content: center;
  }

  body.pb-theme-tabbed .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 1.65rem;
    justify-content: center;
  }

  body.pb-theme-tabbed .hero-image,
  body.pb-theme-tabbed .hero-image-placeholder {
    width: min(46vw, 240px);
    height: min(46vw, 240px);
    min-width: min(46vw, 240px);
    font-size: clamp(3rem, 12vw, 4.5rem);
    border-width: 4px;
  }

  body.pb-theme-tabbed .hero h1 {
    font-size: clamp(2.35rem, 10vw, 3.25rem);
    line-height: 1.08;
  }

  body.pb-theme-tabbed .hero-title {
    font-size: clamp(1.2rem, 5vw, 1.55rem);
    margin-bottom: 1.65rem;
  }

  body.pb-theme-tabbed .hero-buttons {
    justify-content: center;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    gap: 0.75rem;
  }

  body.pb-theme-tabbed .hero-buttons .btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0.95rem 1.25rem;
    font-size: 1.05rem;
    min-width: 140px;
  }

  body.pb-theme-tabbed .nav-container {
    max-width: 100%;
    padding: 0;
  }

  body.pb-theme-tabbed .nav-menu {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 0.5rem !important;
    gap: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }

  body.pb-theme-tabbed .nav-menu li {
    padding: 0 !important;
    border: none !important;
  }

  body.pb-theme-tabbed .nav-menu a {
    padding: 0 0.95rem !important;
    height: var(--tab-height, 48px) !important;
    font-size: 0.82rem !important;
    border-bottom: 3px solid transparent !important;
    border-left: none !important;
    display: flex !important;
  }

  body.pb-theme-tabbed .nav-menu a.tab-active {
    border-bottom-color: var(--accent, #6366f1) !important;
    border-left-color: transparent !important;
  }

  body.pb-theme-tabbed .contact-layout { grid-template-columns: 1fr; }
  body.pb-theme-tabbed .section { padding: 1.75rem 0 2.5rem; }
}
