/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Space Grotesk", sans-serif;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  color: #1f2937;
  scroll-behavior: smooth;
  line-height: 1.6;
}

/* Mobile viewport height fix */
:root {
  --vh: 1vh;
}

@media (max-width: 700px) {
  :root {
    --vh: 1vh;
  }
  header {
    height: calc(var(--vh, 1vh) * 100);
    padding: 2rem;
  }
}

/* Header Styles */
header {
  position: relative;
  background: url("../assets/header-3.webp") center/cover no-repeat;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 2rem;
  overflow: hidden;
}
header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.455);
  z-index: 0;
}
header::after {
  content: none;
}
header h1 {
  font-size: 3rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(40px);
  animation: headerFadeInUp 1.2s cubic-bezier(0.23, 1, 0.32, 1) 0.2s forwards;
  text-shadow: none;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  border: none;
  background: none;
  box-shadow: none;
  padding: 0;
}
header:hover h1 {
  transform: scale(1.04);
  box-shadow: none;
  border-color: transparent;
}
header h1::after {
  content: none;
}
header p {
  margin-top: 0.2rem;
  font-size: 1.2rem;
  opacity: 0;
  transform: translateY(40px);
  animation: headerFadeInUp 1.2s cubic-bezier(0.23, 1, 0.32, 1) 0.7s forwards;
  text-shadow: 0 2px 12px rgba(37, 99, 235, 0.10);
}
@keyframes headerFadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes heroGradientMove {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

/* Container and Section Layout */
.container {
  max-width: 1100px;
  margin: auto;
  padding: 2rem 1rem;
}
section {
  margin: 3rem 0;
}
h2 {
  font-size: 2rem;
  border-left: 6px solid #2563eb;
  padding-left: 0.8rem;
  margin-bottom: 1.5rem;
  transition: color 0.4s, border-color 0.4s;
}

/* About Section */
.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.about img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 999px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  animation: floatProfile 3s ease-in-out infinite;
}
@keyframes floatProfile {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
}
.about p {
  max-width: 700px;
  color: #4b5563;
  margin-bottom: 1.5rem;
}
.about a {
  background: #2563eb;
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.3s;
}
.about a:hover {
  background: #1d4ed8;
}

/* Timeline and Experience Cards */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
}
.exp-card {
  background: white;
  border-left: 4px solid #2563eb;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  animation: fadeInUp 1s ease;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s;
}
.exp-card:hover {
  cursor: pointer;
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.13);
  border-left: 6px solid #1d4ed8;
}

/* Highlight selected experience card when modal is open */
.exp-card.selected,
.exp-card.selected:hover {
  border-left: 6px solid #f59e42 !important;
  box-shadow: 0 8px 32px rgba(245, 158, 66, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  background: linear-gradient(90deg, #fff7ed 70%, #f8fafc 100%) !important;
  transform: translateY(-10px) scale(1.03) !important;
  transition: box-shadow 0.3s, border-color 0.3s, background 0.3s !important;
  z-index: 2;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.exp-year {
  min-width: 130px;
  font-weight: bold;
  color: #2563eb;
  font-size: 1rem;
  padding-top: 0.2rem;
  text-align: right;
}
.exp-role {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}
.exp-role h3 {
  font-size: 1.15rem;
  color: #111827;
  margin: 0;
  font-weight: 600;
}
.exp-company {
  font-size: 0.98rem;
  color: #4b5563;
  font-weight: 500;
  margin-left: 2px;
  margin-bottom: 0;
  letter-spacing: 0.01em;
  text-shadow: none;
}
.exp-card p {
  font-size: 0.95rem;
  color: #4b5563;
}

/* Contact Section */
.contact {
  text-align: center;
}
.contact h2 {
  display: inline-block;
  border-left: 6px solid #2563eb;
  padding-left: 0.8rem;
  margin-bottom: 1.5rem;
  margin-top: 0;
  text-align: left;
  transition: color 0.4s, border-color 0.4s;
}
.contact p {
  margin: 1rem 0;
}

/* Modern contact card design */
.contact-cards {
  display: flex;
  justify-content: center;
  gap: 2.2rem;
  margin-top: 2.2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f1f5f9;
  border-radius: 1.2rem;
  padding: 1.2rem 1.6rem 1rem 1.6rem;
  text-decoration: none;
  color: #22223b;
  box-shadow: 0 2px 12px rgba(37,99,235,0.06);
  transition: background 0.2s, box-shadow 0.2s, transform 0.18s;
  min-width: 110px;
  min-height: 140px;
  border: 2px solid #e0e7ef;
  position: relative;
}
.contact-card:hover,
.contact-card:focus {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 6px 24px #2563eb22;
  transform: translateY(-4px) scale(1.04);
  border-color: #2563eb;
}
.contact-card:active {
  transform: scale(0.98);
}
.contact-card:active,
.contact-card.clicked {
  background: #f1f5f9 !important;
  color: #22223b !important;
  box-shadow: 0 2px 12px rgba(37,99,235,0.06) !important;
  border-color: #e0e7ef !important;
  transform: scale(0.98) !important;
}
.contact-card:focus {
  outline: none;
  /* Prevent browser focus ring */
}
.contact-card:active .contact-icon svg,
.contact-card.clicked .contact-icon svg {
  stroke: #2563eb !important;
  color: #2563eb !important;
  opacity: 1 !important;
}
.contact-card:active .contact-icon svg rect,
.contact-card.clicked .contact-icon svg rect {
  stroke: #2563eb !important;
  fill: none !important;
}
.contact-card:active .contact-icon svg circle,
.contact-card.clicked .contact-icon svg circle {
  stroke: #2563eb !important;
  fill: none !important;
  opacity: 1 !important;
}
.contact-card:active .contact-icon svg path,
.contact-card.clicked .contact-icon svg path {
  stroke: #2563eb !important;
  fill: none !important;
}
/* Remove hover/focus styles when active or .clicked */
.contact-card:active:hover,
.contact-card.clicked:hover,
.contact-card:active:focus,
.contact-card.clicked:focus {
  background: #f1f5f9 !important;
  color: #22223b !important;
  box-shadow: 0 2px 12px rgba(37,99,235,0.06) !important;
  border-color: #e0e7ef !important;
  transform: scale(0.98) !important;
}
.contact-icon {
  margin-bottom: 0.7em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-card:hover .contact-icon svg,
.contact-card:focus .contact-icon svg {
  stroke: #fff !important;
  /* Do not set fill here */
}
.contact-card:hover .contact-icon svg rect,
.contact-card:focus .contact-icon svg rect {
  /* Only hide the mail icon's outer square, not all rects */
  stroke: none !important;
  fill: none !important;
}
.contact-card:hover .contact-icon svg circle,
.contact-card:focus .contact-icon svg circle {
  stroke: #fff !important;
  fill: #2563eb !important; /* Keep LinkedIn avatar visible */
  opacity: 1 !important;    /* Ensure it's not faded */
}
.contact-card:hover .contact-icon svg path,
.contact-card:focus .contact-icon svg path {
  stroke: #fff !important;
  fill: none !important; /* Use none to keep envelope/LinkedIn glyph outlined */
}
.contact-label {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: 0.2em;
  color: inherit;
  text-align: center;
}

/* Responsive for contact cards */
@media (max-width: 700px) {
  .contact-cards {
    gap: 1.1rem;
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
  }
  .contact-card {
    padding: 0.8rem 0.7rem 0.7rem 0.7rem;
    min-width: 90px;
    min-height: 110px;
  }
  .contact-label {
    font-size: 0.97rem;
  }
  .contact-icon svg {
    width: 28px !important;
    height: 28px !important;
  }
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  color: #9ca3af;
  background: #f1f5f9;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section Reveal Animation */
.reveal-section {
  opacity: 0;
  transform: translateY(40px); /* reduced from 60px for faster appearance */
  transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1),
    transform 0.8s cubic-bezier(0.23, 1, 0.32, 1); /* faster transition */
  animation: none;
}
.section-visible {
  opacity: 1;
  transform: translateY(0);
  animation: fadeIn 0.8s cubic-bezier(0.23, 1, 0.32, 1); /* faster animation */
}

/* Enhanced Skills Section */
.skills {
  /* Clean, minimal background with a very soft bottom fade */
  background:
    linear-gradient(0deg, #f8fafc 85%, #e0e7ff 100%),
    radial-gradient(ellipse at bottom center, #e0e7ff 0%, #f8fafc 95%, transparent 100%);
  background-blend-mode: lighten;
  border-radius: 1.3rem;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.06), 0 1.5px 8px rgba(0,0,0,0.02);
  border: 1.5px solid #e0e7ef;
  padding: 2.2rem 1.5rem 1.5rem 1.5rem;
  margin: 2.5rem 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  overflow: visible;
  transition: box-shadow 0.3s, border-color 0.3s, background 0.3s;
}
.skills:hover {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.09);
  border-color: #2563eb;
  background: 
    linear-gradient(120deg, #f1f5ff 90%, #e0e7ff 100%);
  background-blend-mode: lighten;
}
.skills .skills-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.5rem;
}
.skills .skills-icon svg {
  width: 2.3rem;
  height: 2.3rem;
  fill: #2563eb;
  opacity: 0.85;
  filter: drop-shadow(0 2px 8px #2563eb22);
}
.skills h2 {
  margin-top: 0;
  color: #2563eb;
  border: none;
  padding-left: 0;
  background: none;
  text-align: center;
  font-size: 1.55rem;
  margin-bottom: 1.1rem;
  letter-spacing: 0.5px;
  font-weight: 700;
  position: relative;
}
.skills-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}
.skills-tab {
  background: #f1f5f9;
  color: #2563eb;
  border: 1.5px solid #e5e7eb;
  outline: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.42rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border 0.18s, box-shadow 0.18s;
  letter-spacing: 0.2px;
  margin-bottom: 0;
  box-shadow: 0 1px 4px rgba(37,99,235,0.04);
  position: relative;
}
.skills-tab.active,
.skills-tab:hover {
  background: #2563eb;
  color: #fff;
  border: 1.5px solid #2563eb;
  box-shadow: 0 2px 12px #2563eb22;
}
.skills-tabs-content {
  width: 100%;
  /* Move box-shadow to the bullet points area only */
  box-shadow: none;
  padding: 0.8rem 0.5rem 0.5rem 0.5rem;
  min-height: 120px;
  position: relative;
  overflow: visible;
}
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.5rem;
  justify-content: center;
  align-items: center;
  margin-top: 0.3rem;
  min-height: 48px;
  text-align: center; /* Fallback for single-line lists */
}
.skills-list .skill-item {
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.38rem 1.05rem;
  font-weight: 600;
  color: #22223b;
  border: 1.2px solid #e5e7eb;
  font-size: 0.97rem;
  transition: box-shadow 0.18s, transform 0.18s;
  margin-bottom: 0;
  margin-top: 0;
  line-height: 1.2;
  display: inline-block;
  box-shadow: 0 1.5px 6px rgba(37,99,235,0.04);
  animation: fadeInSkill 0.5s;
  cursor: default;
  user-select: none;
}
.skills-list .skill-item:hover {
  /* Only add a subtle shadow and scale, no color change */
  box-shadow: 0 4px 16px #2563eb22;
  transform: translateY(-2px) scale(1.04);
}

/* Remove hover effect for skill items */
/* .skills-list .skill-item:hover {
  background: #2563eb;
  color: #fff;
  border: 1.2px solid #2563eb;
  box-shadow: 0 4px 16px #2563eb22;
  transform: translateY(-2px) scale(1.04);
} */

/* Responsive tweaks for enhanced skills section */
@media (max-width: 700px) {
  .skills {
    padding: 1.1rem 0.5rem 1rem 0.5rem;
    max-width: 98vw;
  }
  .skills-list {
    gap: 0.3rem 0.2rem;
  }
  .skills-tab {
    font-size: 0.93rem;
    padding: 0.32rem 0.7rem;
  }
  .skills h2 {
    font-size: 1.13rem;
  }
  .skills-list .skill-item {
    font-size: 0.91rem;
    padding: 0.28rem 0.6rem;
  }
  .skills .skills-icon svg {
    width: 1.5rem;
    height: 1.5rem;
  }
}

/* Modal Styles */
.modal {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}
.modal.hide {
  display: none !important;
}
.modal-content {
  padding: 0; /* Remove padding here, move to .modal-inner */
  position: relative;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  background: #fff;
  border-radius: 18px;
  /* Updated box-shadow for a more minimal, subtle effect */
  box-shadow: 0 4px 24px rgba(37, 99, 235, 0.08), 0 1.5px 8px rgba(0, 0, 0, 0.03);
  animation: modalFadeIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}
.modal-inner {
  position: relative;
  padding: 1.2rem 1.1rem 1.2rem 1.1rem;
  height: 100%;
  min-height: 300px;
  max-height: 100vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding-bottom: 3.2rem; /* keep extra bottom padding for close button */
  padding-top: 0; /* Remove any top padding to eliminate space above header */
  display: flex;
  flex-direction: column;
  position: relative;
}
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(40px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@keyframes modalFadeOutMobile {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.85) translateY(40px); /* Reverse of fade in */
  }
}
.modal.fade-out .modal-content {
  animation: modalFadeOutMobile 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.modal-content h3 {
  margin-top: 0;
}
.modal-content ul,
.modal-project-list {
  list-style: none;
  padding-left: 1rem;
  padding-bottom: 1rem; /* Add bottom padding for spacing */
  margin: 0;
}
.close {
  position: absolute;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 10;
  font-size: 2.1rem;
  font-weight: bold;
  color: #2563eb;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
  cursor: pointer;
  transition: color 0.2s, transform 0.2s, background 0.2s;
  padding: 0.1em 0.55em 0.1em 0.55em;
  outline: none;
  /* Remove float and margin-left for absolute positioning */
}
.close:hover {
  color: #1d4ed8;
  background: #e0e7ff;
  transform: scale(1.18);
}
.modal-project-header {
  margin-bottom: 0;
  text-align: left;
  border: none;
  padding: 0;
  background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
  border-radius: 0;
  box-shadow: 0 4px 18px 0 rgba(37,99,235,0.13);
  border-top: none;
  border-bottom: none;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0;
}
.modal-inner > .modal-project-header {
  width: calc(100% + 2.2rem);
  margin-left: -1.1rem;
  margin-right: -1.1rem;
}
.modal-project-header h3 {
  font-size: 1.32rem;
  color: #fff;
  margin-bottom: 0.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: transparent;
  padding: 1.2rem 2rem 0.7rem 2rem;
  border-radius: 0;
  box-shadow: none;
  width: 100%;
  text-shadow: 0 2px 8px #1e3a8a33;
}
.modal-project-role {
  display: block;
  font-size: 1.01rem;
  color: #e0e7ff;
  margin-bottom: 0.1rem;
  font-weight: 600;
  letter-spacing: 0.1px;
  background: transparent;
  padding: 0.4rem 2rem 0.4rem 2rem;
  width: 100%;
  border-radius: 0;
  border-bottom: none;
}
.modal-project-role[style] {
  color: #f1f5f9 !important;
  font-weight: 700 !important;
  margin-bottom: 0.1rem;
  background: transparent !important;
  border-bottom: none;
  padding: 0.4rem 2rem 0.4rem 2rem;
  box-shadow: none;
}
.modal-company {
  font-size: 1.01rem;
  color: #f1f5f9;
  font-weight: 700;
  margin-bottom: 0.1rem;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 4px #1e3a8a22;
  /* visually distinct from domain, but harmonious */
}

/* Redesigned Modal Project Header */
.redesigned-header {
  /* Soft color blur with radial highlight */
  background:
    radial-gradient(circle at 70% 30%, rgba(96,165,250,0.18) 0%, rgba(37,99,235,0.10) 60%, rgba(255,255,255,0.13) 100%),
    linear-gradient(120deg, rgba(255,255,255,0.82) 60%, rgba(224,231,255,0.32) 100%);
  border-radius: 1.2rem 1.2rem 0 0;
  border-bottom: 1.5px solid #dbeafe;
  box-shadow: 0 8px 32px 0 rgba(37, 99, 235, 0.09), 0 1.5px 8px rgba(0, 0, 0, 0.02);
  padding: 1.6rem 2.1rem 1.1rem 2.1rem;
  margin-bottom: 0.7rem;
  position: relative;
  overflow: visible;
  z-index: 2;
  backdrop-filter: blur(14px) saturate(170%);
  background-blend-mode: lighten, normal;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

/* Modal Responsive Styles */
@media (max-width: 600px) {
  .modal-content {
    max-width: 98vw;
    width: 100%;
    font-size: 0.98rem;
  }
  .modal-inner {
    padding: 0.8rem 0.7rem 2.2rem 0.7rem;
    max-height: 80vh;
    font-size: 0.98rem;
  }
  .close {
    bottom: 1.2rem;
    right: 1.2rem;
  }
  .exp-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
  .exp-year {
    min-width: 0;
    width: 100%;
    text-align: left;
    padding-top: 0;
    margin-top: 0.2rem;
  }
  .modal-project-header {
    position: static !important;
    z-index: 1 !important;
    width: 100vw !important;
    margin-left: -0.7rem !important;
    margin-right: -0.7rem !important;
  }
  .modal-project-header h3,
  .modal-project-role {
    padding-left: 0.7rem !important;
    padding-right: 0.7rem !important;
    font-size: 0.95rem;
  }
  .modal-project-role[style] {
    padding: 0.25rem 1rem;
    border-radius: 0;
    font-size: 0.97rem;
  }
  .modal-inner {
    padding-top: 0 !important; /* Ensure no top padding */
  }
  .modal-project-dropdown-wrap {
    position: relative !important;
    z-index: 2 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0.5rem !important;
    background: #fff !important;
    border-radius: 0 0 0.8rem 0.8rem !important;
    box-shadow: 0 2px 12px rgba(37,99,235,0.04) !important;
  }
  .modal {
    overflow-x: hidden !important;
  }
  .modal-content {
    overflow-x: hidden !important;
  }
  .modal-inner {
    overflow-x: hidden !important;
  }
}
@media (max-width: 768px) and (min-width: 600px) {
  .modal-content {
    max-width: 98vw;
    width: 98vw;
    min-width: 0;
    height: auto;
    max-height: 90vh;
    border-radius: 18px;
  }
  .modal-inner {
    padding: 1.2rem 1.2rem 3.2rem 0.7rem;
    max-height: 80vh;
    font-size: 1rem;
  }
  .close {
    bottom: 1.2rem;
    right: 1.2rem;
  }
}
@media (min-width: 769px) {
  .modal {
    align-items: flex-start;
    justify-content: flex-end;
  }
  .modal-content {
    max-width: 480px;
    /* width: 420px; */
    height: 100vh;
    max-height: 100vh;
    border-radius: 18px 0 0 18px;
    margin: 0;
    right: 0;
    top: 0;
    left: auto;
    position: fixed;
    animation: modalSlideInRight 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: -8px 0 32px rgba(37, 99, 235, 0.13),
      -2px 0 8px rgba(0, 0, 0, 0.08);
  }
  @keyframes modalSlideInRight {
    from {
      opacity: 0;
      transform: translateX(100%) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translateX(0) scale(1);
    }
  }
  .modal {
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
  }

  /* Fade-out animation for modals */
  @keyframes modalFadeOutRight {
    from {
      opacity: 1;
      transform: translateX(0) scale(1);
    }
    to {
      opacity: 0;
      transform: translateX(100%) scale(0.95);
    }
  }

  .modal.fade-out .modal-content {
    animation: modalFadeOutRight 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  }

  .modal.fade-out {
    pointer-events: none;
  }

  .modal.hide {
    display: none !important;
  }
}

/* Modal Tabs Styles */
.modal-tabs-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  background: none;
  border-bottom: none;
  padding-bottom: 0;
  border-radius: 0;
  box-shadow: none;
}
.modal-tab {
  background: #f4f8ff;
  color: #2563eb;
  border: none;
  outline: none;
  font-weight: 600;
  font-size: 1.07rem;
  padding: 0.7rem 1.7rem 0.7rem 1.7rem;
  border-radius: 1.2rem 1.2rem 0 0;
  cursor: pointer;
  transition: 
    background 0.18s, 
    color 0.18s, 
    box-shadow 0.18s,
    border-bottom 0.18s;
  letter-spacing: 0.2px;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
  border-bottom: 3px solid transparent;
  box-shadow: 0 2px 8px rgba(37,99,235,0.04);
}
.modal-tab.active {
  background: #fff;
  color: #1d4ed8;
  border-bottom: 3px solid #1d4ed8;
  box-shadow: 0 4px 16px rgba(37,99,235,0.10);
}
.modal-tab:not(.active):hover {
  background: #e0e7ff;
  color: #2563eb;
  border-bottom: 3px solid #93c5fd;
}
.modal-tabs-content {
  width: 100%;
  background: #fff;
  border-radius: 0 0 1.2rem 1.2rem;
  /* Move box-shadow to the bullet points area only */
  box-shadow: none;
  padding: 1.2rem 0.5rem 0.5rem 0.5rem;
  min-height: 120px;
  position: relative;
  overflow: visible;
}
.modal-tab-panel {
  display: none;
  animation: fadeIn 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.modal-tab-panel.active {
  display: block;
}
.modal-project-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: 0.7rem;
  letter-spacing: 0.2px;
  text-transform: none;
}
.modal-project-overview {
  font-size: 1.01em;
  color: #374151;
  margin-bottom: 1.1rem;
  line-height: 1.7;
  background: #f4f8ff;
  border-radius: 0.7rem;
  padding: 0.8rem 1rem;
  box-shadow: 0 1px 4px rgba(37,99,235,0.04);
  border-left: 4px solid #2563eb;
}
.modal-project-list {
  margin-top: 0.7rem;
  /* Subtle shadow for the bullet points area only */
  box-shadow: 0 2px 8px rgba(37,99,235,0.04);
  border-radius: 0 0 1.2rem 1.2rem;
  background: #fff;
  margin-bottom: 0.5rem;
  padding-bottom: 1.2rem;
}
.modal-project-list li {
  margin-bottom: 0.7rem;
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid #e0e7ff;
  font-size: 1.04rem;
  color: #22223b;
}
.modal-project-list li::before {
  content: "\2022";
  color: #2563eb;
  position: absolute;
  left: 0;
  font-size: 1.2em;
  top: 0.1em;
}

/* Responsive tweaks for modal tabs */
@media (max-width: 600px) {
  .modal-tabs-nav {
    gap: 0.2rem;
  }
  .modal-tab {
    font-size: 0.98rem;
    padding: 0.5rem 0.9rem;
    border-radius: 0.8rem 0.8rem 0 0;
  }
  .modal-tabs-content {
    padding: 1rem 0.1rem 0.2rem 0.1rem;
  }
  .modal-project-overview {
    padding: 0.6rem 0.5rem;
    font-size: 0.97em;
  }
}

/* Modern Dropdown for Modal Project Switcher */
.modal-project-dropdown-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  z-index: 2;
  gap: 0.7rem;
  margin-top: 0;
  margin-bottom: 1.2rem;
  padding: 1.1rem 0.5rem 0.7rem 0.5rem;
  background: #fff;
  box-shadow: 0 2px 12px rgba(37,99,235,0.04);
  border-radius: 0 0 1.2rem 1.2rem;
  max-width: 480px;
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
  flex-wrap: nowrap;
}

/* Style the dropdown itself */
.modal-project-dropdown {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: linear-gradient(90deg, #f4f8ff 60%, #e0e7ff 100%);
  color: #2563eb;
  border: 2px solid #e0e7ff;
  border-radius: 1.2rem;
  padding: 0.5rem 1.7rem 0.5rem 0.9rem;
  font-size: 1.01rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(37,99,235,0.06);
  transition: border 0.2s, box-shadow 0.2s;
  width: 100%;
  max-width: 480px;
  min-width: 160px;
  margin-right: 0.3rem;
  background-image: url('data:image/svg+xml;utf8,<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="16" cy="16" r="15" fill="white" stroke="%232563eb" stroke-width="2"/><path d="M11 14l5 5 5-5" stroke="%232563eb" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-position: right 1.1rem center;
  background-size: 1.2em 1.2em;
}
.modal-project-dropdown-label {
  font-size: 1.08rem;
  color: #2563eb;
  font-weight: 600;
  letter-spacing: 0.1em;
}
.modal-project-dropdown:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px #2563eb33;
}
.modal-project-dropdown::-ms-expand {
  display: none;
}

/* Responsive tweaks for dropdown */
@media (max-width: 600px) {
  .modal-project-dropdown {
    font-size: 0.97rem;
    padding: 0.45rem 1.5rem 0.45rem 0.7rem;
    padding-right: 2.2rem;
    max-width: 100vw;
    background-position: right 0.9rem center;
    background-size: 1.1em 1.1em;
  }
}

/* Hide old tab styles in modal2 */
#modal2 .modal-tabs-nav,
#modal2 .modal-tab {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: none !important;
}
.modal-project-dropdown-wrap {
  max-width: 100vw;
  margin-bottom: 0 !important;
}
.modal-project-dropdown-wrap::after {
  display: none !important;
}


/* Hide old tab styles in modal2 */
#modal2 .modal-tabs-nav,
#modal2 .modal-tab {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: none !important;
}
    

/* Hide old tab styles in modal2 */
#modal2 .modal-tabs-nav,
#modal2 .modal-tab {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: none !important;
}
.modal-project-dropdown-wrap {
  max-width: 100vw;
  margin-bottom: 0 !important;
}
.modal-project-dropdown-wrap::after {
  display: none !important;
}

/* Hide old tab styles in modal2 */
#modal2 .modal-tabs-nav,
#modal2 .modal-tab {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: none !important;
}
.redesigned-header .modal-company {
  color: #2342a0 !important;
  font-weight: 700;
  text-shadow: 0 1px 8px #fff, 0 1px 2px #2563eb22;
  letter-spacing: 0.08em;
  /* Optionally, increase font size for clarity */
  font-size: 1.08rem;
}

/* Hide old tab styles in modal2 */
#modal2 .modal-tabs-nav,
#modal2 .modal-tab {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: none !important;
}
.redesigned-header .modal-company {
  color: #2342a0 !important;
  font-weight: 700;
  text-shadow: 0 1px 8px #fff, 0 1px 2px #2563eb22;
  letter-spacing: 0.08em;
  /* Optionally, increase font size for clarity */
  font-size: 1.08rem;
}
 
.redesigned-header .modal-company {
  color: #2342a0 !important;
  font-weight: 700;
  text-shadow: 0 1px 8px #fff, 0 1px 2px #2563eb22;
  letter-spacing: 0.08em;
  /* Optionally, increase font size for clarity */
  font-size: 1.08rem;
}
.modal-label {
  font-size: 0.93em;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.3em;
  opacity: 0.85;
}

/* Modal Project Skills Badges */
.modal-project-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.2rem;
  margin: 0.5rem 0 1rem 0;
  justify-content: flex-start;
  align-items: center;
}
.modal-skill-badge {
  background: #f8fafc;
  color: #2563eb;
  font-weight: 500;
  font-size: 0.89rem;
  border-radius: 8px;
  padding: 0.13rem 0.7rem;
  border: 1px solid #e5e7eb;
  box-shadow: none;
  display: inline-block;
  margin-bottom: 0;
  transition: none;
  user-select: none;
  cursor: default;
  letter-spacing: 0.01em;
}
.modal-skill-badge:hover {
  background: #f8fafc;
  color: #2563eb;
  border-color: #e5e7eb;
  transform: none;
}
/* Responsive tweaks for modal skills badges */
@media (max-width: 600px) {
  .modal-project-skills {
    gap: 0.2rem 0.1rem;
  }
  .modal-skill-badge {
    font-size: 0.85rem;
    padding: 0.09rem 0.5rem;
  }
}



