/* GENERAL */
@import url("https://fonts.googleapis.com/css2?family=Hind:wght@700&display=swap");

:root {
  --background: #ffffff;
  --text: #555555;
  --text-dark: #000000;
  --text-light: #ffffff;
  --primary: rgb(70, 70, 70);
  --secondary: rgb(181, 181, 181);
  --background-alt: rgb(245, 245, 245);
  --border: rgb(163, 163, 163);
}

[data-theme="dark"] {
  --background: #1a1a1a;
  --text: #cccccc;
  --text-dark: #ffffff;
  --text-light: #ffffff;
  --primary: rgb(200, 200, 200);
  --secondary: rgb(100, 100, 100);
  --background-alt: rgb(42, 42, 42);
  --border: rgb(80, 80, 80);
}

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

body {
  font-family: "Hind", sans-serif;
  background: var(--background);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
  margin-left: 70px;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}
a {
  text-decoration: none;
}

p {
  font-size: 1.9rem;
  color: var(--text);
}

/* LOADER */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  transition: opacity 0.5s ease;
}

.loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
}

.loader-name {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.word {
  position: absolute;
  font-size: 5rem;
  font-weight: 700;
  color: var(--text-dark);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  white-space: nowrap;
  text-shadow: 
    0 0 5px rgba(255, 255, 255, 0.9),
    0 0 10px rgba(255, 255, 255, 0.7),
    0 0 15px rgba(255, 255, 255, 0.5);
  animation: glowPulse 2s ease-in-out infinite;
}

[data-theme="dark"] .word {
  text-shadow: 
    0 0 5px rgba(0, 0, 0, 0.9),
    0 0 10px rgba(0, 0, 0, 0.7),
    0 0 15px rgba(0, 0, 0, 0.5);
}

.word.visible {
  opacity: 1;
  transform: scale(1);
}

.word.hindi {
  font-family: "Hind", sans-serif;
}

.word.urdu {
  font-family: "Noto Nastaliq Urdu", sans-serif;
  direction: rtl;
}

.word.arabic {
  font-family: "Scheherazade New", sans-serif;
  direction: rtl;
}

.word.punjabi {
  font-family: "Noto Sans Gurmukhi", sans-serif;
}

.word.turkish {
  font-family: "Poppins", sans-serif;
}

.word.russian {
  font-family: "Playfair Display", sans-serif;
}

.word.english {
  font-family: "Oswald", sans-serif;
}

.letter {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.letter.visible {
  opacity: 1;
  transform: translateY(0);
}

/* LOADING BAR */
.loading-bar-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.loading-bar {
  width: 300px;
  height: 15px;
  background: var(--background-alt);
  border-radius: 7.5px;
  overflow: hidden;
}

.loading-progress {
  width: 0;
  height: 100%;
  background: var(--primary);
  transition: width 0.5s ease;
}

.loading-percentage {
  font-size: 1.2rem;
  color: var(--text-dark);
  font-family: "Hind", sans-serif;
  font-weight: 700;
}

[data-theme="dark"] .loading-bar {
  background: var(--border);
}

[data-theme="dark"] .loading-progress {
  background: var(--text-light);
}

[data-theme="dark"] .loading-percentage {
  color: var(--text-light);
}

/* GLOW ANIMATION */
@keyframes glowPulse {
  0% { text-shadow: 
    0 0 5px rgba(255, 255, 255, 0.9),
    0 0 10px rgba(255, 255, 255, 0.7),
    0 0 15px rgba(255, 255, 255, 0.5); }
  50% { text-shadow: 
    0 0 10px rgba(255, 255, 255, 1),
    0 0 20px rgba(255, 255, 255, 0.9),
    0 0 30px rgba(255, 255, 255, 0.7); }
  100% { text-shadow: 
    0 0 5px rgba(255, 255, 255, 0.9),
    0 0 10px rgba(255, 255, 255, 0.7),
    0 0 15px rgba(255, 255, 255, 0.5); }
}

[data-theme="dark"] .word {
  animation: glowPulseDark 2s ease-in-out infinite;
}

@keyframes glowPulseDark {
  0% { text-shadow: 
    0 0 5px rgba(0, 0, 0, 0.9),
    0 0 10px rgba(0, 0, 0, 0.7),
    0 0 15px rgba(0, 0, 0, 0.5); }
  50% { text-shadow: 
    0 0 10px rgba(0, 0, 0, 1),
    0 0 20px rgba(0, 0, 0, 0.9),
    0 0 30px rgba(0, 0, 0, 0.7); }
  100% { text-shadow: 
    0 0 5px rgba(0, 0, 0, 0.9),
    0 0 10px rgba(0, 0, 0, 0.7),
    0 0 15px rgba(0, 0, 0, 0.5); }
}

/* TRANSITION */
a,
.btn {
  transition: all 300ms ease;
}

/* SIDEBAR NAV */
#sidebar-nav {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 70px;
  background: var(--background-alt);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1000;
  padding: 1rem 0;
  border-top-right-radius: 1rem;
  border-bottom-right-radius: 1rem;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease;
}

[data-theme="dark"] #sidebar-nav {
  box-shadow: 2px 0 10px rgba(255, 255, 255, 0.1);
}

.sidebar-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  flex-grow: 1;
  justify-content: center;
}

.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--text-dark);
  background: transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

.sidebar-icon {
  font-size: 1.8rem;
  color: var(--text-dark);
  transition: color 0.3s ease, transform 0.3s ease;
}

[data-theme="dark"] .sidebar-link {
  color: var(--text-light);
}

[data-theme="dark"] .sidebar-icon {
  color: var(--text-light);
}

/* Hover Effects */
.sidebar-link:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.15) rotate(10deg);
  animation: pulseHover 0.6s ease-in-out infinite;
}

[data-theme="dark"] .sidebar-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-link:hover .sidebar-icon {
  color: var(--primary);
}

/* Active State */
.sidebar-link.active {
  background: var(--primary);
  transform: scale(1.2);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  animation: pop 0.2s ease-out;
}

[data-theme="dark"] .sidebar-link.active {
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.sidebar-link.active .sidebar-icon {
  color: var(--text-light);
}

/* Click Animation */
.sidebar-link.clicked {
  animation: pop 0.2s ease-out;
}

/* Tooltip */
.sidebar-link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 60px;
  background: var(--primary);
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1001;
}

.sidebar-link:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Animations */
@keyframes pulseHover {
  0% { box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); }
  50% { box-shadow: 0 0 15px rgba(0, 0, 0, 0.4); }
  100% { box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); }
}

[data-theme="dark"] @keyframes pulseHover {
  0% { box-shadow: 0 0 5px rgba(255, 255, 255, 0.2); }
  50% { box-shadow: 0 0 15px rgba(255, 255, 255, 0.4); }
  100% { box-shadow: 0 0 5px rgba(255, 255, 255, 0.2); }
}

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

/* HAMBURGER BUTTON */
.hamburger-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 50%;
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 2000;
  transition: transform 0.3s ease, background 0.3s ease;
}

.hamburger-btn span {
  width: 20px;
  height: 2px;
  background: #ffffff;
  margin: 3px 0;
  transition: all 0.3s ease;
}

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

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

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

.hamburger-btn:hover {
  transform: scale(1.1);
}

.about-content {
  font-size: 3rem;
  margin-top: 40px;
  margin-bottom: 10px;
}

/* TOP MENU */
#top-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1500;
}

#top-menu.open {
  transform: translateX(0);
}

.menu-links {
  list-style-type: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  min-height: 100%;
  padding: 2rem;
}

.menu-links a {
  color: var(--text-light);
  font-size: 4rem;
  text-decoration: none;
  position: relative;
  transition: transform 0.3s ease;
}

.menu-links a:hover {
  /* transform: scale(1.1); */
}

.menu-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  /* background: var(--text-light); */
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: width 0.3s ease;
}

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

/* THEME TOGGLE BUTTON */
#theme-toggle {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1000;
}

.theme-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

[data-theme="dark"] .theme-toggle {
  color: var(--text-light);
}

.theme-toggle:hover {
  color: var(--primary);
  transform: scale(1.1);
}

/* SIDEBAR THEME TOGGLE BUTTON */
.theme-toggle-sidebar {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle-sidebar:hover {
  background: var(--primary);
  transform: scale(1.1);
}

.theme-toggle-sidebar:hover .sidebar-icon {
  color: var(--text-light);
}

.theme-icon-sidebar {
  font-size: 1.5rem;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

[data-theme="dark"] .theme-icon-sidebar {
  color: var(--text-light);
}

[data-theme="dark"] .theme-toggle-sidebar:hover .theme-icon-sidebar {
  color: var(--text-light);
}

/* SECTIONS */
section, #about-detail, #projects-detail {
  padding: 4rem 10rem;
  margin: 2rem 0;
  box-sizing: border-box;
  min-height: fit-content;
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

section.visible, #about-detail.visible, #projects-detail.visible {
  opacity: 1;
}

/* Right-to-left transition for scroll down */
section .section__text,
section .section__pic-container,
section .about-details-container,
section .experience-details-container,
section .contact-container,
#about-detail .about-detail-text,
#about-detail .about-detail-image,
#projects-detail .projects-detail-text,
#projects-detail .projects-detail-image {
  opacity: 0;
  transform: translateX(100px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

section.visible .section__text,
section.visible .section__pic-container,
section.visible .about-details-container,
section.visible .experience-details-container,
section.visible .contact-container,
#about-detail.visible .about-detail-text,
#about-detail.visible .about-detail-image,
#projects-detail.visible .projects-detail-text,
#projects-detail.visible .projects-detail-image {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered appearance for content */
section.visible .section__text,
#about-detail.visible .about-detail-text,
#projects-detail.visible .projects-detail-text {
  transition-delay: 0.2s;
}

section.visible .section__pic-container,
section.visible .about-details-container,
#about-detail.visible .about-detail-image,
#projects-detail.visible .projects-detail-image {
  transition-delay: 0.4s;
}

section.visible .experience-details-container,
section.visible .contact-container {
  transition-delay: 0.6s;
}

/* Ensure initial visibility for profile section */
#profile {
  opacity: 1;
}

#profile.visible .section__text,
#profile.visible .section__pic-container {
  opacity: 1;
  transform: translateX(0);
}

/* Remove previous transform animations */
section, #about-detail, #projects-detail {
  transform: none;
}

.section-container {
  display: flex;
}

/* NEW SECTION STYLES */
.about-detail-container,
.projects-detail-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80%;
  gap: 2rem;
}

.about-detail-text,
.projects-detail-text {
  flex: 1;
  text-align: left;
}

.about-detail-image,
.projects-detail-image {
  flex: 1;
  overflow: hidden;
  border-radius: 2rem;
}

.about-detail-pic,
.projects-detail-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2rem;
}

/* ANIMATIONS */
.animate-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-image {
  animation: zoomInOut 0.6s ease-in-out infinite;
}

/* Updated Underline Animation for Section Titles */
.title {
  font-size: 4rem;
  text-align: center;
  color: var(--text-dark);
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.title::after {
  content: '';
  position: absolute;
  bottom: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.8s ease-in-out;
  width: 0;
}

#profile.visible .title::after {
  width: 0;
}

#about.visible .title::after {
  width: 100%;
  left: 0;
}

#experience.visible .title::after {
  width: 100%;
  right: 0;
}

#projects.visible .title::after {
  width: 100%;
  left: 0;
}

#contact.visible .title {
  font-size: 3.5rem;
}

#contact.visible .title::after {
  width: 100%;
  left: 50%;
  transform: translateX(-50%);
}

/* Updated Image Size Increase Animation for About Section */
.about-image {
  transition: transform 0.8s ease-in-out;
}

#about.visible .about-image {
  transform: scale(1.05);
}

#about .section__pic-container {
  width: 100%;
  max-width: 500px;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: auto 0;
}

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

/* IMAGE ZOOM ANIMATION */
.project-img,
.about-pic,
.section__pic-container img {
  transition: transform 0.3s ease;
}

.project-img:hover,
.about-pic:hover,
.section__pic-container img:hover {
  animation: zoomInOut 0.6s ease-in-out;
}

/* ICONS */
.icon {
  cursor: pointer;
  height: 2rem;
}

.social-icon,
.about-icon {
  filter: invert(0);
}

[data-theme="dark"] .social-icon,
[data-theme="dark"] .about-icon {
  filter: invert(1);
}

.arrow,
.experience-details-container .icon {
  filter: none;
}

/* PROFILE SECTION */
#profile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5rem;
  padding: 4rem 10rem;
  margin: 2rem 0;
}

#profile .section__text {
  margin-bottom: 2rem;
}


.section__pic-container {
  display: flex;
  height: 400px;
  width: 400px;
  margin: auto 0;
  overflow: hidden;
}

.section__pic-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2rem;
}

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

.section__text p {
  font-weight: 600;
  font-size: 2rem;
}

.section__text__p1 {
  text-align: center;
}

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

#profile .title {
  font-size: 4rem;
}

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

.btn {
  font-weight: 600;
  padding: 1rem;
  width: 8rem;
  border-radius: 2rem;
  cursor: pointer;
  transform: scale(1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn-color-1,
.btn-color-2 {
  border: var(--primary) 0.1rem solid;
  background: var(--background);
  color: var(--text-dark);
}

.btn-color-1:hover,
.btn-color-2:hover {
  background: var(--primary);
  color: var(--text-light);
}

.btn-color-1:hover {
  background: var(--text-dark);
}

.btn-color-2 {
  background: none;
  margin-bottom: 40px;
  border-bottom-width: 6px;
}

.btn-color-2:hover {
  border: var(--text-light) 0.1rem solid;
}

.project-btn {
  color: var(--text-dark);
  border-color: var(--border);
}

/* ABOUT SECTION */
#about {
  position: relative;
  padding: 4rem 10rem;
  margin: 2rem 0;
}

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

.about-details-container {
  justify-content: center;
  flex-direction: column;
}

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

.about-pic {
  border-radius: 2rem;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.arrow {
  position: absolute;
  right: -5rem;
  bottom: 2.5rem;
}

.details-container {
  padding: 1.5rem;
  flex: 1;
  background: var(--background-alt);
  border-radius: 2rem;
  border: var(--border) 0.1rem solid;
  text-align: center;
}

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

/* EXPERIENCE SECTION */
#experience {
  position: relative;
  padding: 4rem 10rem;
  margin: 2rem 0;
}

.experience-sub-title {
  color: var(--text);
  font-weight: 600;
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

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

/* PROJECTS SECTION */
#projects {
  position: relative;
  padding: 4rem 10rem;
  margin: 2rem 0;
}

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

article {
  display: flex;
  width: 10rem;
  justify-content: space-around;
  gap: 0.5rem;
}

article .icon {
  cursor: default;
}

.color-container {
  border-color: var(--border);
  background: var(--background-alt);
}

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

.project-title {
  margin: 1rem;
  color: var(--text-dark);
}

/* CONTACT SECTION */
#contact {
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 4rem 10rem;
  margin: 2rem 0;
}

.contact-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.contact-info-upper-container {
  margin-top: 50px;
  display: flex;
  justify-content: center;
  border-radius: 2rem;
  border: var(--border) 0.1rem solid;
  background: var(--background-alt);
  padding: 1rem;
  width: 100%;
  flex-wrap: wrap;
}

.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;
}

.email-icon {
  height: 2.5rem;
}

.contact-form-container {
  width: 100%;
  background: var(--background-alt);
  border: var(--border) 0.1rem solid;
  border-radius: 2rem;
  padding: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: var(--border) 0.1rem solid;
  border-radius: 0.5rem;
  background: var(--background);
  color: var(--text-dark);
  font-size: 1rem;
  font-family: "Hind", sans-serif;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group button {
  width: 100%;
  max-width: 200px;
  align-self: center;
}

/* FOOTER SECTION */
footer {
  padding: 2rem 1rem;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, var(--background-alt), var(--background));
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

footer p {
  text-align: center;
  color: var(--text-dark);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--secondary);
}

[data-theme="dark"] footer p {
  color: var(--secondary);
}