/* ------------------------------------------------------------------
   dkanou.github.io — site styles
   Plain CSS, no build step. Edit freely.
   ------------------------------------------------------------------ */
:root {
  --bg: #fbfbfa;
  --bg-2: #f1f1ee;
  --fg: #1c1c1a;
  --fg-2: #4d4d49;
  --fg-3: #7a7a74;
  --line: #e2e2dd;
  --accent: #7a1f1f;        /* deep red (UCL-ish claret) */
  --accent-2: #a33a2b;
  --accent-soft: #f6e9e6;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px -8px rgba(0,0,0,.12);
  --radius: 12px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131312; --bg-2: #1c1c1a; --fg: #ecece8; --fg-2: #bdbdb6; --fg-3: #8f8f88;
    --line: #2c2c29; --accent: #e08a7a; --accent-2: #f0a595; --accent-soft: #2a1d1b; --card: #1c1c1a;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px -8px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --bg: #131312; --bg-2: #1c1c1a; --fg: #ecece8; --fg-2: #bdbdb6; --fg-3: #8f8f88;
  --line: #2c2c29; --accent: #e08a7a; --accent-2: #f0a595; --accent-soft: #2a1d1b; --card: #1c1c1a;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px -8px rgba(0,0,0,.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--fg); background: var(--bg); }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-top: 0; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.muted { color: var(--fg-2); }
.small { font-size: .9rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---- header / nav ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; color: var(--fg); font-size: 1.05rem; }
.brand img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--fg-2); font-weight: 500; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--fg); background: var(--bg-2); }
.nav-links a.cta { color: #fff; background: var(--accent); }
.nav-links a.cta:hover { background: var(--accent-2); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--fg); cursor: pointer; }
.nav-toggle svg { display: block; }
.theme-toggle { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; color: var(--fg-2); cursor: pointer; line-height: 0; }
.theme-toggle:hover { color: var(--fg); background: var(--bg-2); }
@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; gap: 2px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; font-size: 1.05rem; }
}

/* ---- layout blocks ---- */
main { padding: clamp(24px, 5vw, 56px) 0; }
section + section { margin-top: clamp(40px, 7vw, 72px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-4 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-2 { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; }
.card .media { aspect-ratio: 16/10; background: var(--bg-2); overflow: hidden; }
.card .media img, .card .media video { width: 100%; height: 100%; object-fit: cover; }
.card .meta { color: var(--fg-3); font-size: .85rem; }
.card .links { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--bg-2); color: var(--fg-2); border: 1px solid var(--line); }
.tag.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); color: var(--fg); background: var(--card); transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); background: var(--bg-2); color: var(--fg); }
.btn.primary { background: var(--accent); color: #fff; border-color: transparent; }
.btn.primary:hover { background: var(--accent-2); color: #fff; }
.btn.sm { padding: 5px 11px; font-size: .85rem; border-radius: 8px; }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
@media (min-width: 760px) { .hero { grid-template-columns: 1.4fr 1fr; gap: 48px; } }
.hero .portrait { width: min(260px, 60vw); justify-self: center; border-radius: 24px; box-shadow: var(--shadow); order: -1; }
@media (min-width: 760px) { .hero .portrait { justify-self: end; width: 100%; max-width: 360px; order: 0; } }
.hero h1 { margin-bottom: 6px; }
.hero .role { font-size: 1.15rem; color: var(--fg-2); margin-bottom: 18px; }
.hero .lede { font-size: 1.08rem; max-width: 60ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.social a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: var(--fg-2); font-size: .88rem; background: var(--card); }
.social a:hover { color: var(--fg); background: var(--bg-2); }
.social svg { width: 16px; height: 16px; fill: currentColor; }

/* ---- stats ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 28px 0 clamp(40px, 7vw, 72px); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 1.5rem; line-height: 1.1; color: var(--accent); }
.stat span { color: var(--fg-2); font-size: .85rem; }

/* ---- robots strip ---- */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.strip figure { margin: 0; }
.strip img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; width: 100%; }
.strip figcaption { font-size: .78rem; color: var(--fg-3); text-align: center; margin-top: 4px; }

/* ---- publications ---- */
.pub-tools { display: grid; gap: 10px; grid-template-columns: 1fr; margin-bottom: 20px; }
@media (min-width: 700px) { .pub-tools { grid-template-columns: 1fr auto auto; align-items: center; } }
.pub-tools input, .pub-tools select { font: inherit; font-size: .95rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--fg); width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.chip { font: inherit; font-size: .85rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--fg-2); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: transparent; }
.pub-year { margin: 28px 0 10px; font-size: 1.1rem; color: var(--fg-2); border-bottom: 1px solid var(--line); padding-bottom: 6px; position: sticky; top: 60px; background: var(--bg); z-index: 1; }
.pub { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .pub { grid-template-columns: 190px 1fr; } }
.pub .thumb { aspect-ratio: 16/10; background: var(--bg-2); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.pub .thumb.empty { background: repeating-linear-gradient(135deg, var(--bg-2) 0 8px, color-mix(in srgb, var(--bg-2) 60%, var(--line)) 8px 16px); }
@media (max-width: 639px) { .pub .thumb.empty { display: none; } }
.pub .thumb img, .pub .thumb video { width: 100%; height: 100%; object-fit: cover; }
.pub .title { font-weight: 650; margin: 0 0 2px; font-size: 1.02rem; }
.pub .authors { color: var(--fg-2); font-size: .93rem; margin: 0 0 2px; }
.pub .authors b { color: var(--fg); font-weight: 600; }
.pub .venue { color: var(--fg-3); font-size: .88rem; margin: 0 0 6px; }
.pub .links { display: flex; flex-wrap: wrap; gap: 6px; }
.pub .links a { font-size: .8rem; font-weight: 600; text-decoration: none; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); color: var(--fg-2); background: var(--card); }
.pub .links a:hover { color: var(--accent); border-color: var(--accent); }
.pub .links a.lk-pdf { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.pub .award { color: var(--accent); font-size: .85rem; font-weight: 600; }
.pub-empty { color: var(--fg-3); padding: 24px 0; }

/* ---- selected papers (home) ---- */
.paper-card .media { aspect-ratio: 16/9; }

/* ---- consultancy ---- */
.service { padding: 22px; }
.service .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 12px; }
.service .icon svg { width: 22px; height: 22px; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 18px 20px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.timeline .when { font-size: .8rem; color: var(--fg-3); text-transform: uppercase; letter-spacing: .06em; }
.callout { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); border-radius: var(--radius); padding: 24px; }
.callout h2 { margin-top: 0; }
.logos { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; color: var(--fg-3); font-weight: 600; font-size: .95rem; }

/* ---- prose pages ---- */
.prose { max-width: 72ch; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
dl.facts dt { color: var(--fg-3); font-size: .9rem; }
dl.facts dd { margin: 0; }
@media (max-width: 500px) { dl.facts { grid-template-columns: 1fr; gap: 2px; } dl.facts dd { margin-bottom: 10px; } }
.pdf-frame { width: 100%; height: 80vh; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }

.banner { width: 100%; aspect-ratio: 21/9; object-fit: cover; border-radius: var(--radius); margin-bottom: 28px; box-shadow: var(--shadow); }
@media (max-width: 600px) { .banner { aspect-ratio: 16/10; } }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--fg-3); font-size: .9rem; margin-top: 40px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.quote { font-style: italic; color: var(--fg-3); }
