@import url("https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap");

:root {
  --primary-color: #fed700;
  --glow-color: rgba(254, 215, 0, 0.6);
  --dark-bg: #202020;
  --darker-bg: #151515;
  --text-color: #e5e5e5;
  --ai-accent: #00eeff;
  --ai-accent-glow: rgba(0, 238, 255, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  color: #fff;
  transition: 0.3s;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
}

body {
  font-family: "Lexend", sans-serif;
  font-size: 16px;
  line-height: 24px;
  background-color: var(--dark-bg);
  overflow-x: hidden;
}

.container {
  width: 1170px;
  margin: auto;
}

/* Preloader Styles */
.preloader {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: #151515;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  pointer-events: all;
}

body.loaded .preloader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Outer Loader */
.loader {
  width: 80px;
  height: 80px;
  border: 5px solid transparent;
  border-top-color: var(--primary-color, #4caf50);
  border-bottom-color: var(--primary-color, #4caf50);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: relative;
  box-sizing: border-box;
}

/* Inner Loader */
.loader::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 60px; height: 60px;
  border: 4px solid transparent;
  border-left-color: var(--ai-accent, #2196f3);
  border-right-color: var(--ai-accent, #2196f3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: spinReverse 1.2s linear infinite;
  box-sizing: border-box;
}

/* Spin animations */
@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}





/* Animation Keyframes */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 var(--glow-color);
  }
  70% {
    box-shadow: 0 0 15px 15px rgba(254, 215, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(254, 215, 0, 0);
  }
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glitch {
  0% {
    text-shadow: 0.05em 0 0 var(--ai-accent), -0.05em -0.025em 0 var(--primary-color), -0.025em 0.05em 0
      rgba(255, 0, 0, 0.75);
  }
  14% {
    text-shadow: 0.05em 0 0 var(--ai-accent), -0.05em -0.025em 0 var(--primary-color), -0.025em 0.05em 0
      rgba(255, 0, 0, 0.75);
  }
  15% {
    text-shadow: -0.05em -0.025em 0 var(--ai-accent), 0.025em 0.025em 0 var(--primary-color), -0.05em -0.05em 0
      rgba(255, 0, 0, 0.75);
  }
  49% {
    text-shadow: -0.05em -0.025em 0 var(--ai-accent), 0.025em 0.025em 0 var(--primary-color), -0.05em -0.05em 0
      rgba(255, 0, 0, 0.75);
  }
  50% {
    text-shadow: 0.025em 0.05em 0 var(--ai-accent), 0.05em 0 0 var(--primary-color), 0 -0.05em 0 rgba(255, 0, 0, 0.75);
  }
  99% {
    text-shadow: 0.025em 0.05em 0 var(--ai-accent), 0.05em 0 0 var(--primary-color), 0 -0.05em 0 rgba(255, 0, 0, 0.75);
  }
  100% {
    text-shadow: -0.025em 0 0 var(--ai-accent), -0.025em -0.025em 0 var(--primary-color), -0.025em -0.05em 0
      rgba(255, 0, 0, 0.75);
  }
}

/* Header */
.header-area {
  padding: 25px 0;
  transition: all 0.4s ease;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 99;
}

.header-area.sticky {
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  padding: 10px 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

/* AI-themed Logo */
.logo {
  display: flex;
  align-items: center;
  position: relative;
  text-transform: uppercase;
  font-size: 28px;
  font-weight: 700;
  font-family: "Space Mono", monospace;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.logo:hover {
  color: var(--ai-accent);
}

.logo .fa-bolt {
  color: var(--primary-color);
  font-size: 19.5px;
  position: absolute;
  top: 60%;
  left: 90%;
  transform: translate(-50%, -50%);
  z-index: 1;
  transition: all 0.3s ease;
}

.logo:hover .fa-bolt {
  color: var(--ai-accent);
  animation: pulse 1.5s infinite;
}

.signature {
  width: 120px;
  height: auto;
  margin-right: 10px;
  filter: drop-shadow(0 0 8px var(--ai-accent-glow));
  transition: all 0.3s ease;
}

.logo:hover .signature {
  filter: drop-shadow(0 0 8px var(--ai-accent));
}

/* AI-themed Navbar */
.navbar {
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(21, 21, 21, 0.7) 100%);
  padding: 10px 20px;
  border-radius: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar li {
  margin: 0 15px;
  position: relative;
}

.navbar li a {
  text-transform: capitalize;
  display: block;
  font-weight: 500;
  letter-spacing: 1px;
  padding: 5px 10px;
  position: relative;
  transition: all 0.3s ease;
}

.navbar li a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--ai-accent));
  transition: width 0.3s ease;
}

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

.navbar li a.active {
  color: var(--ai-accent);
}

.navbar li a:hover {
  color: var(--ai-accent);
  text-shadow: 0 0 8px var(--ai-accent-glow);
}

.header .menu_icon {
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: none;
}

/* Home Page */
.FirstElement {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-top: 150px;
  min-height: 100vh;
  background: radial-gradient(circle at center, var(--darker-bg) 0%, var(--dark-bg) 70%);
}

/* Profile Photo with Glow Effect */
.FirstElement .profile-photo {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  border: 15px solid #444444;
  position: relative;
  animation: float 6s ease-in-out infinite;
  transition: all 0.5s ease;
  box-shadow: 0 0 20px var(--glow-color), 0 0 40px rgba(254, 215, 0, 0.3), 0 0 60px rgba(254, 215, 0, 0.1);
}

.FirstElement .profile-photo::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  border-radius: 50%;
  background: linear-gradient(
    45deg,
    var(--primary-color),
    transparent,
    var(--ai-accent),
    transparent,
    var(--primary-color)
  );
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  z-index: -1;
  opacity: 0.5;
}

.FirstElement .profile-photo img {
  height: 100%;
  width: 100%;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.FirstElement .profile-photo:hover img {
  transform: scale(1.1);
  filter: brightness(1.1);
}

.FirstElement .profile-photo:hover {
  box-shadow: 0 0 25px var(--glow-color), 0 0 50px rgba(254, 215, 0, 0.4), 0 0 75px rgba(254, 215, 0, 0.2);
}

/* Profile Text */
.profile-text {
  max-width: 750px;
  display: flex;
  flex-direction: column;
}

.profile-text h5 {
  color: var(--text-color);
  font-size: 16px;
  animation: fadeInUp 1s ease;
  opacity: 0;
  animation-fill-mode: forwards;
  animation-delay: 0.2s;
}

.profile-text h1 {
  color: var(--primary-color);
  font-size: 3.5rem;
  margin: 10px 0;
  position: relative;
  display: inline-block;
  animation: fadeInUp 1s ease;
  opacity: 0;
  animation-fill-mode: forwards;
  animation-delay: 0.4s;
}

/* Remove the underline after h1 */
.profile-text h1::after {
  content: none;
}

.profile-text p {
  color: var(--text-color);
  animation: fadeInUp 1s ease;
  opacity: 0;
  animation-fill-mode: forwards;
  animation-delay: 0.6s;
  line-height: 1.8;
}

/* Keep the social icons rotation with glow effect */
.profile-text .social i {
  color: var(--text-color);
  font-size: 22px;
  margin-right: 20px;
  transition: all 0.5s ease;
  background: rgba(255, 255, 255, 0.05);
  width: 45px;
  height: 45px;
  line-height: 45px;
  text-align: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-text .social i:hover {
  color: var(--ai-accent);
  transform: rotate(360deg);
  box-shadow: 0 0 15px var(--ai-accent-glow);
  border-color: var(--ai-accent);
}

/* About */
.about-area {
  padding-top: 130px;
  background-color: var(--dark-bg);
  position: relative;
}

.about-area::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(254, 215, 0, 0.05) 0%, transparent 50%);
}

.about {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 50px;
  position: relative;
}

.about-content {
  flex-basis: 60%;
}

.about-content h4 {
  color: var(--primary-color);
  font-size: 40px;
  line-height: 70px;
  text-transform: capitalize;
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.about-content h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), transparent);
}

.about-content ul {
  color: var(--text-color);
  text-align: justify;
}

.about-content ul li {
  list-style-type: disc;
  margin-bottom: 15px;
  position: relative;
  padding-left: 10px;
}

.about-content ul li::marker {
  color: var(--primary-color);
}

.about-skills {
  flex-basis: 35%;
  background: rgba(0, 0, 0, 0.2);
  padding: 30px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
}

.about-skills ul li {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
  padding-bottom: 15px;
  margin-bottom: 15px;
  color: var(--text-color);
  font-size: 18px;
  transition: all 0.3s ease;
  position: relative;
}

.about-skills ul li:hover {
  color: var(--primary-color);
  transform: translateX(10px);
}

.about-skills ul li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* Button */
.btn-group {
  margin: 45px 0;
  animation: fadeInUp 1s ease;
  opacity: 0;
  animation-fill-mode: forwards;
  animation-delay: 0.8s;
}

.btn-group .btn {
  color: #fff;
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.8), rgba(51, 51, 51, 0.8));
  padding: 12px 30px;
  margin: 5px 0;
  margin-right: 15px;
  border-radius: 30px;
  border: 2px solid var(--text-color);
  box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.78);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  z-index: 1;
  font-weight: 500;
  letter-spacing: 1px;
}

.btn-group .btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(45deg, var(--primary-color), var(--ai-accent));
  transition: all 0.3s ease;
  z-index: -1;
}

.btn-group .btn:hover::after {
  height: 100%;
}

.btn-group .btn:hover {
  color: #000;
  border-color: transparent;
  transform: translateY(-5px);
}

.btn.active {
  border-color: var(--primary-color);
  background: linear-gradient(45deg, var(--primary-color), var(--ai-accent));
  color: #000;
  font-weight: 600;
}

.btn.active:hover {
  opacity: 0.9;
  transform: translateY(-5px);
}

/* Education & Internship */
.education-content .row {
  display: flex;
  border-radius: 5px;
  margin-bottom: 100px;
}

/* Increase the gap between education and internship sections */
.education-content .row .education,
.education-content .row .internship {
  color: var(--text-color);
  flex: 0 0 45%;
  max-width: 45%;
  margin-top: 30px;
}

/* Add space between education and internship */
.education-content .row .education {
  margin-right: 10%;
}

.education-content .title {
  color: var(--primary-color);
  position: relative;
  display: inline-block;
}

.education-content .title::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--ai-accent));
}

.education-content h3.title {
  font-size: 28px;
  margin-bottom: 30px;
  font-weight: 700;
}

.education-content .row .timeline-box {
  flex: 0 0 100%;
  max-width: 100%;
}

.education-content .row .timeline {
  padding: 30px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  width: 100%;
  position: relative;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.education-content .row .timeline-item {
  position: relative;
  padding-left: 37px;
  padding-bottom: 50px;
  transition: all 0.3s ease;
}

.education-content .row .timeline-item:hover {
  transform: translateX(10px);
}

.education-content .row .internship .timeline-item {
  position: relative;
  padding-left: 37px;
  padding-bottom: 30px;
}

.education-content .row .timeline-item:last-child {
  padding-bottom: 0;
}

.education-content .row .timeline-item::before {
  content: "";
  width: 1px;
  position: absolute;
  height: 100%;
  left: 7px;
  top: 0;
  background: linear-gradient(to bottom, var(--primary-color), var(--ai-accent));
}

.education-content .row .circle-dot {
  position: absolute;
  left: 0;
  top: 0;
  height: 15px;
  width: 15px;
  border-radius: 50%;
  background-color: var(--primary-color);
  box-shadow: 0 0 10px var(--glow-color);
  transition: all 0.3s ease;
}

.education-content .row .timeline-item:hover .circle-dot {
  background-color: var(--ai-accent);
  box-shadow: 0 0 15px var(--ai-accent-glow);
}

.education-content .row .timeline-title {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.education-content .row .timeline-item:hover .timeline-title {
  color: var(--primary-color);
}

.education-content .row .internship .timeline-title {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
}

.education-content .row .timeline-text {
  line-height: 25px;
  font-size: 16px;
  text-align: justify;
}

/* Projects */
.project-content {
  padding: 90px 0;
  position: relative;
}

.project-content::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 80% 50%, rgba(0, 238, 255, 0.05) 0%, transparent 50%);
}

.project-title {
  margin-bottom: 60px;
  text-align: center;
}

.project-title h4 {
  text-transform: uppercase;
  font-size: 40px;
  line-height: 40px;
  color: var(--primary-color);
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.project-title h4::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--ai-accent));
}

.project-title p {
  color: var(--text-color);
  font-size: 18px;
}

.projects {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.project {
  color: var(--text-color);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  width: 100%;
  position: relative;
  padding: 30px;
  text-align: center;
  flex-basis: 32%;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  overflow: hidden;
  transform: translateY(50px);
  opacity: 0;
}

.project.animated {
  transform: translateY(0);
  opacity: 1;
}

.project::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--primary-color), var(--ai-accent), var(--primary-color));
  z-index: -1;
  border-radius: 15px;
  opacity: 0;
  transition: all 0.3s ease;
}

.project:hover::before {
  opacity: 1;
}

.project i {
  background: linear-gradient(45deg, var(--primary-color), var(--ai-accent));
  width: 70px;
  height: 70px;
  color: #000;
  font-size: 28px;
  line-height: 70px;
  border-radius: 50%;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.project:hover i {
  transform: rotateY(360deg);
  box-shadow: 0 0 20px var(--ai-accent-glow);
}

.project h4 {
  font-size: 26px;
  text-transform: capitalize;
  margin: 20px 0;
  transition: all 0.3s ease;
}

.project:hover h4 {
  color: var(--primary-color);
}

.project p {
  text-align: justify;
  transition: all 0.3s ease;
}

.project:hover p,
.project:hover h4 {
  color: #000;
}

.project:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Contact Section Styles */
.contact-section {
  padding: 80px 0;
  color: #fff;
}

.contact-form {
  max-width: 700px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.2);
  padding: 30px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e5e5e5;
  border-radius: 5px;
  font-family: inherit;
  font-size: 16px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(254, 215, 0, 0.3);
}

.contact-form button {
  background: linear-gradient(45deg, var(--primary-color), var(--ai-accent));
  color: #000;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

.contact-form button:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.contact-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

#msg {
  margin-top: 20px;
  padding: 15px;
  border-radius: 5px;
  text-align: center;
  font-weight: 500;
}

/* Footer */
.footer {
  max-width: 950px;
  margin: 0 auto;
  padding: 25px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.footer .message {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.footer .message::after {
  content: "|";
  animation: blink 1s infinite;
  margin-left: 5px;
  color: var(--primary-color);
}

.copyright {
  font-size: 12px;
  opacity: 0.7;
}

/* Responsive Design */
@media only screen and (min-width: 1000px) and (max-width: 1200px) {
  .container {
    width: 970px;
  }
}

@media (max-width: 1050px) {
  .FirstElement {
    flex-direction: column;
    padding-top: 120px;
    text-align: center;
  }

  .profile-text {
    padding: 40px 0px;
    align-items: center;
  }

  .profile-text h1::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .about-content h4::after {
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
  }

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

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

  /* Adjust education and internship for mobile */
  .education-content .row {
    flex-direction: column;
  }

  .education-content .row .education,
  .education-content .row .internship {
    flex-basis: 100%;
    max-width: 100%;
    margin-right: 0;
  }

  .education-content .row .education {
    margin-bottom: 50px;
  }
}

@media only screen and (min-width: 768px) and (max-width: 999px) {
  .container {
    width: 750px;
  }
}

@media only screen and (max-width: 767px) {
  .container {
    width: 90%;
    padding: 0 10px;
  }

  .header .menu_icon {
    display: block;
  }

  .navbar {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    flex-direction: column;
    padding: 20px;
    border-radius: 0;
  }

  .navbar.active {
    display: flex;
  }

  .navbar li {
    margin: 10px 0;
  }

  /* Fix for mobile logo */
  .logo {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
  }

  .signature {
    width: 80px !important;
    height: auto !important;
    margin-right: 5px !important;
    display: block !important;
  }

  .logo .fa-bolt {
    font-size: 14px !important;
    display: block !important;
  }

  /* Fix for mobile profile photo */
  .FirstElement .profile-photo {
    width: 220px !important;
    height: 220px !important;
    margin: 0 auto !important;
    display: block !important;
  }

  .FirstElement .profile-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }

  .profile-text {
    width: 100%;
    text-align: center;
  }

  /* Fix for name overlap in mobile view */
  .profile-text h1 {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
    word-break: break-word !important;
    white-space: normal !important;
  }

  .FirstElement .profile-text p {
    text-align: justify;
  }

  .about {
    flex-direction: column;
    flex-basis: 100%;
    margin-bottom: 30px;
    text-align: center;
  }

  .about-skills {
    width: 100%;
    margin-top: 30px;
  }

  .education-content .row {
    flex-direction: column;
    height: auto;
    margin-bottom: 50px;
  }

  .education-content .row .education,
  .education-content .row .internship {
    flex-basis: 100%;
    max-width: 100%;
    margin-top: 30px;
    margin-right: 0;
  }

  .education-content .row .education {
    margin-bottom: 50px;
  }

  .projects {
    display: flex !important;
    flex-direction: column !important;
  }

  .project {
    flex-basis: 100%;
    margin-bottom: 30px !important;
  }

  /* Contact form mobile styles */
  .contact-form {
    padding: 20px;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 12px;
  }

  .contact-form button {
    width: 100%;
  }
}

/* Additional mobile fixes */
@media only screen and (max-width: 480px) {
  .container {
    width: 95%;
  }

  .logo {
    font-size: 18px !important;
  }

  .signature {
    width: 50px !important;
  }

  .profile-text h1 {
    font-size: 2rem !important;
  }

  .FirstElement .profile-photo {
    width: 180px !important;
    height: 180px !important;
  }
}
