/* ============================================================
   AI4Q — AI for Quantum: Algorithms & Applications
   Shared stylesheet · editorial-academic design
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- Tokens ---------- */
:root {
  --paper:      #f7f4ed;
  --paper-deep: #efeae0;
  --ink:        #1a1f2e;
  --ink-soft:   #3a4255;
  --ink-mute:   #6b7184;
  --rule:       #d9d2c2;
  --accent:     #4338ca;   /* indigo — AI × quantum */
  --accent-soft:#818cf8;
  --highlight:  #eef0fe;
  --max:        1100px;
  --gutter:     clamp(1rem, 4vw, 2.5rem);
  /* Session palette */
  --s1-color:   #0369a1;   /* sky   — Agentic AI */
  --s2-color:   #6d28d9;   /* violet — Generative AI */
  --s3-color:   #047857;   /* emerald — Parameter Transfer */
  /* Org tags */
  --nvidia:     #5a7f00;
  --qtm:        #7c3aed;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html  { scroll-behavior: smooth; }
body  {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle paper texture */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.035 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .6; z-index: 0; mix-blend-mode: multiply;
}
main, header, footer, nav { position: relative; z-index: 1; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 .6em;
  color: var(--ink);
}
h1 {
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.07;
}
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 500; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 {
  font-size: .95rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
p { margin: 0 0 1.1em; }
a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s, color .15s;
}
a:hover { color: var(--ink); border-bottom-color: var(--accent); }
code, .mono {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: .9em;
}
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--accent);
  margin-bottom: 1.25rem;
  display: inline-block;
}
.lead {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 38em;
}

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
section {
  padding: 5rem 0;
  border-top: 1px solid var(--rule);
}
section:first-of-type { border-top: none; }
.two-col {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-top: 1rem;
}
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; gap: 1.25rem; } }

/* ---------- Header / Nav ---------- */
header.site-header {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,244,237,.93);
  backdrop-filter: blur(8px);
}
header.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}
.brand {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  border: none;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: .45em;
}
.brand:hover { color: var(--accent); border: none; }
.brand-mark {
  display: inline-block;
  width: .5em; height: .5em;
  background: var(--accent);
  border-radius: 50%;
}
nav.primary { display: flex; gap: 1.6rem; flex-wrap: wrap; }
nav.primary a {
  color: var(--ink-soft);
  font-size: .9rem;
  font-weight: 500;
  border: none;
}
nav.primary a:hover  { color: var(--accent); border: none; }
nav.primary a.current {
  color: var(--ink);
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 2px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 6rem 0 4rem;
  position: relative; overflow: hidden;
  border-top: none;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 2rem;
  position: relative;
}
.hero-deck {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 44em;
  margin-top: 1.25rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  margin-top: 2.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  font-size: .92rem;
}
.hero-meta div { display: flex; flex-direction: column; gap: .2rem; }
.hero-meta .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--ink-mute);
}
.hero-meta .value { color: var(--ink); font-weight: 500; }
.hero-wave {
  position: absolute; right: -5%; top: 25%;
  width: 55%; max-width: 680px;
  opacity: .1; pointer-events: none; z-index: 0;
}

/* ---------- Buttons ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn {
  display: inline-block;
  padding: .7rem 1.35rem;
  font-size: .93rem;
  font-weight: 500;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  border-bottom: 1px solid var(--ink);  /* override link underline rule */
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Editions list ---------- */
.editions { display: grid; gap: 0; margin-top: 2rem; }
.edition {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.edition:last-child { border-bottom: 1px solid var(--rule); }
.edition .yr {
  font-family: 'Fraunces', serif;
  font-size: 1.9rem;
  font-weight: 500;
  line-height: 1;
}
.edition .ed-meta { color: var(--ink-soft); font-size: .95rem; }
.edition .ed-meta strong { color: var(--ink); font-weight: 500; display: block; margin-bottom: .2rem; }
.edition .status {
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: .25rem .6rem;
  border: 1px solid var(--rule);
  white-space: nowrap;
}
.edition .status.live     { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.edition .status.upcoming { background: transparent; color: var(--accent); border-color: var(--accent); }
.edition .status.archived { color: var(--ink-mute); }
@media (max-width: 540px) {
  .edition { grid-template-columns: 60px 1fr; }
  .edition .status { display: none; }
}

/* ---------- Topic grid ---------- */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}
.topic h3 {
  border-top: 2px solid var(--ink);
  padding-top: 1rem;
  margin-bottom: 1rem;
}
.topic ul { list-style: none; padding: 0; margin: 0; font-size: .93rem; color: var(--ink-soft); }
.topic li { padding: .38rem 0; border-bottom: 1px dotted var(--rule); }
.topic li:last-child { border-bottom: none; }

/* ---------- Schedule / program ---------- */
.program { margin-top: 2.5rem; }
.session {
  border-top: 2px solid var(--ink);
  padding: 1.5rem 0 2rem;
}
.session-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.session-title { font-family: 'Fraunces', serif; font-size: 1.25rem; font-weight: 600; }
.session-time  { font-family: 'JetBrains Mono', monospace; font-size: .82rem; color: var(--ink-mute); }
.session-tag-inline {
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .18rem .55rem;
  border: 1px solid currentColor;
  border-radius: 3px;
}
.tag-s1 { color: var(--s1-color); }
.tag-s2 { color: var(--s2-color); }
.tag-s3 { color: var(--s3-color); }

.slot {
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 1.5rem;
  padding: .75rem 0;
  border-bottom: 1px dotted var(--rule);
  font-size: .95rem;
}
.slot:last-child { border-bottom: none; }
.slot .t {
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem;
  color: var(--ink-mute);
  padding-top: .15rem;
}
.slot .desc strong  { color: var(--ink); font-weight: 500; display: block; margin-bottom: .1rem; }
.slot .desc em      { color: var(--ink-soft); font-style: normal; font-size: .88rem; }
.slot .desc .keynote-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .1rem .4rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 2px;
  margin-left: .4rem;
  vertical-align: middle;
}
.slot .desc .talk {
  display: block;
  margin-top: .35rem;
  font-size: .9rem;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.4;
}
.slot .desc .talk.tbd { font-style: normal; color: var(--ink-mute); }
.break-row {
  padding: .75rem 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem;
  letter-spacing: .08em;
  color: var(--ink-mute);
  border-top: 1px solid var(--rule);
  text-align: center;
}

/* ---------- People (organizers / speakers) ---------- */
.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 2.5rem 2rem;
  margin-top: 3rem;
}
.person { display: flex; flex-direction: column; }
.person .photo {
  width: 100%; max-width: 148px; height: auto;
  margin-bottom: 1rem;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  display: block;
  object-fit: cover;
}
.person .name {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: .2rem;
}
.person .affil { font-size: .85rem; color: var(--ink-soft); line-height: 1.4; }
.person .role {
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  margin-bottom: .4rem;
}
.person a { font-size: .82rem; }

/* Organizer bio variant */
.people.bio-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }
.person.bio {
  flex-direction: row;
  gap: 1rem;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  padding: 1.25rem;
}
.person.bio .photo {
  width: 72px; height: 72px;
  max-width: 72px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0;
}
.person.bio .info { flex: 1; }
.person.bio .name  { font-size: .95rem; margin-bottom: .15rem; }
.person.bio .title { font-size: .78rem; color: var(--ink-mute); margin-bottom: .35rem; }
.person.bio p { font-size: .82rem; color: var(--ink-soft); line-height: 1.5; margin-bottom: .4rem; }
.org-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .12rem .45rem;
  border: 1px solid currentColor;
  border-radius: 2px;
  margin-bottom: .4rem;
}
.tag-nvidia     { color: var(--nvidia); }
.tag-quantinuum { color: var(--qtm); }

/* Speaker compact list (for schedule-adjacent display) */
.speaker-list {
  list-style: none; padding: 0; margin: 2rem 0 0;
  columns: 2; column-gap: 3rem;
}
.speaker-list li {
  break-inside: avoid;
  padding: .55rem 0;
  border-bottom: 1px dotted var(--rule);
  font-size: .93rem;
}
.speaker-list .sp-name  { font-weight: 500; color: var(--ink); }
.speaker-list .sp-affil { color: var(--ink-mute); font-size: .83rem; }
@media (max-width: 580px) { .speaker-list { columns: 1; } }

/* ---------- Publications ---------- */
.pub-list { list-style: none; padding: 0; margin-top: 2rem; }
.pub-list li {
  padding: 1rem 0;
  border-bottom: 1px dotted var(--rule);
  font-size: .93rem;
}
.pub-list li:last-child { border-bottom: none; }
.pub-list .pub-title { font-weight: 500; display: block; margin-bottom: .2rem; }
.pub-list .pub-authors { color: var(--ink-mute); font-size: .85rem; }

/* ---------- Callout ---------- */
.callout {
  background: var(--paper-deep);
  border-left: 3px solid var(--accent);
  padding: 1.4rem 1.75rem;
  margin: 2.5rem 0;
  font-size: .97rem;
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
footer.site-footer {
  margin-top: 4rem;
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--rule);
  background: var(--paper-deep);
  font-size: .87rem;
  color: var(--ink-soft);
}
footer .foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 680px) { footer .foot-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
footer h4 { margin-bottom: .75rem; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer ul li { padding: .2rem 0; }
footer .copyright {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .8rem;
  color: var(--ink-mute);
}
footer a { color: var(--ink-mute); border: none; }
footer a:hover { color: var(--accent); border: none; }

/* ---------- Entrance animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .eyebrow, .hero .hero-deck, .hero .cta-row, .hero-meta {
    animation: rise .65s ease-out backwards;
  }
  .hero .eyebrow   { animation-delay: .05s; }
  .hero h1         { animation-delay: .14s; }
  .hero .hero-deck { animation-delay: .28s; }
  .hero .cta-row   { animation-delay: .42s; }
  .hero-meta       { animation-delay: .52s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
