/* Reset some default styles */
*, *::before, *::after {
  box-sizing: border-box;
}

body, ul {
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

html.no-scroll {
  overflow: hidden !important;
}

html.scroll-locked {
  overflow: hidden !important;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #0a0a0a;
  color: #fff;
  line-height: 1.6;
  width: 100%;
}

/* Prevent scrolling when modal or certificate viewer is open */
body.no-scroll {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden !important;
}

body.scroll-locked {
  overflow: hidden !important;
}

/* Navbar Styles */
.navbar {
  width: 100%;
  background: #000;
  box-shadow: 0 2px 10px rgba(139, 0, 0, 0.3);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  border-bottom: 2px solid #2a2a2a;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px 12px 40px;
}

.logo {
  color: #8b0000;
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(139, 0, 0, 0.5);
  font-family: 'Segoe UI', Arial, sans-serif;
}

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

.nav-links li a {
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  font-family: 'Segoe UI', Arial, sans-serif;
  transition: all 0.3s ease;
  position: relative;
  padding: 4px 0;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: #8b0000;
  transition: width 0.3s ease;
}

.nav-links li a:hover {
  color: #8b0000;
}

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

/* Prevent focus state from interfering with active state */
.nav-links li a:focus {
  outline: none;
}

.nav-links li a:focus:not(.active) {
  color: #fff;
}

.nav-links li a:focus:not(.active)::after {
  width: 0;
}

.nav-links li a.active {
  color: #8b0000;
}

.nav-links li a.active::after {
  width: 100%;
}

/* Remove old nav styles */
#desktop-nav { display: none; }

/* Section Styles */
.section {
  padding: 100px 20px 60px 20px;
  min-height: auto; /* let content define height so no big empty gaps */
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px solid rgba(139, 0, 0, 0.2);
  margin-bottom: 32px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Scroll reveal animations - All devices */
.reveal-on-scroll {
  opacity: 0;
  will-change: transform, opacity, filter;
}

.reveal-on-scroll.is-visible {
  animation: revealInUp 0.72s cubic-bezier(0.2, 0.65, 0.2, 1) both;
}

/* Direction-based animations */
.reveal-on-scroll.from-left.is-visible {
  animation-name: revealInLeft;
}

.reveal-on-scroll.from-right.is-visible {
  animation-name: revealInRight;
}

@keyframes revealInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes revealInLeft {
  from {
    opacity: 0;
    transform: translate3d(-34px, 0, 0);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes revealInRight {
  from {
    opacity: 0;
    transform: translate3d(34px, 0, 0);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}



/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1 !important;
  }

  .reveal-on-scroll.is-visible {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* About Section */
#about {
  background: linear-gradient(45deg, #0a0a0a, #1a1a1a);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#about h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #8b0000;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  text-align: left;
}

#about p {
  font-size: 1.2rem;
  color: #fff;
  margin-top: 20px;
  text-align: left;
}

/* Experience Section */
#experience {
  background: #1a1a1a;
}

.experience-item {
  background: #2a2a2a;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #8b0000;
  transition: transform 0.3s ease;
}

.experience-item:hover {
  transform: translateX(10px);
}

/* Projects Section */
#projects {
  background: linear-gradient(45deg, #1a1a1a, #0a0a0a);
}

.projects-grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 24px;
  margin-top: 32px;
  scrollbar-width: none;
}

.projects-grid::-webkit-scrollbar {
  display: none;
}

.project-card {
  min-width: 340px;
  max-width: 380px;
  scroll-snap-align: center;
  background: #232323;
  padding: 24px;
  border-radius: 14px;
  transition: all 0.3s ease;
  border: 1px solid rgba(139, 0, 0, 0.2);
  box-shadow: 0 2px 12px rgba(139,0,0,0.10);
  text-align: center;
  display: flex;
  flex-direction: column;
}

/* Tablet and below: adjust project card sizing */
@media (max-width: 900px) {
  .projects-grid {
    gap: 12px;
  }

  .project-card {
    min-width: 85vw;
    max-width: 90vw;
  }
}

/* Carousel Pagination Indicators */
.carousel-indicators {
  display: none; /* Hidden by default */
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 0;
}

.carousel-indicators .indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4a4a4a;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicators .indicator-dot.active {
  background: #8b0000;
  transform: scale(1.2);
}

/* Show indicators only on mobile/tablet */
@media (max-width: 900px) {
  .carousel-indicators {
    display: flex;
  }
}

/* Projects Carousel Layout */
.projects-carousel {
  display: flex;
  align-items: center;
  gap: 16px;
}

.projects-nav {
  background: transparent;
  border: none;
  color: #d8d8d8;
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 48px;
  font-weight: 700;
  font-family: 'Segoe UI Symbol', 'Segoe UI', Arial, sans-serif;
  line-height: 1;
  padding: 0 4px;
  box-shadow: none;
  transition: transform 0.18s ease, color 0.18s ease;
}

.projects-nav:hover {
  color: #ffffff;
  transform: scale(1.06);
}

.projects-nav:active {
  transform: scale(0.95);
}

.projects-nav:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 4px;
  border-radius: 4px;
}

.projects-prev {
  padding-right: 6px;
}

.projects-next {
  padding-left: 6px;
}

/* Mobile / tablet: hide carousel arrows for projects */
@media (max-width: 900px) {
  .projects-carousel {
    display: block;
  }

  .projects-nav {
    display: none;
  }
}

.project-card p {
  text-align: justify;
  text-justify: inter-word;
}

.project-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 16px;
  object-fit: cover;
  max-height: 200px;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 8px 32px rgba(139,0,0,0.18);
  border-color: #8b0000;
}

.project-modal-buttons {
  margin-top: 24px;
  text-align: center;
}

.project-view-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 25px;
  border: 2px solid #8b0000;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
  transition: all 0.3s ease;
}

.project-view-btn:hover {
  background: #8b0000;
  color: #fff;
  box-shadow: 0 4px 16px rgba(139,0,0,0.3);
  transform: translateY(-2px);
}

/* Contact Section */
#contact {
  background: #1a1a1a;
}

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

#contact-form input,
#contact-form textarea {
  padding: 12px;
  border: 1px solid rgba(139, 0, 0, 0.2);
  border-radius: 4px;
  background: #2a2a2a;
  color: #fff;
  transition: all 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
  outline: none;
  border-color: #8b0000;
  box-shadow: 0 0 5px rgba(139, 0, 0, 0.3);
}

#contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

#contact-form button {
  padding: 12px 24px;
  background: #8b0000;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#contact-form button:hover {
  background: #a00000;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(139, 0, 0, 0.3);
}

/* Headings */
h1, h2, h3, h4 {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-weight: bold;
  margin: 0 0 10px 0;
}

h2 {
  font-size: 2.8rem;
  margin: 48px 0 36px 0;
  color: #8b0000;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.18);
  text-align: center;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}

h2::after {
  content: '';
  display: block;
  margin: 12px auto 0 auto;
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #8b0000 60%, #b30000 100%);
}

h3 {
  font-size: 1.7rem;
  margin-bottom: 15px;
  color: #fff;
  text-align: center;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: #8b0000;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a00000;
}

/* Hero Section */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh; /* fill full viewport height on desktop */
  border-bottom: none;
  background: linear-gradient(120deg, #181818 60%, #1a1a1a 100%);
  border-radius: 0; /* full-width strip on desktop without curved bottom gap */
  box-shadow: 0 8px 32px rgba(139,0,0,0.10);
  padding: 120px 24px 80px 24px;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  padding: 0 12px;
}

.hero-image {
  --hero-avatar-size: 260px;
  flex: 0 0 280px;
  position: relative;
  width: var(--hero-avatar-size);
  height: var(--hero-avatar-size);
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  width: var(--hero-avatar-size);
  height: var(--hero-avatar-size);
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 6px 32px rgba(139,0,0,0.18), 0 1.5px 8px rgba(0,0,0,0.10);
  background: linear-gradient(120deg, #232323 60%, #181818 100%);
  border: 5px solid #232323;
  position: absolute;
  inset: 0;
  transition: opacity 0.28s ease;
}

.hero-image .default-avatar {
  opacity: 1;
}

.hero-image .hover-avatar {
  opacity: 0;
}

.hero-image.show-lnzz .default-avatar,
.hero-image.show-lnzz-tap .default-avatar,
.hero-image:hover .default-avatar {
  opacity: 0;
}

.hero-image.show-lnzz .hover-avatar,
.hero-image.show-lnzz-tap .hover-avatar,
.hero-image:hover .hover-avatar {
  opacity: 1;
}

.hero-image:focus-visible {
  outline: 2px solid #8b0000;
  outline-offset: 6px;
}

.hero-info {
  flex: 1 1 350px;
  min-width: 320px;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  background: rgba(24,24,24,0.85);
  border-radius: 18px;
  padding: 32px 32px 24px 32px;
  box-shadow: none;
}

.hero-greeting {
  color: #aaa;
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  text-align: left;
}

.hero-name {
  font-size: 2.8rem;
  margin: 0 0 10px 0;
  font-weight: bold;
  color: #fff;
  text-align: left;
  white-space: nowrap;
  line-height: 1.2;
  position: relative;
  display: inline-block;
}

.typing-cursor {
  display: inline;
  width: 0;
  margin-left: 2px;
}

.typing-cursor::after {
  content: '';
  display: inline-block;
  width: 3px;
  height: 0.9em;
  background: #8b0000;
  animation: blink-cursor 1s infinite;
  opacity: 0.8;
  vertical-align: baseline;
}

@keyframes blink-cursor {
  0%, 49% {
    opacity: 0.8;
  }
  50%, 100% {
    opacity: 0;
  }
}

.hero-role {
  font-size: 1.5rem;
  margin: 0 0 30px 0;
  color: #8b0000;
  font-weight: 600;
  text-align: left;
}

.hero-description {
  margin: 0 0 28px 0;
  color: #dcdcdc;
  line-height: 1.8;
  font-size: 1.05rem;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-btn {
  padding: 12px 24px;
  border: 2px solid #8b0000;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  color: #fff;
  display: inline-block;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(139,0,0,0.10);
  letter-spacing: 0.5px;
  font-family: inherit;
}

.hero-btn-outline {
  background: linear-gradient(90deg, #181818 60%, #232323 100%);
  color: #fff;
  border: 2px solid #8b0000;
}

.hero-btn-outline:hover {
  background: #8b0000;
  color: #fff;
  box-shadow: 0 4px 16px rgba(139,0,0,0.18);
}

.hero-btn-filled {
  background: linear-gradient(90deg, #b30000 60%, #8b0000 100%);
  color: #fff;
  border: 2px solid #8b0000;
}

.hero-btn-filled:hover {
  background: #a00000;
  color: #fff;
  box-shadow: 0 4px 16px rgba(139,0,0,0.18);
}

.hero-btn-linkedin {
  background: #0077b5;
  color: #fff;
  border: 2px solid #0077b5;
  margin-left: 4px;
}

.hero-btn-linkedin:hover {
  background: #005983;
  border-color: #005983;
  color: #fff;
}

.hero-socials {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 10px;
}

.hero-social-link {
  color: #fff;
  font-size: 2rem;
  transition: all 0.3s ease;
  border-radius: 50%;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(139, 0, 0, 0.3);
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.hero-social-link:hover {
  color: #fff;
  background: #8b0000;
  border-color: #8b0000;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(139, 0, 0, 0.4);
}

.certificate-img {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  margin: 0 auto 16px auto;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(139,0,0,0.13);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid #232323;
  background: #fff;
}
.certificate-img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 24px rgba(139,0,0,0.25);
}

.certification-item {
  margin-bottom: 40px;
  text-align: center;
}

.education-item {
  background: linear-gradient(120deg, #232323 60%, #181818 100%);
  padding: 32px;
  border-radius: 18px;
  margin-bottom: 32px;
  box-shadow: 0 4px 24px rgba(139,0,0,0.10);
  transition: box-shadow 0.2s, transform 0.2s;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 40px;
}

.education-item:hover {
  box-shadow: 0 6px 32px rgba(139,0,0,0.15);
  transform: translateY(-2px);
}

.education-item .education-content {
  flex: 1;
  text-align: left;
}

.education-item h3 {
  font-size: 2rem;
  margin-bottom: 18px;
  color: #fff;
  text-align: left;
}

.education-item p {
  color: #ccc;
  font-size: 1.15rem;
  margin-bottom: 8px;
  text-align: left;
}

.education-item p strong {
  color: #fff;
}

/* Education text hierarchy */
.education-program {
  font-size: 1.12rem;
  color: #e6e6e6;
  font-weight: 500;
}

.education-location {
  font-size: 1.02rem;
  color: #cfcfcf;
  line-height: 1.6;
  max-width: 65ch;
}

.education-date {
  margin-top: 10px;
  font-size: 1.02rem;
  color: #fff;
}

/* Don't bold the 'Expected Graduation' label */
.education-date strong {
  font-weight: normal;
}

#education {
  background: linear-gradient(45deg, #1a1a1a, #0a0a0a);
}

/* Awards Grid Layout */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.awards-carousel {
  display: flex;
  align-items: center;
  gap: 16px;
}

.awards-nav {
  background: transparent;
  border: none;
  color: #d8d8d8;
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 48px;
  font-weight: 700;
  font-family: 'Segoe UI Symbol', 'Segoe UI', Arial, sans-serif;
  line-height: 1;
  padding: 0 4px;
  box-shadow: none;
  transition: transform 0.18s ease, color 0.18s ease;
}

.awards-nav:hover {
  color: #ffffff;
  transform: scale(1.06);
}

.awards-nav:active {
  transform: scale(0.95);
}

.awards-nav:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 4px;
  border-radius: 4px;
}

.awards-prev {
  padding-right: 6px;
}

.awards-next {
  padding-left: 6px;
}

/* Mobile / tablet: simple stacked list, no carousel arrows */
@media (max-width: 900px) {
  .awards-carousel {
    display: block;
  }

  .awards-nav {
    display: none;
  }

  .awards-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 12px;
    padding-bottom: 8px;
  }

  .awards-grid::-webkit-scrollbar {
    display: none;
  }

  .award-card,
  .certification-card {
    min-width: 85vw;
    max-width: 90vw;
    scroll-snap-align: center;
  }
}

/* Desktop carousel behavior: horizontal scroll with snap */
@media (min-width: 901px) {
  .awards-grid {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;              /* Firefox */
  }
  .awards-grid::-webkit-scrollbar {      /* WebKit browsers */
    display: none;
  }

  .award-card, .certification-card {
    min-width: 340px;
    max-width: 380px;
    scroll-snap-align: center;
  }
}

.award-card, .certification-card {
  background: linear-gradient(120deg, #232323 60%, #181818 100%);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(139,0,0,0.10);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(139, 0, 0, 0.2);
}

.award-card:hover, .certification-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 32px rgba(139,0,0,0.20);
  border-color: #8b0000;
}

.award-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #fff;
}

.award-card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.award-card-content h3 {
  font-size: 1.4rem;
  margin: 0 0 8px 0;
  color: #fff;
  font-weight: bold;
  text-align: left;
}

.award-card-content p {
  color: #ccc;
  font-size: 1rem;
  margin: 0;
  text-align: left;
}

.certification-item {
  margin-bottom: 40px;
  text-align: center;
}

#awards h2 {
  color: #b30000;
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 36px;
  text-align: center;
  letter-spacing: 1px;
}

/* Modal Styles */
.modal {
  display: none !important;
  position: fixed;
  z-index: 2000;
  inset: 0;
  overflow: hidden !important;
  background-color: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  padding: 60px 20px 20px;
}

.modal.open {
  display: flex !important;
}

.modal-shell {
  position: relative;
  width: min(90vw, 1000px);
  max-height: 85vh;
  margin: auto;
  overflow: visible;
}

.modal-content {
  background: linear-gradient(135deg, #1a1a1a 0%, #232323 100%);
  margin: 0;
  padding: 0;
  border: 2px solid #8b0000;
  border-radius: 20px;
  width: 100%;
  max-width: none;
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 8px 48px rgba(139, 0, 0, 0.4);
  animation: modalFadeIn 0.3s ease;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: #8b0000 rgba(26, 4, 4, 0.75);
  scrollbar-gutter: stable both-edges;
}

.modal-content::-webkit-scrollbar {
  width: 10px;
  -webkit-appearance: none;
}

.modal-content::-webkit-scrollbar-button {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  -webkit-appearance: none;
  background: transparent !important;
}

.modal-content::-webkit-scrollbar-button:single-button,
.modal-content::-webkit-scrollbar-button:single-button:vertical:decrement,
.modal-content::-webkit-scrollbar-button:single-button:vertical:increment,
.modal-content::-webkit-scrollbar-button:single-button:horizontal:decrement,
.modal-content::-webkit-scrollbar-button:single-button:horizontal:increment {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
}

.modal-content::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(32, 6, 6, 0.85) 0%, rgba(20, 3, 3, 0.9) 100%);
  border-radius: 0;
  margin: 0;
  border: 1px solid rgba(139, 0, 0, 0.35);
}

.modal-content::-webkit-scrollbar-track-piece:vertical:start,
.modal-content::-webkit-scrollbar-track-piece:vertical:end {
  background: rgba(20, 3, 3, 0.92);
}

.modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #a10000 0%, #7a0000 100%);
  border-radius: 999px;
  border: 1px solid rgba(255, 120, 120, 0.18);
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #b30000 0%, #860000 100%);
}

.modal-content::-webkit-scrollbar-corner {
  background: transparent;
}

/* Mobile: Hide scrollbar completely */
@media (max-width: 768px) {
  .modal-content {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
  }
  
  .modal-content::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-close {
  color: #fff;
  position: absolute;
  top: -42px;
  right: 4px;
  font-size: 40px;
  font-weight: 300;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  z-index: 15000;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
  transition: color 0.2s ease, transform 0.2s ease;
  pointer-events: auto;
}

.modal-close:hover,
.modal-close:focus {
  color: #f0f0f0;
  background: transparent;
  transform: scale(1.06);
  outline: none;
}

.modal-body {
  display: flex;
  flex-direction: row;
  gap: 32px;
  padding: 24px;
  align-items: flex-start;
}

.project-modal-body {
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.project-modal-image {
  width: 100%;
  flex: none;
}

.project-modal-image .modal-image-wrapper {
  min-height: auto;
}

.project-modal-text {
  width: 100%;
  text-align: left;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Side-by-side project screenshot mode (used by Android calculator). */
.project-modal-split-image {
  display: none;
}

#projectModal.project-modal-split .project-modal-image .modal-image-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-height: auto;
  align-items: start;
}

#projectModal.project-modal-split .project-modal-image .modal-image {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

#projectModal.project-modal-split .project-modal-image .project-modal-split-image {
  display: block;
}

/* Project screenshots should not force a white backdrop. */
#projectModal .project-modal-image .modal-image {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.15);
}

/* Project modal image carousel controls */
.project-image-controls {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.project-img-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.project-img-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.project-image-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.project-image-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transition: all 0.2s ease;
}

.project-image-dot.active {
  width: 16px;
  border-radius: 999px;
  background: #8b0000;
}

.modal-image-container {
  flex: 0 0 45%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  position: relative;
}

.modal-image-wrapper {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.modal-image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(139, 0, 0, 0.3);
  background: #fff;
  border: 2px solid #232323;
  display: none;
  transition: opacity 0.5s ease;
}

.modal-image.active {
  display: block;
}

/* Navigation buttons */
.modal-nav-btn {
  position: static;
  transform: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  padding: 0;
  line-height: 1;
  backdrop-filter: blur(5px);
}

.modal-nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.modal-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.modal-nav-btn:disabled:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Carousel controls (prev/dots/next) */
.modal-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

/* Hide carousel controls when only one image */
.modal-image-container.single-image .modal-carousel-controls {
  display: none;
}

/* Image indicators */
.modal-indicators {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 0;
}

.modal-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-indicator.active {
  background: #8b0000;
  width: 22px;
  height: 6px;
  border-radius: 999px;
}

.modal-image-container.single-image .modal-indicators {
  display: none;
}


.modal-text {
  color: #fff;
  flex: 1;
  min-width: 0;
}

.modal-text h2 {
  font-size: 2rem;
  margin: 0 0 10px 0;
  color: #fff;
  text-align: left;
  line-height: 1.2;
  word-break: break-word;
}

.modal-institution {
  color: #b30000;
  font-size: 1.05rem;
  margin: 0 0 14px 0;
  font-weight: 600;
  text-align: left;
  line-height: 1.35;
}

.modal-description {
  color: #dcdcdc;
  font-size: 1.05rem;
  line-height: 1.9;
  margin: 12px 0 0 0;
  text-align: left;
  white-space: pre-line;
  max-width: 100%;
}

/* Justify certificate modal text (keep project modal rules separate below) */
.modal-text:not(.project-modal-text) .modal-description {
  text-align: justify;
  text-justify: inter-word;
}

.project-modal-text .modal-description {
  margin-top: 24px;
  margin-bottom: 0;
  padding: 0;
  text-align: justify;
  text-justify: inter-word;
}

.project-status-highlight {
  display: block;
  margin-top: 20px;
  padding: 16px 20px;
  background: rgba(139, 0, 0, 0.15);
  border-left: 4px solid #8b0000;
  border-radius: 6px;
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.8;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.modal-full-image-link {
  display: inline-block;
  padding: 12px 24px;
  background: #8b0000;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  pointer-events: auto;
  z-index: 100;
  position: relative;
}

.modal-full-image-link:hover {
  background: #a00000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 0, 0, 0.4);
}

.certificate-viewer {
  position: fixed;
  inset: 0;
  display: none !important;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 64px 24px 24px;
  z-index: 5000;
  overflow: hidden !important;
}

.certificate-viewer.open {
  display: flex !important;
}

.certificate-viewer-content {
  width: fit-content;
  max-width: 90vw;
  max-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

body.certificate-viewer-open .modal-close {
  opacity: 0;
  pointer-events: none;
}

.certificate-viewer-image {
  display: block;
  max-width: min(1120px, 90vw);
  max-height: calc(100vh - 170px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
}

.certificate-viewer-close {
  color: #fff;
  position: absolute;
  top: -42px;
  right: 4px;
  font-size: 40px;
  font-weight: 200;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  z-index: 15000;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
  transition: color 0.2s ease, transform 0.2s ease;
  pointer-events: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.certificate-viewer-close:hover,
.certificate-viewer-close:focus {
  color: #f0f0f0;
  background: transparent;
  transform: scale(1.06);
  outline: none;
}

@media (max-width: 1024px) {
  .certificate-viewer {
    padding: 56px 16px 16px;
  }

  .certificate-viewer-content {
    width: fit-content;
    max-width: 92vw;
    max-height: calc(100vh - 108px);
  }

  .certificate-viewer-image {
    max-height: calc(100vh - 150px);
  }

  .certificate-viewer-close {
    top: -38px;
    right: 2px;
    width: 30px;
    height: 30px;
    font-size: 34px;
  }
}

@media (max-width: 640px) {
  .certificate-viewer {
    padding: 52px 12px 14px;
  }

  .certificate-viewer-content {
    width: fit-content;
    max-width: 92vw;
    max-height: calc(100vh - 90px);
  }

  .certificate-viewer-image {
    max-height: 60vh;
  }

  .certificate-viewer-close {
    top: -34px;
    right: 2px;
    width: 28px;
    height: 28px;
    font-size: 32px;
    transform: none;
  }

  .certificate-viewer-close:hover,
  .certificate-viewer-close:focus {
    transform: scale(1.06);
  }
}

@media (max-width: 430px) {
  .certificate-viewer-content {
    width: fit-content;
    max-width: 94vw;
  }

  .certificate-viewer-image {
    max-height: 56vh;
  }

  .certificate-viewer-close {
    top: -30px;
    right: 2px;
    width: 26px;
    height: 26px;
    font-size: 30px;
  }
}

@media (max-width: 900px) {
  .awards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .modal-shell {
    width: 95vw;
    margin: 5% auto;
    max-height: 85vh;
  }
  .modal-body {
    flex-direction: column;
    padding: 16px;
    gap: 20px;
  }
  .modal-text {
    width: 100%;
    padding: 0 6px;
  }
  .modal-text h2 {
    font-size: 1.45rem;
    line-height: 1.25;
    text-align: left;
  }
  .modal-institution {
    font-size: 1rem;
    line-height: 1.4;
  }
  .modal-description {
    font-size: 0.98rem;
    line-height: 1.65;
    text-align: left;
    text-justify: auto;
  }
  .modal-image-container {
    flex: 0 0 auto;
    width: 100%;
    flex-direction: column;
  }
  .modal-image-container .modal-image {
    max-width: 100%;
    max-height: 400px;
    flex: 1 1 auto;
  }

  /* Keep project screenshots readable on mobile/tablet modals. */
  #projectModal .modal-image-container .modal-image {
    max-height: 72vh;
  }

  #projectModal.project-modal-split .project-modal-image .modal-image-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #projectModal.project-modal-split .project-modal-image .modal-image {
    max-height: 56vh;
  }

  .modal-nav-btn {
    width: 35px;
    height: 35px;
    font-size: 20px;
  }
  .modal-prev-btn {
    left: 5px;
  }
  .modal-next-btn {
    right: 5px;
  }
  .modal-text h2 {
    font-size: 1.6rem;
  }
}

#certifications h2 {
  color: #b30000;
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 36px;
  text-align: center;
  letter-spacing: 1px;
}

.online-certifications {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.online-cert-badge {
  display: block;
  max-width: 320px;
  width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  margin-bottom: 0;
  background: #fff;
}

@media (max-width: 900px) {
  .online-certifications {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
}

/* Additional mobile tuning for modals */
@media (max-width: 900px) {
  .modal-content {
    max-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .modal-body {
    padding: 12px;
    gap: 16px;
  }
  .modal-text {
    padding: 0 4px;
  }
  .modal-text h2 {
    font-size: 1.25rem;
    line-height: 1.3;
    text-align: left;
    margin: 0 0 8px 0;
  }
  .modal-text h2::after {
    width: 44px;
    margin: 8px 0 0 0;
  }
  .modal-institution {
    font-size: 0.95rem;
    line-height: 1.35;
    margin: 0 0 8px 0;
  }
  .modal-description {
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
    text-align: left;
  }
  .modal-image-container .modal-image {
    max-height: 300px;
  }

  #projectModal .modal-image-container .modal-image {
    max-height: 72vh;
  }

  .modal-close {
    top: -36px;
    right: 2px;
    width: 28px;
    height: 28px;
    font-size: 34px;
  }
}

@media (max-width: 480px) {
  .modal-close {
    top: -30px;
    right: 2px;
    width: 26px;
    height: 26px;
    font-size: 30px;
  }
}

/* Project modal responsive tuning */
@media (min-width: 768px) and (max-width: 1024px) {
  #projectModal .modal-shell {
    width: 96vw;
    max-width: 980px;
    max-height: 92vh;
  }

  #projectModal.project-modal-split .project-modal-image .modal-image-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  #projectModal.project-modal-split .project-modal-image .modal-image {
    max-height: 62vh;
  }

  #projectModal .project-modal-text {
    padding: 0 12px;
  }
}

@media (max-width: 767px) {
  #projectModal .modal-shell {
    width: 96vw;
    max-height: 92vh;
  }

  #projectModal.project-modal-split .project-modal-image .modal-image-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #projectModal.project-modal-split .project-modal-image .modal-image {
    max-height: 48vh;
  }

  #projectModal .project-modal-text {
    padding: 0 8px;
  }
}

/* Desktop: pack split screenshots tightly side-by-side with no center gap. */
@media (min-width: 1025px) {
  #projectModal.project-modal-split .project-modal-image .modal-image-wrapper {
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    gap: 0;
  }

  #projectModal.project-modal-split .project-modal-image .modal-image {
    width: auto;
    max-height: 74vh;
  }
}

/* --- Responsive Styles --- */
@media (max-width: 1200px) {
  .container {
    max-width: 98vw;
    padding: 0 10px;
  }
  .navbar-container {
    padding: 18px 20px 12px 20px;
  }
}

@media (max-width: 900px) {
  .section {
    padding: 70px 8px 40px 8px;
  }
  .hero-content {
    flex-direction: column;
    gap: 6px; /* tighter gap between photo and card */
    align-items: center;
    justify-content: flex-start;
  }
  .hero-image {
    --hero-avatar-size: 240px;
    flex: 0 0 auto;
    cursor: pointer;
    touch-action: manipulation;
  }
  /* Show profile photo above text on tablet/mobile */
  .hero-image {
    order: -1;
    margin-bottom: -8px; /* pull card slightly closer to photo */
  }
  .hero-info {
    flex: 0 1 auto;
    min-width: 0;
    align-items: center;
    justify-content: flex-start;
    max-width: 95vw;
    padding: 8px 24px 18px 24px; /* pull heading closer to the image */
    margin-top: 0;
  }
  .hero-name {
    margin-top: 0;
  }
  .hero-description {
    margin-top: 10px;
    text-align: justify;
  }
  .hero-name {
    text-align: center;
    white-space: normal;
    font-size: 2.2rem;
    display: block;
  }
  
  .typing-cursor::after {
    width: 3px;
    height: 0.85em;
  }
  .hero-role, .hero-greeting {
    text-align: center;
  }
  .hero-buttons {
    justify-content: center;
    width: 100%;
  }
  .education-item, .certification-item, .project-card {
    max-width: 98vw;
    padding: 18px 6px;
  }
  .education-item {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }
  .education-item .education-content {
    text-align: center;
  }
  .education-item h3,
  .education-item p {
    text-align: center;
  }

  .education-location {
    max-width: 100%;
  }
  .education-img {
    flex: 0 0 auto;
    max-width: 180px;
    width: 180px;
    height: 180px;
  }
  .award-card-img {
    height: 180px;
  }
  .award-images {
    flex-direction: column;
    gap: 16px;
  }
  .award-images .certificate-img {
    max-width: 95vw;
  }
  .online-certifications {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
}

/* Reduce extra vertical space for content-heavy sections on tablet & mobile */
@media (max-width: 1200px) {
  #skills.section,
  #education.section,
  #awards.section,
  #projects.section,
  #contact.section {
    min-height: auto;
  }
}

/* Make Skills section behave like normal flow (not vertically centered) on tablet/mobile */
@media (max-width: 900px) {
  #skills.section {
    padding: 80px 20px 50px 20px;
    margin-bottom: 0;
    min-height: 100vh;
    justify-content: center;
  }
  
  #skills h2 {
    margin: 0 0 18px 0;
  }
  
  .skills-description {
    margin-bottom: 25px;
    font-size: 1rem;
  }
  
  .skills-container {
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    max-width: 500px;
  }
  
  .skill-icon {
    width: 100%;
    max-width: 52px;
    height: 52px;
  }
  
  .section {
    margin-bottom: 16px;
  }
}

@media (max-width: 600px) {
  .navbar-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 6px 8px 6px;
  }
  .logo {
    display: none;
  }
  .nav-links {
    gap: 18px;
    font-size: 1rem;
  }
  h2 {
    font-size: 2rem;
    margin: 30px 0 18px 0;
  }
  .hero-image {
    --hero-avatar-size: 150px;
  }
  .hero-info {
    min-width: 0;
    max-width: 100vw;
    padding: 0 2vw;
  }
  .education-item, .certification-item, .project-card {
    padding: 10px 2px;
    font-size: 0.98rem;
  }
  .education-item {
    flex-direction: column;
    padding: 20px 12px;
  }
  .education-img {
    max-width: 150px;
    width: 150px;
    height: 150px;
  }
  .education-item h3 {
    font-size: 1.5rem;
  }
  .education-item p {
    font-size: 1rem;
  }
  .award-card-img {
    height: 150px;
  }
  .award-card-content h3 {
    font-size: 1.2rem;
  }
  .certificate-img, .award-images .certificate-img {
    max-width: 98vw;
  }
  .online-cert-badge {
    max-width: 98vw;
  }
}

.education-img {
  flex: 0 0 200px;
  max-width: 200px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(139,0,0,0.13);
  border: 2px solid #232323;
  background: #fff;
  object-fit: contain;
}

.site-footer {
  width: 100%;
  background: #111;
  color: #fff;
  padding: 32px 0 18px 0;
  text-align: center;
  border-top: 2px solid #2a2a2a;
  margin-top: 0;
}
.footer-container {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: #ccc;
}
.site-footer p {
  margin: 6px 0;
  color: #ccc;
}
.site-footer p:first-child {
  font-weight: bold;
  color: #fff;
}

.contact-subtitle {
  text-align: center;
  color: #aaa;
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.contact-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 32px;
  color: #fff;
}
.contact-card {
  background: #181818;
  border: 2px solid #444;
  border-radius: 28px;
  padding: 32px 32px 24px 32px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 48px;
  max-width: 520px;
  margin: 32px auto 0 auto;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}
.contact-section #contact .container, .contact-section .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.contact-card {
  justify-content: center;
}
.contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 1.15rem;
  color: #fff;
}
.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #111;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 1.3rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}
.contact-text {
  color: #fff;
  text-decoration: none;
  font-size: 1.13rem;
  font-weight: 500;
  transition: color 0.2s;
}
.contact-text:hover {
  color: #8b0000;
}
@media (max-width: 700px) {
  .contact-card {
    flex-direction: column;
    gap: 18px;
    padding: 18px 8px 12px 8px;
    max-width: 98vw;
  }
  .contact-title {
    font-size: 2rem;
  }
  .contact-item {
    font-size: 1.05rem;
  }
}

/* --- Smooth Transitions --- */
button, a, .project-card, .hero-btn, .hero-social-link {
  transition: all 0.2s;
}

/* Skills Section Styles */
#skills {
  background: linear-gradient(45deg, #1a1a1a, #0a0a0a);
}

#skills.section {
  padding: 90px 20px 60px 20px;
  margin-bottom: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#skills h2 {
  margin: 0 0 20px 0;
}

.skills-description {
  color: #ccc;
  font-size: 1.15rem;
  line-height: 1.7;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px auto;
  padding: 0 20px;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 0;
  justify-items: center;
  align-items: center;
}

/* Tablet & mobile: keep badges in one horizontal row (no wrap) */
@media (max-width: 1024px) {
  .skills-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
    width: 100%;
    max-width: 600px;
    padding: 0 20px;
    margin: 0 auto;
  }

  .skill-icon {
    width: 100%;
    max-width: 56px;
    height: 56px;
    margin: 0 auto;
  }
  
  .skill-card {
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

.skill-card {
  background: transparent;
  color: #fff;
  padding: 0;
  border: none;
  transition: all 0.3s ease;
  box-shadow: none;
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.skill-card:hover {
  transform: translateY(-4px);
}

.skill-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.skill-card:hover .skill-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 12px rgba(139, 0, 0, 0.6));
}

.skill-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  text-align: left;
}

.skill-badge {
  background: linear-gradient(120deg, #232323 60%, #181818 100%);
  color: #fff;
  padding: 16px 32px;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 600;
  border: 2px solid rgba(139, 0, 0, 0.3);
  transition: all 0.3s ease;
  box-shadow: 0 2px 12px rgba(139, 0, 0, 0.10);
  cursor: default;
}

.skill-badge:hover {
  border-color: #8b0000;
  transform: translateY(-4px);
  box-shadow: 0 4px 20px rgba(139, 0, 0, 0.25);
  background: linear-gradient(120deg, #2a2a2a 60%, #232323 100%);
}

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

.skill-category {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    text-align: center;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-name {
    font-weight: 500;
    color: #555;
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #67b26f);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* Responsive adjustments for skills section */
@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .skill-category {
        padding: 1rem;
    }
    
    .skill-card {
        padding: 0;
    }
    
    .skill-name {
        font-size: 1rem;
    }
    
    .skill-badge {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

/* =========================================================
   EXTRA RESPONSIVE FIXES (mobile + tablet only)
   Keeps desktop/PC design unchanged
   ========================================================= */

/* Tablet / iPad */
@media (min-width: 768px) and (max-width: 1024px) {
  .navbar-container {
    padding: 16px 24px 10px 24px;
  }

  .nav-links {
    gap: 22px;
  }

  /* Ensure active state is visible on tablet */
  .nav-links li a.active {
    color: #8b0000 !important;
  }

  .nav-links li a.active::after {
    width: 100% !important;
  }

  .hero-info {
    max-width: 560px;
  }

  .hero-name {
    font-size: 2.4rem;
    white-space: normal;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .navbar-container {
    align-items: center;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
  }

  /* Ensure active state is visible on mobile */
  .nav-links li a.active {
    color: #8b0000 !important;
  }

  .nav-links li a.active::after {
    width: 100% !important;
  }

  .hero-buttons {
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }

  .hero-social-link {
    width: 44px;
    height: 44px;
    padding: 6px;
  }

  .hero-social-link svg {
    width: 24px;
    height: 24px;
  }

  .hero-btn {
    white-space: nowrap;
    padding: 10px 18px;
    font-size: 1rem;
  }
}

/* Medium mobile / Small tablet (between mobile and tablet) */
@media (min-width: 601px) and (max-width: 767px) {
  /* Ensure active state is visible on medium devices */
  .nav-links li a.active {
    color: #8b0000 !important;
  }

  .nav-links li a.active::after {
    width: 100% !important;
  }
}

/* Small phones */
@media (max-width: 420px) {
  .navbar-container {
    padding: 12px 10px 8px 10px;
  }

  /* Ensure active state is visible on small phones */
  .nav-links li a.active {
    color: #8b0000 !important;
  }

  .nav-links li a.active::after {
    width: 100% !important;
  }

  .hero-info {
    padding: 24px 16px 18px 16px;
  }

  .hero-name {
    font-size: 2rem;
    display: block;
  }
  
  .typing-cursor::after {
    width: 2px;
    height: 0.8em;
  }

  /* Tighten vertical spacing for all sections on very small screens */
  .section {
    padding: 60px 10px 30px 10px;
  }
  
  #skills.section {
    padding: 70px 10px 40px 10px;
    min-height: 100vh;
    justify-content: center;
  }

  h2 {
    font-size: 2rem;
    margin: 20px 0 16px 0;
  }
  
  #skills h2 {
    margin: 0 0 15px 0;
    font-size: 1.8rem;
  }

  .skills-description {
    font-size: 0.95rem;
    margin-bottom: 22px;
    padding: 0 10px;
    line-height: 1.6;
  }
  
  .skills-container {
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    max-width: 400px;
    padding: 0 10px;
  }
  
  .skill-icon {
    width: 100%;
    max-width: 48px;
    height: 48px;
  }

  .education-item,
  .project-card,
  .award-card,
  .certification-card {
    margin-bottom: 20px;
    padding: 20px 10px;
  }

  .awards-grid {
    gap: 16px;
  }
}

/* Contact Section */