/* ═══════════════════════════════════════════════════════════════
   AWESOME BEARS — Antimetal-inspired design language
   Dark-first · Oversized sans-serif · Enterprise polish
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Geist:wght@300;400;500;600;700;800&family=Geist+Mono:wght@400;500;600&display=swap');

/* ── Icons (Lucide-style inline SVGs, see /js/icons.js) ──────── */
.kg-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.kg-icon--sm { width: 0.85em; height: 0.85em; }
.kg-icon--lg { width: 1.4em;  height: 1.4em; }

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  /* Typography */
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-mono: 'Geist Mono', 'SF Mono', 'JetBrains Mono', ui-monospace, monospace;

  /* Color tokens — dark-first default */
  /* Palette: metallic gold · dark bronze · starry deep blue · cream */
  /*          + fluorescent light blue as secondary accent */
  --bg:           #060d1e;                /* starry deep blue (near-black) */
  --bg-elevated:  #0c1530;                /* deeper navy */
  --bg-card:      #141424;                /* neutral dark with blue undertone */
  --bg-subtle:    rgba(232,201,107,0.04);
  --fg:           #f5efe0;                /* cream */
  --fg-strong:    #faf6ea;                /* bright cream */
  --fg-muted:     #a8a090;                /* warm muted */
  --fg-dim:       #6e665a;                /* dim bronze-gray */

  --border:       rgba(232,201,107,0.10);
  --border-strong:rgba(232,201,107,0.18);
  --border-hover: rgba(232,201,107,0.32);

  /* Metallic gold — primary accent */
  --accent:       #f0d27c;                /* light metallic gold */
  --accent-strong:#a8a090;                /* metallic gold */
  --accent-deep:  #a8a090;                /* dark bronze/brown */
  --accent-glow:  rgba(232,201,107,0.22);
  --accent-fg:    #1a1205;                /* dark for button text on gold */

  /* Fluorescent light blue — secondary accent */
  --accent-blue:       #7ae3ff;           /* fluorescent light blue */
  --accent-blue-strong:#5ccaff;           /* brighter fluorescent */
  --accent-blue-glow:  rgba(122,227,255,0.28);

  /* Starry deep blue — for aurora/atmospheric use */
  --starry-blue:  #1e3c8c;                /* starry deep blue */

  /* Layout */
  --max-w: 1280px;
  --max-w-narrow: 960px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;

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


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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  background: var(--bg);
  overflow-x: hidden; /* clip horizontal overflow at the viewport (not the body) */
}

body {
  font-family: var(--font-sans);
  background: transparent;
  color: var(--fg);
  line-height: 1.5;
  letter-spacing: -0.011em;
  /* overflow-x: hidden removed — keeping it on body makes body the scroll
     container, which clips position:fixed pseudo-elements and edge text */
  min-height: 100vh;
  position: relative;
  font-feature-settings: "ss01", "cv01", "cv11";
}

/* Page-wide ambient aurora — gold + starry-blue + fluorescent-blue */
body::before {
  content: '';
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(42% 52% at 18% 18%, rgba(232,201,107,0.22) 0%, transparent 65%),   /* gold */
    radial-gradient(38% 46% at 82% 22%, rgba(122,227,255,0.16) 0%, transparent 65%),   /* fluorescent blue */
    radial-gradient(46% 54% at 72% 78%, rgba(232,201,107,0.18) 0%, transparent 68%),   /* gold */
    radial-gradient(40% 48% at 10% 68%, rgba(30,60,140,0.28)   0%, transparent 65%),   /* starry deep blue */
    radial-gradient(28% 36% at 50% 50%, rgba(255,223,150,0.08) 0%, transparent 72%);   /* pale cream */
  filter: blur(4px);
  opacity: 0.9;
  mix-blend-mode: screen;
  animation: ab-aurora 32s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes ab-aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-2%, 1.5%, 0) scale(1.05); }
  100% { transform: translate3d(1.5%, -1%, 0) scale(1.03); }
}
@keyframes ab-shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* Fractal-noise grain overlay — cloned from trader-bear.com */
body::after {
  content: '';
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}


@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .am-hero__title em,
  .am-stat__num em,
  .am-profile-hero__content h1 em {
    animation: none;
    background-position: 0% center;
  }
}

/* ── Twinkling star field — cloned from trader-bear.com ─────── */
.ab-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.ab-star {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: ab-twinkle var(--dur, 4s) ease-in-out var(--delay, 0s) infinite;
}
@keyframes ab-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50%      { opacity: var(--peak, 0.7); transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .ab-star { animation: none; }
}

a { color: inherit; text-decoration: none; transition: opacity .2s var(--ease); }
a:hover { opacity: 0.7; }

img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--accent-strong); color: var(--accent-fg); }

/* ── Container ──────────────────────────────────────────────── */
.am-container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 900px) { .am-container { padding: 0 48px; } }

/* ── Nav ────────────────────────────────────────────────────── */
.am-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%);
}
.am-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 21px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
  gap: 32px;
}
@media (min-width: 900px) { .am-nav__inner { padding: 27px 48px; } }

.am-nav__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--fg-strong);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.am-nav__brand-dot {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-blue) 100%);
  box-shadow: 0 0 14px var(--accent-glow), 0 0 18px var(--accent-blue-glow);
}

.am-nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
@media (max-width: 820px) { .am-nav__links { display: none; } }
.am-nav__link {
  font-size: 0.9rem;
  color: var(--fg-muted);
  font-weight: 500;
  transition: color .2s var(--ease);
}
.am-nav__link:hover { color: var(--fg-strong); opacity: 1; }
.am-nav__link.active { color: var(--fg-strong); }

.am-nav__actions { display: flex; align-items: center; gap: 10px; }

/* ── Buttons ────────────────────────────────────────────────── */
.am-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.93rem;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1;
}
.am-btn--primary {
  background: var(--fg-strong);
  color: var(--bg);
}
.am-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(255,255,255,0.18);
  opacity: 1;
}
.am-btn--ghost {
  background: transparent;
  color: var(--fg-strong);
  border-color: var(--border-strong);
}
.am-btn--ghost:hover {
  border-color: var(--border-hover);
  background: var(--bg-subtle);
  opacity: 1;
}
.am-btn--accent {
  background: var(--accent-strong);
  color: var(--accent-fg);
}
.am-btn--accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px var(--accent-glow);
  opacity: 1;
}
.am-btn--sm { padding: 8px 16px; font-size: 0.85rem; }

/* ── Hero ───────────────────────────────────────────────────── */
.am-hero {
  padding: 120px 24px 80px;
  text-align: center;
  position: relative;
}
@media (min-width: 900px) { .am-hero { padding: 180px 48px 120px; } }

.am-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 28px;
  background: var(--bg-subtle);
}
.am-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-blue);
  box-shadow: 0 0 12px var(--accent-blue-glow), 0 0 6px var(--accent-blue);
}

.am-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 9vw, 6.5rem);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -0.01em;
  color: var(--fg-strong);
  max-width: 960px;
  margin: 0 auto 24px;
}
.am-hero__title em {
  font-style: normal;
  background: linear-gradient(
    100deg,
    #1a7a9a             0%,   /* sea blue */
    #81d8d0            38%,   /* Tiffany blue */
    var(--accent-blue) 68%,   /* fluorescent light blue */
    #1a7a9a            100%   /* sea blue */
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: ab-shimmer 30s linear infinite;
}
.am-hero__lede {
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  color: var(--fg-muted);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.55;
}
.am-hero__ctas {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Section scaffolding ────────────────────────────────────── */
.am-section { padding: 80px 0; position: relative; }
@media (min-width: 900px) { .am-section { padding: 120px 0; } }

.am-section__head {
  max-width: var(--max-w-narrow);
  margin: 0 auto 56px;
  text-align: center;
}
.am-section__head--left { text-align: left; margin-left: 0; }

.am-section__eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--accent-deep);
  margin-bottom: 16px;
}

.am-section__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--fg-strong);
  margin-bottom: 20px;
}

.am-section__lede {
  font-size: 1.08rem;
  color: var(--fg-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.55;
}
.am-section__head--left .am-section__lede { margin: 0; }

/* ── Feature triptych ───────────────────────────────────────── */
.am-triptych {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
@media (min-width: 900px) { .am-triptych { grid-template-columns: repeat(3, 1fr); } }

.am-trip-cell {
  padding: 40px 32px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background .3s var(--ease);
}
.am-trip-cell:hover { background: var(--bg-elevated); }
.am-trip-cell__label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.am-trip-cell__title {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg-strong);
}
.am-trip-cell__body {
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ── Products grid ──────────────────────────────────────────── */
.am-products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
@media (min-width: 760px) { .am-products { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .am-products { grid-template-columns: repeat(3, 1fr); } }

.am-product {
  background: var(--bg-card);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  cursor: pointer;
  transition: background .3s var(--ease);
  min-height: 260px;
}
.am-product:hover { background: var(--bg-elevated); }
/* Ink-green variant (same lightness/saturation as bg-card / bg-elevated, hue shifted blue→green) */
.am-product--green { background: #142420; }
.am-product--green:hover { background: #0c3020; }
/* Warm-brown variant (same lightness/saturation, hue shifted blue→brown) */
.am-product--brown { background: #241c14; }
.am-product--brown:hover { background: #30200c; }
/* Ocean-blue variant (hue shifted blue→teal-blue) */
.am-product--ocean { background: #0e1e2e; }
.am-product--ocean:hover { background: #102840; }
/* Deep-purple variant (hue shifted blue→purple) */
.am-product--purple { background: #1a1428; }
.am-product--purple:hover { background: #241a38; }
/* Black/gray variant for unreleased / stealth products */
.am-product--dark { background: #111113; }
.am-product--dark:hover { background: #1c1c20; }
.am-product__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.am-product__num { color: var(--fg-muted); }
.am-product__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.68rem;
}
.am-product__status--live::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 8px var(--accent-strong);
}
.am-product__status--beta::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent-blue);
  box-shadow: 0 0 10px var(--accent-blue), 0 0 4px var(--accent-blue-strong);
}
.am-product__status--dev::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--fg-dim);
}

.am-product__title {
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--fg-strong);
}
.am-product__body {
  color: var(--fg-muted);
  line-height: 1.6;
  flex: 1;
  font-size: 0.95rem;
}
.am-product__arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-strong);
  font-weight: 500;
  font-size: 0.88rem;
  margin-top: 8px;
  transition: gap .25s var(--ease);
}
.am-product:hover .am-product__arrow { gap: 14px; opacity: 1; }

/* ── Stats row ──────────────────────────────────────────────── */
.am-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 24px;
  padding: 56px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
@media (min-width: 800px) { .am-stats { grid-template-columns: repeat(4, 1fr); } }
.am-stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--fg-strong);
  line-height: 1;
  margin-bottom: 10px;
  font-feature-settings: "tnum";
}
.am-stat__num em {
  font-style: normal;
  background: linear-gradient(
    100deg,
    #1a7a9a             0%,   /* sea blue */
    #81d8d0            38%,   /* Tiffany blue */
    var(--accent-blue) 68%,   /* fluorescent light blue */
    #1a7a9a            100%   /* sea blue */
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: ab-shimmer 30s linear infinite;
}
.am-stat__label {
  font-size: 0.82rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

/* ── Final CTA ──────────────────────────────────────────────── */
.am-cta-card {
  text-align: center;
  padding: 90px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.am-cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 60% at 50% 0%, var(--accent-glow) 0%, transparent 65%),
    radial-gradient(40% 50% at 50% 100%, var(--accent-blue-glow) 0%, transparent 65%);
  pointer-events: none;
}
.am-cta-card > * { position: relative; z-index: 1; }
.am-cta-card__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.032em;
  color: var(--fg-strong);
  margin-bottom: 18px;
  line-height: 1.05;
}
.am-cta-card__lede {
  color: var(--fg-muted);
  font-size: 1.08rem;
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.55;
}

/* ── Footer ─────────────────────────────────────────────────── */
.am-footer {
  padding: 56px 0 72px;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}
.am-footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.am-footer__left {
  font-size: 0.88rem;
  color: var(--fg-dim);
}
.am-footer__links {
  display: flex;
  gap: 24px;
  font-size: 0.88rem;
  color: var(--fg-muted);
}

/* ── Scroll reveal animation ────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal--stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal--stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal--stagger > * { opacity: 1; transform: none; transition: none; }
}

/* ── Skills marquee ─────────────────────────────────────────── */
.am-marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}
.am-marquee__track {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: am-marquee 50s linear infinite;
}
@keyframes am-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.am-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--fg-muted);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--bg-subtle);
}

/* ── Timeline (experience) ──────────────────────────────────── */
.am-timeline { display: flex; flex-direction: column; }
.am-timeline__item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  transition: padding-left .3s var(--ease);
}
.am-timeline__item:last-child { border-bottom: 1px solid var(--border); }
.am-timeline__item:hover { padding-left: 12px; }
.am-timeline__date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.am-timeline__body h3 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg-strong);
  margin-bottom: 6px;
}
.am-timeline__role {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.am-timeline__body p {
  color: var(--fg-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}
@media (max-width: 800px) {
  .am-timeline__item { grid-template-columns: 1fr; gap: 10px; }
  .am-timeline__item:hover { padding-left: 0; }
}

/* ── Profile hero ───────────────────────────────────────────── */
.am-profile-hero {
  padding: 120px 24px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
  justify-items: center;
  text-align: center;
}
@media (min-width: 900px) {
  .am-profile-hero {
    grid-template-columns: auto 1fr;
    padding: 160px 48px 0;
    gap: 64px;
    justify-items: start;
    text-align: left;
  }
}
.am-profile-hero__avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 60px var(--accent-glow);
}
.am-profile-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.am-profile-hero__content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--fg-strong);
  margin-bottom: 14px;
}
.am-profile-hero__content h1 em {
  font-style: normal;
  background: linear-gradient(
    100deg,
    #1a7a9a             0%,   /* sea blue */
    #81d8d0            38%,   /* Tiffany blue */
    var(--accent-blue) 68%,   /* fluorescent light blue */
    #1a7a9a            100%   /* sea blue */
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: ab-shimmer 30s linear infinite;
}
.am-profile-hero__role {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--accent-strong);
  margin-bottom: 16px;
}
.am-profile-hero__lede {
  color: var(--fg-muted);
  font-size: 1.08rem;
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 28px;
}
.am-profile-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
@media (min-width: 900px) { .am-profile-hero__ctas { justify-content: flex-start; } }

/* ── Founder card (about page) ──────────────────────────────── */
.am-founder-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: var(--max-w-narrow);
  margin: 0 auto;
}

.am-founder-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: border-color .3s var(--ease), transform .3s var(--ease), background .3s var(--ease);
}
.am-founder-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
  transform: translateY(-3px);
}
.am-founder-card__top {
  display: flex;
  align-items: center;
  gap: 16px;
}
.am-founder-card__avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}
.am-founder-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.am-founder-card__name {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--fg-strong);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.am-founder-card__role {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
}
.am-founder-card__bio {
  color: var(--fg-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}
.am-founder-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.am-founder-card__link {
  color: var(--fg-strong);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .25s var(--ease);
  margin-top: 4px;
  font-size: 0.92rem;
}
.am-founder-card__link:hover { gap: 12px; opacity: 1; }

/* ── Project cards (Ray's page) ─────────────────────────────── */
.am-projects {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
@media (min-width: 760px) { .am-projects { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .am-projects { grid-template-columns: repeat(3, 1fr); } }

.am-project {
  background: var(--bg-card);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background .3s var(--ease);
}
.am-project:hover { background: var(--bg-elevated); }
.am-project__title {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg-strong);
}
.am-project__desc {
  color: var(--fg-muted);
  line-height: 1.55;
  font-size: 0.92rem;
  flex: 1;
}
.am-project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.am-project__link {
  color: var(--fg-strong);
  font-weight: 500;
  font-size: 0.9rem;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  transition: gap .25s var(--ease);
}
.am-project__link:hover { gap: 12px; opacity: 1; }

/* ── Two-column "list row" (education, certs, leadership) ──── */
.am-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}
.am-row:last-child { border-bottom: 1px solid var(--border); }
@media (min-width: 700px) { .am-row { grid-template-columns: 260px 1fr; gap: 32px; align-items: start; } }
.am-row__label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.am-row__body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--fg-strong);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.am-row__body p {
  color: var(--fg-muted);
  line-height: 1.55;
  font-size: 0.93rem;
}
.am-row__tags {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
}

/* ── i18n ───────────────────────────────────────────────────── */
[data-lang="en"] .i18n-zh { display: none !important; }
[data-lang="zh"] .i18n-en { display: none !important; }
[data-lang="zh"] body {
  font-family: var(--font-sans), 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}

/* ── Floating Menu ──────────────────────────────────────────── */
.float-menu {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.float-menu__toggle {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(232, 201, 107, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.float-menu__toggle:hover,
.float-menu.is-open .float-menu__toggle {
  color: var(--fg);
  background: rgba(232, 201, 107, 0.14);
  border-color: var(--border-hover);
}

.float-menu__panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(20, 20, 36, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 140px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  transition:
    max-height 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.22s ease,
    transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.float-menu.is-open .float-menu__panel {
  max-height: 480px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.float-menu__item {
  display: block;
  width: 100%;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.18s, background 0.18s;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.float-menu__item:hover {
  background: rgba(232, 201, 107, 0.08);
}

.float-menu__item.is-active {
  color: var(--accent);
  background: rgba(232, 201, 107, 0.12);
  font-weight: 700;
}

.float-menu__divider {
  height: 1px;
  background: var(--border);
  margin: 4px 12px;
}

.float-menu__lang {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.float-menu__lang:hover {
  color: var(--accent);
}

/* Auth slot in floating menu */
.float-menu__user {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 18px 4px;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
  white-space: nowrap;
  max-width: 220px;
}
.float-menu__user-avatar {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
  object-fit: cover;
}
.float-menu__user-name {
  color: var(--accent);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0;
}
.float-menu__signin {
  font-weight: 700;
  color: var(--accent);
}
.float-menu__signin:hover {
  background: rgba(232,201,107,0.12);
}
.float-menu__signout {
  color: var(--fg-muted);
  font-weight: 500;
}
.float-menu__signout:hover {
  color: #ff8a8a;
  background: rgba(224,92,92,0.08);
}

/* ── In-page Auth Modal ──────────────────────────────────── */
.auth-modal {
  position: fixed; inset: 0;
  z-index: 1000;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.auth-modal.is-open { display: flex; }

.auth-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(6, 13, 30, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.auth-modal__panel {
  position: relative;
  width: 100%; max-width: 380px;
  padding: 32px 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,0.55);
  display: flex; flex-direction: column; gap: 14px;
  animation: auth-modal-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes auth-modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-modal__close {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent;
  color: var(--fg-muted); font-size: 22px; line-height: 1;
  cursor: pointer; border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.auth-modal__close:hover { color: var(--fg); background: rgba(255,255,255,0.06); }
.auth-modal__title {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 500;
  color: var(--fg-strong);
  text-align: center;
  margin-bottom: 4px;
}
.auth-modal__error {
  padding: 9px 12px;
  background: rgba(224, 92, 92, 0.10);
  border: 1px solid rgba(224, 92, 92, 0.30);
  border-radius: 6px;
  color: #ff9a9a;
  font-family: var(--font-sans);
  font-size: 12px; line-height: 1.5;
  word-break: break-word;
}
.auth-modal__form {
  display: flex; flex-direction: column; gap: 10px;
}
.auth-modal__input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: border-color 0.15s, background 0.15s;
}
.auth-modal__input::placeholder { color: var(--fg-dim); }
.auth-modal__input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-card);
}
.auth-modal__forgot {
  align-self: flex-end;
  font-family: var(--font-sans);
  font-size: 11px; color: var(--fg-dim);
  text-decoration: none;
  cursor: pointer;
  margin-top: -2px;
}
.auth-modal__forgot:hover { color: var(--accent); }
.auth-modal__submit {
  height: 42px; margin-top: 4px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: var(--accent-fg);
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.auth-modal__submit:hover { background: #c9a568; }
.auth-modal__submit:active { transform: scale(0.98); }
.auth-modal__submit[disabled] { pointer-events: none; }

.auth-modal__sep {
  display: flex; align-items: center;
  font-family: var(--font-mono);
  font-size: 10px; color: var(--fg-dim);
  letter-spacing: 0.12em;
  margin: 4px 0;
}
.auth-modal__sep::before,
.auth-modal__sep::after {
  content: ""; flex: 1; height: 1px;
  background: var(--border);
}
.auth-modal__sep span { padding: 0 10px; }
.auth-modal__sep span::before { content: "OR"; }
[data-lang="zh"] .auth-modal__sep span::before { content: "或"; }

.auth-modal__google {
  height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.auth-modal__google:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--border-hover);
}
.auth-modal__google[disabled] { opacity: 0.5; pointer-events: none; }

.auth-modal__switch {
  text-align: center;
  font-family: var(--font-sans);
  font-size: 12px;
  margin-top: 4px;
}
.auth-modal__switch a {
  color: var(--fg-muted);
  text-decoration: none;
}
.auth-modal__switch a:hover { color: var(--accent); }

.am-footer__version {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
}


/* ── WeChat Browser Overlay (full-screen guide) ─────────────── */
.wechat-browser-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.94);
  animation: wcBrowserFadeIn 300ms ease-out;
  font-family: var(--font-sans);
  color: #fff;
  overflow: hidden;
}
.wechat-browser-overlay--closing { animation: wcBrowserFadeOut 300ms ease-out forwards; }

/* Mobile-first: vertical flex column. Arrow → text → dismiss button. */
.wechat-browser-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 20px 24px;
  box-sizing: border-box;
}

/* Big curved arrow pointing UP to the WeChat "⋯" menu (top-right of chrome) */
.wcbo-arrow {
  align-self: flex-end;
  width: 38vw;
  max-width: 160px;
  min-width: 110px;
  aspect-ratio: 1;
  color: #ffd24a;
  filter: drop-shadow(0 0 14px rgba(255,210,74,0.55));
  animation: wcboArrowPulse 1.6s cubic-bezier(.4,0,.2,1) infinite;
  margin-right: -8px;     /* nudge tip toward the corner */
}
.wcbo-arrow svg { width: 100%; height: 100%; display: block; }

/* Centered instructional text — sits below the arrow on mobile */
.wcbo-content {
  margin: 28px auto 0;
  width: 100%;
  max-width: 360px;
  text-align: center;
  animation: wcBrowserSlideUp 400ms var(--ease) both;
}
.wcbo-title {
  font-size: 20px; font-weight: 600;
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.wcbo-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.62);
  margin: 0 0 22px;
  line-height: 1.55;
}
.wcbo-steps {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
  text-align: left;
}
.wcbo-steps li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.92);
  line-height: 1.45;
}
.wcbo-steps b {
  color: #ffd24a; font-weight: 600;
  padding: 0 2px;
}
.wcbo-step-num {
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: #ffd24a;
  color: #000;
  border-radius: 50%;
  font-size: 12px; font-weight: 700;
}

/* Subtle dismiss link at the bottom */
.wcbo-close {
  margin-top: auto;
  background: none;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  padding: 9px 22px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: color .2s, border-color .2s;
  align-self: center;
}
.wcbo-close:hover  { color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.35); }
.wcbo-close:active { color: #fff; }

@keyframes wcboArrowPulse {
  0%, 100% { transform: translate(0, 0) scale(1);    opacity: 0.92; }
  50%      { transform: translate(6px, -8px) scale(1.06); opacity: 1; }
}

/* Tiny phones (very short viewports): squeeze further. */
@media (max-height: 640px) {
  .wcbo-arrow   { max-width: 130px; min-width: 90px; }
  .wcbo-content { margin-top: 18px; }
  .wcbo-title   { font-size: 18px; }
  .wcbo-desc    { margin-bottom: 16px; font-size: 12.5px; }
  .wcbo-steps   { gap: 8px; }
  .wcbo-steps li { padding: 10px 12px; font-size: 12.5px; }
  .wcbo-close   { padding: 8px 20px; font-size: 12.5px; }
}

@keyframes wcBrowserFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes wcBrowserFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes wcBrowserSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .wechat-browser-overlay,
  .wcbo-content,
  .wcbo-arrow,
  .wcbo-target { animation: none; }
  .wcbo-close { transition: none; }
}

/* ── Mobile (small phones, ≤480px) — tighter typography & spacing ───── */
@media (max-width: 480px) {
  .am-container { padding: 0 16px; }

  /* Hero */
  .am-hero { padding: 80px 16px 48px; }
  .am-hero__title { font-size: clamp(2rem, 8.5vw, 2.8rem); margin-bottom: 18px; }
  .am-hero__lede   { font-size: 0.95rem; margin-bottom: 28px; line-height: 1.5; }

  /* Section scaffolding */
  .am-section { padding: 56px 0; }
  .am-section__head { margin-bottom: 36px; }
  .am-section__title { font-size: clamp(1.7rem, 6.5vw, 2.2rem); margin-bottom: 14px; }
  .am-section__lede { font-size: 0.95rem; margin-bottom: 24px; line-height: 1.55; }
  .am-section__eyebrow { font-size: 0.7rem; margin-bottom: 12px; }

  /* Products grid */
  .am-product { padding: 24px 20px; min-height: 0; gap: 10px; }
  .am-product__title { font-size: 1.4rem; }
  .am-product__body  { font-size: 0.88rem; line-height: 1.55; }
  .am-product__arrow { font-size: 0.82rem; }
  .am-product__meta  { font-size: 0.66rem; gap: 8px; }

  /* Stats */
  .am-stats { padding: 36px 0; gap: 28px 20px; }
  .am-stat__num   { font-size: clamp(1.8rem, 6vw, 2.4rem); margin-bottom: 6px; }
  .am-stat__label { font-size: 0.75rem; }

  /* Footer */
  .am-footer { padding: 40px 0 56px; margin-top: 56px; }
  .am-footer__row { gap: 14px; }
  .am-footer__left, .am-footer__links { font-size: 0.78rem; }
  .am-footer__links { gap: 16px; }

  /* About / profile */
  .am-profile-hero__name  { font-size: clamp(1.8rem, 7vw, 2.4rem); }
  .am-profile-hero__lede  { font-size: 0.95rem; }
  .am-row { gap: 10px; }
  .am-row__label { font-size: 0.72rem; }

  /* Triptych / projects */
  .am-trip-cell { padding: 24px 20px; }
  .am-project   { padding: 24px 20px; }
  .am-project__title { font-size: 1.2rem; }
  .am-project__body  { font-size: 0.88rem; }

  /* Floating menu — slightly smaller */
  .float-menu__toggle { width: 44px; height: 44px; }

  /* Buttons */
  .am-btn { height: 38px; padding: 0 18px; font-size: 0.88rem; }
}
