/* 
 * Main CSS for Mahboob Alam's Portfolio
 * Based on the design inspiration from Corey Schafer's portfolio
 */

/* ==========================================================================
   Base styles and variables
   ========================================================================== */

:root {
  --primary-color: #3d5afe;
  --primary-light: #8187ff;
  --primary-dark: #0031ca;
  --text-color: #333;
  --text-light: #666;
  --text-lighter: #999;
  --background-color: #ffffff;
  --background-alt: #f8f9fa;
  --border-color: #e0e0e0;
  --link-color: var(--primary-color);
  --link-hover: var(--primary-dark);
  --header-bg: var(--primary-color);
  --header-text: #ffffff;

  --grid-gap: 2rem;
  --section-spacing: 3rem;
  --element-spacing: 1.5rem;
}

body {
  font-family: 'Nunito', sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Montserrat', sans-serif;
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-color);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  color: var(--link-hover);
  text-decoration: underline;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

ul {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ==========================================================================
   Layout & Grid
   ========================================================================== */

.page-content .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
  padding-top: var(--section-spacing);
  padding-bottom: var(--section-spacing);
}

@media (min-width: 768px) {
  .page-content .container {
    grid-template-columns: 2fr 1fr;
  }
}

section {
  margin-bottom: var(--section-spacing);
}

section section {
  margin-bottom: var(--element-spacing);
  padding-bottom: var(--element-spacing);
  border-bottom: 1px solid var(--border-color);
}

section section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.section-heading {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 3rem;
  height: 0.25rem;
  background-color: var(--primary-color);
  border-radius: 0.125rem;
}

.section-label {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.experience-type,
.project-tech {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: -0.5rem;
  margin-bottom: 1rem;
  font-style: italic;
}

.block {
  display: block;
  margin-bottom: 0.25rem;
}

/* ==========================================================================
   Header styles
   ========================================================================== */

.page-header {
  background-color: var(--header-bg);
  color: var(--header-text);
  padding: 3rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.header-info {
  flex: 1;
}

.header-info h1 {
  margin-bottom: 0.25rem;
  color: var(--header-text);
}

.header-label {
  font-size: 1.5rem;
  opacity: 0.9;
  margin-bottom: 1rem;
  font-weight: 500;
  color: var(--header-text);
}

.header-summary {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  max-width: 800px;
  opacity: 0.9;
}

/* ==========================================================================
   Project Styles
   ========================================================================== */

.project-idea {
  font-size: 1.1rem;
  color: var(--text-color);
  margin: 1rem 0;
  line-height: 1.5;
}

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

.project-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.project-link {
  color: var(--text-light);
  transition: color 0.3s ease;
  font-size: 0.9rem;
}

.project-link:hover {
  color: var(--primary-color);
}

/* ==========================================================================
   Lists and Links
   ========================================================================== */

.inline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.flex-responsive {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 576px) {
  .flex-responsive {
    flex-direction: row;
    align-items: center;
  }
}

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

.link-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.link-with-icon svg {
  flex-shrink: 0;
}

.header-link {
  color: rgba(255, 255, 255, 0.9) !important;
  text-decoration: none;
  transition: color 0.3s ease;
}

.header-link:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

/* ==========================================================================
   Skill bars
   ========================================================================== */

.skill-bar {
  height: 10px;
  background-color: var(--background-alt);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  position: relative;
}

.skill-bar-fill {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 5px;
  position: relative;
}

.skill-bar-label {
  position: absolute;
  right: 0;
  top: -1.5rem;
  font-size: 0.8rem;
  color: var(--text-light);
}

.w-100 {
  width: 100%;
}

.w-95 {
  width: 95%;
}

.w-90 {
  width: 90%;
}

.w-85 {
  width: 85%;
}

.w-80 {
  width: 80%;
}

.w-75 {
  width: 75%;
}

.w-70 {
  width: 70%;
}

.w-65 {
  width: 65%;
}

.w-60 {
  width: 60%;
}

.w-55 {
  width: 55%;
}

.w-50 {
  width: 50%;
}

/* ==========================================================================
   Galleries
   ========================================================================== */

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 576px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .main-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery figure:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.gallery img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16/9;
  display: block;
  transition: transform 0.3s ease;
}

.gallery figure:hover img {
  transform: scale(1.05);
}

.gallery a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.gallery figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.75rem;
  font-size: 0.9rem;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   Footer styles
   ========================================================================== */

/* .page-footer {
  background-color: var(--text-color);
  color: white;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
} */

.page-footer {
  background-color: #f0f8ff;
  color: #333;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  border-top: 1px solid #e0e0e0;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1rem;
}

.page-footer p {
  margin: 0;
  line-height: 1.5;
}

/* ==========================================================================
  Certificates Section
  ========================================================================== */

.certificates-list li {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.certificates-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.certificates-list h4 {
  margin-bottom: 0.4rem;
}

.certificates-list .section-label {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.certificates-list p {
  margin-bottom: 0.5rem;
}

.certificates-list em {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 767px) {
  .header-top {
    flex-direction: column;
    text-align: center;
  }

  .header-image {
    margin-bottom: 1rem;
  }

  .section-heading::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .skill-bar-label {
    right: 0;
  }

  .inline-list {
    justify-content: center;
  }
}