/**
* Uniform Spacing and Layout CSS
* This file standardizes spacing across the entire website
*/

:root {
  /* Spacing Variables */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-xxl: 3rem;     /* 48px */

  /* Section Spacing */
  --section-padding-y: var(--space-xxl);
  --section-title-margin-bottom: var(--space-xl);

  /* Card Spacing */
  --card-padding: var(--space-md);
  --card-margin-bottom: var(--space-lg);
  --card-content-spacing: var(--space-md);

  /* Element Spacing */
  --element-margin-bottom: var(--space-md);
  --list-item-margin: var(--space-sm);

  /* Grid Spacing */
  --grid-gap: var(--space-md);
  --grid-item-margin: var(--space-md);
}

/* Apply consistent section spacing */
section {
  padding: var(--section-padding-y) 0;
  margin-bottom: 0;
}

/* Standardize section titles */
.section-title, .skills-title {
  margin-bottom: var(--section-title-margin-bottom);
  text-align: center;
}

.section-title h2, .skills-title h2 {
  display: inline-block;
  margin-bottom: var(--space-md);
}

/* Standardize card spacing */
.icon-box, .project-wrap, .testimonial-item, .contact .info {
  padding: var(--card-padding);
  margin-bottom: var(--card-margin-bottom);
  height: 100%;
}

/* Standardize grid spacing */
.row {
  margin-bottom: var(--space-lg);
}

.row:last-child {
  margin-bottom: 0;
}

/* Remove extra spacing between grid items */
.row > [class*="col-"] {
  margin-bottom: var(--grid-item-margin);
}

/* Standardize list spacing */
ul {
  padding-left: var(--space-lg);
}

ul li {
  margin-bottom: var(--list-item-margin);
}

ul li:last-child {
  margin-bottom: 0;
}

/* Standardize paragraph spacing */
p {
  margin-bottom: var(--element-margin-bottom);
}

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

/* Standardize heading spacing */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: var(--space-md);
}

/* Standardize skills section */
.skills .icon-box {
  padding: var(--card-padding);
  margin-bottom: var(--card-margin-bottom);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.skills .icon {
  margin-bottom: var(--space-md);
}

.skills .icon-box h4 {
  margin-top: var(--space-md);
  margin-bottom: 0;
}

/* Standardize project items */
.project-item {
  margin-bottom: var(--card-margin-bottom);
}

.project-wrap {
  margin-bottom: var(--space-sm);
}

/* Certification page styles */
.all-certifications .project-item {
  padding: var(--space-sm);
}

#project-flters {
  padding: 0;
  margin: 0 0 var(--space-xl) 0;
  list-style: none;
  text-align: center;
}

#project-flters li {
  cursor: pointer;
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  margin: 0 var(--space-xs) var(--space-sm) var(--space-xs);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  color: #272829;
  background: #f5f8fd;
  border-radius: 50px;
  transition: all 0.3s ease-in-out;
}

#project-flters li:hover, #project-flters li.filter-active {
  background: #149ddd;
  color: #fff;
}

.all-certifications .project-wrap {
  height: 100%;
  overflow: hidden;
  position: relative;
}

.all-certifications .project-wrap img {
  height: 200px;
  object-fit: contain;
  transition: all 0.3s ease;
}

.all-certifications .project-wrap:hover img {
  transform: scale(1.05);
}

.all-certifications .project-links {
  opacity: 0;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.6);
  padding: var(--space-sm);
  text-align: center;
}

.all-certifications .project-wrap:hover .project-links {
  opacity: 1;
}

/* Standardize achievements and participations */
.all-achievements, .all-participations {
  gap: var(--grid-gap);
  justify-content: center;
  display: flex;
  flex-wrap: wrap;
}

.all-participations .project-item {
  display: flex;
  justify-content: center;
}

.all-participations .project-wrap {
  text-align: center;
}

.all-participations .d-flex {
  text-align: center;
  align-items: center;
}

#acheivements .card, #participations .card {
  height: 100%;
  margin-bottom: 0;
}

#acheivements .card-body, #participations .card-body {
  padding: var(--card-padding);
  display: flex;
  flex-direction: column;
}

#acheivements .container, #participations .container {
  padding-left: 0;
  padding-right: 0;
}

#acheivements .card img, #participations .card img {
  height: 200px;
  object-fit: cover;
}

#acheivements .btn, #participations .btn {
  margin-left: auto;
}

/* Standardize contact info */
.contact .info {
  padding: var(--card-padding);
}

.contact .info i {
  margin-bottom: var(--space-sm);
}

.contact .info h4 {
  margin-bottom: var(--space-sm);
}

/* research section styling */
#research .icon-box {
  text-align: center;
  padding: var(--card-padding);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#research .icon {
  margin-bottom: var(--space-md);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(20, 157, 221, 0.1);
}

#research .icon i {
  font-size: 32px;
  color: #149ddd;
}

#research h4 {
  margin: var(--space-sm) 0;
}

#research p {
  margin-top: auto;
}

/* Standardize buttons */
.btn {
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-sm);
}

/* Glass card styling */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  transition: all 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
  border-color: rgba(20, 157, 221, 0.3);
}

.glass-card .card-body {
  padding: var(--card-padding);
}

.glass-card .card-title {
  color: #222;
  font-weight: 600;
}

.glass-card .card-text {
  color: #666;
}

.glass-card img {
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.glass-card:hover img {
  transform: scale(1.05);
}

/* Participation toggle button styling */
.participation-toggle {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: 2px solid #149ddd;
  background: transparent;
  color: #149ddd;
}

.participation-toggle:hover {
  background: #149ddd;
  color: white;
  transform: scale(1.1);
}

.participation-toggle i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.participation-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(20, 157, 221, 0.25);
}

/* Standardize mobile spacing */
@media (max-width: 768px) {
  :root {
    --section-padding-y: var(--space-xl);
    --section-title-margin-bottom: var(--space-lg);
    --card-padding: var(--space-sm);
    --card-margin-bottom: var(--space-md);
  }

  .skills .icon-box {
    padding: var(--space-sm);
  }

  .skills .icon {
    margin-bottom: var(--space-sm);
  }

  .skills .icon-box h4 {
    margin-top: var(--space-sm);
  }
}

.intro-section {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
