/* ── Material Symbols ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20,400,0,0');

/* ── Floating Navigation Dock ─────────────────────────── */

/* Hide all existing top navs */
header,
.ta-nav,
.tb-nav,
.tc-nav { display: none !important; }

/* ── Dock wrapper ─────────────────────────────────────── */
.fn-dock {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Entry animation */
.fn-dock.fn-entry {
  transform: translateX(-50%) translateY(calc(100% + 40px));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity   0.35s ease;
}

/* ── Pill ─────────────────────────────────────────────── */
.fn-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border-radius: 100px;
  background: #0b1040;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    0 2px 8px  rgba(0, 0, 0, 0.20);
}

/* ── Nav items ────────────────────────────────────────── */
.fn-item {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.025em;
  color: rgba(255, 255, 255, 0.55);
  height: 38px;
  padding: 0 13px;
  border-radius: 100px;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease;
  display: inline-flex;
  align-items: center;
}

.fn-item:hover,
.fn-item.fn-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
}


/* ── Material icons ───────────────────────────────────── */
.fn-icon {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  display: block;
  flex-shrink: 0;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 20;
}

.fn-item.fn-active .fn-icon,
.fn-item:hover .fn-icon {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

/* ── Label — always visible ───────────────────────────── */
.fn-label {
  display: block;
  padding-left: 6px;
  white-space: nowrap;
}

/* ── More button (hidden on desktop) ──────────────────── */
.fn-more-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

/* ── Mobile — full-width pill with distributed items ──── */
@media (max-width: 700px) {
  .fn-dock {
    bottom: 12px;
    left: 0;
    right: 0;
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
    transform: none;
    background: none;
    border: none;
    box-shadow: none;
  }

  .fn-dock.fn-entry {
    transform: translateY(calc(100% + 40px));
    opacity: 0;
  }

  .fn-pill {
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    padding: 5px;
    gap: 0;
    width: 100%;
    padding-bottom: calc(5px + env(safe-area-inset-bottom, 0px));
  }

  .fn-item {
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    border-radius: 100px;
    font-size: 9px;
    letter-spacing: 0;
    gap: 3px;
    height: auto;
  }

  .fn-item:hover,
  .fn-item.fn-active {
    padding: 8px 4px;
  }

  .fn-label {
    max-width: none !important;
    opacity: 1 !important;
    padding-left: 0 !important;
    transition: none !important;
  }

  .fn-more-btn {
    display: inline-flex;
    flex: 1;
    color: rgba(255, 255, 255, 0.55);
    height: auto;
  }

  .fn-more-btn[aria-expanded="true"],
  .fn-more-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
  }
}

/* ── Contact icon dock (bottom-right) ────────────────── */
.fn-contact-dock {
  position: fixed;
  bottom: 16px;
  right: 24px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border-radius: 100px;
  background: #0b1040;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    0 2px 8px  rgba(0, 0, 0, 0.20);
  transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fn-contact-btn {
  width: 38px;
  height: 38px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.18s ease, background 0.18s ease;
}

.fn-contact-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
}

@media (max-width: 700px) {
  .fn-contact-dock { display: none; }
}

/* ── More panel (mobile bottom sheet) ────────────────── */
.fn-more-panel {
  display: none; /* hidden on desktop */
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 82px; /* above nav */
  z-index: 501;
  background: #0b1040;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 20px 16px 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fn-more-panel.fn-mp--open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 700px) {
  .fn-more-panel { display: block; }
}

/* Contact buttons grid */
.fn-more-contacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
}

.fn-more-contact-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.fn-more-contact-btn:hover,
.fn-more-contact-btn:active {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

.fn-more-contact-btn .fn-icon {
  font-size: 18px;
  flex-shrink: 0;
}

/* More panel swatches (reuse existing swatch base styles) */
.fn-mp-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.fn-mp-swatch:hover { transform: scale(1.15); }
.fn-mp-swatch.fn-sp-swatch--active { border-color: #fff; }

/* ── Back to top ──────────────────────────────────────── */
.fn-top {
  position: fixed;
  bottom: 98px; /* 82px canvas frame + 16px inner padding */
  right: 32px;  /* 16px canvas frame + 16px inner padding */
  z-index: 500;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.10);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.70);
  background: #0b1040;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.28),
    0 1px 4px  rgba(0, 0, 0, 0.16);

  opacity: 0;
  transform: scale(0.7) translateY(8px);
  pointer-events: none;
  transition: opacity   0.25s ease,
              transform 0.3s  cubic-bezier(0.34, 1.56, 0.64, 1),
              bottom    0.3s  cubic-bezier(0.4, 0, 0.2, 1),
              background 0.18s ease;
}

.fn-top:hover {
  color: #ffffff;
  background: #1a2260;
}

.fn-top.fn-top--visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

@media (max-width: 700px) {
  .fn-top {
    bottom: 90px; /* above floating nav on mobile */
    right: 16px;
    width: 38px;
    height: 38px;
  }
}

/* ── Settings dock (bottom-left) ─────────────────────── */
.fn-settings-dock {
  position: fixed;
  bottom: 16px;
  left: 24px;
  z-index: 500;
  display: flex;
  align-items: center;
  padding: 5px;
  border-radius: 100px;
  background: #0b1040;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.20);
  transition: bottom 0.3s cubic-bezier(0.4,0,0.2,1);
}
.fn-settings-btn {
  width: 38px;
  height: 38px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.55);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}
.fn-settings-btn:hover,
.fn-settings-btn.fn-settings-btn--open {
  color: #fff;
  background: rgba(255,255,255,0.10);
}
@media (max-width: 700px) { .fn-settings-dock { display: none; } }

/* ── Settings panel ──────────────────────────────────── */
.fn-settings-panel {
  position: fixed;
  bottom: 72px;
  left: 24px;
  z-index: 501;
  width: 232px;
  background: #0b1040;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3);
  opacity: 0;
  transform: scale(0.94) translateY(6px);
  transform-origin: bottom left;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.fn-settings-panel.fn-sp--open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}
.fn-sp-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
}
.fn-sp-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 10px 0;
}
.fn-sp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}
.fn-sp-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  gap: 8px;
}
.fn-sp-icon {
  font-size: 16px;
  opacity: 0.6;
  flex-shrink: 0;
  line-height: 1;
}

/* Toggle switch */
.fn-sp-toggle {
  width: 38px;
  height: 22px;
  border-radius: 100px;
  background: rgba(255,255,255,0.12);
  border: none;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.fn-sp-toggle[aria-checked="true"] { background: #0057D9; }
.fn-sp-thumb {
  position: absolute;
  left: 3px; top: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
}
.fn-sp-toggle[aria-checked="true"] .fn-sp-thumb { transform: translateX(16px); }

/* Language pills */
.fn-sp-langs {
  display: flex;
  gap: 4px;
}
.fn-sp-lang {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 11px;
  border-radius: 100px;
  border: 1.5px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.40);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.fn-sp-lang:hover { color: rgba(255,255,255,0.75); border-color: rgba(255,255,255,0.30); }
.fn-sp-lang.fn-sp-lang--active {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.40);
  color: #fff;
}

/* Accent swatches */
.fn-sp-swatches {
  display: flex;
  gap: 6px;
}
.fn-sp-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.fn-sp-swatch:hover { transform: scale(1.15); }
.fn-sp-swatch.fn-sp-swatch--active { border-color: #fff; }

/* ── Tooltips ────────────────────────────────────────── */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(11, 16, 64, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.90);
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Dark mode overrides ─────────────────────────────── */
html.fn-dark body { background: var(--bg-page); color: var(--text); }

/* Canvas: scrollable inner pages */
html.fn-dark #canvas.canvas--scrollable { background: var(--bg-page) !important; }
/* Canvas: scrollbar thumb in dark mode */
html.fn-dark #canvas.canvas--scrollable.sb-active::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }

/* page-hero uses --navy (dark navy) which is fine to keep in dark mode */
html.fn-dark .page-hero h1 { color: #ffffff; }

/* Sections with bg-surface */
html.fn-dark .ab-stats { background: var(--bg-surface) !important; }

/* Logo items */
html.fn-dark .cl-logo-item { box-shadow: none !important; }
html.fn-dark .cl-logo-item img { mix-blend-mode: normal; filter: brightness(0.85); }
html.fn-dark .hc-client-logo img { mix-blend-mode: normal; filter: brightness(0.8) invert(0); }

html.fn-dark .education-block { background: var(--bg-card) !important; }

/* Ensure cs-stat dark background stays dark */
html.fn-dark .cs-stat { background: #0b0f2e !important; }

/* Green availability text: #16a34a fails AA on dark bg → use lighter green */
html.fn-dark .contact-availability { color: #4ade80 !important; }

/* Filter pills on work page */
html.fn-dark .filter-pill {
  border-color: rgba(255,255,255,0.15);
  color: var(--text-muted);
}
html.fn-dark .filter-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Project cards on work page */
html.fn-dark .project-card {
  background: var(--bg-card);
}
html.fn-dark .project-card:hover {
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.12);
}
html.fn-dark .project-card h3 { color: var(--text-heading); }

/* ── Reduced motion ──────────────────────────────────── */
html.fn-reduce-motion *,
html.fn-reduce-motion *::before,
html.fn-reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* ── Accent colours ──────────────────────────────────── */
html[data-accent="teal"]   { --accent: #0891b2; --accent-dark: #0e7490; }
html[data-accent="green"]  { --accent: #16a34a; --accent-dark: #15803d; }
html[data-accent="purple"] { --accent: #7c3aed; --accent-dark: #6d28d9; }

html[data-accent="teal"]   .section-label,
html[data-accent="teal"]   .timeline-date,
html[data-accent="teal"]   .stat-number,
html[data-accent="teal"]   .approach-num  { color: #0891b2 !important; }
html[data-accent="teal"]   .timeline-dot,
html[data-accent="teal"]   .fn-item.fn-active { border-color: #0891b2 !important; }
html[data-accent="teal"]   .timeline-dot.current { background: #0891b2 !important; border-color: #0891b2 !important; }
html[data-accent="teal"]   .fn-sp-toggle[aria-checked="true"] { background: #0891b2 !important; }

html[data-accent="green"]  .section-label,
html[data-accent="green"]  .timeline-date,
html[data-accent="green"]  .stat-number,
html[data-accent="green"]  .approach-num  { color: #16a34a !important; }
html[data-accent="green"]  .timeline-dot.current { background: #16a34a !important; border-color: #16a34a !important; }
html[data-accent="green"]  .fn-sp-toggle[aria-checked="true"] { background: #16a34a !important; }

html[data-accent="purple"] .section-label,
html[data-accent="purple"] .timeline-date,
html[data-accent="purple"] .stat-number,
html[data-accent="purple"] .approach-num  { color: #7c3aed !important; }
html[data-accent="purple"] .timeline-dot.current { background: #7c3aed !important; border-color: #7c3aed !important; }
html[data-accent="purple"] .fn-sp-toggle[aria-checked="true"] { background: #7c3aed !important; }

/* ── Compact mode ────────────────────────────────────── */
html.fn-compact section { padding: 48px 0 !important; }
html.fn-compact .container { padding: 0 4vw !important; }
html.fn-compact .ab-hero { padding: 40px 0 36px !important; }
html.fn-compact .ab-stats-inner { padding-top: 20px !important; }
html.fn-compact .stats-row { gap: 10px !important; }
html.fn-compact .approach-grid,
html.fn-compact .tools-groups { gap: 12px !important; }
html.fn-compact .timeline-item { margin-bottom: 24px !important; }
