/* ===========================================================
   Ronan Herry — research webpage
   Solarized-dark, role-based colour coding, no bold, Roboto.
   =========================================================== */

:root {
  /* Solarized (Ethan Schoonover) */
  --base03: #002b36;   /* darkest — main content canvas */
  --base02: #073642;   /* lighter surface — chrome, panels, sidebar */
  --base01: #586e75;   /* comments / muted */
  --base0:  #839496;   /* body text */
  --base1:  #93a1a1;   /* emphasized neutral text */
  --red:    #dc322f;
  --yellow: #b58900;
  --green:  #859900;
  --violet: #6c71c4;
  --cyan:   #2aa198;
  --magenta:#d33682;
  --blue:   #268bd2;

  --fg:        var(--base0);
  --fg-strong: var(--base1);
  --muted:     var(--base01);
  --rule:      #0f4552;
  --rule-subtle: rgba(147, 161, 161, 0.12);

  --link:      var(--blue);
  --h1-color:  var(--red);
  --h2-color:  var(--yellow);
  --h3-color:  var(--green);
  --detail:    var(--violet);
  --em-color:  var(--cyan);
  --strong-color: var(--magenta);

  --font: "Roboto", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --max-width: 1140px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--base02);
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.98rem;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--blue); color: var(--base03); }

a {
  color: var(--link);
  text-decoration: none;
  font-weight: 400;
}
a:hover, a:focus-visible { color: var(--cyan); }

em { color: var(--em-color); font-style: italic; font-weight: inherit; }
strong { color: var(--strong-color); font-weight: 400; }

.muted { color: var(--muted); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--base03);
  color: var(--fg-strong);
  padding: 0.6rem 1rem;
  z-index: 10;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ---------- page shell ---------- */

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  padding: 1.5rem 0;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-name {
  font-weight: 400;
  font-size: 1rem;
  color: var(--fg-strong);
  margin-right: 1.5rem;
}
.site-name:hover { color: var(--cyan); }

.site-header nav { display: flex; gap: 1.1rem; }
.site-header nav a {
  font-size: 0.85rem;
  color: var(--muted);
  margin-right: 1.1rem;
}
.site-header nav a:last-child { margin-right: 0; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--cyan); }

/* ---------- layout: content canvas + sidebar ---------- */

.layout { padding-bottom: 4rem; }

main {
  padding: 1.75rem 1.5rem 2.5rem;
  background: var(--base03);
}

aside.profile {
  margin-top: 2rem;
  padding-top: 1.5rem;
}

@media (min-width: 800px) {
  .layout {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
  }
  main { flex: 1 1 auto; min-width: 0; }
  aside.profile {
    flex: 0 0 220px;
    margin-top: 1.75rem;
    padding-top: 0;
    padding-left: 1.75rem;
    position: sticky;
    top: 1.75rem;
  }
}

/* ---------- headings : role-based colour, no bold ---------- */

h1 {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--h1-color);
  margin: 0 0 1.75rem;
}

.block { margin-top: 2.75rem; }

h2 {
  font-weight: 400;
  color: var(--h2-color);
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.paper-list + h2 { margin-top: 2.5rem; }

h3 {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--h3-color);
  margin: 1.75rem 0 0.6rem;
}

ul { padding-left: 1.2rem; margin: 0.5rem 0; }
li { margin: 0.35rem 0; }

/* ---------- vita ---------- */

.vita { list-style: none; padding-left: 0; }
.vita li { margin: 0.5rem 0; }
.vita .period {
  display: inline-block;
  min-width: 10rem;
  color: var(--detail);
  font-size: 0.85rem;
  margin-right: 0.5rem;
}

/* ---------- papers : compact, co-authors & links always visible ---------- */

.paper-list { margin-top: 0.75rem; }
.paper-list .paper:first-child { border-top: none; padding-top: 0.25rem; }

.paper {
  border-top: 1px solid var(--rule-subtle);
  padding: 0.65rem 0;
}
.paper:last-child { border-bottom: 1px solid var(--rule-subtle); }

.paper-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--fg-strong);
}
.paper-meta {
  margin-left: 0.4rem;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--detail);
  white-space: nowrap;
}

.paper-sub {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  color: var(--fg);
}
.paper-sub .coauthors { margin-right: 0.9rem; }
.paper-sub .links a { margin-right: 0.9rem; white-space: nowrap; }

.abstract-toggle { margin: 0.15rem 0 0; }
.abstract-toggle summary {
  cursor: pointer;
  list-style: none;
  color: var(--link);
  font-size: 0.8rem;
}
.abstract-toggle summary::-webkit-details-marker { display: none; }
.abstract-toggle summary::before { content: "+ "; }
.abstract-toggle[open] summary::before { content: "– "; }
.abstract-toggle summary:hover { color: var(--cyan); }

.abstract {
  margin: 0.6rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--base02);
  border-left: 2px solid var(--link);
  font-size: 0.88rem;
  color: var(--fg);
}

/* ---------- co-authors ---------- */

.coauthor-full-list { list-style: none; padding-left: 0; }
.coauthor-full-list li {
  padding: 0.5rem 0;
  border-top: 1px solid var(--rule-subtle);
  font-size: 0.9rem;
}
.coauthor-full-list li:last-child { border-bottom: 1px solid var(--rule-subtle); }
.coauthor-name { font-weight: 400; color: var(--fg-strong); }
.coauthor-full-list .muted { font-size: 0.82rem; }

/* ---------- teaching ---------- */

.course {
  border-top: 1px solid var(--rule-subtle);
  padding: 1.15rem 0;
}
.course:last-child { border-bottom: 1px solid var(--rule-subtle); }
.resources { margin-top: 0.5rem; }
.resources a { font-size: 0.85rem; }

/* ---------- profile / sidebar ---------- */

.degree { font-weight: 400; color: var(--fg-strong); margin: 0 0 0.25rem; }
.tagline { font-size: 0.85rem; margin: 0 0 1.25rem; }
.profile-links {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.82rem;
}
.profile-links li { margin: 0.45rem 0; }
.copyright { margin-top: 1.5rem; font-size: 0.78rem; }

/* ---------- icons (Font Awesome / Academicons) ---------- */

.paper-sub .links a i,
.profile-links a i,
.resources a i {
  margin-right: 0.4em;
  color: inherit;
  font-size: 0.9em;
}

/* ---------- accessibility ---------- */

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
