/* ===========================
   HAKUSO - Portfolio / Works Page Styles
   =========================== */

/* --- Portfolio Grid --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin: 40px 0;
}

/* --- Portfolio Card --- */
.pf-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(108,60,225,0.08);
  transition: all 0.5s var(--ease-out-expo);
  position: relative;
}
.pf-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(108,60,225,0.12);
  border-color: rgba(108,60,225,0.15);
}

/* Thumbnail area */
.pf-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, rgba(108,60,225,0.06), rgba(0,201,167,0.06));
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pf-card-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0.04;
}
.pf-card-thumb-icon {
  font-size: 48px;
  color: var(--primary);
  opacity: 0.15;
  position: relative;
  z-index: 1;
}
/* Decorative shapes inside thumbnail */
.pf-card-thumb::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  border: 2px solid rgba(108,60,225,0.06);
  border-radius: 50%;
  pointer-events: none;
}
.pf-card:hover .pf-card-thumb-icon {
  opacity: 0.25;
  transform: scale(1.1);
  transition: all 0.5s var(--ease-out-expo);
}

/* Card body */
.pf-card-body {
  padding: 28px;
}
.pf-card-category {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.pf-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
  line-height: 1.5;
}
.pf-card-desc {
  font-size: 14px;
  line-height: 1.8;
  color: #666;
  margin-bottom: 16px;
}

/* Tags */
.pf-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.pf-card-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(108,60,225,0.06);
  color: var(--primary);
}

/* Results row */
.pf-card-results {
  display: flex;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.05);
}
.pf-card-result {
  text-align: center;
}
.pf-card-result-value {
  font-family: var(--font-en);
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.pf-card-result-label {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

/* --- Category Header --- */
.pf-category-header {
  margin-bottom: 48px;
}
.pf-category-lead {
  font-size: 16px;
  line-height: 2;
  color: #555;
  max-width: 700px;
}
.pf-category-stats {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  padding: 24px 0;
  border-top: 1px solid rgba(108,60,225,0.08);
  border-bottom: 1px solid rgba(108,60,225,0.08);
}
.pf-category-stat-number {
  font-family: var(--font-en);
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pf-category-stat-label {
  font-size: 13px;
  color: #888;
}

/* --- CTA at bottom --- */
.pf-cta {
  text-align: center;
  margin-top: 64px;
  padding: 48px;
  background: var(--dark);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}
.pf-cta::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--primary));
  background-size: 300% 300%;
  animation: gradient-border 6s ease infinite;
  border-radius: 26px;
  z-index: 0;
}
@keyframes gradient-border {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.pf-cta::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px; right: 2px; bottom: 2px;
  background: var(--dark);
  border-radius: 22px;
  z-index: 0;
}
.pf-cta > * { position: relative; z-index: 1; }
.pf-cta h3 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.pf-cta p {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 24px;
}

/* --- Filter tabs (on all.html) --- */
.pf-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.pf-filter-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 24px;
  border: 1px solid rgba(108,60,225,0.15);
  background: transparent;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}
.pf-filter-btn:hover,
.pf-filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* --- Entrance animations --- */
.pf-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}
.pf-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.pf-card:nth-child(2) { transition-delay: 0.08s; }
.pf-card:nth-child(3) { transition-delay: 0.16s; }
.pf-card:nth-child(4) { transition-delay: 0.24s; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .portfolio-grid { grid-template-columns: 1fr; gap: 24px; }
  .pf-card-body { padding: 24px; }
  .pf-category-stats { flex-direction: column; gap: 16px; }
  .pf-cta { padding: 36px 24px; }
}
