.portfolio-main {
  width: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 64px;
  box-sizing: border-box;
  font-family: Inter, sans-serif;
  animation: fadeIn 0.6s ease;
}

.portfolio-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 960px;
}

.portfolio-title {
  margin: 0;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 120%;
  color: #1e1e1e;
  font-family: Inter, sans-serif;
}

.portfolio-subtitle {
  margin: 0;
  font-size: 18px;
  line-height: 140%;
  color: #757575;
  max-width: 700px;
}

.portfolio-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  width: 100%;
}

.project-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease,
    transform 0.25s ease;
  color: inherit;
  min-height: 100%;
}

.project-card:hover {
  border-color: #4a90e2;
  box-shadow: 0 8px 40px rgba(74, 144, 226, 0.25);
  transform: translateY(-2px);
}

.project-card:focus-visible {
  outline: 2px solid #4a90e2;
  outline-offset: 2px;
}

.project-link {
  cursor: pointer;
}

.project-image {
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

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

.project-status {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(74, 144, 226, 0.9);
  color: #fff;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.project-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.project-name {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  color: #1e1e1e;
}

.project-description {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: #757575;
  flex-grow: 1;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tech-item {
  background: #eaf4ff;
  color: #4a90e2;
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 700;
  margin: 2px 2px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.08);
  border: 1px solid #4a90e2;
  display: inline-block;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.tech-item:hover {
  background: #4a90e2;
  color: #fff;
  box-shadow: 0 4px 16px rgba(74, 144, 226, 0.18);
}

/* Responsive Design */
@media (max-width: 900px) {
  .portfolio-main {
    padding: 56px 48px;
  }

  .portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 640px) {
  .portfolio-main {
    padding: 48px 32px;
    gap: 40px;
  }

  .portfolio-title {
    font-size: 32px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .project-image {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .portfolio-main {
    padding: 40px 20px;
    gap: 32px;
  }

  .portfolio-title {
    font-size: 28px;
  }

  .portfolio-grid {
    gap: 20px;
  }

  .project-content {
    padding: 16px;
  }

  .project-image {
    height: 160px;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Project card stagger animation */
.project-card:nth-child(1) {
  animation: slideUp 0.6s ease-out 0.1s both;
}

.project-card:nth-child(2) {
  animation: slideUp 0.6s ease-out 0.2s both;
}

.project-card:nth-child(3) {
  animation: slideUp 0.6s ease-out 0.3s both;
}

.project-card:nth-child(4) {
  animation: slideUp 0.6s ease-out 0.4s both;
}

.project-card:nth-child(5) {
  animation: slideUp 0.6s ease-out 0.5s both;
}

.project-card:nth-child(6) {
  animation: slideUp 0.6s ease-out 0.6s both;
}

.project-card:nth-child(7) {
  animation: slideUp 0.6s ease-out 0.7s both;
}

.project-card:nth-child(8) {
  animation: slideUp 0.6s ease-out 0.8s both;
}

.project-card:nth-child(9) {
  animation: slideUp 0.6s ease-out 0.9s both;
}
.project-card:nth-child(10) {
  animation: slideUp 0.6s ease-out 1s both;
}
.project-card:nth-child(11) {
  animation: slideUp 0.6s ease-out 1.1s both;
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark mode support placeholder */
.dark-mode .portfolio-main {
  background: #1a1a1a;
}

.dark-mode .portfolio-title {
  color: #fff;
}

.dark-mode .portfolio-subtitle {
  color: #b0b0b0;
}

.dark-mode .project-card {
  background: #2a2a2a;
  border-color: #404040;
}

.dark-mode .project-card:hover {
  border-color: #4a90e2;
  box-shadow: 0 8px 40px rgba(74, 144, 226, 0.3);
}

.dark-mode .project-name {
  color: #fff;
}

.dark-mode .project-description {
  color: #b0b0b0;
}

.dark-mode .tech-item {
  background: #404040;
  color: #e0e0e0;
}

.dark-mode .tech-item:hover {
  background: #4a4a4a;
}
