/* ==========================================================================
   Md Mahadi Hasan — Portfolio
   main.css — organized by section. Every color comes from the token block.
   ==========================================================================
   0. Fonts
   1. Design tokens (theme system)
   2. Reset & base
   3. Typography helpers
   4. Layout primitives
   5. Buttons
   6. Navbar + theme toggle
   7. Hero + signature curve
   8. Stats strip
   9. Case studies + drawer
   10. Skills
   11. Experience timeline
   12. Testimonials
   13. Contact / leads
   14. Footer
   15. 404
   16. Reveal / motion
   ========================================================================== */

/* ---- 0. Fonts ---------------------------------------------------------- */
@font-face { font-family:"Sora"; font-weight:700; font-display:swap;
  src:url("../fonts/sora-700.fc575ebf6f7c.woff2") format("woff2"); }
@font-face { font-family:"Sora"; font-weight:800; font-display:swap;
  src:url("../fonts/sora-800.fc575ebf6f7c.woff2") format("woff2"); }
@font-face { font-family:"Inter"; font-weight:400; font-display:swap;
  src:url("../fonts/inter-400.260c81a4759b.woff2") format("woff2"); }
@font-face { font-family:"Inter"; font-weight:500; font-display:swap;
  src:url("../fonts/inter-500.260c81a4759b.woff2") format("woff2"); }
@font-face { font-family:"Inter"; font-weight:600; font-display:swap;
  src:url("../fonts/inter-600.260c81a4759b.woff2") format("woff2"); }
@font-face { font-family:"JetBrains Mono"; font-weight:500; font-display:swap;
  src:url("../fonts/jetbrainsmono-500.a21e038a03f7.woff2") format("woff2"); }

/* ---- 1. Design tokens -------------------------------------------------- */
:root {                          /* LIGHT — "daylight report" */
  --bg:            #F7F8FA;
  --bg-elev:       #FFFFFF;
  --ink:           #101623;
  --ink-soft:      #4A5568;
  --line:          #E3E7EE;
  --accent:        #1D6FF2;
  --accent-ink:    #FFFFFF;
  --signal-up:     #16A34A;
  --signal-down:   #DC2626;
  --curve-glow:    rgba(29,111,242,.18);

  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1120px;
  --shadow-hover: 0 12px 40px -12px rgba(16,22,35,.18);
  --backdrop: rgba(8,12,20,.55);
}

[data-theme="dark"] {            /* DARK — "war-room at night" */
  --bg:            #0A0F1A;
  --bg-elev:       #111827;
  --ink:           #EDF1F7;
  --ink-soft:      #94A3B8;
  --line:          #1F2937;
  --accent:        #4D8DFF;
  --accent-ink:    #06101F;
  --signal-up:     #34D399;
  --signal-down:   #F87171;
  --curve-glow:    rgba(77,141,255,.25);
  --shadow-hover: 0 14px 46px -12px rgba(0,0,0,.6);
}

/* Fallback while the no-flash script resolves (treat unset as light). */
:root:not([data-theme="dark"]) { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

/* ---- 2. Reset & base --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  transition: background-color .35s ease, color .35s ease;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
[x-cloak] { display: none !important; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

section { scroll-margin-top: 84px; }

/* ---- 3. Typography helpers -------------------------------------------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.08;
  letter-spacing: -.02em; margin: 0; }
.mono { font-family: var(--font-mono); font-weight: 500; }
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  color: var(--accent);
  display: inline-block;
  margin-bottom: .9rem;
}
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.section-lead { color: var(--ink-soft); max-width: 46ch; margin: .8rem 0 0; }

/* ---- 4. Layout primitives --------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem); }
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section__head { margin-bottom: 2.4rem; }
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: background-color .35s ease, border-color .35s ease,
              box-shadow .25s ease, transform .25s ease;
}
.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  padding: .28rem .6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
}

/* ---- 5. Buttons -------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .95rem;
  padding: .8rem 1.35rem; border-radius: 999px;
  border: 1px solid transparent; line-height: 1;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease,
              border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn--sm { padding: .55rem 1rem; font-size: .85rem; }
.btn--primary { background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 6px 20px -8px var(--accent); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -10px var(--accent); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* ---- 6. Navbar -------------------------------------------------------- */
.nav { position: sticky; top: 0; z-index: 50;
  transition: background-color .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent; }
.nav--scrolled {
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom-color: var(--line);
}
.nav__inner { max-width: var(--maxw); margin-inline: auto;
  padding: .85rem clamp(1.1rem, 4vw, 2rem);
  display: flex; align-items: center; gap: 1.5rem;
  position: relative; z-index: 46; /* keep logo + close (X) above the open overlay */ }
.brand { display: inline-flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.brand__mark {
  position: relative; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #8fbaff));
  box-shadow: 0 6px 18px -8px var(--accent), inset 0 1px 0 rgba(255,255,255,.28);
  transition: transform .25s ease, box-shadow .25s ease;
}
.brand:hover .brand__mark { transform: translateY(-1px) rotate(-3deg);
  box-shadow: 0 11px 26px -8px var(--accent), inset 0 1px 0 rgba(255,255,255,.34); }
.brand__glyph { width: 24px; height: 24px; }
.brand__glyph path { stroke: var(--accent-ink); stroke-linecap: round; stroke-linejoin: round; }
.brand__m    { stroke-width: 2.1; }
.brand__rise { stroke-width: 1.9; opacity: .95; }
/* Distinct mono wordmark for a sharper, product-grade logotype. */
.brand__name { font-family: var(--font-mono); font-weight: 500; font-size: 1.1rem;
  letter-spacing: -.01em; line-height: 1; color: var(--ink); }
.brand__dot { color: var(--accent); font-style: normal; }
.nav__links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav__links a { color: var(--ink-soft); font-weight: 500; font-size: .93rem;
  position: relative; transition: color .2s ease; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--accent); transition: width .25s ease; }
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after, .nav__links a:hover::after { width: 100%; }
.nav__actions { display: flex; align-items: center; gap: .8rem; }
.nav__burger { display: none; align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  width: 44px; height: 44px; margin-right: -8px;
  background: none; border: 0; border-radius: 12px; padding: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease; }
.nav__burger:hover, .nav--open .nav__burger {
  background: color-mix(in srgb, var(--ink) 8%, transparent); }
.nav__burger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .3s ease, opacity .2s ease; }
.nav--open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav--open .nav__burger span:nth-child(2) { opacity: 0; }
.nav--open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__overlay { position: fixed; inset: 0; z-index: 45;
  padding: calc(env(safe-area-inset-top) + 4rem) 1.5rem calc(env(safe-area-inset-bottom) + 2rem);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(8px); display: grid; place-items: center; }
.nav__overlay-links { display: flex; flex-direction: column; gap: 1rem;
  text-align: center; width: min(340px, 100%); }
.nav__overlay-links a:not(.btn) { font-family: var(--font-display); font-weight: 700;
  font-size: 1.55rem; color: var(--ink); padding: .5rem; border-radius: 12px;
  transition: background-color .2s ease;
  animation: menuIn .4s both; animation-delay: calc(var(--i) * .06s); }
.nav__overlay-links a:not(.btn):active { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.nav__overlay-links .btn { animation: menuIn .4s both; animation-delay: calc(var(--i) * .06s); }
.nav__overlay-links .btn { font-size: 1rem; align-self: center; }
@keyframes menuIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.ov-enter { animation: ovIn .25s ease both; }
.ov-leave { animation: ovIn .2s ease reverse both; }
@keyframes ovIn { from { opacity: 0; } to { opacity: 1; } }

/* Language switcher */
.lang-switch { display: inline-flex; align-items: center; gap: .25rem; margin: 0;
  padding: .2rem .4rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); transition: border-color .3s ease, background-color .3s ease; }
.lang-switch__opt { background: none; border: 0; padding: .15rem .35rem; border-radius: 999px;
  font-size: .68rem; letter-spacing: .06em; color: var(--ink-soft); line-height: 1;
  transition: color .2s ease, background-color .2s ease; }
.lang-switch__opt--bn { font-family: var(--font-body); }
.lang-switch__opt:hover { color: var(--ink); }
.lang-switch__opt.is-active { color: var(--accent-ink); background: var(--accent); font-weight: 600; }
.lang-switch__sep { color: var(--line); font-size: .7rem; }
.nav__overlay-lang { animation: menuIn .4s both; animation-delay: calc(var(--i) * .06s); }

/* Theme toggle */
.theme-toggle { display: inline-flex; align-items: center; gap: .5rem;
  background: none; border: 0; padding: 0; color: var(--ink-soft); }
.theme-toggle__label { font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .1em; }
.theme-toggle__track { position: relative; width: 46px; height: 26px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  transition: background-color .3s ease, border-color .3s ease; }
.theme-toggle__knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center;
  transition: transform .4s cubic-bezier(.68,-0.55,.27,1.55), background-color .3s ease; }
[data-theme="dark"] .theme-toggle__knob { transform: translateX(20px); }
.theme-toggle__knob svg { width: 13px; height: 13px; fill: none; stroke: currentColor;
  stroke-width: 2; position: absolute; transition: opacity .25s ease, transform .25s ease; }
.theme-toggle__sun { opacity: 1; }
.theme-toggle__moon { opacity: 0; fill: currentColor; stroke: none; }
[data-theme="dark"] .theme-toggle__sun { opacity: 0; }
[data-theme="dark"] .theme-toggle__moon { opacity: 1; }

/* ---- 7. Hero + curve -------------------------------------------------- */
.hero { position: relative; padding-block: clamp(2.5rem, 7vw, 5rem) clamp(3rem, 7vw, 5.5rem); }
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; }
.hero__headline { font-size: clamp(2.2rem, 6vw, 4rem); margin: 0 0 1.1rem;
  animation: heroIn .8s .05s both; }
.hero__subtext { color: var(--ink-soft); font-size: clamp(1rem, 1.4vw, 1.12rem);
  max-width: 46ch; margin: 0 0 1.8rem; animation: heroIn .8s .15s both; }
.hero__cta { display: flex; gap: .8rem; flex-wrap: wrap; animation: heroIn .8s .25s both; }
.hero__trust { display: flex; gap: 1.2rem; list-style: none; padding: 0; margin: 1.8rem 0 0;
  font-size: .72rem; color: var(--ink-soft); flex-wrap: wrap; }
.hero__trust li { position: relative; padding-left: 1rem; }
.hero__trust li::before { content: "●"; position: absolute; left: 0; color: var(--signal-up);
  font-size: .6rem; top: .18rem; }
@keyframes heroIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.hero__chart { animation: heroIn .9s .3s both; }
.chart { position: relative; width: 100%; aspect-ratio: 600 / 340;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .5rem .5rem 1.6rem; overflow: hidden;
  transition: background-color .35s ease, border-color .35s ease;
  box-shadow: 0 18px 50px -24px var(--curve-glow); }
.chart__svg { width: 100%; height: 100%; overflow: visible; }
.chart__grid line { stroke: var(--line); stroke-width: 1; opacity: .7; }
.chart__area { fill: url(#roasArea); stroke: none; }
.chart__roas { fill: none; stroke: var(--accent); stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round; }
.chart__cpl { fill: none; stroke: var(--signal-down); stroke-width: 1.5;
  stroke-dasharray: 5 4; stroke-linecap: round; opacity: .85; }
.chart__dot-core { fill: var(--accent); }
.chart__dot-halo { fill: var(--accent); opacity: .25; transform-origin: center;
  animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.7); opacity: .45; }
  70% { transform: scale(2.1); opacity: 0; } 100% { opacity: 0; } }
.chart__crosshair { display: none; }
.chart__crosshair.is-on { display: block; }
.chart__crosshair line { stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 3 3; opacity: .5; }
.chart__crosshair circle { fill: var(--accent); }

.chart__chip { position: absolute; z-index: 3; display: inline-flex; align-items: center;
  gap: .4rem; padding: .34rem .6rem; background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: 10px; font-size: .74rem;
  box-shadow: 0 8px 22px -12px rgba(0,0,0,.35); }
.chart__chip-label { color: var(--ink-soft); letter-spacing: .06em; }
.chart__chip-val { font-weight: 500; color: var(--ink); }
.chart__chip-arrow.up { color: var(--signal-up); }
.chart__chip--roas { top: 12px; right: 14px; }
.chart__chip--cpl { bottom: 34px; left: 14px; }

.chart__tooltip { position: absolute; top: 8px; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: .3rem .55rem; border-radius: 7px;
  font-size: .68rem; white-space: nowrap; pointer-events: none; z-index: 4; }
.chart__axis { position: absolute; left: .8rem; right: .8rem; bottom: .5rem;
  display: flex; justify-content: space-between; font-size: .64rem; color: var(--ink-soft); }

@media (max-width: 820px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__chart { order: 2; }
}

/* ---- 8. Stats --------------------------------------------------------- */
.stats { padding-block: clamp(1.5rem, 4vw, 2.5rem); border-block: 1px solid var(--line);
  background: var(--bg-elev); transition: background-color .35s ease, border-color .35s ease; }
.stats__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat { text-align: center; }
.stat__value { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 500;
  color: var(--accent); line-height: 1; letter-spacing: -.02em; }
.stat__label { color: var(--ink-soft); font-size: .85rem; margin-top: .5rem; }
@media (max-width: 720px) { .stats__row { grid-template-columns: repeat(2, 1fr); gap: 1.8rem 1rem; } }

/* ---- 9. Case studies + drawer ----------------------------------------- */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.4rem; }
.case-card { position: relative; }
.case-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.case-card__btn { display: block; width: 100%; text-align: left; background: none;
  border: 0; padding: 1.5rem; color: inherit; }
.case-card__flag { position: absolute; top: 1rem; right: 1rem; font-size: .6rem;
  letter-spacing: .1em; color: var(--accent); border: 1px solid var(--accent);
  padding: .2rem .45rem; border-radius: 6px; }
.case-card__eyebrow { margin-bottom: .5rem; font-size: .68rem; }
.case-card__title { font-size: 1.22rem; line-height: 1.2; margin-bottom: .8rem; }
.case-card__pills { display: flex; flex-direction: column; gap: .5rem; margin: 1.1rem 0; }
.pill { display: flex; align-items: center; gap: .5rem; font-size: .82rem;
  padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px; }
.pill__label { flex: 1; color: var(--ink-soft); font-size: .68rem; text-transform: uppercase;
  letter-spacing: .04em; }
.pill__before { color: var(--signal-down); text-decoration: line-through; opacity: .8; }
.pill__arrow { color: var(--ink-soft); }
.pill__after { color: var(--signal-up); font-weight: 600; }
.case-card__cta { display: inline-block; margin-top: .3rem; color: var(--accent);
  font-size: .78rem; letter-spacing: .02em; }

.drawer { position: fixed; inset: 0; z-index: 70; display: flex; justify-content: flex-end; }
.drawer__backdrop { position: absolute; inset: 0;
  background: var(--backdrop); backdrop-filter: blur(2px); }
.drawer__panel { position: relative; width: min(560px, 100%); height: 100%;
  background: var(--bg); border-left: 1px solid var(--line); overflow-y: auto;
  padding: clamp(1.5rem, 4vw, 2.6rem); box-shadow: -20px 0 60px -30px rgba(0,0,0,.6); }
.drawer__close { position: absolute; top: 1rem; right: 1rem; width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--bg-elev);
  color: var(--ink); font-size: 1rem; }
.drawer__close:hover { border-color: var(--accent); color: var(--accent); }
.drawer--in { animation: drawerIn .38s cubic-bezier(.16,1,.3,1) both; }
.drawer--out { animation: drawerIn .28s ease reverse both; }
@keyframes drawerIn { from { opacity: 0; } to { opacity: 1; } }
.drawer--in .drawer__panel { animation: panelIn .42s cubic-bezier(.16,1,.3,1) both; }
@keyframes panelIn { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }

.case-panel__title { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: .4rem 0 1.2rem; }
.case-panel__cover { width: 100%; border-radius: var(--radius); margin-bottom: 1.4rem; }
.case-panel__metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .8rem; margin-bottom: 1.8rem; }
.metric-card { padding: .9rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-elev); }
.metric-card__label { font-size: .64rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-soft); margin-bottom: .4rem; }
.metric-card__nums { display: flex; align-items: baseline; gap: .35rem; flex-wrap: wrap; }
.metric-card__before { color: var(--signal-down); text-decoration: line-through; font-size: .9rem; opacity: .8; }
.metric-card__arrow { color: var(--ink-soft); }
.metric-card__after { font-size: 1.35rem; font-weight: 500; color: var(--signal-up); }
.metric-card.is-down .metric-card__after { color: var(--signal-up); }
.case-block { margin-bottom: 1.3rem; }
.case-block p { margin: .4rem 0 0; color: var(--ink-soft); }
.case-block--result p { color: var(--ink); }

/* ---- 10. Skills ------------------------------------------------------- */
.skills__tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.skills__tab { padding: .55rem 1rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-elev); color: var(--ink-soft); font-size: .8rem; letter-spacing: .03em;
  transition: all .2s ease; }
.skills__tab:hover { color: var(--ink); border-color: var(--accent); }
.skills__tab.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.skill-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.1rem 2rem; }
.skill__head { display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: .45rem; }
.skill__name { font-weight: 500; font-size: .95rem; }
.skill__icon { margin-right: .35rem; }
.skill__pct { color: var(--accent); font-size: .82rem; }
.skill__track { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; }
.skill__bar { display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--signal-up)));
  border-radius: 999px; transition: width 1.1s cubic-bezier(.16,1,.3,1); }

/* ---- 11. Timeline ----------------------------------------------------- */
.timeline { position: relative; margin-left: 8px; padding-left: 2rem;
  border-left: 2px solid var(--line); }
.timeline__entry { position: relative; padding-bottom: 2rem; }
.timeline__entry:last-child { padding-bottom: 0; }
.timeline__node { position: absolute; left: calc(-2rem - 8px); top: 6px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.timeline__node.is-current { box-shadow: 0 0 0 0 var(--signal-up); animation: nodePulse 2s infinite; border-color: var(--signal-up); }
@keyframes nodePulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal-up) 60%, transparent); }
  70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.timeline__card { padding: 1.3rem 1.5rem; }
.timeline__card:hover { box-shadow: var(--shadow-hover); }
.timeline__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.timeline__role { font-size: 1.15rem; }
.timeline__company { color: var(--accent); font-weight: 600; font-size: .95rem; margin-top: .1rem; }
.timeline__meta { color: var(--ink-soft); font-size: .78rem; margin: .5rem 0 .8rem;
  display: flex; gap: .4rem; flex-wrap: wrap; }
.timeline__summary { color: var(--ink-soft); margin: 0 0 .7rem; }
.timeline__points { margin: 0; padding-left: 1.1rem; color: var(--ink-soft); }
.timeline__points li { margin-bottom: .4rem; }
.badge-running { display: inline-flex; align-items: center; gap: .4rem; flex-shrink: 0;
  font-size: .68rem; color: var(--signal-up); border: 1px solid color-mix(in srgb, var(--signal-up) 40%, transparent);
  padding: .25rem .55rem; border-radius: 999px; }
.badge-running__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal-up);
  animation: nodePulse 2s infinite; }

/* ---- 12. Testimonials ------------------------------------------------- */
.chat { display: flex; flex-direction: column; gap: 1.4rem; max-width: 640px; }
.chat__row { display: flex; gap: .8rem; align-items: flex-end; }
.chat__avatar { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center;
  font-weight: 700; font-family: var(--font-display); font-size: .9rem; overflow: hidden; }
.chat__avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat__bubble-wrap { position: relative; }
.chat__bubble { background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 4px 16px 16px 16px; padding: .9rem 1.1rem; color: var(--ink);
  box-shadow: 0 4px 18px -14px rgba(0,0,0,.4); }
.chat__meta { color: var(--ink-soft); font-size: .72rem; margin-top: .4rem; padding-left: .3rem; }
.chat__typing { display: none; }
/* First bubble: play a one-time typing -> bubble reveal. */
.chat__row.is-visible .chat__typing { display: flex; gap: 4px; position: absolute; inset: 0;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 4px 16px 16px 16px;
  align-items: center; justify-content: center; width: 60px; height: 42px;
  animation: typingGone .3s ease 1.1s forwards; }
.chat__row.is-visible .chat__typing span { width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-soft); animation: typingBounce 1s infinite; }
.chat__row.is-visible .chat__typing span:nth-child(2) { animation-delay: .15s; }
.chat__row.is-visible .chat__typing span:nth-child(3) { animation-delay: .3s; }
.chat__row.is-visible .chat__typing ~ .chat__bubble { animation: bubblePop .35s cubic-bezier(.16,1,.3,1) 1.1s both; }
@keyframes typingBounce { 0%,60%,100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes typingGone { to { opacity: 0; visibility: hidden; } }
@keyframes bubblePop { from { opacity: 0; transform: scale(.9) translateY(6px); } to { opacity: 1; transform: none; } }


/* ---- 13. Contact / leads ---------------------------------------------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start; }
.contact__lead { color: var(--ink-soft); margin: .9rem 0 1.6rem; max-width: 42ch; }
.contact__links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column;
  gap: .9rem; font-size: .92rem; }
.contact__links a { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink);
  transition: color .2s ease; }
.contact__links a:hover { color: var(--accent); }
.contact__links li { display: flex; align-items: center; gap: .6rem; color: var(--ink-soft); }
.contact__ico { width: 1.4rem; text-align: center; }

.contact__form-wrap { padding: clamp(1.4rem, 3vw, 2rem); }
.lead-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .82rem; font-weight: 500; color: var(--ink-soft); }
.field .req { color: var(--signal-down); }
.field .opt { color: var(--ink-soft); font-weight: 400; font-size: .72rem; }
.lead-form input, .lead-form select, .lead-form textarea {
  width: 100%; font-family: inherit; font-size: .92rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: .7rem .8rem; transition: border-color .2s ease, box-shadow .2s ease; }
.lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.lead-form textarea { resize: vertical; min-height: 84px; }
.field__err { color: var(--signal-down); font-size: .76rem; }
.lead-form__error { color: var(--signal-down); font-size: .85rem; margin-bottom: .8rem; }
.lead-form__submit { width: 100%; justify-content: center; margin-top: 1.2rem; position: relative; }
.lead-form__note { font-size: .72rem; color: var(--ink-soft); text-align: center; margin: .8rem 0 0; }
.lead-form__spinner { display: none; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent-ink) 40%, transparent);
  border-top-color: var(--accent-ink); animation: spin .7s linear infinite; }
.htmx-request .lead-form__spinner { display: inline-block; }
.htmx-request .lead-form__submit-label { opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }

.lead-success { text-align: center; padding: clamp(2rem, 5vw, 3rem) 1rem; }
.lead-success__check svg { width: 66px; height: 66px; margin: 0 auto 1rem; fill: none;
  stroke: var(--signal-up); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.lead-success__check circle { stroke-dasharray: 151; stroke-dashoffset: 151;
  animation: drawCircle .5s ease forwards; }
.lead-success__check path { stroke-dasharray: 40; stroke-dashoffset: 40;
  animation: drawCheck .35s .45s ease forwards; }
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.lead-success__title { font-size: 1.4rem; margin-bottom: .5rem; }
.lead-success__text { color: var(--ink); font-weight: 500; }
.lead-success__sub { color: var(--ink-soft); font-size: .8rem; margin-top: .6rem; }

@media (max-width: 780px) {
  .contact__grid { grid-template-columns: 1fr; }
  .lead-form__grid { grid-template-columns: 1fr; }
}

/* ---- 14. Footer ------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-elev);
  transition: background-color .35s ease, border-color .35s ease; }
.footer__inner { max-width: var(--maxw); margin-inline: auto;
  padding: 2.6rem clamp(1.1rem, 4vw, 2rem) 1.4rem;
  display: flex; flex-wrap: wrap; gap: 1.6rem; align-items: center;
  justify-content: space-between; }
.footer__name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.footer__tagline { color: var(--ink-soft); font-size: .9rem; }
.footer__social { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer__social a { color: var(--ink-soft); font-size: .9rem; transition: color .2s ease; }
.footer__social a:hover { color: var(--accent); }
.footer__meta { display: flex; align-items: center; gap: 1rem; }
.footer__built { font-size: .72rem; color: var(--ink-soft); }
.footer__copy { max-width: var(--maxw); margin-inline: auto;
  padding: 0 clamp(1.1rem, 4vw, 2rem) 2rem; font-size: .72rem; color: var(--ink-soft); }

/* ---- 15. 404 ---------------------------------------------------------- */
.notfound { min-height: 68vh; display: grid; place-items: center; text-align: center; }
.notfound__inner { max-width: 40ch; }
.notfound__code { font-size: clamp(4rem, 16vw, 9rem); font-weight: 500; line-height: 1;
  color: var(--accent); letter-spacing: -.03em; margin: .3rem 0; }
.notfound__title { font-size: clamp(1.4rem, 4vw, 2.2rem); margin-bottom: .8rem; }
.notfound__text { color: var(--ink-soft); margin-bottom: 1.6rem; }
.notfound__cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }

/* ---- 16. Reveal / motion ---------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay] { transition-delay: var(--reveal-delay, 0s); }

/* ---- Responsive nav --------------------------------------------------- */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__actions { margin-left: auto; } /* push actions (incl. burger) to the right edge */
  .nav__actions > .lang-switch { display: none; } /* shown inside the overlay instead */
  .nav__burger { display: inline-flex; }
}
@media (min-width: 861px) {
  .nav__overlay { display: none !important; }
}

/* Small phones: tighten the bar, drop the theme label, stack hero CTAs. */
@media (max-width: 560px) {
  .nav__inner { gap: .7rem; padding-inline: 1rem; }
  .nav__actions { gap: .55rem; }
  .brand__mark { width: 34px; height: 34px; border-radius: 11px; }
  .brand__glyph { width: 22px; height: 22px; }
  .brand__name { font-size: 1rem; }
  .theme-toggle__label { display: none; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .nav__overlay-links a:not(.btn) { font-size: 1.4rem; }
}

/* ---- Reduced motion --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
