/* ============================================================
   BRIAN A. BRETZ — PORTFOLIO PAGE STYLES
   Layout, sections, and interactive states on top of mercury.css
   ============================================================ */

/* ─── Shared layout ─────────────────────────────────────── */
.container { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }

.section { padding: clamp(64px, 9vw, 108px) 0; }
.section--divider { border-top: 1px solid var(--mer-border-faint); }
.section--sunken { background: var(--mer-bg-sunken); }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 52px); }
.section-head--wide { max-width: 760px; margin-bottom: clamp(40px, 5vw, 56px); }
.eyebrow { color: var(--mer-fg-muted); margin: 0 0 14px; }
.section-title {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.022em;
  font-weight: 500;
  margin: 0;
}
.section-title em, .mer-serif { font-family: var(--mer-font-serif); font-style: italic; font-weight: 400; }
.section-intro {
  font-size: 17px;
  color: var(--mer-fg-muted);
  line-height: 1.5;
  margin: 18px 0 0;
  max-width: 58ch;
}

/* keyframes reused across the page */
@keyframes merPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.74); } }
@keyframes merDraw { to { stroke-dashoffset: 0; } }
@keyframes merScan { 0% { opacity: 0; transform: translateX(-110%); } 10% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; transform: translateX(360%); } }
@keyframes merPanelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes merTileIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes merRide { from { offset-distance: 0%; } to { offset-distance: 100%; } }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--mer-bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--mer-border-faint);
}
.site-nav {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--mer-fg); }
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--mer-border-strong);
  flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-size: 16px; font-weight: 600; letter-spacing: -0.012em; }

.nav-links { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; position: relative; }
.nav-indicator {
  position: absolute;
  bottom: -6px; left: 0;
  width: 0; height: 2px;
  border-radius: 1px;
  background: var(--mer-accent-500);
  opacity: 0;
  transition: left .3s var(--mer-ease), width .3s var(--mer-ease), opacity .2s var(--mer-ease);
  pointer-events: none;
}
.nav-link {
  font-size: 13px;
  color: var(--mer-fg-muted);
  padding: 7px 11px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: color 120ms, background 120ms;
}
.nav-link:hover { color: var(--mer-fg); background: var(--mer-bg-sunken); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) 0 clamp(56px, 8vw, 96px);
}
.hero-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(36px, 6vw, 72px);
}
.hero-text { flex: 1.05 1 360px; min-width: 300px; order: 1; }
.hero-photo { flex: 0.95 1 340px; min-width: 300px; max-width: 460px; order: 2; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 13px 4px 10px;
  border-radius: 999px;
  background: var(--mer-surface);
  border: 1px solid var(--mer-border);
  font-family: var(--mer-font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--mer-fg-muted);
  margin-bottom: 24px;
  box-shadow: var(--mer-shadow-1);
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: oklch(0.62 0.13 155);
  animation: merPulse 2.4s var(--mer-ease) infinite;
}
.hero-title {
  font-size: clamp(42px, 6.6vw, 74px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-weight: 500;
  margin: 0 0 20px;
}
.hero-suffix { font-weight: 400; color: var(--mer-fg-subtle); letter-spacing: -0.01em; }
.hero-lead {
  font-size: clamp(18px, 2.4vw, 25px);
  line-height: 1.22;
  letter-spacing: -0.014em;
  font-weight: 500;
  margin: 0 0 22px;
  color: var(--mer-fg);
}
.serif-accent { letter-spacing: -0.01em; }
.hero-desc {
  font-size: 17px;
  line-height: 1.55;
  color: var(--mer-fg-muted);
  max-width: 48ch;
  margin: 0 0 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-meta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 22px;
  font-family: var(--mer-font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mer-fg-subtle);
}

/* ─── Icon buttons (hero light + contact dark) ──────────── */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: var(--mer-r-md);
  background: var(--mer-surface);
  color: var(--mer-fg);
  border: 1px solid var(--mer-border-strong);
  box-shadow: var(--mer-shadow-1);
  text-decoration: none;
  transition: background 120ms var(--mer-ease), border-color 120ms var(--mer-ease), color 120ms var(--mer-ease);
}
.icon-btn:hover {
  background: color-mix(in srgb, var(--mer-accent-500) 12%, var(--mer-surface));
  border-color: var(--mer-accent-500);
  color: var(--mer-accent-500);
}
.icon-btn--dark {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: none;
}
.icon-btn--dark:hover {
  background: color-mix(in srgb, var(--mer-accent-500) 20%, transparent);
  border-color: var(--mer-accent-400);
  color: var(--mer-accent-300);
}

/* ─── Hero instrument card ──────────────────────────────── */
.instrument-card {
  margin: 0;
  background: var(--mer-surface);
  border: 1px solid var(--mer-border);
  border-radius: 16px;
  box-shadow: var(--mer-shadow-3);
  overflow: hidden;
}
.ic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  border-bottom: 1px solid var(--mer-border-faint);
}
.ic-name { color: var(--mer-fg-muted); }
.ic-loc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mer-fg-subtle);
}
.ic-loc svg { flex-shrink: 0; }
.ic-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--mer-ink-05);
}
.ic-photo img { width: 100%; height: 100%; object-fit: cover; }
.ic-available {
  position: absolute;
  left: 13px; bottom: 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(10,11,13,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: var(--mer-font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #fff;
}
.ic-available-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: oklch(0.72 0.16 155);
  animation: merPulse 2.4s var(--mer-ease) infinite;
}
.ic-telemetry {
  padding: 15px;
  display: grid;
  gap: 13px;
  border-top: 1px solid var(--mer-border-faint);
}
.ic-telemetry-head { display: flex; align-items: center; justify-content: space-between; }
.ic-trajectory { color: var(--mer-fg-subtle); }
.ic-delta { font-size: 11px; color: oklch(0.46 0.13 155); }
.sparkline { width: 100%; height: 46px; display: block; }
.spark-line {
  stroke-dasharray: 250;
  stroke-dashoffset: 250;
  animation: merDraw 1.6s var(--mer-ease-out) .35s forwards;
}
.spark-dot {
  transform-box: fill-box;
  transform-origin: center;
  offset-path: path('M0 46 L40 41 L80 34 L120 36 L160 25 L200 21 L240 10');
  offset-rotate: 0deg;
  animation: merRide 1.6s var(--mer-ease-out) .35s both, merPulse 2.4s var(--mer-ease) 2.15s infinite;
}
.ic-tags { display: flex; gap: 7px; flex-wrap: wrap; }

/* ============================================================
   IMPACT — metric grid
   ============================================================ */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--mer-border);
  border: 1px solid var(--mer-border);
  border-radius: 12px;
  overflow: hidden;
}
.mtile {
  background: var(--mer-bg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 154px;
  transition: background .18s var(--mer-ease);
}
.mtile:hover { background: var(--mer-bg-sunken); }
.mnum { color: var(--mer-fg-faint); transition: color .18s var(--mer-ease); }
.mtile:hover .mnum { color: var(--mer-accent-500); }
.mval {
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 500;
  letter-spacing: -0.025em;
  font-feature-settings: 'tnum';
  line-height: 1;
  margin-top: auto;
  color: var(--mer-fg);
}
.mlabel { font-size: 13px; color: var(--mer-fg-muted); line-height: 1.45; }

/* ============================================================
   PORTFOLIO
   ============================================================ */
.pf-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.pf-list {
  flex: 1 1 280px;
  min-width: 260px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  background: var(--mer-surface);
  border: 1px solid var(--mer-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--mer-shadow-1);
}
.pf-row {
  text-align: left;
  border: none;
  border-bottom: 1px solid var(--mer-border-faint);
  background: transparent;
  padding: 17px 19px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 13px;
  font-family: inherit;
  transition: background 120ms var(--mer-ease);
}
.pf-row:last-child { border-bottom: none; }
.pf-row:hover { background: var(--mer-bg-sunken); }
.pf-row.is-selected { background: var(--mer-bg-sunken); box-shadow: inset 3px 0 0 var(--mer-accent-500); }
.pf-row-num { font-family: var(--mer-font-mono); font-size: 11px; color: var(--mer-fg-faint); min-width: 18px; }
.pf-row-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pf-row-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--mer-fg); }
.pf-row-org { font-family: var(--mer-font-mono); font-size: 11px; color: var(--mer-fg-muted); }
.pf-row-arrow { margin-left: auto; color: var(--mer-fg-faint); font-size: 14px; }

.pf-detail-panel {
  flex: 1.6 1 380px;
  min-width: 300px;
  background: var(--mer-ink-100);
  color: var(--mer-ink-00);
  border-radius: 16px;
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--mer-shadow-3);
  position: relative;
  overflow: hidden;
}
.pf-glow-static {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 88% -12%, oklch(0.60 0.15 240 / 0.34), transparent 56%);
  pointer-events: none;
}
.pf-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .35s var(--mer-ease);
  pointer-events: none;
  mix-blend-mode: screen;
}
.pf-scan {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 42%;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, oklch(0.62 0.16 240 / 0.16) 42%, oklch(0.80 0.17 240 / 0.55) 50%, oklch(0.62 0.16 240 / 0.16) 58%, transparent);
  mix-blend-mode: screen;
}
.pf-detail { position: relative; }
.pf-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.pf-tag { color: var(--mer-accent-300); }
.pf-year { font-size: 11px; color: rgba(255,255,255,0.5); }
.pf-name {
  font-size: clamp(22px, 2.6vw, 31px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 7px;
}
.pf-org { font-size: 12px; color: rgba(255,255,255,0.55); margin: 0 0 18px; }
.pf-desc { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,0.82); margin: 0 0 26px; max-width: 54ch; }
.pf-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 1px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9px;
  overflow: hidden;
}
.pf-fact { background: #0A0B0D; padding: 14px 16px; display: flex; flex-direction: column; gap: 5px; }
.pf-fact-k { color: rgba(255,255,255,0.4); }
.pf-fact-v { font-size: 13px; font-weight: 500; color: #fff; line-height: 1.3; }

/* ============================================================
   EXPERIENCE — timeline extras
   ============================================================ */
.timeline { max-width: 840px; }
/* accent fill that draws over the base rail on scroll */
.tl-fill {
  position: absolute;
  top: 20px; bottom: -22px;
  left: 50%;
  width: 1.5px;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top;
  background: var(--mer-accent-500);
  pointer-events: none;
}
.tl-current { margin-left: 2px; }
.tl-org { margin-bottom: 2px; }
.tl-bullets { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.tl-bullets li { display: flex; gap: 10px; font-size: 13.5px; color: var(--mer-fg-muted); line-height: 1.5; }
.tl-dash { color: var(--mer-fg-faint); flex-shrink: 0; }

/* ============================================================
   STRENGTHS
   ============================================================ */
.strength-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(214px, 1fr));
  gap: 14px;
}
.strength-title { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.strength-desc { margin: 11px 0 0; font-size: 14px; color: var(--mer-fg-muted); line-height: 1.55; }
.skills-eyebrow { color: var(--mer-fg-subtle); margin: clamp(34px, 4vw, 44px) 0 16px; }
.skills-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

/* ============================================================
   CREDENTIALS
   ============================================================ */
.cred-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 14px;
}
.cred-kind { color: var(--mer-fg-subtle); }
.cred-title { margin: 12px 0 6px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.cred-desc { margin: 0; font-size: 14px; color: var(--mer-fg-muted); line-height: 1.5; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  background: var(--mer-ink-100);
  color: var(--mer-ink-00);
  padding: clamp(72px, 10vw, 120px) 0;
  position: relative;
  overflow: hidden;
}
.contact-glow-static {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 82% 0%, oklch(0.60 0.15 240 / 0.30), transparent 50%);
  pointer-events: none;
}
.contact-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .35s var(--mer-ease);
  pointer-events: none;
  mix-blend-mode: screen;
}
.contact-grid {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 44px;
  align-items: center;
  justify-content: space-between;
}
.contact-text { flex: 1 1 460px; min-width: 300px; max-width: 640px; }
.contact-eyebrow { color: var(--mer-accent-300); margin: 0 0 16px; }
.contact-title {
  font-size: clamp(30px, 4.6vw, 50px);
  line-height: 1.06;
  letter-spacing: -0.024em;
  font-weight: 500;
  margin: 0;
  color: #fff;
}
.contact-desc { font-size: 16px; color: rgba(255,255,255,0.72); line-height: 1.55; margin: 22px 0 0; max-width: 60ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.contact-portrait { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.contact-portrait-ring {
  width: 118px; height: 118px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.16), 0 0 0 9px rgba(255,255,255,0.04);
}
.contact-portrait-ring img { width: 100%; height: 100%; object-fit: cover; }
.contact-portrait-loc { font-size: 11px; letter-spacing: 0.06em; color: rgba(255,255,255,0.55); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--mer-ink-100);
  color: var(--mer-ink-00);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 26px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mer-font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.5);
}

/* ============================================================
   MOTION — scroll reveals + reduced-motion / print safety
   ============================================================ */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .55s var(--mer-ease), transform .55s var(--mer-ease);
  will-change: opacity, transform;
}
.js [data-reveal].is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}

@media print {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .tl-fill { transform: translateX(-50%) scaleY(1) !important; }
  .mer-badge { opacity: 1 !important; transform: none !important; }
}
