:root {
  --jumbotron-padding-y: 1rem;
}

/* Fixed Navbar */
.sticky-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1020;
  width: 100%;
}

/* Body padding to account for fixed navbar */
body {
  padding-top: 56px;
}

/* Scroll margin for sections to create space below fixed navbar */
#projects,
#experience,
#certifications,
#trainings,
#contact {
  scroll-margin-top: 65px;
}

/* Navbar parent container */
header {
  width: 100%;
}

/* Fixed Navbar */
.navbar.sticky-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1020;
}

/* Navbar Navigation Styles */
.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.7) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: all 0.3s ease;
  margin-right: 0.5rem;
}

.navbar-nav .nav-link:hover {
  color: #ffffff !important;
}

.navbar-nav .btn-link {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: all 0.3s ease;
  margin-right: 0.5rem;
  cursor: pointer;
}

.navbar-nav .btn-link:hover {
  color: #ffffff !important;
}

.navbar-nav .btn-outline-light {
  padding: 0.275rem 0.75rem !important;
  font-size: 0.875rem;
  font-weight: 600;
}

.navbar-nav .btn-outline-light:hover {
  background-color: #007bff;
  border-color: #007bff;
}

@media (max-width: 767.98px) {
  .navbar-nav {
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
  }
  
  .navbar-nav .nav-link,
  .navbar-nav .btn-link {
    padding: 0.75rem 0 !important;
    margin-right: 0 !important;
  }
  
  .navbar-nav .ml-md-2 {
    margin-left: 0 !important;
    margin-top: 0.5rem;
  }
}

.jumbotron {
  padding-top: var(--jumbotron-padding-y);
  padding-bottom: var(--jumbotron-padding-y);
  margin-bottom: 0;
  background-color: #fff;
}
@media (min-width: 768px) {
  .jumbotron {
    padding-top: calc(var(--jumbotron-padding-y) * 2);
    padding-bottom: calc(var(--jumbotron-padding-y) * 2);
  }
}

.jumbotron p:last-child {
  margin-bottom: 0;
}

/* Social Buttons Styling */
.btn-social {
  padding: 0.75rem 1.5rem !important;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  border: 2px solid;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem !important;
  min-width: 180px;
  height: 50px;
  width: auto;
}

.btn-social i {
  margin-right: 0.5rem;
}

/* GitHub Button */
.btn-github {
  color: #ffffff;
  background-color: #333333;
  border-color: #333333;
}

.btn-github:hover {
  color: #ffffff;
  background-color: #24292e;
  border-color: #24292e;
  box-shadow: 0 4px 15px rgba(51, 51, 51, 0.3);
  transform: translateY(-2px);
}

/* TryHackMe Button */
.btn-tryhackme {
  color: #ffffff;
  background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
  border-color: #00C853;
  border-width: 2px;
}

.btn-tryhackme:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #00C853 0%, #00B344 100%);
  border-color: #00C853;
  box-shadow: 0 4px 20px rgba(0, 200, 83, 0.4);
  transform: translateY(-2px);
}

/* LinkedIn Button */
.btn-linkedin {
  color: #ffffff;
  background-color: #0A66C2;
  border-color: #0A66C2;
}

.btn-linkedin:hover {
  color: #ffffff;
  background-color: #084d96;
  border-color: #084d96;
  box-shadow: 0 4px 15px rgba(10, 102, 194, 0.3);
  transform: translateY(-2px);
}

.jumbotron-heading {
  font-weight: 300;
}

.project-description {
  font-size: 2rem;
  font-weight: 600;
  color: #666;
  margin-top: 1rem;
  line-height: 1.6;
}

.project-placeholder {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: #6c757d;
  background-color: #e9ecef;
  text-align: center;
}

.demo-notice {
  color: #999;
  font-size: 0.95rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-style: italic;
}

.provided-to {
  color: #555;
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0;
  font-weight: 500;
}

.back-portfolio {
  padding: 0.5rem 1.5rem;
  text-decoration: underline;
}

.project-actions {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
}

.github-project-link {
  padding: 0.65rem 1.25rem;
  color: #fff;
  background-color: #24292f;
  border: 1px solid #24292f;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(36, 41, 47, 0.2);
  transition: all 0.2s ease;
}

.github-project-link:hover {
  color: #fff;
  background-color: #000;
  border-color: #000;
  box-shadow: 0 6px 14px rgba(36, 41, 47, 0.3);
  transform: translateY(-2px);
}

.jumbotron .container {
  max-width: 80rem;
  display: flex;
  flex-direction: column;
}

footer {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

footer p {
  margin-bottom: .25rem;
}

/* Contact Form Styles */
.contact-section {
  background-color: #f8f9fa !important;
}

.contact-form {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.contact-form .form-group label {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.contact-form .form-control {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.contact-form .form-control:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.contact-form .btn-primary {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 6px;
  background-color: #007bff;
  border-color: #007bff;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.contact-form .btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
  transform: translateY(-2px);
}

.alert {
  border-radius: 6px;
  border: none;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
}

.box-shadow { box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); }

/* Center project cards in album section */
.album .row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.album .col-md-4 {
  margin-bottom: 1.5rem;
}

#projects .card-img-top {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.carousel-control-prev,
.carousel-control-next {
  background-color: rgba(0, 0, 0, 0.4);
  width: 5%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: brightness(1.5);
}

.carousel-inner img {
  filter: brightness(0.9);
}

.carousel-indicators li {
  background-color: rgba(255, 255, 255, 1.5);
}

.carousel-indicators li.active {
  background-color: rgba(255, 255, 255, 1.5);
}

.training-card-img {
  height: 150px;
  object-fit: contain;
  padding: 10px;
  background-color: #f8f9fa;
}

/* Horizontal Training List */
.training-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.training-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.training-item:hover {
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
  transform: translateY(-2px);
}

.training-item-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  flex-shrink: 0;
  background-color: #f8f9fa;
  padding: 8px;
  border-radius: 6px;
}

.training-item-content {
  flex-grow: 1;
}

.training-item-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
  margin-top: 0;
}

/* Responsive for mobile */
@media (max-width: 768px) {
  .training-item {
    flex-direction: column;
    text-align: center;
  }

  .training-item-img {
    width: 80px;
    height: 80px;
  }
}

.training-provider {
  font-size: 0.875rem;
  color: #999;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-body .d-flex {
  margin-top: auto;
}

/* Timeline Styles */
.timeline {
  position: relative;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #007bff, #0056b3);
  border-radius: 2px;
}

.timeline-item {
  margin-bottom: 50px;
  position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: 0;
  margin-right: 50%;
  padding-right: 30px;
  text-align: left;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: 50%;
  margin-right: 0;
  padding-left: 30px;
  text-align: left;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  top: 30px;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: white;
  border: 4px solid #007bff;
  border-radius: 50%;
  z-index: 1;
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker {
  width: 28px;
  height: 28px;
  background: #007bff;
  box-shadow: 0 0 0 8px rgba(0, 123, 255, 0.1);
}

.timeline-content {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-content {
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
  background: #fff;
}

.timeline-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.timeline-company {
  font-size: 1rem;
  color: #007bff;
  font-weight: 500;
  margin-bottom: 5px;
}

.timeline-date {
  font-size: 0.9rem;
  color: #999;
  margin-bottom: 10px;
  font-style: italic;
}

.timeline-description {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 15px;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.timeline-description li {
  margin-bottom: 8px;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-tags .badge {
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 20px;
}

/* Education Timeline Item - Foundation */
.timeline-item-education {
  position: relative;
  margin-bottom: 100px;
}

.timeline-item-education .timeline-content {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 30px;
  background: linear-gradient(135deg, #e7f0ff 0%, #f0f4ff 100%);
  border: 2px dashed #007bff;
  border-radius: 12px;
  text-align: center;
  box-shadow: inset 0 2px 4px rgba(0, 123, 255, 0.05);
}

.timeline-item-education:hover .timeline-content {
  background: linear-gradient(135deg, #d9e8ff 0%, #e7ecff 100%);
  border-color: #0056b3;
}

.timeline-item-education .timeline-marker {
  left: 50%;
  background: #007bff;
  border-color: #fff;
  width: 24px;
  height: 24px;
  top: -42px;
}

.timeline-item-education .timeline-title {
  color: #007bff;
  font-weight: 700;
}

.timeline-item-education .timeline-company {
  color: #0056b3;
  font-weight: 600;
  font-size: 1.05rem;
}

/* Responsive Timeline */
@media (max-width: 768px) {
  .timeline::before {
    left: 15px;
  }

  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 50px;
    margin-right: 0;
    padding-left: 20px;
    padding-right: 0;
    text-align: left;
  }

  .timeline-item-education .timeline-content {
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: center;
    padding: 20px;
  }

  .timeline-marker {
    left: 15px;
  }
}