/* CSS vars */
.hpc-page {
  --hpc-accent:        var(--md-primary-fg-color, #7c4791);
  --hpc-accent2:       #bf60db;
  --hpc-accent-light:  rgba(124, 71, 145, 0.15);
  --hpc-accent-border: rgba(124, 71, 145, 0.45);
  --hpc-surface:       var(--md-default-bg-color, #ffffff);
  --hpc-text2:         var(--md-default-fg-color, #1a1a1a);
  --hpc-border:        rgba(124, 71, 145, 0.25);
  --hpc-border2:       rgba(124, 71, 145, 0.4);
  --hpc-radius:        0.5rem;
  --hpc-radius-sm:     0.3rem;
}

/* Dark mode variable overrides */
[data-md-color-scheme="slate"] .hpc-page {
  --hpc-accent-light:  rgba(154, 98, 187, 0.15);
  --hpc-accent-border: rgba(154, 98, 187, 0.45);
  --hpc-border:        rgba(154, 98, 187, 0.25);
  --hpc-border2:       rgba(154, 98, 187, 0.4);
}

.md-content:has(.hpc-page) {
  max-width: 100% !important;
}

/* hero section */
.hpc-hero {
  border: 2px solid var(--hpc-accent);
  border-radius: var(--hpc-radius);
  background: var(--hpc-surface);
  margin-bottom: 1.5rem;
  padding: 2.5rem 2rem 2rem;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.8s ease-out;
}

/* decorative background */
.hpc-hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hpc-accent-light) 0%, transparent 70%);
  pointer-events: none;
}

.hpc-hero-title {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--md-default-fg-color);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

/* Highlighted definition block */
.hpc-hero-definition {
  font-size: 15px;
  color: var(--hpc-text2);
  line-height: 1.85;
  text-align: left;
  background: var(--hpc-accent-light);
  border-left: 3px solid var(--hpc-accent);
  border-radius: 0 var(--hpc-radius-sm) var(--hpc-radius-sm) 0;
  padding: 1rem 1.5rem;
}

/* section label */
.hpc-section-label {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--md-default-fg-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  margin-top: 2rem;
  text-align: left;
}

/* pills */
.hpc-category-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.hpc-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  background: transparent;
  border: 2px solid var(--hpc-accent);
  border-radius: 10px;
  padding: 10px 22px;
  font-size: 13px;
  color: var(--md-default-fg-color);
  cursor: pointer;
  font-weight: 800;
  transition: all 0.3s ease;
  white-space: nowrap;
  user-select: none;
  min-width: 150px;
}

.hpc-pill svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 2;
  flex-shrink: 0;
}

.hpc-pill:hover {
  background: var(--hpc-accent2);
  border-color: var(--hpc-accent2);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--hpc-accent-light);
}

.hpc-pill.active {
  background: var(--hpc-accent);
  border-color: var(--hpc-accent);
  color: #fff;
}

/* thesis section */
#thesis-section {
  margin-top: 2rem;
}

/* table wrapper */
.pub-inline-wrap {
  border: 2px solid var(--hpc-accent);
  border-radius: var(--hpc-radius);
  background: var(--hpc-surface);
  margin-bottom: 2rem;
  overflow: hidden;
  animation: fadeInUp 0.9s ease-out;
}

/* scrollable table container */
.table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 420px;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.65rem;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table thead tr {
  background: var(--md-default-bg-color);
}

.data-table th {
  color: #1a1a1a;
  padding: 12px;
  text-align: left;
  border-bottom: 2px solid var(--hpc-accent);
  font-weight: 700;
  background: inherit;
}

/* header text -> white in dark mode */
[data-md-color-scheme="slate"] .data-table th {
  color: var(--md-default-fg-color);
}

/* cell text follows the theme automatically */
.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--hpc-border2);
  color: var(--md-default-fg-color);
  vertical-align: top;
  text-align: left;
}

.data-table tr:hover td { background: var(--hpc-accent-light); }

.hpc-page a,
.data-table a {
  color: var(--hpc-accent) !important;
  text-decoration: none;
  font-weight: 600;
}

.hpc-page a:hover,
.data-table a:hover {
  color: var(--hpc-accent2) !important;
  text-decoration: underline;
}

/* year filters */
.year-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1.5rem;
}

.filter-btn {
  background: transparent;
  color: var(--md-default-fg-color);
  border: 2px solid var(--hpc-accent);
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 0.70rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
}

.filter-btn:hover {
  background: var(--hpc-accent2);
  color: #fff;
  border-color: var(--hpc-accent2);
}

.filter-btn.active {
  background: var(--hpc-accent);
  color: #fff;
  border-color: var(--hpc-accent);
}

.year-badge {
  background: var(--hpc-accent-light);
  color: var(--hpc-accent);
  padding: 1px 5px;
  border-radius: 6px;
  font-size: 0.60rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid var(--hpc-accent-border);
}

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

/* recent projects (cards)*/
.hpc-recent-projects {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 3 cards + 1 CTA tile */
  gap: 1.2rem;
  margin-bottom: 2rem;
  align-items: stretch;
}

@media (max-width: 900px) {
  .hpc-recent-projects { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .hpc-recent-projects { grid-template-columns: 1fr; }
}

/* image cards */
.hpc-project-card {
  border-radius: var(--hpc-radius);
  overflow: hidden;
  display: block;
  text-decoration: none !important;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
  height: 100%;
  animation: fadeInUp 0.7s ease-out;
  cursor: pointer;
  background: transparent;
  border: none;
}

.hpc-project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 18px var(--hpc-accent-light);
}

.hpc-project-card-img {
  width: 100%;
  flex: 1;               
  object-fit: cover;
  display: block;
  border-radius: var(--hpc-radius);
  min-height: 0;
}

.hpc-project-card-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--hpc-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hpc-accent);
}

.hpc-project-card-placeholder svg {
  width: 40px; height: 40px;
}

.hpc-project-card-label {
  display: none;
}

.hpc-project-card-cta {
  background: var(--hpc-accent);
  border: 2px solid var(--hpc-accent);
  border-radius: var(--hpc-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  padding: 1.5rem 1rem;
  transition: background 0.25s ease, transform 0.2s ease;
  animation: fadeInUp 0.8s ease-out;
  min-height: 120px;
}

.hpc-project-card-cta svg {
  width: 36px; height: 36px;
  stroke: #fff;
}

.hpc-project-card-cta:hover {
  background: var(--hpc-accent2);
  border-color: var(--hpc-accent2);
  transform: translateY(-3px);
}