/* ========== Enhanced Theme & Reset ========== */
:root {
  --bg: #0f172a; /* slate-900 */
  --bg-soft: #111827; /* gray-900 */
  --panel: #1e293b; /* slightly lighter for better contrast */
  --elev: #0b1224; /* slightly darker for sections */
  --text: #f1f5f9; /* brighter text for better readability */
  --muted: #94a3b8; /* softer muted color */
  --primary: #3b82f6; /* brighter blue */
  --primary-600: #2563eb; /* blue-600 */
  --accent: #06b6d4; /* more vibrant cyan */
  --border: #334155; /* lighter border for better definition */
  --success: #10b981; /* emerald-500 */
  --danger: #ef4444; /* red-500 */
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  --transition: all 0.3s ease;
  --gradient-primary: linear-gradient(135deg, var(--primary), var(--accent));
  --gradient-card: linear-gradient(
    145deg,
    rgba(30, 41, 59, 0.8),
    rgba(15, 23, 42, 0.9)
  );
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(
      ellipse at 20% -10%,
      rgba(37, 99, 235, 0.15),
      transparent 55%
    ),
    radial-gradient(ellipse at 80% 0%, rgba(34, 211, 238, 0.1), transparent 55%),
    var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Use browser's default scrollbar */
  overflow-y: auto;
  overflow-x: hidden;
}

/* Improved smooth transitions */
a,
button,
.btn,
input,
textarea,
.project-card,
.skill-category {
  transition: var(--transition);
}

/* Enhanced link styling */
a {
  color: var(--accent);
  text-decoration: none;
  position: relative;
}

a:hover {
  color: var(--primary);
}

a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--primary);
  transition: width 0.3s ease;
}


/* Container utilities */
.container {
  width: min(1200px, 94%);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== Enhanced Top Navigation ========== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.top-nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
  font-size: 1.2rem;
}

.nav-profile-pic {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition);
}

.nav-profile-pic:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

.top-nav nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-nav nav a {
  color: var(--text);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.top-nav nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.top-nav nav a.active {
  background: var(--gradient-primary);
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
}

/* ========== Enhanced Main Layout ========== */
main {
  flex: 1;
  padding: 40px 0 60px;
  /* Use browser's default scrolling */
  overflow: visible;
}

.page-section {
  display: none;
}

.page-section.active {
  display: block;
  animation: fadeIn 0.5s ease forwards;
}

footer {
  border-top: 1px solid var(--border);
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(8px);
  color: var(--muted);
  text-align: center;
  padding: 25px 0;
  font-size: 0.95rem;
  margin-top: auto;
}

/* ========== Enhanced Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  box-shadow: var(--shadow);
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  transition: all 0.4s ease;
  z-index: -1;
}

.btn:hover::before {
  width: 100%;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn.primary {
  background: var(--gradient-primary);
  border-color: transparent;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.4);
}

.btn.primary::before {
  background: linear-gradient(135deg, var(--accent), var(--primary));
}

/* ========== Enhanced Home Page ========== */
.home {
  width: min(1000px, 94%);
  margin: 0 auto;
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  /* Use browser's default scrolling */
  overflow: visible;
}

.home h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 15px;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home p {
  color: var(--muted);
  margin: 15px 0;
  font-size: 1.1rem;
}

.home .cta {
  margin-top: 25px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.home .highlight {
  color: var(--accent);
  font-weight: 700;
}

.hero {
  text-align: center;
  margin-bottom: 50px;
  padding: 20px 0;
}

.tagline {
  font-size: 1.3rem;
  color: var(--muted);
  margin-bottom: 15px;
}

.intro {
  margin: 15px auto 25px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
  text-align: center;
   margin: 0 auto;
}

.about,
.skills,
.experience,
.education,
.achievements {
  margin-bottom: 45px;
  padding: 25px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 15px;
  border: 1px solid var(--border);
}

.about h2,
.skills h2,
.experience h2,
.education h2,
.achievements h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--text);
  position: relative;
  padding-bottom: 10px;
}

.about h2::after,
.skills h2::after,
.experience h2::after,
.education h2::after,
.achievements h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 3px;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.skill-category {
  padding: 20px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  border-color: var(--primary);
}

.skill-category h3 {
  margin-bottom: 15px;
  color: var(--accent);
  font-size: 1.2rem;
}

.skill-category ul {
  list-style: none;
}

.skill-category li {
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}

.skill-category li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--primary);
}

.timeline {
  border-left: 3px solid var(--primary);
  padding-left: 25px;
  margin-left: 10px;
}

.timeline-item {
  margin-bottom: 25px;
  position: relative;
  padding: 15px;
  background: rgba(30, 41, 59, 0.4);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 20px;
  left: -33px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
}

.timeline-item h3 {
  margin: 0 0 5px;
  font-size: 1.2rem;
}

.timeline-item .date {
  font-size: 0.9rem;
  color: var(--muted);
  display: inline-block;
  padding: 3px 10px;
  background: rgba(37, 99, 235, 0.2);
  border-radius: 20px;
  margin-bottom: 10px;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
}

.education ul,
.achievements ul {
  list-style: none;
}

.education li,
.achievements li {
  margin-bottom: 12px;
  padding-left: 22px;
  position: relative;
}

.education li::before,
.achievements li::before {
  content: "★";
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* ========== Enhanced Projects Page ========== */
.projects {
  width: min(1200px, 94%);
  margin: 0 auto;
  padding: 20px;
  /* Use browser's default scrolling */
  overflow: visible;
}

.projects h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin: 0 0 30px;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

.projects h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 4px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.project-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  height: 100%;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.1),
    rgba(6, 182, 212, 0.1)
  );
  opacity: 0;
  transition: var(--transition);
  z-index: 0;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border-color: var(--primary);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card > * {
  position: relative;
  z-index: 1;
}

.project-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0b0f1c;
  margin-bottom: 15px;
  transition: var(--transition);
}

.project-card:hover img {
  transform: scale(1.03);
}

.project-card h3 {
  margin: 0 0 12px;
  font-size: 1.3rem;
  color: var(--text);
}

.project-card p {
  margin: 0 0 15px;
  color: var(--muted);
  flex-grow: 1;
}

.project-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 15px;
}

.tag {
  font-size: 0.8rem;
  color: var(--text);
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 5px 12px;
  border-radius: 20px;
  transition: var(--transition);
}

.tag:hover {
  background: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.project-card .actions {
  margin-top: auto;
  display: flex;
  gap: 12px;
}

/* ========== Enhanced Contact Page ========== */
.contact-page {
  width: min(1000px, 94%);
  margin: 0 auto;
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  backdrop-filter: blur(10px);
  /* Use browser's default scrolling */
  overflow: visible;
}

.contact-info h2 {
  margin-top: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
}

.contact-info h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 3px;
}

.contact-page ul {
  list-style: none;
  padding: 0;
  margin: 0 0 25px;
  display: grid;
  gap: 15px;
}

.contact-page li {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  padding: 10px 15px;
  background: rgba(30, 41, 59, 0.4);
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.contact-page li:hover {
  background: rgba(30, 41, 59, 0.6);
  transform: translateX(5px);
}

.contact-page li strong {
  color: var(--text);
  min-width: 90px;
  font-weight: 600;
}

.contact-form-wrapper h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.5rem;
  position: relative;
  padding-bottom: 10px;
}

.contact-form-wrapper h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 3px;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.contact-form label {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  display: block;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #94a3b8;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form button[type="submit"] {
  justify-self: start;
  margin-top: 10px;
}

/* Form status messages */
.form-success {
  color: var(--success);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 12px 16px;
  border-radius: 10px;
  margin-top: 15px;
}

.form-error {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 12px 16px;
  border-radius: 10px;
  margin-top: 15px;
}

/* ========== Enhanced Responsive Design ========== */
@media (max-width: 1024px) {
  .contact-page {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .project-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .top-nav .nav-inner {
    height: auto;
    padding: 15px 0;
    flex-direction: column;
    gap: 15px;
  }

  .top-nav nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .home,
  .contact-page {
    padding: 25px;
  }

  .home .cta {
    justify-content: center;
  }

  .skill-grid {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .contact-page {
    padding: 25px;
  }

  .contact-page li {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .contact-page li strong {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .home,
  .contact-page {
    padding: 20px;
    border-radius: 15px;
  }

  .hero {
    padding: 10px 0;
  }

  .home .cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .about,
  .skills,
  .experience,
  .education,
  .achievements {
    padding: 20px;
  }

  .project-card {
    padding: 15px;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 12px;
  }
}

/* Animation for page transitions */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Remove custom scrollbar from all elements */
.home,
.projects,
.contact-page,
#content-area,
main,
body,
html {
  scrollbar-width: auto;
  overflow: visible;
}

/* Remove Webkit scrollbar styling */
.home::-webkit-scrollbar,
.projects::-webkit-scrollbar,
.contact-page::-webkit-scrollbar,
#content-area::-webkit-scrollbar {
  display: none;
  width: auto;
}

/* Ensure only the browser's default scrollbar is used */
html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Make sure home content is properly styled */
.home {
  width: min(1000px, 94%) !important;
  margin: 0 auto !important;
  padding: 40px !important;
  box-sizing: border-box !important;
}

/* Make sure all content sections are visible */
.home > div {
  margin-bottom: 40px;
  width: 100%;
}

.home p #intro {
  display: flex;
  justify-content: center;
}
.form-success {
  color: var(--success);
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.35);
  padding: 10px 12px;
  border-radius: 10px;
  margin-top: 16px;
}



