/* ==================== RESET & BASE STYLES ==================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

* {
  text-decoration: none;
  list-style: none;
  border: none;
  outline: none;
}

html {
  scroll-behavior: smooth;
  /* Fallback for browsers that don't support smooth scroll */
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Screen reader only class for accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus styles for accessibility */
*:focus-visible {
  outline: 2px solid var(--main-color);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Fallback for browsers without :focus-visible support */
*:focus:not(:focus-visible) {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--main-color);
  outline-offset: 2px;
}

/* ==================== CSS CUSTOM PROPERTIES ==================== */
:root {
  --bg-color: #071017;
  /* Navy black */
  --second-bg-color: #0f1f2d;
  /* Dark navy */
  --text-color: #e7ffe7;

  --main-color: #00e676;
  /* Emerald green */
  --main-color-hover: #00c765;
  /* Darker emerald */
  --accent-color: #5fd1a5;

  --dark-bg: #0c1a25;
  --gray-text: #cce0cc;
  --black-text: #000;

  --shadow-sm: 0 0 10px var(--main-color);
  --shadow-md: 0 0 15px rgba(0, 230, 118, 0.25);
  --shadow-lg: 0 0 20px var(--main-color);
  --shadow-xl: 0 0 25px var(--main-color);
  --shadow-md-hover: 0 0 20px rgba(0, 230, 118, 0.45);
  --shadow-xl-hover: 0 0 30px rgba(0, 230, 118, 0.55);

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
  /* Fallback for browsers without CSS custom properties */
  background-color: rgb(3, 0, 23);
}

body {
  background: var(--bg-color, rgb(3, 0, 23));
  color: var(--text-color);
  min-height: 100vh;
  line-height: 1.6;
}

#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  /* Allow clicks to pass through */
}

main {
  position: relative;
  z-index: 1;
}

section {
  min-height: 100vh;
  padding: 10rem 9% 2rem;
}

/* Mobile-first improvements */
@media (max-width: 768px) {
  section {
    padding: 8rem 5% 2rem;
    min-height: auto;
  }
}

@media (max-width: 426px) {
  section {
    padding: 7rem 4% 1.5rem;
  }
}

/* Header section code */

header {
  position: fixed;
  width: 100%;
  top: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 9%;
  background: rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  header {
    padding: 1.5rem 4%;
  }
}

@media (max-width: 426px) {
  header {
    padding: 1.2rem 3%;
  }
}

.logo {
  font-size: 3rem;
  font-weight: 800;
  cursor: pointer;

  background: linear-gradient(135deg, var(--main-color), var(--accent-color));
  background: -webkit-linear-gradient(135deg, var(--main-color), var(--accent-color));

  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--main-color);

  transition: transform var(--transition-base, 0.3s ease);
}

.logo:hover,
.logo:focus-visible {
  transform: scale(1.05);
}

.navbar {
  display: flex;
}

.navbar a {
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--text-color);
  margin-left: 4rem;
  transition: all var(--transition-base, 0.3s ease);
  border-bottom: 3px solid transparent;
  display: inline-block;
  position: relative;
}

.navbar a:hover,
.navbar a.active,
.navbar a:focus-visible {
  color: var(--main-color);
  border-bottom: 3px solid var(--main-color);
}

.navbar a:focus-visible {
  outline: 2px solid var(--main-color);
  outline-offset: 4px;
  border-radius: 4px;
}

.menu-toggle,
#menu-icon {
  font-size: 3.6rem;
  color: var(--main-color);
  cursor: pointer;
  display: none;
  background: transparent;
  border: none;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: transform var(--transition-base, 0.3s ease);
}

@media (max-width: 768px) {

  .menu-toggle,
  #menu-icon {
    display: flex;
    font-size: 3rem;
  }
}

.menu-toggle:hover,
#menu-icon:hover {
  transform: scale(1.1);
}

.menu-toggle:active,
#menu-icon:active {
  transform: scale(0.95);
}

.menu-toggle.bx-x i::before {
  content: '\ea5f';
  /* X icon */
}

.nav-btn {
  display: inline-block;
  padding: 1rem 2.8rem;
  background: transparent;
  color: var(--main-color);
  border: 2px solid var(--main-color);
  border-radius: 4rem;
  font-size: 1.6rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  background: var(--main-color);
  color: var(--text-color);
  box-shadow: var(--shadow-lg);
  transform: scale(1.05);
}

/* home section code*/

.home {
  display: flex;
  justify-content: center;
  align-items: center;
  /* background-color: var(--bg-color); Removed to show particles */
}

.name-highlight {
  color: var(--main-color);
}

.home-content h3 {
  font-size: 3.2rem;
  font-weight: 700;
}

@media (max-width: 768px) {
  .home-content h3 {
    font-size: 2.2rem;
  }
}

@media (max-width: 426px) {
  .home-content h3 {
    font-size: 1.8rem;
  }
}

.home-content h3:nth-of-type(2) {
  margin-bottom: 2rem;
}

/* Only make specific elements green, not all spans */
.multiple-text {
  color: var(--main-color);
}

.home-content h1 {
  font-size: 5.8rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .home-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    gap: 0.4rem;
  }
}

@media (max-width: 426px) {
  .home-content h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    gap: 0.3rem;
  }
}

/* "Hi, Myself" - smaller, lighter, on its own line */
.home-content h1 span:nth-of-type(2) {
  font-size: 0.5em;
  font-weight: 400;
  color: var(--text-color);
  opacity: 0.9;
  display: block;
  line-height: 1.2;
}

/* "Ramdarsh M S" - large, green, prominent */
.gradient-text {
  background: linear-gradient(135deg, var(--main-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.home-content h1 .name-highlight {
  font-size: 1em;
  font-weight: 700;
  display: block;
  line-height: 1.1;
  color: inherit;
  /* remove old solid green */
}


/* "I'm a" and changing text - on same line */
.home-content h1 span:nth-of-type(4) {
  font-size: 0.85em;
  font-weight: 600;
  color: var(--text-color);
  display: block;
  line-height: 1.2;
  margin-top: 0.3rem;
}

.home-content h1 .multiple-text {
  color: var(--main-color);
  font-weight: 700;
  display: inline;
}

/* Typed.js cursor styling - ensure it's inline with text */
.typed-cursor,
.typed-cursor.typed-cursor--blink {
  display: inline !important;
  color: var(--text-color) !important;
  font-weight: 700;
  font-size: 1.2em;
  margin-left: 4px;
  vertical-align: baseline;
  line-height: 1;
}

/* Fallback for different Typed.js versions */
.home-content h1 span:nth-of-type(4) .typed-cursor,
.home-content h1 .multiple-text+.typed-cursor {
  display: inline !important;
  color: var(--text-color) !important;
  font-size: 1.2em;
  margin-left: 4px;
}

@media (max-width: 768px) {
  .home-content h1 span:nth-of-type(2) {
    font-size: 0.55em;
  }

  .home-content h1 span:nth-of-type(4) {
    font-size: 0.9em;
  }
}

@media (max-width: 426px) {
  .home-content h1 span:nth-of-type(2) {
    font-size: 0.6em;
  }

  .home-content h1 span:nth-of-type(4) {
    font-size: 0.95em;
  }
}

.home-img img {
  width: 25vw;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 3px solid var(--main-color);
  border-radius: 51% 49% 48% 52% / 49% 49% 51% 51%;
  animation: borderAnimation 5s linear infinite;
}

@keyframes borderAnimation {
  0% {
    border-radius: 51% 49% 48% 52% / 49% 49% 51% 51%;
  }

  35% {
    border-radius: 60% 40% 57% 43% / 40% 54% 46% 60%;
  }

  65% {
    border-radius: 67% 33% 68% 32% / 27% 70% 30% 73%;
  }

  100% {
    border-radius: 51% 49% 48% 52% / 49% 49% 51% 51%;
  }
}

.home-content p {
  font-size: 1.6rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .home-content p {
    font-size: 1.4rem;
    margin: 1.5rem 0;
  }
}

@media (max-width: 426px) {
  .home-content p {
    font-size: 1.3rem;
    margin: 1.2rem 0;
  }
}

.social-media a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  border: 0.2rem solid var(--main-color);
  border-radius: 50%;
  font-size: 2rem;
  color: var(--main-color);
  margin: 3rem 1.5rem 3rem 0;
  transition: all var(--transition-base, 0.3s ease);
  text-decoration: none;
}

@media (max-width: 426px) {
  .social-media a {
    width: 3.5rem;
    height: 3.5rem;
    min-width: 44px;
    min-height: 44px;
    font-size: 1.8rem;
    margin: 2rem 1rem 2rem 0;
  }
}

.social-media a:hover,
.social-media a:focus-visible {
  transform: scale(1.2) translateY(-8px);
  background-color: var(--main-color);
  color: var(--text-color);
  box-shadow: var(--shadow-lg, 0 0 20px var(--main-color));
  outline: 2px solid var(--main-color);
  outline-offset: 2px;
}

/* Base Button Styles - Consolidated */
.btn {
  display: inline-block;
  padding: 1rem 2.8rem;
  min-height: 44px;
  background: var(--main-color);
  border-radius: 4rem;
  box-shadow: var(--shadow-md, 0 0 15px rgba(22, 255, 0, 0.2));
  font-size: 1.6rem;
  color: var(--bg-color, rgb(3, 0, 23));
  letter-spacing: 0.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-base, 0.3s ease);
  animation: glow 2s infinite alternate;
  cursor: pointer;
  border: 2px solid var(--main-color);
  font-family: inherit;
}

@media (max-width: 768px) {
  .btn {
    padding: 0.9rem 2.4rem;
    font-size: 1.5rem;
    min-height: 44px;
  }
}

@media (max-width: 426px) {
  .btn {
    padding: 0.85rem 2rem;
    font-size: 1.4rem;
    min-height: 44px;
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
}

.btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl, 0 0 25px var(--main-color));
  background: var(--main-color-hover);
}

.btn:focus-visible {
  outline: 2px solid var(--main-color);
  outline-offset: 3px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* About section code */

.about {
  /* background: var(--bg-color); Removed to show particles */
  position: relative;
  overflow: hidden;
}

.about-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  padding: 2rem 0;
}

/* About Image with Enhanced Styling */
.about-img {
  position: relative;
  flex: 0 0 40%;
}

.img-wrapper {
  position: relative;
  width: 25vw;
  margin: 0 auto;
}

.about-img img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 3px solid var(--main-color);
  border-radius: 51% 49% 48% 52% / 49% 49% 51% 51%;
  animation: borderAnimation 5s linear infinite;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 2;
}

.about-img:hover img {
  transform: scale(1.05);
}

.img-border {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 2px solid var(--main-color);
  border-radius: 51% 49% 48% 52% / 49% 49% 51% 51%;
  animation: borderAnimation 5s linear infinite;
  opacity: 0.3;
  z-index: 1;
}

/* Stats Cards */
.stats-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.stat-card {
  background: var(--dark-bg);
  border: 2px solid var(--main-color);
  border-radius: 15px;
  padding: 1.5rem 2rem;
  text-align: center;
  min-width: 120px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--main-color-hover);
}

.stat-icon {
  font-size: 2.5rem;
  color: var(--main-color);
  margin-bottom: 0.5rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-color);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 1.2rem;
  color: var(--gray-text);
}

.heading {
  text-align: center;
  font-size: 4.5rem;
}

@media (max-width: 768px) {
  .heading {
    font-size: 3.5rem;
    margin-bottom: 2rem;
  }
}

@media (max-width: 426px) {
  .heading {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
  }
}

.about-content {
  flex: 1;
  padding: 0 2rem;
  max-width: 600px;
}

.about-content h2 {
  text-align: left;
  line-height: 1.2;
}

.about-content h3 {
  font-size: 2.6rem;
  margin-bottom: 2rem;
}

.about-content h3 span {
  color: var(--main-color);
}

.about-content p {
  font-size: 1.6rem;
  margin: 2rem 0 3rem;
  line-height: 1.8;
}

/* Skills Section */
.skills-section {
  margin: 3rem 0;
}

.skills-section h4 {
  font-size: 2rem;
  color: var(--main-color);
  margin-bottom: 2rem;
  font-weight: 600;
}

.skill-item {
  margin-bottom: 2rem;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.skill-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
}

.skill-percentage {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--main-color);
}

.skill-bar {
  width: 100%;
  height: 12px;
  background: var(--dark-bg);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(22, 255, 0, 0.2);
  position: relative;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--main-color), var(--main-color-hover));
  border-radius: 10px;
  width: 0%;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.skill-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* Read More Slide Animation */
.extra-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.8s ease, opacity 0.6s ease, margin 0.8s ease;
  opacity: 0;
  margin: 0;
}

.extra-content.show {
  max-height: 600px;
  opacity: 1;
  margin: 2rem 0;
}

/* Technology Showcase */
.tech-showcase {
  margin-top: 5rem;
  padding: 3rem 0;
  border-top: 2px solid rgba(22, 255, 0, 0.1);
}

.tech-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--main-color);
  margin-bottom: 3rem;
  font-weight: 600;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.tech-item {
  background: var(--dark-bg);
  border: 2px solid var(--main-color);
  border-radius: 15px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.tech-item:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: var(--shadow-xl);
  border-color: var(--main-color-hover);
  background: rgba(22, 255, 0, 0.05);
}

.tech-item i {
  font-size: 3.5rem;
  color: var(--main-color);
  transition: all 0.3s ease;
}

.tech-item:hover i {
  transform: scale(1.2) rotate(5deg);
  color: var(--main-color-hover);
}

.tech-item span {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-color);
}

/* Scroll Animation Classes */
[data-aos] {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
  opacity: 1;
}

[data-aos="fade-right"] {
  transform: translateX(-50px);
}

[data-aos="fade-right"].aos-animate {
  transform: translateX(0);
}

[data-aos="fade-left"] {
  transform: translateX(50px);
}

[data-aos="fade-left"].aos-animate {
  transform: translateX(0);
}

[data-aos="fade-up"] {
  transform: translateY(50px);
}

[data-aos="fade-up"].aos-animate {
  transform: translateY(0);
}

@keyframes glow {
  0% {
    box-shadow: var(--shadow-sm);
  }

  50% {
    box-shadow: var(--shadow-xl);
  }

  100% {
    box-shadow: var(--shadow-sm);
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }

  .img-wrapper {
    width: 60vw;
  }

  .about-img img {
    width: 100%;
    margin-bottom: 2rem;
  }

  .stats-container {
    gap: 1rem;
  }

  .stat-card {
    min-width: 100px;
    padding: 1.2rem 1.5rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .about-content {
    padding: 0 1rem;
    max-width: 100%;
  }

  .about-content h2 {
    text-align: center;
    font-size: 3rem;
  }

  .about-content h3 {
    font-size: 2rem;
    text-align: center;
  }

  .about-content p {
    font-size: 1.4rem;
    text-align: left;
  }

  .skills-section h4 {
    text-align: center;
    font-size: 1.8rem;
  }

  .tech-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
  }

  .tech-item {
    padding: 1.5rem 1rem;
  }

  .tech-item i {
    font-size: 3rem;
  }

  .tech-item span {
    font-size: 1.2rem;
  }

  .btn {
    font-size: 1.4rem;
    padding: 10px 22px;
  }
}


/* ScrollBar Design */
::-webkit-scrollbar {
  width: 15px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color, rgb(3, 0, 23));
}

::-webkit-scrollbar-thumb {
  background-color: var(--main-color);
  border-radius: 10px;
  border: 2px solid var(--bg-color, rgb(3, 0, 23));
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--main-color-hover);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--main-color) var(--bg-color, rgb(3, 0, 23));
}

/* portfolio section code */



.portfolio .heading span,
.certifications .heading span,
.contact .heading span {
  color: var(--main-color);
}

.portfolio-subtitle {
  text-align: center;
  font-size: 1.8rem;
  color: var(--gray-text);
  margin-top: 1rem;
  margin-bottom: 4rem;
}

/* Portfolio Wrapper */
.portfolio-wrapper {
  position: relative;
  margin-top: 4.2rem;
  padding: 0 6rem;
}

/* Portfolio Container */
.portfolio-container {
  overflow: hidden;
  width: 100%;
  position: relative;
}

/* Portfolio Content - Slider */
.portfolio-content {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 3rem;
  padding: 2rem 0;
}

/* Navigation Buttons */
.portfolio-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: var(--main-color);
  color: var(--bg-color);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.portfolio-nav-btn:hover {
  background: var(--main-color-hover);
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-xl);
}

.portfolio-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.portfolio-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.portfolio-prev {
  left: 0;
}

.portfolio-next {
  right: 0;
}

/* Hide navigation buttons on mobile */
@media (max-width: 768px) {
  .portfolio-nav-btn {
    display: none;
  }

  .portfolio-wrapper {
    padding: 0 2rem;
    margin: 0 auto;
  }

  .portfolio-container {
    padding: 0 0.5rem;
  }

  .portfolio-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Pagination Dots */
.portfolio-pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pagination-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gray-text, #ccc);
  border: 2px solid var(--gray-text, #ccc);
  cursor: pointer;
  transition: all var(--transition-base, 0.3s ease);
  padding: 0;
  margin: 0;
  display: inline-block;
}

.pagination-dot:focus-visible {
  outline: 2px solid var(--main-color);
  outline-offset: 2px;
}

.pagination-dot.active {
  background: var(--main-color);
  border-color: var(--main-color);
  transform: scale(1.2);
  box-shadow: 0 0 10px var(--main-color);
}

.pagination-dot:hover {
  background: var(--main-color);
  border-color: var(--main-color);
  transform: scale(1.1);
}

/* Portfolio Box */
.portfolio-box {
  background: var(--second-bg-color);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid transparent;
  transition: all 0.4s ease;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 0 0 calc(33.333% - 2rem);
  min-width: 320px;
}

.portfolio-box:hover {
  border: 1px solid var(--main-color);
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

/* Portfolio Image Container */
.portfolio-img {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: var(--dark-bg);
}

.portfolio-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.portfolio-box:hover .portfolio-img img {
  transform: scale(1.1);
}

/* Portfolio Overlay */
.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 0, 23, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(5px);
}

.portfolio-box:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-links {
  display: flex;
  gap: 2rem;
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--main-color);
  color: var(--bg-color);
  border-radius: 50%;
  font-size: 2.4rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.portfolio-link:hover {
  background: var(--main-color-hover);
  transform: scale(1.1) rotate(5deg);
  box-shadow: var(--shadow-lg);
}

/* Portfolio Info */
.portfolio-info {
  padding: 2.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.portfolio-info h3 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.portfolio-info p {
  font-size: 1.5rem;
  color: var(--gray-text);
  line-height: 1.6;
  margin-bottom: 2rem;
  flex-grow: 1;
}

/* Technology Tags */
.portfolio-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: auto;
}

.tech-tag {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: rgba(22, 255, 0, 0.1);
  color: var(--main-color);
  border: 1px solid var(--main-color);
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tech-tag:hover {
  background: var(--main-color);
  color: var(--bg-color);
  transform: translateY(-2px);
}

/* Certifications Section */
.certifications {
  /* background: var(--bg-color); Removed to show particles */
  padding: 6rem 9% 8rem;
  text-align: center;
}

.certifications .heading {
  margin-bottom: 3rem;
}

/* Certifications Wrapper */
.cert-wrapper {
  position: relative;
  padding: 0 6rem;
}

/* Certifications Container Slider */
.cert-container-slider {
  overflow: hidden;
  width: 100%;
  position: relative;
}

/* Certifications Container - Slider */
.cert-container {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 2.5rem;
  padding: 2rem 0;
}

/* Navigation Buttons for Certifications */
.cert-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: var(--main-color);
  color: var(--bg-color);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.cert-nav-btn:hover {
  background: var(--main-color-hover);
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-xl);
}

.cert-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.cert-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.cert-prev {
  left: 0;
}

.cert-next {
  right: 0;
}

/* Hide navigation buttons on mobile */
@media (max-width: 768px) {
  .cert-nav-btn {
    display: none;
  }

  .cert-wrapper {
    padding: 0 2rem;
    margin: 0 auto;
  }

  .cert-container-slider {
    padding: 0 0.5rem;
  }

  .cert-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Pagination Dots for Certifications */
.cert-pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.cert-pagination-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gray-text, #ccc);
  border: 2px solid var(--gray-text, #ccc);
  cursor: pointer;
  transition: all var(--transition-base, 0.3s ease);
  padding: 0;
  margin: 0;
  display: inline-block;
}

.cert-pagination-dot:focus-visible {
  outline: 2px solid var(--main-color);
  outline-offset: 2px;
}

.cert-pagination-dot.active {
  background: var(--main-color);
  border-color: var(--main-color);
  transform: scale(1.2);
  box-shadow: 0 0 10px var(--main-color);
}

.cert-pagination-dot:hover {
  background: var(--main-color);
  border-color: var(--main-color);
  transform: scale(1.1);
}

.cert-box {
  background: var(--dark-bg);
  border: 2px solid var(--main-color);
  border-radius: 20px;
  overflow: hidden;
  transition: 0.4s ease;
  box-shadow: var(--shadow-md);
  flex: 0 0 calc(33.333% - 1.67rem);
  min-width: 280px;
}

.cert-box:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.cert-box img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 2px solid var(--main-color);
}

.cert-box h3 {
  font-size: 2rem;
  color: var(--main-color);
  margin: 1rem 0 0.5rem;
}

.cert-box p {
  font-size: 1.5rem;
  color: var(--gray-text);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  padding: 0 1rem;
}

@media (max-width: 768px) {
  .certifications .heading {
    font-size: 3rem;
  }

  .cert-wrapper {
    padding: 0 1.5rem;
  }

  .cert-container-slider {
    padding: 0;
    margin: 0;
  }

  .cert-container {
    gap: 1.5rem;
    padding: 2rem 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .cert-box {
    flex: 0 0 calc(100% - 2rem);
    min-width: calc(100% - 2rem);
    max-width: calc(100% - 2rem);
    scroll-snap-align: center;
  }

  .cert-box img {
    height: 180px;
  }

  .cert-box h3 {
    font-size: 1.8rem;
  }

  .cert-box p {
    font-size: 1.4rem;
  }
}

@media (max-width: 426px) {
  .cert-wrapper {
    padding: 0 1rem;
  }

  .cert-container-slider {
    padding: 0;
  }

  .cert-container {
    gap: 1.5rem;
    padding: 1.5rem 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .cert-box {
    flex: 0 0 calc(100% - 2rem);
    min-width: calc(100% - 2rem);
    max-width: calc(100% - 2rem);
    scroll-snap-align: center;
  }
}

/* Add spacing below button and extra space for certificate section */
.cert-box .btn {
  display: inline-block;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

/* ================= CONTACT SECTION ================= */

/* General Layout */
.contact {
  /* background: var(--bg-color); Removed to show particles */
  padding: 6rem 9% 4rem;
  color: var(--text-color);
  text-align: center;
}

.contact .heading {
  margin-bottom: 3rem;
  position: relative;
}

/* ===== Contact Container ===== */
.contact-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 3rem;
  margin: 3rem auto 0;
  max-width: 1200px;
}

/* ===== Responsive Fix for Mobile View ===== */
@media (max-width: 768px) {
  .contact {
    padding: 5rem 3% 3rem;
  }

  .contact .heading {
    font-size: 3.5rem;
    margin-bottom: 2rem;
  }

  .contact-container {
    flex-direction: column;
    align-items: stretch;
    gap: 2rem;
    margin-top: 2rem;
  }

  /* Info box */
  .contact-info {
    width: 100%;
    text-align: center;
    align-items: center;
    padding: 2rem 1.5rem;
  }

  .contact-info p {
    justify-content: center;
  }

  /* Form box */
  .contact form {
    width: 100%;
    padding: 2rem 1.5rem;
  }

  .contact form .input-box {
    flex-direction: column;
    gap: 1rem;
  }

  .contact form input,
  .contact form textarea {
    width: 100%;
  }

  .contact form .btn {
    align-self: center;
    margin-top: 1rem;
    width: 100%;
    max-width: 250px;
  }
}

/* ===== Left Side – Info Box ===== */
.contact-info {
  flex: 1 1 380px;
  background: var(--second-bg-color);
  color: var(--text-color);
  padding: 3rem 2.5rem;
  border: 2px solid var(--main-color);
  border-radius: 25px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.8rem;
  text-align: left;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.contact-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--main-color), var(--main-color-hover));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.contact-info:hover::before {
  transform: scaleX(1);
}

.contact-info:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-10px);
}

.contact-info h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--main-color);
  position: relative;
  padding-bottom: 1rem;
}

.contact-info h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--main-color);
  border-radius: 2px;
}

.contact-info p {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--transition-base, 0.3s ease);
  padding: 0.8rem;
  border-radius: 10px;
  margin: 0;
}

.contact-info a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base, 0.3s ease);
}

.contact-info a:hover,
.contact-info a:focus-visible {
  color: var(--main-color);
  text-decoration: underline;
  outline: 2px solid var(--main-color);
  outline-offset: 2px;
  border-radius: 2px;
}

.contact-info p:hover {
  background: rgba(22, 255, 0, 0.05);
  transform: translateX(5px);
}

.contact-info p i {
  color: var(--main-color);
  font-size: 1.5rem;
  min-width: 24px;
  transition: all 0.3s ease;
}

.contact-info p:hover i {
  text-shadow: 0 0 15px var(--main-color);
  transform: scale(1.15);
}

/* ===== Right Side – Form Box ===== */
.contact form {
  flex: 1 1 500px;
  background: var(--second-bg-color);
  padding: 3rem 2.5rem;
  border-radius: 25px;
  border: 2px solid var(--main-color);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.contact form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--main-color), var(--main-color-hover));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.contact form:hover::before {
  transform: scaleX(1);
}

.contact form:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-10px);
}

/* Input Fields */
.contact form .input-box {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.contact form input,
.contact form textarea {
  flex: 1;
  background: var(--bg-color, rgb(3, 0, 23));
  border: 2px solid var(--main-color);
  border-radius: 12px;
  color: var(--text-color, #fff);
  padding: 1rem 1.2rem;
  font-size: 1.1rem;
  transition: all var(--transition-base, 0.3s ease);
  font-family: inherit;
  width: 100%;
  min-height: 44px;
  -webkit-appearance: none;
  appearance: none;
}

@media (max-width: 426px) {

  .contact form input,
  .contact form textarea {
    font-size: 1rem;
    padding: 0.9rem 1rem;
  }

  .contact form textarea {
    min-height: 120px;
  }
}

.contact form input:invalid:not(:placeholder-shown),
.contact form textarea:invalid:not(:placeholder-shown) {
  border-color: #ff4444;
}

.contact form input:valid:not(:placeholder-shown),
.contact form textarea:valid:not(:placeholder-shown) {
  border-color: var(--main-color);
}

.contact form input::placeholder,
.contact form textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.contact form textarea {
  resize: vertical;
  min-height: 160px;
  max-height: 300px;
}

/* Focus & Hover Glow */
.contact form input:hover,
.contact form textarea:hover {
  border-color: var(--main-color-hover);
  box-shadow: var(--shadow-md);
}

.contact form input:focus,
.contact form textarea:focus {
  outline: none;
  border-color: var(--main-color);
  box-shadow: var(--shadow-md-hover);
  transform: translateY(-2px);
}

/* ===== Submit Button ===== */
.contact form .btn {
  align-self: center;
  background: var(--main-color);
  color: var(--bg-color);
  padding: 1rem 3rem;
  border: 2px solid var(--main-color);
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
  width: fit-content;
  min-width: 200px;
  margin-top: 0.5rem;
  position: relative;
  overflow: hidden;
}

.contact form .btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.contact form .btn:hover::before {
  width: 300px;
  height: 300px;
}

.contact form .btn:hover {
  box-shadow: var(--shadow-xl-hover);
  transform: translateY(-3px) scale(1.05);
  background: var(--main-color-hover);
  border-color: var(--main-color-hover);
}

.contact form .btn:active {
  transform: translateY(-1px) scale(1.02);
}

/* Contact section bottom padding - merged with base .contact above */

/* ===== Popup Styling ===== */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 0, 23, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  /* Safari support */
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.popup[aria-hidden="true"] {
  display: none;
}

.popup[aria-hidden="false"] {
  display: flex;
}

.popup-content {
  background: var(--second-bg-color);
  color: var(--text-color);
  padding: 25px 35px;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--main-color);
  animation: popupFade 0.3s ease-in-out;
}

@keyframes popupFade {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.popup-content .btn {
  margin-top: 15px;
  display: inline-block;
  background: var(--main-color);
  color: var(--bg-color);
  border: none;
  cursor: pointer;
  font-weight: bold;
  border-radius: 25px;
  padding: 8px 22px;
  transition: 0.3s ease;
  font-size: 1rem;
}

.popup-content .btn:hover {
  background: var(--main-color-hover);
  transform: scale(1.05);
}

/* Fade-out animation for popup */
.popup.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* Footer Section code */

.footer {
  position: relative;
  bottom: 0;
  width: 100%;
  padding: 40px 0;
  /* background: var(--bg-color); Removed to show particles */
}

.footer .social {
  text-align: center;
  padding-bottom: 25px;
  color: var(--main-color);
}

.footer .social a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background: transparent;
  border: 0.2rem solid var(--main-color);
  border-radius: 50%;
  font-size: 2rem;
  color: var(--main-color);
  margin: 3rem 1.5rem 3rem 0;
  transition: all var(--transition-base, 0.3s ease);
  text-decoration: none;
}

.footer .social a:hover,
.footer .social a:focus-visible {
  transform: scale(1.2) translateY(-8px);
  background: var(--main-color);
  color: var(--text-color, #fff);
  box-shadow: var(--shadow-lg, 0 0 20px var(--main-color));
  outline: 2px solid var(--main-color);
  outline-offset: 2px;
}

.footer .copyright {
  margin-top: 20px;
  text-align: center;
  font-size: 16px;
  color: var(--text-color);
}

/* Responsive Design code */

@media (max-width: 1285px) {
  html {
    font-size: 55%;
  }
}

@media (max-width: 991px) {
  header {
    padding: 2rem 3%;
  }

  section {
    padding: 10rem 3% 2rem;
  }

  .footer {
    padding: 2rem 3%;
  }
}

@media (max-width: 768px) {

  /* Hide Contact Me button in header on mobile (already in menu) */
  .top-btn {
    display: none;
  }

  .navbar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    max-width: 85vw;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.98);
    transition: right var(--transition-base, 0.3s ease);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999;
    padding-top: 7rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .navbar.active {
    right: 0;
  }

  /* Overlay when menu is open */
  .navbar.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
  }

  .navbar a {
    display: block;
    padding: 1.5rem 2rem;
    min-height: 44px;
    font-size: 1.8rem;
    margin-left: 0;
    border-bottom: 1px solid rgba(22, 255, 0, 0.1);
    transition: background-color var(--transition-base, 0.3s ease);
  }

  .navbar a:hover,
  .navbar a:focus-visible {
    background: rgba(22, 255, 0, 0.1);
  }

  .navbar a:last-child {
    border-bottom: none;
  }

  .home {
    flex-direction: column;
    gap: 2rem;
  }

  .home-content {
    order: 2;
    text-align: center;
    width: 100%;
  }

  .home-img img,
  .about-img img {
    width: 60vw;
    max-width: 300px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin: 2rem auto;
  }

  .img-wrapper {
    width: 60vw;
    max-width: 300px;
    aspect-ratio: 1 / 1;
  }

  .about {
    flex-direction: column;
  }

  .about-container {
    flex-direction: column;
    gap: 2rem;
  }

  .contact form .input-box {
    flex-direction: column;
    gap: 1rem;
  }

  .contact form .input-box input {
    width: 100%;
  }

  /* Portfolio slider adjustments for mobile */
  .portfolio-wrapper {
    padding: 0 1.5rem;
  }

  .portfolio-container {
    padding: 0;
    margin: 0;
  }

  .portfolio-content {
    gap: 1.5rem;
    padding: 2rem 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .portfolio-box {
    flex: 0 0 calc(100% - 2rem);
    min-width: calc(100% - 2rem);
    max-width: calc(100% - 2rem);
    scroll-snap-align: center;
  }

  .portfolio-subtitle {
    font-size: 1.4rem;
    padding: 0 1rem;
    margin-bottom: 2rem;
  }

  .portfolio-img {
    height: 200px;
  }

  .portfolio-info {
    padding: 1.5rem;
  }

  .portfolio-info h3 {
    font-size: 1.8rem;
  }

  .portfolio-info p {
    font-size: 1.3rem;
  }
}

@media (max-width: 617px) {
  .home-content h1 {
    font-size: 3rem;
  }

  .home-content h3 {
    font-size: 2rem;
  }

  .home-img img {
    width: 65vw;
    max-width: 280px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-top: 2rem;
  }

  .img-wrapper {
    width: 65vw;
    max-width: 280px;
    aspect-ratio: 1 / 1;
  }

  .about-img img {
    width: 65vw;
    max-width: 280px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-top: 2rem;
  }
}

@media (max-width: 426px) {

  /* Adjust logo size for very small screens */
  .logo {
    font-size: 2rem;
  }

  .home-img img,
  .about-img img {
    width: 70vw;
    max-width: 250px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }

  .img-wrapper {
    width: 70vw;
    max-width: 250px;
    aspect-ratio: 1 / 1;
  }

  .portfolio-wrapper {
    padding: 0 1rem;
  }

  .portfolio-container {
    padding: 0;
  }

  .portfolio-content {
    gap: 1.5rem;
    padding: 1.5rem 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .portfolio-box {
    flex: 0 0 calc(100% - 2rem);
    min-width: calc(100% - 2rem);
    max-width: calc(100% - 2rem);
    scroll-snap-align: center;
  }

  .portfolio-subtitle {
    font-size: 1.2rem;
    padding: 0 0.5rem;
    line-height: 1.5;
  }

  .portfolio-img {
    height: 180px;
  }

  .portfolio-info {
    padding: 1.2rem;
  }

  .portfolio-info h3 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
  }

  .portfolio-info p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  .tech-tag {
    font-size: 1rem;
    padding: 0.4rem 0.9rem;
  }

  /* Contact form improvements */
  .contact-container {
    gap: 1.5rem;
  }

  .contact-info,
  .contact form {
    padding: 2rem 1.5rem;
  }

  .contact form input,
  .contact form textarea {
    font-size: 1rem;
    padding: 0.9rem 1rem;
  }

  /* Stats cards */
  .stats-container {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .stat-card {
    min-width: 100px;
    padding: 1rem 1.2rem;
    flex: 1 1 calc(33.333% - 1rem);
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 1.1rem;
  }

  /* Skills section */
  .skill-item {
    margin-bottom: 1.5rem;
  }

  .skill-name {
    font-size: 1.3rem;
  }

  .skill-percentage {
    font-size: 1.2rem;
  }

  /* Tech grid */
  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .tech-item {
    padding: 1.2rem 1rem;
  }

  .tech-item i {
    font-size: 2.5rem;
  }

  .tech-item span {
    font-size: 1.1rem;
  }

  /* Certifications */
  .cert-box {
    min-width: 100%;
  }

  .cert-box img {
    height: 160px;
  }

  .cert-box h3 {
    font-size: 1.6rem;
  }

  .cert-box p {
    font-size: 1.2rem;
  }

  /* Footer */
  .footer .social a {
    width: 3.5rem;
    height: 3.5rem;
    min-width: 44px;
    min-height: 44px;
    font-size: 1.8rem;
    margin: 2rem 1rem 2rem 0;
  }

  .footer .copyright {
    font-size: 1.4rem;
    padding: 0 1rem;
  }

  /* Popup */
  .popup-content {
    padding: 2rem 1.5rem;
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }

  .popup-content h3 {
    font-size: 1.8rem;
  }

  .popup-content p {
    font-size: 1.2rem;
  }
}