:root {
  --background-color: #f8f9fa;
  --content-background-color: #ffffff;
  --text-color: #2c3e50;
  --primary-color: #007bff;
  --primary-color-hover: #0056b3;
  --border-color: #dee2e6;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --heading-font: sans-serif;
  --body-font: sans-serif;
}

html {
  background-color: var(--background-color);
}

body {
  font-family: var(--body-font);
  line-height: 1.6;
  color: var(--text-color);
  width: 95%;
  max-width: 960px;
  margin: 40px auto;
  padding: 30px 40px;
  background-color: var(--content-background-color);
  border-radius: 12px;
  box-shadow: 0 6px 20px var(--shadow-color);
  box-sizing: border-box;
  transition: all 0.3s ease;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5em;
  margin-bottom: 2.5em;
}

.site-title {
  font-family: var(--heading-font);
  font-size: 2.2em;
  font-weight: 700;
  margin: 0;
}

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

.site-title a:hover {
  color: var(--primary-color);
}

header nav a {
  margin-left: 2em;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.1em;
  transition: color 0.3s ease;
}

header nav a:hover,
header nav a:focus {
  color: var(--primary-color-hover);
}

header nav a.current-page {
  color: var(--text-color);
  font-weight: 700;
}

h1 {
  font-family: var(--heading-font);
}

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

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

ul {
  list-style: none;
  padding-left: 0;
}

li {
  margin-bottom: 1em;
}

pre {
  background-color: #f4f4f4;
  padding: 1em;
  border-radius: 5px;
  overflow-x: auto;
}

code {
  font-family: monospace;
}

.image-gallery {
  display: flex;
  gap: 2em;
  margin-top: 1em;
}
figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2em 0;
}

figcaption {
  text-align: center;
  font-style: italic;
  color: #555;
  margin-top: 0.5em;
}

.cta-button {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

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

.view-all-projects {
  text-align: center;
  margin-top: 2em;
}

img {
  max-width: 90%;
  height: auto;
  border-radius: 4px;
}

/* Responsive Design for Mobile */
@media (max-width: 600px) {
  body {
    margin: 10px auto;
    padding: 20px;
    box-shadow: 0 2px 8px var(--shadow-color);
  }

  header {
    flex-direction: column;
    text-align: center;
  }

  header nav {
    margin-top: 1em;
  }

  header nav a {
    margin-left: 0.75em;
    margin-right: 0.75em;
  }
}

/* Project Cards */
#project-list,
#featured-project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2em;
}

.project-card {
  background-color: var(--content-background-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--shadow-color);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.project-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-image-wrapper {
  display: flex;
  justify-content: center; /* center horizontally */
  align-items: center; /* center vertically if needed */
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: #f4f4f4;
}

.project-image {
  display: block;
  max-width: 100%;
  height: auto;
  width: auto;
  min-height: 100%;
  /* keep a cover-like behavior while allowing centering */
  object-fit: cover;
}

.project-content {
  padding: 1.5em;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-family: var(--heading-font);
  font-size: 1.25em;
  margin: 0 0 0.5em 0;
}

.project-description {
  margin: 0 0 1em 0;
  font-size: 0.9em;
  flex-grow: 1;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.tag {
  background-color: var(--border-color);
  color: var(--text-color);
  padding: 0.25em 0.75em;
  border-radius: 4px;
  font-size: 0.8em;
}

.status-badge {
  background-color: var(--primary-color);
  color: white;
  padding: 0.25em 0.75em;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 600;
}
