:root {
  /* Corporate gaming-inspired dark theme */
  --background: #020617; /* deep slate */
  --surface: rgba(15, 23, 42, 0.96); /* elevated panels */
  --accent: #38bdf8; /* cyan */
  --accent-dark: #0ea5e9;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: rgba(148, 163, 184, 0.35);
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.9);
}

/* keep entire first line together, break before last name */
#hero-title {
  white-space: nowrap;
}

#hero-title > span {
  display: block;
}

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

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 55%),
    radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.16), transparent 55%),
    var(--background);
  color: var(--text);
  line-height: 1.6;
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease, text-shadow 0.25s ease, transform 0.25s ease;
}

a:hover {
  color: var(--accent);
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-underline-offset 0.2s ease;
}

.link:hover {
  color: var(--accent-dark);
  text-underline-offset: 5px;
}

header.hero {
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.22), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(129, 140, 248, 0.22), transparent 55%),
    linear-gradient(135deg, #020617 0%, #020617 45%, #020617 100%);
  padding: 0 5vw 6rem;
  position: relative;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 5vw;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  overflow: hidden;
  animation: navBarShadow 6s ease-in-out infinite;
}

/* Double-color animated nav bar background */
.navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    110deg,
    transparent 0%,
    transparent 35%,
    rgba(56, 189, 248, 0.18) 40%,
    rgba(14, 165, 233, 0.25) 50%,
    rgba(168, 85, 247, 0.2) 60%,
    rgba(129, 140, 248, 0.18) 70%,
    transparent 75%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: navBarGlow 8s ease-in-out infinite;
  pointer-events: none;
}

.navbar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(56, 189, 248, 0.08) 0%,
    transparent 25%,
    transparent 75%,
    rgba(168, 85, 247, 0.08) 100%
  );
  background-size: 200% 100%;
  animation: navBarShimmer 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes navBarGlow {
  0%, 100% {
    background-position: 100% 50%;
  }
  50% {
    background-position: 0% 50%;
  }
}

@keyframes navBarShimmer {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes navBarShadow {
  0%, 100% {
    box-shadow: 0 4px 20px -2px rgba(56, 189, 248, 0.2);
  }
  50% {
    box-shadow: 0 4px 24px -2px rgba(168, 85, 247, 0.28);
  }
}

.brand {
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  position: relative;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--accent);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #a855f7);
  transition: width 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a:focus::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease;
}

.hero-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  align-items: center;
  padding-top: 4rem;
}

.hero-text h1 {
  font-size: clamp(2.5rem, 4vw, 4rem);
  margin-bottom: 0.5rem;
}

.hero-text h1 span {
  color: var(--accent);
}

.hero-text h2 {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--muted);
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.tagline {
  max-width: 640px;
  color: var(--muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

.btn {
  border-radius: 999px;
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    background-color 0.18s ease-out,
    color 0.18s ease-out,
    background-position 0.22s ease-out;
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-dark) 45%, #a855f7 100%);
  background-size: 200% 100%;
  color: #fff;
  box-shadow: 0 18px 45px rgba(56, 189, 248, 0.35);
}

.btn.secondary {
  background: linear-gradient(120deg, #0f172a 0%, #1e293b 40%, var(--accent-dark) 100%);
  background-size: 180% 100%;
  color: #fff;
}

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

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.9);
}

.btn.primary:hover {
  background-position: 100% 0;
}

.btn.secondary:hover {
  background-position: 100% 0;
}

.btn.outline:hover {
  border-color: var(--accent-dark);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.1), transparent 55%);
}

.social-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.95rem;
}

.social-links a {
  position: relative;
  padding-bottom: 2px;
}

.social-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.social-links a:hover::after {
  width: 100%;
}

.hero-photo {
  justify-self: end;
  padding: 20px;
  margin-right: 4.5rem;
  position: relative;
  width: 320px;
  height: 320px;
  perspective: 1000px;
}

/* Top-class 3D background – radial glow behind profile */
.hero-photo::before {
  content: "";
  position: absolute;
  inset: -56px;
  border-radius: 50%;
  z-index: 0;
  background: radial-gradient(
    circle at center,
    rgba(56, 189, 248, 0.22) 0%,
    rgba(129, 140, 248, 0.18) 28%,
    rgba(30, 41, 59, 0.6) 55%,
    rgba(15, 23, 42, 0.95) 100%
  );
  animation: profileBgGlow 6s ease-in-out infinite;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.15),
              inset 0 0 80px rgba(56, 189, 248, 0.08),
              inset 0 2px 4px rgba(255, 255, 255, 0.04);
}

/* Outer beveled ring + glowing accent ring */
.hero-photo::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  z-index: 0;
  background: linear-gradient(145deg,
    rgba(30, 41, 59, 0.95) 0%,
    rgba(51, 65, 85, 0.9) 25%,
    rgba(56, 189, 248, 0.5) 50%,
    rgba(168, 85, 247, 0.45) 75%,
    rgba(30, 41, 59, 0.95) 100%
  );
  background-size: 300% 300%;
  animation: profileRingFlow 5s ease-in-out infinite;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.98),
              0 0 24px rgba(56, 189, 248, 0.35),
              0 0 48px rgba(168, 85, 247, 0.2),
              inset -2px -2px 6px rgba(0, 0, 0, 0.4),
              inset 2px 2px 6px rgba(255, 255, 255, 0.03);
}

@keyframes profileBgGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.92; transform: scale(1.02); }
}

@keyframes profileRingFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Top-class professional profile image – layered 3D frame */
.hero-photo img {
  width: 320px;
  height: 320px;
  object-fit: cover;
  border-radius: 50%;
  position: relative;
  z-index: 1;
  display: block;
  border: 4px solid rgba(15, 23, 42, 0.98);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.5),
              0 12px 28px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(148, 163, 184, 0.25),
              inset 0 2px 0 rgba(255, 255, 255, 0.07);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.hero-photo img:hover {
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5),
              0 16px 36px rgba(0, 0, 0, 0.4),
              0 0 40px rgba(56, 189, 248, 0.3),
              0 0 70px rgba(168, 85, 247, 0.2),
              0 0 0 1px rgba(148, 163, 184, 0.3),
              inset 0 2px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-6px) scale(1.02);
}

.section {
  padding: 6rem 5vw;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

section[id] {
  scroll-margin-top: 100px;
}

.section::before,
.section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
}

.section.alt {
  background: transparent;
}

/* Section-specific gradient backgrounds - dark corporate gaming style */
#about {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.2), transparent 60%),
    linear-gradient(145deg, #020617 0%, #020617 55%, #020617 100%);
}

#skills {
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.22), transparent 60%),
    linear-gradient(135deg, #020617 0%, #020617 45%, #020617 100%);
}

#experience {
  background:
    radial-gradient(circle at bottom left, rgba(129, 140, 248, 0.22), transparent 60%),
    linear-gradient(135deg, #020617 0%, #020617 45%, #020617 100%);
}

#projects {
  background:
    radial-gradient(circle at 10% 80%, rgba(45, 212, 191, 0.18), transparent 60%),
    linear-gradient(135deg, #020617 0%, #020617 45%, #020617 100%);
}

#certifications {
  background:
    radial-gradient(circle at 100% 10%, rgba(56, 189, 248, 0.2), transparent 60%),
    linear-gradient(135deg, #020617 0%, #020617 45%, #020617 100%);
}

#education {
  background:
    radial-gradient(circle at 0% 100%, rgba(129, 140, 248, 0.2), transparent 60%),
    linear-gradient(135deg, #020617 0%, #020617 45%, #020617 100%);
}

.section-heading h3 {
  margin-top: 0;
  font-size: 2rem;
}

.about {
  background: transparent;
}

.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 30px rgb(0 0 0 / 40%);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  cursor: pointer;
}

.highlight-card:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: var(--accent);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.14), transparent 55%) var(--surface);
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.95);
}

.strengths {
  margin-top: 3rem;
}

.strengths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.strengths-grid p {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 55%) var(--surface);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.strengths-grid p:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.85);
  background: radial-gradient(circle at top right, rgba(129, 140, 248, 0.16), transparent 55%) var(--surface);
}

.skills-grid,
.cards-grid,
.education-grid,
.contact-grid {
  display: grid;
  gap: 1.5rem;
}

.skill-card,
.project-card,
.cert-card,
.education-card,
.timeline-card {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 55%)
              var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transform-origin: center;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.skill-card:hover,
.project-card:hover,
.cert-card:hover,
.education-card:hover,
.timeline-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.95);
}

.skill-card::before,
.project-card::before,
.cert-card::before,
.education-card::before,
.timeline-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 55%),
    radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.12), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.skill-card:hover::before,
.project-card:hover::before,
.cert-card:hover::before,
.education-card:hover::before,
.timeline-card:hover::before {
  opacity: 1;
  animation: cardGlow 6s linear infinite;
}

.skills-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 2rem;
}

.skills-grid ul {
  padding-left: 1.2rem;
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.timeline-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.timeline-card ul {
  padding-left: 1.2rem;
  color: var(--muted);
}

.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 2rem;
}

.project-card .tech-stack {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.25rem 0 1rem;
}

.project-card .link {
  color: var(--accent);
  font-weight: 600;
  transition: color 0.2s ease;
}

.project-card:hover .tech-stack {
  color: #000000;
}

.project-card:hover .link {
  color: var(--accent-dark);
}

.project-card h4 {
  transition: transform 0.25s ease, letter-spacing 0.25s ease;
}

.project-card p {
  transition: color 0.25s ease;
}

.arrow {
  display: inline-block;
  margin-left: 4px;
  transition: transform 0.25s ease;
}

.project-card:hover h4 {
  transform: translateY(-2px);
  letter-spacing: 0.02em;
}

.project-card:hover .arrow {
  transform: translateX(4px);
}

.education-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 2rem;
}

.education-card .institution {
  color: var(--muted);
  margin: 0.2rem 0 0.8rem;
}

.contact {
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.25), transparent 55%),
    radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.25), transparent 55%),
    linear-gradient(135deg, #020617 0%, #020617 45%, #020617 100%);
  color: #ffffff;
}

.contact .section-heading p,
.contact .section-heading h3 {
  color: #ffffff;
}

.contact-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 2.5rem;
}

.contact-info p a {
  color: #ffffff;
  font-weight: 500;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.85rem 1rem;
  background-color: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:hover,
.contact-form textarea:hover,
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25), 0 18px 45px rgba(15, 23, 42, 0.8);
  background-color: rgba(15, 23, 42, 1);
  outline: none;
  transform: translateY(-2px);
}

.form-note {
  font-size: 0.85rem;
  color: rgb(255 255 255 / 70%);
}

.contact .btn.primary {
  background: #ffffff;
  color: #000000;
  box-shadow: none;
}

.footer {
  text-align: center;
  padding: 2rem 5vw;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Simple fade / slide-in animations for scroll-triggered elements */
.highlight-card,
.strengths-grid p,
.skill-card,
.project-card,
.cert-card,
.education-card {
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.strengths-grid p.slide-in-left,
.strengths-grid p.slide-in-right,
.skill-card,
.project-card,
.cert-card,
.education-card {
  transform: translateY(24px);
}

.highlight-card.animate-in,
.strengths-grid p.animate-in,
.skill-card.animate-in,
.project-card.animate-in,
.cert-card.animate-in,
.education-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.letter.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Magic card glow animation */
@keyframes cardGlow {
  0% {
    transform: translate3d(-4px, 0, 0) scale(1.02);
  }
  50% {
    transform: translate3d(4px, -6px, 0) scale(1.04);
  }
  100% {
    transform: translate3d(-4px, 0, 0) scale(1.02);
  }
}

/* Certificate modal (inline viewer) */
.certificate-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.certificate-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.certificate-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.35), transparent 60%),
    radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.35), transparent 60%),
    rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
}

.certificate-modal-dialog {
  position: relative;
  width: min(1100px, 100% - 3rem);
  max-height: calc(100vh - 4rem);
  border-radius: 20px;
  padding: 1.25rem 1.25rem 1.5rem;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.2), transparent 55%)
              rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.certificate-modal-dialog::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background:
    conic-gradient(from 0deg,
      rgba(56, 189, 248, 0.08),
      rgba(129, 140, 248, 0.3),
      rgba(14, 165, 233, 0.4),
      rgba(56, 189, 248, 0.08));
  mask:
    linear-gradient(#000, #000) padding-box,
    linear-gradient(transparent, transparent) border-box;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.certificate-modal.open .certificate-modal-dialog::before {
  opacity: 1;
  animation: cardGlow 7s linear infinite;
}

.certificate-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
}

.certificate-modal-header h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.certificate-modal-close {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.certificate-modal-close:hover {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.22), transparent 60%);
  border-color: var(--accent);
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.9);
}

.certificate-modal-body {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(30, 64, 175, 0.75);
  background: #020617;
}

.certificate-modal-frame {
  display: block;
  width: 100%;
  height: min(74vh, 760px);
  border: none;
  background: #020617;
}

/* Certificate detail pages: show cards without scroll animation */
.certificate-details-page .cert-card,
.certificate-details-page .skill-card,
.certificate-details-page .education-card {
  opacity: 1 !important;
  transform: none !important;
}

.certificate-details-page .cards-grid .cert-card {
  min-height: 120px;
}

.certificate-details-page .cert-module-list {
  list-style: none;
  padding-left: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem 1.5rem;
}
.certificate-details-page .cert-module-list li {
  margin: 0;
}

/* Animated section backgrounds */

@media (max-width: 900px) {
  .navbar {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    width: 100%;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    display: none;
    padding-top: 1rem;
    border-top: 1px solid rgb(200 200 200);
  }

  .nav-links.open {
    display: flex;
  }

  .hero-photo {
    justify-self: center;
    margin-right: 0;
    width: 260px;
    height: 260px;
  }

  .hero-photo img {
    width: 260px;
    height: 260px;
  }

  .hero-cta {
    flex-direction: column;
  }
}

/* additional breakpoints to support small phones/tablets */
@media (max-width: 600px) {
  /* move photo above text by reversing layout order */
  .hero-content {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 2rem;
  }

  /* typography adjustments */
  .hero-text h1 {
    font-size: 2rem;
  }
  .hero-text h2 {
    font-size: 1.25rem;
  }

  .tagline {
    font-size: 0.95rem;
    max-width: 100%;
  }

  /* stack cards vertically */
  .skills-grid,
  .cards-grid,
  .strengths-grid,
  .about-highlights {
    grid-template-columns: 1fr;
  }

  .about-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .project-card,
  .timeline-card {
    padding: 1rem;
  }

  /* reduce padding/margins on sections */
  .section {
    padding: 3rem 5vw;
  }

  /* make nav links easier to tap */
  .nav-links a {
    padding: 0.5rem 0;
    font-size: 1.1rem;
  }

  /* at smallest sizes keep a small centered photo rather than hide it */
  .hero-photo {
    display: block;
    margin: 0 auto 1.5rem;
    width: 180px;
    height: 180px;
  }

  .hero-photo img {
    width: 180px;
    height: 180px;
  }

  /* make strengths boxes more compact and remove lift-on-touch */
  .strengths-grid {
    gap: 1rem; /* more generous vertical spacing */
  }
  .strengths-grid p {
    margin: 0;
    padding: 0.7rem 1rem; /* bump padding for better separation */
  }
  /* touch devices don't need hover animation */
  .strengths-grid p:hover {
    transform: none;
  }
}


