:root {
  --primary-color: #1a237e;
  --secondary-color: #283593;
  --tertiary-color: #646cff;
  --quaternary-color: #3498db;
  --text-light: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-dark: #333333;

  --background-light: rgba(255, 255, 255, 0.05);
  --background-dark: #0f0b1c;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  background-color: var(--background-dark);
  color: var(--text-light);
}

.navbar {
  background: var(--background-dark);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(var(--background-dark), 0.95);
}

.hero {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    color: var(--text-light);
    background: var(--background-dark);
}

.hero__background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/src/img/background-v11.png');
    background-size: cover;
    background-position: center top 5px;
    background-repeat: no-repeat;
    opacity: 0.6;
    z-index: 1;
    will-change: transform;
}

.hero__container {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
    padding: 0 1rem;
}

.hero__content {
    will-change: transform, opacity;
    transition: opacity 0.3s ease;
}

/* Add gradient overlay */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(15, 11, 28, 0.3), var(--background-dark));
    z-index: 1;
}

.hero__title {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero__subtitle {
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero__text {
    font-size: 2rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.hero__scroll {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 2;
}

.hero__scroll-link {
    color: var(--text-light);
    opacity: 0.7;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
    display: inline-block;
    font-size: 1.5rem;
}

.hero__scroll-link:hover {
    opacity: 1;
    color: var(--text-light);
}

.hero__scroll-link.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Keep the existing bounce animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

/* Add responsive adjustments if needed */
@media (max-width: 768px) {
    .hero__title {
        font-size: 3rem;
    }
    
    .hero__subtitle {
        font-size: 2rem;
    }
    
    .hero__text {
        font-size: 1.5rem;
    }
}

.cta-button {
    font-size: 1.25rem;
    padding: 1rem 2rem;
    background: #646cff;
    color: white !important;
    border: none;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(100, 108, 255, 0.4);
    background: linear-gradient(135deg, #1a237e, #646cff);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    width: 100%;
    text-align: center;
    z-index: 2;
}

.hero__scroll {
    position: absolute;
    bottom: 2rem;
    width: 100%;
    text-align: center;
    z-index: 2;
    transform: translateZ(0);
}

.hero__scroll-link {
    color: var(--text-light);
    opacity: 0.7;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
    display: inline-block;
    font-size: 1.5rem;
}

.hero__scroll-link:hover {
    opacity: 1;
    color: var(--text-light);
}

/* Hide scroll button when scrolling */
.hero__scroll-link.fade-out {
    opacity: 0;
    pointer-events: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

section {
  width: 100%;
  padding: 80px 0;
  position: relative;
}

/* Navigation Styles */
.navbar {
  background-color: var(--background-dark);
  padding: 1rem 0;
  transition: all 0.3s ease;
}


/* Scrolled state - makes navbar more compact */
.navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

.nav-link {
  font-weight: 500;
  margin: 0 0.5rem;
  position: relative;
  padding: 0.5rem 0;
}

/* Underline animation for nav links */
.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--text-light);
  transition: width 0.3s ease;
}

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

/* Active nav link */
.nav-link.active {
  color: var(--text-light) !important;
}

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

/* Mobile adjustments */
@media (max-width: 991.98px) {
  .navbar-collapse {
      padding: 1rem 0;
  }
  
  .nav-link {
      margin: 0.5rem 0;
  }
}

/* Container width control (similar to Vite.dev) */
.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  #hero .text-container {
    margin-left: 5%;
    margin-right: 5%;
    width: 90%;
  }
  
  #hero h1 {
    font-size: 2.5rem;
  }
  
  #hero h2 {
    font-size: 1.8rem;
  }
  
  #hero p {
    font-size: 1.2rem;
  }
  
  section {
    padding: 60px 0;
    position: relative;
  }

  /* Hide diagram on mobile */
  .diagram-container {
    display: none;
  }
}

@media (max-width: 480px) {
  #hero h1 {
    font-size: 2rem;
  }
  
  .container {
    padding: 0 16px;
  }
}

#about {
    padding: 100px 0;
    position: relative;
    background-color: var(--background-dark);
    z-index: 2; /* Higher than hero's z-index */
}

.btn {
    padding: 0.8rem 2rem;
    margin: 0 0.5rem;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

#competencies {
    padding: 100px 0;
}

small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.skills-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skills__card {
    background: var(--background-light);
    border-radius: 8px;
    padding: 1.5rem;
}

.skills__card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.skills__icon {
    color: var(--accent-color);
    font-size: 1.5rem;
}

.skills__title {
    margin: 0;
    font-size: 1.2rem;
}

.skills__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skills__item {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.skills__name-wrapper {
    display: flex;
    flex-direction: column;
}

.skills__name {
    font-weight: 500;
}

.skills__level {
    height: 8px;
    background: var(--secondary-color);
    border-radius: 4px;
    position: relative;
}

.skills__level::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--quaternary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.skills__level--expert::after {
    width: 95%;
}

.skills__level--advanced::after {
    width: 80%;
}

.skills__level--intermediate::after {
    width: 65%;
}

@media (max-width: 768px) {  
}

#cv {
    padding: 100px 0;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

/* Main timeline line */
.timeline::before {
    content: '';
    position: absolute;
    left: 7px;  /* Center the line with the markers */
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--background-light);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 1s ease;
}

.timeline__item {
    position: relative;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
}

.timeline__item.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered animation delay for items */
.timeline__item:nth-child(1) { transition-delay: 0.1s; }
.timeline__item:nth-child(2) { transition-delay: 0.2s; }
.timeline__item:nth-child(3) { transition-delay: 0.3s; }
.timeline__item:nth-child(4) { transition-delay: 0.4s; }
.timeline__item:nth-child(5) { transition-delay: 0.5s; }

/* Growing line animation */
.timeline.visible::before {
    transform: scaleY(1);
}

/* Marker pulse effect for current position */
.timeline__marker--current {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--primary-color-rgb), 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(var(--primary-color-rgb), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--primary-color-rgb), 0);
    }
}

/* Hover effects */
.timeline__item:hover .timeline__content {
    transform: translateX(10px);
}

.timeline__content {
    transition: transform 0.3s ease;
}

/* Optional: Interactive markers */
.timeline__marker {
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.timeline__marker:hover {
    transform: scale(1.2);
}

.timeline__marker {
    position: absolute;
    left: -2rem;  /* Adjust marker position */
    width: 16px;  /* Explicit width */
    height: 16px;  /* Explicit height */
    border-radius: 50%;
    background: var(--background-light);
    border: 2px solid var(--text-muted);
}

.timeline__marker--current {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.timeline__date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.timeline__role {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

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

.timeline__details {
    list-style-type: none;
    padding-left: 0;
}

.timeline__details li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.timeline__details li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

.thesis {
    font-style: italic;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Timeline responsive styles */
@media (max-width: 768px) {    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline__marker {
        left: -2rem;
        width: 16px;
        height: 16px;
    }
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.section-header .lead {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.7);
}

/* Modal styling */
.modal {
    z-index: 1050;
    overflow-y: auto !important; /* Force scrolling */
}

.modal-dialog {
    max-width: 800px;
    margin: 1.75rem auto;
    pointer-events: auto; /* Ensure clicks work */
}

.modal-content {
    background: var(--background-dark);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    display: flex;
    flex-direction: column;
    pointer-events: auto; /* Ensure clicks work */
    max-height: 85vh; /* Limit height */
}

.modal-header,
.modal-footer {
    flex-shrink: 0;  /* Prevent header/footer from shrinking */
}

.modal-title {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-light);
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--background-dark) !important;
    opacity: 1 !important;
}

/* Ensure close button is clickable */
.btn-close {
    position: relative;
    z-index: 1060;
    padding: 1rem;
    margin: -1rem -1rem -1rem auto;
    cursor: pointer;
}

.modal-backdrop {
    z-index: 1040;
}

/* Modal content sections */
.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section-title {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.modal__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.modal__list {
    list-style-type: none;
    padding-left: 0;
}

.modal__list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal__list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.modal__metrics {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal__footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
}

/* Override Bootstrap's default modal backdrop color */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Project Cards */
.project-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
    border: none;
    border-radius: 8px;
    overflow: hidden;
}

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

.project-card:hover::after {
    opacity: 1;
}

.project-card .card-body {
    padding: 1.5rem;
}

.project-card .card-title {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-card .card-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-card .card-text {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

.project-section {
    color: var(--text-light);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.project-section h2 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.project-section p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-section ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.project-section li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

/* Dropdown hover behavior */
.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu {
    margin-top: 0;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    color: var(--text-dark);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    position: relative;
}

.dropdown-item:hover {
    background: var(--background-dark);
    color: var(--text-light);
    transform: translateX(5px);
}

/* Smooth dropdown appearance */
.dropdown-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Optional: Add indicator for current project */
.dropdown-item.active {
    background-color: var(--background-dark);
    color: var(--text-light);
}

/* Project page specific styles */
.project-study {
    padding-top: 80px; /* Account for fixed navbar */
}


.project-header {
    background: linear-gradient(45deg, var(--background-dark), var(--tertiary-color));
    padding: 60px 0 40px;
    margin-bottom: 40px;
}

.project-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.project-header .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 800px;
}

.project-meta {
    margin-bottom: 1.5rem;
}

.project-meta .badge {
    margin-right: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.milestone-cards {
    display: flex;
    gap: 2rem;
    margin: 3rem 0;
    justify-content: center;
}

.milestone-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    flex: 1;
    max-width: 300px;
}

.milestone-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.milestone-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.milestone-card p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.milestone-card .date {
    font-size: 0.8rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .milestone-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .milestone-card {
        width: 100%;
    }
}

.metric-card {
    background: var(--background-light);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    text-align: center;
}

.metric-card .metric {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.back-button {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.back-button:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.back-button i {
    font-size: 1.2rem;
}

/* Add responsive adjustments */
@media (max-width: 768px) {
    .back-button {
        padding: 0.3rem 0.8rem;
        font-size: 0.9rem;
    }
}

.breadcrumb-nav {
    padding: 1rem 0;
}

.breadcrumb-nav .back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.breadcrumb-nav .back-button:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.breadcrumb-nav .back-button i {
    font-size: 1.2rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .breadcrumb-nav {
        padding: 0.5rem 0;
    }
    
    .breadcrumb-nav .back-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: none; /* Initially hidden */
    width: 45px;
    height: 45px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0.8;
}

.back-to-top.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    background: #3498db;
    transform: translateY(-3px);
    opacity: 1;
}

.back-to-top i {
    font-size: 1.2rem;
}
    
/* Project Navigation */
.project-navigation {
    padding: 3rem 0;
    border-top: 1px solid #eee;
}

.project-navigation .nav-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.project-navigation .nav-item {
    flex: 1;
    padding: 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-navigation .nav-direction {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.project-navigation .nav-title {
    font-weight: 500;
    font-size: 1.1rem;
}

.project-navigation .nav-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .project-navigation .nav-wrapper {
        flex-direction: column;
    }
}

/* Navigation active state styling */
.navbar .nav-link {
    position: relative;
    padding: 0.5rem 1rem;
}

/* Underline animation for nav items */
.navbar .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #3498db;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar .nav-link:hover::after {
    width: 70%;
}

/* Active state for main nav items */
.navbar .nav-item.active .nav-link::after,
.navbar .nav-link.active::after {
    width: 70%;
}

/* Dropdown specific styling */
.navbar .dropdown-item {
    position: relative;
    padding: 0.5rem 1.5rem;
    transition: all 0.2s ease;
}

/* Active state for dropdown items */
.navbar .dropdown-item.active {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
    font-weight: 500;
}

/* Hover effect for dropdown items */
.navbar .dropdown-item:hover {
    background-color: rgba(52, 152, 219, 0.05);
    transform: translateX(5px);
}

/* Active dropdown parent */
.navbar .nav-item.dropdown.show .nav-link,
.navbar .nav-item.dropdown .nav-link[aria-expanded="true"] {
    color: #3498db;
}

/* Contact Section */
.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact__card {
    background: var(--background-light);
    border-radius: 8px;
    padding: 2rem;
    height: 100%;
}

.contact__header {
    margin-bottom: 2rem;
}

.contact__header h3 {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.contact__items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact__item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact__icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact__content {
    flex: 1;
}

.contact__label {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.contact__link {
    color: var(--tertiary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact__link:hover {
    color: var(--quaternary-color);
}

.contact__text {
    color: var(--text-muted);
}

.contact__map {
    height: 100%;
    min-height: 450px;
    border-radius: 8px;
    overflow: hidden;
}

.contact__iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .contact__grid {
        grid-template-columns: 1fr;
    }
    
    .contact__map {
        min-height: 350px;
    }
}

.cv-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-card {
    background: var(--background-light);
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


/* Board Position card */
.board-position h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.board-position h4 {
    font-size: 1rem;
    margin: 0.8rem 0 0.3rem;
}

.position-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

/* Education card */
.education-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.education-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.education-item h4 {
    font-size: 1rem;
    margin: 0.8rem 0 0.3rem;
}

.education-description {
    font-size: 0.9rem;
    margin-top: 0.4rem !important;
    line-height: 1.4;
}

/* Shared badge styling */
.position-meta .badge {
    font-size: 0.75rem;
    padding: 0.4em 0.8em;
}

/* Shared text styling */
.position-description,
.education-item p:not(.education-description) {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

/* Board Position styling */
.board-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);  /* Same separator as education */
}

.board-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.board-item h4 {
    font-size: 1rem;
    margin: 0.8rem 0 0.3rem;
}

.position-description {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.4rem;
    line-height: 1.4;
}

.project-card {
    position: relative;  /* Ensure this is set for absolute positioning to work */
}

.click-indicator {
    position: absolute;
    top: 1rem;          /* Align with tags */
    right: 1rem;        /* Align with card padding */
    z-index: 1;         /* Ensure it's above other elements */
}

.click-indicator i {
    font-size: 1.5rem;
    color: var(--primary-color);
    opacity: 0.7;
}

.project-card:hover .click-indicator i {
    opacity: 1;
}

/* Blog Section Styles */

.blog__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Project Card */
.blog-card {
    background: var(--background-light);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}


.blog-card__body {
    padding: 1.5rem;
}


.blog-card__indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}


.blog-card:hover .blog-card__indicator {
    opacity: 1;
}


.blog-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.blog-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}


.blog-card__subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1rem;
}


.blog-card__description {
    margin-bottom: 1.5rem;
}


.blog-card__metrics {
    display: flex;
    gap: 2rem;
}


/* Blog Post Page Styles */
.blog-post {
    padding-top: 80px;
}

.blog-header {
    background: linear-gradient(45deg, var(--background-dark), var(--quaternary-color));
    color: white;
    padding: 60px 0 40px;
    margin-bottom: 40px;
}

.blog-header .blog-meta {
    margin-bottom: 20px;
}

.blog-header .badge {
    margin-right: 8px;
}

.blog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.blog-header .lead {
    font-size: 1.2rem;
    opacity: 0.9;
}

.blog-info {
    margin-top: 20px;
    font-size: 0.9rem;
}

.blog-info span {
    margin-right: 20px;
    opacity: 0.8;
}

.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.blog-content section {
    margin-bottom: 40px;
}

.blog-content h2 {
    margin: 40px 0 20px;
    color: var(--text-dark);
}

.blog-content h3 {
    margin: 30px 0 15px;
    color: var(--text-dark);
}

.code-block {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
}

.code-block code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

/* Table of Contents Styles */
.toc-mobile {
    margin-bottom: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.toc-mobile .card {
    border: none;
    background: transparent;
}

.toc-mobile .card-body {
    padding: 1.5rem;
}

.toc-wrapper {
    position: sticky;
    top: 100px;  /* Adjust based on your navbar height */
}

.card--toc {
    background: linear-gradient(135deg, var(--background-dark), var(--background-light));
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.card--toc h4 {
    color: var(--text-light);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.card--toc .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.card--toc .nav-link:hover {
    color: var(--text-light);
    transform: translateX(5px);
}

.card--toc .nav-link.active {
    color: var(--primary-color);
    font-weight: 500;
}

/* Nested navigation items */
.card--toc .nav .nav {
    margin-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.card--toc .nav .nav .nav-link {
    font-size: 0.9rem;
    padding: 0.3rem 0 0.3rem 1rem;
}

/* Mobile adjustments */
@media (max-width: 991.98px) {
    .toc-mobile {
        order: -1; /* Ensures TOC appears before content on mobile */
        margin: 1rem -0.75rem 2rem -0.75rem; /* Negative margin to align with container */
    }

    .toc .nav-link:hover {
        transform: none; /* Disable hover animation on mobile */
    }
}

/* Key Metrics Cards */
.key-metrics {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.key-metrics h4 {
    margin-bottom: 15px;
    color: var(--text-dark);
}

.metric-card {
    text-align: center;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    background: var(--background-light);
}

.metric-card .metric {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.metric-card .label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.blog-card-link:hover {
    transform: translateY(-5px);
    color: inherit;  /* Maintain text color on hover */
}

/* Optional: add shadow on hover */
.blog-card-link:hover .blog-card {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Mega Menu Styles */
.has-megamenu {
    position: static;  /* Allow mega menu to span full navbar width */
}

.megamenu {
    background: var(--background-dark);
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.2);
}

/* Large Screen Behavior */
@media (min-width: 992px) {
    .megamenu {
        position: absolute;
        left: 0;
        right: 0;
        padding: 2rem 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s ease;
    }

    .has-megamenu:hover .megamenu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .menu-card {
        padding: 1.5rem;
        background: #f8f9fa;
        border-radius: 8px;
        transition: transform 0.3s ease;
        position: relative;
    }

    .menu-card:hover {
        transform: translateY(-5px);
    }
}

/* Mobile Behavior */
@media (max-width: 991.98px) {
    .megamenu {
        display: none;
        padding: 1rem 0;
    }

    .has-megamenu.show .megamenu {
        display: block;
    }

    .menu-card {
        padding: 1rem;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }

    .has-megamenu > .nav-link[aria-expanded="true"] .bi-chevron-right {
        transform: rotate(90deg);
    }
}

.menu-items {
    padding: 1.5rem 0;
}

.menu-item {
    display: block;
    padding: 1.25rem;
    color: var(--text-light);  /* White text */
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.menu-item:hover {
    background: rgba(100, 108, 255, 0.15);  /* Subtle highlight using tertiary color */
    border-left-color: var(--tertiary-color);
    text-decoration: none;
}

.menu-item h4 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-light);
}

.menu-item p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);  /* Slightly muted white */
    margin: 0.5rem 0 0.75rem 0;
    line-height: 1.4;
}

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

.menu-item .badge {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.35em 0.65em;
    background: rgba(255, 255, 255, 0.1);  /* Subtle badge background */
    color: var(--text-light);
}

/* Mobile adjustments */
@media (max-width: 991.98px) {
    .menu-item {
        border-left: none;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    
    .menu-item:last-child {
        border-bottom: none;
    }
}


.mobile-nav-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.expand-button {
    background: none;
    border: none;
    padding: 0.5rem;
    color: var(--text-light);
}

.menu-header {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-header:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-light);
}

/* Base styles for chevron */
.nav-link .bi-chevron-right {
    display: inline-block;  /* Important for rotation */
    transition: transform 0.3s ease;
}

/* Mobile menu expansion */
.nav-link[aria-expanded="true"] .bi-chevron-right {
    transform: rotate(90deg);
}

/* Large screen hover */
@media (min-width: 992px) {
    .nav-item.has-megamenu:hover .bi-chevron-right {
        transform: rotate(90deg);
    }
}

/* TOC responsive behavior */
@media (max-width: 991.98px) {
    .toc-wrapper {
        order: -1; /* Moves TOC above content on mobile */
        margin-bottom: 2rem;
    }
}

@media (min-width: 992px) {
    .toc-wrapper {
        position: sticky;
        top: 100px;
    }
}

/* TOC scroll padding elements */
#scroll-padding-top {
    height: 100px;  /* Adjust based on your navbar height */
    visibility: hidden;
}

#scroll-padding-bottom {
    height: 100vh;  /* Full viewport height */
    visibility: hidden;
}

footer {
    background-color: var(--background-dark);
    color: var(--text-light);
    padding: 1rem 0;
}

section#about {
    padding: 4rem 0;
}

.about-row {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin: 6rem 0;
    min-height: 400px;
}

/* First row (Journey) - Image left, text right */
.about-row:nth-child(2) {
    flex-direction: row;
}

/* Third row (What I Do) - Image left, text right */
.about-row:nth-child(4) {
    flex-direction: row;
}

/* Keep responsive design */
@media (max-width: 768px) {
    .about-row,
    .about-row:nth-child(2),
    .about-row:nth-child(3),
    .about-row:nth-child(4) {
        flex-direction: column;
        gap: 2rem;
    }
}

.about-content {
    flex: 1;
    padding: 2rem;
}

.about-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-content h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

/* Visual elements styling */
.profile-image {
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.focus-list {
    list-style: none;
    padding: 0;
}

.focus-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.focus-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--tertiary-color);
}

/* Responsive design */
@media (max-width: 768px) {
    .about-row {
        flex-direction: column;
        gap: 2rem;
    }

    .about-row:nth-child(2),
    .about-row:nth-child(3) {
        flex-direction: column;
    }
}

.navbar-nav .book-me-btn {
    padding: 0.5rem 1.2rem;
    border: 1px solid var(--background-light);
    border-radius: 8px;
    margin-left: 1rem;
    transition: all 0.3s ease;
    background: transparent;
    color: var(--text-light);
}

.navbar-nav .book-me-btn:hover {
    background: var(--background-light);
    color: var(--text-light);
}

/* Fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hidden state - but still taking up space */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Visible state */
.fade-in.visible {
    animation: fadeInUp 0.8s ease forwards;
}

/* Base card structure */
.card {
  background: var(--background-light);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.3s ease;
}

.card:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Card variations */
.card--metric {
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
}


.card--milestone {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}


/* Card content elements */
.card__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--tertiary-color);
}

.card__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card__content {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.card__subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.card__metric {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.card__label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Add these to your card variations */
.card--toc {
    border: none;
    background: transparent;
}

.card--code {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
}

.card--section {
    margin-bottom: 2rem;
}

/* Add if you need code-specific styling */
.card__content--code {
    margin: 0;
    padding: 1rem;
}

/* Domain expertise cards layout - the grid for the individual cards*/
.expertise-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Expertise card variation */
.card--expertise {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .skills-cards {
        grid-template-columns: 1fr;
    }
}

/* Section spacing */
.technical-skills {
    margin-top: 4rem;  /* Adds space above Technical Expertise */
}

.domain-expertise {
    margin-top: 4rem;  /* Adds space above Domain Expertise */
}

/* Optional: if you want consistent spacing for all major sections */
.section-header {
    margin-bottom: 2rem;  /* Space between header and content */
}

/* Projects Grid */
.projects__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Project Card */
.project-card {
    background: var(--background-light);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.project-card__body {
    padding: 1.5rem;
}

.project-card__indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-card__indicator {
    opacity: 1;
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
}

.tag--primary { background: var(--primary-color); }
.tag--secondary { background: var(--secondary-color); }
.tag--info { background: var(--tertiary-color); }

.project-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.project-card__subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.project-card__description {
    margin-bottom: 1.5rem;
}

.project-card__metrics {
    display: flex;
    gap: 2rem;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.metric__number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.metric__label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Modal metrics styling */
.modal-metrics {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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