:root {
  --navy: #14213d;
  --ink: #1f2937;
  --muted: #6b7385;
  --border: #e4e7ee;
  --card: #ffffff;
  --bg: #f6f8fc;

  --blue: #2f6fed;
  --blue-2: #6aa6ff;
  --teal: #17b0b0;
  --teal-2: #4fe0c8;
  --purple: #7b5fd6;
  --purple-2: #b892ff;
  --pink: #e84393;
  --pink-2: #ff9fd6;
  --orange: #f2994a;
  --orange-2: #ffcb6b;
  --green: #27ae60;
  --green-2: #7ee8a0;

  --gradient: linear-gradient(120deg, var(--blue), var(--purple), var(--teal));
  --gradient-btn: linear-gradient(120deg, var(--blue), var(--purple));
  --radius: 16px;
  --shadow: 0 10px 30px rgba(20, 33, 61, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.navbar::after {
  content: ""; display: block; height: 3px; background: var(--gradient);
}
.navbar .container { display: flex; align-items: center; gap: 14px; padding: 12px 24px; }
.navbar .logo-icon { height: 34px; width: auto; }
.brand-link { display: flex; align-items: center; gap: 10px; }
.brand-link:hover { text-decoration: none; }
.navbar .brand {
  font-weight: 800; font-size: 19px;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.navbar nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.navbar nav a { color: var(--ink); font-weight: 600; font-size: 14.5px; }
.navbar nav a:hover { color: var(--purple); text-decoration: none; }
.navbar nav a.active { color: var(--purple); }
/* .navbar nav a's color rule above (higher specificity than .btn-primary
   alone) was winning and forcing the CTA's text to dark navy on top of its
   own blue/purple gradient -- nearly unreadable. Re-assert white here. */
.navbar nav a.btn-primary { color: #fff; }
.navbar .btn.nav-cta { margin-left: 8px; }

/* Hamburger button -- hidden on desktop, shown only under the mobile breakpoint */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; margin-left: auto; padding: 0;
  background: none; border: none; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--navy); border-radius: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 14.5px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-primary { background: var(--gradient-btn); color: #fff; box-shadow: 0 8px 22px rgba(123,95,214,0.35); }
.btn-primary:hover { text-decoration: none; filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(123,95,214,0.45); }
.btn-outline { background: #fff; border-color: var(--border); color: var(--navy); }
.btn-outline:hover { text-decoration: none; border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.btn[disabled], .btn.disabled { opacity: .55; cursor: not-allowed; pointer-events: none; transform: none !important; }
.btn small { font-weight: 500; opacity: .85; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 84px 0 64px;
  text-align: center;
  background: radial-gradient(60% 60% at 50% 0%, rgba(123,95,214,0.10), transparent 70%);
  overflow: hidden;
}
.hero .blob {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; z-index: 0;
}
.hero .blob-1 { width: 340px; height: 340px; background: var(--blue-2); top: -120px; left: -80px; }
.hero .blob-2 { width: 300px; height: 300px; background: var(--pink-2); top: -60px; right: -100px; }
.hero .blob-3 { width: 260px; height: 260px; background: var(--teal-2); bottom: -140px; left: 40%; }
.hero-logo-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 204px; height: 204px; border-radius: 50%; background: #fff;
  margin: 0 auto 20px; box-shadow: 0 12px 30px rgba(47,111,237,0.22);
}
.hero .logo-icon { height: 116px; width: auto; margin-bottom: 0; }
.hero h1 {
  font-size: 46px; margin: 0 0 8px; letter-spacing: -0.5px; font-weight: 800;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .slogan { font-size: 18px; color: var(--purple); font-weight: 700; margin: 0 0 20px; }
.hero p.lead { max-width: 680px; margin: 0 auto 32px; color: var(--muted); font-size: 17px; }
.hero .cta-row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.hero .platform-note { color: var(--muted); font-size: 13.5px; }

/* ---------- Sections ---------- */
section { padding: 68px 0; position: relative; }
section[id] { scroll-margin-top: 70px; }
.section-title { text-align: center; margin: 0 0 10px; font-size: 30px; color: var(--navy); font-weight: 800; }
.section-sub { text-align: center; max-width: 620px; margin: 0 auto 46px; color: var(--muted); font-size: 15.5px; }

/* ---------- Feature grid ---------- */
/* ---------- Demo screenshot ---------- */
.demo-shot { background: #fff; }
.demo-shot-frame {
  max-width: 980px; margin: 0 auto; border-radius: 18px; overflow: hidden;
  background: #eef1f8; box-shadow: 0 24px 60px rgba(20,33,61,0.18);
  border: 1px solid var(--border);
}
.demo-shot-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: linear-gradient(120deg, #eef1f8, #f7f2fb);
  border-bottom: 1px solid var(--border);
}
.demo-shot-bar .dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.demo-shot-bar .dot-red { background: #ff5f57; }
.demo-shot-bar .dot-yellow { background: #febc2e; }
.demo-shot-bar .dot-green { background: #28c840; }
.demo-shot-frame img { display: block; width: 100%; height: auto; }

/* ---------- Video demo ---------- */
.video-demo { background: linear-gradient(180deg, var(--bg), #fff); }
.video-frame {
  position: relative; max-width: 1140px; margin: 0 auto; border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(20,33,61,0.18); background: #000; line-height: 0;
}
.video-frame video { display: block; width: 100%; height: auto; }
.video-fullscreen-btn {
  position: absolute; bottom: 18px; right: 18px; z-index: 2;
  width: 44px; height: 44px; border-radius: 10px; border: none; cursor: pointer;
  background: rgba(10,14,26,0.55); color: #fff; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, transform .15s ease;
}
.video-fullscreen-btn:hover { background: rgba(10,14,26,0.8); transform: scale(1.06); }

#features { background: linear-gradient(180deg, #fbfcff, var(--bg)); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card {
  position: relative;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 22px 24px; box-shadow: var(--shadow);
  border-top: 4px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(20,33,61,0.14); }
.feature-card.feature-blue   { border-top-color: var(--blue); }
.feature-card.feature-purple { border-top-color: var(--purple); }
.feature-card.feature-teal   { border-top-color: var(--teal); }
.feature-card.feature-pink   { border-top-color: var(--pink); }
.feature-card.feature-orange { border-top-color: var(--orange); }
.feature-card.feature-green  { border-top-color: var(--green); }

.icon-badge {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 14px; color: #fff;
}
.feature-blue   .icon-badge { background: linear-gradient(135deg, var(--blue), var(--blue-2)); }
.feature-purple .icon-badge { background: linear-gradient(135deg, var(--purple), var(--purple-2)); }
.feature-teal   .icon-badge { background: linear-gradient(135deg, var(--teal), var(--teal-2)); }
.feature-pink   .icon-badge { background: linear-gradient(135deg, var(--pink), var(--pink-2)); }
.feature-orange .icon-badge { background: linear-gradient(135deg, var(--orange), var(--orange-2)); }
.feature-green  .icon-badge { background: linear-gradient(135deg, var(--green), var(--green-2)); }

.feature-card h3 { margin: 0 0 8px; font-size: 17px; color: var(--navy); }
.feature-card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- Authors ---------- */
.authors { background: #fff; }
.authors-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.author-card {
  text-align: center; padding: 32px 22px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg);
  transition: transform .18s ease, box-shadow .18s ease;
}
.author-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.author-avatar-ring {
  width: 108px; height: 108px; border-radius: 50%; margin: 0 auto 18px; padding: 4px;
  display: flex; align-items: center; justify-content: center;
}
.author-blue   .author-avatar-ring { background: linear-gradient(135deg, var(--blue), var(--blue-2)); }
.author-purple .author-avatar-ring { background: linear-gradient(135deg, var(--purple), var(--purple-2)); }
.author-teal   .author-avatar-ring { background: linear-gradient(135deg, var(--teal), var(--teal-2)); }

.author-avatar-photo {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 3px solid #fff; display: block;
}

.author-card h3 { margin: 0 0 4px; font-size: 16.5px; color: var(--navy); }
.author-card .role { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.author-card a.scholar-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); color: var(--navy);
  transition: border-color .15s ease, color .15s ease;
}
.author-blue   a.scholar-link:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.author-purple a.scholar-link:hover { border-color: var(--purple); color: var(--purple); text-decoration: none; }
.author-teal   a.scholar-link:hover { border-color: var(--teal); color: var(--teal); text-decoration: none; }

/* ---------- Download ---------- */
.download {
  background: linear-gradient(160deg, #101b34, #22265a 45%, #2b1f52 100%);
  color: #fff; text-align: center; overflow: hidden;
}
.download::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(40% 60% at 15% 20%, rgba(47,111,237,0.35), transparent 60%),
              radial-gradient(40% 60% at 85% 80%, rgba(232,67,147,0.30), transparent 60%);
  pointer-events: none;
}
.download .section-title, .download .section-sub { color: #fff; }
.download .section-sub { color: #c7d1ea; }
.download-cards { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.download-card {
  width: 260px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius); padding: 28px 22px;
  transition: transform .18s ease, background .18s ease;
}
.download-card:hover { transform: translateY(-4px); background: rgba(255,255,255,0.11); }
.download-card .platform-icon { font-size: 36px; margin-bottom: 10px; }
.download-card h3 { margin: 0 0 6px; font-size: 17px; }
.download-card p { margin: 0 0 16px; color: #b8c3de; font-size: 13.5px; }
.badge-soon {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 12px;
  border-radius: 999px; background: linear-gradient(120deg, var(--orange), var(--pink)); color: #fff; margin-bottom: 10px;
}
.mac-note { margin: 12px 0 0; font-size: 12px; color: #9aa6c9; }

/* ---------- Footer ---------- */
footer.site-footer {
  padding: 26px 0; text-align: center; color: var(--muted); font-size: 13.5px;
  border-top: 1px solid var(--border); background: #fff;
}
.footer-github { margin-left: 12px; font-weight: 600; }
.footer-contact { margin-left: 12px; font-weight: 600; }

/* ---------- Lightbox (click-to-zoom) ---------- */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 14, 26, 0.88);
  align-items: center; justify-content: center; padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox-close {
  position: absolute; top: 18px; right: 22px; background: rgba(255,255,255,0.12); color: #fff;
  border: none; width: 40px; height: 40px; border-radius: 50%; font-size: 22px; cursor: pointer;
  line-height: 1;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }

/* ---------- Publications page ---------- */
.page-hero { padding: 56px 0 24px; text-align: center; }
.page-hero h1 {
  font-size: 38px; margin: 0 0 10px; font-weight: 800;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-hero .lead { max-width: 620px; margin: 0 auto; color: var(--muted); font-size: 16.5px; }
.publications-list { padding-top: 12px; }
.empty-state {
  max-width: 460px; margin: 0 auto; text-align: center; padding: 48px 30px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.empty-state .icon-badge { width: 52px; height: 52px; border-radius: 14px; font-size: 24px; }
.empty-state h3 { margin: 0 0 8px; color: var(--navy); font-size: 18px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 14.5px; }
.publications-content {
  max-width: 760px; margin: 0 auto; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px 36px; color: var(--ink);
  font-size: 15px; line-height: 1.7;
}
.publications-content p {
  margin: 0 0 16px; padding-left: 2em; text-indent: -2em; /* APA hanging indent */
}
.publications-content a { font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .features-grid, .authors-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }

  .nav-toggle { display: flex; }
  .navbar .container { flex-wrap: wrap; }
  .navbar nav {
    display: none; margin-left: 0; width: 100%;
    flex-direction: column; align-items: flex-start; gap: 4px;
    padding-top: 10px; border-top: 1px solid var(--border);
  }
  .navbar nav.open { display: flex; }
  .navbar nav a { width: 100%; padding: 10px 4px; }
  .navbar .btn.nav-cta { margin-left: 0; margin-top: 6px; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .hero { padding: 56px 0 40px; }
  .hero-logo-badge { width: 141px; height: 141px; }
  .hero .logo-icon { height: 84px; }
  .hero h1 { font-size: 28px; }
  .hero .slogan { font-size: 15.5px; }
  .hero p.lead { font-size: 15px; }
  .hero .cta-row { flex-direction: column; align-items: stretch; }
  .hero .cta-row .btn { justify-content: center; }

  section { padding: 48px 0; }
  .section-title { font-size: 24px; }

  .download-cards { flex-direction: column; align-items: stretch; }
  .download-card { width: 100%; }

  .demo-shot-bar { padding: 10px 12px; }
}
