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

:root {
  --bg:        #0a0e17;
  --bg-card:   #111827;
  --bg-dark:   #060a12;
  --surface:   #1a2035;
  --border:    #1e293b;
  --text:      #e2e8f0;
  --text-muted:#94a3b8;
  --accent:    #7c3aed;
  --accent-2:  #3b82f6;
  --gradient:  linear-gradient(135deg, #38bdf8, #7c3aed, #a855f7);
  --radius:    10px;
  --max-w:     1100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: opacity .15s; }
a:hover { opacity: 0.85; }

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

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

/* ── Navigation ───────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav.scrolled { background: rgba(10, 14, 23, 0.95); }

.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-size: 18px; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.nav-logo-img {
  height: 24px; width: auto;
}
.logo-icon {
  font-size: 20px;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-ai {
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  transition: color .15s;
}
.nav-links a:hover { color: var(--text); opacity: 1; }

.nav-toggle {
  display: none; background: none; border: none; color: var(--text);
  font-size: 22px; cursor: pointer;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 90vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
}
.hero-bg-img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.25;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(59,130,246,0.15) 0%, transparent 70%),
    linear-gradient(to bottom, transparent 60%, var(--bg) 100%);
}

.hero-content {
  position: relative; text-align: center;
  max-width: 720px; padding: 120px 24px 80px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800; line-height: 1.15;
  letter-spacing: -0.02em;
}
.hero-accent {
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  margin-top: 20px; font-size: 18px; color: var(--text-muted);
  max-width: 540px; margin-left: auto; margin-right: auto;
}

.hero-actions { margin-top: 36px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; padding: 12px 28px;
  border-radius: 8px; font-size: 14px; font-weight: 600;
  transition: all .2s; cursor: pointer; border: none;
}
.btn-primary {
  background: var(--gradient); color: #fff;
  box-shadow: 0 4px 20px rgba(124,58,237,0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(124,58,237,0.35); opacity: 1; }

.btn-ghost {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); opacity: 1; }

/* ── Sections ─────────────────────────────────────────────────────────────── */
.section { padding: 100px 0; }
.section-dark { background: var(--bg-dark); }

.section-title {
  font-size: 42px; font-weight: 800; letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.section-sub { color: var(--text-muted); font-size: 16px; margin-bottom: 48px; }

/* ── About ────────────────────────────────────────────────────────────────── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start;
}

.about-text p { color: var(--text-muted); margin-bottom: 16px; font-size: 15px; line-height: 1.7; }

.about-links { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.link-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 20px;
  color: var(--text); font-size: 14px; font-weight: 500;
  transition: border-color .2s, background .2s;
}
.link-card:hover { border-color: var(--accent); background: var(--bg-card); opacity: 1; }
.link-icon { font-size: 18px; min-width: 24px; text-align: center; }

.about-stats {
  display: grid; grid-template-columns: 1fr; gap: 20px;
}
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column;
}
.stat-num {
  font-size: 36px; font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── Products ─────────────────────────────────────────────────────────────── */
.product-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}

.product-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0;
  overflow: hidden; transition: border-color .2s, transform .2s;
}
.product-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.product-img-placeholder {
  height: 200px;
  background: linear-gradient(135deg, var(--surface), var(--bg-dark));
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.product-img-placeholder img {
  width: 100%; height: 100%; object-fit: cover;
}

.product-card h3 {
  padding: 20px 20px 8px; font-size: 17px; font-weight: 700;
}
.product-card p {
  padding: 0 20px; font-size: 13px; color: var(--text-muted); line-height: 1.6;
}

.inline-link {
  color: var(--accent); font-weight: 600;
  border-bottom: 1px dashed transparent; padding-bottom: 1px;
  transition: border-color .15s, opacity .15s;
}
.inline-link:hover { border-bottom-color: var(--accent); opacity: 1; }

.product-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 14px 20px 20px; list-style: none;
}
.product-tags li {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 12px;
  font-size: 11px; color: var(--text-muted); font-weight: 500;
}

/* ── Philosophy ───────────────────────────────────────────────────────────── */
.philosophy-layout {
  display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: start;
}

.philosophy-diagram {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  position: sticky; top: 80px;
}

.phil-layer {
  width: 100%; border-radius: var(--radius); padding: 24px 20px;
  text-align: center;
}

.phil-human {
  background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(245,158,11,0.12));
  border: 1px solid rgba(251,191,36,0.4);
}

.phil-human .phil-label { color: #fbbf24; }

.phil-agent {
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(56,189,248,0.15));
  border: 1px solid rgba(124,58,237,0.35);
}

.phil-core {
  background: linear-gradient(135deg, rgba(56,189,248,0.1), rgba(16,185,129,0.1));
  border: 1px solid rgba(16,185,129,0.35);
}

.phil-label {
  font-size: 15px; font-weight: 700; margin-bottom: 4px;
}

.phil-agent .phil-label { color: #a78bfa; }
.phil-core .phil-label  { color: #34d399; }

.phil-desc {
  font-size: 12px; color: var(--text-muted); line-height: 1.5;
}

.phil-arrow {
  color: var(--text-muted); font-size: 12px; padding: 8px 0;
  letter-spacing: 0.05em;
}

.philosophy-text p {
  color: var(--text-muted); font-size: 15px; line-height: 1.8;
  margin-bottom: 16px;
}
.philosophy-text strong { color: var(--text); }

/* ── Vision ───────────────────────────────────────────────────────────────── */
.vision-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}

.vision-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  transition: border-color .2s, transform .2s;
}
.vision-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.vision-num {
  font-size: 32px; font-weight: 800; margin-bottom: 12px;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.vision-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.vision-card p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* ── Page hero (subpages) ─────────────────────────────────────────────────── */
.page-hero {
  padding: 120px 0 40px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(28px, 4vw, 42px); font-weight: 800;
  letter-spacing: -0.02em; margin-bottom: 12px;
}

/* ── Team ─────────────────────────────────────────────────────────────────── */
.team-grid {
  display: flex; flex-direction: column; gap: 48px;
}

.team-member {
  display: flex; gap: 36px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px;
  transition: border-color .2s;
}
.team-member:hover { border-color: var(--accent); }

.team-sidebar {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center;
  width: 180px;
}

.team-photo {
  width: 180px;
  border-radius: var(--radius); overflow: hidden;
  border: 2px solid var(--border);
  margin-bottom: 16px;
}

.team-photo img {
  width: 100%; height: auto; display: block;
}

.team-sidebar h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; text-align: center; }

.team-role {
  font-size: 13px; font-weight: 500; text-align: center; line-height: 1.5;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.team-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.team-links a {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 14px;
  transition: border-color .2s, opacity .15s;
  color: var(--text);
}
.team-links a:hover { opacity: 0.85; }

.tl-logo { height: 18px; width: auto; flex-shrink: 0; }
.tl-logo-usyd { height: 22px; filter: invert(1); }
.tl-logo-li { height: 18px; }

.tl-usyd { border-color: rgba(200,200,200,0.2); }
.tl-usyd:hover { border-color: rgba(200,200,200,0.5); }

.tl-linkedin { color: #0a66c2; border-color: rgba(10,102,194,0.25); }
.tl-linkedin:hover { border-color: #0a66c2; }

.team-body p {
  font-size: 15px; color: var(--text-muted); line-height: 1.8;
  margin-bottom: 14px;
}
.team-body p:last-child { margin-bottom: 0; }

/* ── Nav active link ─────────────────────────────────────────────────────── */
.nav-links a.active { color: var(--text); }

/* ── Blog ─────────────────────────────────────────────────────────────────── */
.blog-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px;
}

.blog-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 48px; gap: 24px; flex-wrap: wrap;
}
.blog-header .section-title { margin-bottom: 8px; }
.blog-header .section-sub { margin-bottom: 0; }

.blog-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .2s, transform .2s;
  color: var(--text); display: block;
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-2px); opacity: 1; }

.blog-card-img { padding: 0; overflow: hidden; }
.blog-card-img-wrap {
  background: #fff; padding: 12px; border-bottom: 1px solid var(--border);
}
.blog-card-img-wrap img { width: 100%; height: 140px; object-fit: contain; display: block; }
.blog-card-body { padding: 20px 24px 24px; }

.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

.blog-article {
  padding: 40px 0; border-bottom: 1px solid var(--border);
}
.blog-article:last-child { border-bottom: none; }
.blog-article h2 {
  font-size: 28px; font-weight: 800; letter-spacing: -0.02em;
  margin: 8px 0 14px;
}
.article-lead {
  font-size: 17px; color: var(--text-muted); line-height: 1.6;
  margin-bottom: 20px;
}
.article-figure {
  margin: 24px 0 28px;
  background: #fff; border-radius: var(--radius);
  padding: 16px; text-align: center;
}
.article-figure img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.article-figure figcaption {
  font-size: 12px; color: var(--text-muted); margin-top: 10px; font-style: italic;
}

.article-details {
  margin: 24px 0 0; padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.article-details summary {
  cursor: pointer; padding: 12px 0;
  font-size: 14px; font-weight: 600; color: var(--accent);
  list-style: none; user-select: none;
  display: flex; align-items: center; gap: 8px;
  transition: opacity .15s;
}
.article-details summary::-webkit-details-marker { display: none; }
.article-details summary:hover { opacity: 0.85; }
.article-details summary::before {
  content: "▸"; font-size: 12px; transition: transform .2s;
  display: inline-block;
}
.article-details[open] summary::before { transform: rotate(90deg); }
.article-details[open] summary { margin-bottom: 8px; }

.article-body p { font-size: 15px; color: var(--text-muted); line-height: 1.8; margin-bottom: 16px; }
.article-body h3 {
  font-size: 18px; font-weight: 700; color: var(--text);
  margin: 32px 0 14px; letter-spacing: -0.01em;
}
.article-body h3:first-child { margin-top: 8px; }

.article-footer { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.article-external-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; color: #0a66c2;
  background: var(--bg-card); border: 1px solid rgba(10,102,194,0.25);
  border-radius: 8px; padding: 10px 16px;
  transition: border-color .2s, opacity .15s;
}
.article-external-link:hover { border-color: #0a66c2; opacity: 0.88; }

.blog-date { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.blog-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.blog-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  background: var(--bg-dark); border-top: 1px solid var(--border);
  padding: 60px 0 40px;
}

.footer-inner {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  text-align: center;
}

.footer-brand { font-size: 20px; font-weight: 800; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.footer-logo-img { height: 32px; width: auto; margin-bottom: 4px; }
.footer-tagline { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

.footer-contact {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-align: center;
}
.footer-contact-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px;
}
.footer-contact a {
  font-size: 13px; color: var(--accent); font-weight: 500;
}
.footer-contact a:hover { opacity: 0.85; }

.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-muted); font-size: 13px; font-weight: 500; }
.footer-links a:hover { color: var(--text); }

.footer-copy { font-size: 12px; color: var(--text-muted); }

/* ── Macro Dashboard ──────────────────────────────────────────────────────── */
.macro-section { padding-top: 20px; }
.macro-loading { text-align: center; color: var(--text-muted); padding: 60px 0; font-size: 14px; }

.macro-date-strip {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-muted);
  padding: 12px 16px; margin-bottom: 20px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px;
}
.macro-date-strip strong { color: var(--text); font-weight: 700; }

.macro-headline {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px;
  margin-bottom: 40px;
}

.macro-headline > div {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}

.macro-label {
  font-size: 11px; color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.macro-regime-name { font-size: 32px; font-weight: 800; letter-spacing: 0.02em; }
.macro-regime-position { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

.macro-score-big { font-size: 36px; font-weight: 800; }
.macro-score-scale { font-size: 11px; color: var(--text-muted); margin-top: 8px; }

.macro-date { font-size: 20px; font-weight: 700; }
.macro-exported { font-size: 11px; color: var(--text-muted); margin-top: 8px; }

.macro-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; margin-bottom: 24px;
}
.macro-block h3 {
  font-size: 14px; font-weight: 700; margin-bottom: 20px;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text);
}

.macro-details summary {
  cursor: pointer; list-style: none; user-select: none;
  font-size: 14px; font-weight: 700; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 10px;
  transition: opacity .15s;
}
.macro-details summary::-webkit-details-marker { display: none; }
.macro-details summary:hover { opacity: 0.85; }
.macro-details summary::before {
  content: "▸"; font-size: 12px; color: var(--accent);
  transition: transform .2s; display: inline-block;
}
.macro-details[open] summary::before { transform: rotate(90deg); }
.macro-details[open] summary { margin-bottom: 20px; }

/* Regime probability bars */
.regime-probs { display: flex; flex-direction: column; gap: 12px; }
.prob-row { display: grid; grid-template-columns: 80px 1fr 50px; gap: 12px; align-items: center; }
.prob-label { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.prob-bar-wrap { background: var(--bg-card); border-radius: 4px; height: 10px; overflow: hidden; }
.prob-bar { height: 100%; border-radius: 4px; transition: width .4s; }
.prob-value { font-size: 12px; color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }

/* Section breakdown */
.section-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 24px;
}
.section-item {}
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.section-title { font-size: 13px; font-weight: 600; color: var(--text); }
.section-weight { font-size: 10px; color: var(--text-muted); }
.section-bar-wrap { background: var(--bg-card); border-radius: 3px; height: 6px; overflow: hidden; margin-bottom: 4px; }
.section-bar { height: 100%; border-radius: 3px; transition: width .4s; }
.section-score { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.section-range { color: var(--text-muted); opacity: 0.6; }

/* Regime history (static chart) */
.regime-figure { margin: 0; background: #fff; border-radius: 6px; padding: 12px; }
.regime-figure img { width: 100%; height: auto; display: block; border-radius: 4px; }
.regime-figure figcaption {
  font-size: 11px; color: var(--text-muted); margin-top: 10px;
  font-style: italic; text-align: center;
}

/* History chart */
.history-chart { width: 100%; }
.chart-svg { width: 100%; height: auto; display: block; }

/* Fear & Greed */
.fg-gauge { text-align: left; }
.fg-value { font-size: 36px; font-weight: 800; line-height: 1; }
.fg-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; margin-bottom: 14px; }
.fg-bar-wrap { position: relative; height: 6px; border-radius: 3px; overflow: hidden; }
.fg-bar-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to right, #dc2626, #f97316, #f59e0b, #84cc16, #10b981);
}
.fg-marker {
  position: absolute; top: -3px; width: 3px; height: 12px;
  background: var(--text); border-radius: 2px; transform: translateX(-50%);
  box-shadow: 0 0 0 2px var(--surface);
}
.fg-scale { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-muted); margin-top: 6px; }

.macro-disclaimer {
  font-size: 11px; color: var(--text-muted); line-height: 1.6;
  text-align: center; padding: 20px 0 0; font-style: italic;
}

.macro-empty { font-size: 12px; color: var(--text-muted); text-align: center; padding: 20px 0; }

/* ── Fade-in animation ────────────────────────────────────────────────────── */
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}
.fade-in.visible {
  opacity: 1; transform: translateY(0);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links   { display: none; }
  .nav-toggle  { display: block; }

  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 60px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 16px 24px; gap: 16px;
  }

  .about-grid    { grid-template-columns: 1fr; gap: 40px; }
  .product-grid  { grid-template-columns: 1fr; }
  .vision-grid   { grid-template-columns: 1fr; }
  .philosophy-layout { grid-template-columns: 1fr; }
  .philosophy-diagram { position: static; }
  .team-member { flex-direction: column; align-items: center; text-align: center; }
  .blog-header { flex-direction: column; align-items: flex-start; }
  .macro-headline { grid-template-columns: 1fr; }
  .section-grid { grid-template-columns: 1fr; }
  .prob-row { grid-template-columns: 60px 1fr 45px; }

  .hero-content { padding: 100px 20px 60px; }
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 15px; }

  .section { padding: 60px 0; }
}
