/* Base Styles */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary-color: #f0f9ff;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --accent-color: #3b82f6;
  --success-color: #10b981;
  --sidebar-bg: #1e293b;
  --sidebar-text: #f8fafc;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

.dark-mode {
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --secondary-color: #1e293b;
  --text-color: #f8fafc;
  --text-light: #cbd5e1;
  --bg-color: #0f172a;
  --card-bg: #1e293b;
  --border-color: #334155;
  --accent-color: #60a5fa;
  --sidebar-bg: #0f172a;
  --sidebar-text: #f8fafc;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Accounts for fixed header */
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: var(--transition);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

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

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
}

.navbar {
  padding: 1rem 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  background-color: var(--secondary-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.logo:hover {
  transform: rotate(10deg);
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin: 0 1rem;
}

.nav-item {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.nav-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-item:hover::after {
  width: 100%;
}

.nav-item.active::after {
  width: 100%;
}

.theme-toggle,
.mobile-menu-btn {
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-color);
  transition: var(--transition);
}

.theme-toggle:hover,
.mobile-menu-btn:hover {
  color: var(--primary-color);
  transform: rotate(15deg);
}

.mobile-menu-btn {
  display: none;
}

/* Main Container */
.container {
  display: flex;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  gap: 2rem;
}

/* Left Column */
.left-column {
  flex: 1;
  max-width: 300px;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 100px;
  height: fit-content;
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 2rem;
}

.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid var(--primary-color);
  margin-bottom: 1rem;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.profile-pic:hover {
  transform: scale(1.05);
  border-color: var(--accent-color);
}

.profile h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.links ul {
  list-style-type: none;
  padding: 0;
}

.links li {
  margin: 0.8rem 0;
}

.links a {
  display: flex;
  align-items: center;
  color: var(--sidebar-text);
  font-weight: 500;
  transition: var(--transition);
}

.links a i {
  margin-right: 0.8rem;
  width: 20px;
  text-align: center;
}

.links a:hover {
  color: var(--accent-color);
  transform: translateX(5px);
}

.contact-info {
  margin-top: 2rem;
}

.contact-info h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.contact-info p {
  display: flex;
  align-items: center;
  margin: 0.8rem 0;
  font-size: 0.9rem;
}

.contact-info i {
  margin-right: 0.8rem;
  width: 20px;
  text-align: center;
}

.contact-info a {
  color: var(--sidebar-text);
  transition: var(--transition);
}

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

.skill-tags {
  margin-top: 2rem;
}

.skill-tags h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background-color: rgba(59, 130, 246, 0.2);
  color: var(--sidebar-text);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  transition: var(--transition);
}

.tag:hover {
  background-color: var(--primary-color);
  transform: translateY(-2px);
}

/* Right Column */
.right-column {
  flex: 2;
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

section {
  margin-bottom: 3rem;
  scroll-margin-top: 100px; /* For smooth scrolling with fixed header */
}

section:last-child {
  margin-bottom: 0;
}

section h2 {
  font-size: 1.8rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
  display: flex;
  align-items: center;
}

section h2 i {
  margin-right: 0.8rem;
  color: var(--primary-color);
}

.section-content {
  padding: 0 0.5rem;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.skill-category h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.skill-category ul {
  list-style-type: none;
}

.skill-category li {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.progress-bar {
  height: 8px;
  background-color: var(--border-color);
  border-radius: 4px;
  margin-top: 0.3rem;
  overflow: hidden;
}

.progress {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 4px;
  width: 0; /* Initial width, will be animated with JS */
  transition: width 1s ease-in-out;
}

/* Timeline for Experience and Education */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 2px;
  background-color: var(--primary-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-item.animate {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2.4rem;
  top: 0.3rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 3px solid var(--card-bg);
}

.timeline-date {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.timeline-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.timeline-content h4 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 0.8rem;
}

.experience-list {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

.experience-list li {
  margin-bottom: 0.5rem;
}

.certificate-badge {
  display: inline-flex;
  align-items: center;
  background-color: var(--primary-color);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.certificate-badge i {
  margin-right: 0.5rem;
}

.certificate-badge:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

/* Projects Section */
.project-card {
  background-color: var(--secondary-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.project-card:last-child {
  margin-bottom: 0;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}

.project-header h3 {
  font-size: 1.3rem;
  color: var(--text-color);
}

.project-links {
  display: flex;
  gap: 0.5rem;
}

.btn-small {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  background-color: var(--primary-color);
  color: white;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: var(--transition);
}

.btn-small i {
  margin-right: 0.3rem;
}

.btn-small:hover {
  background-color: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
}

.project-tech {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.project-description {
  margin-bottom: 1rem;
}

.project-highlights h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.project-highlights ul {
  list-style-type: disc;
  padding-left: 1.5rem;
}

.project-highlights li {
  margin-bottom: 0.3rem;
}

/* Certifications Section */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.certification-card {
  background-color: var(--secondary-color);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.certification-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.certification-icon {
  font-size: 2rem;
  color: var(--primary-color);
}

.certification-details h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.certification-details p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.cert-link {
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
}

.cert-link:hover {
  text-decoration: underline;
}

/* Activities Section */
.activity-card {
  background-color: var(--secondary-color);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: var(--transition);
}

.activity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.activity-icon {
  font-size: 2rem;
  color: var(--primary-color);
}

.activity-details h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "Poppins", sans-serif;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.btn-submit {
  display: inline-block;
  padding: 0.8rem 2rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-submit:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

/* Certificate Modal */
.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);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: block;
  opacity: 1;
}

.modal-content {
  background-color: var(--card-bg);
  margin: 10% auto;
  padding: 2rem;
  border-radius: 8px;
  max-width: 800px;
  width: 80%;
  box-shadow: var(--shadow);
  transform: translateY(-50px);
  transition: transform 0.3s ease;
}

.modal.show .modal-content {
  transform: translateY(0);
}

.close-modal {
  color: var(--text-light);
  float: right;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--primary-color);
}

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

.certificate-container img {
  max-width: 100%;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

/* Footer */
footer {
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  color: var(--sidebar-text);
  font-size: 1.2rem;
  transition: var(--transition);
}

.social-icons a:hover {
  color: var(--accent-color);
  transform: translateY(-3px);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Notification Styles */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.notification {
  background-color: white;
  color: #333;
  padding: 15px 20px;
  margin-bottom: 10px;
  border-radius: 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification.success {
  border-left: 4px solid #10b981;
}

.notification.error {
  border-left: 4px solid #ef4444;
}

.error {
  border-color: #ef4444 !important;
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
  .container {
    max-width: 95%;
  }
}

@media (max-width: 992px) {
  .container {
    flex-direction: column;
  }

  .left-column {
    max-width: 100%;
    position: static;
  }

  .profile {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .profile-info {
    flex: 1;
  }

  .links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .links li {
    margin: 0;
  }

  .skill-tags {
    margin-top: 1.5rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .mobile-menu-active .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    padding: 1rem;
    box-shadow: var(--shadow);
    z-index: 10;
  }

  .mobile-menu-active .nav-links li {
    margin: 0.5rem 0;
  }

  .profile {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .project-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .certifications-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .modal-content {
    width: 90%;
    margin: 15% auto;
  }
}

@media (max-width: 576px) {
  .nav-container {
    padding: 0 1rem;
  }

  .container {
    padding: 0 1rem;
    margin: 1rem auto;
  }

  .left-column,
  .right-column {
    padding: 1.5rem;
  }

  section h2 {
    font-size: 1.5rem;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-dot {
    left: -1.9rem;
  }

  .activity-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .certification-card {
    flex-direction: column;
    text-align: center;
  }

  .modal-content {
    width: 95%;
    padding: 1rem;
  }

  .project-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn-submit {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .profile-pic {
    width: 120px;
    height: 120px;
  }

  .profile h1 {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .left-column,
  .right-column {
    padding: 1rem;
  }

  .tags {
    gap: 0.3rem;
  }

  .tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }

  .timeline-content h3 {
    font-size: 1.1rem;
  }

  .timeline-content h4 {
    font-size: 0.9rem;
  }

  .project-header h3 {
    font-size: 1.1rem;
  }

  .certification-details h3 {
    font-size: 1rem;
  }

  .form-group label {
    font-size: 0.9rem;
  }
}

/* Print Styles */
@media print {
  header,
  footer,
  .theme-toggle,
  .mobile-menu-btn,
  #contact {
    display: none;
  }

  body {
    background-color: white;
    color: black;
  }

  .container {
    display: block;
  }

  .left-column,
  .right-column {
    max-width: 100%;
    width: 100%;
    background-color: white;
    color: black;
    box-shadow: none;
    padding: 0;
    margin: 0;
  }

  .profile-pic {
    width: 100px;
    height: 100px;
  }

  section {
    page-break-inside: avoid;
  }
}
