/* Portfolio page styles — modern refresh layered on Beautiful-Jekyll */

:root {
  --pf-accent: #008AFF;
  --pf-accent-dark: #0085A1;
  --pf-link-text: #0067c9;   /* AA-compliant (>=4.5:1 on white) for link/badge text */
  --pf-bg: #ffffff;
  --pf-card: #ffffff;
  --pf-border: #e7ebf0;
  --pf-text: #2d2f33;
  --pf-muted: #616977;       /* ~5:1 on white for meta text */
  --pf-radius: 14px;
  --pf-shadow: 0 4px 18px rgba(20, 30, 60, 0.07);
  --pf-shadow-hover: 0 10px 30px rgba(20, 30, 60, 0.14);
}

/* Accessibility: visible keyboard focus for all interactive elements */
.pf-subnav a:focus-visible,
.pf-link:focus-visible,
.pf-cert-links a:focus-visible,
.pf-video-thumb:focus-visible,
.pf-video-card a:focus-visible,
.pf-project-body h3 a:focus-visible {
  outline: 3px solid var(--pf-link-text);
  outline-offset: 2px;
  border-radius: 4px;
}

#main-content .pf-section,
.pf-section {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0 auto 3.5rem;
  scroll-margin-top: 90px;
}

.pf-heading {
  font-weight: 700;
  font-size: 1.8rem;
  margin-bottom: 1.4rem;
  position: relative;
  padding-bottom: 0.5rem;
}
.pf-heading::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 56px; height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--pf-accent), var(--pf-accent-dark));
}

/* Sticky section sub-nav */
.pf-subnav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.7rem 0;
  margin-bottom: 2rem;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--pf-border);
}
.pf-subnav a {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--pf-muted);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  text-decoration: none;
  transition: all .15s ease;
}
.pf-subnav a:hover,
.pf-subnav a.active {
  color: #fff;
  background: var(--pf-accent);
}

/* Smooth anchor scrolling fallback */
html { scroll-behavior: smooth; }

/* Scroll-reveal animation */
.pf-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
}
.pf-reveal.pf-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .pf-reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Generic card grid */
.pf-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}

/* Skills */
.pf-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.2rem;
}
.pf-skill-card {
  background: var(--pf-card);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius);
  padding: 1.3rem;
  box-shadow: var(--pf-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.pf-skill-card:hover { transform: translateY(-3px); box-shadow: var(--pf-shadow-hover); }
.pf-skill-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.9rem;
}
.pf-skill-card h3 i { color: var(--pf-accent); margin-right: 0.5rem; }

.pf-badges { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.pf-badge {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--pf-link-text);
  background: rgba(0, 138, 255, 0.10);
  border: 1px solid rgba(0, 138, 255, 0.22);
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
}

/* Cert / project / talk cards */
.pf-cert-card, .pf-project-card, .pf-talk-card {
  background: var(--pf-card);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius);
  overflow: hidden;
  box-shadow: var(--pf-shadow);
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.pf-cert-card:hover, .pf-project-card:hover, .pf-talk-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--pf-shadow-hover);
}
.pf-featured { border-color: var(--pf-accent); box-shadow: 0 6px 22px rgba(0,138,255,0.15); }

.pf-cert-img { width: 90px; height: 90px; object-fit: contain; margin: 1.2rem auto 0; }
.pf-project-img, .pf-talk-img { width: 100%; height: 160px; object-fit: cover; }

.pf-cert-body, .pf-project-body, .pf-talk-body { padding: 1.1rem 1.3rem 1.3rem; text-align: left; }
.pf-cert-card { text-align: center; }
.pf-cert-card .pf-cert-body { text-align: center; }
.pf-cert-body h3, .pf-project-body h3, .pf-talk-body h3 {
  font-size: 1.22rem; font-weight: 600; margin: 0 0 0.4rem;
}
.pf-cert-meta { color: var(--pf-muted); font-size: 0.95rem; margin-bottom: 0.7rem; }
.pf-project-body p { font-size: 1.02rem; color: var(--pf-text); margin-bottom: 0.8rem; line-height: 1.5; }

.pf-cert-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.pf-cert-links a, .pf-link {
  font-size: 0.95rem; font-weight: 600;
  color: var(--pf-link-text); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.pf-cert-links a:hover, .pf-link:hover { color: var(--pf-accent-dark); text-decoration: underline; }
.pf-link { margin-top: 0.6rem; }

/* Videos */
.pf-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
}
.pf-video-card {
  display: flex; flex-direction: column;
  border-radius: var(--pf-radius); overflow: hidden;
  background: var(--pf-card); border: 1px solid var(--pf-border);
  box-shadow: var(--pf-shadow); text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}
.pf-video-card:hover { transform: translateY(-3px); box-shadow: var(--pf-shadow-hover); }
.pf-video-thumb { position: relative; display: block; width: 100%; padding: 0; border: none; background: none; cursor: pointer; }
.pf-video-thumb img { width: 100%; height: 160px; object-fit: cover; display: block; }

/* Inline player (replaces thumbnail on click) */
.pf-video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.pf-video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pf-video-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-size: 3rem; color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  opacity: 0.9; transition: transform .15s ease;
}
.pf-video-card:hover .pf-video-play { transform: translate(-50%,-50%) scale(1.12); }
.pf-video-info { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.pf-video-title { font-weight: 600; font-size: 1.02rem; }

@media (max-width: 600px) {
  .pf-heading { font-size: 1.5rem; }
  .pf-subnav { top: 0; }
}
