/* ============================================================
   Generative AI & LLMs for Financial Markets — KDD 2026
   Design system
   ============================================================ */

:root {
  /* palette */
  --ink:        #080b14;
  --ink-2:      #0c111e;
  --surface:    #111829;
  --surface-2:  #161f33;
  --line:       rgba(255, 255, 255, 0.08);
  --line-2:     rgba(255, 255, 255, 0.14);

  --text:       #e9edf6;
  --muted:      #9aa6bf;
  --faint:      #6b7691;

  --gold:       #f0b429;
  --gold-soft:  #ffd25e;
  --azure:      #5aa2ff;
  --teal:       #4fd1c5;

  --grad: linear-gradient(135deg, var(--gold-soft), var(--gold) 45%, #e08e2a);

  /* type */
  --serif: "Fraunces", Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, monospace;

  /* spacing / shape */
  --radius:    18px;
  --radius-sm: 12px;
  --maxw:      1180px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

/* ----------------------------- reset ----------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--ink);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; }

::selection { background: rgba(240, 180, 41, 0.28); color: #fff; }

/* ----------------------------- layout helpers ----------------------------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }
.container--narrow { max-width: 820px; }

.section { padding: clamp(72px, 10vw, 130px) 0; position: relative; }
.section--alt { background: linear-gradient(180deg, var(--ink-2), var(--ink)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ----------------------------- section heads ----------------------------- */
.section__head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.section__num {
  font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.3em;
  color: var(--gold); display: inline-block; margin-bottom: 16px;
  padding-left: 2px;
}
.section__num::before { content: "— "; color: var(--faint); }
.section__title { font-size: clamp(2rem, 4.6vw, 3.1rem); }
.section__sub { margin-top: 18px; color: var(--muted); font-size: 1.06rem; max-width: 640px; }

/* ----------------------------- buttons ----------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 0.97rem;
  padding: 13px 26px; border-radius: 100px; border: 1px solid transparent;
  cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s, color .25s;
  white-space: nowrap;
}
.btn--small { padding: 9px 18px; font-size: 0.9rem; }
.btn--primary { background: var(--grad); color: #1a1206; box-shadow: 0 8px 26px -8px rgba(240, 180, 41, 0.6); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -8px rgba(240, 180, 41, 0.7); }
.btn--ghost { background: rgba(255,255,255,0.04); color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { background: rgba(255,255,255,0.09); transform: translateY(-2px); }

/* ----------------------------- scroll progress ----------------------------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad); z-index: 1000; transition: width .1s linear;
}

/* ----------------------------- nav ----------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(8, 11, 20, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px);
  height: 72px; display: flex; align-items: center; gap: 24px;
}
.nav__brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -0.01em; }
.nav__mark { color: var(--gold); display: inline-flex; }
.nav__title { font-size: 1.02rem; }
.nav__links { display: flex; gap: 6px; margin-left: auto; }
.nav__links a {
  font-size: 0.92rem; font-weight: 500; color: var(--muted);
  padding: 8px 14px; border-radius: 100px; transition: color .2s, background .2s; position: relative;
}
.nav__links a:hover { color: var(--text); }
.nav__links a.is-active { color: var(--gold); }
.nav__cta { margin-left: 4px; }
.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto; }
.nav__burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------------- hero ----------------------------- */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 120px 20px 80px; overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.55; }
.hero__grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 30%, transparent 75%);
  opacity: 0.5;
}
.hero__glow {
  position: absolute; z-index: 0; top: -10%; left: 50%; transform: translateX(-50%);
  width: 900px; height: 700px;
  background: radial-gradient(circle at 50% 40%, rgba(240,180,41,0.16), transparent 60%);
  filter: blur(20px); pointer-events: none;
}
.hero__content { position: relative; z-index: 2; max-width: 920px; }

.hero__badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 0.84rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--muted); background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-2); padding: 8px 16px; border-radius: 100px; margin-bottom: 30px;
}
.hero__badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero__title { font-size: clamp(2.4rem, 6.4vw, 5rem); font-weight: 600; letter-spacing: -0.03em; }
.hero__subtitle { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.15rem, 2.6vw, 1.7rem); color: var(--gold-soft); margin-top: 18px; }
.hero__lede { max-width: 620px; margin: 26px auto 0; color: var(--muted); font-size: 1.08rem; }

.hero__authors { display: flex; flex-wrap: wrap; gap: 8px 10px; justify-content: center; margin-top: 32px; }
.hero__authors span {
  font-size: 0.9rem; font-weight: 500; color: var(--text);
  padding: 6px 15px; border: 1px solid var(--line-2); border-radius: 100px; background: rgba(255,255,255,0.02);
}

.hero__meta { display: flex; flex-wrap: wrap; gap: 12px 26px; justify-content: center; margin-top: 30px; color: var(--muted); font-size: 0.95rem; }
.hero__meta-item { display: inline-flex; align-items: center; gap: 9px; }
.hero__meta-item svg { color: var(--gold); }

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 40px; }

.hero__scroll { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 2; }
.hero__scroll span { display: block; width: 26px; height: 42px; border: 2px solid var(--line-2); border-radius: 14px; position: relative; }
.hero__scroll span::after { content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 4px; height: 8px; background: var(--gold); border-radius: 2px; animation: scrolldot 1.8s infinite; }
@keyframes scrolldot { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translate(-50%, 14px); } 100% { opacity: 0; } }

/* ----------------------------- stats strip ----------------------------- */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ink-2); }
.strip__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); display: grid; grid-template-columns: repeat(4, 1fr); }
.strip__item { padding: 38px 18px; text-align: center; border-right: 1px solid var(--line); }
.strip__item:last-child { border-right: 0; }
.strip__num { font-family: var(--serif); font-size: 2.8rem; font-weight: 600; color: var(--gold); line-height: 1; }
.strip__label { margin-top: 10px; color: var(--muted); font-size: 0.92rem; }

/* ----------------------------- overview ----------------------------- */
.overview__lead { max-width: 760px; }
.overview__lead p { color: var(--muted); font-size: 1.12rem; margin-bottom: 18px; }
.overview__lead p:first-child { color: var(--text); }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px; }
.pillar {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; transition: transform .35s var(--ease), border-color .35s, background .35s;
  position: relative; overflow: hidden;
}
.pillar::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.pillar:hover { transform: translateY(-6px); border-color: var(--line-2); background: var(--surface-2); }
.pillar:hover::before { transform: scaleX(1); }
.pillar__index { font-family: var(--mono); font-size: 0.85rem; color: var(--gold); border: 1px solid var(--line-2); width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; margin-bottom: 22px; }
.pillar h3 { font-size: 1.32rem; margin-bottom: 12px; }
.pillar p { color: var(--muted); font-size: 0.99rem; }

/* ----------------------------- timeline / schedule ----------------------------- */
.timeline { display: flex; flex-direction: column; gap: 28px; }
.part {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(26px, 4vw, 42px); position: relative;
}
.part__header { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.part__tag { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); background: rgba(240,180,41,0.1); border: 1px solid rgba(240,180,41,0.25); padding: 5px 12px; border-radius: 100px; }
.part__title { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.part__dur { margin-left: auto; font-family: var(--mono); font-size: 0.95rem; color: var(--muted); }
.part__desc { color: var(--muted); margin-top: 14px; font-size: 1.04rem; }

.segments { list-style: none; margin-top: 28px; display: flex; flex-direction: column; }
.segment { display: flex; gap: 22px; padding: 22px 0; border-top: 1px solid var(--line); }
.segment:first-child { border-top: 0; padding-top: 4px; }
.segment__time { font-family: var(--mono); font-size: 1.05rem; font-weight: 600; color: var(--gold); min-width: 48px; padding-top: 2px; }
.segment__body h4 { font-size: 1.16rem; font-family: var(--sans); font-weight: 600; letter-spacing: -0.01em; }
.segment__body p { color: var(--muted); margin-top: 7px; font-size: 0.99rem; }
.segment__by { display: inline-block; margin-top: 12px; margin-right: 10px; font-size: 0.82rem; font-weight: 600; color: var(--azure); }

.tag { display: inline-flex; align-items: center; gap: 7px; font-size: 0.78rem; font-weight: 600; padding: 5px 12px; border-radius: 100px; margin-top: 12px; letter-spacing: 0.01em; }
.tag--demo { color: var(--teal); background: rgba(79,209,197,0.1); border: 1px solid rgba(79,209,197,0.28); }
.tag--demo::before { content: "▶"; font-size: 0.6rem; }
.tag--lab { color: var(--gold-soft); background: rgba(240,180,41,0.1); border: 1px solid rgba(240,180,41,0.28); margin-top: 0; }

.part__note { margin-top: 26px; padding-top: 20px; border-top: 1px dashed var(--line-2); color: var(--muted); font-size: 0.95rem; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ----------------------------- speakers ----------------------------- */
.group-label {
  font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 24px; display: flex; align-items: center; gap: 14px;
}
.group-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.group-label--spaced { margin-top: 60px; }
.group-note { color: var(--muted); font-size: 0.96rem; max-width: 640px; margin: -10px 0 26px; }
.speakers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.speaker {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; transition: transform .35s var(--ease), border-color .35s, background .35s;
  display: flex; flex-direction: column;
}
.speaker:hover { transform: translateY(-5px); border-color: var(--line-2); background: var(--surface-2); }
.speaker__top { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.speaker__photo {
  flex-shrink: 0; width: 86px; height: 86px; border-radius: 16px; object-fit: cover; object-position: center top;
  border: 1px solid var(--line-2); background: var(--surface-2);
}
.speaker__photo--mono {
  display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 1.7rem;
  color: var(--gold); background: rgba(240,180,41,0.08); border-color: rgba(240,180,41,0.25);
  object-fit: initial;
}
.speaker__head { min-width: 0; }
.speaker__name { font-size: 1.3rem; }
.speaker__role { color: var(--muted); font-size: 0.92rem; margin-top: 4px; }
.speaker__pill { display: inline-block; margin-top: 10px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.02em; color: var(--azure); background: rgba(90,162,255,0.1); border: 1px solid rgba(90,162,255,0.28); padding: 4px 11px; border-radius: 100px; }
.speaker__pill--alt { color: var(--muted); background: rgba(255,255,255,0.04); border-color: var(--line-2); }
.speaker__bio { color: var(--muted); font-size: 0.98rem; flex-grow: 1; }
.speaker__links { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.slink {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  color: var(--muted); background: rgba(255,255,255,0.03); border: 1px solid var(--line);
  transition: color .2s, background .2s, border-color .2s, transform .2s;
}
.slink svg { width: 18px; height: 18px; }
.slink:hover { color: var(--gold); background: rgba(240,180,41,0.1); border-color: rgba(240,180,41,0.35); transform: translateY(-2px); }

/* ----------------------------- audience ----------------------------- */
.audience { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.audience__h { font-size: 1.25rem; margin-bottom: 16px; margin-top: 36px; }
.audience__h:first-child { margin-top: 0; }
.audience__p { color: var(--muted); }
.audience__p strong { color: var(--text); }
.ticks { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ticks li { position: relative; padding-left: 32px; color: var(--muted); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px;
  background: var(--grad); border-radius: 50%;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.callout { margin-top: 36px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius-sm); padding: 24px 26px; }
.callout h4 { font-family: var(--sans); font-weight: 700; font-size: 1.05rem; margin-bottom: 8px; }
.callout p { color: var(--muted); font-size: 0.96rem; }

/* ----------------------------- resources ----------------------------- */
.resources { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.resource {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .35s var(--ease), border-color .35s, background .35s; position: relative;
}
.resource__icon { color: var(--gold); width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(240,180,41,0.08); border: 1px solid rgba(240,180,41,0.22); margin-bottom: 6px; }
.resource h3 { font-family: var(--sans); font-weight: 700; font-size: 1.06rem; }
.resource p { color: var(--muted); font-size: 0.92rem; flex-grow: 1; }
.resource__status { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-top: 6px; }
.resource__status--wip { color: var(--gold-soft); }
.resource--soon { cursor: default; }
.resource--soon:hover { border-color: var(--line-2); background: var(--surface-2); }
.resource[href]:hover { transform: translateY(-5px); border-color: rgba(240,180,41,0.35); background: var(--surface-2); }

.demos { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.demos__item { background: linear-gradient(135deg, rgba(79,209,197,0.06), transparent); border: 1px solid rgba(79,209,197,0.2); border-radius: var(--radius); padding: 28px; }
.demos__item h4 { font-family: var(--sans); font-weight: 700; font-size: 1.12rem; margin-top: 12px; }
.demos__item p { color: var(--muted); font-size: 0.96rem; margin-top: 8px; }

/* ----------------------------- cite ----------------------------- */
.cite { position: relative; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cite__copy {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  font-family: var(--sans); font-size: 0.82rem; font-weight: 600; color: var(--text);
  background: rgba(255,255,255,0.06); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 7px 14px; cursor: pointer; transition: background .2s, color .2s;
}
.cite__copy:hover { background: rgba(255,255,255,0.12); }
.cite__copy.is-copied { color: #1a1206; background: var(--gold); border-color: var(--gold); }
.cite__code { padding: 26px 24px; overflow-x: auto; }
.cite__code code { font-family: var(--mono); font-size: 0.84rem; line-height: 1.75; color: var(--muted); white-space: pre; }

/* ----------------------------- footer ----------------------------- */
.footer { background: var(--ink-2); border-top: 1px solid var(--line); padding-top: 56px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; padding-bottom: 40px; }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand .nav__mark { color: var(--gold); }
.footer__title { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.footer__meta { color: var(--faint); font-size: 0.88rem; margin-top: 3px; }
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__links a { color: var(--muted); font-size: 0.92rem; transition: color .2s; }
.footer__links a:hover { color: var(--gold); }
.footer__bottom { border-top: 1px solid var(--line); padding-top: 24px; padding-bottom: 30px; }
.footer__bottom p { color: var(--faint); font-size: 0.85rem; }

/* ----------------------------- reveal animation ----------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ----------------------------- responsive ----------------------------- */
@media (max-width: 960px) {
  .pillars, .resources { grid-template-columns: repeat(2, 1fr); }
  .speakers, .audience, .demos { grid-template-columns: 1fr; }
  .audience { gap: 8px; }
  .strip__inner { grid-template-columns: repeat(2, 1fr); }
  .strip__item:nth-child(2) { border-right: 0; }
  .strip__item:nth-child(1), .strip__item:nth-child(2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .nav__links.is-open {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: 72px; left: 0; right: 0;
    background: rgba(8,11,20,0.96); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line); padding: 16px clamp(20px,5vw,48px) 24px;
  }
  .nav__links.is-open a { padding: 12px 14px; font-size: 1rem; }
}

@media (max-width: 480px) {
  .pillars, .resources, .strip__inner { grid-template-columns: 1fr; }
  .strip__item { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .strip__item:last-child { border-bottom: 0; }
  .segment { gap: 14px; }
  .hero__actions { flex-direction: column; width: 100%; }
  .hero__actions .btn { width: 100%; }
}

/* ----------------------------- reduced motion ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .hero__canvas { display: none; }
}
