/*
  bnfldt — style.css
  ─────────────────────────────────────────────────────────────────────────────
  1.  Custom properties
  2.  Reset & base
  3.  Utilities
  4.  Site logo (fixed, JS-animated)
  5.  Site header (glass bg + nav only)
  6.  Hero section
  7.  Container & section base
  8.  Services section
  9.  Thinking section
  10. CTA section
  11. Site footer
  12. Contact page
  13. Keyframe animations
  14. Reduced motion
  15. Print
*/


/* ─── 1. Custom properties ─────────────────────────────────────────────────── */

:root {
  color-scheme: dark;

  /* Brand palette */
  --brand-dark:  #1D1D1D;
  --brand-smoke: #E7EDEB;
  --brand-bone:  #FCFAF8;

  /* Theme tokens — dark default */
  --color-bg:           #0a0a0a;
  --color-bg-section:   #0e0e0e;
  --color-bg-elevated:  #141414;
  --color-canvas-bg:    #0a0a0a;
  --color-text:         #E7EDEB;
  --color-text-muted:   rgba(231, 237, 235, 0.65);
  --color-text-faint:   rgba(231, 237, 235, 0.44);
  --color-border:       rgba(231, 237, 235, 0.08);
  --color-border-hover: rgba(231, 237, 235, 0.22);
  --color-header-bg:    rgba(10, 10, 10, 0.78);
  --color-footer-bg:    #080808;

  /* Typography */
  --font-display: 'Hubot Sans', sans-serif;
  --font-body:    'Geist', sans-serif;

  /* Spacing */
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;
  --space-2xl: 12rem;

  /* Easing */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);

  /* Header dimensions — used by JS for logo landing position */
  --header-pad-x: 2.5rem;   /* 40px at 16px base */
  --header-pad-y: 1.25rem;  /* 20px at 16px base */
}

/* Light mode override — dark is the primary theme */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light dark;
    --color-bg:           #FCFAF8;
    --color-bg-section:   #F4F2F0;
    --color-bg-elevated:  #FFFFFF;
    --color-canvas-bg:    #FCFAF8;
    --color-text:         #1D1D1D;
    --color-text-muted:   rgba(29, 29, 29, 0.68);
    --color-text-faint:   rgba(29, 29, 29, 0.48);
    --color-border:       rgba(29, 29, 29, 0.10);
    --color-border-hover: rgba(29, 29, 29, 0.30);
    --color-header-bg:    rgba(252, 250, 248, 0.88);
    --color-footer-bg:    #ECEAE6;
  }
}

/* Manual theme overrides — set via data-theme attribute on <html> */
/* These beat the media query via higher specificity (attribute selector) */
html[data-theme="dark"] {
  color-scheme: dark;
  --color-bg:           #0a0a0a;
  --color-bg-section:   #0e0e0e;
  --color-bg-elevated:  #141414;
  --color-canvas-bg:    #0a0a0a;
  --color-text:         #E7EDEB;
  --color-text-muted:   rgba(231, 237, 235, 0.65);
  --color-text-faint:   rgba(231, 237, 235, 0.44);
  --color-border:       rgba(231, 237, 235, 0.08);
  --color-border-hover: rgba(231, 237, 235, 0.22);
  --color-header-bg:    rgba(10, 10, 10, 0.78);
  --color-footer-bg:    #080808;
}

html[data-theme="light"] {
  color-scheme: light dark;
  --color-bg:           #FCFAF8;
  --color-bg-section:   #F4F2F0;
  --color-bg-elevated:  #FFFFFF;
  --color-canvas-bg:    #FCFAF8;
  --color-text:         #1D1D1D;
  --color-text-muted:   rgba(29, 29, 29, 0.68);
  --color-text-faint:   rgba(29, 29, 29, 0.48);
  --color-border:       rgba(29, 29, 29, 0.10);
  --color-border-hover: rgba(29, 29, 29, 0.30);
  --color-header-bg:    rgba(252, 250, 248, 0.88);
  --color-footer-bg:    #ECEAE6;
}


/* ─── 2. Reset & base ──────────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: #E7EDEB;
  color: #1D1D1D;
}

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

ul { list-style: none; }
a  { color: inherit; text-decoration: none; }


/* ─── 3. Utilities ─────────────────────────────────────────────────────────── */

/* Visually hidden — for screen readers / SEO h1 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--color-text);
  color: var(--color-bg);
  font-size: 0.85rem;
  font-family: var(--font-body);
  border-radius: 0 0 4px 4px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; outline: none; }


/* ─── 4. Site logo — fixed, CSS-transition animated ───────────────────────── */
/*
  Always position:fixed anchored at left:0; top:0.
  JS measures both states once (after fonts load) and injects a <style> block
  with the computed translate/scale values. A CSS class toggle then triggers
  the transition — which runs entirely on the GPU compositor (no JS per frame).

  Font-size is set once as an inline style (never changes during animation).
  Only `transform` and `opacity` are transitioned — zero layout cost.
*/

.site-logo {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 200;
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1;
  white-space: nowrap;             /* keep jacob beenfeldt on one line */
  color: var(--color-text);
  text-decoration: none;
  user-select: none;
  pointer-events: none;
  transform-origin: 0 0;           /* scale from top-left corner */
  will-change: transform, opacity; /* promote to compositor layer */

  opacity: 0;
  /* Initial + scrolled transforms are injected by JS */
  transition:
    transform 0.82s cubic-bezier(0.16, 1, 0.3, 1),
    opacity   0.7s  ease 0.15s;
}

.logo-first,
.logo-last {
  display: inline; /* single line in hero; beenfeldt fades on scroll */
}

.logo-last {
  transition: opacity 0.55s ease;
}

.site-logo.logo-ready    { opacity: 1; }
.site-logo.logo-scrolled { pointer-events: auto; }

.site-logo.logo-scrolled .logo-last {
  opacity: 0;
}

.site-logo:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 4px;
}


/* ─── 4b. Header social icons — fixed, revealed on second scroll ──────────── */
/*
  Lives as a direct <body> child (like mobile-sheet) so backdrop-filter on
  .site-header doesn't trap it. JS positions left/top from measured logo data.
  Hidden until body.icons-visible; 0.6s delay lets the logo morph finish first.
*/

.header-social {
  position: fixed;
  z-index: 201;          /* above .site-logo (200) */
  display: flex;
  align-items: center;
  gap: 0.55rem;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-5px);
  /* Quick fade-out when hiding (no delay) */
  transition:
    opacity   0.2s ease,
    transform 0.2s ease;
}

/* Show state — 0.6s delay so logo finishes its 0.82s morph before icons appear */
.header-social.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  transition:
    opacity   0.4s ease                          0.6s,
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.6s;
}

.header-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  color: var(--color-text-faint);
  transition: color 0.2s ease, transform 0.2s ease;
}

.header-social a:hover {
  color: var(--color-text);
  transform: scale(1.2);
}

.header-social a:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
  border-radius: 2px;
}

.header-social a svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Mail pill — overrides the icon link sizing */
.header-social .mail-pill {
  width: auto;
  height: auto;
  padding: 0.18rem 0.6rem;
  border: 1px solid var(--color-border-hover);
  border-radius: 2rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  line-height: 1;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.header-social .mail-pill:hover {
  color: var(--color-text);
  transform: none;
  border-color: var(--color-border-hover);
}

/* Stagger: icons appear sequentially after LinkedIn */
.header-social.is-visible a:nth-child(1) {
  transition: color 0.2s ease, transform 0.2s ease, opacity 0.35s ease 0.6s;
}
.header-social.is-visible a:nth-child(2) {
  transition: color 0.2s ease, transform 0.2s ease, opacity 0.35s ease 0.68s;
}
.header-social.is-visible a:nth-child(3) {
  transition: color 0.2s ease, transform 0.2s ease, opacity 0.35s ease 0.76s;
}

/* Hide on mobile — icons live in the burger sheet instead */
@media (max-width: 768px) {
  .header-social { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .header-social { transition: none; }
  .header-social.is-visible { transition: none; }
  .header-social.is-visible a:nth-child(1),
  .header-social.is-visible a:nth-child(2),
  .header-social.is-visible a:nth-child(3) { transition: color 0.2s ease, transform 0.2s ease; }
}


/* ─── 5. Site header — glass + nav only ───────────────────────────────────── */
/*
  No logo in the DOM — .site-logo floats over the left side.
  All state changes driven by body.site-scrolled class (toggled by JS).
*/

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: var(--header-pad-y) var(--header-pad-x);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  background: var(--color-header-bg);
  border-bottom: 1px solid var(--color-border);

  opacity: 0;
  pointer-events: none;
  /* No delay when hiding (reverse scroll) */
  transition: opacity 0.4s var(--ease-out-expo);
}

/* Appear after logo is halfway to the header */
body.site-scrolled .site-header {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.4s var(--ease-out-expo) 0.28s;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  position: relative; /* anchor for mobile dropdown */
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Nav fades in after the glass panel settles */
body.site-scrolled .header-nav {
  opacity: 1;
  transition: opacity 0.3s ease 0.55s;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2rem;
}

.nav-links li {
  display: flex;
  align-items: center;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Burger — hidden on desktop */
.nav-burger {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 3.25rem;
  height: 1.625rem;
  padding: 0;
  background: none;
  border: 1px solid var(--color-border-hover);
  border-radius: 100px;
  cursor: pointer;
  color: var(--color-text);
  transition: border-color 0.25s ease;
  flex-shrink: 0;
}
.nav-burger:hover         { border-color: var(--color-text-muted); }
.nav-burger:focus-visible { outline: 2px solid var(--color-text); outline-offset: 3px; }

.burger-bar {
  display: block;
  width: 16px;
  height: 1px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s var(--ease-out-expo), opacity 0.2s ease;
  transform-origin: center;
}
.nav-burger[aria-expanded="true"] .burger-bar:nth-child(1) { transform: translateY(3px)  rotate(45deg);  }
.nav-burger[aria-expanded="true"] .burger-bar:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }


/* ── Mobile nav — bottom sheet ── */

/*
  .nav-links lives inside .site-header which has backdrop-filter.
  backdrop-filter creates a new containing block, trapping position:fixed children.
  So on mobile we hide .nav-links and use .mobile-sheet (a direct <body> child) instead.
*/
.mobile-sheet {
  display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
  /* Hide desktop inline links */
  .nav-links { display: none; }
  .nav-webdev { display: none; }

  /* Show burger */
  .nav-burger { display: flex; }

  /* CV pill — match theme toggle dimensions */
  .nav-cta {
    width: 3.25rem;
    height: 1.625rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  /* Bottom sheet — direct <body> child, free from any stacking context */
  .mobile-sheet {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    padding: 1rem var(--header-pad-x) calc(1.75rem + env(safe-area-inset-bottom, 0px));
    background: var(--color-header-bg);
    backdrop-filter: blur(28px) saturate(1.8);
    -webkit-backdrop-filter: blur(28px) saturate(1.8);
    border-top: 1px solid var(--color-border);
    /* hidden — below viewport */
    transform: translateY(100%);
    visibility: hidden;
    pointer-events: none;
    /* visibility delays until after the closing transform completes */
    transition: transform 0.4s var(--ease-out-expo), visibility 0s 0.4s;
  }

  .mobile-sheet.is-open {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    /* visibility turns on immediately when opening */
    transition: transform 0.4s var(--ease-out-expo), visibility 0s 0s;
  }

  /* drag handle pip */
  .mobile-sheet::before {
    content: '';
    display: block;
    width: 2rem;
    height: 3px;
    border-radius: 2px;
    background: var(--color-border-hover);
    margin: 0 auto 1.25rem;
    flex-shrink: 0;
  }

  .mobile-sheet ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .mobile-sheet li { display: block; }

  .mobile-sheet ul a {
    display: block;
    padding: 1rem 0;
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-muted);
    transition: color 0.2s ease;
  }
  .mobile-sheet ul a:hover          { color: var(--color-text); }
  .mobile-sheet li:last-child a     { border-bottom: none; }

  /* Social icons row at the bottom of the sheet */
  .sheet-social {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
  }

  .sheet-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: var(--color-text-faint);
    transition: color 0.2s ease, transform 0.2s ease;
  }
  .sheet-social a:hover {
    color: var(--color-text);
    transform: scale(1.15);
  }
  .sheet-social a:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 3px;
    border-radius: 2px;
  }
  .sheet-social a svg {
    width: 100%;
    height: 100%;
    display: block;
  }

  /* Mail pill in mobile sheet — pushed to the right */
  .sheet-social .mail-pill {
    margin-left: auto;
    width: auto;
    height: auto;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--color-border-hover);
    border-radius: 2rem;
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.07em;
    color: var(--color-text-muted);
    line-height: 1;
    transition: color 0.2s ease, border-color 0.2s ease;
  }
  .sheet-social .mail-pill:hover {
    color: var(--color-text);
    transform: none;
  }
}

.header-nav a {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}
.header-nav a:hover            { color: var(--color-text); }
.header-nav a[aria-current="page"] { color: var(--color-text); }

.nav-cta {
  padding: 0.4rem 1.1rem;
  border: 1px solid var(--color-border-hover);
  border-radius: 2rem;
  color: var(--color-text) !important;
  transition: background 0.25s ease, border-color 0.25s ease !important;
}
.nav-cta:hover {
  background: rgba(231, 237, 235, 0.07);
  border-color: rgba(231, 237, 235, 0.4) !important;
}

/* Theme toggle — pill switch */
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 3.25rem;    /* 52px */
  height: 1.625rem;  /* 26px */
  border-radius: 100px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  border: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
/* Dark state */
.theme-toggle[aria-checked="false"],
.theme-toggle:not([aria-checked]) {
  background: #111;
  border-color: rgba(231, 237, 235, 0.12);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.04);
}
/* Light state */
.theme-toggle[aria-checked="true"] {
  background: #e7edeb;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(255,255,255,0.8);
}
/* Thumb */
.tt-thumb {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  left: 3px;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.3s ease,
              box-shadow 0.2s ease;
}
.theme-toggle[aria-checked="false"] .tt-thumb,
.theme-toggle:not([aria-checked]) .tt-thumb {
  background: #e7edeb;
  left: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.55), 0 0 0 0.5px rgba(0,0,0,0.15);
}
.theme-toggle[aria-checked="true"] .tt-thumb {
  background: #1a1a1a;
  left: calc(100% - 23px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25), 0 0 0 0.5px rgba(0,0,0,0.08);
}
/* Icons */
.tt-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.tt-moon { right: 6px; }
.tt-sun  { left: 6px; }
.theme-toggle[aria-checked="false"] .tt-moon,
.theme-toggle:not([aria-checked]) .tt-moon { opacity: 0.65; color: #e7edeb; }
.theme-toggle[aria-checked="false"] .tt-sun,
.theme-toggle:not([aria-checked]) .tt-sun  { opacity: 0; }
.theme-toggle[aria-checked="true"]  .tt-moon { opacity: 0; }
.theme-toggle[aria-checked="true"]  .tt-sun  { opacity: 0.65; color: #1a1a1a; }
.tt-icon svg { width: 100%; height: 100%; display: block; }
/* States */
.theme-toggle:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle, .tt-thumb, .burger-bar, .mobile-sheet { transition: none; }
}


/* ─── 6. Hero section ──────────────────────────────────────────────────────── */

.hero {
  position: relative;
  width: 100%;
  height: calc(100vh + 180px);
  min-height: 780px;
  display: flex;
  align-items: flex-start;   /* content anchors to top; space below for card */
  justify-content: center;
  overflow: hidden;
  background: var(--color-bg);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Grain texture overlay */
.hero-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
  opacity: 0.045;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* Fade into next section */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--color-bg));
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  margin-top: clamp(5rem, 18vh, 11rem); /* push below header, leave room for card */
}

/*
  Ghost placeholder — invisible text clone of .site-logo at full hero size.
  Occupies the same footprint as the real fixed logo so the tagline lines up
  naturally below it. Never shown visually, never read by screen readers.
*/
.hero-logo-ghost {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.5rem, 13vw, 8rem);
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.hero-logo-ghost span {
  display: inline;
}

.hero-tagline {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.72rem, 1.1vw, 0.88rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  opacity: 0;
  transition: opacity 0.7s ease 0.35s; /* delayed appear — matches logo/photo entry */
}

.hero-tagline.tagline-ready {
  opacity: 1;
}

body.site-scrolled .hero-tagline {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease; /* fast exit, no delay */
}

/*
  Hero photo ghost — invisible placeholder that holds the same footprint as
  #site-photo (128px circle) so hero-content spacing is preserved.
*/
.hero-photo-ghost {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  visibility: hidden;
  pointer-events: none;
  user-select: none;
  flex-shrink: 0;
}

/*
  #site-photo — fixed element, same pattern as .site-logo.
  Always position:fixed anchored at left:0; top:0; transform-origin:0 0.
  JS measures the ghost (hero state) and card avatar (landed state),
  injects a <style> block with the computed translate/scale values.
  Only transform and opacity are transitioned — compositor-only, 60fps.
*/
.site-photo {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 150;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--color-border);
  transform-origin: 0 0;
  will-change: transform, opacity;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transition:
    transform 0.82s cubic-bezier(0.16, 1, 0.3, 1),
    opacity   0.7s  ease 0.15s;
}
.site-photo.photo-ready { opacity: 1; }
/* .photo-scrolled transform injected by JS */

@media (prefers-reduced-motion: reduce) {
  .site-photo { transition: none; }
  .site-photo.photo-ready { opacity: 1 !important; }
}

/* Scroll indicator */
.scroll-indicator {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  opacity: 0;
  animation: fadeIn 0.6s ease 1s forwards;
  transition: opacity 0.4s ease;
}

body.site-scrolled .scroll-indicator {
  opacity: 0 !important;
  transition: opacity 0.4s ease;
}

.scroll-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text);
  opacity: 0.7;
}

.scroll-indicator svg {
  color: var(--color-text);
  opacity: 0.7;
  animation: scrollBounce 1.8s ease-in-out infinite;
}


/* ─── 7. Container & section base ─────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

.section-label {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
}


/* ─── 8. Profile card overlay — fixed, direct <body> child ────────────────── */
/*
  Appears simultaneously with the logo morph on first scroll.
  Must be a direct <body> child — same reason as .mobile-sheet and .header-social
  (backdrop-filter on .site-header would trap position:fixed children).
*/

.profile-card-overlay {
  position: fixed;
  z-index: 90;  /* below header (100) so card scrolls behind it */
  /* left, top, and translateX(-50%) set dynamically by JS based on photo position */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease-out-expo) 0.15s;
}

.profile-card-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Card locked — settles into place, subtle shadow deepens */
.profile-card-overlay.is-locked .profile-card {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.28),
    0 2px 8px  rgba(0, 0, 0, 0.18);
  transition: box-shadow 0.5s var(--ease-out-expo);
}

.profile-card {
  position: relative;
  width: 340px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 1.5rem;
  overflow: visible;
  cursor: default;
  transition:
    box-shadow 0.35s ease;
  will-change: transform;
}

/* Radial glow on hover */
.profile-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(231, 237, 235, 0.06) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}
.profile-card:hover::before { opacity: 1; }

.profile-card-inner {
  position: relative;
  z-index: 1;
  padding: 2rem 1.75rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
}

.profile-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
  transition: transform 0.4s var(--ease-out-expo);
}
.profile-card:hover .profile-avatar { transform: scale(1.04); }

/* Initially hidden — #site-photo covers the slot while morphing.
   JS sets opacity:1 after the flying photo lands (~860ms). */
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.profile-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--color-text);
  line-height: 1.1;
  margin: 0;
}

.profile-badge {
  display: inline-block;
  padding: 0.22rem 0.75rem;
  border: 1px solid var(--color-border-hover);
  border-radius: 2rem;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.profile-location {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--color-text-faint);
}

.profile-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.profile-skill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--color-border-hover);
  border-radius: 2rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.profile-skill:hover {
  color: var(--color-text-muted);
  border-color: var(--color-border-hover);
}

.profile-skill-btn {
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.profile-skill-btn::after {
  content: '+';
  margin-left: 0.3em;
  font-size: 0.9em;
  opacity: 0.5;
  display: inline-block;
  transition: transform 0.25s var(--ease-out-expo), opacity 0.2s ease;
}

.profile-skill-btn[aria-expanded="true"]::after {
  transform: rotate(45deg);
  opacity: 0.8;
}

.profile-skill-btn:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

/* Competency pills — direct child of .profile-card */
/* Desktop: absolute to the left. Mobile: static flow inside card. */
.competency-pills {
  position: absolute;
  top: 1.5rem;
  right: calc(100% + 1rem);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  width: max-content;
  pointer-events: none;
}

.competency-pill {
  padding: 0.22rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 2rem;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.25s ease, transform 0.35s var(--ease-out-expo);
}

.competency-pills.is-open {
  pointer-events: auto;
}

.competency-pills.is-open .competency-pill {
  opacity: 1;
  transform: translateX(0);
}

/* Desktop stagger — pills 2 & 3 are mobile-only (display:none), so skip them */
.competency-pills.is-open .competency-pill:nth-child(1)  { transition-delay: 0.00s; }
.competency-pills.is-open .competency-pill:nth-child(4)  { transition-delay: 0.04s; }
.competency-pills.is-open .competency-pill:nth-child(5)  { transition-delay: 0.08s; }
.competency-pills.is-open .competency-pill:nth-child(6)  { transition-delay: 0.12s; }
.competency-pills.is-open .competency-pill:nth-child(7)  { transition-delay: 0.16s; }
.competency-pills.is-open .competency-pill:nth-child(8)  { transition-delay: 0.20s; }
.competency-pills.is-open .competency-pill:nth-child(9)  { transition-delay: 0.24s; }
.competency-pills.is-open .competency-pill:nth-child(10) { transition-delay: 0.28s; }

/* Desktop/mobile pill visibility split */
.comp-mobile-only { display: none; }

@media (max-width: 768px) {
  .comp-desktop-only { display: none; }
  .comp-mobile-only  { display: inline-flex; }

  .competency-pills {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    align-content: flex-start;
    gap: 0.45rem;
    width: auto;
    /* Collapsed — no space taken */
    max-height: 0;
    overflow: hidden;
    padding: 0 1.75rem;
    pointer-events: none;
    transition: max-height 0.5s var(--ease-out-expo);
  }

  .competency-pills.is-open {
    /* ~4.5 pill rows visible: each row ≈ 29px, 4.5 × 29 = 130px + 1rem top padding */
    max-height: 146px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    padding-top: 1rem;
    padding-bottom: 1rem;
    pointer-events: auto;
  }

  .competency-pills.is-open::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }


  /* Disable per-pill animation on mobile — container handles reveal */
  .competency-pill {
    white-space: normal;
    text-align: center;
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.profile-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  width: 100%;
}

.profile-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text-faint);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.profile-socials a:hover {
  color: var(--color-text);
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
}
.profile-socials a:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}
.profile-socials a svg {
  width: 13px;
  height: 13px;
  display: block;
}

@media (max-width: 480px) {
  .profile-card { width: calc(100vw - 2rem); max-width: 340px; }
}


/* ─── 9. Services section ──────────────────────────────────────────────────── */

.section-services {
  background: var(--color-bg-section);
  padding: var(--space-xl) 0;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--color-border);
}

/* Explicit 2×2 placement: source order col1-row1, col1-row2, col2-row1, col2-row2 */
.highlight-card:nth-child(1) { grid-column: 1; grid-row: 1; }
.highlight-card:nth-child(2) { grid-column: 1; grid-row: 2; }
.highlight-card:nth-child(3) { grid-column: 2; grid-row: 1; }
.highlight-card:nth-child(4) { grid-column: 2; grid-row: 2; }

.highlight-card {
  padding: var(--space-md) var(--space-md) var(--space-md) 0;
}
/* Col 2 cards: left padding, no right padding */
.highlight-card:nth-child(3),
.highlight-card:nth-child(4) {
  padding-left: var(--space-md);
  padding-right: 0;
}
/* Col 1 cards: right border */
.highlight-card:nth-child(1),
.highlight-card:nth-child(2) {
  border-right: 1px solid var(--color-border);
}
/* Row 1 cards: bottom border */
.highlight-card:nth-child(1),
.highlight-card:nth-child(3) {
  border-bottom: 1px solid var(--color-border);
}

.highlight-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 1.25rem;
}

.highlight-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.highlight-bullets li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.highlight-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-text-faint);
}

@media (max-width: 640px) {
  .highlights-grid {
    grid-template-columns: 1fr;
  }
  .highlight-card,
  .highlight-card:nth-child(1),
  .highlight-card:nth-child(2) {
    grid-column: auto !important;
    grid-row: auto !important;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md) 0;
  }
  .highlight-card:nth-child(3),
  .highlight-card:nth-child(4) {
    padding-left: 0;
    padding-right: 0;
  }
  .highlight-card:nth-child(4) {
    border-bottom: none;
  }
}


/* ─── 9. Thinking section ──────────────────────────────────────────────────── */

.section-thinking {
  background: var(--color-bg);
  padding: var(--space-xl) 0;
}

.thinking-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-xl);
  align-items: start;
}

.thinking-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--color-text);
  margin-top: 0.35rem;
}

.thinking-thesis {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.thinking-paras {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: var(--space-lg);
}

.thinking-paras p {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--color-text-muted);
}

/* Principles — 3-column CSS grid aligns all "over" dividers */
.thinking-principles {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: 1.75rem;
  border-top: 1px solid var(--color-border);
  margin-bottom: var(--space-md);
}

.tp-a,
.tp-over,
.tp-b {
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}

.tp-a {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(0.92rem, 1.6vw, 1.15rem);
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.tp-over {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  justify-content: center;
  white-space: nowrap;
}

.tp-b {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(0.92rem, 1.6vw, 1.15rem);
  letter-spacing: -0.02em;
  color: var(--color-text-muted);
}

.thinking-close {
  font-family: var(--font-body);
  font-size: 0.925rem;
  line-height: 1.8;
  color: var(--color-text-faint);
  font-style: italic;
}

@media (max-width: 900px) {
  .thinking-layout {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* On small screens: stack each principle vertically */
@media (max-width: 480px) {
  .thinking-principles {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .tp-a {
    padding-bottom: 0.15rem;
    border-bottom: none;
  }

  .tp-over {
    padding: 0;
    border-bottom: none;
    font-size: 0.58rem;
    justify-content: flex-start;
    color: var(--color-text-faint);
  }

  .tp-b {
    padding-top: 0.15rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
  }
}


/* ─── 10. Career section ──────────────────────────────────────────────────── */

.section-career {
  background: var(--color-bg-section);
  padding: var(--space-xl) 0;
}

.career-list {
  border-top: 1px solid var(--color-border);
}

.career-item {
  border-bottom: 1px solid var(--color-border);
}

/* Accordion trigger — full-width button styled as the row */
.career-trigger {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  background: var(--color-bg-section);
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  color-scheme: inherit;
  border: none;
  cursor: pointer;
  color: inherit;
  text-align: left;
}

.career-trigger:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 4px;
  border-radius: 2px;
}

.career-trigger-main {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-md);
  align-items: start;
}

.career-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0.15rem;
}

.career-period {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.career-company {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.925rem;
  color: var(--color-text-muted);
}

.career-role {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 0.4rem;
  transition: color 0.2s ease;
}

.career-role-sub {
  font-style: normal;
  color: var(--color-text-muted);
  font-size: 0.95em;
}

.career-trigger:hover .career-role { color: var(--color-text); }

@media (prefers-color-scheme: dark) {
  .career-trigger:hover .career-role { color: var(--brand-bone); }
}
html[data-theme="dark"] .career-trigger:hover .career-role { color: var(--brand-bone); }
html[data-theme="light"] .career-trigger:hover .career-role { color: var(--color-text); }

.career-tagline {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text-faint);
  font-style: italic;
}

/* Chevron */
.career-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text-faint);
  flex-shrink: 0;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.career-chevron svg {
  width: 14px;
  height: 14px;
  display: block;
  transition: transform 0.35s var(--ease-out-expo);
}

.career-trigger:hover .career-chevron {
  border-color: var(--color-border-hover);
  color: var(--color-text-muted);
}

.career-trigger[aria-expanded="true"] .career-chevron svg {
  transform: rotate(180deg);
}

/* Accordion body — grid-template-rows for smooth height animation */
.career-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease-out-expo);
}

.career-body.is-open {
  grid-template-rows: 1fr;
}

.career-body-inner {
  overflow: hidden;
  min-height: 0;
  padding-bottom: 0;
  transition: padding-bottom 0.45s var(--ease-out-expo);
}

.career-body.is-open .career-body-inner {
  padding-bottom: var(--space-md);
}

/* Bullet list */
.career-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.career-bullets li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--color-text-muted);
}

.career-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-text-faint);
}

/* Impact label */
.career-impact-label {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 640px) {
  .career-trigger-main {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}


/* ─── 11. CTA section ──────────────────────────────────────────────────────── */

.section-cta {
  background: var(--color-bg-section);
  padding: var(--space-xl) 0 var(--space-2xl);
  text-align: center;
}

.cta-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 5rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

/* Cycling word slot */
.cta-cycle-outer {
  display: block;
  position: relative;
  /* clip-path clips words that are above/below the slot (prevents echo from
     partially-opaque exiting words bleeding into adjacent text lines).
     The large negative left/right insets expand the clip region horizontally
     so italic letter-tails can breathe without being cut. overflow:hidden is
     intentionally NOT used — body{overflow-x:hidden} would clip at the viewport
     edge and cut the last italic character. */
  overflow: visible;
  clip-path: inset(0 -300px);
  height: 1.5em;
  margin-top: 0.15em;
  margin-bottom: 0.15em;
}

.cta-word {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Vertically centre the word so spacing above and below is equal.
     translateY(-50%) pulls it to centre; ±110% slides it in/out. */
  transform: translateX(-50%) translateY(calc(-50% + 110%));
  opacity: 0;
  white-space: nowrap;
  font-style: italic;
  will-change: transform, opacity;
  transition:
    transform 0.58s var(--ease-out-expo),
    opacity   0.42s ease;
}
.cta-word.is-active {
  transform: translateX(-50%) translateY(-50%);
  opacity: 1;
}
.cta-word.is-exiting {
  transform: translateX(-50%) translateY(calc(-50% - 110%));
  opacity: 0;
  transition:
    transform 0.42s var(--ease-in-out),
    opacity   0.12s ease;
}

/* Body copy below heading */
.cta-body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--color-text-muted);
  max-width: 36rem;
  margin: 0 auto var(--space-md);
  line-height: 1.75;
}

/* Action row */
.cta-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.4rem;
  border: 1px solid var(--color-border-hover);
  border-radius: 999px;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.cta-button:hover {
  color: var(--color-text);
  border-color: rgba(231, 237, 235, 0.4);
  background: rgba(231, 237, 235, 0.04);
}
.cta-button:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}
.cta-button:active { background: rgba(231, 237, 235, 0.08); }

.cta-button--filled {
  background: rgba(231, 237, 235, 0.1);
  color: var(--color-text);
  border-color: rgba(231, 237, 235, 0.2);
}
.cta-button--filled:hover {
  background: rgba(231, 237, 235, 0.16);
  border-color: rgba(231, 237, 235, 0.4);
}
.cta-button--filled:active { background: rgba(231, 237, 235, 0.22); }


/* ─── 12. Site footer ──────────────────────────────────────────────────────── */

.site-footer {
  background: var(--color-footer-bg);
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
  transition: opacity 0.2s ease;
}
.footer-logo:hover { opacity: 0.6; }

.footer-nav { display: flex; gap: 0.65rem; flex-wrap: wrap; }

.footer-pill {
  padding: 0.28rem 0.85rem;
  border: 1px solid var(--color-border-hover);
  border-radius: 2rem;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer-pill:hover {
  color: var(--color-text);
  border-color: var(--color-border-hover);
}
.footer-pill:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

.footer-copy {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.75rem;
  color: var(--color-text-faint);
  letter-spacing: 0.03em;
}

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
}

/* Location tag */
.location-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.28rem 0.85rem;
  border: 1px solid var(--color-border-hover);
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  cursor: default;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}
.location-tag:hover {
  border-color: rgba(231, 237, 235, 0.35);
  color: var(--color-text);
  background: rgba(231, 237, 235, 0.04);
}
.location-tag:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

/* Pulse dot */
.lt-pulse {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}
.lt-pulse-dot {
  position: relative;
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  z-index: 1;
}
.lt-pulse-ring {
  position: absolute;
  inset: 0;
  background: #10b981;
  border-radius: 50%;
  opacity: 0.7;
  animation: lt-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Text slide */
.lt-text-wrap {
  position: relative;
  overflow: hidden;
  height: 1.2em;
  min-width: 11rem;
}
.lt-location,
.lt-time {
  display: block;
  white-space: nowrap;
  transition: transform 0.4s var(--ease-out-expo), opacity 0.35s ease;
}
.lt-location {
  transform: translateY(0);
  opacity: 1;
}
.lt-time {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(100%);
  opacity: 0;
}
.location-tag:hover .lt-location {
  transform: translateY(-100%);
  opacity: 0;
}
.location-tag:hover .lt-time {
  transform: translateY(0);
  opacity: 1;
}

/* Arrow */
.lt-arrow {
  flex-shrink: 0;
  opacity: 0.35;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.location-tag:hover .lt-arrow {
  transform: translateX(2px) rotate(-45deg);
  opacity: 0.8;
}

@keyframes lt-ping {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(2.2); opacity: 0;   }
  100% { transform: scale(2.2); opacity: 0;   }
}

@media (prefers-reduced-motion: reduce) {
  .lt-pulse-ring { animation: none; }
  .lt-location, .lt-time, .lt-arrow { transition: none; }
}


/* ─── 12. Keyframe animations ──────────────────────────────────────────────── */

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0);    }
  50%       { transform: translateY(7px); }
}



/* ─── 13. Reduced motion (renumbered from 13 — contact section removed) ────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }

  /* Ensure elements that animate-in are still visible */
  .scroll-indicator { opacity: 0.4 !important; }
  .hero-tagline     { opacity: 1 !important; }
  .site-logo        { opacity: 1 !important; }

  /* CTA cycle — freeze on first word, no slide animation */
  .cta-word { transition: none !important; }

}


/* ─── 14. Print ────────────────────────────────────────────────────────────── */

@media print {
  body { background: #fff; color: #000; }

  .site-header,
  .scroll-indicator,
  .hero-grain,
  .hero-canvas,
  .site-logo { display: none; }

  .hero {
    height: auto;
    background: #fff;
    padding: 2rem 0;
  }

  .cta-button { border-color: #000; color: #000; }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
    color: #666;
  }

  .section-services,
  .section-work,
  .section-cta { break-inside: avoid; }
}
