* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #222;
  background-color: #fff;
}

header {
  position: relative;
  color: white;
  text-align: center;
  padding: 4rem 1.5rem;
  background-color: #111;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('/images/datacenter-hero.jpg');
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) brightness(0.4);
  z-index: 0;
}

header > * {
  position: relative;
  z-index: 1;
}

header h1 {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

header .tagline {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 650px;
  margin: 0 auto;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

section {
  margin-bottom: 2.5rem;
}

section h2 {
  font-size: 1.75rem;
  color: #111;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #ddd;
}

section h3 {
  font-size: 1.4rem;
  color: #222;
  margin-bottom: 0.75rem;
}

section p {
  margin-bottom: 1rem;
  color: #333;
}

section ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

section ul li {
  margin-bottom: 0.4rem;
  color: #333;
}

section ul ul {
  margin-top: 0.4rem;
  margin-left: 1.25rem;
}

.status {
  background-color: #f5f5f5;
  border-left: 4px solid #666;
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
}

.status h3 {
  color: #333;
}

.status p {
  color: #444;
}

.status strong {
  color: #111;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
  align-items: start;
  grid-auto-rows: minmax(100px, auto);     /* Helps short cards stay compact */
  grid-auto-flow: dense;                    /* <-- Key change: allows shorter cards to fill gaps */
}

.skill-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  min-height: 440px;                        /* Slightly lower baseline so short cards don't feel forced */
  height: auto;
  margin-bottom:30px;
}

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

.skill-card h4 {
  font-size: 1.1rem;
  color: #111;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.skill-card ul {
  list-style-type: disc;
  margin-left: 1.25rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.skill-card ul li {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.skill-card p {
  margin-top: auto;
  font-size: 0.92rem;
  color: #555;
}

footer {
  background-color: #111;
  color: #888;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  header {
    padding: 3rem 1.5rem;
  }
  header h1 {
    font-size: 1.8rem;
  }
  header .tagline {
    font-size: 0.95rem;
  }
  section h2 {
    font-size: 1.4rem;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
}