/* Define Theme Colors */
:root {
  --primary-color: #e0e0e0;
  --primary-dark: #81b8ff;
  --background-light: #f4f4f4;
  --background-medium: #e4e4e4;
  --background-dark: #d4d4d4;
  --background-black: #000;
  --text-gray: #424242;
  --white: #ffffff;
}

/* Reset and Basic Styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: "Raleway", serif;
  color: var(--primary-color);
  background: var(--background-black);
  line-height: 1.6;
  min-width: unset;
  width: 100%;
}

/* Apply blur to the background when the modal is open */
body.modal-open {
  overflow: hidden;
  height: 100vh;
}

/* You can also add a slight dark overlay */
body.modal-open::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  filter: blur(1px); /* Adjust the blur strength here */
  z-index: 1001; /* Ensure it's behind the modal */
}

.dark-mode {
  background-color: var(--background-black);
  color: #ffffff;
}

body h1 {
  font-size: 60px;
  text-align: left; 
  margin-top: auto; 
}

body h2 {
  font-size: 50px;
  margin-top: auto;
}

h3 {
  margin-top: 20px;
  font-size: 1.5em;
}

/* Navigation Bar */
nav {
  background-color: var(--background-black);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  padding: 10px 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Navigation List */
nav ul {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 0;
  flex-grow: 1;
  align-items: center; /* Ensures all items (text & image) are vertically aligned */
  gap: clamp(5px, 4vw, 20px);
}

/* List Items */
nav ul li {
  margin: 0 0;
}

/* Navigation Links */
nav ul li a {
  color: var(--white);
  text-decoration: none;
  font-size: clamp(16px, 5vw, 31px);
  transition: 0.3s;
  text-align: center;
}

nav ul li a:hover,
nav ul li a.active {
  -webkit-text-fill-color: var(--primary-dark);
}

/* Profile Icon/image (Last Item) */
nav ul li:last-child {
  margin-left: auto; /* Moves it to the right */
  padding: 10px; /* Ensures spacing from the right edge */
}

/* For the profile icon/image */
.nav-profile-image, .nav-profile-icon {
  width: clamp(20px, 5vw, 30px); /* Size based on window size */
  height: clamp(20px, 5vw, 30px);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary-color);
  transition: color 0.3s;
}

/* Profile Icon specifically */
.nav-profile-icon {
  display: flex; /* Flex to center the icon inside */
  font-size: clamp(16px, 4vw, 30px);
  justify-content: center;
  align-items: center;
}

/* Profile Image specifically */
.nav-profile-image {
  display: block; /* Make it visible when added */
  border-radius: 50%; /* Keeps image circular */
}

/* Auth Modal */
#authModal .modal-window {
  background: white;
  border-radius: 10px;
  max-width: 500px;
  min-width: 300px;
  height: auto;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
  text-align: left;
  z-index: 1002;
}

#authModal .modal-buttons {
  background: white;
  border-radius: 10px 10px 0 0;
  padding-right: 10px;
  position: sticky;
  top: 0;
  z-index: 1001;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
  

#authModal .modal-content {
    padding: 20px 30px;
    text-align: center;
  }
  

#authModal form {
    display: flex;
    flex-direction: column;
    max-width: 300px;
    margin: 0 auto;
  }

#authModal form {
  display: flex;
  flex-direction: column;
  max-width: 300px;
  margin: 0 auto;
}

#authModal label {
  align-self: flex-start;
  margin-top: 10px;
  font-weight: bold;
  color: var(--text-gray);
}

#authModal input {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
}
  
#authModal p {
  margin-top: 10px;
  font-size: 14px;
}

#authModal a {
  color: var(--primary-dark);
  text-decoration: none;
}

#authModal a:hover {
  text-decoration: underline;
}

#userDetails p {
  margin: 10px 0;
  text-align: left;
}

/* Section Styling */
section {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 0;
}

/* Home Section */
#home {
  padding: 100px 40px;
  text-align: left; 
}

#home h2 {
  color: var(--primary-dark);
}

.resume-button {
  text-align: left;
  margin-top: auto;
  padding-bottom: 40px;
}

/* Resume Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1002;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
}

.modal-window {
  background: white;
  border-radius: 10px;
  max-width: 1000px;
  min-width: 400px;
  height: auto;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
  text-align: left;
}

.modal-content {
  padding: 0 30px 0 30px;
}

/* Modal Buttons (Sticky at Top, Full Width) */
.modal-buttons {
  background: white;
  border-radius: 10px 10px 0 0;
  padding-right: 10px;
  position: sticky;
  top: 0;
  z-index: 1001; /* Above other content */
  display: flex;
  justify-content: space-between; /* Spread buttons across width */
  align-items: center;
  width: 100%; /* Full width of modal */
}

/* Button Styling */
.close, .print, .download-pdf {
  font-size: 18px;
  cursor: pointer;
  color: var(--primary-color);
  transition: color 0.3s;
  padding: 5px 10px; /* Compact padding for sticky bar */
}

/* Select Resume Button */
.select-resume {
  font-size: 18px;
  cursor: pointer;
  color: var(--primary-color);
  transition: color 0.3s;
  padding: 5px 10px;
  background: none; /* Ensure no background interferes */
  border: none; /* Remove any default button-like borders */
  text-align: center;
}

/* Ensure it stands out on hover */
.select-resume:hover {
  color: var(--primary-dark);
}

/* Resume Dropdown */
.resume-dropdown {
  position: absolute;
  top: 40px; /* Position below the button */
  right: 60px; /* Align with the select-resume button */
  background: var(--white);
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1002; /* Above other modal content */
  padding: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.resume-dropdown a {
  display: block;
  color: var(--background-black);
  text-decoration: none;
  padding: 5px 10px;
  transition: background-color 0.3s;
}

.resume-dropdown a:hover {
  background-color: var(--background-light);
  color: var(--primary-dark);
}

.close:hover, .print:hover, .download-pdf:hover {
  color: var(--primary-dark);
}

/* Position Close on the left, others on the right */
.close {
  margin-right: auto; /* Pushes to the left */
}

.modal-content iframe {
  flex: 1;
  width: 100%;
  border: none;
}

/* Contact Details in Resume Modal */
.contact-details {
  list-style: none;
  padding: 0;
  margin-left: 0;
  margin: 10px 0 20px; /* Space above and below */
  display: flex; /* Ensure horizontal layout */
  flex-wrap: wrap; /* Allow wrapping on small screens */
  gap: 5px; /* Space between items */
  font-size: 0.9em; /* Slightly smaller text for compactness */
}

.contact-details li {
  display: inline; /* Horizontal layout for each item */
  white-space: nowrap; /* Prevent wrapping within items */
}

.contact-details li:after {
  content: " | "; /* Separator between items */
  color: var(--text-gray); /* Lighter gray for separators */
}

.contact-details li:last-child:after {
  content: ""; /* No separator after last item */
}

.contact-details a {
  color: var(--background-black); /* Matches text color */
  text-decoration: none; /* Remove underline */
  transition: color 0.3s; /* Smooth hover effect */
}

.contact-details a:hover {
  color: var(--primary-dark); /* Blue on hover, matches your theme */
}

/* Ensure horizontal layout in modal */
.modal-content .contact-details {
  display: flex !important; /* Override any inherited styles */
}

.modal-content{
  color: var(--background-black);
}

.modal-content h3, .modal-content h2{
  color: var(--primary-dark);
}

.job-entry, .edu-entry{
  margin-bottom: 20px;
}

.modal-content h4 {
  font-size: 120%;
}

.responsibilities, .achievements {
  margin: 10px 0 0; /* Space above the list */
  padding-left: 20px; /* Indent for readability */
}

/* Skills List */
.skills-list {
  list-style-type: none; /* Remove bullets from Skills */
  padding-left: 0; /* No indent */
}

.skills-list li {
  margin: 10px 0;
  color: var(--background-black);
}

/* Ensure job entry layout in print and modal */
@media print {
  .job-entry {
    page-break-inside: avoid; /* Prevent breaking within a job entry */
  }
  body.modal-open::before {
    display: none;
  }
}

/* Project Section */
#projects {
  padding: 100px 20px;
  text-align: center;
}

.project-container {
  margin-top: 30px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  overflow-x: hidden;
  width: 100%;
  height: 50vh;
  scroll-behavior: smooth;
}

.project-card {
  flex: 0 0 50%;
  height: 100%;
  justify-content: center;
  align-items: center;
  text-decoration: none; 
  background: var(--white);
  color: var(--text-gray);
  padding: 20px;
  scroll-snap-align: start;
  border-radius: 8px;
  transform: scale(0.9);
  opacity: 0.5;
  transition: all 0.3s ease;
  cursor: pointer;
  filter: blur(1px);
  display: flex;
}

.project-card.active {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
  z-index: 2;
}

.card:not(.active) {
  opacity: 0.7;
}

.project-card img {
  max-width: 100%;
  height: auto;
  display: block;
}

.project-dots {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.project-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ccc;
  margin: 0 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.project-dot.active {
  background: var(--primary-dark); 
}

.project-card:not(.active):hover {
  transform: scale(0.95);
} 

.project-card img {
  width: 100%;
  height: auto;
  border-radius: 5px;
}

/* Social Bar */
.social-bar {
  display: flex;
  justify-content: center;
  gap: 35px;
}

.social-icon {
  font-size: 40px;
  color: var(--primary-color);
  transition: color 0.3s, transform 0.3s;
}

.social-icon:hover {
  color: var(--primary-dark);
  transform: scale(1.2);
}

/* Contact Section */
#contact {
  padding: 100px 20px;
  text-align: center;
}

form {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 400px;
  margin: auto;
}

label {
  align-self: flex-start;
  margin-top: 10px;
  font-weight: bold;
}

input, textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
}

textarea {
  resize: vertical;
}

textarea:focus {
  background-image: none;
}

button {
  margin-top: 15px;
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 20px;
  cursor: pointer;
  transition: 0.3s;
  font-weight: bold;
}

button:hover {
  color: var(--primary-dark);
}