/* CaliToor — the dusk palette of the logo: navy sky, sunset, sun, sea. */
:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --ink: #18223a;
  --muted: #56607a;
  --line: #e2ddd4;
  --navy: #1c345e;
  --accent: #c8642c;          /* sunset, darkened for text contrast */
  --sun: #ffce70;
  --sea: #22607a;
  --hero-1: #1c345e;
  --hero-2: #566a9e;
  --hero-3: #f09460;
  --code: #eef1f6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1626;
    --surface: #16203a;
    --ink: #e8ecf4;
    --muted: #a3adc4;
    --line: #2a3654;
    --navy: #9fb6e6;
    --accent: #f5a06c;
    --sea: #7ec4d6;
    --code: #1d2945;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1626; --surface: #16203a; --ink: #e8ecf4; --muted: #a3adc4; --line: #2a3654;
  --navy: #9fb6e6; --accent: #f5a06c; --sea: #7ec4d6; --code: #1d2945; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
  font-weight: 700; letter-spacing: .01em; font-size: 19px; }
.brand img { width: 34px; height: 34px; }
.top nav { display: flex; gap: 22px; }
.top nav a { white-space: nowrap; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }

/* hero */
.hero { position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(180deg, var(--hero-1) 0%, var(--hero-2) 58%, var(--hero-3) 100%); }
.hero .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; padding-top: 88px; padding-bottom: 96px; }
.hero h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.08; margin: 0 0 18px; letter-spacing: -.02em; font-weight: 800; }
.hero p.lede { font-size: 19px; color: #e6ebf7; max-width: 34em; margin: 0 0 28px; }
.hero .badge { justify-self: center; width: min(340px, 80%); filter: drop-shadow(0 18px 40px rgba(10,20,40,.45)); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 13px; font-weight: 600; color: var(--sun); margin-bottom: 14px; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 8px; font-weight: 600; text-decoration: none; font-size: 16px; }
.btn.primary { background: var(--sun); color: #1c2438; }
.btn.ghost { color: #fff; border: 1px solid rgba(255,255,255,.5); margin-left: 10px; }
.btn:hover { filter: brightness(1.06); }

/* sections */
section { padding: 84px 0; }
section + section { border-top: 1px solid var(--line); }
h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.2; margin: 0 0 14px; letter-spacing: -.01em; }
h3 { font-size: 19px; margin: 0 0 6px; }
.intro { color: var(--muted); max-width: 46em; margin: 0 0 40px; font-size: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 22px 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.card .k { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sea); margin-bottom: 8px; }
figure { margin: 0; }
figure img { border-radius: 12px; border: 1px solid var(--line); background: #e9edf3; }
figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
ul.ticks { list-style: none; padding: 0; margin: 0; }
ul.ticks li { padding: 8px 0 8px 28px; position: relative; border-bottom: 1px solid var(--line); }
ul.ticks li:last-child { border-bottom: 0; }
ul.ticks li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.chain { width: 100%; height: auto; }
.chain text { font: 600 13px "Inter", system-ui, sans-serif; fill: var(--ink); }
.chain .sub { font-weight: 400; fill: var(--muted); font-size: 11.5px; }
.chain rect { fill: var(--surface); stroke: var(--line); }
.chain rect.hl { stroke: var(--accent); stroke-width: 1.6; }
.chain path { stroke: var(--muted); fill: none; stroke-width: 1.4; }
.chain .twin { fill: var(--sea); }

/* publications */
.books { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 56px; }
.book { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 20px 22px; }
.book .y { color: var(--accent); font-weight: 700; font-size: 14px; }
.book h3 a { color: var(--ink); text-decoration: none; }
.book h3 a:hover { text-decoration: underline; }
.book .a, .book .v { color: var(--muted); font-size: 14.5px; margin: 2px 0; }
.book p.n { margin: 10px 0 0; font-size: 15px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 36px; }
.toc a { font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.toc a:hover { border-color: var(--accent); }
.toc .n { color: var(--muted); margin-left: 4px; }
.pubgroup { margin: 0 0 48px; scroll-margin-top: 80px; }
.pubgroup h3 { font-size: 21px; margin-bottom: 14px; }
ol.pubs { list-style: none; margin: 0; padding: 0; }
ol.pubs li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
ol.pubs .y { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 15px; padding-top: 1px; }
ol.pubs .t { font-weight: 600; }
ol.pubs .t a { color: var(--ink); text-decoration: none; }
ol.pubs .t a:hover { color: var(--accent); text-decoration: underline; }
ol.pubs .a { color: var(--muted); font-size: 14.5px; }
ol.pubs .a b { color: var(--ink); font-weight: 600; }
ol.pubs .v { font-style: italic; color: var(--muted); font-size: 14.5px; }
.rg { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; margin-bottom: 48px; }
.rg p { margin: 0; color: var(--muted); }

/* footer */
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 14.5px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--muted); }

@media (max-width: 820px) {
  .hero .wrap, .grid2 { grid-template-columns: 1fr; }
  .hero .badge { width: 200px; order: -1; justify-self: start; }
  .hero .wrap { padding-top: 48px; padding-bottom: 64px; gap: 24px; }
  .grid3, .books { grid-template-columns: 1fr; }
  .top nav { gap: 14px; }
  .top nav a { font-size: 14px; }
  .top nav a.opt { display: none; }
  section { padding: 60px 0; }
  .wrap { padding: 0 16px; }
  .btn.ghost { margin-left: 0; margin-top: 10px; }
}
