/* ==========================================================================
   Keshav Rajput portfolio
   Two themes (dark default, light) driven by [data-theme] on <html>.
   Motion is progressive: content is visible without JavaScript, and all
   motion is disabled for visitors who prefer reduced motion.
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #070B14;
  --bg-2: #0B1222;
  --surface: #111A2E;
  --surface-hover: #172340;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.26);
  --text: #C7D2E0;
  --text-strong: #F8FAFC;
  --muted: #8A9BB5;
  --accent: #2DD4BF;
  --accent-text: #5EEAD4;
  --on-accent: #04201C;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --accent-line: rgba(45, 212, 191, 0.4);
  --highlight: #FBBF24;
  --danger: #FDA4AF;
  --success: #86EFAC;
  --input-bg: #0B1222;
  --placeholder: #5B6881;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 48px -28px rgba(0, 0, 0, 0.8);
  --glow: 0 12px 36px -12px rgba(45, 212, 191, 0.55);
  --grad: linear-gradient(120deg, #2DD4BF 0%, #818CF8 55%, #FBBF24 100%);
  --blob-a: rgba(45, 212, 191, 0.35);
  --blob-b: rgba(129, 140, 248, 0.32);
  --blob-c: rgba(251, 191, 36, 0.16);
  --grid-line: rgba(148, 163, 184, 0.07);
  --header-bg: rgba(7, 11, 20, 0.82);
  --spot: rgba(45, 212, 191, 0.12);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-space: clamp(4.5rem, 9vw, 7.5rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --font-head: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F5F7FB;
  --bg-2: #EBF0F7;
  --surface: #FFFFFF;
  --surface-hover: #F8FAFD;
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.18);
  --text: #334155;
  --text-strong: #0B1220;
  --muted: #5B6B82;
  --accent: #0F766E;
  --accent-text: #0F766E;
  --on-accent: #FFFFFF;
  --accent-soft: rgba(15, 118, 110, 0.1);
  --accent-line: rgba(15, 118, 110, 0.4);
  --highlight: #B45309;
  --danger: #BE123C;
  --success: #15803D;
  --input-bg: #FFFFFF;
  --placeholder: #8A97AB;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 24px 48px -30px rgba(15, 23, 42, 0.3);
  --glow: 0 12px 30px -14px rgba(15, 118, 110, 0.55);
  --grad: linear-gradient(120deg, #0F766E 0%, #4338CA 60%, #7C3AED 100%);
  --blob-a: rgba(45, 212, 191, 0.22);
  --blob-b: rgba(129, 140, 248, 0.2);
  --blob-c: rgba(251, 191, 36, 0.14);
  --grid-line: rgba(15, 23, 42, 0.06);
  --header-bg: rgba(245, 247, 251, 0.85);
  --spot: rgba(15, 118, 110, 0.08);
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  transition: background-color 0.4s var(--ease);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition: color 0.4s var(--ease), background-color 0.4s var(--ease);
}

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

a {
  color: var(--accent-text);
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--text-strong);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0;
}

h1 { font-size: clamp(2.5rem, 1.3rem + 4vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); font-weight: 800; }
h3 { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.015em; }

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
}

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

.skip-link {
  position: absolute; top: 10px; left: 10px; z-index: 200;
  padding: 0.6rem 1rem; background: var(--accent); color: var(--on-accent);
  border-radius: var(--radius-sm); font-weight: 700;
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

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

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: gradShift 9s ease-in-out infinite;
}

/* ---------- Scroll progress ---------- */

.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 100;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
  order: 3;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  color: var(--text-strong); text-decoration: none;
  font-family: var(--font-head); font-weight: 700;
}
.brand:hover { color: var(--text-strong); }

.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--grad);
  background-size: 200% 200%;
  animation: gradShift 8s ease-in-out infinite;
  color: #fff; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.02em;
  box-shadow: var(--glow);
}

.brand-name { font-size: 1rem; }

.theme-toggle {
  position: relative;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-strong);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.2s ease, background-color 0.3s ease;
}
.theme-toggle:hover { border-color: var(--accent-line); transform: rotate(-12deg); }

.theme-toggle svg {
  position: absolute;
  width: 19px; height: 19px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.5s var(--ease), opacity 0.3s ease;
}
/* Dark theme shows the moon, which offers light. Light theme shows the sun. */
:root[data-theme="dark"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(90deg) scale(0.4); }
:root[data-theme="dark"] .theme-toggle .icon-moon { opacity: 1; transform: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.4); }
:root[data-theme="light"] .theme-toggle .icon-sun { opacity: 1; transform: none; color: var(--highlight); }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 0.55rem;
  min-height: 44px; padding: 0 0.85rem;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; font-size: 0.92rem;
  color: var(--text-strong); cursor: pointer;
}

.nav-toggle-bars { position: relative; width: 18px; height: 12px; }
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform 0.25s var(--ease), top 0.25s var(--ease);
}
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { top: 10px; }
.nav-open .nav-toggle-bars::before { top: 5px; transform: rotate(45deg); }
.nav-open .nav-toggle-bars::after { top: 5px; transform: rotate(-45deg); }

.site-nav {
  position: absolute; top: 70px; left: 0; right: 0;
  display: none; flex-direction: column; gap: 0.2rem;
  padding: 0.75rem var(--gutter) 1.25rem;
  background: var(--bg-2); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
}
.site-nav.is-open { display: flex; animation: dropIn 0.3s var(--ease); }

.site-nav a:not(.btn) {
  display: flex; align-items: center; min-height: 46px; padding: 0 0.25rem;
  font-weight: 600; color: var(--text-strong); text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.site-nav .btn { margin-top: 0.85rem; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .header-actions { margin-left: 2.2rem; }

  .site-nav {
    position: static; display: flex; flex-direction: row; align-items: center;
    gap: 1.7rem; padding: 0; background: none; border: 0; box-shadow: none;
    margin-left: auto; order: 2;
  }

  .site-nav a:not(.btn) {
    min-height: auto; padding: 0; border: 0;
    font-size: 0.93rem; font-weight: 500; color: var(--muted);
    position: relative;
  }

  .site-nav a:not(.btn)::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
    background: var(--grad); border-radius: 2px;
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.35s var(--ease);
  }
  .site-nav a:not(.btn):hover { color: var(--text-strong); }
  .site-nav a:not(.btn):hover::after { transform: scaleX(1); }
  .site-nav .btn { margin-top: 0; }
}

/* ---------- Buttons, chips, pills ---------- */

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 50px; padding: 0.8rem 1.45rem;
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 0.95rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; isolation: isolate;
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent); color: var(--on-accent);
  box-shadow: var(--glow);
}
.btn-primary:hover { color: var(--on-accent); box-shadow: 0 18px 40px -14px rgba(45, 212, 191, 0.6); }
:root[data-theme="light"] .btn-primary:hover { box-shadow: 0 18px 36px -14px rgba(15, 118, 110, 0.6); }

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

.btn-sm { min-height: 42px; padding: 0.5rem 1.1rem; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.chips, .tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.chips li, .tags li {
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem; font-weight: 600; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; white-space: nowrap;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s var(--ease);
}
.chips li { padding: 0.36rem 0.9rem; font-size: 0.85rem; }
.chips li:hover, .tags li:hover { border-color: var(--accent-line); color: var(--text-strong); transform: translateY(-1px); }

.pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.5rem 0.95rem; border-radius: 999px;
  font-size: 0.88rem; font-weight: 600; color: var(--text-strong);
  background: var(--surface-hover); border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.pill:hover { border-color: var(--accent-line); color: var(--accent-text); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(3.5rem, 7vw, 5.5rem);
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.9;
  will-change: transform;
}
.blob-a { width: 520px; height: 520px; background: var(--blob-a); top: -160px; left: -120px; animation: float1 18s ease-in-out infinite; }
.blob-b { width: 460px; height: 460px; background: var(--blob-b); top: 10%; right: -140px; animation: float2 22s ease-in-out infinite; }
.blob-c { width: 300px; height: 300px; background: var(--blob-c); bottom: -120px; left: 35%; animation: float3 26s ease-in-out infinite; }

.grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 30% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 30% 30%, #000 30%, transparent 75%);
}

.hero-grid {
  display: grid;
  gap: 3.5rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 4.5rem; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin: 0 0 1.1rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-text);
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--grad);
}

.role-ticker {
  display: flex; width: max-content; max-width: 100%;
  align-items: center; gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.45rem 0.95rem 0.45rem 0.6rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 0.92rem;
  color: var(--text);
  box-shadow: var(--shadow);
}
.role-label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--muted);
}
.role-label::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-line);
  animation: pulse 2.2s ease-out infinite;
}
.role-word {
  font-weight: 700; color: var(--text-strong);
  display: inline-block;
}

/* Words are stacked in one grid cell: the box is always as wide as the longest word. */
.role-stack { display: inline-grid; white-space: nowrap; }
.role-option {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(10px);
  filter: blur(4px);
  /* Outgoing word fades quickly; incoming word waits for it, so the two never overlap. */
  transition: opacity 0.22s ease, transform 0.22s ease, filter 0.22s ease;
}
.role-option.is-active {
  opacity: 1; transform: none; filter: none;
  transition: opacity 0.45s ease 0.24s, transform 0.45s var(--ease) 0.24s, filter 0.45s ease 0.24s;
}

.hero h1 { max-width: 20ch; }

.lede {
  margin-top: 1.4rem; max-width: 54ch;
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.2rem);
  color: var(--muted);
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.1rem; }
.hero .chips { margin-top: 2rem; }

/* Profile card */

.profile-card {
  position: relative;
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform-style: preserve-3d;
}

.profile-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad);
}

.profile-card::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--spot), transparent 60%);
  opacity: 0; transition: opacity 0.4s ease;
}
.profile-card:hover::after { opacity: 1; }

.profile-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-hover);
  outline: 1px solid var(--border);
  outline-offset: -1px;
}

.profile-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  transition: transform 0.8s var(--ease);
}
.profile-card:hover .profile-img { transform: scale(1.04); }

.profile-initials {
  position: absolute; inset: 0; display: none; place-items: center;
  font-family: var(--font-head); font-size: 3.6rem; font-weight: 800;
  color: var(--accent-text);
  background: radial-gradient(circle at 30% 20%, var(--accent-soft), transparent 70%), var(--surface-hover);
}
.profile-photo.is-fallback .profile-img { display: none; }
.profile-photo.is-fallback .profile-initials { display: grid; }

.float-badge {
  position: absolute; z-index: 2;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem; font-weight: 700;
  color: var(--text-strong);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.45);
  animation: bob 5s ease-in-out infinite;
}
.fb-1 { top: 2.2rem; right: 2.2rem; animation-delay: -1s; }
.fb-2 { top: 12.6rem; left: 2.2rem; animation-delay: -3s; }

.profile-body { padding-top: 1.25rem; }
.profile-name {
  font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; color: var(--text-strong);
}
.profile-role { margin-top: 0.2rem; font-weight: 600; color: var(--accent-text); }
.profile-meta { margin-top: 0.3rem; font-size: 0.9rem; color: var(--muted); }
.profile-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; }

/* ---------- Marquee ---------- */

.marquee {
  position: relative;
  overflow: hidden;
  padding-block: 1.1rem;
  border-block: 1px solid var(--border);
  background: var(--bg-2);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-group { display: flex; align-items: center; gap: 1.5rem; padding-right: 1.5rem; }

.marquee-item {
  font-family: var(--font-head);
  font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em;
  color: var(--muted); white-space: nowrap;
}
.marquee-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--grad); flex: none;
}

/* ---------- Impact ---------- */

.impact { padding-block: clamp(3rem, 6vw, 4.5rem); }

.impact-head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem;
  margin-bottom: 2rem;
}

.note { font-size: 0.85rem; color: var(--muted); }

.stat-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.stat {
  position: relative;
  padding: 1.5rem 1.5rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.3s ease, box-shadow 0.35s ease;
}
.stat::before {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 2px;
  background: var(--grad); opacity: 0.8;
}
.stat:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow); }

.stat-value {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 1rem + 0.9vw, 1.75rem);
  font-weight: 800; color: var(--highlight); letter-spacing: -0.02em;
}
.stat-label { margin-top: 0.4rem; font-size: 0.9rem; color: var(--text); }

.stat-secondary {
  display: flex; flex-wrap: wrap; gap: 0.7rem;
  margin-top: 1.5rem;
}
.stat-secondary li {
  padding: 0.55rem 0.95rem;
  font-size: 0.9rem; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.stat-secondary strong { color: var(--text-strong); font-weight: 800; font-family: var(--font-head); }

/* ---------- Sections ---------- */

.section { padding-block: var(--section-space); position: relative; }

.section-alt {
  background: var(--bg-2);
  border-block: 1px solid var(--border);
}

.section-head {
  display: grid; gap: 0.9rem;
  max-width: 48rem;
  margin-bottom: clamp(2.5rem, 4.5vw, 3.5rem);
}

.section-intro {
  color: var(--muted); font-size: 1.06rem; max-width: 54ch;
}

/* ---------- Filters ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.filter {
  min-height: 44px; padding: 0.5rem 1.1rem;
  border-radius: 999px; border: 1px solid var(--border-strong);
  background: transparent; color: var(--text);
  font: inherit; font-weight: 600; font-size: 0.92rem; cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease);
}
.filter:hover { border-color: var(--accent-line); color: var(--text-strong); transform: translateY(-1px); }

.filter[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
  box-shadow: var(--glow);
}

.filter .count {
  display: inline-block; min-width: 1.5em; margin-left: 0.3rem; padding: 0 0.4rem;
  border-radius: 999px; font-size: 0.78rem; line-height: 1.5;
  background: var(--accent-soft); color: var(--accent-text);
}
.filter[aria-pressed="true"] .count { background: rgba(0, 0, 0, 0.16); color: inherit; }

.filter-status { margin-top: 1rem; min-height: 1.5em; font-size: 0.9rem; color: var(--muted); }

/* ---------- Spotlight (pointer-follow glow on cards) ---------- */

.spotlight { position: relative; isolation: isolate; }
.spotlight::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), var(--spot), transparent 65%);
  opacity: 0; transition: opacity 0.35s ease;
}
.spotlight:hover::after { opacity: 1; }

/* ---------- Project cards ---------- */

.project-grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 1.5rem;
}
@media (min-width: 900px) { .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.project-card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.45s var(--ease), border-color 0.3s ease, box-shadow 0.45s ease;
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: 0 30px 60px -32px rgba(0, 0, 0, 0.6);
}
:root[data-theme="light"] .project-card:hover { box-shadow: 0 30px 60px -34px rgba(15, 23, 42, 0.35); }

.shot {
  position: relative; margin: 0; aspect-ratio: 16 / 10; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, transparent 0 16px, var(--grid-line) 16px 17px),
    var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.shot-frame { position: absolute; inset: 0; display: block; overflow: hidden; }

.shot-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  transition: transform 0.9s var(--ease);
}
.project-card:hover .shot-img { transform: scale(1.04); }

.shot-img-contain { object-fit: contain; object-position: center; background: var(--bg-2); }

/* Shine sweep across the screenshot on hover */
.shot-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.12) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.9s var(--ease);
}
.project-card:hover .shot-frame::after { transform: translateX(100%); }

.shot-pending {
  position: absolute; inset: 0; display: none;
  flex-direction: column; justify-content: center; gap: 0.3rem;
  padding: 1.5rem; color: var(--muted); font-size: 0.9rem;
  background: var(--bg-2);
}
.shot-pending strong { color: var(--text-strong); font-weight: 700; }
.shot.is-pending .shot-img { display: none; }
.shot.is-pending .shot-pending { display: flex; }

.card-body {
  display: flex; flex: 1; flex-direction: column; gap: 0.85rem;
  padding: 1.6rem 1.7rem 1.7rem;
}

.card-meta {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-text);
}

.card-body h3 a { color: var(--text-strong); text-decoration: none; }
.card-body h3 a:hover {
  color: var(--accent-text); text-decoration: underline; text-underline-offset: 4px;
}

.card-desc { color: var(--text); font-size: 0.98rem; }

.card-role {
  font-size: 0.92rem; color: var(--muted);
  padding: 0.7rem 0.9rem;
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.card-role strong { color: var(--text-strong); font-weight: 700; }

.card-cta {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 44px; padding: 0.5rem 0;
  font-weight: 700; color: var(--accent-text); text-decoration: none;
}
.card-cta .arrow-up { transition: transform 0.3s var(--ease); }
.card-cta:hover { text-decoration: underline; text-underline-offset: 4px; }
.card-cta:hover .arrow-up { transform: translate(3px, -3px); }

.view-switch { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.9rem 1.7rem 0; }

.view-switch button {
  min-width: 44px; min-height: 38px; padding: 0.35rem 0.8rem;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: transparent; color: var(--text);
  font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.view-switch button:hover { border-color: var(--accent-line); color: var(--text-strong); }
.view-switch button[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
}

.view-note { padding: 0.6rem 1.7rem 0; font-size: 0.85rem; color: var(--muted); }

/* ---------- Skills ---------- */

.skill-grid { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .skill-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.skill-card {
  display: flex; flex-direction: column; gap: 1.1rem;
  padding: 1.7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.4s var(--ease), border-color 0.3s ease;
}
.skill-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }

.skill-icon {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent-text);
  font-family: var(--font-head); font-weight: 800; font-size: 0.85rem;
}

.skill-card h3 { font-size: 1.12rem; }

/* ---------- Experience timeline ---------- */

.timeline {
  position: relative;
  display: grid; gap: 1.5rem;
  padding-left: 1.8rem;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  padding: 1.4rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.3s ease, transform 0.4s var(--ease);
}
.timeline-item:hover { border-color: var(--border-strong); transform: translateX(4px); }

.timeline-item::before {
  content: ""; position: absolute;
  left: calc(-1.8rem - 7px - 1px); top: 1.9rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline-item.in::before { animation: pulse 2.6s ease-out 0.6s 2; }

.timeline-date { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; color: var(--highlight); }
.timeline-item h3 { margin-top: 0.35rem; font-size: 1.12rem; }
.timeline-item h3 span { color: var(--muted); font-weight: 600; }

.timeline-points { display: grid; gap: 0.45rem; margin-top: 0.9rem; }
.timeline-points li {
  position: relative; padding-left: 1.1rem; font-size: 0.95rem; color: var(--text);
}
.timeline-points li::before {
  content: ""; position: absolute; left: 0; top: 0.72em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

@media (min-width: 900px) {
  .timeline { padding-left: 2.2rem; }
  .timeline-item { padding: 1.6rem 1.9rem; }
  .timeline-item::before { left: calc(-2.2rem - 7px - 1px); }
}

/* ---------- Tools and builds ---------- */

.build-grid { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .build-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .build-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.build-card {
  display: flex; flex-direction: column; gap: 0.8rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.4s var(--ease), border-color 0.3s ease;
}
.build-card:hover { transform: translateY(-4px); border-color: var(--accent-line); }
.build-card p { color: var(--muted); font-size: 0.95rem; flex: 1; }

/* ---------- Services ---------- */

.service-grid { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.service-card {
  display: flex; flex-direction: column; gap: 1rem;
  padding: 1.7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.4s var(--ease), border-color 0.3s ease, box-shadow 0.4s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow);
}

.service-top { display: flex; align-items: center; justify-content: space-between; }

.service-icon {
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 15px;
  background: var(--grad);
  color: #fff;
  box-shadow: var(--glow);
  transition: transform 0.5s var(--ease);
}
:root[data-theme="light"] .service-icon { color: #fff; }
.service-card:hover .service-icon { transform: rotate(-8deg) scale(1.06); }
.service-icon svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.service-num {
  font-family: var(--font-head); font-size: 0.85rem; font-weight: 800;
  letter-spacing: 0.08em; color: var(--muted);
}

.service-card h3 { font-size: 1.12rem; }

.service-list { display: grid; gap: 0.55rem; }
.service-list li {
  position: relative; padding-left: 1.25rem;
  font-size: 0.95rem; color: var(--text);
}
.service-list li::before {
  content: ""; position: absolute; left: 0; top: 0.7em;
  width: 8px; height: 2px; border-radius: 2px; background: var(--grad);
}

/* ---------- About ---------- */

.about-grid { display: grid; gap: 2.5rem; }
@media (min-width: 900px) {
  .about-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4.5rem; }
}

.about-lede {
  font-family: var(--font-head);
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.45rem);
  font-weight: 600; color: var(--text-strong); line-height: 1.5;
}

.about-body { display: grid; gap: 1.1rem; color: var(--muted); }

.about-meta { display: grid; gap: 2rem; margin-top: 1rem; }
@media (min-width: 620px) { .about-meta { grid-template-columns: 1.4fr 1fr; } }

.meta-title {
  margin-bottom: 0.6rem;
  font-family: var(--font-body); font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text);
}

.meta-list { display: grid; gap: 0.5rem; margin-bottom: 1.4rem; color: var(--text); font-size: 0.95rem; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; gap: 3rem; }
@media (min-width: 960px) {
  .contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 4.5rem; align-items: start; }
}

.channels { display: grid; gap: 0.8rem; margin-top: 2rem; }

.channel {
  position: relative;
  display: grid; gap: 0.15rem;
  padding: 1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-strong); text-decoration: none;
  transition: border-color 0.25s ease, transform 0.35s var(--ease), background-color 0.25s ease;
}
.channel::after {
  content: "→"; position: absolute; right: 1.2rem; top: 50%;
  transform: translate(-6px, -50%); opacity: 0; color: var(--accent-text);
  transition: transform 0.35s var(--ease), opacity 0.35s ease;
}
.channel:hover {
  border-color: var(--accent-line); background: var(--surface-hover);
  color: var(--text-strong); transform: translateX(4px);
}
.channel:hover::after { opacity: 1; transform: translate(0, -50%); }

.channel-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.channel-value { font-weight: 600; overflow-wrap: anywhere; }

.enquiry {
  display: grid; gap: 1.2rem;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-row { display: grid; gap: 1.2rem; }
@media (min-width: 620px) { .form-row { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: 0.45rem; min-width: 0; }
.field > span { font-size: 0.88rem; font-weight: 600; color: var(--text-strong); }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }

.field input,
.field select,
.field textarea {
  width: 100%; min-height: 50px;
  padding: 0.75rem 1rem;
  font: inherit; font-size: 1rem; color: var(--text-strong);
  background: var(--input-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.25s ease, background-color 0.3s ease;
}

.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
}
.field select option { background: var(--surface); color: var(--text-strong); }

.field textarea { min-height: 140px; resize: vertical; }

.field input::placeholder,
.field textarea::placeholder { color: var(--placeholder); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.field input:user-invalid,
.field select:user-invalid,
.field textarea:user-invalid { border-color: var(--danger); }

.form-note { font-size: 0.88rem; color: var(--muted); }
.form-status { min-height: 1.4em; font-size: 0.95rem; font-weight: 600; color: var(--text-strong); }
.form-status.is-error { color: var(--danger); }
.form-status.is-success { color: var(--success); }

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 2.5rem 2.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}

.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem 2rem; font-size: 0.9rem; color: var(--muted);
}
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-inner a { color: var(--muted); text-decoration: none; transition: color 0.2s ease; }
.footer-inner a:hover { color: var(--text-strong); }

/* ---------- Motion: reveal on scroll (only when JS is running) ---------- */

.js-reveal .reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js-reveal .reveal.in { opacity: 1; transform: none; filter: none; }

/* Hero entrance (runs once on load, JS only) */
.js-reveal .hero .eyebrow,
.js-reveal .hero .role-ticker,
.js-reveal .hero h1,
.js-reveal .hero .lede,
.js-reveal .hero .actions,
.js-reveal .hero .chips {
  animation: riseIn 0.9s var(--ease) both;
}
.js-reveal .hero h1 { animation-delay: 0.12s; }
.js-reveal .hero .role-ticker { animation-delay: 0.05s; }
.js-reveal .hero .lede { animation-delay: 0.25s; }
.js-reveal .hero .actions { animation-delay: 0.35s; }
.js-reveal .hero .chips { animation-delay: 0.45s; }
.js-reveal .profile-card { animation: riseIn 1s var(--ease) 0.2s both; }

/* Light theme glows stay soft; neon-like saturation is not the goal. */
:root[data-theme="light"] .blob { opacity: 0.7; }

/* ---------- Keyframes ---------- */

@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes float1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, 40px) scale(1.08); } }
@keyframes float2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-50px, 60px) scale(0.94); } }
@keyframes float3 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(40px, -50px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes gradShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-line); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Small screens ---------- */

@media (max-width: 420px) {
  .card-body { padding: 1.3rem 1.2rem 1.4rem; }
  .view-switch { padding: 0.9rem 1.2rem 0; }
  .view-note { padding: 0.6rem 1.2rem 0; }
  .profile-card { padding: 1.1rem; }
  .fb-1 { top: 1.6rem; right: 1.4rem; }
  .fb-2 { top: 11.2rem; left: 1.4rem; }
  .float-badge { font-size: 0.74rem; }
  .brand-name { font-size: 0.95rem; }
}

/* ---------- Reduced motion: keep the design, drop the movement ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .marquee-track { animation: none; }
  .blob { animation: none; }
  .float-badge { animation: none; }
  .js-reveal .reveal { opacity: 1; transform: none; filter: none; }
  .project-card:hover,
  .skill-card:hover,
  .service-card:hover,
  .stat:hover,
  .channel:hover,
  .timeline-item:hover,
  .build-card:hover,
  .btn:hover,
  .theme-toggle:hover { transform: none; }
  .project-card:hover .shot-img,
  .profile-card:hover .profile-img { transform: none; }
}

/* Ripple used by primary buttons */
.btn-primary { overflow: hidden; }
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0); opacity: 0.6;
  animation: rippleOut 0.7s var(--ease) forwards;
}
@keyframes rippleOut { to { transform: scale(1.8); opacity: 0; } }

/* ==========================================================================
   Mobile layout (phones and small tablets)
   Overrides the desktop rules above. Later rules win at equal specificity.
   ========================================================================== */

/* Small phones: keep the header on one line. */
@media (max-width: 420px) {
  .header-inner { height: 62px; }
  .site-nav { top: 62px; }
  .brand { gap: 0.5rem; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 0.74rem; }
  .brand-name { font-size: 0.92rem; white-space: nowrap; }
  .header-actions { gap: 0.45rem; }
  .theme-toggle { width: 40px; height: 40px; }
  .nav-toggle { min-height: 40px; width: 40px; padding: 0; justify-content: center; }
  .nav-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav-toggle-bars { width: 16px; }
}

@media (max-width: 640px) {
  :root { --section-space: clamp(3.25rem, 12vw, 4.5rem); --gutter: 1.1rem; }

  /* Hero: smaller type, tighter rhythm, no cramped stacking */
  .hero { padding-block: 2.25rem 2.75rem; }
  .hero-grid { gap: 2.1rem; }
  .hero h1 {
    font-size: clamp(1.95rem, 8.4vw, 2.45rem);
    line-height: 1.14;
    letter-spacing: -0.028em;
    max-width: none;
  }
  .eyebrow { font-size: 0.68rem; letter-spacing: 0.1em; gap: 0.45rem; margin-bottom: 0.8rem; }
  .eyebrow::before { width: 18px; }
  .role-ticker {
    font-size: 0.84rem;
    padding: 0.4rem 0.85rem 0.4rem 0.55rem;
    margin-bottom: 1rem;
    max-width: 100%;
  }
  .role-label { font-size: 0.84rem; }
  .lede { font-size: 0.98rem; margin-top: 1rem; line-height: 1.65; }

  /* Buttons stack full width and are easy to tap */
  .actions { flex-direction: column; margin-top: 1.5rem; gap: 0.6rem; }
  .actions .btn { width: 100%; min-height: 48px; padding: 0.75rem 1rem; font-size: 0.95rem; }
  .hero .chips { margin-top: 1.4rem; gap: 0.35rem; }
  .chips li { font-size: 0.76rem; padding: 0.3rem 0.7rem; }

  /* Profile: a compact row instead of a tall hero-sized card */
  .profile-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    column-gap: 1rem;
    align-items: center;
    padding: 0.95rem;
    border-radius: var(--radius-md);
  }
  .profile-photo { width: 92px; border-radius: 14px; }
  .profile-initials { font-size: 2rem; }
  .profile-body { padding-top: 0; min-width: 0; }
  .profile-name { font-size: 1.05rem; line-height: 1.25; }
  .profile-role { font-size: 0.86rem; line-height: 1.35; }
  .profile-meta { font-size: 0.78rem; line-height: 1.45; margin-top: 0.2rem; }
  .profile-links { margin-top: 0.7rem; gap: 0.4rem; }
  .profile-links .pill { padding: 0.38rem 0.7rem; font-size: 0.78rem; }
  .float-badge { display: none; }   /* decorative; keeps the card calm on small screens */

  /* Marquee and sections */
  .marquee-item { font-size: 0.92rem; }
  .marquee-group { gap: 1.1rem; padding-right: 1.1rem; }
  .section-head { margin-bottom: 2rem; gap: 0.7rem; }
  h2 { font-size: clamp(1.6rem, 6.6vw, 2rem); }
  .section-intro { font-size: 0.98rem; }

  /* Results: readable two-up grid */
  .stat { padding: 1.1rem 1.05rem; }
  .stat-value { font-size: 1.12rem; line-height: 1.25; }
  .stat-label { font-size: 0.82rem; line-height: 1.45; }
  .stat-secondary { gap: 0.5rem; }
  .stat-secondary li { font-size: 0.8rem; padding: 0.45rem 0.75rem; }

  /* Cards */
  .card-body { padding: 1.25rem 1.15rem 1.3rem; gap: 0.7rem; }
  .card-desc { font-size: 0.94rem; }
  .card-role { font-size: 0.86rem; padding: 0.6rem 0.75rem; }
  .view-switch { padding: 0.8rem 1.15rem 0; }
  .view-note { padding: 0.5rem 1.15rem 0; }
  .filters { gap: 0.4rem; }
  .filter { padding: 0.42rem 0.85rem; font-size: 0.86rem; }

  .skill-card, .service-card { padding: 1.3rem; }
  .skill-card h3, .service-card h3 { font-size: 1.02rem; }
  .timeline { padding-left: 1.35rem; }
  .timeline-item { padding: 1.15rem 1.1rem; }
  .timeline-item::before { left: calc(-1.35rem - 7px - 1px); }
  .timeline-item h3 { font-size: 1.02rem; }
  .timeline-points li { font-size: 0.9rem; }
  .build-card { padding: 1.2rem; }

  /* About and contact */
  .about-lede { font-size: 1.1rem; }
  .about-body { font-size: 0.96rem; }
  .enquiry { padding: 1.2rem; }
  .form-row { gap: 0.9rem; }
  .field input, .field select, .field textarea { font-size: 16px; } /* 16px stops iOS zoom on focus */
  .channel { padding: 0.85rem 1rem; }
  .channel::after { display: none; }

  .site-footer { padding-block: 2rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* Very small phones (e.g. 320px) */
@media (max-width: 360px) {
  .hero h1 { font-size: 1.82rem; }
  .profile-card { grid-template-columns: 78px minmax(0, 1fr); }
  .profile-photo { width: 78px; }
  .stat-grid { gap: 0.75rem; }
}

/* ==========================================================================
   Signature logo (header and footer)
   Two files: --dark is near-white for dark theme, --light is indigo for light.
   The logo is sized by height and keeps its proportions (no distortion).
   ========================================================================== */

.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.brand-logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: 180px;
  flex: none;
  object-fit: contain;
}

/* Show the logo that suits the current background. */
:root[data-theme="dark"] .brand-logo--light { display: none; }
:root[data-theme="light"] .brand-logo--dark { display: none; }

/* Footer logo is a little smaller. */
.site-footer .brand-logo { height: 36px; }

/* Phones: slightly smaller so the header fits on one line. */
@media (max-width: 420px) {
  .brand-logo { height: 36px; }
  .site-footer .brand-logo { height: 32px; }
}

/* ---------- Social media cards ---------- */
.social-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .social-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .social-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.social-card { gap: 0.6rem; }
.social-card h3 { overflow-wrap: anywhere; }
.social-card .card-cta { margin-top: auto; }

/* ===== v2: platform tiles, featured work, header and footer ===== */
.shot { aspect-ratio: 16 / 9; }
.shot-frame { z-index: 1; }
.shot-pending {
  --tc: #64748B;
  position: absolute; inset: 0; display: flex; flex-direction: row; align-items: center; gap: 1rem;
  padding: 1.25rem 1.5rem; color: var(--text);
  background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 22%, var(--bg-2)), var(--bg-2) 80%);
}
.shot.is-pending .shot-pending { display: flex; }
.tile--shopify { --tc: #95BF47; } .tile--wordpress { --tc: #21759B; } .tile--landing { --tc: #818CF8; } .tile--web { --tc: #2DD4BF; }
.tile-ico { flex: none; width: 56px; height: 56px; padding: 10px; border-radius: 16px; color: var(--tc); background: color-mix(in srgb, var(--tc) 16%, transparent); border: 1px solid color-mix(in srgb, var(--tc) 40%, transparent); }
:root[data-theme="light"] .tile--shopify { --tc: #5E8E3E; } :root[data-theme="light"] .tile--landing { --tc: #5B5BD6; } :root[data-theme="light"] .tile--web { --tc: #0F766E; }
.tile-txt { display: flex; flex-direction: column; min-width: 0; }
.tile-txt strong { color: var(--text-strong); font-family: var(--font-head); font-size: 1.15rem; line-height: 1.25; }
.tile-txt span { color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.tile-badge { position: absolute; top: 0.85rem; right: 0.85rem; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent); }

@media (min-width: 1100px) { .project-grid--featured { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.work-more { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2.25rem; }
.work-more p { color: var(--muted); font-size: 0.95rem; }
.page-hero { padding-top: clamp(3rem, 6vw, 5rem); }
.page-hero h1 { font-family: var(--font-head); font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.1; color: var(--text-strong); }
.page-hero .filters { margin-top: 1.75rem; }
.page-hero .project-grid { margin-top: 1.5rem; }
.cta-band .container { display: flex; flex-direction: column; align-items: flex-start; gap: 0.9rem; }
.cta-band h2 { font-family: var(--font-head); color: var(--text-strong); }
.cta-band p { color: var(--muted); max-width: 52ch; }

.social-pills { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; padding: 0; margin: 0; }
.social-pills a { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.95rem; border-radius: 999px; text-decoration: none; font-size: 0.92rem; font-weight: 500; color: var(--text-strong); background: var(--surface); border: 1px solid var(--border); transition: transform 0.25s var(--ease), border-color 0.25s ease, background 0.25s ease; }
.social-pills a:hover { transform: translateY(-2px); border-color: var(--accent-line); background: var(--accent-soft); }
.social-pills svg { width: 18px; height: 18px; color: var(--accent-text); }

/* Header */
.site-header { backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); box-shadow: 0 1px 0 var(--border), 0 12px 30px -24px rgba(0, 0, 0, 0.5); }
@media (min-width: 900px) {
  .site-nav a:not(.btn) { position: relative; padding: 0.4rem 0.15rem; }
  .site-nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
  .site-nav a:not(.btn):hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
}
.site-nav a[aria-current="page"] { color: var(--text-strong); }

/* Footer */
.site-footer { padding: clamp(3rem, 6vw, 4.5rem) 0 1.5rem; border-top: 1px solid var(--border); background: var(--bg-2); }
.footer-grid { display: grid; gap: 2.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 3rem; } }
.footer-grid nav, .footer-contact { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; }
.footer-grid a:not(.btn):not(.brand) { color: var(--muted); text-decoration: none; font-size: 0.95rem; transition: color 0.2s ease, transform 0.2s ease; overflow-wrap: anywhere; }
.footer-grid a:not(.btn):not(.brand):hover { color: var(--accent-text); transform: translateX(3px); }
.footer-title { font-family: var(--font-head); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-strong); margin: 0 0 0.35rem; }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.footer-brand p { color: var(--muted); max-width: 34ch; font-size: 0.95rem; }
.footer-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.88rem; }
.footer-bar a { color: var(--muted); text-decoration: none; } .footer-bar a:hover { color: var(--text-strong); }
@media (min-width: 900px) and (max-width: 1199px) {
  .site-nav { gap: 1rem; }
  .site-nav a:not(.btn) { font-size: 0.88rem; }
  .header-actions { margin-left: 1rem; }
}
