/* Header height driven by Fluent design unit (4px by default) */
fluent-design-system-provider {
  --header-h: calc(var(--design-unit, 4) * 16 * 1px);
  /* 64px desktop/tablet */
}

@media (max-width: 640px) {
  fluent-design-system-provider {
    --header-h: calc(var(--design-unit, 4) * 16 * 1px);
    /* 56px mobile */
  }
  
}

p {
  font-size: 18px !important;
}

span {
  font-size: 16px !important;
}

/* Apply it */
.header-inner {
  height: var(--header-h);
}

.drawer .drawer-header {
  height: var(--header-h) !important;
}

/* Keep the logo and icon sizing proportional */
.logo-mark {
  width: clamp(24px, calc(var(--header-h) * 0.45), 32px);
}

/* Ensure tap targets meet 44px minimum */
.icon-btn {
  min-height: 44px;
  min-width: 44px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  background: var(--brand-primary);
  color: var(--brand-on);
  padding: 8px 12px;
  border-radius: var(--radius-s);
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 9999
}


.nav-list a:hover {
  color: #5d5bd4;
  transition: 0.8s;
}

.nav-list a:hover,
.drawer-links a:hover,
.nav-list .link-like:hover,
.drawer-links .link-like:hover {
  color: var(--brand-primary) !important;
  cursor: pointer;
}


.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;

}

.logo {
  font-weight: 700;
  color: var(--fg-primary);
  text-decoration: none;
  font-size: 20px;
}

.primary-nav {
  margin-left: auto;
  display: flex;
  align-items: center
}

.nav-list {
  /* display: none;
  list-style: none;
  align-items: center; */
  display: none;
list-style: none;
align-items: stretch;   /* stretch items to header height */
  gap: 40px;
  margin: 0;
  padding: 0;
}


.nav-list a,
.link-like {
  color: var(--fg-primary);
  font-weight: 500;
  border: 0;
  background: none;
  padding: 8px 0;
  cursor: pointer
}

.nav-list a[aria-current="page"] {
  color: var(--brand-primary) !important
}

.icon-btn {
  border: none;
  background: var(--surface);

  cursor: pointer
}

.icon-btn:hover {
  background: none;
}

/* Remove blue flash on click (pressed/active highlight) */
.icon-btn {
  background: transparent;
  /* default */
  -webkit-tap-highlight-color: transparent;
  /* mobile tap flash */
  appearance: none;
  /* normalize */
}

/* keep hover clean */
.icon-btn:hover {
  background: transparent;
}

/* kill the pressed fill */
.icon-btn:active {
  background: transparent;
}

/* accessible focus (keyboard only) */
.icon-btn:focus {
  outline: none;
}

/* remove UA focus */
.icon-btn:focus-visible {
  outline: none;
}

/* (Firefox) remove inner focus ring/padding */
.icon-btn::-moz-focus-inner {
  border: 0;
}

/* Drawer */
.drawer {
  border: 0;
  padding: 0;
  width: 100%;
  max-width: none
}


.drawer .drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: none
}


/* Use grid layout only while open (full-screen mobile sheet) */
.drawer[open] {
  display: grid;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  grid-template-rows: auto 1fr;
}


/* Prevent page scroll while drawer is open */
.no-scroll {
  overflow: hidden;
}

/* Center the drawer links (your target style) */
.drawer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
  display: grid;
  place-items: center;
  gap: 28px;
  justify-content: center !important;
}

.drawer-links a,
.drawer-links .link-like {
  font-size: clamp(22px, 5vw, 40px);
  font-weight: 600;
  color: var(--fg-primary);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}

/* On desktop, never show the mobile drawer even if it was open */
@media (min-width: 1025px) {
  .drawer {
    display: none !important;
  }

  .status-dot{
    margin-right: 16px;
  }


}


.drawer .drawer-links {
  list-style: none;
  margin: 0;
  padding: 0px 20px 0px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: var(--fa-bg);
}

.drawer a,
.drawer button {
  display: inline-flex;
  font-weight: 700;
  color: var(--fg-primary);
  background: none;
  border: none;
  text-align: center
}

/* Main */
main {
  padding-block: 0px 48px;
  min-height: 60vh;
}

/* pin style */
.gate {
  display: grid;
  gap: 12px;
  max-width: 360px
}

.gate input {
  padding: 10px;
  border: 1px solid #E1DFDD;
  border-radius: 8px
}


.section:first-child {
  border-top: none
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 100px;
  align-items: center;
}

.hero .title {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.4;
}

.hero p {
  font-size: 20px;
  color: #202124;

}

.senifone {
  color: #5d5bd4;
  font-weight: 600;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px
}

/* Cards grid */
.grid {
  display: grid;
  gap: 24px
}

.grid.cols-3 {
  grid-template-columns: repeat(3, 1fr)
}

.grid.cols-2 {
  grid-template-columns: repeat(2, 1fr)
}

@media (max-width:1024px) {
  .grid.cols-3 {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media (max-width:640px) {
  .hero .title {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.4;
  }

  .nav-list {
    display: none;
    align-items: center;
  }

  .hero {
    grid-template-columns: 1fr
  }

  .grid.cols-3,
  .grid.cols-2 {
    grid-template-columns: 1fr
  }
}

@media (min-width:1025px) {
  .nav-list {
    display: flex;
    align-items: center;
  }

  #menuBtn {
    display: none
  }

  .hero {
    grid-template-columns: 1.4fr .6fr
  }
}

/* === Case card (Fluent-ish) =================================== */
.case-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: var(--fa-radius-m);
  overflow: hidden;
}

.case-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--fa-surface-alt);
}

.case-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.case-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, .65);
  border: 1px solid rgba(255, 255, 255, .35);
  backdrop-filter: blur(4px);
}

.case-body {
  padding: 14px 16px 16px;
  display: grid;
  gap: 8px;
}

.case-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.case-summary {
  margin: 0;
  color: var(--fa-fg-muted);
  font-size: 14px;
}

.case-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.case-ctas .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.case-ctas .btn.primary {
  background: var(--fa-accent);
  color: var(--fa-accent-on);
  border: 1px solid var(--fa-accent);
}

.case-ctas .btn.primary:hover {
  background: var(--fa-accent-hover);
}

.case-ctas .btn.ghost {
  background: transparent;
  color: var(--fa-accent);
  border: 1px solid var(--fa-accent);
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.case-tags .pill {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--fa-stroke);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head .hlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  text-decoration: none;
  color: var(--fa-fg);
}

.section-head .hlink:hover {
  color: var(--fa-accent);
}

.section-head .hlink .chev {
  font-weight: 800;
  color: var(--fa-accent);
}

/* Small “segmented” switch (Work / Research) */
.segmented {
  display: inline-flex;
  gap: 8px;
}

.segmented button {
  border: 1px solid var(--fa-stroke);
  background: #fff;
  color: var(--fa-fg);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.segmented button[aria-pressed="true"] {
  background: var(--fa-accent);
  border-color: var(--fa-accent);
  color: var(--fa-accent-on);
}


/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-card)
}

.card .thumb {
  aspect-ratio: 16/9;
  background: var(--surface-alt);
  position: relative
}

.card .thumb .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: .2s
}

.card:hover .thumb .overlay {
  opacity: 1;
  background: linear-gradient(0deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .15))
}

.card .thumb .overlay a {
  color: #fff;
  font-weight: 600;
  text-decoration: none
}

.card .body {
  padding: 16px
}

.card .meta {
  color: var(--fg-secondary);
  font-size: 14px
}


/* ===== Work hero card (bg image, 730px tall) ===== */
.work-hero {
  position: relative;
  isolation: isolate;
  height: 730px;
  /* target height (desktop) */
  min-height: 540px;
  /* keeps presence if fonts/images differ */
  border: 1px solid var(--stroke);
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  color: #fff;
}

/* background image */
.work-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--img) center/cover no-repeat;
  z-index: -2;
}

/* legibility overlay */
.work-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .28) 40%, rgba(0, 0, 0, .55) 100%);
  z-index: -1;
}

/* layout: text at top-left, tags at bottom-left */
.work-hero .content {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 24px;
  max-width: 760px;
}

.work-hero .eyebrow {
  font-weight: 700;
  margin-bottom: 6px;
  opacity: .95
}

.work-hero .title {
  font-size: clamp(28px, 4.2vw, 48px);
  line-height: 1.12;
  margin: 0 0 8px 0;
  color: #fff;
}

.work-hero .sub {
  margin: 0 0 16px 0;
  opacity: .95;
  font-size: clamp(16px, 2.2vw, 20px);
}

/* CTA */
.work-hero .cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: var(--radius-m);
}

.work-hero .cta:hover {
  background: rgba(255, 255, 255, .12)
}

/* tags pinned to bottom */
.work-hero .tags {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-hero .tag {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  color: #fff;
}

/* whole card clickable, still keyboard-friendly */
.work-hero .cover-link {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.work-hero .content a,
.work-hero .content button,
.work-hero .tags * {
  position: relative;
  z-index: 1
}

/* Responsive tweaks */
@media (max-width: 800px) {
  .work-hero {
    height: 520px;
    min-height: 420px;
  }

  .work-hero .content {
    left: 16px;
    right: 16px;
    top: 16px;
  }

  .work-hero .tags {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}



/* Filter chips */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px
}



/* Work detail */
.detail h1 {
  font-size: 28px;
  line-height: 1.3
}

.kv {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-block: 12px 20px
}

.kv div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap
}

.section h2 {
  font-size: 22px
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--stroke);
  background: var(--bg-subtle);
  padding-block: 24px
}

.footer-grid {
  display: grid;
  gap: 16px
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px
}

.tagline,
.muted {
  color: var(--fg-secondary)
}

@media(min-width:769px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr
  }
}

.footer-contact .social {
  display: grid;
  width: 40px;
  height: 40px;
  color: var(--fg-primary);
  place-items: center;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  text-decoration: none;
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Modal */
.modal {
  border: 0;
  padding: 0
}

.modal::backdrop {
  background: rgba(0, 0, 0, .35)
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-l);
  width: min(640px, 92vw);
  box-shadow: var(--shadow-overlay)
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--stroke)
}

.modal-body {
  padding: 16px
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px
}

.contact-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-m);
  text-decoration: none;
  color: inherit
}

.contact-tile:hover {
  background: var(--bg-subtle)
}

.tile-title {
  font-weight: 700
}

.tile-sub {
  color: var(--fg-secondary)
}

@media(min-width:640px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr
  }
}

/* Utilities */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0
}

/* .center {
  display: grid;
  place-items: center;
  justify-content: flex-end;
} */


body.maintenance .maintenance-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--maint-bg) center / cover no-repeat;
}


.center {
  display: grid;
  place-items: center;
}

.push-right {
  display: grid;
  justify-content: end;
}


.muted {
  color: var(--fg-secondary)
}

.spacer-16 {
  height: 16px
}

.spacer-24 {
  height: 24px
}

.spacer-48 {
  height: 48px
}

/* Lock scroll when drawer is open (html + body for mobile browsers) */
.no-scroll,
.no-scroll body {
  height: 100%;
  overflow: hidden;
  display: -webkit-box;
}

/* Hide dialog when closed */
.drawer:not([open]) {
  display: none;
}

/* Fullscreen, fixed drawer that truly covers the viewport */
.drawer[open] {
  position: fixed;
  /* <- important to avoid the gap */
  inset: 0;
  /* top/right/bottom/left = 0 */
  width: 100vw;
  height: 100svh;
  /* dynamic viewport, better on mobile than 100vh */
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  display: grid;
  grid-template-rows: auto 1fr;
  /* add safe-area breathing room on devices with a home indicator */
  padding-bottom: env(safe-area-inset-bottom, 0);
}


/* Center the drawer links (your desired style) */
.drawer-links {
  list-style: none;
  margin: 0;
  height: 100%;
  display: grid;
  place-items: center;
  gap: 28px;
  padding: 24px 16px calc(env(safe-area-inset-bottom, 0) + 24px);
}

.drawer-links a,
.drawer-links .link-like {
  font-size: clamp(22px, 5vw, 40px);
  font-weight: 600;
  color: var(--fg-primary);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}

/* Active page in drawer (and desktop, if you want) */
.drawer-links a[aria-current="page"],
.nav-list a[aria-current="page"] {
  color: var(--brand-primary);
  /* use your brand token */
  font-weight: 500;
  text-decoration: none;
}

/* Never show the mobile drawer on desktop */
@media (min-width: 1025px) {
  .drawer {
    display: none !important;
  }
}

/* Lock scroll when drawer is open (html + body for mobile browsers) */
.no-scroll,
.no-scroll body {
  height: 100%;
  overflow: hidden;
}

.body {
  background-color: #fff !important;
}


/* Fullscreen, fixed drawer that truly covers the viewport */
.drawer[open] {
  position: fixed;
  /* <- important to avoid the gap */
  inset: 0;
  /* top/right/bottom/left = 0 */
  width: 100vw;
  height: 100svh;
  /* dynamic viewport, better on mobile than 100vh */
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  display: grid;
  grid-template-rows: auto 1fr;
  /* add safe-area breathing room on devices with a home indicator */
  padding-bottom: env(safe-area-inset-bottom, 0);
}


/* Center the drawer links (your desired style) */
.drawer-links {
  list-style: none;
  margin: 0;
  height: 100%;
  display: grid;
  place-items: center;
  gap: 28px;
  padding: 24px 16px calc(env(safe-area-inset-bottom, 0) + 24px);
}

.drawer-links a,
.drawer-links .link-like {
  font-size: clamp(22px, 5vw, 40px);
  font-weight: 600;
  color: var(--fg-primary);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}

/* Active page in drawer (and desktop, if you want) */
.drawer-links a[aria-current="page"],
.nav-list a[aria-current="page"] {
  color: #0F6CBD !important;
  /* use your brand token */
  font-weight: 500;
  text-decoration: none;
}

/* Never show the mobile drawer on desktop */
@media (min-width: 1025px) {
  .drawer {
    display: none !important;
  }
}



/* Full-screen modal sheet (cover the visual viewport) */
.drawer[open] {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  width: 100vw;
  /* robust viewport stack (browser uses the last it supports) */
  height: 100vh;
  height: 100dvh;
  height: 100svh;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto 1fr;
  /* keep content above iOS home indicator */
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.breadcrumbs .sep {
  opacity: .6;
}



/* Center the links and add bottom safe-area padding */
.drawer-links {
  list-style: none;
  margin: 0;
  height: 100%;
  display: grid;
  place-items: center;
  gap: 28px;
  padding: 24px 16px calc(env(safe-area-inset-bottom, 0) + 24px);
}

/* Lock page scroll while open */
.no-scroll,
.no-scroll body {
  overflow: hidden;
  height: 100%;
}

/* Active link color (works for desktop + drawer) */
.drawer-links a[aria-current="page"],
.nav-list a[aria-current="page"] {
  color: var(--brand-primary);
  font-weight: 500;
}

/* Never show the mobile drawer on desktop */
@media (min-width: 1025px) {
  .drawer {
    display: none !important;
  }
}


/* Fullscreen drawer that covers the visual viewport */
.drawer[open] {
  position: fixed;
  inset: 0;
  /* top/right/bottom/left = 0 */
  margin: 0;
  padding: 0;
  border: 0;
  width: 100vw;
  /* stack of viewport units; browser uses the last it supports */
  min-height: 100vh;
  /* fallback */
  min-height: 100dvh;
  /* dynamic viewport (Chrome/Safari 16+) */
  min-height: 100svh;
  /* small viewport (iOS) */
  display: grid;
  grid-template-rows: auto 1fr;
  background: #fff;
  overflow: auto;
  /* drawer scrolls, not the page */
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Dim the background; do not let backdrop intercept taps */
.drawer::backdrop {
  background: rgba(0, 0, 0, .35);
  pointer-events: none;
}

/* Center the links and respect safe area at the bottom */
.drawer-links {
  list-style: none;
  margin: 0;
  height: 100%;
  display: grid;
  place-items: center;
  gap: 28px;
  padding: 24px 16px calc(env(safe-area-inset-bottom, 0) + 24px);
}

/* Hard page scroll lock while drawer is open */
.no-scroll-fixed {
  position: fixed;
  overflow: hidden;
  width: 100%;
}

/* Highlight current page link (works in desktop & drawer) */
.drawer-links a[aria-current="page"],
.nav-list a[aria-current="page"] {
  color: var(--brand-primary);
  font-weight: 500;
}

/* Active link highlight for both desktop nav and mobile drawer */
.nav-list a[aria-current="page"],
.drawer-links a[aria-current="page"] {
  color: var(--brand-primary);
  /* or your active color variable */
  font-weight: 500;
}

/* Contact (button) should behave like a link on hover */
.nav-list .link-like,
.drawer-links .link-like {
  color: inherit;
  background: transparent;
  border: 0;
  padding: 8px 0;
}

/* Hover color for BOTH anchors and the link-like button */
@media (hover:hover) {

  .nav-list a:hover,
  .nav-list .link-like:hover,
  .drawer-links a:hover,
  .drawer-links .link-like:hover {
    color: #0F6CBD !important;
    /* ensure it beats earlier base color */
    text-decoration: none;
    transition: 0.8s;
    cursor: pointer;
  }
}

#loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: #0F6CBD;
  z-index: 9999;
  opacity: 0;
  transition: width .3s ease, opacity .15s linear;
}


/* ensure it doesn’t change layout and covers the page */
fluent-design-system-provider {
  display: block;
  width: 100%;
}

.breadcrumbs {
  font-size: 14px;
  margin: 16px 0;
}

.breadcrumbs a {
  color: var(--brand-primary);
  text-decoration: none;
}


.breadcrumbs a:hover {
  text-decoration: none;
}

.breadcrumbs .sep {
  margin: 0 6px;
  color: var(--fg-secondary);
}


.breadcrumbs [aria-current="page"] {
  text-transform: capitalize;
  max-width: 60ch;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

/* AFTER (safe with or without Fluent) */
body {
  background: var(--bg);
  color: var(--fg-primary);
}

.site-footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--stroke);
}

/* ===== Maintenance Mode ===== */
body.maintenance .app-header,
body.maintenance .drawer,
body.maintenance .site-footer {
  display: none !important;

}

.maintenance-screen {
  min-height: 90dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.maintenance-card {
  max-width: 720px;
  background: var(--surface);
  border-radius: var(--radius-l);
}

.maintenance-card h1 {
  margin: 0 0 20px 0;
  font-size: 50px;
}

.maintenance-card p.sub {
  color: var(--fg-secondary);
  margin: 0 0 20px 0;
  font-size: 20px;
}

.maintenance-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

body.maintenance .maintenance-screen {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
}


/* Glassy card */
.maintenance-card {
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(4px);
}

.maintenance-card h1 {
  color: #111111;
  line-height: 1.3;
  font-size: 48px;
  font-weight: 700;
}

.maintenance-card .mono {
  color: #111111;
  font-size: 14px;
}

@media (prefers-color-scheme: dark) {
  .maintenance-card {
    color: #fff;

  }
}

/* === No scrolling while Under-Construction is ON === */
body.maintenance {
  overflow: hidden;
  /* stop page scroll */
}

body.maintenance main {
  padding: 0;
  /* remove main's default 32/48px padding */
}

body.maintenance .maintenance-screen {
  min-height: 100dvh;
  /* exactly one viewport tall */
  padding: 0;
  /* no extra vertical space */
  display: grid;
  place-items: center;
  /* keep the card centered */
}

/* (optional) keep the card off the edges on small screens */
body.maintenance .maintenance-card {
  margin: 0 16px;
}

/* ==== Unify phone header & hamburger drawer styles (place at END) ==== */

/* 1) One source of truth for header height */
.drawer .drawer-header {
  height: var(--header-h) !important;
  padding: 0 20px;
}

.header-inner {
  height: var(--header-h);
}

/* 2) Make background/border identical */
.drawer {
  background: var(--neutral-layer-1);
}

/* 3) Shared nav link tokens (phone + drawer) */
:root,
fluent-design-system-provider {
  --nav-link-color: var(--neutral-foreground-rest);
  --nav-link-hover: var(--accent-foreground-rest);
  --nav-link-active: var(--accent-foreground-rest);
  --nav-weight: 500;
}

.nav-list a,
.nav-list .link-like,
.drawer-links a,
.drawer-links .link-like {
  color: var(--nav-link-color);
  font-weight: var(--nav-weight);
  text-decoration: none;
  text-underline-offset: 4px;
}

@media (hover:hover) {

  .nav-list a:hover,
  .nav-list .link-like:hover,
  .drawer-links a:hover,
  .drawer-links .link-like:hover {
    color: var(--nav-link-hover) !important;
  }
}

.nav-list a[aria-current="page"],
.drawer-links a[aria-current="page"] {
  color: var(--nav-link-active) !important;
}

/* 4) Icon sizes and tap targets stay consistent */
.icon-btn {
  min-width: 44px;
  min-height: 44px;
}

.icon-btn svg {
  width: clamp(24px, calc(var(--header-h) * 0.5), 44px);
  height: auto;
}

/* 5) Drawer link layout – same rhythm as desktop spacing */
.drawer-links {
  gap: 28px;
  /* matches your mobile rhythm */
  padding: 24px 16px calc(env(safe-area-inset-bottom, 0) + 24px);
}


/* === FIX: perfectly center the hamburger/X and keep position identical === */
.header-inner {
  align-items: center;
}

/* safety */

.icon-btn {
  /* kill UA padding/line-height & make a centering box */
  padding: 0 !important;
  line-height: 0 !important;
  display: grid !important;
  place-items: center !important;

  /* same hit area in header + drawer */
  height: var(--header-h) !important;
  min-width: 44px !important;
  background: transparent !important;
  border: 0 !important;
  margin: 0 !important;
}

/* make the drawer header use the same height & centering */
.drawer .drawer-header {
  height: var(--header-h) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

/* logo row stays centered in both places */
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.logo-mark {
  display: block;
}

/* Desktop: show full nav, hide hamburger */
@media (min-width: 1025px) {
  #menuBtn {
    display: none !important;
  }

  /* wins over .icon-btn */
  .nav-list {
    display: flex !important;
    align-items: center;
    gap: 40px;
  }
}

/* Mobile/Tablet: show hamburger, hide full nav */
@media (max-width: 1024px) {
  #menuBtn {
    display: inline-grid;
    place-items: center;
    justify-content: flex-end;
  }

  /* matches centering */
  .nav-list {
    display: none !important;
  }
}

.icon-btn {
  display: grid !important;
  justify-content: flex-end;
  /* ... */
}

/* ==========================================================================
   Farhad Ali — Portfolio SPA (CLEAN CSS)
   Goal: Keep header + hamburger drawer, hero, grids, cards, breadcrumbs,
         modal, footer, loading bar. Remove conflicts with Fluent tokens.
   - Does NOT override Fluent tokens; only reads them.
   - Uses own vars (--fa-*) so it won't fight the design system.
   ========================================================================== */

/* 0) Local variables (safe, non-conflicting) */
:root {
  --fa-maxw: 1260px;
  --fa-radius-s: 4px;
  --fa-radius-m: 8px;
  --fa-radius-l: 12px;
  --fa-radius-pill: 999px;
  --fa-gap: 24px;
  --fa-header-h: 70px;
  /* header height */
  --fa-section-y: 64px;
  /* vertical rhythm */

  /* Fallbacks using Fluent tokens if present */
  --fa-bg: var(--neutral-layer-1, #fff);
  --fa-bg-subtle: var(--neutral-layer-2, #f5f5f5);
  --fa-surface: var(--neutral-layer-1, #fff);
  --fa-surface-alt: var(--neutral-layer-3, #f3f2f1);
  --fa-stroke: var(--neutral-stroke-rest, #E1DFDD);
  --fa-fg: var(--neutral-foreground-rest, #111);
  --fa-fg-muted: var(--neutral-foreground-hint, #5E5E5E);
  --fa-accent: var(--accent-fill-rest, #5d5bd4);
  --fa-accent-hover: var(--accent-fill-hover, #5d5bd4);
  --fa-accent-on: var(--neutral-foreground-on-accent-rest, #fff);
  --fa-focus: var(--focus-stroke-outer, var(--accent-stroke-control-rest, #5d5bd4));
}

@media (max-width:1024px) {
  :root {
    --fa-section-y: 48px;
  }
}


.container {
  max-width: var(--fa-maxw);
  margin: 0 auto;
  padding-inline: 20px;
}

/* 1) Base */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, -apple-system, Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--fa-bg);
  color: var(--fa-fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent-foreground-rest, var(--fa-accent));
  text-decoration: none;
}

a:hover {
  color: var(--accent-foreground-hover, var(--fa-accent-hover));
  text-decoration: none;
}

button {
  font: inherit;
}



/* Focus */
:focus-visible {
  outline: none;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  background: var(--fa-accent);
  color: var(--fa-accent-on);
  padding: 8px 12px;
  border-radius: var(--fa-radius-s);
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 9999;
}

/* 2) Sections & Grid */
.section {
  padding-block: var(--fa-section-y);
}

.grid {
  display: grid;
  gap: var(--fa-gap);
}

.grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width:1024px) {
  .grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width:640px) {

  .grid.cols-3,
  .grid.cols-2 {
    grid-template-columns: 1fr;
  }
}

/* 3) Header & Nav (desktop + mobile) */
/* Default header background (transparent) */
/* .app-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 900;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
  background: white;
  backdrop-filter: none;
} */

/* DESKTOP header: smoother, GPU-friendly */
.app-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;

  /* keep your look */
  background: white;
  backdrop-filter: none;

  /* smoother bundle on desktop */
  --hdr-ease: cubic-bezier(.22,.61,.36,1);
  transition:
    background       .36s var(--hdr-ease),
    backdrop-filter  .36s var(--hdr-ease),
    -webkit-backdrop-filter .36s var(--hdr-ease),
    border-color     .36s var(--hdr-ease),
    box-shadow       .36s var(--hdr-ease),
    opacity          .36s var(--hdr-ease),
    transform        .36s var(--hdr-ease);

  /* perf guards */
  will-change: background, backdrop-filter, box-shadow, opacity, transform;
  transform: translateZ(0);
  contain: paint;
}


/* Glass effect when scrolledd */
.app-header.scrolled {
  background: rgba(255, 255, 255, 0.7);
  /* semi-transparent */
  backdrop-filter: blur(10px);
  /* frosted glass effect */
  -webkit-backdrop-filter: blur(10px);
  /* Safari support */
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

html.drawer-open .app-header {
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(232, 234, 237, .85);
}


/* Icon button (hamburger) */
.icon-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 !important;
  line-height: 0 !important;
  display: grid !important;
  place-items: center !important;
  background: transparent !important;
  border: 0 !important;
  margin: 0 !important;
}

.icon-btn:focus-visible {
  outline: 2px solid var(--fa-focus);
  outline-offset: 3px;
}

.icon-btn svg {
  width: clamp(24px, calc(var(--fa-header-h)*0.5), 44px);
  height: auto;
}

/* Desktop shows full nav, hides hamburger */
@media (min-width:1025px) {
  .nav-list {
    display: flex !important;
  }

  #menuBtn {
    display: none !important;
  }
}

/* Mobile hides full nav, shows hamburger */
@media (max-width:1024px) {
  .nav-list {
    display: none !important;
  }

  #menuBtn {
    display: inline-grid;
    place-items: center;
    justify-content: flex-end;
  }
}

/* 4) Mobile Drawer (dialog#mobileNav.drawer) */
.drawer {
  border: 0;
  padding: 0;
  background: var(--fa-surface);
}

.drawer[open] {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  width: 100vw;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #fff;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.drawer .drawer-header {
  height: var(--fa-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.drawer-links {
  list-style: none;
  margin: 0;
  height: 100%;
  display: grid;
  place-items: center;
  gap: 28px;
  padding: 24px 16px calc(env(safe-area-inset-bottom, 0) + 24px);
}

.drawer-links a,
.drawer-links .link-like {
  font-size: clamp(22px, 5vw, 40px);
  font-weight: 600;
  color: var(--fa-fg);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}

.drawer-links a[aria-current="page"],
.nav-list a[aria-current="page"] {
  color: var(--fa-accent) !important;
  font-weight: 500;
}

@media (min-width:1025px) {
  .drawer {
    display: none !important;
  }
}

/* 5) Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 100px;
  align-items: center;
  margin-top: 40px;
}

.hero .title {
  font-size: 37px;
  line-height: 44px;
  font-weight: 600;
}

.hero .sub {
  color: var(--fa-fg-muted);
}

@media (min-width:1025px) {
  .hero {
    grid-template-columns: 1.4fr .6fr;
  }
}

/* 6) Cards */
.card,
fluent-card {
  background: #fff;
  border: 1px solid var(--fa-stroke);
  border-radius: var(--fa-radius-m);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 2px 6px rgba(0, 0, 0, .04);
  overflow: hidden;
}

.card .body {
  padding: 16px;
}

.card .meta {
  color: var(--fa-fg-muted);
  font-size: 14px;
}

/* Work hero (project banner card) */
.work-hero {
  position: relative;
  isolation: isolate;
  height: 730px;
  min-height: 540px;
  border: 1px solid var(--fa-stroke);
  border-radius: var(--fa-radius-l);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 2px 6px rgba(0, 0, 0, .04);
  color: #fff;
}

.work-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--img) center/cover no-repeat;
  z-index: -2;
}

.work-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .28) 40%, rgba(0, 0, 0, .55) 100%);
  z-index: -1;
}

.work-hero .content {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 24px;
  max-width: 760px;
}

.work-hero .eyebrow {
  font-weight: 700;
  margin-bottom: 6px;
  opacity: .95;
}

.work-hero .title {
  font-size: clamp(28px, 4.2vw, 48px);
  line-height: 1.12;
  margin: 0 0 8px 0;
  color: #fff;
}

.work-hero .sub {
  margin: 0 0 16px 0;
  opacity: .95;
  font-size: clamp(16px, 2.2vw, 20px);
}

.work-hero .cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: var(--fa-radius-m);
}

.work-hero .cta:hover {
  background: rgba(255, 255, 255, .12);
}

.work-hero .tags {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-hero .tag {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--fa-radius-pill);
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  color: #fff;
}

.work-hero .cover-link {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.work-hero .content a,
.work-hero .content button,
.work-hero .tags * {
  position: relative;
  z-index: 1;
}

@media (max-width:800px) {
  .work-hero {
    height: 520px;
    min-height: 420px;
  }

  .work-hero .content {
    left: 16px;
    right: 16px;
    top: 16px;
  }

  .work-hero .tags {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}

/* Filter chips */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}


/* 7) Page bits */
main {
  padding-block: 0 48px;
  min-height: 60vh;
}

.detail h1 {
  font-size: 28px;
  line-height: 1.3;
}

.kv {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-block: 12px 20px;
}

.kv div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 14px;
  margin: 16px 0;
}

.breadcrumbs a {
  color: var(--fa-accent);
  text-decoration: none;
}

.breadcrumbs .sep {
  margin: 0 6px;
  color: var(--fa-fg-muted);
  opacity: .6;
}

.breadcrumbs [aria-current="page"] {
  text-transform: capitalize;
  max-width: 60ch;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

/* Modal (dialog.modal) */
.modal {
  border: 0;
  padding: 0;
}

.modal::backdrop {
  background: rgba(0, 0, 0, .35);
}

.modal-card {
  background: var(--fa-surface);
  border: 1px solid var(--fa-stroke);
  border-radius: var(--fa-radius-l);
  width: min(640px, 92vw);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--fa-stroke);
}

.modal-body {
  padding: 16px;
}

/* Footer */
.site-footer {
  background: var(--fa-bg-subtle);
  border-top: 1px solid var(--fa-stroke);
  padding-block: 24px;
}

.footer-grid {
  display: grid;
  gap: 16px;
}

@media(min-width:769px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-contact .social {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: inherit;
  border: 1px solid var(--fa-stroke);
  border-radius: 8px;
  text-decoration: none;
}

/* Loading bar */
#loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--fa-accent);
  z-index: 9999;
  opacity: 0;
  transition: width .3s ease, opacity .15s linear;
}

@media (prefers-reduced-motion: reduce) {
  #loading-bar {
    transition: none;
  }
}

/* Utilities */
.center {
  display: grid;
  place-items: center;
}

.push-right {
  display: grid;
  justify-content: end;
}

.muted {
  color: var(--fa-fg-muted);
}

.spacer-16 {
  height: 16px;
}

.spacer-24 {
  height: 24px;
}

.spacer-48 {
  height: 48px;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Maintenance minimal (kept lean to avoid conflicts) */
:root {
  --maint-bg: none;
}

body.maintenance .app-header,
body.maintenance .drawer,
body.maintenance .site-footer {
  display: none !important;
}

body.maintenance {
  overflow: hidden;
}

body.maintenance main {
  padding: 0;
}

body.maintenance .maintenance-screen {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 0;
}

body.maintenance .maintenance-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--maint-bg) center/cover no-repeat;
}

.maintenance-card {
  max-width: 720px;
  margin: 0 16px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(4px);
  border-radius: var(--fa-radius-l);
}

.maintenance-card h1 {
  margin: 0 0 20px 0;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.3;
  color: #111;
}

.maintenance-card p.sub {
  color: var(--fa-fg-muted);
  margin: 0 0 20px 0;
  font-size: 20px;
}

.maintenance-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* === Header height: single source of truth + page offset === */
:root {
  --fa-header-h: 72px;
}

/* desktop/tablet */
@media (max-width: 640px) {
  :root {
    --fa-header-h: 64px;
  }
}

/* mobile */

/* If earlier CSS used --header-h, map it to our single var */
fluent-design-system-provider {
  --header-h: var(--fa-header-h);
}

/* Lock the header box height and avoid double spacing */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.header-inner {
  height: var(--fa-header-h) !important;
  align-items: center;
}

/* Drawer header should match exactly the same height */
.drawer .drawer-header {
  height: var(--fa-header-h) !important;
}

/* Offset the whole page ONCE so content (incl. breadcrumbs) starts below header */
body {
  padding-top: var(--fa-header-h) !important;
}

/* Breadcrumbs: keep normal flow; just a small margin is fine */
.breadcrumbs {
  margin: 20px 0 !important;
  position: static !important;
}

/* Optional: if you ever make breadcrumbs sticky, set top to header height
.breadcrumbs { position: sticky; top: var(--fa-header-h); background: #fff; z-index: 900; }
*/

pre-maint .app-header,
.pre-maint .drawer,
.pre-maint .site-footer {
  visibility: hidden;
}

/* ---- SPA 404 page ---- */
.not-found .nf-wrap {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.not-found .title {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.25;
  margin-bottom: 8px;
}

.not-found .muted {
  margin: 0 auto 16px;
  max-width: 60ch;
}

.not-found .cta-row {
  justify-content: center;
}

.pre-maint .app-header,
.pre-maint .drawer,
.pre-maint .site-footer {
  visibility: hidden;
}


/* Error page */
.error-page {
  padding: 48px 0;
}

.error-card {
  border: 1px solid var(--divider, #E8EAED);
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: 0 2px 10px rgba(20, 20, 20, 0.05);
}

.error-meta {
  margin-bottom: 16px;
}

.error-code {
  display: inline-block;
  font-weight: 700;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--divider, #E8EAED);
  margin-bottom: 8px;
}

.error-actions fluent-button+fluent-button {
  margin-left: 8px;
}

/* Respect your theme */
:root {
  --divider: #E8EAED;
}

fluent-button.back-to-top {
  position: fixed;
  inset-inline-end: 16px;
  inset-block-end: calc(16px + env(safe-area-inset-bottom, 0));
  z-index: 1100;
}

fluent-button.back-to-top[hidden] {
  display: none;
}

fluent-button.back-to-top::part(control) {
  min-width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: none;

}

fluent-button.back-to-top:focus-visible::part(control) {
  outline: 2px solid var(--fa-focus);
  outline-offset: 3px;
}

@media (hover:hover) {
  fluent-button.back-to-top:hover::part(control) {
    filter: brightness(0.96);
  }
}

body.maintenance fluent-button.back-to-top {
  display: none !important;
}

fluent-button.back-to-top {
  /* …existing styles… */
  inset-block-end: calc(40px + env(safe-area-inset-bottom, 0));
}

@media (max-width: 640px) {
  fluent-button.back-to-top {
    inset-block-end: calc(40px + env(safe-area-inset-bottom, 0));
  }
}

fluent-button.back-to-top svg {
  width: 40px;
  height: 40px;
  display: block;
  color: #5E5E5E;
}

/* ===== Error pages: full-height layout with no scroll ===== */
html.error-lock,
body.error-lock {
  height: 100%;
  overflow: hidden;
  /* prevent any scroll when an error page is active */
}

/* Main takes exactly the remaining viewport between sticky header and footer */
#main.error-fullscreen {
  min-block-size: calc(100dvh - var(--fa-header-h) - var(--fa-footer-h, 80px));
  display: grid;
  place-items: center;
  padding-block: 24px;
}


/* Optional: hide "Back to Top" on error pages (there's no scroll anyway) */
body.error-page fluent-button.back-to-top {
  display: none !important;
}

/* ===== Footer layout (Fluent-friendly, no colors) ===== */

/* A11y utility */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
  border: 0;
}

/* --- Top: Connect block --- */
.footer-connect {
  padding-block: 40px 28px;
  /* space around the connect area */
  text-align: center;
  /* center title, subtext, email */
}

.connect-inner {
  max-width: 960px;
  margin-inline: auto;
}

.connect-title {
  margin: 0 0 4px;
}

.connect-sub {
  margin: 0 0 8px;
}

.connect-email {
  margin: 0;
}

/* Social list (uses <fluent-anchor> as icon chips) */
.social-nav {
  margin-top: 16px;
}

.social-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Size Fluent anchor as a 44×44 circular chip (no visual styling) */
.social-icon::part(control) {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  padding: 0;
  display: grid;
  place-items: center;
}

.social-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* --- Bottom bar (brand · legal · copyright) --- */
.footer-bar {
  padding-block: 16px;
}

.bar-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  /* left / center / right */
  align-items: center;
  gap: 16px 24px;
}

.bar-left .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  /* rely on default theming */
}

.brand-mark {
  width: 24px;
  height: 24px;
}

.brand-text {
  /* typography inherits */
}

.bar-center {
  display: inline-flex;
  gap: 12px;
  justify-self: center;
}

.bar-right {
  justify-self: end;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .bar-grid {
    grid-template-columns: 1fr;
    /* stack */
    text-align: center;
  }

  .bar-right {
    justify-self: center;
  }

  .bar-center {
    justify-self: center;
  }
}

/* 1-per-row list container */
.stack-1col {
  display: grid;
  gap: 24px;
}

/* Full-width case study card */
.cs-card {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 460px);
  align-items: center;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--stroke, #E8EAED);
  border-radius: 16px;
  background: var(--card-bg, #fff);
  box-shadow: 0 2px 16px rgba(0, 0, 0, .04);
}

.cs-card__content {
  min-width: 0;
}

.cs-card__media {
  justify-self: end;
}

.cs-card__media img {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--stroke, #E8EAED);
  background: #f6f7f9;
}

.cs-card__eyebrow {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #F1F3F4;
  color: #202124;
  font-size: 12px;
  line-height: 1;
  border: 1px solid rgba(0, 0, 0, .06);
}

.pill--cat {
  background: #E8F1FD;
  color: #0F6CBD;
  border-color: rgba(15, 108, 189, .18);
}

.pill--lock {
  background: #FFF4E5;
  color: #8A4B00;
  border-color: rgba(255, 163, 26, .35);
}

.cs-card__title {
  margin: 6px 0 6px;
  font-size: 22px;
  line-height: 1.25;
}

.cs-card__link {
  color: inherit;
  text-decoration: none;
}

.cs-card__link:hover {
  text-decoration: underline;
}

.cs-card__summary {
  color: var(--body, #5F6368);
  margin: 8px 0 14px;
}

.cs-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.cs-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width:1024px) {
  .cs-card {
    grid-template-columns: 1fr 360px;
    padding: 20px;
    gap: 20px;
  }
}

@media (max-width:640px) {
  .cs-card {
    grid-template-columns: 1fr;
  }

  .cs-card__media {
    justify-self: stretch;
  }

  .cs-card__media img {
    max-width: 100%;
  }
}

.stack-1col {
  display: grid;
  gap: 24px;
}

@media (max-width:640px) {
  .stack-1col {
    gap: 20px;
  }
}


/* 2-in-row tile grid (auto 1-col on mobile) */
.tiles {
  display: grid;
  gap: 24px;
}

.tiles--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 640px) {
  .tiles--2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Tile card (Fluent style) */
.tile-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--stroke, #E8EAED);
  border-radius: 16px;
  background: var(--card-bg, #fff);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .04);
  overflow: hidden;
}

.tile-card:focus-within {
  outline: 2px solid var(--accent, #0F6CBD);
  outline-offset: 2px;
  /* WCAG AA focus */
}

.tile-card__media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #f6f7f9;
}

.tile-card__body {
  padding: 16px;
}

.tile-card__eyebrow {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #F1F3F4;
  color: #202124;
  font-size: 12px;
  line-height: 1;
  border: 1px solid rgba(0, 0, 0, .06);
}

.pill--cat {
  background: #E8F1FD;
  color: #0F6CBD;
  border-color: rgba(15, 108, 189, .18);
}

.pill--lock {
  background: #FFF4E5;
  color: #8A4B00;
  border-color: rgba(255, 163, 26, .35);
}

.tile-card__title {
  margin: 16px 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.tile-card__link {
  color: inherit;
  text-decoration: none;
}

.tile-card__link:hover {
  text-decoration: none;
}

.tile-card__summary {
  color: var(--body, #5F6368);
  margin: 8px 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  /* clamp to ~3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tile-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
}

.tile-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tile-card {
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 2px 6px rgba(0, 0, 0, .04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}



.tile-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}



/* Section header row */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

/* Title link with chevron */
.section-link {
  font: inherit;
  font-weight: 600;
  color: var(--fa-text, #111);
  text-decoration: none;
  position: relative;
}

.section-link:hover {
  text-decoration: underline;
}

/* Segmented chip group */
.seg {
  display: inline-flex;
  background: #F3F4F6;
  padding: 4px;
  border-radius: 999px;
}

.seg__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #374151;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  font-weight: 600;
}

.seg__btn.is-active {
  background: #0F6CBD;
  /* accent */
  color: #fff;
  box-shadow: 0 0 0 1px rgba(15, 108, 189, .12) inset;
}

.seg__btn:focus-visible {
  outline: 2px solid #0F6CBD;
  outline-offset: 2px;
}

/* 2-in-row grid (already added earlier, included here for completeness) */
.tiles {
  display: grid;
  gap: 24px;
}

.tiles--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 640px) {
  .tiles--2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .cs-header {
    display: flex;
    align-items: center;
    gap: 0px !important;
    margin-bottom: 24px !important;
    flex-direction: column;
  }
}



/* dsd */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-l, 16px);
}

.section-link {
  color: var(--fa-fg, #202124);
  text-decoration: none;
  /* no underline */
  transition: color .2s ease-in-out;
  /* smooth hover */
}

.section-link:hover {
  color: var(--fa-accent, #0F6CBD);
  /* accent color */
}

.section-title {
  margin: 0;
  font-size: 1.5rem;
  /* ~24px */
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.section-title .chev {
  flex: 0 0 auto;
  transition: color .2s ease-in-out;
}

#csSection .section-head {
  margin-bottom: 8px;
}

/* === Case Studies header (title + pill filters) =========================== */
.cs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}



.cs-chipset {
  display: inline-flex;
  gap: 12px;
}

/* Fluent buttons styled as round "chips" */
fluent-button.chip::part(control) {
  border-radius: 999px;
  padding: 10px 18px;
  min-height: 20px;
  background: #ffffff;
  /* subtle neutral */
  border: 1px solid #dcdcdf;
  /* light stroke */
  color: var(--fa-fg, #111);
  box-shadow: none;
}

fluent-button.chip:hover::part(control) {
  filter: brightness(0.98);
}

fluent-button.chip.is-active::part(control) {
  background: #f7fafd;
  color: #2367b9;
  border-color: #2367b9;
}

/* Thin rule under header */
.cs-rule {
  height: 1px;
  border: 0;
  background: var(--fa-stroke, #E1DFDD);
  margin-block: 8px 20px;
}

/* list stack spacing on this page */
#csList.stack-1col {
  gap: 24px;
}


/* Tile media overlay pills — GLASS EFFECT */
.tile-card__media {
  position: relative;
  display: block;
}

.tile-card__overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
  /* keep the image link clickable */
}

.tile-card__overlay .pill {
  font-size: 12px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 9999px;
  /* frosted glass */
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  color: #202124;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
  pointer-events: auto;
  /* safe if we ever make pills clickable */
}

/* tiny colored dot + per-kind color on the category pill */
.tile-card__overlay .pill--cat::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: currentColor;
}

/* Work = accent blue; Research = green */
.tile-card[data-kind="work"] .tile-card__overlay .pill--cat {
  color: #0F6CBD;
  gap: 4px;
}

.tile-card[data-kind="research"] .tile-card__overlay .pill--cat {
  color: #1A7F37;
  gap: 4px;
}

/* lock pill stays neutral on glass */
.tile-card__overlay .pill--lock {
  color: #333;
}

/* high-contrast fallback (no blur) */
@media (prefers-contrast: more) {
  .tile-card__overlay .pill {
    background: #fff;
    border-color: #d0d7de;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Dot indicator only */
.tile-card__overlay .pill--cat::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

/* Work dot = blue */
.tile-card[data-kind="work"] .pill--cat::before {
  background: #0F6CBD;
}

/* Research dot = green */
.tile-card[data-kind="research"] .pill--cat::before {
  background: #1A7F37;
}

/* === FINAL: Glass overlay pill with dot-only color ======================= */
.tile-card__media {
  position: relative;
  display: block;
}

.tile-card__overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
  /* keep image link clickable */
}

/* Frosted glass pill; text always neutral */
.tile-card__overlay .pill {
  font-size: 12px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 9999px;
  color: #202124 !important;
  /* <-- always black text */
  background: rgba(255, 255, 255, 0.55) !important;
  /* glass bg */
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
  pointer-events: auto;
  /* safe if you make pills clickable later */
}

/* Dot-only color on category pill */
.tile-card__overlay .pill--cat::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

/* Work dot = blue; Research dot = green (text stays black due to rule above) */
.tile-card[data-kind="work"] .pill--cat::before {
  background: #0F6CBD !important;
}

.tile-card[data-kind="research"] .pill--cat::before {
  background: #1A7F37 !important;
}

/* Lock pill stays neutral on glass */
.tile-card__overlay .pill--lock {
  color: #202124 !important;
}

/* High-contrast fallback */
@media (prefers-contrast: more) {
  .tile-card__overlay .pill {
    background: #fff !important;
    border-color: #d0d7de !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Auto background fade for card body (from image color) */
.tile-card__body {
  background: var(--auto-bg, transparent);
  transition: background 25s ease;
  border-radius: 0 0 12px 12px;
}

/* if you want a very light default while img loads */
.tile-card__body {
  background: var(--auto-bg, linear-gradient(to bottom, rgba(0, 0, 0, .02), transparent 70%));
}

.tile-card {
  outline: none !important;
}


/* --- Home hero (Fluent‑y) --- */
.hero--fluent {
  /* page-wide soft gradient backdrop */
  --hero-grad-start: #e9e6ff;
  --hero-grad-end: #f7f7ff;
  background: linear-gradient(180deg, var(--hero-grad-start), var(--hero-grad-end));
  padding: clamp(20px, 4vw, 28px) 0 48px;
}

.hero__panel {
  background: color-mix(in oklab, white 86%, transparent);
  border: 1px solid var(--stroke, #E6E6E8);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-radius: 16px;
  padding: clamp(18px, 2vw, 24px);
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: clamp(16px, 3vw, 28px);
  align-items: center;
}

.hero__copy .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #0f6c3f;
  background: #e6f4ec;
  border: 1px solid #cce8d9;
  border-radius: 999px;
  padding: 8px 12px;
  margin-bottom: 12px;
}

.hero__copy .badge::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1f9254;
  box-shadow: 0 0 0 3px #dff3e8 inset;
}

.hero__title {
  margin: 6px 0 10px 0;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.hero__intro {
  color: var(--text-2, #5b5b61);
  margin: 12px 0 18px 0;
  max-width: 60ch;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero__link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent, #106ebe);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.hero__link:hover {
  text-decoration: underline;
}

.hero__photo {
  aspect-ratio: 4/5;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(16, 24, 40, .08);
  border: 1px solid var(--stroke, #E6E6E8);
}

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* “about teaser” row under panel */
.hero__teaser {
  margin-top: 18px;
  color: var(--text-2, #5b5b61);
  max-width: min(1100px, 92vw);
}

/* responsive */
@media (max-width: 1024px) {
  .hero__panel {
    grid-template-columns: 1fr;
  }

  .hero__photo {
    max-width: 380px;
    justify-self: flex-start;
  }
}

html {
  scroll-behavior: smooth;
}

/* makes “Know more” smooth-scroll */

/* ---- Page gradient like the mock ---- */
:root {
  --hero-card-radius: 8px;
}

/* ---- Hero card ---- */
.hero-card {
  display: grid;
  grid-template-columns: 1fr 0.4fr;
  /* text / photo */
  gap: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(27, 27, 27, 0.06);
  overflow: hidden;
  /* clip the photo corners */
  align-items: stretch;
  min-height: 360px;
}

/* left (copy) */
.hero-copy {
  padding: clamp(30px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* center vertically */
}

/* right (photo) */
.hero-photo {
  position: relative;
  background: #f6f6f6;
}


@media (max-width:1024px) {
  .hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* right side only rounded (left is clipped by overflow) */
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
  }
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* right side only rounded (left is clipped by overflow) */
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* Big hero title sizes keep your current font scaling */
.hero-title {
  font-size: 37px;
  font-weight: 600;
  line-height: 1.15;
  margin: 6px 0 14px;
}

.hero-title a {
  color: var(--accent, #1a69cc);
}

/* Under-card helper copy + link row */
.hero-under {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 30px;
}

.hero-under p {
  margin: 0;
  color: #444;
  padding-left: 30px;
}



/* "Know more" text link */
.link-know {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 500;
  padding-right: 100px;
  color: #444;
}

.link-know .icon {
  display: inline-block;
  width: 16px;
  height: 16px;
}

/* Responsive: stack photo under copy on small screens */
@media (max-width: 900px) {
  .hero-card {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    height: 280px;
  }

  .hero-under {
    flex-direction: column;
    align-items: center;
  }
}

.hero-knowmore {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  color: var(--accent, #0F6CBD);
  text-decoration: none;
}

.hero-knowmore:hover {
  text-decoration: underline;
}

/* --- Fix: badge should be a small pill, not full width --- */
.hero-copy {
  /* the left column is a flex column */
  align-items: flex-start;
  /* stop auto-stretch of children */
}

.hero-copy .badge-available {
  align-self: flex-start;
  /* never stretch this child */
  width: auto;
  /* defensive */
  max-width: max-content;
  /* keep it as a pill */
}

/* --- Fix: make the photo cast a visible shadow like a card --- */
/* Let the photo’s shadow show outside its box */
.hero-card {
  overflow: visible;
  /* was hidden → clipped the shadow */
}

/* Give the right block a card-like shadow and keep only right corners rounded */
.hero-photo {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  filter: drop-shadow(0 8px 24px rgba(16, 24, 40, .12));
  /* optional: a subtle “card edge” */
  border-left: 1px solid #E6E6E8;
  background: #fff;
}

/* keep the image filling the block and round only the right corners */
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* === BADGE: small pill with smooth, blinking dot + soft halo =========== */
.badge-available {
  margin-bottom: 20px;
  gap: 10px;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid #D8EFD8;
  border-radius: 999px;
  font: 500 14px/1.1 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #176B2A;
  /* text green */
  background: #F3FBF5;
  /* soft greenish pill */
  letter-spacing: .2px;
  /* glassy feel */
  box-shadow: 0 1px 0 rgba(255, 255, 255, .65) inset,
    0 1px 2px rgba(16, 24, 40, .04);
}

/* the dot itself */
.badge-available .dot {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #176B2A;
  /* core green */
  box-shadow:
    0 0 0 3px #E8F7ED inset,
    /* inner ring like the mock */
    0 0 0 0 rgba(49, 176, 87, .35);
  /* animated halo base */
  animation: dotPulse 1.6s ease-out infinite;
}

/* expanding halo (separate layer so pulse is smooth) */
.badge-available .dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(49, 176, 87, .35);
  animation: dotRipple 1.6s ease-out infinite;
}

/* keyframes = subtle blink + halo ripple */
@keyframes dotPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .55;
  }
}

@keyframes dotRipple {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(49, 176, 87, .35);
  }

  70% {
    transform: scale(1.6);
    box-shadow: 0 0 0 8px rgba(49, 176, 87, 0);
  }

  100% {
    transform: scale(1.);
    box-shadow: 0 0 0 0 rgba(49, 176, 87, 0);
  }
}

/* accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {

  .badge-available .dot,
  .badge-available .dot::after {
    animation: none;
  }
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.2;
  }
}

/* Hero */
.hero-gradient {
  background: linear-gradient(to bottom, var(--fill-secondary), var(--background));
  padding-top: 64px;
  /* bigger gap at top */
  padding-bottom: 36px;
}

.hero-card.glass {
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.7);
}

/* Hero gets extra breathing room */
.hero {
  padding-top: 96px;
  /* bigger than the default section gap */
  padding-bottom: 96px;
}

@media (max-width: 768px) {
  .hero-under p {
    padding-left: 0px;
  }

}


/* Hero section custom spacing */
.hero-gradient {
  padding-top: clamp(60px, 12vw, 120px);
  padding-bottom: clamp(60px, 12vw, 120px);
}

.hero.section .sub {
  margin-top: 1rem;
  font-size: clamp(16px, 1.6vw, 20px);
}

/* Keep it responsive */
@media (max-width: 768px) {
  .hero.section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .hero-photo img {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
  }
}


.hero-under {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  /* align to top of text/title */
  max-width: 100%;
  margin-top: 1.5rem;
  padding: 0 1rem;
  gap: 2rem;
}

.hero-under p {
  flex: 1;
  max-width: 60ch;
  /* controls line length */
  line-height: 1.6;
  font-size: 1rem;
  margin: 0;
  text-align: left;
  white-space: normal;
  /* allow wrapping */
}

.hero-under .link-know {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  margin-top: 0.25rem;
  /* nudge to align visually */
  color: #444;
}

@media (max-width: 768px) {
  .hero-under {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-under p {
    max-width: 100%;
  }

  .hero-under {
    gap: 16px;
  }
}

/* Hide photo on small screens */
@media (max-width: 768px) {
  .hero-photo {
    display: none;
  }
}

/* === About Preview (Home) ===================================== */
.about-preview {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: var(--fa-gap);
  align-items: start;
}

.about-left {
  display: grid;
  gap: 14px;
}

.about-summary {
  margin: 6px 0 4px 0;
  color: var(--fa-fg);
  max-width: 68ch;
}

.chipset {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 4px 0;
}

.chipset .chip {
  appearance: none;
  border: 1px solid var(--fa-stroke);
  background: var(--fa-surface);
  color: var(--fa-fg);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.chipset .chip[aria-selected="true"] {
  background: var(--fa-accent);
  border-color: var(--fa-accent);
  color: var(--fa-accent-on);
}

/* Right column mini image stack */
.about-right {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.about-stack {
  --stack-w: min(420px, 40vw);
  width: var(--stack-w);
  max-width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0;
  position: relative;
  border-radius: var(--fa-radius-l);
  overflow: hidden;
  border: 1px solid var(--fa-stroke);
  box-shadow: var(--shadow-card, 0 1px 2px rgba(0, 0, 0, .06));
  background: var(--fa-surface-alt);
  cursor: pointer;
}

.about-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .16s ease;
}

.about-stack-meta {
  font-size: 12px;
  color: var(--fa-fg-muted);
}

/* Responsive */
@media (max-width: 1024px) {
  .about-preview {
    grid-template-columns: 1fr;
  }

  .about-right {
    justify-items: start;
  }

  .about-stack {
    width: 100%;
  }
}

/* ==== About preview: photo fan stack ================================== */
.about-preview {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 32px;
  align-items: center;
}

@media (max-width: 900px) {
  .about-preview {
    grid-template-columns: 1fr;
  }

  .about-right {
    justify-self: center;
  }
}

/* --- About Preview: Photo Stack --- */
.photo-stack {
  position: relative;
  width: 220px;
  height: 260px;
  cursor: pointer;
  perspective: 1000px;
}

.photo-stack img.ps-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0;
}

.photo-stack img.ps-img.is-top {
  opacity: 1;
  z-index: 3;
}

.photo-stack.bump {
  animation: bump 0.3s ease;
}

@keyframes bump {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.04);
  }

  100% {
    transform: scale(1);
  }
}

/* Fake “stacked” frames behind the active photo */
.photo-stack img.ps-img:nth-child(2) {
  transform: rotate(-2.5deg) translateY(6px);
  z-index: 1;
  opacity: 0.6;
}

.photo-stack img.ps-img:nth-child(3) {
  transform: rotate(2.5deg) translateY(12px);
  z-index: 0;
  opacity: 0.4;
}

/* Hint text */
.photo-hint {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 8px;
  color: var(--text-secondary, #666);
}


/* ===== Dynamic Island Header ===== */
/* .dynamic-island {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  transition: all 250ms cubic-bezier(0.22, 0.61, 0.36, 1);
} */

.dynamic-island {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  /* transition: all 650ms cubic-bezier(0.25, 0.46, 0.45, 0.94); */
}

/* .island-container {
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 12px;
  transition: all 250ms cubic-bezier(0.22, 0.61, 0.36, 1);
  max-width: min(920px, 100%);
  border: 1px solid rgba(15, 108, 189, 0.1) !important;
} */

.island-container {
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 12px;
  max-width: min(920px, 100%);
  border: 1px solid rgba(15, 108, 189, 0.1) !important;
  will-change: transform, width, padding, opacity;
  transform: translateZ(0);
}

/* Normalize child margins so spacing is pure 'gap' */
.island-container > .avatar,
.island-container > .status-container,
.island-container > .cta-button {
  margin: 0;
}

/* Desktop: make sure layout uses gap, not space-between */
@media (min-width: 1025px) {
  .dynamic-island .island-container { justify-content: flex-start; }
}

.nav-links.hidden { width: 0; gap: 0; overflow: hidden; }


/* Avatar */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;

  text-decoration: none;
}


.avatar:focus-visible {
  outline: none;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Navigation */
.nav-links {
  display: flex;
  gap: 24px;
  align-items: center !important;
  transition: all 250ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.nav-links.hidden {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
  width: 0;
  gap: 0;
  overflow: hidden;
}

.nav-link {
  text-decoration: none;
  color: var(--fa-fg, #202124);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--fa-accent, #0F6CBD);
}

.nav-link:focus-visible {
  outline: 2px solid #0F6CBD;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Status */
.status-container {
  display: flex;           /* always in flow */
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: scale(.98);
  pointer-events: none;
  transition:
    opacity   var(--island-duration) var(--island-ease),
    transform var(--island-duration) var(--island-ease);
}
.status-container.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}


.status-text {
  color: var(--fa-fg, #202124);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  background: #10B981;
  border-radius: 50%;
  animation: islandPulse 2s infinite;
}

@keyframes islandPulse {
  0% {
    transform: scale(1);
    opacity: 1
  }

  50% {
    transform: scale(1.2);
    opacity: 0.7
  }

  100% {
    transform: scale(1);
    opacity: 1
  }
}

/* CTA — style Fluent’s internal control, not the host */
fluent-button.cta-button {
  background: transparent !important; /* kill the "double pill" */
  padding: 0;                          /* let ::part(control) size itself */
  margin: 0;                           /* reset all margins */
  display: flex;                       /* ensure proper flex behavior */
  align-items: center;                 /* center vertically */
}

fluent-button.cta-button::part(control) {
  background: #0F6CBD;
  color: #fff;
  border: 0;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  padding: 10px 20px;                  /* default desktop padding */
  min-height: 36px;
}

fluent-button.cta-button:focus-visible::part(control) {
  outline: 2px solid #0F6CBD;
  outline-offset: 2px;
}


@media (min-width: 1025px){
  .cta-button.hidden {
    opacity: 1; transform: none; pointer-events: auto; width: auto; padding: 10px 20px; overflow: visible;
  }
}


/* Hamburger */
.hamburger {
  width: 40px;
  height: 40px;
  background: #0F6CBD;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}


/* Bottom Sheet Overlay */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: all 300ms ease;
}

.bottom-sheet-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Bottom Sheet */
.bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(15, 108, 189, 0.1);
  border-radius: 24px 24px 0 0;
  padding: 20px;
  min-height: 320px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 300ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.bottom-sheet.active {
  transform: translateY(0);
}

/* Bottom sheet header */
.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.sheet-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.sheet-avatar:hover {
  border-color: #0F6CBD;
}

.sheet-avatar:focus-visible {
  outline: 2px solid #0F6CBD;
  outline-offset: 2px;
}

.sheet-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.close-button {
  width: 40px;
  height: 40px;
  background: #0F6CBD;
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease;
}

/* Bottom sheet nav */
.sheet-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
  align-items: center;
}

.sheet-nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  font-size: 18px;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  transition: all 200ms ease;
}


.sheet-nav-link:focus-visible {
  outline: none;
}

/* Bottom sheet CTA */
.sheet-cta {
  background: #0F6CBD;
  color: white;
  padding: 16px 32px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  transition: all 200ms ease;
  border: none;
  cursor: pointer;
  display: block;
  width: 50%;
}


.sheet-cta:focus-visible {
  outline: none;
}

/* Responsive */
@media (max-width: 1024px) {

  .nav-links,
  .cta-button {
    display: none !important;
  }

  .hamburger {
    display: flex;
  }

  .status-container {
    opacity: 1 !important;
    transform: scale(1) !important;
    width: auto !important;
    pointer-events: all !important;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Active state for Dynamic-Island links */
.nav-link[aria-current="page"],
.sheet-nav-link[aria-current="page"] {
  color: #0F6CBD !important;
  font-weight: 600;
}

/* Keep hover from downgrading active color */
.nav-link[aria-current="page"]:hover,
.sheet-nav-link[aria-current="page"]:hover {
  color: var(--fa-accent, #0F6CBD);
  transform: none;
}

/* Active state for Dynamic-Island links */
.nav-link[aria-current="page"],
.sheet-nav-link[aria-current="page"] {
  color: var(--fa-accent, #0F6CBD);
  font-weight: 600;
}

/* Keep hover from downgrading active color */
.nav-link[aria-current="page"]:hover,
.sheet-nav-link[aria-current="page"]:hover {
  color: var(--fa-accent, #0F6CBD);
  transform: none;
}


/* === Dynamic Island — 80% width on mobile === */
@media (max-width: 640px) {
  header.dynamic-island {               /* keep it centered */
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  header.dynamic-island .island-container {
    width: var(--island-w-collapsed);   /* 75vw collapsed */
    margin: 0 auto;
    border-radius: 28px;
    justify-content: space-between;
  }

  /* when you add .expanded */
  header.dynamic-island .island-container.expanded {
    width: var(--island-w-expanded);    /* 80vw expanded */
  }
}


.island-container {
  /* ... */
  padding: 8px 10px;           /* symmetric L/R */
  gap: 16px;                   /* keeps comfy spacing when expanded */
}

/* normalize child item margins so gaps are truly even */
.island-container > .avatar,
.island-container > .status-container,
.island-container > .cta-button { margin: 0 !important; }

.cta-button { margin: 0 !important; }  /* already no margin, but safe */


/* Fix double gap before CTA on desktop: match link-to-link spacing */
@media (min-width: 1025px) {
  /* Ensure symmetric padding for proper centering */
  fluent-button.cta-button::part(control) {
    padding: 10px 18px;   /* symmetric padding for centered text */
  }

  /* Safety: ensure no extra margins sneak in */
  .dynamic-island .nav-links { margin-right: 0 !important; }
}

@media (min-width: 1025px) {
  /* Ensure proper alignment without negative margins */
  fluent-button.cta-button { margin-left: 0; }
}

/* Collapse CTA entirely on desktop so no space remains */
@media (min-width: 1025px) {
  /* handle both the custom element and the class selector */
  header.dynamic-island .island-container.collapsed fluent-button.cta-button,
  header.dynamic-island .island-container.collapsed .cta-button {
    display: none !important;
  }

  /* make sure spacing only comes from gap, not space-between */
  header.dynamic-island .island-container.collapsed {
    justify-content: flex-start !important;
  }
}

.island-container.collapsed {
  padding: 8px 10px 8px 10px;          /* symmetric L/R when collapsed */
  gap: 10px;                  /* slightly tighter in collapsed */
}

/* Remove the double-gap on desktop collapsed state */
@media (min-width: 1025px) {
  /* When the island is collapsed, drop nav-links from the flex layout */
  header.dynamic-island .island-container.collapsed .nav-links {
    display: none !important;   /* prevents the extra gap slot */
  }

  /* We already hide the CTA on collapsed desktop; keep this to be safe */
  header.dynamic-island .island-container.collapsed .cta-button {
    display: none !important;
  }

  /* Ensure spacing is controlled purely by gap + equal edge padding */
  header.dynamic-island .island-container.collapsed {
    justify-content: flex-start !important;
    gap: 16px !important;           /* avatar ↔ status */
  }
}


/* Dynamic Island Header Styles */
.dynamic-island {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Normal collapsed state (mobile compact pill) */
.island-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-height: 44px;
}

/* Desktop expanded state (full navigation) */
@media (min-width: 1025px) {
  .island-container:not(.collapsed) {
    gap: 60px;
    padding: 8px 10px;
  }
  
  .island-container.collapsed .nav-links,
  .island-container.collapsed .cta-button {
    display: none;
  }
}

/* Mobile expanded state (menu panel) */
@media (max-width: 1024px) {
  .dynamic-island.expanded {
    top: 20px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100vw - 40px);
    max-width: 400px;
  }
  
  .island-container.expanded {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 10px 24px 10px;
    border-radius: 24px;
    min-height: auto;
  }
  
  /* Hide the compact elements when expanded */
  .island-container.expanded .avatar,
  .island-container.expanded .status-container,
  .island-container.expanded .hamburger {
    display: none;
  }
}

@media (max-width: 640px) {
header.dynamic-island .island-container.expanded {
  transform: scale(1.006); /* gentler */
}

}


/* Avatar */
.avatar img {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50%;
  object-fit: cover;
}

/* Status container (Available for work) */
.status-container {
  display: none;
  align-items: center;
  gap: 16px !important;
  font-size: 14px;
  color: #333;
}



.status-container.visible {
  display: flex;
}

.status-dot {
  width: 10px;
  height: 10px;

  background: #219c3e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* Navigation links (desktop) */
.nav-links {
  display: none;
  gap: 36px;
}

@media (min-width: 1025px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  color: #202124;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 0;
  position: relative;
}

/* CTA Button */
.cta-button {
  background: #1a1a1a;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 500;
  cursor: pointer;
  display: none;
}

@media (min-width: 1025px) {
  .cta-button {
    display: block;
  }
}

/* Hamburger (mobile only) */
.hamburger {
  background: #0F6CBD;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
}

@media (min-width: 1025px) {
  .hamburger {
    display: none;
  }
}

/* Mobile Navigation (only visible when expanded) */
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;

}

.mobile-avatar img {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50%;
  object-fit: cover;
}

.mobile-close {
  background: #0F6CBD;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
}

.mobile-nav-link {
  color: #333;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  padding: 16px 0;
  text-align: center;
  border-radius: 12px;
  transition: background-color 0.2s;
}


.mobile-nav-cta {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.mobile-cta-btn {
  width: auto;
  background: #0F6CBD;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* Pulse animation for status dot */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 208, 132, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 208, 132, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 208, 132, 0);
  }
}


@media (max-width: 1024px) {
  #islandContainer { position: relative; }   /* anchor for the overlay */
}

/* Let the page scroll while menu is open */
.mobile-nav { 
  pointer-events: none;          /* swipes go to the page */
}

/* But keep interactive items clickable */
.mobile-nav a,
.mobile-cta-btn,
.mobile-close,
.mobile-avatar {
  pointer-events: auto;
}

.nav-actions {
  display: flex;
  gap: 24px;              /* same as nav-links gap */
}

@media (min-width: 1025px) {
  .nav-actions {
    margin-left: auto;    /* push links+button block to right */
  }
}

fluent-button.cta-button::part(control) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-weight: 600;
  border-radius: 9999px;
}


/* Ensure CTA button centers like the nav links */
.nav-links {
  display: flex;
  align-items: center; /* ✅ vertical centering for all children */
  gap: 28px;
}

/* Make the Fluent button behave like a nav item */
/* Make the Fluent button behave like a nav item */
.nav-links .cta-button {
  display: flex;            /* act like the anchors */
  align-items: center;      /* center its inner content */
  justify-content: center;  /* center horizontally */
  line-height: 1;           /* remove extra inline height */
  margin: 0;                /* kill stray margins */
}

/* Style the actual Fluent control inside */
/* Style the actual Fluent control inside */
.nav-links .cta-button::part(control) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;       /* symmetric padding */
  min-height: 40px;         /* match header height */
  border-radius: 9999px;
  text-align: center;       /* ensure text is centered */
  margin: 0 auto;           /* center the control itself */
}


/* Active link highlight for the mobile island menu */
.mobile-nav-link[aria-current="page"] {
  color: #0F6CBD !important; /* brand blue */
  font-weight: 600;
}


/* Instantly apply header state (used when snapping open near the top) */
.dynamic-island .island-container.no-anim {
  transition: none !important;
}

/* wherever your header transitions are defined */
/* .dynamic-island,
.island-container {
  transition: var(--header-transition, all .24s ease);
} */

.island-container {
  transition:
    width         var(--island-duration) var(--island-ease),
    padding       var(--island-duration) var(--island-ease),
    gap           calc(var(--island-duration) - 80ms) var(--island-ease),
    border-radius calc(var(--island-duration) - 80ms) var(--island-ease),
    background    calc(var(--island-duration) - 120ms) var(--island-ease),
    transform     360ms var(--island-ease),
    opacity       360ms var(--island-ease);
  will-change: transform, opacity, width, padding;
}



/* when JS wants zero animation for one frame */
.no-anim,
.no-anim .dynamic-island {
  transition: none !important;
}

/* ==== Dynamic Island: unified timing + smooth show/hide (END OF FILE) ==== */

/* iOS-like curves & selectable durations */
:root {
  --island-duration: 560ms; /* slower + smoother */
  --island-ease: cubic-bezier(.22,.61,.36,1); /* iOS-ish */
}

/* Optional live timing presets you can toggle on <html> for testing */
html.island-quick  { --island-duration: 320ms; }
html.island-medium { --island-duration: 420ms; }  /* default */
html.island-slow   { --island-duration: 520ms; }

/* Core animations (container + header shell) */
.dynamic-island {
  transition:
    transform var(--island-duration) var(--island-ease),
    opacity   var(--island-duration) var(--island-ease),
    top       var(--island-duration) var(--island-ease);
}

.island-container {
  transition:
    padding       var(--island-duration) var(--island-ease),
    gap           var(--island-duration) var(--island-ease),
    border-radius var(--island-duration) var(--island-ease),
    background    var(--island-duration) var(--island-ease),
    opacity       var(--island-duration) var(--island-ease),
    transform     var(--island-duration) var(--island-ease);
  will-change: transform, opacity;
}

/* Smoothly hide/show desktop nav & CTA instead of display:none snaps */
.nav-links {
  transition:
    opacity   var(--island-duration) var(--island-ease),
    transform var(--island-duration) var(--island-ease),
    width     var(--island-duration) var(--island-ease);
}

/* already exists above; ensure final override is consistent */
.nav-links.hidden {
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  pointer-events: none;
  width: 0;
  gap: 0;
  overflow: hidden;
}

/* CTA hidden state to avoid layout jump on desktop */
fluent-button.cta-button.hidden,
.cta-button.hidden {
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  pointer-events: none;
  width: 0;
  /* keep the flex item from reserving space */
  margin: 0 !important;
  transition:
    opacity   var(--island-duration) var(--island-ease),
    transform var(--island-duration) var(--island-ease),
    width     var(--island-duration) var(--island-ease);
}

/* Status pill also fades in/out smoothly */
.status-container {
  transition:
    opacity   var(--island-duration) var(--island-ease),
    transform var(--island-duration) var(--island-ease);
}

/* One-frame “no animation” escape hatch (used when snapped to top) */
.dynamic-island.no-anim,
.island-container.no-anim,
.nav-links.no-anim,
.cta-button.no-anim,
.status-container.no-anim {
  transition: none !important;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .dynamic-island, .island-container, .nav-links, .cta-button, .status-container {
    transition: none !important;
  }
}


/* =========================
   iPhone-like Island morph
   (mobile only; desktop unaffected)
   ========================= */
@media (max-width: 1024px) {
  /* Starting capsule (your current look) already exists.
     We add a morph that uses clip-path and border-radius. */

  /* 1) While opening: reveal with a circular clip growing from the X/hamburger corner */
  #islandContainer.opening {
    position: relative;
  }

  /* The reveal mask (pure CSS, no extra DOM) */
  #islandContainer.opening::after {
    content: "";
    position: absolute;
    inset: -24px;                          /* give the mask breathing room */
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(15,108,189,0.12);
    border-radius: 28px;
    z-index: 5;
    pointer-events: none;
    /* Start as a small circle near the top-right (where the X button sits) */
    clip-path: circle(0.001px at 92% 12%);
  transition: clip-path var(--island-duration) var(--island-ease);
  }

  /* When we switch to .expanded, the mask grows to cover the full panel
     (then we remove it via JS after the first transitionend). */
  #islandContainer.opening.expanded::after {
    /* big enough to cover entire container */
    clip-path: circle(1400px at 50% 20%);
  }

  /* 2) The container morph: pill ➜ panel (size, radius, blur & glass) */
  #islandContainer {
    transform: translateZ(0); /* perf */
    will-change: width, padding, border-radius, background, transform;
  }

  /* default mobile compact state already defined; we enhance transitions */
  #islandContainer,
  #islandContainer.expanded {
    transition:
      width var(--island-duration,320ms) var(--island-ease,.22,.61,.36,1),
      padding var(--island-duration,320ms) var(--island-ease,.22,.61,.36,1),
      border-radius var(--island-duration,320ms) var(--island-ease,.22,.61,.36,1),
      background var(--island-duration,320ms) var(--island-ease,.22,.61,.36,1),
      transform var(--island-duration,320ms) var(--island-ease,.22,.61,.36,1);
  }

  /* Final expanded panel look (width is already in your CSS; we unify corners) */
  #islandContainer.expanded {
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(15, 108, 189, 0.12);
    /* box-shadow:
      0 20px 20px rgba(0,0,0,.12),
      0 2px 4px rgba(0,0,0,.04); */
  }

  /* 3) Stagger content: links fade/slide after the morph finishes */
#islandContainer .mobile-nav {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity   calc(var(--island-duration) - 160ms) var(--island-ease),
    transform calc(var(--island-duration) - 160ms) var(--island-ease);
  transition-delay: 200ms; /* starts after the morph begins */
}

  #islandContainer.expanded .mobile-nav {
    opacity: 1;
    transform: translateY(0);
  }

  /* Keep the close (X) & avatar visible above the reveal mask */
  #islandContainer .mobile-close,
  #islandContainer .mobile-avatar {
    position: relative;
    z-index: 6;
  }
}


@media (max-width: 640px) {
  :root {
    --island-w-collapsed: 80vw;
    --island-w-expanded: 70vw;
  }

  header.dynamic-island .island-container {
    width: var(--island-w-collapsed);
  }
  header.dynamic-island .island-container.expanded {
    width: var(--island-w-expanded);
  }
}

/* --- iPhone-style smooth morph --- */
.island-container {
  transition: all 0.35s cubic-bezier(.22,.61,.36,1);
}

.island-container.opening,
.island-container.expanded {
  height: auto;
  padding: 10px 12px 24px;
  border-radius: 24px;
  backdrop-filter: blur(20px);
  transform: scale(1.02);
}

.island-container.closing {
  transition: all 0.35s cubic-bezier(.22,.61,.36,1);
  transform: scale(0.95);
  opacity: 0;
}



/* === Smooth Bottom Sheet (final overrides) === */
:root{
  --sheet-open: 720ms;                        /* slower open */
  --sheet-close: 380ms;                       /* a bit faster close */
  --sheet-ease-out: cubic-bezier(.16,1,.3,1); /* iOS-y decel */
  --sheet-ease-in:  cubic-bezier(.7,0,.84,0); /* quick tuck */
}

/* Overlay */
.bottom-sheet-overlay{
  opacity: 0; visibility: hidden;
  transition:
    opacity   var(--sheet-close) var(--sheet-ease-in),
    visibility 0s linear var(--sheet-close);
}
.bottom-sheet-overlay.active{
  opacity: 1; visibility: visible;
  transition:
    opacity   var(--sheet-open) var(--sheet-ease-out),
    visibility 0s;
}

/* Sheet: translate only (GPU), no height/auto jank */
.bottom-sheet{
  transform: translateY(100%) scale(.985);
  backface-visibility: hidden;
  will-change: transform;
  transition:
    transform     var(--sheet-close) var(--sheet-ease-in),
    box-shadow    var(--sheet-close) var(--sheet-ease-in),
    border-radius var(--sheet-close) var(--sheet-ease-in);
}

/* One-frame priming state to prevent “snap open” */
.bottom-sheet.is-priming{ transition: none !important; transform: translateY(100%) scale(.985); }

/* Actual open */
.bottom-sheet.active{
  transform: translateY(0) scale(1);
  transition:
    transform     var(--sheet-open) var(--sheet-ease-out),
    box-shadow    var(--sheet-open) var(--sheet-ease-out),
    border-radius var(--sheet-open) var(--sheet-ease-out);
}

/* Progressive content reveal */
.sheet-nav-link,
.sheet-cta{
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity   calc(var(--sheet-open) - 140ms) var(--sheet-ease-out),
    transform calc(var(--sheet-open) - 140ms) var(--sheet-ease-out);
}

.bottom-sheet.active .sheet-nav-link{ opacity:1; transform:none; }
.bottom-sheet.active .sheet-nav-link:nth-child(1){ transition-delay: 90ms; }
.bottom-sheet.active .sheet-nav-link:nth-child(2){ transition-delay: 130ms; }
.bottom-sheet.active .sheet-nav-link:nth-child(3){ transition-delay: 170ms; }
.bottom-sheet.active .sheet-nav-link:nth-child(4){ transition-delay: 210ms; }
.bottom-sheet.active .sheet-nav-link:nth-child(5){ transition-delay: 250ms; }

.bottom-sheet.active .sheet-cta{
  opacity: 1; transform:none; transition-delay: 280ms;
}

/* First-frame smoothing (Safari/Chromium) */
@starting-style{
  .bottom-sheet.active{ transform: translateY(100%) scale(.985); }
  .bottom-sheet-overlay.active{ opacity: 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .bottom-sheet,
  .bottom-sheet-overlay,
  .sheet-nav-link,
  .sheet-cta{ transition: none !important; }
}
/* ==== Ultra-smooth Bottom Sheet (menu + button) ==================== */
:root{
  --sheet-open: 720ms;                       /* slower, silky open   */
  --sheet-close: 360ms;                      /* slightly faster close */
  --sheet-ease-out: cubic-bezier(.16,1,.3,1);/* iOS-like decel       */
  --sheet-ease-in:  cubic-bezier(.7,0,.84,0);/* quick tuck-away      */
}

/* Overlay fades smoothly */
.bottom-sheet-overlay{
  opacity: 0; visibility: hidden;
  transition:
    opacity   var(--sheet-close) var(--sheet-ease-in),
    visibility 0s linear var(--sheet-close);
}

.bottom-sheet-overlay.active{
  opacity: 1; visibility: visible;
  transition:
    opacity   var(--sheet-open) var(--sheet-ease-out),
    visibility 0s;
}

/* Sheet: gentle lift + tiny scale for plush feel */
.bottom-sheet{
  transform: translateY(100%) scale(.98);
  transition:
    transform     var(--sheet-close) var(--sheet-ease-in),
    border-radius var(--sheet-close) var(--sheet-ease-in),
    box-shadow    var(--sheet-close) var(--sheet-ease-in);
  will-change: transform;
}

.bottom-sheet.active{
  transform: translateY(0) scale(1);
  transition:
    transform     var(--sheet-open) var(--sheet-ease-out),
    border-radius var(--sheet-open) var(--sheet-ease-out),
    box-shadow    var(--sheet-open) var(--sheet-ease-out);
}

/* First frame smoothing (where supported) */
@starting-style{
  .bottom-sheet.active{ transform: translateY(100%) scale(.98); }
  .bottom-sheet-overlay.active{ opacity: 0; }
}

/* --- Content reveal (menu links + CTA) ---------------------------- */
/* Start slightly below with fade */
.sheet-nav-link,
.sheet-cta{
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity   calc(var(--sheet-open) - 160ms) var(--sheet-ease-out),
    transform calc(var(--sheet-open) - 160ms) var(--sheet-ease-out);
}

/* Stagger menu items for a smooth cascade */
.bottom-sheet.active .sheet-nav-link{ opacity: 1; transform: translateY(0); }
.bottom-sheet.active .sheet-nav-link:nth-child(1){ transition-delay: 100ms; }
.bottom-sheet.active .sheet-nav-link:nth-child(2){ transition-delay: 140ms; }
.bottom-sheet.active .sheet-nav-link:nth-child(3){ transition-delay: 180ms; }
.bottom-sheet.active .sheet-nav-link:nth-child(4){ transition-delay: 220ms; }
.bottom-sheet.active .sheet-nav-link:nth-child(5){ transition-delay: 260ms; }

/* Button comes in last, a touch slower for emphasis */
.bottom-sheet.active .sheet-cta{
  opacity: 1; transform: translateY(0);
  transition-delay: 280ms;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .bottom-sheet,
  .bottom-sheet-overlay,
  .sheet-nav-link,
  .sheet-cta{ transition: none !important; }
}


/* Prevent layout jumps during close — keep size stable */
.island-container.freezing {
  /* keep the measured width/height we set inline */
  overflow: hidden;              /* avoids content popping out */
}

/* Close animation (already present, keep it simple & GPU-friendly) */
.island-container.closing {
  transform: scale(0.97);
  opacity: 0;
  transition: transform 360ms cubic-bezier(.22,.61,.36,1),
              opacity   360ms cubic-bezier(.22,.61,.36,1);
}


/* === iPhone-like scrolling: essential momentum =============================== */
html {
  /* iOS-style smooth scroll timing */
  scroll-behavior: smooth;
  /* Prevent layout shift when scrollbars appear/disappear */
  scrollbar-gutter: stable both-edges;
  /* Essential for momentum scrolling */
  -webkit-overflow-scrolling: touch;
}

/* Core momentum physics */
html, body, #main {
  -webkit-overflow-scrolling: touch;
}

/* Dynamic viewport units */
:root {
  --vh: 100vh;
  --vh: 100dvh;
  --vh: 100svh;
}

.full-viewport {
  min-height: var(--vh);
}

/* Natural bounce on iOS */
html, body {
  overscroll-behavior-y: auto;
  overscroll-behavior-x: none;
}

/* Contained scrolling for overlays */
.mobile-nav,
dialog[open] {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Touch polish */
* { 
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}


