/* Reset default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.container {
  max-width: 100%; /* Prevent elements from exceeding the viewport */
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto; /* Maintain aspect ratio */
}

.text-content {
  word-wrap: break-word; /* Prevent text overflow */
}

html, body {
  overflow-x: hidden; /* Prevent horizontal scrolling */
  width: 100%; /* Ensure full width */
}

html {
  scroll-behavior: smooth;
}

img, table, iframe {
  max-width: 100%; /* Ensure they don't exceed container width */
}

/* Define global light theme variables */
:root {
  --bg-color: #ecf0f1;
  --text-color: #2c3e50;
  --primary-color: #1abc9c;
  --secondary-color: #34495e;
  --border-color: #3498db;
  --button-hover-bg: #16a085;
  --header-bg: #34495e;
}

/* Light Mode Styling */
body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #f6f8f9 0%, #e5ebee 100%);
  background-size: cover; /* Ensure gradient covers the entire screen */
  background-position: center; /* Ensure gradient is centered */
  margin: 0;
  padding: 0;
}

/* Header Styles */
header {
  background: var(--header-bg);
  background-size: cover;
  background-position: center;
  color: white;
  height: 80px; /* Reduced height */
  display: flex; /* Flexbox layout for alignment */
  align-items: center; /* Center items vertically */
  justify-content: space-between; /* Space between title and toggle */
  padding: 0 20px; /* Side padding */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  position: relative;
}

/* Portfolio Title Styling */
.portfolio-title {
  font-family: 'penna', sans-serif;
  font-size: 2.5rem;
  font-weight: bold;
  background: linear-gradient(90deg, #3a86ff, #6f42c1, #ff006e, #3a86ff);
  background-size: 300% 300%;
  -webkit-background-clip: text; /* Safari */
  background-clip: text;
  color: transparent;
  animation: gradientFlow 5s ease infinite;
  margin: 0;
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

header nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

header nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

header nav ul li a:hover {
  border-bottom: 2px solid var(--primary-color);
}

h1, h2, h3 {
  color: #2c3e50;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

section {
  background-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(10px); /* Safari */
  padding: 2rem;
  margin: 1.5rem auto;
  width: 100;
  max-width: 900px;
  border-radius: 10px;
  border: 2px solid #e0e0e0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  width: 100%;
  min-height: 250px;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(20px); /* Initial transform */
  transition: opacity 1s ease-out, transform 1s ease-out; /* Transition for opacity and transform */
}

section.fade-in {
  opacity: 1;
  transform: translateY(0); /* Final transform */
}

p {
  margin-bottom: 1rem;
  font-size: clamp(0.9rem, 3vw, 1rem);
}

/* Project Section Styles */
.project {
  margin-bottom: 2rem;
  padding: 2rem;
  border: 3px solid var(--border-color);
  border-color: dimgrey;
  border-radius: 10px;
  background-color: transparent;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 900px;
  margin: 2rem auto;
}

/* Project List and Technology Styling */
.project ul {
  margin: 0.5rem 0;
  padding-left: 20px;
  list-style-type: disc;
}

.project-link {
  margin-top: 20px; /* Add vertical space */
}

.project p {
  margin-bottom: 1rem;
}

/* Screenshot Section Styling */
.project-screenshots {
  margin-top: 2rem;
}

.project-screenshots h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.project:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.screenshots {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.screenshots img {
  width: 100%;
  max-width: 300px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Button Styling */
/* Button 33 Styles (Updated for Blue Color) */
.button-33 {
  background-color: mediumpurple; /* Blue color */
  border-radius: 100px;
  box-shadow: rgba(58, 134, 255, .2) 0 -25px 18px -14px inset, rgba(58, 134, 255, .15) 0 1px 2px, rgba(58, 134, 255, .15) 0 2px 4px, rgba(58, 134, 255, .15) 0 4px 8px, rgba(58, 134, 255, .15) 0 8px 16px, rgba(58, 134, 255, .15) 0 16px 32px;
  color: white; /* Text color */
  cursor: pointer;
  display: inline-block;
  font-family: CerebriSans-Regular, -apple-system, system-ui, Roboto, sans-serif;
  padding: 7px 20px;
  text-align: center;
  text-decoration: none;
  transition: background-color 250ms, transform 250ms, box-shadow 250ms;
  border: 0;
  font-size: 16px;
  user-select: none;
  -webkit-user-select: none; /* Safari */
  touch-action: manipulation;
}

.button-33:hover {
  background-color: var(--button-hover-bg);
  box-shadow: rgba(58, 134, 255, .35) 0 -25px 18px -14px inset, rgba(58, 134, 255, .25) 0 1px 2px, rgba(58, 134, 255, .25) 0 2px 4px, rgba(58, 134, 255, .25) 0 4px 8px, rgba(58, 134, 255, .25) 0 8px 16px, rgba(58, 134, 255, .25) 0 16px 32px;
  transform: scale(1.05) rotate(-1deg);
}

/* About Me Section Styles */
.skills-visualization {
  margin-top: 20px;
}

.skill-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill {
  position: relative;
  height: 30px;
  background-color: #e0e0e0;
  border-radius: 15px;
  overflow: hidden;
}

.skill::before {
  content: attr(data-skill);
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  color: #333;
  font-weight: bold;
}

.skill::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, #3a86ff, #6f42c1); 
  width: var(--width); /* Use the CSS variable */
  z-index: 1;
  transition: width 1.5s ease-in-out; /* Smooth animation */
}

.skill:hover::before {
  content: attr(data-skill) " - " attr(data-percentage) "%";
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 5px;
  border-radius: 5px;
}

/* Footer Styles */
footer {
  background: linear-gradient(
    to right,
    #9b59b6,
    #ff69b4,
    #add8e6
  );
  background-size: cover;
  background-position: center;
  color: white;
  padding: 20px;
  text-align: center;
  box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.5);
}

/* Button Styles */
.css-button-arrow--sky {
  min-width: 130px;
  height: 40px;
  color: #fff;
  text-align: center;
  padding: 5px 10px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
  outline: none;
  overflow: hidden;
  border-radius: 5px;
  border: none;
  background-color: #12c2e9; 
  margin-top: 10px;
}

.css-button-arrow--sky:hover {
  border-radius: 5px;
  padding-right: 24px;
  padding-left: 8px;
}

.css-button-arrow--sky:hover:after {
  opacity: 1;
  right: 10px;
}

.css-button-arrow--sky:after {
  content: "\00BB";
  position: absolute;
  opacity: 0;
  font-size: 20px;
  line-height: 40px;
  top: 0;
  right: -20px;
  transition: 0.4s;
}

/* Slide Toggle Button Styling */
#dark-mode-toggle {
  width: 60px;
  height: 30px;
  background-color: #ccc;
  border-radius: 30px;
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 25px;
  right: 10px;
  cursor: pointer;
  padding: 0 5px;
  align-items: center;
  justify-content: space-between;
  margin-right: 20px;
}

#dark-mode-toggle .slider {
  width: 25px;
  height: 25px;
  background: white;
  border-radius: 50%;
  position: absolute;
  left: 5px;
  transform: translateX(0);
  transition: transform 0.3s ease;
}

#dark-mode-toggle.active .slider {
  transform: translateX(30px);
}

#sun-icon, #moon-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 0.3s ease;
}

#sun-icon {
  left: 35px;
}

#moon-icon {
  right: 35px;
}

#dark-mode-toggle.active #sun-icon {
  opacity: 0;
  visibility: hidden;
}

#dark-mode-toggle.active #moon-icon {
  opacity: 1;
  visibility: visible;
}

/* Dark Mode Styling */
body.dark-mode {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  color: #e0e0e0;
  background: linear-gradient(
    to right,
    #12c2e9,
    #c471ed,
    #f64f59
  );
  background-size: cover;
  background-position: center;
  margin: 0;
  padding: 0;
  position: relative;
}
body.dark-mode::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: -1;
}

body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4, 
body.dark-mode h5, 
body.dark-mode h6 {
  color: mediumpurple;
}

body.dark-mode section {
  background-color: rgba(0, 0, 0, 0.6);
}

/* Collapsible button styling */
.toggle-btn {
  background: rgba(0, 0, 0, 0.4);
  border: none;
  padding: 10px;
  text-align: left;
  width: 100%;
  cursor: pointer;
  font-size: 18px;
  border-radius: 5px;
  margin-bottom: 5px;
  color: ghostwhite;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* Safari */
  transition: background-color 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.toggle-btn.active {
   background: rgba(50, 50, 50, 0.2);
   color: black;
}  

.toggle-btn:hover {
  background: rebeccapurple;
}

/* Collapsible content styling */
.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 10px;
  background-color: #f9f9f9;
  border-radius: 5px;
  color: #000; /* Default light mode text color */
  border: 1px solid #ccc; /* Default light mode border */
}

/* Active state for content */
.collapsible-content.active {
  max-height: 500px; /* Expandable height; adjust based on content */
  padding: 10px; /* Visible padding when expanded */
}

/* Dark Mode Styles for Collapsible Content */
body.dark-mode .collapsible-content {
  background-color: #1e1e1e; /* Dark gray background for dark mode */
  color: #e0e0e0; /* Light tex t color for readability in dark mode */
  border: 1px solid #444; /* Border to separate sections in dark mode */
}

/* Button Alignment for "View Project Details" */
.project-link {
  margin-top: 10px; /* Add spacing above the button */
  display: inline-block;
}

/* Light Mode Header Section */
header {
  background: #ecf0f1;
  color: white;
  height: 80px; /* Reduced height */
  display: flex; /* Flexbox layout for alignment */
  align-items: center; /* Center items vertically */
  justify-content: space-between; /* Space between title and toggle */
  padding: 0 20px; /* Side padding */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  position: relative;
}



/* Light Mode Footer Section */
footer {
  background: linear-gradient(
    to right,
    #9b59b6, /* Light version of #9b59b6 */
    #ff69b4, /* Light version of #ff69b4 */
    #add8e6  /* Light version of #add8e6 */
  );
  background-size: cover;
  background-position: center;
  color: white;
  padding: 20px;
  text-align: center;
  box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.5);
}

/* Dark Mode Header Section */
body.dark-mode header {
  background: linear-gradient(
    to right,
    #12c2e9, /* Darker version of #9b59b6 */
    #c471ed, /* Darker version of #ff69b4 */
    #f64f59  /* Darker version of #add8e6 */
  );
}

/* Dark Mode Footer Section */
body.dark-mode footer {
  background: linear-gradient(
    to right,
    #12c2e9, /* Darker version of #9b59b6 */
    #c471ed, /* Darker version of #ff69b4 */
    #f64f59  /* Darker version of #add8e6 */
  );
  background-size: cover;
  background-position: center;
  color: white; /* Ensure text is readable */
  padding: 20px;
  text-align: center;
  box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.5); /* Optional: adds depth */
}


/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px); /* Slight upward movement */
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply the animation to sections */
section {
  opacity: 0; /* Start hidden */
  transform: translateY(20px); /* Start slightly below */
  transition: opacity 1s ease-out, transform 1s ease-out;
}

/* Class to trigger the animation */
section.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Job List Section */
#looking-for-jobs {
  text-align: center;
  padding: 2rem;
}

.job-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.job-category {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  flex: 1 1 200px; /* Flexible width, minimum 200px */
  max-width: 250px; /* Maximum width for larger screens */
}

.job-category h3 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.job-category ul {
  list-style: none;
  padding: 0;
}

.job-category li {
  margin: 0.5rem 0;
  color: #333;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .portfolio-title {
    font-size: 2.1rem;
  }

  header nav ul {
    flex-direction: column;
    gap: 1rem;
  }
  
  section {
    margin: 1rem;
    padding: 1rem;
    width: auto;
    max-width: calc(100% - 2rem);
    min-height: auto;
  }

  .job-list {
    flex-direction: column;
    align-items: center;
  }

  .job-category {
    width: 100%;
    max-width: 100%;
  }
}

@font-face {
  font-family: 'penna';
  src: url('fonts/penna-webfont.woff2') format('woff2'),
       url('fonts/penna-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}


#home p::after {
  content: "|";
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}


/*contact form*/
#contact {
  background-color: rgba(255, 255, 255, 0.8);
  padding: 2rem;
  border-radius: 10px;
  margin: 2rem auto;
  max-width: 600px;
}

#contact form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#contact input, #contact textarea {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

#contact button {
  background-color: mediumpurple;
  color: white;
  padding: 0.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#contact button:hover {
  background-color: rebeccapurple;
}
