/* ==========================================================================
   AMSO — Association of Mathematical Sciences and Optimization
   Shared stylesheet
   ========================================================================== */

:root {
  --navy-950: #071a33;
  --navy-900: #0a2540;
  --navy-800: #123a68;
  --navy-700: #1a4d84;
  --gold-600: #b5872a;
  --gold-500: #c9972c;
  --gold-100: #f6ecd6;
  --red-700: #9c2129;
  --ink: #1c2530;
  --ink-soft: #4a5568;
  --paper: #ffffff;
  --bg: #f5f7fa;
  --line: #e2e6ec;
  --shadow: 0 10px 30px rgba(10, 37, 64, 0.09);
  --shadow-sm: 0 2px 10px rgba(10, 37, 64, 0.07);
  --radius: 10px;
  --maxw: 1160px;
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy-900);
  line-height: 1.22;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 0.6em;
}

.section {
  padding: 76px 0;
}
.section--tight { padding: 52px 0; }
.section--navy {
  background: linear-gradient(160deg, var(--navy-950), var(--navy-800));
  color: #eaf0f8;
}
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy p { color: #c4d3e6; }
.section--alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head {
  max-width: 700px;
  margin: 0 0 40px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--gold-500); color: var(--navy-950); }
.btn-primary:hover { background: var(--gold-600); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-ghost { border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-outline { border-color: var(--navy-800); color: var(--navy-800); }
.btn-outline:hover { background: var(--navy-900); color: #fff; }
.btn-outline-invert { border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-outline-invert:hover { background: rgba(255,255,255,0.12); }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

/* ---- Header / Nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 37, 64, 0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}
.brand-mark {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-500), var(--gold-600) 60%, var(--navy-900) 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy-950);
  font-size: 1rem;
  flex: none;
}
.brand-text { line-height: 1.15; }
.brand-text strong { display: block; font-size: 1rem; letter-spacing: 0.02em; }
.brand-text span { display: block; font-size: 0.7rem; color: #a9bcd3; letter-spacing: 0.04em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: #d7e2f0;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active { color: #fff; border-color: var(--gold-500); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  background: none; border: none; color: #fff;
  font-size: 1.5rem; cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--navy-950);
    padding: 16px 24px 24px;
    gap: 14px;
    display: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-cta .btn { padding: 9px 16px; font-size: 0.82rem; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 550px at 85% -10%, rgba(201,151,44,0.18), transparent 60%),
    linear-gradient(160deg, var(--navy-950) 0%, var(--navy-800) 60%, var(--navy-700) 100%);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.35) 1px, transparent 1px),
    radial-gradient(1px 1px at 80% 40%, rgba(255,255,255,0.25) 1px, transparent 1px),
    radial-gradient(1.5px 1.5px at 60% 80%, rgba(255,255,255,0.3) 1px, transparent 1px),
    radial-gradient(1px 1px at 30% 65%, rgba(255,255,255,0.25) 1px, transparent 1px),
    radial-gradient(1.5px 1.5px at 92% 85%, rgba(255,255,255,0.3) 1px, transparent 1px);
  background-size: 100% 100%;
  opacity: 0.6;
}
.hero-inner {
  position: relative;
  padding: 88px 0 84px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { color: #fff; margin-bottom: 0.4em; }
.hero .lead { color: #c7d6e8; font-size: 1.1rem; max-width: 540px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 7px 14px; border-radius: 999px;
  font-size: 0.8rem; color: #e7edf6; margin-bottom: 22px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-500); }

.hero-panel {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(4px);
}
.hero-panel img { border-radius: 6px; box-shadow: 0 18px 40px rgba(0,0,0,0.35); }
.hero-panel-cap { font-size: 0.82rem; color: #b9c9dd; margin-top: 12px; margin-bottom: 0; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 48px; }
}

/* small page hero for inner pages */
.page-hero {
  background: linear-gradient(160deg, var(--navy-950), var(--navy-800));
  color: #fff;
  padding: 64px 0 54px;
}
.page-hero h1 { color: #fff; }
.page-hero p { color: #c7d6e8; max-width: 640px; }
.breadcrumb { font-size: 0.82rem; color: #9fb3cc; margin-bottom: 14px; }
.breadcrumb a:hover { color: #fff; }

/* ---- Stats ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: -46px;
  position: relative;
  z-index: 5;
  box-shadow: var(--shadow);
}
.stat {
  background: var(--paper);
  padding: 26px 20px;
  text-align: center;
}
.stat .num {
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--navy-900);
  font-weight: 700;
}
.stat .label { font-size: 0.8rem; color: var(--ink-soft); letter-spacing: 0.02em; }
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 30px; }
}

/* ---- Cards / Grids ---- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--gold-100);
  color: var(--gold-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
}
.card h3 { margin-bottom: 8px; font-size: 1.12rem; }
.card p:last-child { margin-bottom: 0; }

/* ---- Focus area chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: var(--gold-100);
  color: var(--navy-800);
  border: 1px solid #ecd9ac;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 600;
}

/* ---- Timeline (conferences) ---- */
.timeline { position: relative; margin-top: 10px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 22px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--line);
}
.tl-item {
  position: relative;
  padding-left: 62px;
  margin-bottom: 30px;
}
.tl-item:last-child { margin-bottom: 0; }
.tl-dot {
  position: absolute;
  left: 10px; top: 4px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--navy-900);
  border: 4px solid var(--gold-500);
}
.tl-item.is-current .tl-dot { background: var(--red-700); }
.tl-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.tl-meta {
  display: flex; flex-wrap: wrap; gap: 10px 18px;
  font-size: 0.83rem; color: var(--ink-soft);
  margin-bottom: 10px;
}
.tl-meta strong { color: var(--navy-800); }
.tl-tag {
  display: inline-block;
  background: var(--navy-900); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 10px; border-radius: 999px;
  margin-bottom: 10px;
}
.tl-tag.current { background: var(--red-700); }

/* ---- Table ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table { width: 100%; border-collapse: collapse; min-width: 480px; }
th, td { text-align: left; padding: 13px 18px; font-size: 0.92rem; border-bottom: 1px solid var(--line); }
th { background: var(--navy-900); color: #fff; font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td.num { font-weight: 700; color: var(--navy-800); }

/* ---- People ---- */
.person {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.person:last-child { border-bottom: none; }
.person-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-950));
  color: var(--gold-100);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
}
.person h4 { margin: 0 0 2px; font-family: var(--font-body); font-size: 1rem; color: var(--navy-900); }
.person .role { font-size: 0.83rem; color: var(--gold-600); font-weight: 600; margin-bottom: 3px; }
.person .org { font-size: 0.83rem; color: var(--ink-soft); }

/* ---- CTA banner ---- */
.cta-banner {
  background: linear-gradient(120deg, var(--navy-900), var(--navy-700));
  border-radius: var(--radius);
  padding: 40px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-banner h3 { color: #fff; margin-bottom: 6px; }
.cta-banner p { color: #c7d6e8; margin: 0; }

/* ---- Note / callout ---- */
.callout {
  background: var(--gold-100);
  border: 1px solid #ecd9ac;
  border-left: 4px solid var(--gold-600);
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 0.92rem;
  color: var(--navy-900);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--navy-950);
  color: #b9c9dd;
  padding: 56px 0 26px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-grid h4 { color: #fff; font-family: var(--font-body); font-size: 0.86rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; font-size: 0.9rem; }
.footer-grid a:hover { color: #fff; }
.footer-brand p { color: #93a7c2; font-size: 0.88rem; max-width: 320px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 22px; font-size: 0.8rem; color: #7d92ae; flex-wrap: wrap; gap: 10px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
