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

:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --text-dark: #1f2937;
  --text-medium: #4b5563;
  --text-light: #9ca3af;
  --border-color: #e5e7eb;
  --bg-light: #f9fafb;
  --success-color: #10b981;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Poppins", sans-serif;
  overflow-x: hidden;
  width: 100%;
  transition: background-color 0.3s ease, color 0.3s ease;
  background-color: var(--bg-light);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 17vh;
}

p {
  color: var(--text-medium);
  line-height: 1.6;
}

/* DARK MODE */
body.dark-mode {
  --text-dark: rgb(229, 229, 229);
  --text-medium: rgb(200, 200, 200);
  --text-light: rgb(150, 150, 150);
  --border-color: rgb(75, 75, 75);
  --bg-light: rgb(45, 45, 45);
  background-color: rgb(45, 45, 45);
  color: var(--text-medium);
}

body.dark-mode #profile,
body.dark-mode section,
body.dark-mode nav {
  background-color: rgb(45, 45, 45);
}

body.dark-mode nav {
  background: rgb(50, 50, 50);
}

body.dark-mode .details-container,
body.dark-mode .modal-content {
  background: rgb(55, 55, 55);
  border-color: rgb(65, 65, 65);
}

body.dark-mode .color-container {
  background: rgb(50, 50, 50);
}

/* DARK MODE TOGGLE */
.dark-mode-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--text-dark);
  color: var(--bg-light);
  /* Ensure icon color contrasts */
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
  transform: rotate(180deg) scale(1.1);
}

.dark-mode-toggle .sun-icon {
  display: block;
  color: white;
}

.dark-mode-toggle .moon-icon {
  display: none;
  color: white;
}

body.dark-mode .dark-mode-toggle .sun-icon {
  display: none;
}

body.dark-mode .dark-mode-toggle .moon-icon {
  display: block;
  color: black;
  /* Moon icon should be dark on the light button */
}

/* Fix Dark Mode Toggle Bg in Dark Mode */
body.dark-mode .dark-mode-toggle {
  background: white;
  /* Make button white in dark mode so moon (black) shows up */
}

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

/* ANIMATIONS */
.fade-in {
  animation: fadeIn 0.8s ease-in;
}

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-left {
  opacity: 0;
  animation: fadeInLeft 0.8s ease-out forwards;
}

.fade-in-right {
  opacity: 0;
  animation: fadeInRight 0.8s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.bounce:hover {
  animation: bounce 0.6s ease;
}

/* BACK TO TOP BUTTON */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--text-dark);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

body.dark-mode .back-to-top {
  color: black;
}

.back-to-top:hover {
  background: var(--text-medium);
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.back-to-top.show {
  display: flex;
}

/* NAVIGATION */
nav,
.nav-links {
  display: flex;
}

nav {
  justify-content: space-around;
  align-items: center;
  height: 17vh;
  background: white;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: background 0.3s ease;
}

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

a {
  color: black;
  text-decoration: none;
}

a:hover {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 1rem;
  text-decoration-color: var(--primary-color);
}

body.dark-mode a {
  color: var(--text-dark);
}

.logo {
  font-size: 2rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo:hover {
  cursor: default;
}

/* HAMBURGER MENU */
#hamburger-nav {
  display: none;
}

.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: black;
  transition: all 0.3s ease-in-out;
}

body.dark-mode .hamburger-icon span {
  background-color: white;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
}

body.dark-mode .menu-links {
  background-color: rgb(25, 25, 25);
}

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

body.dark-mode .menu-links a {
  color: white;
}

.menu-links a:hover {
  background: var(--bg-light);
  color: var(--primary-color);
}

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

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

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

/* SECTIONS */
section {
  padding-top: 0;
  padding-bottom: 4vh;
  margin: 0 auto;
  padding-left: 8rem;
  padding-right: 8rem;
  box-sizing: border-box;
  max-width: 1400px;
  position: relative;
  scroll-margin-top: -15vh;
}

#profile {
  min-height: 85vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 0;
  padding-bottom: 2vh;
  gap: 5rem;
}

.section-container {
  display: flex;
  gap: 5rem;
  align-items: center;
}

/* PROFILE SECTION */
.section__pic-container {
  display: flex;
  height: 400px;
  width: 400px;
  margin: auto 0;
  flex-shrink: 0;
}

.section__pic-container img {
  border-radius: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* HERO MINI CARDS */
.hero-mini-cards {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.mini-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: white;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

body.dark-mode .mini-card {
  background: rgb(55, 55, 55);
  border-color: rgb(65, 65, 65);
}

body.dark-mode .mini-icon {
  filter: invert(1);
}

.mini-icon {
  height: 1.5rem;
  width: auto;
}

.mini-card-content {
  text-align: left;
}

.mini-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.1rem;
}

.mini-card p {
  font-size: 0.8rem;
  color: var(--text-medium);
  margin: 0;
  line-height: 1.2;
}

.mini-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

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

.section__text p {
  font-weight: 600;
}

.section__text__p1 {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-medium);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.section__text__p2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.title {
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

/* RESEARCH BADGE */
.research-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(139, 92, 246, 0.1));
  border-radius: 2rem;
  padding: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--primary-color);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

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

/* ICONS */
.icon {
  cursor: pointer;
  height: 2rem;
  transition: transform 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.2) rotate(5deg);
}

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

.btn {
  font-weight: 600;
  transition: all 300ms ease;
  padding: 1rem 1.5rem;
  width: 9rem;
  border-radius: 2rem;
  font-size: 1rem;
  cursor: pointer;
}

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

.btn-color-1:hover,
.btn-color-2:hover {
  cursor: pointer;
  transform: translateY(-3px);
}

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

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

body.dark-mode .btn-color-1 {
  background: white;
  color: black;
  border-color: white;
}

body.dark-mode .btn-color-1:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

body.dark-mode .btn-color-2 {
  color: white;
  border-color: white;
}

body.dark-mode .btn-color-2:hover {
  background: white;
  color: black;
}

.btn-color-2 {
  background: none;
  color: var(--text-dark);
}

.btn-color-2:hover {
  background: var(--text-dark);
  color: white;
  border-color: var(--text-dark);
}

.hover-lift {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
}

/* ABOUT SECTION */
#about {
  position: relative;
  padding-top: 0vh;
  padding-bottom: 8vh;
}

#about .section__pic-container {
  width: 400px;
  height: 400px;
  flex-shrink: 0;
}

#about .section__pic-container img {
  border-radius: 2rem;
}

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

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

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

.about-pic {
  border-radius: 2rem;
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.arrow {
  display: none;
}

.details-container {
  padding: 2rem;
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .details-container {
  background: rgba(0, 0, 0, 0.2);
  /* Darker tint for dark mode */
  border-color: rgba(255, 255, 255, 0.05);
}

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

.text-container {
  margin-top: 1.5rem;
}

.text-container p {
  font-size: 1.125rem;
  line-height: 1.8;
  text-align: left;
  color: var(--text-medium);
  margin-bottom: 1rem;
}

/* SKILLS SECTION */
#experience {
  position: relative;
  padding-top: 0vh;
  padding-bottom: 6vh;
}

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

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

.article-container {
  display: flex;
  text-align: center;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 1rem;
  justify-content: center;
  padding: 1rem;
}

article {
  display: flex;
  width: auto;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0;

  /* Badge / Pill Styling */
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  background: rgba(139, 92, 246, 0.1);
  /* Subtle purple tint */
  border: 1px solid rgba(139, 92, 246, 0.2);
  transition: all 0.3s ease;
  cursor: default;
}

body.dark-mode article {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
}

article:hover {
  transform: translateY(-5px);
  background: rgba(139, 92, 246, 0.25);
  box-shadow: 0 5px 15px rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.5);
}

article .icon {
  cursor: default;
  flex-shrink: 0;
}

article div h3 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dark);
  margin: 0;
  display: block;
}

/* Ensure text is readable in both modes */
body.dark-mode article div h3 {
  color: #e5e7eb;
}

/* Remove old bullet points entirely */
article div h3::before,
article:has(.icon) div h3::before {
  content: none;
  display: none;
}

/* PROJECTS SECTION */
#projects {
  position: relative;
  padding-top: 0vh;
  padding-bottom: 6vh;
}

.color-container {
  border-color: var(--border-color);
  background: var(--bg-light);
  border-width: 3px;
  padding: 1.5rem;
}

.project-card {
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
}

.project-img {
  border-radius: 2rem;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.project-title {
  margin: 1rem 1rem 0.5rem 1rem;
  color: black;
  font-size: 1.1rem;
  line-height: 1.4;
}

body.dark-mode .project-title {
  color: var(--text-dark);
}

.project-duration {
  font-size: 0.9rem;
  color: var(--primary-color);
  font-weight: 500;
  margin: 0.5rem 1rem;
  font-style: italic;
}

body.dark-mode .project-duration {
  color: #aebbf2;
  /* Lighter purple/blue for better contrast against dark bg */
}

/* PROJECT STATS */
.project-stats {
  display: flex;
  justify-content: space-around;
  margin: 1rem 0 1.5rem 0;
  padding: 1rem;
  background: rgba(37, 99, 235, 0.05);
  border-radius: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-medium);
  text-align: center;
}

.project-btn {
  color: var(--text-dark);
  border-color: var(--border-color);
  border-width: 2.5px;
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  width: 8rem;
  margin: 0.5rem;
}

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

#projects .btn-container {
  gap: 1rem;
  margin-bottom: 1rem;
}

#projects .about-containers {
  gap: 3rem;
}

/* MODAL STYLES */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background-color: #fefefe;
  margin: 3% auto;
  padding: 0;
  border: 1px solid #888;
  border-radius: 1.5rem;
  width: 85%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: slideIn 0.4s ease;
  position: relative;
}

body.dark-mode .modal-content {
  background-color: rgb(25, 25, 25);
  border-color: rgb(60, 60, 60);
}

@keyframes slideIn {
  from {
    transform: translateY(-50px) scale(0.95);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

body.dark-mode .modal-content::-webkit-scrollbar-track {
  background: rgb(40, 40, 40);
}

.modal-content::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

.close {
  color: #aaa;
  position: sticky;
  top: 0;
  right: 0;
  float: right;
  font-size: 35px;
  font-weight: bold;
  padding: 10px 25px;
  z-index: 1;
  background: white;
  border-radius: 0 1.5rem 0 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

body.dark-mode .close {
  background: rgb(25, 25, 25);
  color: var(--text-light);
}

.close:hover,
.close:focus {
  color: var(--primary-color);
  transform: rotate(90deg);
}

.modal-title {
  font-size: 2rem;
  margin: 2rem 2.5rem 1rem 2.5rem;
  padding-top: 1rem;
  color: var(--text-dark);
  line-height: 1.3;
}

.modal-body {
  padding: 0 2.5rem 2.5rem 2.5rem;
}

.modal-image {
  margin: 2rem 0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.modal-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 1rem;
}

.modal-section {
  margin-bottom: 2.5rem;
}

.modal-section h3 {
  font-size: 1.4rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  display: inline-block;
}

.modal-section p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-medium);
}

.modal-section ul {
  list-style-position: outside;
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

.modal-section ul li {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-medium);
  margin-bottom: 0.8rem;
}

.modal-section ul li strong {
  color: var(--text-dark);
}

.modal-section a {
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: 500;
  transition: all 0.3s ease;
}

.modal-section a:hover {
  color: var(--primary-hover);
  text-decoration-thickness: 2px;
}

/* GALLERY */
.gallery-section {
  margin-top: 3rem;
}

.gallery-section p {
  text-align: center;
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.gallery-item {
  position: relative;
  cursor: pointer;
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px) scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(37, 99, 235, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  padding: 0.5rem 1rem;
  border: 2px solid white;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
}

/* LIGHTBOX */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  padding: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease;
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.3s ease;
  transition: opacity 0.15s ease;
}

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

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: white;
  font-size: 50px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2001;
}

.lightbox-close:hover {
  color: var(--primary-color);
  transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 50px;
  font-weight: bold;
  padding: 20px;
  user-select: none;
  transition: all 0.3s ease;
  z-index: 2001;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--primary-color);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-caption {
  text-align: center;
  color: white;
  padding: 20px;
  font-size: 1.2rem;
  margin-top: 1rem;
  max-width: 800px;
}

.lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  backdrop-filter: blur(10px);
}

/* CONTACT SECTION */
#contact {
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding-top: 0vh;
  padding-bottom: 2vh;
}

.contact-form-container {
  max-width: 600px;
  margin: 2rem auto;
  width: 100%;
}

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

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: 1rem;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  background: white;
  color: var(--text-dark);
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
  background: rgb(25, 25, 25);
  border-color: rgb(60, 60, 60);
  color: var(--text-dark);
}

/* Placeholder Contrast Fix */
body.dark-mode ::placeholder {
  color: #a0a0a0;
  opacity: 1;
}

body.dark-mode :-ms-input-placeholder {
  color: #a0a0a0;
}

body.dark-mode ::-ms-input-placeholder {
  color: #a0a0a0;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--text-dark);
}

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

.contact-form .btn {
  width: 100%;
  font-size: 1.1rem;
  padding: 1.2rem;
}

/* FORM SUCCESS MESSAGE */
.form-success {
  display: none;
  text-align: center;
  padding: 3rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(37, 99, 235, 0.1));
  border-radius: 1rem;
  border: 2px solid var(--success-color);
}

.form-success.show {
  display: block;
  animation: fadeInUp 0.5s ease;
}

.form-success svg {
  color: var(--success-color);
  margin-bottom: 1rem;
}

.form-success h3 {
  color: var(--success-color);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.form-success p {
  font-size: 1.1rem;
  color: var(--text-medium);
}

.contact-divider {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-light);
  margin: 1rem 0;
  position: relative;
}

.contact-divider::before,
.contact-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 2px;
  background: var(--border-color);
}

.contact-divider::before {
  left: 0;
}

.contact-divider::after {
  right: 0;
}

.contact-info-upper-container {
  display: flex;
  justify-content: center;
  border-radius: 2rem;
  border: var(--text-dark) 0.1rem solid;
  border-color: var(--border-color);
  background: var(--bg-light);
  margin: 1.5rem auto;
  padding: 1rem;
  gap: 2rem;
  transition: all 0.3s ease;
}

body.dark-mode .contact-info-upper-container {
  background: rgb(30, 30, 30);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .contact-info-upper-container a {
  color: white;
}

.contact-info-upper-container:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transform: translateY(-5px);
}

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

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

.contact-info-container a {
  color: var(--text-dark);
  transition: color 0.3s ease;
}

.contact-info-container a:hover {
  color: var(--primary-color);
}

.contact-icon {
  cursor: default;
  transition: transform 0.3s ease;
}

.contact-info-container:hover .contact-icon {
  transform: scale(1.15);
}

/* Fix Icon Colors in Dark Mode */
body.dark-mode .icon,
body.dark-mode .contact-icon {
  filter: invert(1);
}

/* Exception for social icons that might already be colored or white */
body.dark-mode .social-icon {
  filter: invert(1);
}

.email-icon {
  height: 2.5rem;
}

/* FOOTER */
footer {
  height: 15vh;
  margin: 0 1rem;
  padding-top: 1rem;
}

footer p {
  text-align: center;
  margin-top: 1rem;
  color: var(--text-medium);
}

footer .nav-links a:hover {
  color: var(--primary-color);
}

/* MOBILE FIXES - MUST BE AT END */
@media screen and (max-width: 600px) {
  #profile .section__pic-container {
    width: 260px !important;
    height: 260px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
  }

  #profile .section__pic-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
  }

  #about .section__pic-container {
    width: 200px !important;
    height: 200px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
  }

  #about .section__pic-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
  }
}