/* ============================================================
   WyzPanda — Portfolio Stylesheet
   Professional, responsive, theme-aware (light/dark)
   ============================================================ */

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Layout */
  --container: 1160px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --nav-h: 72px;
  --gap: 24px;

  /* Typography scale */
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: clamp(2.1rem, 4.5vw, 3.1rem);

  /* Spacing */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 36px;
  --space-5: 56px;
  --space-6: 80px;

  /* Easing */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Font families */
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
}

/* ---------- Light theme (default) ---------- */
:root {
  --bg: #f6f8fc;
  --bg-soft: #eef2fa;
  --surface: #ffffff;
  --surface-2: #f2f5fc;
  --text: #141b2e;
  --text-2: #47516c;
  --muted: #7c86a1;
  --border: #e3e8f3;
  --border-strong: #d2d9ea;

  --primary: #4f46e5;
  --primary-2: #7c3aed;
  --primary-soft: #e9eafd;
  --primary-contrast: #ffffff;

  --accent: #f59e0b;
  --success: #10b981;

  --hero-grad-1: #eef1ff;
  --hero-grad-2: #f7f0ff;
  --hero-grad-3: #ffffff;

  --shadow-sm: 0 1px 2px rgba(20, 27, 46, 0.06), 0 1px 3px rgba(20, 27, 46, 0.08);
  --shadow-md: 0 6px 16px -4px rgba(20, 27, 46, 0.12), 0 8px 28px -8px rgba(20, 27, 46, 0.14);
  --shadow-lg: 0 24px 48px -16px rgba(20, 27, 46, 0.22);
  --ring: 0 0 0 4px rgba(79, 70, 229, 0.16);
}

/* ---------- Dark theme ---------- */
:root.dark {
  --bg: #0b0f1e;
  --bg-soft: #0e1327;
  --surface: #141a30;
  --surface-2: #191f3a;
  --text: #e9ecf7;
  --text-2: #b1b9d3;
  --muted: #7f88a6;
  --border: #262e4d;
  --border-strong: #333d63;

  --primary: #818cf8;
  --primary-2: #a78bfa;
  --primary-soft: #212a55;
  --primary-contrast: #0b0f1e;

  --accent: #fbbf24;
  --success: #34d399;

  --hero-grad-1: #101634;
  --hero-grad-2: #171332;
  --hero-grad-3: #0b0f1e;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 22px -6px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 28px 56px -18px rgba(0, 0, 0, 0.7);
  --ring: 0 0 0 4px rgba(129, 140, 248, 0.28);
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover { color: var(--primary-2); }

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

::selection {
  background: var(--primary);
  color: var(--primary-contrast);
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 1000;
  background: var(--primary);
  color: var(--primary-contrast);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
  color: var(--primary-contrast);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-sm);
  line-height: 1;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, 0.6);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 14px 30px -10px rgba(79, 70, 229, 0.75);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.btn-sm {
  padding: 9px 16px;
  font-size: var(--fs-xs);
  border-radius: 8px;
}

.btn-full { width: 100%; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: var(--nav-h);
}

.logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
}

.logo span { color: var(--primary); }

.nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 1.05rem;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s var(--ease);
}

.icon-btn:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--text-2);
}

.nav-links a:not(.btn):hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.nav-links .btn {
  color: #fff;
  margin-left: 6px;
}

.nav-links .btn:hover { color: #fff; }

/* ---------- Section scaffolding ---------- */
section { padding: var(--space-6) 0; }

.section-label {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: var(--space-2);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-5);
}

.section-header h2 {
  font-size: var(--fs-3xl);
  margin-bottom: 12px;
}

.section-sub {
  color: var(--muted);
  font-size: var(--fs-lg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--space-6) + 24px) 0 calc(var(--space-6) + 40px);
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--hero-grad-2), transparent 60%),
    radial-gradient(1000px 520px at 0% 110%, var(--hero-grad-1), transparent 60%),
    linear-gradient(180deg, var(--hero-grad-3), var(--bg));
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: center;
}

.hero-content { max-width: 660px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 15px;
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-3);
}

.hero-eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-lg);
  color: var(--text-2);
  margin-bottom: 12px;
}

.rotor {
  display: inline-block;
  min-width: 6.2ch;
  color: var(--primary);
  border-bottom: 2px solid var(--primary-soft);
  padding-bottom: 2px;
}

#rotorWord {
  display: inline-block;
  will-change: transform, opacity;
}

#rotorWord.swap-out { animation: rotorOut 0.18s var(--ease) forwards; }
#rotorWord.swap-in { animation: rotorIn 0.3s var(--ease-out); }

@keyframes rotorOut {
  to { opacity: 0; transform: translateY(10px); }
}
@keyframes rotorIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-subtitle {
  font-size: var(--fs-lg);
  color: var(--text-2);
  max-width: 52ch;
  margin-bottom: var(--space-4);
}

.hero-stats {
  display: flex;
  gap: var(--space-5);
  margin-bottom: var(--space-4);
}

.stat { display: inline-block; }

.stat-number {
  display: inline;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--fs-2xl);
  line-height: 1;
  color: var(--text);
}

.stat-suffix {
  display: inline;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--fs-2xl);
  line-height: 1;
  color: var(--primary);
}

.stat-label {
  display: block;
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: 6px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-2);
}

.cta-block { display: flex; flex-direction: column; gap: 6px; }

.cta-note {
  font-size: var(--fs-xs);
  color: var(--muted);
}

/* ---------- About ---------- */
.about { background: var(--bg-soft); }

.about-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: var(--space-5);
  align-items: start;
}

.about-media {
  align-self: start;
}

.about-photo {
  width: 350px;
  height: 350px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.about-body p {
  color: var(--text-2);
  font-size: var(--fs-lg);
  margin-bottom: var(--space-3);
}

.features {
  list-style: none;
  display: grid;
  gap: 14px;
}

.features li {
  position: relative;
  padding-left: 34px;
  color: var(--text-2);
  font-weight: 500;
}

.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--primary-soft);
}

.features li::after {
  content: "✓";
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary);
}

/* ---------- Subjects ---------- */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.subject-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.subject-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.subject-card:hover,
.subject-card:focus-visible {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
  outline: none;
}

.subject-card:hover::before,
.subject-card:focus-visible::before,
.subject-card.tapped::before {
  transform: scaleX(1);
}

.subject-icon {
  font-size: 2rem;
  line-height: 1;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  border-radius: 16px;
  margin-bottom: var(--space-2);
}

.subject-card h3 {
  font-size: var(--fs-lg);
  margin-bottom: 6px;
}

.subject-tagline {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-bottom: 4px;
}

.subject-topics {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px dashed var(--border);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition: max-height 0.4s var(--ease), opacity 0.3s var(--ease),
    transform 0.3s var(--ease), margin-top 0.3s var(--ease);
}

.subject-topics li {
  position: relative;
  padding-left: 18px;
  font-size: var(--fs-xs);
  color: var(--text-2);
}

.subject-topics li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary);
}

.subject-card:hover .subject-topics,
.subject-card:focus-visible .subject-topics,
.subject-card.tapped .subject-topics {
  max-height: 320px;
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Testimonials ---------- */
.testimonial-carousel {
  position: relative;
  overflow: hidden;
  padding: 8px 0;
}

.carousel-track {
  display: flex;
  gap: var(--space-3);
  transition: transform 0.45s var(--ease);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.testimonial-card p {
  font-size: var(--fs-lg);
  color: var(--text-2);
  line-height: 1.7;
  flex: 1;
}

.testimonial-card footer {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.stars {
  color: var(--accent);
  font-size: 1.1rem;
  letter-spacing: 2px;
}

.reviewer-name {
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-head);
}

.review-source {
  color: var(--muted);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease),
    transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.carousel-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-50%) scale(1.08);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.carousel-prev { left: -12px; }
.carousel-next { right: -12px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-3);
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--border-strong);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.carousel-dot:hover {
  background: var(--muted);
  transform: scale(1.2);
}

.carousel-dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

@media (max-width: 860px) {
  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
  .carousel-prev { left: 2px; }
  .carousel-next { right: 2px; }
}

@media (max-width: 560px) {
  .testimonial-card {
    padding: var(--space-3);
  }
  .testimonial-card p {
    font-size: var(--fs-md);
  }
}

/* ---------- Profiles ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.profile-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.profile-card:hover {
  color: var(--text);
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.profile-card h3 { font-size: var(--fs-lg); }

.profile-cta {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--primary);
}

.profile-card:hover .profile-cta { color: var(--primary-2); }

/* ---------- Contact ---------- */
.contact { background: var(--bg-soft); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-5);
  align-items: start;
}

.contact-info h2 {
  font-size: var(--fs-3xl);
  margin-bottom: var(--space-2);
}

.contact-info > p {
  color: var(--text-2);
  font-size: var(--fs-lg);
  margin-bottom: var(--space-3);
}

.contact-info .btn-primary { margin-bottom: var(--space-3); }
.cal-btn-wrapper { margin-bottom: var(--space-3); }

.contact-meta {
  list-style: none;
  display: grid;
  gap: 12px;
}

.contact-meta li {
  color: var(--text-2);
  font-weight: 500;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: var(--space-3);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.contact-form label {
  display: grid;
  gap: 7px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--text);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--text);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  width: 100%;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease),
    background 0.2s var(--ease);
}

.contact-form textarea { resize: vertical; min-height: 96px; }

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--muted); }

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
  background: var(--surface);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--space-4) 0;
}

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

.footer p { color: var(--muted); font-size: var(--fs-sm); }

.footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.footer nav a:not(.bmc-custom-btn) {
  color: var(--text-2);
  font-weight: 500;
  font-size: var(--fs-sm);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

.footer nav a:not(.bmc-custom-btn):hover {
  color: var(--primary);
  text-decoration-color: var(--primary);
}

.footer .bmc-custom-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffdd00;
  color: #000;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-xs);
  line-height: 1;
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease);
}

.footer .bmc-custom-btn:hover {
  color: #000;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.back-to-top:hover { transform: translateY(-3px) scale(1.05); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .subject-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  :root { --nav-h: 64px; }

  /* Mobile nav */
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 18px 18px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links a {
    width: 100%;
    padding: 13px 16px;
    font-size: var(--fs-md);
  }

  .nav-links .btn {
    margin: 8px 0 0;
    width: 100%;
  }

  section { padding: var(--space-5) 0; }

  .hero h1 { font-size: clamp(2.1rem, 9vw, 3rem); }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .about-photo {
    width: 255px;
    height: 255px;
    margin-inline: auto;
  }

  .about-body {
    text-align: left;
    max-width: 560px;
    margin-inline: auto;
  }

  .features { text-align: left; }


}

@media (max-width: 560px) {
  .container { padding-inline: 18px; }

  .subject-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: var(--space-4); }
  .footer-inner { flex-direction: column; text-align: center; }
}


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