@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

/* Root Variables */
:root {
  --bg-color: #1f242d;
  --second-bg-color: #323946;
  --text-color: #fff;
  --main-color: #0ef;
  --shadow-color: rgba(0, 0, 0, 0.2);
  --transition: all 0.25s ease;
  --border-radius: 0.8rem;
  --subtle-glow: rgba(0, 238, 255, 0.08);
  /* Added better contrast colors for dark mode */
  --text-secondary: rgba(255, 255, 255, 0.8);
  --text-muted: rgba(255, 255, 255, 0.6);
}

/* Light Mode Variables */
body.light-mode {
  --bg-color: #f8f9fa;
  --second-bg-color: #ffffff;
  --text-color: #2c3e50;
  --main-color: #3498db;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --subtle-glow: rgba(52, 152, 219, 0.08);
  /* Added better contrast colors for light mode */
  --text-secondary: rgba(44, 62, 80, 0.8);
  --text-muted: rgba(44, 62, 80, 0.6);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
  font-family: "Poppins", sans-serif;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
}

section {
  min-height: 100vh;
  padding: 8rem 9% 2rem;
  position: relative;
  overflow: hidden;
}

/* Section Background Patterns */
.home::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%, rgba(0, 238, 255, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 238, 255, 0.05) 0%, transparent 50%),
    linear-gradient(135deg, transparent 0%, rgba(0, 238, 255, 0.02) 50%, transparent 100%);
  z-index: -1;
}

.about::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
      45deg,
      rgba(0, 238, 255, 0.02) 0%,
      transparent 25%,
      rgba(0, 238, 255, 0.02) 50%,
      transparent 75%,
      rgba(0, 238, 255, 0.02) 100%
    ), radial-gradient(ellipse at center, rgba(0, 238, 255, 0.03) 0%, transparent 70%);
  z-index: -1;
}

.education::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
      90deg,
      transparent,
      transparent 100px,
      rgba(0, 238, 255, 0.01) 100px,
      rgba(0, 238, 255, 0.01) 101px
    ), radial-gradient(circle at 30% 70%, rgba(0, 238, 255, 0.02) 0%, transparent 50%);
  z-index: -1;
}

.experience::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
      135deg,
      rgba(0, 238, 255, 0.02) 0%,
      transparent 30%,
      rgba(0, 238, 255, 0.03) 70%,
      transparent 100%
    ), radial-gradient(circle at 70% 30%, rgba(0, 238, 255, 0.02) 0%, transparent 60%);
  z-index: -1;
}

.skills::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: conic-gradient(
      from 0deg at 50% 50%,
      transparent 0deg,
      rgba(0, 238, 255, 0.02) 60deg,
      transparent 120deg,
      rgba(0, 238, 255, 0.02) 180deg,
      transparent 240deg,
      rgba(0, 238, 255, 0.02) 300deg,
      transparent 360deg
    ), radial-gradient(ellipse at 50% 50%, rgba(0, 238, 255, 0.01) 0%, transparent 70%);
  z-index: -1;
}

.services::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
      60deg,
      rgba(0, 238, 255, 0.02) 0%,
      transparent 40%,
      rgba(0, 238, 255, 0.03) 80%,
      transparent 100%
    ), radial-gradient(circle at 80% 80%, rgba(0, 238, 255, 0.02) 0%, transparent 50%);
  z-index: -1;
}

.portfolio::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
      45deg,
      transparent 0%,
      rgba(0, 238, 255, 0.02) 25%,
      transparent 50%,
      rgba(0, 238, 255, 0.02) 75%,
      transparent 100%
    ), radial-gradient(circle at 20% 20%, rgba(0, 238, 255, 0.03) 0%, transparent 50%);
  z-index: -1;
}

.contact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 238, 255, 0.03) 0%, transparent 50%),
    linear-gradient(180deg, rgba(0, 238, 255, 0.01) 0%, transparent 50%, rgba(0, 238, 255, 0.02) 100%);
  z-index: -1;
}

/* Enhanced Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1f26 0%, #1f242d 50%, #242933 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  overflow: hidden;
}

.loading-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* Loading Container */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Animated Background Particles */
.loading-screen::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(2px 2px at 20px 30px, rgba(0, 238, 255, 0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(0, 238, 255, 0.2), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(0, 238, 255, 0.4), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(0, 238, 255, 0.2), transparent),
    radial-gradient(2px 2px at 160px 30px, rgba(0, 238, 255, 0.3), transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: particleFloat 20s linear infinite;
  opacity: 0.6;
}

@keyframes particleFloat {
  0% {
    transform: translateY(0px) translateX(0px);
  }
  33% {
    transform: translateY(-100px) translateX(100px);
  }
  66% {
    transform: translateY(-200px) translateX(-50px);
  }
  100% {
    transform: translateY(-300px) translateX(0px);
  }
}

/* Main Logo Animation */
.loading-logo {
  position: relative;
  margin-bottom: 3rem;
  z-index: 2;
}

.logo-text {
  font-size: 4rem;
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: 0.2rem;
  position: relative;
  animation: logoGlow 2s ease-in-out infinite alternate;
}

.logo-text .highlight {
  color: var(--main-color);
  text-shadow: 0 0 20px rgba(0, 238, 255, 0.5);
}

@keyframes logoGlow {
  0% {
    text-shadow: 0 0 10px rgba(0, 238, 255, 0.3);
    transform: scale(1);
  }
  100% {
    text-shadow: 0 0 25px rgba(0, 238, 255, 0.6), 0 0 35px rgba(0, 238, 255, 0.4);
    transform: scale(1.02);
  }
}

/* Geometric Loading Animation */
.loading-animation {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 3rem;
}

.loading-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
  animation: rotate 2s linear infinite;
}

.loading-ring:nth-child(1) {
  width: 120px;
  height: 120px;
  border-top: 2px solid var(--main-color);
  border-right: 2px solid rgba(0, 238, 255, 0.3);
  animation-duration: 2s;
}

.loading-ring:nth-child(2) {
  width: 90px;
  height: 90px;
  top: 15px;
  left: 15px;
  border-top: 2px solid rgba(0, 238, 255, 0.7);
  border-left: 2px solid rgba(0, 238, 255, 0.2);
  animation-duration: 1.5s;
  animation-direction: reverse;
}

.loading-ring:nth-child(3) {
  width: 60px;
  height: 60px;
  top: 30px;
  left: 30px;
  border-top: 2px solid var(--main-color);
  border-bottom: 2px solid rgba(0, 238, 255, 0.4);
  animation-duration: 1s;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Data Visualization Loading Effect */
.data-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 40px;
  margin-bottom: 2rem;
}

.data-bar {
  width: 4px;
  background: linear-gradient(to top, var(--main-color), rgba(0, 238, 255, 0.3));
  border-radius: 2px;
  animation: dataWave 1.5s ease-in-out infinite;
}

.data-bar:nth-child(1) {
  animation-delay: 0s;
}
.data-bar:nth-child(2) {
  animation-delay: 0.1s;
}
.data-bar:nth-child(3) {
  animation-delay: 0.2s;
}
.data-bar:nth-child(4) {
  animation-delay: 0.3s;
}
.data-bar:nth-child(5) {
  animation-delay: 0.4s;
}
.data-bar:nth-child(6) {
  animation-delay: 0.3s;
}
.data-bar:nth-child(7) {
  animation-delay: 0.2s;
}
.data-bar:nth-child(8) {
  animation-delay: 0.1s;
}

@keyframes dataWave {
  0%,
  100% {
    height: 8px;
    opacity: 0.4;
  }
  50% {
    height: 35px;
    opacity: 1;
    box-shadow: 0 0 15px rgba(0, 238, 255, 0.4);
  }
}

/* Loading Text */
.loading-text {
  font-size: 1.6rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  animation: textFade 2s ease-in-out infinite;
  letter-spacing: 0.1rem;
}

@keyframes textFade {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* Progress Bar */
.loading-progress {
  width: 200px;
  height: 3px;
  background: rgba(0, 238, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--main-color), rgba(0, 238, 255, 0.6), var(--main-color));
  border-radius: 2px;
  animation: progressFill 3s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(0, 238, 255, 0.5);
}

@keyframes progressFill {
  0% {
    width: 0%;
    transform: translateX(-100%);
  }
  50% {
    width: 100%;
    transform: translateX(0%);
  }
  100% {
    width: 100%;
    transform: translateX(100%);
  }
}

/* Percentage Counter */
.loading-percentage {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--main-color);
  margin-top: 1.5rem;
  font-family: "Courier New", monospace;
  letter-spacing: 0.1rem;
}

/* Floating Elements */
.floating-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.floating-element {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--main-color);
  border-radius: 50%;
  opacity: 0.6;
  animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 6s;
}

.floating-element:nth-child(2) {
  top: 60%;
  left: 80%;
  animation-delay: 2s;
  animation-duration: 8s;
}

.floating-element:nth-child(3) {
  top: 80%;
  left: 20%;
  animation-delay: 4s;
  animation-duration: 7s;
}

.floating-element:nth-child(4) {
  top: 30%;
  left: 70%;
  animation-delay: 1s;
  animation-duration: 9s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-20px) scale(1.2);
    opacity: 1;
  }
  50% {
    transform: translateY(-40px) scale(0.8);
    opacity: 0.8;
  }
  75% {
    transform: translateY(-20px) scale(1.1);
    opacity: 1;
  }
}

/* Header - Compact Design */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 9%;
  background: rgba(31, 36, 45, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  transition: var(--transition);
  border-bottom: 1px solid rgba(0, 238, 255, 0.05);
}

body.light-mode .header {
  background: rgba(248, 249, 250, 0.95);
  border-bottom: 1px solid rgba(52, 152, 219, 0.1);
}

.header.sticky {
  border-bottom: 0.1rem solid rgba(0, 238, 255, 0.2);
  box-shadow: 0 0.5rem 1rem var(--shadow-color);
}

.logo {
  font-size: 2.5rem;
  color: var(--text-color);
  font-weight: 600;
  cursor: default;
  text-decoration: none;
}

.logo span {
  color: var(--main-color);
}

.navbar {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin-left: auto; 
}

.navbar a {
  font-size: 1.5rem;
  color: var(--text-color);
  transition: var(--transition);
  position: relative;
  font-weight: 500;
  padding: 0.5rem 0;
}

.navbar a::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--main-color);
  transition: var(--transition);
}

.navbar a:hover::before,
.navbar a.active::before {
  width: 100%;
}

.navbar a:hover,
.navbar a.active {
  color: var(--main-color);
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Theme Toggle */
.theme-toggle {
  width: 4rem;
  height: 4rem;
  background: rgba(0, 238, 255, 0.1);
  border: 1px solid rgba(0, 238, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.theme-toggle::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 238, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.theme-toggle:hover::before {
  left: 100%;
}

.theme-toggle:hover {
  background: var(--main-color);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(0, 238, 255, 0.3);
}

.theme-toggle:hover i {
  color: var(--bg-color);
}

.theme-toggle i {
  font-size: 1.8rem;
  color: var(--main-color);
  transition: var(--transition);
}

#menu-icon {
  font-size: 2.4rem;
  color: var(--text-color);
  display: none;
  cursor: pointer;
}

/* Light Mode Adjustments */
.light-mode .header {
  background: rgba(248, 249, 250, 0.95);
  border-bottom: 1px solid rgba(52, 152, 219, 0.05);
}

.light-mode .header.sticky {
  border-bottom: 1px solid rgba(52, 152, 219, 0.08);
  box-shadow: 0 1px 15px rgba(0, 0, 0, 0.05);
}


/* ========== Mobile Styles ========== */
@media (max-width: 768px) {
  .navbar {
    position: absolute;
    top: 100%;
    right: -100%; /* disembunyikan di luar layar */
    width: 250px;
    background: rgba(31, 36, 45, 0.98);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    transition: right 0.3s ease-in-out;
    border-left: 1px solid rgba(0, 238, 255, 0.1);
    border-bottom: 1px solid rgba(0, 238, 255, 0.1);
    margin-left: 0; /* reset biar ga ganggu */
  }

  .navbar a {
    display: block;
    width: 100%;
    padding: 1rem 0;
  }

  /* Saat menu aktif */
  .navbar.active {
    right: 0;
  }

  /* Tampilkan icon menu */
  #menu-icon {
    display: block;
  }
}

/* Home Section */
.home {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6rem;
}

.home-content {
  flex: 1;
  max-width: 55rem;
}

.home-content h3 {
  font-size: 2.2rem;
  font-weight: 400;
  margin-bottom: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
}

.light-mode .home-content h3 {
  color: rgba(44, 62, 80, 0.85);
}

.home-content h1 {
  font-size: 4.2rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.8rem;
}

.home-content h3:nth-of-type(2) {
  margin-bottom: 2rem;
}

.home-content h3 span {
  color: var(--main-color);
}

.home-content p {
  font-size: 1.6rem;
  margin: 1.5rem 0 3rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
}

.light-mode .home-content p {
  color: rgba(44, 62, 80, 0.75);
}

.social-media {
  margin: 2.5rem 0;
}

.social-media a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background: rgba(0, 238, 255, 0.08);
  border: 1px solid rgba(0, 238, 255, 0.2);
  border-radius: 50%;
  font-size: 1.8rem;
  color: var(--main-color);
  margin-right: 1.2rem;
  transition: var(--transition);
}

.social-media a:hover {
  background: var(--main-color);
  color: var(--bg-color);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 238, 255, 0.25);
}

/* HOME IMAGE - Perfectly Centered with Proper Spacing */
.home-img {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-img .image-container {
  position: relative;
  width: 380px;
  height: 380px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
}

.home-img .image-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 238, 255, 0.12) 0%, transparent 50%, rgba(0, 238, 255, 0.06) 100%);
  z-index: 1;
}

.home-img .image-container img {
  position: relative;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center center;
  z-index: 2;
  border: 1px solid rgba(0, 238, 255, 0.2);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 238, 255, 0.08);
  transition: var(--transition);
  display: block;
  margin: auto;
}

.home-img .image-container:hover img {
  transform: scale(1.02);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 238, 255, 0.15);
  border-color: rgba(0, 238, 255, 0.35);
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--main-color);
  border-radius: 2.5rem;
  color: var(--bg-color);
  letter-spacing: 0.03rem;
  font-weight: 500;
  font-size: 1.4rem;
  transition: var(--transition);
  cursor: pointer;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 238, 255, 0.25);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(0, 238, 255, 0.35);
}

/* About Section */
.about {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5rem;
  background: var(--second-bg-color);
}

.heading {
  font-size: 4rem;
  margin-bottom: 2.5rem;
  text-align: center;
  font-weight: 600;
}

.heading span {
  color: var(--main-color);
}

/* ABOUT IMAGE - Perfectly Centered with Proper Spacing */
.about-img {
  position: relative;
  width: 350px;
  height: 350px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  border-radius: 50%;
}

.about-img::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 238, 255, 0.04) 0%, transparent 70%);
  z-index: 1;
}

.about-img .image-frame {
  position: relative;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  overflow: hidden;
  z-index: 2;
  border: 1px solid rgba(0, 238, 255, 0.15);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(0, 238, 255, 0.04);
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-img .image-frame img {
  width: 310px;
  height: 310px;
  object-fit: cover;
  object-position: center center;
  transition: var(--transition);
  border-radius: 50%;
  display: block;
}

.about-img:hover .image-frame {
  border-color: rgba(0, 238, 255, 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.22), inset 0 0 0 1px rgba(0, 238, 255, 0.08);
}

.about-img:hover .image-frame img {
  transform: scale(1.03);
}

.about-content {
  flex: 1;
}

.about-content h2 {
  text-align: left;
}

.about-content h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.light-mode .about-content h3 {
  color: rgba(44, 62, 80, 0.9);
}

.about-content p {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
}

.light-mode .about-content p {
  color: rgba(44, 62, 80, 0.75);
}

.btn-box {
  display: flex;
  justify-content: flex-start;
  margin-top: 2.5rem;
}

.btn-box .btn {
  min-width: 14rem;
  text-align: center;
}

/* Education and Experience Sections with Modern Timeline Design */
.education,
.experience {
  background: var(--bg-color);
  position: relative;
  overflow: hidden;
  padding: 10rem 9% 2rem;
}

.education::before,
.experience::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%, rgba(0, 238, 255, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 238, 255, 0.05) 0%, transparent 50%),
    linear-gradient(135deg, transparent 0%, rgba(0, 238, 255, 0.02) 50%, transparent 100%);
  z-index: -1;
}

body.light-mode .education::before,
body.light-mode .experience::before {
  background: radial-gradient(circle at 20% 80%, rgba(52, 152, 219, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(52, 152, 219, 0.05) 0%, transparent 50%),
    linear-gradient(135deg, transparent 0%, rgba(52, 152, 219, 0.02) 50%, transparent 100%);
}

.section-header {
  text-align: center;
  margin-bottom: 5rem;
}

.section-header .heading {
  font-size: 4.5rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.section-header .heading span {
  color: var(--main-color);
}

.section-subtitle {
  font-size: 1.8rem;
  color: var(--text-secondary);
  max-width: 60rem;
  margin: 0 auto;
  line-height: 1.6;
}

.timeline-container {
  max-width: 120rem;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
}

.timeline-item {
  display: flex;
  margin-bottom: 4rem;
  position: relative;
  background: var(--second-bg-color);
  border-radius: 2rem;
  padding: 3rem;
  border: 2px solid rgba(52, 152, 219, 0.1);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.1), 0 0.5rem 1.5rem rgba(52, 152, 219, 0.05);
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(50px);
  animation: fadeUp 0.8s ease-out forwards;
  overflow: hidden;
}

body:not(.light-mode) .timeline-item {
  background: #2a3441;
  border: 2px solid rgba(0, 238, 255, 0.1);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3), 0 0.5rem 1.5rem rgba(0, 238, 255, 0.1);
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.05), transparent);
  transition: left 0.6s ease;
}

body:not(.light-mode) .timeline-item::before {
  background: linear-gradient(90deg, transparent, rgba(0, 238, 255, 0.05), transparent);
}

.timeline-item:hover::before {
  left: 100%;
}

.timeline-item:hover {
  border-color: var(--main-color);
  transform: translateY(-8px);
  box-shadow: 0 2rem 5rem rgba(52, 152, 219, 0.2), 0 1rem 2rem rgba(52, 152, 219, 0.1);
}

body:not(.light-mode) .timeline-item:hover {
  box-shadow: 0 2rem 5rem rgba(0, 238, 255, 0.2), 0 1rem 2rem rgba(0, 238, 255, 0.1);
}

.timeline-item:nth-child(1) {
  animation-delay: 0.2s;
}

.timeline-item:nth-child(2) {
  animation-delay: 0.4s;
}

.timeline-item:nth-child(3) {
  animation-delay: 0.6s;
}

.timeline-item:nth-child(4) {
  animation-delay: 0.8s;
}

.timeline-icon {
  flex-shrink: 0;
  width: 6rem;
  height: 6rem;
  background: linear-gradient(135deg, var(--main-color), rgba(52, 152, 219, 0.8));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 2.5rem;
  position: relative;
  z-index: 2;
  box-shadow: 0 0.8rem 2rem rgba(52, 152, 219, 0.3);
  transition: all 0.4s ease;
}

body:not(.light-mode) .timeline-icon {
  background: linear-gradient(135deg, var(--main-color), #00b8d4);
  box-shadow: 0 0.8rem 2rem rgba(0, 238, 255, 0.3);
}

.timeline-item:hover .timeline-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 1.2rem 3rem rgba(52, 152, 219, 0.4);
}

body:not(.light-mode) .timeline-item:hover .timeline-icon {
  box-shadow: 0 1.2rem 3rem rgba(0, 238, 255, 0.4);
}

.timeline-icon i {
  font-size: 2.5rem;
  color: white;
}

.timeline-content {
  flex: 1;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.timeline-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
  flex: 1;
  min-width: 30rem;
}

.timeline-date {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: linear-gradient(135deg, var(--main-color), rgba(52, 152, 219, 0.9));
  color: white;
  padding: 1rem 1.8rem;
  border-radius: 2.5rem;
  font-size: 1.4rem;
  font-weight: 600;
  white-space: nowrap;
  position: relative;
  top: 0;
  box-shadow: 0 0.5rem 1.5rem rgba(52, 152, 219, 0.3);
  transition: all 0.3s ease;
}

body:not(.light-mode) .timeline-date {
  background: linear-gradient(135deg, var(--main-color), #00b8d4);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 238, 255, 0.3);
}

.timeline-item:hover .timeline-date {
  transform: translateY(-2px);
  box-shadow: 0 0.8rem 2rem rgba(52, 152, 219, 0.4);
}

body:not(.light-mode) .timeline-item:hover .timeline-date {
  box-shadow: 0 0.8rem 2rem rgba(0, 238, 255, 0.4);
}

.timeline-date i {
  font-size: 1.6rem;
}

.timeline-company {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.timeline-company > span:first-child {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--main-color);
}

.timeline-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 1.5rem;
  font-weight: 500;
}

.timeline-location i {
  font-size: 1.6rem;
  color: var(--main-color);
  filter: drop-shadow(0 0 0.5rem rgba(52, 152, 219, 0.4));
}

body:not(.light-mode) .timeline-location i {
  filter: drop-shadow(0 0 0.5rem rgba(0, 238, 255, 0.4));
}

.timeline-type {
  background: rgba(52, 152, 219, 0.15);
  color: var(--main-color);
  padding: 0.6rem 1.2rem;
  border-radius: 1.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  box-shadow: 0 0.3rem 1rem rgba(52, 152, 219, 0.2);
  transition: all 0.3s ease;
}

body:not(.light-mode) .timeline-type {
  background: rgba(0, 238, 255, 0.15);
  box-shadow: 0 0.3rem 1rem rgba(0, 238, 255, 0.2);
}

.timeline-item:hover .timeline-type {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1.5rem rgba(52, 152, 219, 0.3);
}

body:not(.light-mode) .timeline-item:hover .timeline-type {
  box-shadow: 0 0.5rem 1.5rem rgba(0, 238, 255, 0.3);
}

.timeline-description {
  font-size: 1.6rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.timeline-description p {
  margin-bottom: 1.5rem;
}

.timeline-description ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-description li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1.2rem;
}

.timeline-description li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--main-color);
  font-size: 1.8rem;
  font-weight: bold;
  filter: drop-shadow(0 0 0.3rem rgba(52, 152, 219, 0.5));
}

body:not(.light-mode) .timeline-description li::before {
  filter: drop-shadow(0 0 0.3rem rgba(0, 238, 255, 0.5));
}

@media (max-width: 768px) {
  .timeline-item {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }

  .timeline-icon {
    margin: 0 auto 2rem auto;
  }

  .timeline-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .timeline-title {
    min-width: auto;
    text-align: center;
  }

  .timeline-company {
    justify-content: center;
    text-align: center;
  }

  .section-subtitle {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .timeline-container {
    padding: 0 1rem;
  }

  .timeline-item {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }

  .timeline-icon {
    width: 5rem;
    height: 5rem;
  }

  .timeline-icon i {
    font-size: 2rem;
  }

  .timeline-title {
    font-size: 2rem;
  }

  .section-header .heading {
    font-size: 3.5rem;
  }
}

/* Skills Section */
.skills {
  background: var(--bg-color);
  overflow: hidden;
  padding-bottom: 8rem;
}

.skills h2 {
  margin-bottom: 5rem;
  opacity: 0;
  transform: translateY(-30px);
  animation: fadeInDown 0.8s ease-out forwards;
  animation-delay: 0.2s;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.skill-category {
  background: var(--second-bg-color);
  padding: 3rem 2.5rem;
  border-radius: 2rem;
  border: 2px solid rgba(0, 238, 255, 0.1);
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(50px);
  animation: fadeUp 0.8s ease-out forwards;
  position: relative;
  overflow: hidden;
}

.skill-category:nth-child(1) {
  animation-delay: 0.4s;
}

.skill-category:nth-child(2) {
  animation-delay: 0.6s;
}

.skill-category:nth-child(3) {
  animation-delay: 0.8s;
}

.skill-category:nth-child(4) {
  animation-delay: 1s;
}

.skill-category:nth-child(5) {
  animation-delay: 1.2s;
}

.skill-category:nth-child(6) {
  animation-delay: 1.4s;
}

.skill-category::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 238, 255, 0.05), transparent);
  transition: left 0.6s ease;
}

.skill-category:hover::before {
  left: 100%;
}

.skill-category:hover {
  border-color: var(--main-color);
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 238, 255, 0.2);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid rgba(0, 238, 255, 0.2);
}

.category-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--main-color), rgba(0, 238, 255, 0.7));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
  flex-shrink: 0;
}

.skill-category:hover .category-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 25px rgba(0, 238, 255, 0.4);
}

.category-icon i {
  font-size: 2.5rem;
  color: var(--bg-color);
}

.category-header h3 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.2;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.skill-tag {
  background: rgba(0, 238, 255, 0.1);
  color: var(--text-color);
  padding: 0.8rem 1.5rem;
  border-radius: 2rem;
  font-size: 1.4rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 238, 255, 0.2);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.skill-tag::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.skill-tag:hover::before {
  left: 100%;
}

.skill-tag:hover {
  background: var(--main-color);
  color: var(--bg-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 238, 255, 0.3);
  border-color: var(--main-color);
}

/* Services Section */
/* Services Section - Compact Horizontal Layout */
.services {
  background: var(--second-bg-color);
  overflow: hidden;
  padding: 6rem 9% 4rem;
}

.services h2 {
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(-30px);
  animation: fadeInDown 0.8s ease-out forwards;
  animation-delay: 0.2s;
}

.services-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-content: center;
  align-items: stretch;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.services-container .services-box {
  background: var(--second-bg-color);
  padding: 2.5rem 2rem;
  border-radius: 1.5rem;
  text-align: center;
  border: 0.2rem solid rgba(0, 238, 255, 0.1);
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(50px) rotateX(15deg);
  animation: flipUp 0.8s ease-out forwards;
  perspective: 1000px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
  max-height: 350px;
  position: relative;
}

.services-box i {
  font-size: 5rem;
  color: var(--main-color);
  margin-bottom: 1.5rem;
  transition: all 0.4s ease;
  opacity: 0;
  transform: scale(0);
  animation: bounceIn 0.6s ease-out forwards;
  animation-delay: 1s;
  flex-shrink: 0;
}

.services-box h3 {
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
  font-weight: 700;
  opacity: 0;
  transform: translateX(-20px);
  animation: slideInLeft 0.6s ease-out forwards;
  animation-delay: 1.2s;
  flex-shrink: 0;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.services-box p {
  font-size: 1.3rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateX(20px);
  animation: slideInRight 0.6s ease-out forwards;
  animation-delay: 1.4s;
  flex-grow: 1;
  display: flex;
  align-items: center;
  text-align: center;
  margin-bottom: 1.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.services-box .btn {
  margin-top: auto;
  align-self: center;
  min-width: 140px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease-out forwards;
  animation-delay: 1.6s;
  padding: 0.8rem 2rem;
  font-size: 1.3rem;
}

.services-box:hover {
  border-color: var(--main-color);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 238, 255, 0.3);
  border: 2px solid rgba(0, 238, 255, 0.5);
}

.services-box:hover i {
  transform: scale(1.1) rotateY(360deg);
  text-shadow: 0 0 20px rgba(0, 238, 255, 0.5);
}

/* Portfolio Section */
.portfolio {
  /* Ensure consistent background */
  background: var(--bg-color);
  width: 100%;
  position: relative;
  overflow: hidden;
  padding: 10rem 9% 2rem;
}

.portfolio::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%, rgba(0, 238, 255, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 238, 255, 0.05) 0%, transparent 50%),
    linear-gradient(135deg, transparent 0%, rgba(0, 238, 255, 0.02) 50%, transparent 100%);
  z-index: -1;
}

body.light-mode .portfolio::before {
  background: radial-gradient(circle at 20% 80%, rgba(52, 152, 219, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(52, 152, 219, 0.05) 0%, transparent 50%),
    linear-gradient(135deg, transparent 0%, rgba(52, 152, 219, 0.02) 50%, transparent 100%);
}

/* Added portfolio header styling */
.portfolio-header {
  text-align: center;
  margin-bottom: 5rem;
}

.portfolio-subtitle {
  font-size: 1.6rem;
  color: var(--text-color);
  opacity: 0.8;
  max-width: 80rem;
  margin: 2rem auto 0;
  line-height: 1.6;
}

/* Added category filter tabs styling */
.portfolio-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 5rem;
}

.filter-btn {
  padding: 1rem 2.5rem;
  background: transparent;
  border: 2px solid var(--main-color);
  border-radius: 3rem;
  color: var(--text-color);
  font-size: 1.4rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--main-color);
  transition: var(--transition);
  z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
  left: 0;
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--bg-color);
  transform: translateY(-2px);
}

/* Updated portfolio container for new card layout */
.portfolio-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(40rem, 1fr));
  gap: 3rem;
  align-items: start;
}

/* New portfolio card design matching reference image */
.portfolio-card {
  background: var(--second-bg-color);
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  position: relative;
}

.portfolio-card:hover {
  transform: translateY(-1rem);
  box-shadow: 0 2rem 4rem rgba(0, 238, 255, 0.1);
}

.card-image {
  width: 100%;
  height: 25rem;
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.portfolio-card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 3rem;
}

.card-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.card-description {
  font-size: 1.4rem;
  color: var(--text-color);
  opacity: 0.8;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Tech stack tags styling */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2.5rem;
}

.tech-tag {
  padding: 0.5rem 1.2rem;
  background: var(--main-color);
  color: var(--bg-color);
  font-size: 1.2rem;
  font-weight: 500;
  border-radius: 2rem;
  transition: var(--transition);
}

.tech-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 238, 255, 0.3);
}

/* Card action buttons styling */
.card-actions {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  border-radius: 0.8rem;
  font-size: 1.4rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--main-color);
  color: var(--bg-color);
}

.btn-primary:hover {
  background: transparent;
  border-color: var(--main-color);
  color: var(--main-color);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  border-color: var(--text-color);
  color: var(--text-color);
}

.btn-secondary:hover {
  background: var(--text-color);
  color: var(--bg-color);
  transform: translateY(-2px);
}

/* Responsive design for portfolio section */
@media (max-width: 991px) {
  .portfolio {
    padding: 10rem 5% 2rem;
  }

  .portfolio-container {
    grid-template-columns: repeat(auto-fit, minmax(35rem, 1fr));
    gap: 2.5rem;
  }

  .portfolio-filters {
    gap: 0.8rem;
  }

  .filter-btn {
    padding: 0.8rem 2rem;
    font-size: 1.3rem;
  }
}

@media (max-width: 768px) {
  .portfolio-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .card-content {
    padding: 2rem;
  }

  .card-title {
    font-size: 2rem;
  }

  .card-description {
    font-size: 1.3rem;
  }

  .portfolio-filters {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .filter-btn {
    width: 100%;
    max-width: 25rem;
  }

  .card-actions {
    flex-direction: column;
    gap: 1rem;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 450px) {
  .portfolio {
    padding: 8rem 3% 2rem;
  }

  .card-content {
    padding: 1.5rem;
  }

  .tech-stack {
    gap: 0.5rem;
  }

  .tech-tag {
    font-size: 1.1rem;
    padding: 0.4rem 1rem;
  }
}

/* Contact Section */
/* Contact Section - Enhanced Animations */
.contact {
  background: var(--second-bg-color);
  overflow: hidden;
}

.contact h2 {
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(-40px);
  animation: fadeInDown 0.8s ease-out forwards;
  animation-delay: 0.2s;
}

.contact form {
  max-width: 70rem;
  margin: 1rem auto;
  text-align: center;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 0.8s ease-out forwards;
  animation-delay: 0.4s;
}

.contact form .input-box {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact form .input-box input,
.contact form textarea {
  width: 100%;
  padding: 1.5rem;
  font-size: 1.5rem;
  color: var(--text-color);
  background: var(--second-bg-color);
  border: 2px solid rgba(0, 238, 255, 0.2);
  border-radius: 0.8rem;
  margin: 0.7rem 0;
  transition: all 0.4s ease;
  transform: translateX(-20px);
  opacity: 0;
  animation: slideInLeft 0.6s ease-out forwards;
}

.contact form .input-box input:nth-child(1) {
  animation-delay: 0.6s;
}

.contact form .input-box input:nth-child(2) {
  animation-delay: 0.7s;
}

.contact form textarea {
  animation-delay: 0.8s;
}

.contact form .input-box input {
  width: calc(50% - 0.5rem);
}

.contact form .input-box input:focus,
.contact form textarea:focus {
  border-color: var(--main-color);
  box-shadow: 0 0 20px rgba(0, 238, 255, 0.3);
  transform: scale(1.02);
}

.contact form textarea {
  resize: none;
}

.contact form .btn {
  margin-top: 2rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease-out forwards;
  animation-delay: 1s;
}

.contact-info {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 3rem;
  margin-top: 5rem;
}

.info-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--second-bg-color);
  border-radius: 1.5rem;
  border: 2px solid rgba(0, 238, 255, 0.1);
  transition: all 0.5s ease;
  opacity: 0;
  transform: translateY(50px) rotateX(15deg);
  animation: flipUp 0.8s ease-out forwards;
  min-width: 250px;
  flex: 1;
  max-width: 300px;
}

.info-box:nth-child(1) {
  animation-delay: 1.2s;
}

.info-box:nth-child(2) {
  animation-delay: 1.4s;
}

.info-box:nth-child(3) {
  animation-delay: 1.6s;
}

.info-box:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 20px 40px rgba(0, 238, 255, 0.3);
  border-color: var(--main-color);
  background: linear-gradient(135deg, var(--second-bg-color), rgba(0, 238, 255, 0.05));
}

.info-box i {
  font-size: 4rem;
  color: var(--main-color);
  margin-bottom: 1.5rem;
  transition: all 0.4s ease;
}

.info-box:hover i {
  transform: scale(1.2) rotateY(360deg);
  text-shadow: 0 0 20px rgba(0, 238, 255, 0.5);
}

.info-box h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.info-box p {
  font-size: 1.5rem;
  line-height: 1.5;
  transition: all 0.3s ease;
}

/* Enhanced Footer */
.footer {
  background: var(--bg-color);
  position: relative;
  overflow: hidden;
  padding: 0;
  border-top: 1px solid rgba(0, 238, 255, 0.1);
}

body.light-mode .footer {
  border-top: 1px solid rgba(52, 152, 219, 0.1);
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 6rem 9% 2rem;
  position: relative;
  z-index: 2;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 6rem;
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(0, 238, 255, 0.1);
}

body.light-mode .footer-top {
  border-bottom: 1px solid rgba(52, 152, 219, 0.1);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-logo {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.footer-logo span {
  color: var(--main-color);
}

.footer-description {
  font-size: 1.5rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
}

body.light-mode .footer-description {
  color: rgba(44, 62, 80, 0.7);
}

.footer-social {
  display: flex;
  gap: 1.5rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  background: rgba(0, 238, 255, 0.1);
  border: 1px solid rgba(0, 238, 255, 0.2);
  border-radius: 50%;
  color: var(--main-color);
  font-size: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

body.light-mode .footer-social a {
  background: rgba(52, 152, 219, 0.1);
  border: 1px solid rgba(52, 152, 219, 0.2);
}

.footer-social a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 238, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.footer-social a:hover::before {
  left: 100%;
}

.footer-social a:hover {
  background: var(--main-color);
  color: var(--bg-color);
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 238, 255, 0.3);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
}

.footer-column h4 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--main-color);
  margin-bottom: 2rem;
  position: relative;
}

.footer-column h4::after {
  content: "";
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 3rem;
  height: 2px;
  background: var(--main-color);
  border-radius: 1px;
}

.footer-column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-column ul li a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.6rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
  border-radius: 0.5rem;
  position: relative;
  overflow: hidden;
}

body.light-mode .footer-column ul li a {
  color: rgba(44, 62, 80, 0.7);
}

.footer-column ul li a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 238, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.footer-column ul li a:hover::before {
  left: 100%;
}

.footer-column ul li a:hover {
  color: var(--main-color);
  transform: translateX(8px);
  background: rgba(0, 238, 255, 0.05);
  padding-left: 1.2rem;
}

body.light-mode .footer-column ul li a:hover {
  background: rgba(52, 152, 219, 0.05);
}

.footer-column ul li a i {
  font-size: 1.8rem;
  width: 2.2rem;
  color: var(--main-color);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.footer-column ul li a:hover i {
  transform: scale(1.2);
  text-shadow: 0 0 10px rgba(0, 238, 255, 0.5);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 238, 255, 0.1);
}

body.light-mode .footer-bottom {
  border-top: 1px solid rgba(52, 152, 219, 0.1);
}

.footer-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-text p {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.6);
}

body.light-mode .footer-text p {
  color: rgba(44, 62, 80, 0.6);
}

.footer-subtitle {
  font-size: 1.3rem;
  color: var(--main-color);
  font-style: italic;
}

.back-to-top {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  background: var(--main-color);
  color: var(--bg-color);
  border-radius: 3rem;
  font-size: 1.4rem;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 238, 255, 0.3);
}

.back-to-top i {
  font-size: 1.6rem;
}

/* Footer Background Elements */
.footer-bg-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.footer-shape {
  position: absolute;
  background: rgba(0, 238, 255, 0.03);
  border-radius: 50%;
  animation: floatShape 8s ease-in-out infinite;
}

.footer-shape-1 {
  width: 200px;
  height: 200px;
  top: 10%;
  right: 10%;
  animation-delay: 0s;
}

.footer-shape-2 {
  width: 150px;
  height: 150px;
  bottom: 20%;
  left: 15%;
  animation-delay: 2s;
}

.footer-shape-3 {
  width: 100px;
  height: 100px;
  top: 60%;
  right: 30%;
  animation-delay: 4s;
}

@keyframes floatShape {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

/* Responsive Design */
@media (max-width: 1200px) {
  html {
    font-size: 55%;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

@media (max-width: 991px) {
  .header {
    padding: 1rem 3%;
  }

  section {
    padding: 8rem 3% 2rem;
  }

  .services {
    padding: 5rem 3% 3rem;
  }

  .portfolio {
    padding-bottom: 6rem;
  }

  .contact {
    min-height: auto;
  }

  .footer-container {
    padding: 5rem 3% 2rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  #menu-icon {
    display: block;
  }

  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 1rem 3%;
    background: var(--bg-color);
    border-top: 1px solid rgba(0, 238, 255, 0.08);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    display: none;
    flex-direction: column;
    gap: 0;
  }

  .navbar.active {
    display: flex;
  }

  .navbar a {
    display: block;
    font-size: 1.6rem;
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 238, 255, 0.1);
  }

  .home {
    flex-direction: column-reverse;
    text-align: center;
    gap: 3rem;
  }

  .home-content h3 {
    font-size: 2rem;
  }

  .home-content h1 {
    font-size: 3.6rem;
  }

  .home-content p {
    font-size: 1.5rem;
  }

  .home-img .image-container {
    width: 320px;
    height: 320px;
  }

  .home-img .image-container img {
    width: 290px;
    height: 290px;
  }

  .about {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }

  .about-content h2 {
    text-align: center;
  }

  .about-img {
    width: 300px;
    height: 300px;
  }

  .about-img .image-frame {
    width: 280px;
    height: 280px;
  }

  .about-img .image-frame img {
    width: 260px;
    height: 260px;
  }

  .btn-box {
    justify-content: center;
  }

  .education .education-row {
    flex-direction: column;
  }

  .experience .experience-row {
    flex-direction: column;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .skill-category {
    padding: 2.5rem 2rem;
  }

  .category-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .category-header h3 {
    font-size: 1.8rem;
  }

  .category-icon {
    width: 50px;
    height: 50px;
  }

  .category-icon i {
    font-size: 2rem;
  }

  .skill-tags {
    justify-content: center;
    gap: 0.8rem;
  }

  .skill-tag {
    font-size: 1.3rem;
    padding: 0.7rem 1.2rem;
  }

  .services h2 {
    margin-bottom: 2.5rem;
  }

  .services-container {
    gap: 1.5rem;
  }

  .services-box {
    min-height: 280px;
    max-height: 310px;
    padding: 2rem 1.5rem;
  }

  .services-box i {
    font-size: 4.5rem;
  }

  .services-box h3 {
    font-size: 1.7rem;
  }

  .services-box p {
    font-size: 1.25rem;
  }

  .portfolio h2 {
    margin-bottom: 2.5rem;
  }

  .portfolio-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 2.5rem;
  }

  .portfolio-box img {
    height: 250px;
  }

  .contact-info {
    flex-direction: column;
    gap: 2.5rem;
  }

  .info-box {
    min-width: 280px;
    max-width: 100%;
  }

  .contact form .input-box input {
    width: 100%;
  }

  .contact form .input-box {
    flex-direction: column;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  /* Mobile Loading Adjustments */
  .logo-text {
    font-size: 3rem;
  }

  .loading-animation {
    width: 100px;
    height: 100px;
  }

  .loading-ring:nth-child(1) {
    width: 100px;
    height: 100px;
  }

  .loading-ring:nth-child(2) {
    width: 75px;
    height: 75px;
    top: 12.5px;
    left: 12.5px;
  }

  .loading-ring:nth-child(3) {
    width: 50px;
    height: 50px;
    top: 25px;
    left: 25px;
  }
}

@media (max-width: 617px) {
  .portfolio-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 450px) {
  html {
    font-size: 50%;
  }

  .home-img .image-container {
    width: 220px;
    height: 220px;
  }

  .home-img .image-container img {
    width: 200px;
    height: 200px;
  }

  .about-img {
    width: 200px;
    height: 200px;
  }

  .about-img .image-frame {
    width: 180px;
    height: 180px;
  }

  .skills {
    padding-bottom: 6rem;
  }

  .skill-category {
    padding: 2rem 1.5rem;
  }

  .category-header h3 {
    font-size: 1.6rem;
  }

  .category-icon {
    width: 45px;
    height: 45px;
  }

  .category-icon i {
    font-size: 1.8rem;
  }

  .skill-tag {
    font-size: 1.2rem;
    padding: 0.6rem 1rem;
  }

  .services-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 0 0.5rem;
  }

  .services-container .services-box {
    min-height: 240px;
    max-height: 270px;
    padding: 1.5rem 1rem;
  }

  .services-box h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
  }

  .services-box p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.3;
  }

  .services-box i {
    font-size: 3.5rem;
    margin-bottom: 1rem;
  }

  .services-box .btn {
    font-size: 1.1rem;
    padding: 0.6rem 1.2rem;
    min-width: 100px;
  }

  /* Small Mobile Loading Adjustments */
  .logo-text {
    font-size: 2.5rem;
  }

  .loading-progress {
    width: 150px;
  }

  .home-content h1 {
    font-size: 3.2rem;
  }

  .heading {
    font-size: 2.8rem;
  }

  .education-column .title {
    font-size: 1.8rem;
  }

  .portfolio-layer h4 {
    font-size: 2rem;
  }
}

@media (max-width: 365px) {
  .home-img .image-container {
    width: 200px;
    height: 200px;
  }

  .home-img .image-container img {
    width: 180px;
    height: 180px;
  }

  .about-img {
    width: 180px;
    height: 180px;
  }

  .about-img .image-frame {
    width: 160px;
    height: 160px;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-2 {
  margin-bottom: 2rem;
}

.mt-2 {
  margin-top: 2rem;
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* Notification Styles */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.notification-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Particle Animation */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-15px);
    opacity: 0.8;
  }
}

/* Enhanced Animation Keyframes */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes flipUp {
  from {
    opacity: 0;
    transform: translateY(50px) rotateX(15deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes cardFlip {
  from {
    opacity: 0;
    transform: translateY(60px) rotateY(15deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateY(0deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Entrance Animation */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
