:root {
  --primary-color: #242b33;
  --secondary-color: #77658f;
  --accent-color: #4d2387;
  --light-color: #ecf0f1;
  --dark-color: #293642;
}

body {
  background-color: #f8f9fa;
  font-family: 'Roboto', sans-serif;
  color: #333;
  line-height: 1.6;
}

.header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 20px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--light-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.logo img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.project-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.project-btn {
  background-color: var(--light-color);
  color: var(--dark-color);
  border: none;
  border-radius: 50px;
  padding: 10px 20px;
  font-family: 'Roboto Mono', monospace;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

.project-btn:hover {
  background-color: var(--secondary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.project-btn:active {
  transform: translateY(0);
}

.project-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.project-btn:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

.content-section {
  padding: 60px 0;
  text-align: center;
}

.main-title {
  font-family: 'Roboto Mono', monospace;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.main-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--accent-color);
}

.subtitle {
  font-family: 'Roboto Mono', monospace;
  color: var(--dark-color);
  margin-bottom: 40px;
  font-weight: 300;
}

.gif-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  padding: 0 20px;
}

.gif-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  transition: all 0.4s ease;
  background-color: white;
  aspect-ratio: 1 / 1;
}

.gif-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.gif-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gif-item:hover img {
  transform: scale(1.05);
}

.gif-caption {
  padding: 15px;
  background-color: white;
  text-align: center;
  font-family: 'Roboto Mono', monospace;
  font-weight: 500;
  color: var(--dark-color);
}

/* Special layout for 5 items */
.gif-grid-5 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, auto);
}

.gif-grid-5 .gif-item:nth-child(1) {
  grid-column: 1 / 3;
  grid-row: 1;
  aspect-ratio: 2 / 1;
}

.gif-grid-5 .gif-item:nth-child(2) {
  grid-column: 3;
  grid-row: 1 / 3;
  aspect-ratio: 1 / 2;
}

.gif-grid-5 .gif-item:nth-child(3) {
  grid-column: 1;
  grid-row: 2;
  aspect-ratio: 1 / 1;
}

.gif-grid-5 .gif-item:nth-child(4) {
  grid-column: 2;
  grid-row: 2;
  aspect-ratio: 1 / 1;
}

.gif-grid-5 .gif-item:nth-child(5) {
  grid-column: 1 / 4;
  grid-row: 3;
  aspect-ratio: 3 / 1;
}

.footer {
  background-color: var(--dark-color);
  color: var(--light-color);
  padding: 30px 0;
  text-align: center;
  margin-top: 60px;
}

.footer p {
  margin: 0;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.9rem;
}

@media (max-width: 992px) {
  .gif-grid-5 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, auto);
  }
  
  .gif-grid-5 .gif-item:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1;
    aspect-ratio: 2 / 1;
  }
  
  .gif-grid-5 .gif-item:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    aspect-ratio: 1 / 1;
  }
  
  .gif-grid-5 .gif-item:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    aspect-ratio: 1 / 1;
  }
  
  .gif-grid-5 .gif-item:nth-child(4) {
    grid-column: 1;
    grid-row: 3;
    aspect-ratio: 1 / 1;
  }
  
  .gif-grid-5 .gif-item:nth-child(5) {
    grid-column: 2;
    grid-row: 3;
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 768px) {
  .project-buttons {
    gap: 8px;
  }
  
  .project-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  
  .content-section {
    padding: 40px 0;
  }
  
  .gif-grid-5 {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, auto);
  }
  
  .gif-grid-5 .gif-item:nth-child(1),
  .gif-grid-5 .gif-item:nth-child(2),
  .gif-grid-5 .gif-item:nth-child(3),
  .gif-grid-5 .gif-item:nth-child(4),
  .gif-grid-5 .gif-item:nth-child(5) {
    grid-column: 1;
    grid-row: auto;
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 576px) {
  .project-buttons {
    gap: 5px;
  }
  
  .project-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .logo {
    width: 100px;
    height: 100px;
  }
  
  .logo img {
    width: 80px;
    height: 80px;
  }
}