/* Minimalist Research Portfolio Styling */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&family=Playfair+Display:wght@400;500;600&display=swap');

.portfolio-wrapper {
  min-height: 100vh;
  background: #FAFAFA;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
  color: #1D1D1F;
  padding-bottom: 80px;
}

.portfolio-wrapper * {
  box-sizing: border-box;
}

.section-header {
  text-align: center;
  padding: 64px 24px 20px;
  animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #86868B;
  margin-bottom: 14px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.5px;
  color: #1D1D1F;
  line-height: 1.1;
  margin-bottom: 14px;
}

.section-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  font-weight: 300;
  color: #86868B;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.5;
}

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 28px 24px 36px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s backwards;
}

.filter-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
  color: #86868B;
  white-space: nowrap;
}

.filter-btn:hover {
  color: #1D1D1F;
  background: rgba(0, 0, 0, 0.04);
}

.filter-btn.active {
  background: #1D1D1F;
  color: #FFFFFF;
  border-color: #1D1D1F;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 760px) {
  .projects-grid {
    grid-template-columns: 1fr;
    padding: 0 18px;
  }
}

.project-card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 30px 28px 26px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  color: inherit !important;
  animation: cardEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Accent Color Top Border */
.card-accent-border {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.08);
}

.project-card:hover .card-accent-border {
  opacity: 1;
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-category {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0,0,0,0.04);
}

.card-year {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #86868B;
  font-weight: 400;
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
  color: #1D1D1F;
  margin-bottom: 10px;
  transition: color 0.3s ease;
  flex-grow: 1;
}

.project-card:hover .card-title {
  color: var(--card-accent);
}

.card-authors {
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  color: #86868B;
  font-weight: 300;
  margin-bottom: 6px;
}

.card-venue {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #AEAEB2;
  font-style: italic;
  font-weight: 300;
  margin-bottom: 16px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.card-tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 400;
  padding: 3px 9px;
  border-radius: 5px;
  background: rgba(0,0,0,0.03);
  color: #6E6E73;
  letter-spacing: 0.2px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.05);
  margin-top: auto;
}

.card-links {
  display: flex;
  gap: 4px;
}

.card-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #86868B;
  padding: 5px 10px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  background: transparent;
  border: none;
  cursor: pointer;
}

.card-link:hover {
  background: rgba(0,0,0,0.05);
  color: #1D1D1F;
}

.card-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-link-github svg {
  fill: currentColor;
  stroke: none;
}

.card-view-more {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--card-accent);
}

.project-card:hover .card-view-more {
  opacity: 1;
  transform: translateX(0);
}

.card-view-more svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hide standard WoWchemy footer/header on this page if needed */
.navbar { margin-bottom: 0 !important; }
