:root {
  --bg-main: #E1E1DF; 
  --bg-card: #DFDED0;
  --text-main: #000000;
  --shadow-main: rgb(0, 0, 0);
  --project-type: #aaa;
  --last-updated: #777;
  --page-background:#ebeaeb;
}

html body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: var(--bg-main) !important;
}
header {
  background: #DFDED0;
  color: var(--text-main);
  padding: 1rem;
  text-align: center;
}
nav a {
  color: var(--text-main);
  margin: 0 10px;
  text-decoration: none;
}
section {
  padding: 2rem;
}

.projects-container,
.certificate-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  justify-items: center; /* center cards in wide containers */
}

.about-card {
  width: 100%;
  max-width: 800px;   /* wider so animation fits */
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 4px 10px var(--shadow-main);
  padding: 1.5rem;

  margin: 0 auto;

  display: flex;
  align-items: center;
  gap: 40px;
}

.about-text {
  flex: 1;
  max-width: 500px;
}

.project-card,
.certificate-card {
  width: 100%; /* fill the grid column */
  max-width: 400px; /* prevents cards/images from getting too wide */
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 4px 10px var(--shadow-main);
  display: flex;
  flex-direction: column;
}

.project-img {
  width: 100%;
  max-width: 100%; /* never exceed card width */
  height: auto; /* maintain aspect ratio */
  object-fit: cover; /* crop if necessary, but don’t stretch */
}

.project-body {
  padding: 1rem;
}

.project-title {
  margin: 0;
}

.project-type {
  font-style: italic;
  color: var(--project-type);
}

.project-tags {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-tags li {
  background: #333;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  font-size: 0.8rem;
}

.project-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: #4da6ff;
  text-decoration: none;
}

.project-link {
  display: block;
  margin-bottom: 0.5rem; /* optional spacing */
}

.project-title {
  display: flex;
  align-items: center; /* vertically center the icon with text */
  gap: 0.5rem; /* space between icon and text */
}

.project-icon {
  width: auto; /* adjust size as needed */
  height: 24px;
}

.site-footer {
  text-align: center; /* center everything */
  padding: 2rem 1rem; /* space around content */
  background-color: #f8f9fa; /* light gray background */
  color: #555; /* subtle text color */
  font-size: 0.9rem;
  border-top: 1px solid #ddd; /* optional top border */
}

.site-footer p {
  margin: 0.3rem 0; /* spacing between lines */
}

/* optional: make the date and copyright slightly different */
.last-updated {
  font-style: italic;
  color: #777;
}

.skill-filter {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.skill-filter.active {
  opacity: 1;
  font-weight: bold;
  text-decoration: underline;
}

.see-more-btn {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  text-decoration: none;
  color: inherit;

  opacity: 0.7;
  transition: opacity 0.2s;
}

.see-more-btn:hover,
.contact-icon:hover,
.skill-filter:hover {
  opacity: 1;
  transform: scale(1.1);
}

.contact-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem; /* space between icons */
  margin-top: 1rem;
  flex-wrap: wrap; /* allows breaking */
}

.contact-icon {
  width: 32px; /* adjust to taste */
  height: 32px;
  opacity: 0.7;
  transition:
    opacity 0.2s,
    transform 0.2s;
}


.animation-stage {
  position: relative;
  width: 400px;
  height: 300px;
  overflow: hidden;
  flex-shrink: 0;
  margin-right: -24px;
  margin-bottom: -24px;
}

.cat {
  position: absolute;
  bottom: 200px;
  left: 800px;              /* start off screen */

  width: 200px;
  height: 100px;

  background: url("../images/spritesheet.png") no-repeat;
  background-size: 3200px 100px;

  animation:
    cat-walk 4s linear forwards,
    cat-frames 16s steps(15) forwards;
}

@keyframes cat-walk {
  from { left: 600px; }
  to   { left: 120px; }
}

@keyframes cat-frames {
  from { background-position: 0 0; }
  to   { background-position: -3000px 0; }
}

.glass {
  position: absolute;
  bottom: 0;
  left: 60px;

  width: 100px;
  height: 300px;

  background: url("../images/glass_fall_sprite.png") no-repeat;

  animation: glass-fall 0.4s steps(3) forwards;
  animation-delay: 10s;
}

@keyframes glass-fall {
  from { background-position: 0 0; }
  to   { background-position: -300px 0; }
}

@media (max-width: 900px) {

  .about-card {
    flex-direction: column;
    text-align: center;
  }

  .animation-stage {
    display: none;
  }

}