/* GENERAL */

* {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #1a1a1a; /* Changed from #f4f4f4 */
  color: #e0e0e0; /* Changed from #333 */
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

p {
  color: rgb(200, 200, 200); /* Changed from rgb(85, 85, 85) */
}

/* TRANSITION */

a,
.btn {
  transition: all 0.3s ease;
}

/* THEME TOGGLE */

.mobile-theme-btn {
  margin: 10px auto;
  display: block;
  width: 40px;
  height: 40px;
}

body.light-mode .mobile-theme-btn {
  border-color: #333;
  color: #333;
}

body.light-mode .mobile-theme-btn:hover {
  background-color: #333;
  color: #fff;
}

.theme-toggle-btn {
  background: none;
  border: 2px solid #e0e0e0;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-btn:hover {
  background-color: #e0e0e0;
  color: #1a1a1a;
}

.theme-icon {
  width: 20px;
  height: 20px;
  filter: invert(1); /* For dark mode */
}

body.light-mode .theme-icon {
  filter: none; /* No filter for light mode */
}

/* Light mode styles */
body.light-mode {
  background-color: #f4f4f4;
  color: #333;
}

body.light-mode nav {
  background-color: #fff;
}

body.light-mode #hamburger-nav {
  background-color: #fff;
}

body.light-mode .menu-links {
  background-color: #fff;
}

body.light-mode .menu-links a {
  color: #333;
}

body.light-mode .hamburger-icon span {
  background-color: #333;
}

body.light-mode .logo,
body.light-mode a {
  color: #333;
}

body.light-mode p {
  color: rgb(85, 85, 85);
}

body.light-mode .title {
  color: #333;
}

body.light-mode .details-container {
  background: white;
  border-color: rgb(163, 163, 163);
}

body.light-mode .skills-container {
  background: white;
  border-color: rgb(163, 163, 163);
}

body.light-mode .color-container {
  background: rgb(250, 250, 250);
  border-color: rgb(163, 163, 163);
}

body.light-mode .contact-info-upper-container {
  background: rgb(250, 250, 250);
  border-color: rgb(163, 163, 163);
}

body.light-mode .project-title {
  color: #333;
}

body.light-mode .project-btn {
  color: #333;
  border-color: rgb(163, 163, 163);
}

body.light-mode .experience-sub-title {
  color: rgb(85, 85, 85);
}

body.light-mode .btn-color-1,
body.light-mode .btn-color-2 {
  border-color: rgb(53, 53, 53);
}

body.light-mode .btn-color-1 {
  background-color: rgb(53, 53, 53);
  color: rgb(250, 250, 250);
}

body.light-mode .btn-color-2 {
  color: #333;
}

body.light-mode .icon {
  filter: none;
}

body.light-mode .arrow {
  filter: none;
}

body.light-mode .contact-icon,
body.light-mode .email-icon {
  filter: none;
}

body.light-mode .theme-toggle-btn {
  border-color: #333;
  color: #333;
}

body.light-mode .theme-toggle-btn:hover {
  background-color: #333;
  color: #fff;
}

body.light-mode footer {
  background-color: #fff;
}

body.light-mode footer p {
  color: rgb(117, 117, 117);
}

/* DESKTOP NAVIGATION */

nav,
.nav-links {
  display: flex;
}

nav {
  justify-content: space-around;
  align-items: center;
  height: 17vh;
  background-color: #2a2a2a; /* Add dark nav background */
}

.nav-links {
  gap: 2rem;
  list-style: none;
  font-size: 1.5rem;
}

a {
  color: #e0e0e0; /* Changed from black */
  text-decoration: none;
  text-decoration-color: white;
}

a:hover {
  color: #888; /* Changed from grey */
  text-decoration: underline;
  text-underline-offset: 1rem;
  text-decoration-color: rgb(
    120,
    120,
    120
  ); /* Changed from rgb(181, 181, 181) */
}

.logo {
  font-size: 2rem;
  color: #e0e0e0; /* Add explicit color */
}

.logo:hover {
  cursor: default;
}

/* HAMBURGER MENU */

#hamburger-nav {
  display: none;
  background-color: #2a2a2a; /* Add dark background */
  width: 100%;
  margin: 0;
  padding: 0 1rem;
  box-sizing: border-box;
}

.hamburger-menu {
  position: relative;
  display: inline-block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
  cursor: pointer;
}

.hamburger-icon span {
  width: 100%;
  height: 2px;
  background-color: #e0e0e0; /* Changed from black */
  transition: all 0.3s ease;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #2a2a2a; /* Changed from white */
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.menu-links a {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: 1.5rem;
  color: #e0e0e0; /* Changed from black */
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

.menu-links li {
  list-style: none;
}

.menu-links.open {
  max-height: 300px;
}

.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(10px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(10px, -5px);
}

.hamburger-icon span:first-child {
  transform: none;
}

.hamburger-icon span:nth-child(2) {
  opacity: 1;
}

.hamburger-icon span:last-child {
  transform: none;
}

/* SECTIONS */

section {
  padding-top: 4vh;
  height: 96vh;
  margin: 0 auto;
  max-width: 1600px;
  box-sizing: border-box;
  min-height: fit-content;
}

.section-container {
  display: flex;
}

/* PROFILE SECTION */

#profile {
  display: flex;
  justify-content: center;
  gap: 5rem;
  height: 80vh;
}

.section__pic-container {
  display: flex;
  height: 400px;
  width: 400px;
  margin: auto 0;
  justify-content: center;
  align-items: center;
}

.profile-pic {
  border-radius: 50%;
  width: 80%;
  height: 80%;
  object-fit: cover;
}

.section__text {
  align-self: center;
  text-align: center;
}

.section__text p {
  font-weight: 600;
}

.section__text__p1 {
  text-align: center;
}

.section__text__p2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.title {
  font-size: 3rem;
  text-align: center;
  color: #e0e0e0; /* Add explicit color */
}

#socials-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

/* ICONS */

.icon {
  cursor: pointer;
  height: 2rem;
  filter: invert(1); /* Invert icons for dark theme */
}

.wave-icon {
  height: 1rem;
  width: auto;
  vertical-align: middle;
  margin: 0 0.2em;
}

/* BUTTONS */

.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 1rem;
  width: 8rem;
  border-radius: 2rem;
}

.btn-color-1,
.btn-color-2 {
  border: rgb(200, 200, 200) 0.1rem solid; /* Changed border color */
}

.btn-color-1:hover,
.btn-color-2:hover {
  cursor: pointer;
}

.btn-color-1,
.btn-color-2:hover {
  background: rgb(200, 200, 200); /* Changed background */
  color: #1a1a1a; /* Changed text color */
}

.btn-color-1:hover {
  background: rgb(255, 255, 255); /* Changed hover background */
}

.btn-color-2 {
  background: none;
  color: #e0e0e0; /* Add text color */
}

.btn-color-2:hover {
  border: rgb(255, 255, 255) 0.1rem solid;
}

.btn-container {
  gap: 1rem;
}

/* ABOUT SECTION */

#about {
  position: relative;
}

.about-containers {
  gap: 2rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
  padding: 0 1rem;
}

.text-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}

.about-details-container {
  justify-content: center;
  flex-direction: column;
  align-items: center;
  min-height: fit-content;
  height: auto;
}

.section-container {
  gap: 4rem;
  height: auto; /* Change from 30% to auto for better flexibility */
  min-height: 60vh; /* Add minimum height */
  align-items: center; /* Center items vertically */
}

.about-containers {
  gap: 2rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  min-height: fit-content;
  width: 100%;
}

.about-containers,
.about-details-container {
  display: flex;
}

.text-container p {
  font-size: 1.5rem;
  padding: 0 2rem;
}

.arrow {
  position: absolute;
  bottom: 3rem;
  right: -5rem;
  filter: invert(1); /* Invert arrow for dark theme */
}

.details-container {
  padding: 1.5rem;
  margin: 0 1.5rem;
  flex: 1;
  background: #2a2a2a; /* Changed from white */
  border-radius: 2rem;
  border: rgb(100, 100, 100) 0.1rem solid; /* Changed border color */
  border-color: rgb(100, 100, 100); /* Changed border color */
  text-align: center;
  min-width: 200px;
}

.section-container {
  gap: 4rem;
  height: 30%;
}

.section__pic-container {
  height: 400px;
  width: 400px;
  margin: auto 0;
}

/* SKILLS SECTION */

#skills {
  position: relative; /* Add this line */
  overflow: visible;
}

.skills-container {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  width: 100%;
  position: relative;
  background: #2a2a2a; /* Changed from white */
  border-radius: 2rem;
  border: rgb(100, 100, 100) 0.1rem solid; /* Changed border color */
  border-color: rgb(100, 100, 100); /* Changed border color */
  padding: 2rem 0;
  margin: 0 2rem;
}

.skills-track {
  display: flex;
  gap: 4rem; /* Increased from 2rem */
  animation: slideLeft 10s linear infinite; /* Increased duration for smoother effect */
  white-space: nowrap;
  will-change: transform; /* Optimize for animations */
}

.skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 120px; /* Increased from 100px */
  flex-shrink: 0;
  text-align: center;
  position: relative;
  cursor: pointer;
}

.skill p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.skill-icon {
  width: 3.5rem; /* Increased from 3rem */
  height: 3.5rem;
  object-fit: contain;
}

@keyframes slideLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-33.8%); /* More precise calculation */
  }
}

.skills-track {
  animation-play-state: paused;
}

/* Ensure smooth loop by making the container width consistent */
.details-container .skills-container {
  width: 100%;
  max-width: none;
}

.skill-star {
  position: absolute;
  top: -5px;
  right: 10px;
  font-size: 1.2rem;
  z-index: 10;
  color: #ffd700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Large skill popup styles */
.skill-popup-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

.skill-popup {
  position: absolute;
  background: #2a2a2a;
  color: #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  width: 320px;
  border: rgb(100, 100, 100) 0.1rem solid;
  pointer-events: auto;
}

.skill-popup.show {
  opacity: 1;
  visibility: visible;
}

.skill-popup::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #2a2a2a;
}

.popup-content {
  padding: 24px;
}

.popup-content h3 {
  margin: 0 0 8px 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #e0e0e0;
}

.skill-level {
  margin: 0 0 16px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e0e0e0;
  opacity: 0.8;
}

.skill-description {
  margin: 0 0 20px 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgb(200, 200, 200);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: #e0e0e0;
  color: #1a1a1a;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Light mode popup styles */
body.light-mode .skill-popup {
  background: white;
  color: #333;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border: rgb(163, 163, 163) 0.1rem solid;
}

body.light-mode .skill-popup::before {
  border-bottom-color: white;
}

body.light-mode .popup-content h3 {
  color: #333;
}

body.light-mode .skill-level {
  color: #333;
}

body.light-mode .skill-description {
  color: rgb(85, 85, 85);
}

body.light-mode .tag {
  background: #333;
  color: white;
}

/* PROJECTS SECTION */

.experience-sub-title {
  color: rgb(200, 200, 200); /* Changed from rgb(85, 85, 85) */
  font-weight: 600;
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

.experience-details-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.article-container {
  display: flex;
  text-align: initial;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 2.5rem;
  justify-content: space-around;
}

#projects {
  position: relative;
}

.color-container {
  border-color: rgb(100, 100, 100); /* Changed from rgb(163, 163, 163) */
  background: #2a2a2a; /* Changed from rgb(250, 250, 250) */
}

.project-img {
  border-radius: 2rem;
  width: 100%;
  height: 100%;
}

.project-title {
  margin: 1rem;
  color: #e0e0e0; /* Changed from black */
}

.project-btn {
  color: #e0e0e0; /* Changed from black */
  border-color: rgb(100, 100, 100); /* Changed from rgb(163, 163, 163) */
}

/* CONTACT */

#contact {
  display: flex;
  justify-content: center;
  flex-direction: column;
  height: 70vh;
}

.contact-info-upper-container {
  display: flex;
  justify-content: center;
  border-radius: 2rem;
  border: rgb(100, 100, 100) 0.1rem solid; /* Changed border color */
  border-color: rgb(100, 100, 100); /* Changed border color */
  background: #2a2a2a; /* Changed from rgb(250, 250, 250) */
  margin: 2rem auto;
  padding: 0.5rem;
}

.contact-info-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem;
}

.contact-info-container p {
  font-size: larger;
}

.contact-icon {
  cursor: default;
  height: 2rem;
  filter: invert(1); /* Invert contact icons */
}

.email-icon {
  height: 2.5rem;
  filter: invert(1); /* Invert email icon */
}

/* FOOTER */

footer {
  height: 26vh;
  background-color: #2a2a2a; /* Add dark footer background */
}

footer p {
  text-align: center;
  color: rgb(150, 150, 150); /* Changed from rgb(117, 117, 117) */
}
