* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
body {
  display: flex;
  min-height: 100vh;
  background: #f5f7fa;
}

.contact-header-info {
  position: absolute;
  top: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
  background-color: rgba(255, 255, 255, 0.15);
  padding: 1rem 1.2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(6px);
  max-width: 350px;
  z-index: 10;
}
.contact-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  align-items: center;
}
.contact-links img {
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease;
}
.contact-links img:hover {
  transform: scale(1.2);
}
.contact-header-info .contact-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
}
.contact-header-info img {
  width: 18px;
  height: 18px;
  filter: invert(15%);
}
.contact-header-info a {
  color: #111127;
  text-decoration: none;
  transition: color 0.3s ease;
}
.contact-header-info a:hover {
  color: #0077cc;
  text-decoration: underline;
}

.logo-container {
  display: flex;
  gap: 0.3rem;
  font-size: 3rem;
  font-weight: bold;
  letter-spacing: 0.2rem;
  margin-bottom: 0.5rem;
  position: relative;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
  padding: 0.4rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
}
.logo-container:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}
.hu-logo {
  background: linear-gradient(135deg, #9f8fff, #6ccfff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulse 2s infinite ease-in-out;
  transition: transform 0.3s;
}
.logo-container:hover .hu-logo {
  transform: scale(1.2) rotate(-3deg);
}
@keyframes pulse {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 0.9;
    transform: scale(1);
  }
}

.typewriter-text {
  font-size: 0.9rem;
  margin-top: -1rem;
  color: #a0aec0;
  font-family: "Courier New", Courier, monospace;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid #a0aec0;
  width: 0;
  animation: typing 3s steps(12, end) infinite alternate;
}
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 8.5ch;
  }
}

nav {
  width: 250px;
  background: linear-gradient(180deg, #0f0f1c, #1a1a2e);
  color: #fff;
  padding: 3rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.3);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}
nav ul {
  list-style: none;
  width: 100%;
  padding-left: 0;
  position: relative;
}
nav li {
  margin: 1.5rem 0;
  text-align: center;
  position: relative;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  padding: 0.5rem;
  transition: transform 0.2s ease, color 0.3s;
}
nav a:hover {
  color: #00f7ff;
  transform: scale(1.05);
}
nav .indicator {
  position: absolute;
  top: 0;
  height: 2.2rem;
  width: 100%;
  background: linear-gradient(to right, #00f7ff55, transparent);
  border-left: 4px solid #00f7ff;
  border-radius: 0 8px 8px 0;
  pointer-events: none;
  transition: transform 0.3s ease, top 0.3s ease, width 0.3s ease;
  z-index: 0;
}

.section {
  flex: 1;
  background-color: #f3f4f6;
  overflow-y: auto;
  padding: 2rem;
}
.header {
  background-color: #c4b397;
  height: 220px;
  position: relative;
}
.profile-pic-wrapper {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 5px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  background: white;
}
.profile-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-info {
  text-align: center;
  margin-top: 80px;
  padding: 0 2rem;
}
.profile-info h1 {
  margin-bottom: 0.5rem;
  font-size: 28px;
  color: #111127;
}
.profile-info p {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
}

.projects-section,
.experience-section {
  padding: 2rem;
  text-align: center;
}
.projects-section h1,
.experience-section h1,
.resume-section h1 {
  font-size: 28px;
  color: #111127;
  margin-bottom: 2rem;
}
.project-card,
.experience-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  padding: 1.8rem 2rem;
  margin: 2rem auto;
  max-width: 900px;
  text-align: left;
  border-left: 6px solid #6ccfff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
  transform: scale(1.015);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.project-card h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: #0067c4;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.project-card h2 a {
  color: inherit;
  text-decoration: none;
}
.project-card h2 a:hover {
  color: #004e99;
  text-decoration: underline;
}
.project-card p.project-meta {
  font-weight: 500;
  color: #444;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.experience-card ul {
  list-style: disc;
  padding-left: 1.5rem;
}

.resume-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.resume-viewer {
  width: 80%;
  height: 90vh;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  overflow: hidden;
}
.resume-viewer embed {
  width: 100%;
  height: 100%;
  border: none;
}
.resume-download {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background-color: #111127;
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-radius: 8px;
  transition: background 0.3s ease;
  display: inline-block;
  text-align: center;
}
.resume-download:hover {
  background-color: #333;
}

.section-title {
  font-size: 2.6rem;
  font-weight: 700;
  background: linear-gradient(to right, #6ccfff, #9f8fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2.5rem;
  text-align: center;
  letter-spacing: 0.08em;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.05);
  animation: fadeInUp 1s ease both;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  nav {
    width: 200px;
  }
  .section {
    padding: 1.5rem;
  }
  .contact-header-info {
    top: 20px;
    right: 20px;
    padding: 0.8rem 1rem;
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  nav {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    padding: 1rem 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  }

  nav ul {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  nav ul::-webkit-scrollbar {
    display: none;
  }

  nav li {
    flex: 0 0 auto;
    white-space: nowrap;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 1rem;
  }

  .section {
    padding: 1rem;
  }

  .header {
    height: auto;
    padding: 1rem;
    text-align: center;
  }

  .profile-pic-wrapper {
    position: static;
    margin: 1rem auto;
    transform: none;
  }

  .contact-header-info {
    position: static;
    align-items: center;
    margin-top: 1rem;
  }

  .profile-info {
    margin-top: 1rem;
    padding: 1rem;
  }

  .resume-viewer {
    width: 100%;
    height: 70vh;
  }

  .project-card,
  .experience-card {
    width: 95%;
  }
}

@media (max-width: 480px) {
  .logo-container {
    font-size: 2rem;
    padding: 0.2rem 0.5rem;
  }
  .section-title {
    font-size: 2rem;
  }
  .contact-header-info {
    font-size: 0.9rem;
  }
  .project-card,
  .experience-card {
    padding: 1rem;
  }
}

/* --- Skills Section --- */
.skills-section {
  padding: 2rem;
  text-align: center;
}
.skill-category {
  margin-bottom: 2rem;
}
.skill-category h2 {
  font-size: 1.2rem;
  color: #111127;
}
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}
.skill-badge {
  padding: 0.5rem 1rem;
  background: #9f8fff;
  color: white;
  font-weight: 500;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: background 0.3s ease;
}
.skill-badge:hover {
  background: #e16428;
}

/* --- Certifications Section --- */
.certifications-section ul {
  max-width: 700px;
  margin: 0 auto;
  text-align: left;
  color: #333;
}
.certifications-section li {
  margin: 0.4rem 0;
  padding-left: 1rem;
  position: relative;
}
.certifications-section li::before {
  content: "✔️";
  position: absolute;
  left: 0;
}

/* --- Dynamic Card Hover for Projects & Experience --- */
.project-card,
.experience-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: slideUpFade 0.8s ease both;
}

.project-card:hover,
.experience-card:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  border-left: 5px solid #e16428;
}
nav a:hover,
.contact-header-info a:hover,
.resume-download:hover {
  color: #6ccfff;
}
.resume-download {
  background-color: #111127;
}
.resume-download:hover {
  background-color: #e16428;
}

/* --- Interactive Bubbles --- */
.skills-interactive {
  text-align: center;
}
.bubble-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.bubble {
  background: linear-gradient(135deg, #6ccfff, #9f8fff);
  color: white;
  font-weight: bold;
  padding: 1.2rem 2rem;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.bubble:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
.nodes-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}
.nodes {
  display: none;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  animation: fadeIn 0.5s ease forwards;
}
.nodes.active {
  display: flex;
}
.nodes span {
  padding: 0.6rem 1rem;
  background: #e16428;
  color: white;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}
.nodes span:hover {
  transform: scale(1.1);
  background: #f1773e;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Enhanced Bubbles --- */
.enhanced-bubbles .bubble {
  font-size: 1.2rem;
  padding: 1.2rem 2.5rem;
  border-radius: 50px;
  color: white;
  background: linear-gradient(135deg, #6ccfff, #9f8fff);
  box-shadow: 0 0 15px rgba(108, 207, 255, 0.4);
  transition: all 0.4s ease;
}
.enhanced-bubbles .bubble:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(108, 207, 255, 0.6);
}

/* --- Skill Nodes --- */
.skill-nodes {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}
.node-group {
  display: none;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  animation: fadeIn 0.6s ease forwards;
}
.node-group.active-skill-group {
  display: flex;
}
.node {
  padding: 0.7rem 1.4rem;
  background: #e16428;
  color: white;
  font-weight: 600;
  border-radius: 50px;
  animation: floatNode 3s ease-in-out infinite;
  transition: transform 0.3s ease;
}
.node:hover {
  transform: scale(1.1);
  background: #f1773e;
}
@keyframes floatNode {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* --- Skills Section Title --- */
#Skills .section-title {
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  background-color: rgba(255, 255, 255, 0.1);
  padding: 0.4rem 1.2rem;
  border-radius: 12px;
  display: inline-block;
}

/* --- Shadow on Bubbles & Chips --- */
.enhanced-bubbles .bubble,
.node {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}
.enhanced-bubbles .bubble:hover,
.node:hover {
  animation: glowPulse 1s ease infinite;
}
@keyframes glowPulse {
  0% {
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  }
  100% {
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
}

/* Horizontal Scroll Fix for Nav */
@media (max-width: 768px) {
  nav ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  nav ul::-webkit-scrollbar {
    display: none;
  }
  nav li {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* Revert Skills Background */
#Skills.section {
  background: #f5f7fa;
}
#Skills .section-title {
  font-size: 2.6rem;
  font-weight: 700;
  background: linear-gradient(to right, #6ccfff, #9f8fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2.5rem;
  text-align: center;
  letter-spacing: 0.08em;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.2);
  display: block;
}

/* --- Certificate Card & Modal --- */
.certificates-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin: 0 auto;
  max-width: 1200px;
  overflow-x: visible;
}

@media (max-width: 768px) {
  .certificates-container {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
  }
}

/* 🔽 PASTE BELOW THIS LINE 🔽 */
@media (max-width: 768px) {
  .cert-card {
    width: 240px;
    min-width: 240px;
    height: 340px;
    margin-right: 1rem;
  }

  .cert-card::before {
    filter: blur(8px); /* smaller glow on small screens */
  }

  .cert-front h2 {
    font-size: 1rem;
  }

  .cert-front p {
    font-size: 0.85rem;
  }

  .cert-front small {
    font-size: 0.75rem;
  }
}

.cert-card {
  width: 260px;
  min-width: 260px;
  height: 360px;
  perspective: 1000px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.4s ease;
  border-radius: 20px;
  background: linear-gradient(145deg, #f0f0f0, #ffffff);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}
.cert-card:hover {
  transform: scale(1.04);
  box-shadow: 0 12px 30px #6ccfff;
}

.cert-card::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(130deg, #6ccfff, #9f8fff, #e16428);
  z-index: -1;
  filter: blur(12px);
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  border-radius: 20px;
}
.cert-card:hover::before {
  opacity: 1;
}

.cert-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s ease;
  transform-style: preserve-3d;
  border-radius: 16px;
}
.cert-card.flipped .cert-inner {
  transform: rotateY(180deg);
}
.cert-front,
.cert-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  backface-visibility: hidden;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(200, 200, 200, 0.2);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.cert-front h2 {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #111127;
}
.cert-front p {
  font-size: 0.9rem;
  color: #555;
}
.cert-front small {
  margin-top: 15px;
  color: #888;
}

.cert-back img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.cert-back {
  transform: rotateY(180deg);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  padding-top: 60px;
}
.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}
.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1000;
}

/* --- Education Flip Card Styles --- */
.education-cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin: 0 auto;
  max-width: 1200px;
}
.edu-card {
  width: 260px;
  min-width: 260px;
  height: 370px;
  perspective: 1000px;
  cursor: pointer;
  border-radius: 16px;
  background: linear-gradient(135deg, #6ccfff, #9f8fff);
  padding: 3px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.edu-card:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.edu-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}
.edu-card.flipped .edu-inner {
  transform: rotateY(180deg);
}
.edu-front,
.edu-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  backface-visibility: hidden;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3),
    0 6px 15px rgba(0, 0, 0, 0.1);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: transform 0.6s ease;
}
.edu-front h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #111127;
}

.edu-back {
  transform: rotateY(180deg);
}

/* Selected Bubble (for Skills) */
.selected-bubble {
  background: #e16428 !important;
  color: #fff !important;
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

#education.section {
  background: linear-gradient(to bottom right, #f5f7fa, #eaeef6);
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.education-cards-container {
  gap: 2.5rem;
}
.edu-logo {
  width: 60px;
  height: auto;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.edu-middle h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111127;
  margin: 0.5rem 0;
  text-align: center;
}

.edu-footer {
  margin-top: auto;
  text-align: center;
  color: #555;
}
.edu-footer p {
  font-weight: 500;
  font-size: 0.95rem;
}
.edu-footer span {
  font-size: 0.85rem;
  color: #888;
}

.cert-card.hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s ease-out;
}

.cert-card.visible {
  opacity: 1;
  transform: translateY(0);
}
