/* ========================
   THEME VARIABLES
======================== */
:root {
  --bg: #1e1e2f;               /* Dark mode background */
  --card-bg: #2e2f45;          /* Dark mode card background */
  --accent: #d4b3aa;           /* Dark mode accent color */
  --text: #f0f0f0;             /* Dark mode text color */
}

body.light {
  --bg: #f7f7f7;               /* Light mode background */
  --card-bg: #ffffff;          /* Light mode card background */
  --accent: #7f5af0;           /* Light mode accent color */
  --text: #111111;             /* Light mode text color */
}

/* ========================
   BASE STYLES
======================== */
body {
  background: linear-gradient(135deg, var(--bg), #27293d); /* Gradient background */
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  margin: 0;
  transition: all 0.3s ease;
}

/* ========================
   HEADER
======================== */
header {
  text-align: center;
  padding: 2rem;
}

h1 {
  font-size: 3rem;
  color: var(--accent);
}

/* ========================
   NAVIGATION MENU
======================== */
nav ul {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin-top: 1rem;
  padding: 0;
}

nav ul li a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s;
}

nav ul li a:hover {
  color: var(--accent);
}

/* ========================
   CONTAINER
======================== */
.container {
  max-width: 1000px;
  margin: auto;
  padding: 2rem;
}

/* ========================
   SECTION STYLING
======================== */
.section {
  text-align: center; 
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 1rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.section h2 {
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ========================
   PROJECTS GRID
======================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--card-bg);
  text-align: center;
  padding: 1rem;
  border-radius: 0.8rem;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);

}

.project-card:hover {
  transform: scale(1.05);
}

/* ========================
   CONTACT FORM
======================== */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input, textarea, button {
  padding: 0.75rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
}

button {
  background: var(--accent);
  color: #111;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background: var(--accent);
}

/* ========================
   FOOTER
======================== */
footer {
  text-align: center;
  padding: 2rem;
  color: #aaa;
}

/* ========================
   SOCIAL ICONS
======================== */
.social-icons {
  margin-top: 1rem;
}

.social-icons a {
  margin: 0 0.5rem;
  font-size: 1.5rem;
  color: var(--accent);
  text-decoration: none;
  transition: transform 0.2s;
}

.social-icons a:hover {
  transform: scale(1.2);
}

/* ========================
   SCROLL TO TOP BUTTON
======================== */
#scrollTopBtn {
  position: fixed;
  bottom: 120px;
  right: 30px;
  z-index: 9999;
  font-size: 1.5rem;
  padding: 0.5rem 0.8rem;
  background: var(--accent);
  color: black;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: none;
  transition: opacity 0.3s;
  box-sizing: border-box;
}

#scrollTopBtn:hover {
  background: var(--accent);
}

/* ========================
   THEME TOGGLE BUTTON
======================== */
#theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  background: var(--accent);
  color: black;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 1000;
  transition: background 0.3s ease;
}

#theme-toggle:hover {
  background: var(--accent);
}

/* ========================
   LOADER SPINNER
======================== */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid var(--accent);
  border-top: 6px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================
   RESUME DOWNLOAD BUTTON
======================== */
.resume-btn {
  display: inline-block;
  margin-top: 1rem;
  background: var(--accent);
  color: #111;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s;
}

.resume-btn:hover {
  background: var(--accent);
}

/* ========================
   TAWK.TO LIVE CHAT WIDGET FIX
======================== */
iframe[src*="tawk.to"] {
  opacity: 1 !important;
  visibility: visible !important;
  transition: none !important;
}

/* ========================
   LAYOUT BUG FIX FOR MOBILE
======================== */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding-bottom: 0 !important;
}
.cursor {
  display: inline-block;
  animation: blink 0.7s infinite;
}
#animated-fade-text {
  opacity: 0;
  transition: opacity 1s ease-in-out;
  font-size: 1.2rem;
  font-weight: 500;
  display: inline-block;
  min-height: 1.5em; /* prevents collapsing if empty */
}

.profile-image-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.profile-image {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.5s ease;
}

.profile-image:hover {
  transform: scale(1.05);
}
.project-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: top;   /* 👈 This forces the top part to show */
  border-radius: 10px;
  margin-bottom: 0.8rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

.project-card:hover .project-thumb {
  transform: scale(1.03);
}
.project-sub {
  display: block;
  margin-top: -8px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--accent);
  opacity: 0.85;
}
/* Modern, centered search bar */
.search-wrapper {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 2rem;
  width: 100%;
}

#searchBox, #categoryFilter {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 2px solid var(--accent);
  background: var(--card-bg);
  color: var(--text);
  font-size: 1rem;
  width: 220px;
  transition: 0.3s ease;
}

/* Hover & focus effects */
#searchBox:focus, #categoryFilter:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.1);
}

#searchBox:hover, #categoryFilter:hover {
  transform: scale(1.03);
}
/* Force dropdown list colors */
#categoryFilter {
  background-color: var(--card-bg) !important;
  color: var(--text) !important;
}

/* Fix dropdown options (list that opens) */
#categoryFilter option {
  background-color: var(--card-bg) !important;
  color: var(--text) !important;
  padding: 10px;
}
/* Blinking cursor animation */
@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
/* Modal background */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.7);
}

/* Modal content */
.modal-content {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 15px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.modal-content h2 {
  color: var(--accent);
  margin-bottom: 1rem;
}

.modal-content p {
  margin-bottom: 1.5rem;
}

.modal-content button {
  padding: 10px 20px;
  border: none;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.3s;
}

.modal-content button:hover {
  opacity: 0.8;
}
/* Contact section color fix */
.contact-text,
.contact-text a {
  color: #e6e6e6 !important;       /* Light text for dark background */
  font-weight: 500;
}

.contact-text a:hover {
  color: #4CAF50 !important;       /* Accent color on hover */
}

/* Contact labels (Email:, GitHub:, LinkedIn:) */
.contact-text strong {
  color: #ffffff !important;
}
/* Fix link color in Project Overview section */
.project-block a {
  color: var(--accent) !important;       /* Use your theme’s accent color */
  font-weight: 600;
  text-decoration: none;
}

.project-block a:hover {
  color: #ffd8cc !important;             /* Soft warm hover (optional) */
  text-decoration: underline;
}
/* Unified card style for all sections */
.section {
  max-width: 900px;              /* fixed width like Education box */
  margin: 2rem auto;             /* center horizontally */
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
/* Ensure search bar fits inside card on mobile */
.search-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

#searchBox,
#categoryFilter {
  width: 100%;
  max-width: 320px; /* prevents stretching outside */
  box-sizing: border-box;
}
.projects-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  width: 100%;
}

