/* ==========================================================================
   Adeel Ahmed — Personal Portfolio
   Design system: DM Mono, dark/light theme, purple + pink accents
   ========================================================================== */

/* ---------- Self-hosted DM Mono (replaces render-blocking Google @import) ---------- */
/* latin */
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 300; font-display: swap; src: url('/assets/fonts/dmmono-300-normal-latin.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/dmmono-400-normal-latin.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/dmmono-500-normal-latin.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'DM Mono'; font-style: italic; font-weight: 400; font-display: swap; src: url('/assets/fonts/dmmono-400-italic-latin.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'DM Mono'; font-style: italic; font-weight: 500; font-display: swap; src: url('/assets/fonts/dmmono-500-italic-latin.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
/* latin-ext */
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 300; font-display: swap; src: url('/assets/fonts/dmmono-300-normal-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/dmmono-400-normal-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/dmmono-500-normal-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'DM Mono'; font-style: italic; font-weight: 400; font-display: swap; src: url('/assets/fonts/dmmono-400-italic-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'DM Mono'; font-style: italic; font-weight: 500; font-display: swap; src: url('/assets/fonts/dmmono-500-italic-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---------- Theme tokens ---------- */
:root,
[data-theme="dark"] {
  --bg: #0f1211;
  --bg-alt: #141917;
  --surface: #171d1a;
  --surface-2: #1d2521;
  --border: #283029;
  --border-soft: #26263300;
  --text: #e8f1ec;
  --text-muted: #90a49a;
  --text-dim: #7a8b81;
  --primary: #1fd98a;
  --primary-2: #14c079;
  --primary-soft: rgba(31, 217, 138, .12);
  --on-primary: #04170f;
  --pink: #ff4d8d;
  --pink-2: #e94b8a;
  --star: #1fd98a;
  --shadow: 0 24px 60px rgba(0, 0, 0, .5);
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, .4);
  --ring: rgba(31, 217, 138, .32);
  --glow: 0 0 15px rgba(31, 217, 138, .42);
  --glow-strong: 0 0 26px rgba(31, 217, 138, .62);
  --nav-bg: rgba(15, 18, 17, .74);
  --code-bg: #141917;
  --scheme: dark;
}

[data-theme="light"] {
  --bg: #eef3f0;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef4f0;
  --border: #dde7e1;
  --text: #12201a;
  --text-muted: #566a60;
  --text-dim: #5a6e64;
  --primary: #00a35e;
  --primary-2: #008d51;
  --primary-soft: rgba(0, 163, 94, .10);
  --on-primary: #04170f;
  --pink: #e63b7f;
  --pink-2: #d62f72;
  --star: #00a35e;
  --shadow: 0 24px 60px rgba(20, 40, 30, .12);
  --shadow-sm: 0 10px 30px rgba(20, 40, 30, .08);
  --ring: rgba(0, 163, 94, .32);
  --glow: 0 0 14px rgba(0, 163, 94, .4);
  --glow-strong: 0 0 22px rgba(0, 163, 94, .55);
  --nav-bg: rgba(255, 255, 255, .8);
  --code-bg: #edf4f0;
  --scheme: light;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Mono', ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  transition: background .4s ease, color .4s ease;
  color-scheme: var(--scheme);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
input, textarea, select { font-family: inherit; }

::selection { background: var(--primary); color: var(--on-primary); }

/* Scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 20px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; position: relative; }
.section--alt { background: var(--bg-alt); }
.section--tight { padding: 64px 0; }

.eyebrow {
  color: var(--pink);
  font-size: .82rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 500;
  line-height: 1.12;
  color: var(--primary);
  letter-spacing: -.01em;
}

.section-title--center { text-align: center; }
.section-title.plain { color: var(--text); }

.section-intro {
  color: var(--text-muted);
  max-width: 620px;
  margin-top: 18px;
  font-size: 1.02rem;
}
.section-intro.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 500;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 10px 30px var(--ring);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px var(--ring); background: var(--primary-2); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-3px); }
.btn-ghost .arrow { color: var(--pink); transition: transform .25s ease; }
.btn-ghost:hover .arrow { transform: translateX(5px); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Navbar ---------- */
/* Reserve the header height up-front so the JS-injected navbar can't shift content (CLS) */
#site-nav { min-height: 75px; }
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 74px;
}
.nav__burger {
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text);
  transition: all .25s ease;
  flex-shrink: 0;
}
.nav__burger:hover { color: var(--primary); border-color: var(--primary); }
.nav__brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.nav__brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.nav__brand b { font-weight: 500; font-size: 1.08rem; letter-spacing: -.01em; }
.nav__brand b span { color: var(--primary); }

.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__links a {
  padding: 9px 16px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: .95rem;
  position: relative;
  transition: color .25s ease;
}
.nav__links a::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px; bottom: 4px;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
  border-radius: 2px;
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after,
.nav__links a.active::after { transform: scaleX(1); }
.nav__links a.active { color: var(--text); }

.nav__social { display: flex; align-items: center; gap: 4px; padding: 0 4px; }
.nav__social a {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  color: var(--text-muted);
  transition: all .25s ease;
}
.nav__social a:hover { color: var(--primary); background: var(--primary-soft); transform: translateY(-2px); }
.nav__social svg { width: 17px; height: 17px; }

.theme-toggle {
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--primary);
  flex-shrink: 0;
  transition: all .3s ease;
}
.theme-toggle:hover { border-color: var(--primary); }
.theme-toggle:hover svg { transform: rotate(35deg) scale(1.05); }
.theme-toggle svg { width: 20px; height: 20px; transition: transform .3s ease; }
.theme-toggle .moon { display: none; }
[data-theme="light"] .theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .moon { display: block; }

.nav__menu-btn { display: none; }

/* ---------- Off-canvas: Get in touch ---------- */
.panel-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .55);
  opacity: 0; visibility: hidden;
  transition: all .35s ease;
  z-index: 200;
  backdrop-filter: blur(2px);
}
.panel-overlay.open { opacity: 1; visibility: visible; }

.side-panel {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(420px, 88vw);
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 201;
  transform: translateX(-105%);
  transition: transform .4s cubic-bezier(.4, 0, .1, 1);
  padding: 34px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.side-panel.open { transform: translateX(0); }
.side-panel__close {
  align-self: flex-end;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text);
  transition: all .25s ease;
}
.side-panel__close:hover { color: var(--pink); border-color: var(--pink); transform: rotate(90deg); }
.side-panel h2 { font-size: 1.5rem; font-weight: 500; color: var(--primary); }
.side-panel p.lead { color: var(--text-muted); }
.side-panel .contact-line { margin-top: 4px; }
.side-panel .contact-line small { color: var(--text-dim); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; }
.side-panel .contact-line p { color: var(--text); word-break: break-word; }
.side-panel .socials { display: flex; gap: 10px; margin-top: 6px; }
.side-panel .socials a {
  width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all .25s ease;
}
.side-panel .socials a:hover { color: var(--on-primary); background: var(--primary); border-color: var(--primary); transform: translateY(-3px); }
.side-panel .socials svg { width: 18px; height: 18px; }

/* ---------- Hero ---------- */
.hero { padding: 70px 0 40px; position: relative; }
.hero__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: stretch;
}
/* Allow grid items to shrink so the inner marquee's max-content width
   doesn't blow out the column (min-width:auto -> 0). */
.hero__grid > * { min-width: 0; }
/* Shrink the photo track to the framed image and center it, while stretching
   vertically so the image height tracks the content height (tag -> CTA). */
.hero__photo { position: relative; display: flex; justify-self: center; align-self: stretch; }
.hero__photo-frame {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 100%;
  /* Match the real image ratio (652x809) so object-fit: cover never crops. */
  aspect-ratio: 652 / 809;
}
.hero__photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__decor {
  position: absolute;
  width: 90px; height: 90px;
  left: -26px; bottom: -26px;
  z-index: 3;
  color: var(--primary);
  animation: spin 14s linear infinite;
}
.hero__decor svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 16px var(--ring)); }
@keyframes spin { to { transform: rotate(360deg); } }

.hero__glow {
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-soft), transparent 70%);
  top: -60px; right: -40px;
  z-index: 0;
  filter: blur(10px);
}

.hero__tag { color: var(--text); font-size: 1.05rem; margin-bottom: 10px; }
.code-punct { color: var(--pink); }
.hero__title {
  font-size: clamp(2.2rem, 5.2vw, 3.9rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin-bottom: 22px;
}
.hero__title .accent { color: var(--primary); }
.cursor {
  display: inline-block;
  color: var(--primary);
  text-shadow: var(--glow);
  animation: blink 1.05s steps(1) infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__desc {
  color: var(--text-muted);
  max-width: 560px;
  font-size: 1.02rem;
  margin-bottom: 30px;
}
.hero__desc .tk { color: var(--pink); }

.hero__stack-row {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.stack-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  flex: 1;
  min-width: 220px;
}
.stack-marquee__track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.stack-marquee:hover .stack-marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.tech-chip {
  width: 58px; height: 58px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s;
  position: relative;
}
.tech-chip:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: var(--shadow-sm); }
.tech-chip img { width: 34px; height: 34px; object-fit: contain; }

.years-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: .92rem;
  flex-shrink: 0;
}
.years-badge b { color: var(--primary); font-size: 1.5rem; }

.hero__cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---------- Stats ---------- */
.stats { background: var(--bg-alt); }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.stat { display: flex; align-items: flex-start; gap: 6px; }
.stat__num {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
}
.stat__plus { color: var(--primary); font-size: clamp(2rem, 4vw, 3rem); line-height: 1; }
.stat__suffix { color: var(--primary); }
.stat__label { color: var(--text-muted); align-self: center; line-height: 1.3; padding-top: 6px; }
.stat__label b { display: block; color: var(--text); font-weight: 500; }

/* ---------- Offer / Services list ---------- */
.offer__head { max-width: 640px; margin-bottom: 50px; }
.offer-item {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 30px;
  align-items: center;
  padding: 34px 0;
  border-top: 1px solid var(--border);
  transition: padding .3s ease;
}
.offer-item:last-child { border-bottom: 1px solid var(--border); }
.offer-item__title { font-size: 1.7rem; font-weight: 500; transition: color .3s ease; }
.offer-item__desc { color: var(--text-muted); font-size: .98rem; }
.offer-item__arrow {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text);
  transition: all .3s ease;
  flex-shrink: 0;
}
.offer-item__arrow svg { width: 20px; height: 20px; transition: transform .3s ease; }
.offer-item:hover { padding-left: 16px; }
.offer-item:hover .offer-item__title { color: var(--primary); }
.offer-item:hover .offer-item__arrow { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.offer-item:hover .offer-item__arrow svg { transform: rotate(45deg); }

/* ---------- Experience ---------- */
.exp__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.exp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
}
.exp-card__title { display: flex; align-items: center; gap: 12px; font-size: 1.8rem; font-weight: 500; margin-bottom: 30px; }
.exp-card__title svg { width: 30px; height: 30px; color: var(--primary); }
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: '';
  position: absolute; left: 4px; top: 8px; bottom: 8px;
  width: 1px; background: var(--border);
}
.timeline__item { position: relative; padding-bottom: 26px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: '';
  position: absolute; left: -22px; top: 8px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.timeline__date { color: var(--text-muted); font-size: .92rem; }
.timeline__role { color: var(--pink); font-size: .95rem; }
.timeline__place { color: var(--text); font-weight: 500; }

/* ---------- Skills ---------- */
.skills__head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.skills__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
}
.skill {
  padding: 38px 12px;
  text-align: center;
  border-right: 1px solid var(--border);
  transition: background .3s ease;
}
.skill:last-child { border-right: none; }
.skill:hover { background: var(--surface-2); }
.skill__icon {
  width: 60px; height: 60px;
  margin: 0 auto 18px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-weight: 500; font-size: 1.25rem; color: #fff;
  box-shadow: var(--shadow-sm);
}
.skill__pct { font-size: 1.9rem; font-weight: 500; }
.skill__name { color: var(--text-muted); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; margin-top: 4px; }
.skill__bar { height: 4px; background: var(--border); border-radius: 4px; margin-top: 14px; overflow: hidden; }
.skill__bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--pink)); border-radius: 4px; transition: width 1.4s cubic-bezier(.2,.8,.2,1); }
.skills__note { text-align: center; color: var(--text-muted); margin-top: 40px; }
.skills__note b { color: var(--text); }

/* ---------- Logo marquee (trusted by) ---------- */
.logos { background: var(--bg-alt); }
.logos__head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.logo-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.logo-marquee + .logo-marquee { margin-top: 26px; }
.logo-marquee__track { display: flex; gap: 56px; width: max-content; align-items: center; animation: marquee 34s linear infinite; }
.logo-marquee--rev .logo-marquee__track { animation-direction: reverse; animation-duration: 40s; }
.logo-marquee:hover .logo-marquee__track { animation-play-state: paused; }
.brand-logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 1.5rem; font-weight: 500;
  color: var(--text-dim);
  opacity: 1;
  transition: color .3s ease, opacity .3s ease, transform .3s;
  white-space: nowrap;
}
.brand-logo svg { width: 26px; height: 26px; }
.brand-logo:hover { color: var(--text); opacity: 1; transform: scale(1.05); }

/* ---------- Testimonials ---------- */
.testi__head { max-width: 620px; margin-bottom: 50px; }
.testi__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.testi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  position: relative;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s;
}
.testi-card:hover { transform: translateY(-6px); border-color: var(--primary); box-shadow: var(--shadow-sm); }
.testi-card__top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.testi-card__stars { color: var(--star); letter-spacing: 3px; }
.testi-card__quote-mark { font-size: 3.4rem; line-height: .6; color: var(--border); font-weight: 700; }
.testi-card__text { color: var(--text); font-size: 1.02rem; margin-bottom: 26px; }
.testi-card__person { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-weight: 500; font-size: 1.05rem;
  flex-shrink: 0;
}
.testi-card__name { font-weight: 500; }
.testi-card__role { color: var(--text-muted); font-size: .86rem; }
/* Testimonials slider controls (shown on mobile only) */
.testi__nav { display: none; align-items: center; justify-content: center; gap: 18px; margin-top: 28px; }
.testi__arrow {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--border); color: var(--text);
  display: grid; place-items: center; transition: all .25s ease; flex-shrink: 0;
}
.testi__arrow:hover { border-color: var(--primary); color: var(--primary); }
.testi__arrow:disabled { opacity: .38; }
.testi__arrow svg { width: 20px; height: 20px; }
.testi__dots { display: flex; align-items: center; gap: 4px; }
.testi__dot { width: 24px; height: 24px; border: none; background: transparent; padding: 0; display: grid; place-items: center; cursor: pointer; }
.testi__dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: width .25s ease, background .25s ease, border-radius .25s ease; }
.testi__dot.active::before { background: var(--primary); width: 22px; border-radius: 4px; }

/* ---------- Blog ---------- */
.blog__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 50px; flex-wrap: wrap; }
.blog__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s;
  display: flex; flex-direction: column;
}
.blog-card:hover { transform: translateY(-6px); border-color: var(--primary); box-shadow: var(--shadow-sm); }
.blog-card__img { height: 190px; position: relative; display: grid; place-items: center; overflow: hidden; }
.blog-card__img span { color: rgba(255,255,255,.9); font-size: 1.05rem; padding: 0 20px; text-align: center; z-index: 1; font-weight: 500; }
.blog-card__cat {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: rgba(0,0,0,.4); color: #fff;
  padding: 5px 12px; border-radius: 999px; font-size: .74rem;
  backdrop-filter: blur(4px);
}
.blog-card__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.blog-card__title { font-size: 1.18rem; font-weight: 500; transition: color .25s; }
.blog-card:hover .blog-card__title { color: var(--primary); }
.blog-card__excerpt { color: var(--text-muted); font-size: .92rem; flex: 1; }
.blog-card__meta { color: var(--text-dim); font-size: .82rem; margin-top: auto; }

/* ---------- Get in touch (contact info) ---------- */
.touch__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.touch__info { display: grid; gap: 16px; margin-top: 34px; }
.info-card {
  display: flex; align-items: center; gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  transition: transform .3s ease, border-color .3s ease;
}
.info-card:hover { transform: translateX(6px); border-color: var(--primary); }
.info-card__icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; flex-shrink: 0;
}
.info-card__icon svg { width: 22px; height: 22px; }
.info-card small { color: var(--text-muted); font-size: .82rem; }
.info-card__val { font-size: 1.02rem; font-weight: 500; word-break: break-word; }

/* ---------- Contact form ---------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
}
.form-card h3 { font-size: 1.7rem; font-weight: 500; color: var(--primary); margin-bottom: 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .86rem; color: var(--text-muted); }
.field label .req { color: var(--pink); }
.field input, .field textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-size: .95rem;
  transition: border-color .25s ease, box-shadow .25s ease;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.form-agree { display: flex; align-items: center; gap: 10px; margin: 20px 0; color: var(--text-muted); font-size: .9rem; }
.form-agree input { width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; }
.form-agree a { color: var(--primary); }
.form-msg { border-radius: 12px; padding: 14px 16px; font-size: .9rem; margin-bottom: 18px; display: none; }
.form-msg.ok { display: block; background: rgba(46, 204, 113, .12); color: #2ecc71; border: 1px solid rgba(46,204,113,.3); }
.form-msg.err { display: block; background: rgba(231, 76, 60, .12); color: #e74c3c; border: 1px solid rgba(231,76,60,.3); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: 74px 0 40px; text-align: center; position: relative; }
.page-hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 500; color: var(--primary); letter-spacing: -.02em; }
.breadcrumb { color: var(--text-muted); margin-top: 14px; font-size: .92rem; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--text-dim); margin: 0 8px; }

/* ---------- Services page grid ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.svc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s;
  position: relative; overflow: hidden;
}
.svc-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 90% 10%, var(--primary-soft), transparent 55%);
  opacity: 0; transition: opacity .35s ease;
}
.svc-card:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: var(--shadow-sm); }
.svc-card:hover::before { opacity: 1; }
.svc-card__body { position: relative; z-index: 1; }
.svc-card__icon {
  width: 76px; height: 76px; border-radius: 20px;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; margin-bottom: 22px;
}
.svc-card__icon svg { width: 36px; height: 36px; }
.svc-card h2 { font-size: 1.5rem; font-weight: 500; margin-bottom: 12px; }
.svc-card p { color: var(--text-muted); max-width: 340px; }
.svc-card__arrow {
  width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid var(--border);
  display: grid; place-items: center; flex-shrink: 0;
  color: var(--text); transition: all .3s ease; position: relative; z-index: 1;
}
.svc-card__arrow svg { width: 20px; height: 20px; transition: transform .3s ease; }
.svc-card:hover .svc-card__arrow { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.svc-card:hover .svc-card__arrow svg { transform: rotate(45deg); }

/* ---------- Pricing ---------- */
.pricing__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; max-width: 900px; margin: 0 auto; }
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 44px 40px;
  position: relative;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s;
}
.price-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.price-card--featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.price-card__badge {
  position: absolute; top: -14px; right: 32px;
  background: var(--primary); color: var(--on-primary);
  padding: 6px 16px; border-radius: 999px; font-size: .78rem;
}
.price-card__tier { color: var(--text-muted); letter-spacing: .18em; text-transform: uppercase; font-size: .82rem; }
.price-card__price { font-size: 3rem; font-weight: 500; margin: 10px 0 4px; }
.price-card__price span { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.price-card__list { margin: 28px 0; display: grid; gap: 14px; }
.price-card__list li { display: flex; gap: 12px; color: var(--text-muted); font-size: .94rem; }
.price-card__list svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; margin-top: 3px; }

/* ---------- FAQ accordion ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: 16px; margin-bottom: 16px; overflow: hidden; background: var(--surface); transition: border-color .25s ease; }
.faq-item.open { border-color: var(--primary); }
.faq-q {
  width: 100%; text-align: left;
  padding: 22px 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  font-size: 1.08rem; font-weight: 500; color: var(--text);
}
.faq-q .icon { width: 26px; height: 26px; flex-shrink: 0; position: relative; transition: transform .3s ease; color: var(--primary); }
.faq-item.open .faq-q .icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a p { padding: 0 26px 24px; color: var(--text-muted); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band__box {
  background: linear-gradient(135deg, var(--primary), var(--pink));
  border-radius: 28px;
  padding: 64px 40px;
  color: #fff;
}
.cta-band__box h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 500; margin-bottom: 16px; }
.cta-band__box p { opacity: .92; max-width: 560px; margin: 0 auto 30px; }
.cta-band .btn-primary { background: #fff; color: var(--primary); box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.cta-band .btn-primary:hover { background: #f2f2f2; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 40px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand img { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--border); }
.footer__brand b { font-weight: 500; }
.footer__brand b span { color: var(--primary); }
.footer__links { display: flex; gap: 8px; flex-wrap: wrap; }
.footer__links a { color: var(--text-muted); padding: 6px 12px; border-radius: 8px; transition: color .25s ease; }
.footer__links a:hover, .footer__links a.active { color: var(--primary); }
.footer__copy { color: var(--text-dim); font-size: .88rem; }
.footer__copy a { color: var(--text-muted); }
.footer__copy a:hover { color: var(--primary); }

/* ---------- Cookie banner ---------- */
.cookie {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483647;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  text-align: center;
  transform: translateY(100%);
  transition: transform .4s ease;
}
.cookie.show { transform: translateY(0); }
.cookie p { color: var(--text-muted); font-size: .9rem; margin: 0; }
.cookie a { color: var(--primary); text-decoration: underline; }
.cookie button {
  background: var(--primary); color: var(--on-primary);
  padding: 10px 22px; border-radius: 999px; font-size: .82rem;
  letter-spacing: .1em; text-transform: uppercase;
  transition: background .25s ease, transform .25s ease;
}
.cookie button:hover { background: var(--primary-2); transform: translateY(-2px); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; left: 26px; bottom: 26px; z-index: 140;
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center;
  box-shadow: 0 12px 28px var(--ring);
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: all .3s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--primary-2); transform: translateY(-3px); }
.to-top svg { width: 20px; height: 20px; }

/* ---------- Custom tooltip ---------- */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: .78rem;
  white-space: nowrap;
  max-width: 240px;
  white-space: normal;
  width: max-content;
  max-width: 220px;
  text-align: center;
  opacity: 0; visibility: hidden;
  pointer-events: none;
  transition: all .25s ease;
  box-shadow: var(--shadow-sm);
  z-index: 50;
  line-height: 1.4;
}
[data-tip]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border);
  opacity: 0; visibility: hidden;
  transition: all .25s ease;
  z-index: 50;
}
[data-tip]:hover::after { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
[data-tip]:hover::before { opacity: 1; visibility: visible; }

/* Header/nav tooltips drop DOWN so they aren't clipped by the top of the screen */
.nav [data-tip]::after {
  bottom: auto;
  top: calc(100% + 10px);
  transform: translateX(-50%) translateY(-6px);
}
.nav [data-tip]:hover::after { transform: translateX(-50%) translateY(0); }
.nav [data-tip]::before {
  bottom: auto;
  top: calc(100% + 4px);
  border-top-color: transparent;
  border-bottom-color: var(--border);
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
/* Above-the-fold hero content animates in via CSS immediately (independent of
   main.js) so the LCP element paints right away instead of waiting for scripts. */
.hero .reveal,
.page-hero .reveal { animation: revealIn .7s cubic-bezier(.2,.8,.2,1) both; }
.hero .reveal.d1, .page-hero .reveal.d1 { animation-delay: .08s; }
.hero .reveal.d2, .page-hero .reveal.d2 { animation-delay: .16s; }
.hero .reveal.d3, .page-hero .reveal.d3 { animation-delay: .24s; }
.hero .reveal.d4, .page-hero .reveal.d4 { animation-delay: .32s; }
@keyframes revealIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
/* The largest hero elements (title, photo, inner-page H1) must stay eligible for
   LCP and paint at first render, so they are shown immediately with no opacity or
   transform animation (supporting hero elements still fade in via revealIn). */
.hero__photo.reveal,
.hero__title.reveal,
.page-hero h1.reveal { opacity: 1; transform: none; animation: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Skip link (keyboard / screen-reader accessibility) ---------- */
.skip-link {
  position: fixed;
  top: -80px;
  left: 12px;
  z-index: 100001;
  padding: 12px 20px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 500;
  border-radius: 0 0 12px 12px;
  box-shadow: var(--glow);
  transition: top .22s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__content { order: 1; }
  .hero__photo { order: 2; max-width: 340px; margin: 0 auto; justify-self: center; }
  .hero__photo-frame { height: auto; width: 100%; }
  .touch__grid { grid-template-columns: 1fr; gap: 40px; }
  .skills__grid { grid-template-columns: repeat(4, 1fr); }
  .skill:nth-child(4n) { border-right: none; }
  .blog__grid { grid-template-columns: repeat(2, 1fr); }
  .blog-card:last-child { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .nav__links, .nav__social { display: none; }
  .theme-toggle { display: none; }
  .nav__menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--border);
    color: var(--text); transition: all .25s ease; flex-shrink: 0;
  }
  .nav__menu-btn:hover { color: var(--primary); border-color: var(--primary); }
  .nav__links.mobile-open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 74px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px; gap: 4px;
  }
  .nav__links.mobile-open a { padding: 12px 14px; }
  .nav__links.mobile-open a::after { display: none; }
  .exp__grid { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: 1fr; }
  .pricing__grid { grid-template-columns: 1fr; }
  .testi__grid {
    grid-template-columns: none;
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .testi__grid::-webkit-scrollbar { display: none; }
  .testi__grid > .testi-card {
    flex: 0 0 100%;
    scroll-snap-align: start;
    opacity: 1;
    transform: none;
  }
  .testi__nav { display: flex; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 68px 0; }
  .stats__grid { grid-template-columns: 1fr; gap: 26px; }
  .stat { justify-content: center; }
  .skills__grid { grid-template-columns: repeat(2, 1fr); }
  .skill { border-right: 1px solid var(--border) !important; }
  .skill:nth-child(2n) { border-right: none !important; }
  .blog__grid { grid-template-columns: 1fr; }
  .blog-card:last-child { grid-column: auto; }
  .offer-item { grid-template-columns: 1fr auto; }
  .offer-item__desc { grid-column: 1 / -1; }
  .svc-card { flex-direction: column; align-items: flex-start; text-align: left; }
  .form-card { padding: 28px 22px; }
  .cta-band__box { padding: 44px 24px; }
  .hero__cta { width: 100%; }
  .hero__cta .btn { flex: 1; justify-content: center; }
}

/* ===================== Neon glow + additions ===================== */
.type-cursor {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--primary);
  margin-left: 4px;
  vertical-align: -0.14em;
  box-shadow: var(--glow);
  animation: blink 1s steps(1) infinite;
}
.hero__title .accent { text-shadow: var(--glow); }
.nav__brand b span, .footer__brand b span { text-shadow: var(--glow); }
.btn-primary { box-shadow: 0 8px 26px var(--ring), 0 0 12px var(--ring); }
.btn-primary:hover { box-shadow: var(--glow-strong), 0 16px 38px var(--ring); }
.btn-ghost:hover { box-shadow: 0 0 18px var(--ring); }
.tech-chip:hover { box-shadow: var(--glow); }
.stat__plus, .stat__suffix { text-shadow: var(--glow); }
.offer-item:hover .offer-item__arrow { box-shadow: var(--glow); }
.svc-card:hover, .testi-card:hover, .blog-card:hover, .price-card:hover,
.price-card--featured, .info-card:hover { box-shadow: var(--glow), var(--shadow-sm); }
.svc-card:hover .svc-card__arrow, .to-top, .cookie button { box-shadow: var(--glow); }
.faq-item.open { box-shadow: var(--glow); }
.skill__pct { color: var(--primary); }
.timeline__item::before { box-shadow: 0 0 0 4px var(--primary-soft), var(--glow); }
.brand-logo:hover { color: var(--primary); text-shadow: var(--glow); }
.hero__decor svg { filter: drop-shadow(0 0 14px var(--ring)); }
.nav__links a:hover, .footer__links a:hover { text-shadow: var(--glow); }

/* Modal popup (centered) */
.modal-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.62); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 42px 36px; max-width: 470px; width: 100%; text-align: center; box-shadow: var(--shadow), var(--glow); transform: scale(.88) translateY(12px); transition: transform .38s cubic-bezier(.2,.9,.2,1); position: relative; }
.modal-overlay.open .modal { transform: none; }
.modal__icon { width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 22px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); box-shadow: var(--glow); }
.modal__icon svg { width: 32px; height: 32px; }
.modal h3 { font-size: 1.5rem; font-weight: 500; margin-bottom: 12px; }
.modal p { color: var(--text-muted); margin-bottom: 26px; }
.modal__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.modal__close { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); color: var(--text); display: grid; place-items: center; transition: all .25s ease; }
.modal__close:hover { color: var(--pink); border-color: var(--pink); transform: rotate(90deg); }
.modal__close svg { width: 18px; height: 18px; }

/* Legal / prose pages */
.prose { max-width: 840px; margin: 0 auto; }
.prose h2 { font-size: 1.4rem; font-weight: 500; color: var(--primary); margin: 38px 0 14px; text-shadow: var(--glow); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-muted); margin-bottom: 14px; }
.prose ul { padding-left: 22px; list-style: disc; margin-bottom: 14px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--primary); text-decoration: underline; }
.prose strong { color: var(--text); font-weight: 500; }
.prose .updated { color: var(--text-dim); font-size: .9rem; margin-bottom: 30px; }
.prose .lead { color: var(--text); font-size: 1.05rem; margin-bottom: 24px; }

/* ---------- Cursor follower (subtle, fine-pointer devices only) ---------- */
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 26px; height: 26px;
  border: 1.5px solid var(--primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity .3s ease, width .25s ease, height .25s ease, background-color .25s ease, border-color .25s ease;
  will-change: transform;
}
.cursor-ring.is-visible { opacity: .5; }
.cursor-ring.is-active {
  width: 46px; height: 46px;
  background-color: var(--primary-soft);
  opacity: .72;
}
@media (hover: none), (pointer: coarse) { .cursor-ring { display: none; } }
@media (prefers-reduced-motion: reduce) { .cursor-ring { display: none; } }

/* ---------- Right-click guard popup (playful, centered, green glow) ---------- */
.rc-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.86);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(90vw, 360px);
  padding: 30px 28px;
  text-align: center;
  border-radius: 20px;
  border: 1.5px solid var(--primary);
  background: #000;
  color: var(--primary);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(31, 217, 138, .25),
              0 0 22px rgba(31, 217, 138, .55),
              0 0 60px rgba(31, 217, 138, .35),
              inset 0 0 22px rgba(31, 217, 138, .12);
  transition: opacity .28s ease, transform .28s cubic-bezier(.2, .9, .2, 1), visibility .28s;
  will-change: transform, opacity;
}
[data-theme="light"] .rc-popup {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 163, 94, .22),
              0 0 22px rgba(0, 163, 94, .5),
              0 0 60px rgba(0, 163, 94, .3),
              inset 0 0 22px rgba(0, 163, 94, .1);
}
.rc-popup.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
  animation: rcGlow 1.8s ease-in-out infinite;
}
.rc-popup__icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  box-shadow: 0 0 16px rgba(31, 217, 138, .55), inset 0 0 12px rgba(31, 217, 138, .25);
}
[data-theme="light"] .rc-popup__icon {
  box-shadow: 0 0 16px rgba(0, 163, 94, .5), inset 0 0 12px rgba(0, 163, 94, .22);
}
.rc-popup__icon svg { width: 28px; height: 28px; }
.rc-popup__text {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.5;
  font-weight: 500;
  text-shadow: 0 0 12px rgba(31, 217, 138, .5);
  letter-spacing: .2px;
}
[data-theme="light"] .rc-popup__text { text-shadow: 0 0 10px rgba(0, 163, 94, .35); }
@keyframes rcGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(31, 217, 138, .25), 0 0 22px rgba(31, 217, 138, .5), 0 0 60px rgba(31, 217, 138, .3), inset 0 0 22px rgba(31, 217, 138, .12); }
  50%      { box-shadow: 0 0 0 1px rgba(31, 217, 138, .4), 0 0 32px rgba(31, 217, 138, .8), 0 0 80px rgba(31, 217, 138, .5), inset 0 0 26px rgba(31, 217, 138, .2); }
}
[data-theme="light"] .rc-popup.show { animation: rcGlowLight 1.8s ease-in-out infinite; }
@keyframes rcGlowLight {
  0%, 100% { box-shadow: 0 0 0 1px rgba(0, 163, 94, .22), 0 0 22px rgba(0, 163, 94, .45), 0 0 60px rgba(0, 163, 94, .28), inset 0 0 22px rgba(0, 163, 94, .1); }
  50%      { box-shadow: 0 0 0 1px rgba(0, 163, 94, .38), 0 0 32px rgba(0, 163, 94, .7), 0 0 80px rgba(0, 163, 94, .45), inset 0 0 26px rgba(0, 163, 94, .18); }
}
@media (prefers-reduced-motion: reduce) {
  .rc-popup.show, [data-theme="light"] .rc-popup.show { animation: none; }
}
