/* ============================================================
   THEME TOKENS
   ------------------------------------------------------------
   Change the look of the whole site from here.

   >>> TO SWAP THE ACCENT COLOR: edit --accent (and optionally
       --accent-strong for the hover/darker shade). One place,
       everything updates.
   ============================================================ */
:root {
  /* --- Accent (the one knob you most likely want) --- */
  --accent: #3b82f6;          /* primary accent - change this */
  --accent-strong: #2563eb;   /* darker accent for hovers */
  --accent-soft: rgba(59, 130, 246, 0.14); /* translucent accent for glows/tags */

  /* --- Dark theme surface + text colors --- */
  --bg: #0a0c10;              /* page background */
  --bg-alt: #0e1118;          /* alternating section background */
  --surface: #12151d;         /* cards */
  --surface-2: #171b25;       /* raised cards / hover */
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f4f6fb;            /* primary text */
  --text-muted: #aab2c5;      /* secondary text */
  --text-faint: #6b7384;      /* tertiary / labels */

  /* --- Map (Where I've worked) --- */
  --map-land: #313a4f;        /* continents - kept clearly visible on the dark bg */
  --map-land-hover: #3f4a64;  /* land color on hover */

  /* --- Typography --- */
  --font-display: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-body: var(--font-display);

  /* --- Layout / rhythm --- */
  --container: 1080px;
  --radius: 16px;
  --radius-sm: 10px;
  --section-y: clamp(4rem, 9vw, 8rem);
  --nav-h: 64px;

  /* --- Motion --- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Offset anchor jumps so the sticky nav never covers the heading */
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

/* Accessible-but-hidden skip link that appears on focus */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 1rem;
}

/* Visible focus styles for keyboard users */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease),
    border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px -8px var(--accent);
}
.btn--primary:hover {
  background: var(--accent-strong);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--lg {
  padding: 1rem 1.8rem;
  font-size: 1.05rem;
}

/* ============================================================
   STICKY NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(10, 12, 16, 0.7);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
/* .is-scrolled is toggled by script.js once the page is scrolled */
.nav.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 12, 16, 0.85);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.nav__brand-mark {
  color: var(--accent);
  font-weight: 800;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 1.75rem);
}
.nav__links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}
.nav__links a:hover {
  color: var(--text);
}
.nav__cta {
  color: var(--text) !important;
  border: 1px solid var(--border-strong);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
}
.nav__cta:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
}
/* Hide the longer text links on small screens; keep the CTA */
@media (max-width: 600px) {
  .nav__links a:not(.nav__cta) {
    display: none;
  }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(5rem, 14vw, 10rem);
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
}

/* Animated gradient blobs - pure CSS, no images, GPU-friendly */
.hero__bg {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 120%;
  z-index: 0;
  background:
    radial-gradient(40% 50% at 20% 20%, var(--accent-soft), transparent 70%),
    radial-gradient(35% 45% at 85% 15%, rgba(59, 130, 246, 0.1), transparent 70%),
    radial-gradient(45% 55% at 60% 80%, rgba(59, 130, 246, 0.08), transparent 70%);
  filter: blur(10px);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(0, -3%, 0) scale(1.08);
  }
}

.hero__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-strong);
  margin-bottom: 1.75rem;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.hero__title {
  font-size: clamp(2.4rem, 6.5vw, 4.5rem);
  font-weight: 800;
  max-width: 18ch;
}
/* Accent the name within the headline */
.hero__name {
  color: var(--accent);
}
.hero__subline {
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 60ch;
}
/* Hero bullet list with blue accent-dot markers */
.hero__list {
  margin-top: 1.75rem;
  display: grid;
  gap: 0.6rem;
  max-width: 60ch;
}
.hero__list li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--text-muted);
  font-size: 1.02rem;
}
.hero__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero__actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ============================================================
   1) WHO I AM
   ============================================================ */
/* Name/role line under the section index, kept muted so only the
   "01" index stays accent-colored. */
.about__kicker {
  margin-top: 0.4rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: start;
}
@media (min-width: 860px) {
  .about__grid {
    grid-template-columns: 1.6fr 1fr;
  }
}
/* Readable measure: about 65 characters max per line */
.about__text {
  max-width: 65ch;
}
.about__text p {
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

/* Accent-tinted proof pills */
.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.75rem;
}
.badge-list li {
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid var(--accent);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
}

/* Testimonial: distinct card with an accent left-border */
.testimonial {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
}
.testimonial__quote {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--text);
}
.testimonial__cite {
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  font-style: normal;
}

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
.section {
  padding-block: var(--section-y);
}
.section--alt {
  background: var(--bg-alt);
}
.section__head {
  max-width: 60ch;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section__index {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.section__title {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 700;
}
.section__lead {
  margin-top: 1rem;
  font-size: 1.15rem;
  color: var(--text-muted);
}

/* ============================================================
   2) WHAT I DO
   ============================================================ */
.what__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 820px) {
  .what__grid {
    grid-template-columns: 1.6fr 1fr;
    align-items: start;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease),
    background 0.25s var(--ease);
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.card__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.card__title--sm {
  font-size: 1.15rem;
}
.card__kicker {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.card--lead {
  /* subtle accent edge to signal "this is the main thing" */
  border-top: 3px solid var(--accent);
}
.card__list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.7rem;
  color: var(--text-muted);
}
.card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.card--also {
  background: transparent;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.tag-list li {
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

/* ============================================================
   3) WHY AGENCIES KEEP ME
   ============================================================ */
.why__list {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 820px) {
  .why__list {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}
.why__item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
}
.why__num {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  opacity: 0.85;
}
.why__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.why__body p {
  color: var(--text-muted);
}

/* ============================================================
   5) CONTACT
   ============================================================ */
.section--contact {
  text-align: center;
}
.contact {
  max-width: 640px;
}
.section--contact .section__index {
  /* center the index number in this centered section */
  text-align: center;
}
.contact__title {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  margin-bottom: 2rem;
}

/* ============================================================
   AGENCIES I HAVE BEEN HELPING - MAP
   jsVectorMap renders an <svg> into #agencies-map. We size the
   container with an aspect ratio so it scales cleanly on mobile,
   theme the land/tooltip, and add the pulsing pins.
   ============================================================ */
.map {
  width: 100%;
  /* World map art is roughly 2:1; keeps proportions on every width */
  aspect-ratio: 2 / 1;
  margin-inline: auto;
}
/* jsVectorMap wrapper + svg should fill the container */
.map .jvm-container {
  width: 100%;
  height: 100%;
  background: transparent; /* transparent ocean → blends with page */
}

/* --- Pulsing accent pins ---
   Each marker is an SVG <circle class="jvm-marker">. We keep a solid
   accent dot and animate an expanding stroke "ring" outward for a soft
   sonar-style pulse. transform-box/origin keep any scaling centered. */
.map .jvm-marker {
  fill: var(--accent);
  stroke: var(--accent);
  transform-box: fill-box;
  transform-origin: center;
  animation: pin-pulse 2.6s var(--ease) infinite;
}
@keyframes pin-pulse {
  0% {
    stroke-width: 0;
    stroke-opacity: 0.55;
  }
  70%,
  100% {
    stroke-width: 13px;
    stroke-opacity: 0;
  }
}

/* --- Tooltip (country name on hover) --- */
.map .jvm-tooltip,
.jvm-tooltip {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.7rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.6);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  align-items: center;
  color: var(--text-faint);
  font-size: 0.9rem;
}

/* ============================================================
   SCROLL-REVEAL ANIMATION
   Elements with .reveal start hidden; script.js adds .is-visible
   via IntersectionObserver. Staggering is handled by JS too.
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   REDUCED MOTION
   Respect users who prefer no animation: kill reveals + drift,
   and disable smooth scroll.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none;
  }
  .hero__bg,
  .map .jvm-marker {
    animation: none;
  }
  .btn:hover,
  .card:hover,
  .work-card:hover {
    transform: none;
  }
}
