/* Portfolio shared styles — built on Finpath tokens
   Bold monochrome + accent #0052FF
   Light + dark modes
*/

/* ---- Theme overrides for portfolio context ---- */
:root {
  --pf-bg: #FFFFFF;
  --pf-surface: #F4F6F7;
  --pf-text: #0A0B0D;
  --pf-text-2: #5C6C7E;
  --pf-text-3: #A4B0BC;
  --pf-line: #E3E7EA;
  --pf-line-strong: #0A0B0D;
  --pf-accent: #0052FF;
  --pf-accent-soft: rgba(0,82,255,0.10);

  --pf-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
}

[data-theme="dark"] {
  --pf-bg: #0A0A0C;
  --pf-surface: #15161A;
  --pf-text: #F2F3F5;
  --pf-text-2: #A1A6AE;
  --pf-text-3: #5C636E;
  --pf-line: #242529;
  --pf-line-strong: #F2F3F5;
  --pf-accent: #4E87FF;
  --pf-accent-soft: rgba(78,135,255,0.14);
}

/* ---- Base ---- */
* { box-sizing: border-box; }
.pf-root {
  font-family: var(--font-body);
  background: var(--pf-bg);
  color: var(--pf-text);
  width: 100%;
  min-height: 100%;
  position: relative;
  overflow: hidden;
}
.pf-root * { box-sizing: border-box; }
.pf-root a { color: inherit; text-decoration: none; }
.pf-root img { display: block; max-width: 100%; }

/* ---- Utility ---- */
.pf-mono { font-family: var(--pf-mono); font-feature-settings: 'tnum' 1, 'ss01' 1; }
.pf-uppercase { text-transform: uppercase; letter-spacing: 0.08em; }

/* Top bar shared */
.pf-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  background: color-mix(in oklab, var(--pf-bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--pf-line);
}
.pf-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.pf-brand-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--pf-text);
  color: var(--pf-bg);
  display: grid;
  place-items: center;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.04em;
}
.pf-nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pf-text-2);
}
.pf-nav a:hover { color: var(--pf-text); }

.pf-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pf-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 9999px;
  border: 1px solid var(--pf-line);
  font-size: 12px;
  font-weight: 500;
  color: var(--pf-text-2);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
.pf-chip:hover { color: var(--pf-text); border-color: var(--pf-text); }
.pf-chip.active { color: var(--pf-text); border-color: var(--pf-text); }
.pf-chip-dot {
  width: 6px; height: 6px; border-radius: 9999px; background: var(--pf-text-3);
}
.pf-chip.active .pf-chip-dot { background: var(--pf-accent); }

.pf-status-dot {
  width: 8px; height: 8px; border-radius: 9999px;
  background: #07B269;
  position: relative;
}
.pf-status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 9999px;
  background: #07B269;
  opacity: 0.35;
  animation: pf-pulse 1.8s ease-out infinite;
}
@keyframes pf-pulse {
  0% { transform: scale(0.7); opacity: 0.45; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Common icon button */
.pf-iconbtn {
  width: 36px; height: 36px;
  border-radius: 9999px;
  border: 1px solid var(--pf-line);
  background: transparent;
  color: var(--pf-text);
  display: grid; place-items: center;
  cursor: pointer;
  transition: all 200ms ease;
}
.pf-iconbtn:hover { border-color: var(--pf-text); }
.pf-iconbtn i { font-size: 16px; }

/* Accent underline link */
.pf-link {
  display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  font-weight: 500;
}

/* CTA button */
.pf-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  background: var(--pf-text);
  color: var(--pf-bg);
  border: 0;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}
.pf-cta:hover { background: var(--pf-accent); }
.pf-cta.outline {
  background: transparent;
  color: var(--pf-text);
  border: 1px solid var(--pf-text);
}
.pf-cta.outline:hover {
  background: var(--pf-text); color: var(--pf-bg);
}

/* Avatar inline */
.pf-avatar {
  width: 44px; height: 44px;
  border-radius: 9999px;
  background: var(--pf-surface);
  border: 1px solid var(--pf-line);
  overflow: hidden;
  display: grid; place-items: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}

/* SectionLabel — UPPERCASE mono kicker */
.pf-kicker {
  font-family: var(--pf-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--pf-text-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pf-kicker::before {
  content: '';
  width: 24px; height: 1px; background: currentColor;
}

/* Stretch sections */
.pf-section {
  padding: 96px 48px;
  border-top: 1px solid var(--pf-line);
}
.pf-section--tight { padding: 64px 48px; }
.pf-section--nopad { padding: 0 48px; }

/* Footer */
.pf-footer {
  padding: 64px 48px 32px;
  background: var(--pf-text);
  color: var(--pf-bg);
}
.pf-footer .pf-text-2 { color: rgba(255,255,255,0.6); }

/* Hover preview frame (shared) */
.pf-preview {
  position: fixed;
  pointer-events: none;
  z-index: 100;
  width: 340px;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.96);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.25,0.1,0.25,1);
  background: var(--pf-surface);
  border: 1px solid var(--pf-line);
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}
.pf-preview.visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Project mock card (placeholder visual) */
.pf-mock {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

/* Rich preview (with metadata under image) */
.pf-preview--rich {
  width: 360px;
  aspect-ratio: auto;
  height: auto;
}
.pf-preview--rich > div:first-child {
  width: 100%;
}

/* Filter chips */
.pf-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 16px;
  border-radius: 9999px;
  border: 1px solid var(--pf-line);
  background: transparent;
  color: var(--pf-text-2);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 180ms cubic-bezier(0.25,0.1,0.25,1);
  line-height: 1;
}
.pf-filter-chip:hover {
  color: var(--pf-text);
  border-color: var(--pf-text);
}
.pf-filter-chip[data-active="true"] {
  background: var(--pf-text);
  color: var(--pf-bg);
  border-color: var(--pf-text);
}
.pf-filter-count {
  font-family: var(--pf-mono);
  font-size: 11px;
  opacity: 0.6;
}
.pf-filter-chip[data-active="true"] .pf-filter-count {
  opacity: 0.7;
}

/* Smooth fade-in when filter changes */
.pf-work-list > li {
  animation: pf-fadein 320ms cubic-bezier(0.25,0.1,0.25,1) both;
}
@keyframes pf-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.pf-mock-meta {
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--pf-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.4);
  padding: 4px 8px;
  border-radius: 4px;
  backdrop-filter: blur(6px);
}
.pf-mock-glyph {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 64px;
  letter-spacing: -0.04em;
  color: rgba(255,255,255,0.95);
  mix-blend-mode: difference;
}

/* Responsive: collapse topbar chrome on narrower viewports */
@media (max-width: 1180px) {
  .pf-topbar .pf-chip { display: none; }
  .pf-topbar-brand span:last-of-type[style*="color"] { display: none; }
}
@media (max-width: 980px) {
  .pf-topbar { padding-left: 24px !important; padding-right: 24px !important; }
  .pf-nav { gap: 18px !important; }
}
@media (max-width: 820px) {
  .pf-nav { display: none !important; }
}
