:root {
  --primary: #D32F2F;
  --background: #fff;
  --text-color: #333;
  --card-bg: #fff;
  --btn-bg: var(--primary);
  --btn-hover-bg: #a52727;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  margin: 0;
  background-color: #f9f9f9;
  font-family: var(--font-family);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

header, footer {
  background-color: var(--background);
  padding: 1rem 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

nav ul li a.active,
nav ul li a:hover {
  color: var(--primary);
}

.section-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--primary);
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: #555;
  font-style: italic;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 2.5rem;
}

.project-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  overflow: hidden;
  padding: 1.5rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.project-card:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  transform: translateY(-6px);
}

.project-card a {
  text-decoration: none;
  color: inherit;
}

.project-image {
  width: 100%;
  height: 170px;
  object-fit: contain; /* instead of cover */
  background-color: #f0f0f0; /* optional, for the letterbox background */
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 1.5rem;
}

.project-card p {
  flex-grow: 1;
  color: #444;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.btn {
  background-color: var(--btn-bg);
  color: white;
  padding: 0.75rem 1.6rem;
  font-weight: 700;
  border-radius: 6px;
  text-align: center;
  display: inline-block;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background-color: var(--btn-hover-bg);
}

footer p {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

footer .social a {
  color: var(--primary);
  margin-left: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer .social a:hover {
  color: #a52727;
}

/* Responsive tweaks */
@media screen and (max-width: 600px) {
  .header-container, .footer-container {
    flex-direction: column;
    gap: 0.8rem;
  }
  nav ul {
    flex-direction: column;
    gap: 1rem;
  }
  .project-image {
    height: 150px;
  }
}
