/* paul.gierz.eu — multi-page additions on top of the shared mocha base.
   styles.css (theme) loads first and defines the Catppuccin --vars + .card,
   .link-pill, .service, .section-label, etc. This file only ADDS classes for
   the navigation, content pages and data-driven lists; it never edits the
   shared theme. */

/* --- layout: content pages scroll from the top instead of centering ------ */
body.page {
  align-items: flex-start;
}
.container-wide {
  max-width: 880px;
}
body.page .card {
  padding: 2rem 2.25rem 2.75rem;
}

/* --- site header + nav --------------------------------------------------- */
.site-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 1.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--surface1);
}
.site-home {
  font-family: "Maple Mono NF", "JetBrains Mono", ui-monospace, monospace;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4ch;
  width: max-content;
}
.site-home .prompt { color: var(--green); }
.site-home:hover { color: var(--blue); }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.nav-pill {
  font-family: "Maple Mono NF", "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: transparent;
  color: var(--subtext);
  border: 1px solid transparent;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.nav-pill:hover {
  color: var(--blue);
  border-color: var(--surface1);
}
.nav-pill.is-active {
  color: var(--base);
  background: var(--lavender);
  border-color: var(--lavender);
  font-weight: 600;
}

/* --- landing hero -------------------------------------------------------- */
.hero { margin-top: 1.75rem; }
.hero-name { font-size: 1.7rem; }
.hero-pitch {
  margin: 0.85rem 0 0;
  font-size: 1.05rem;
  color: var(--text);
}

/* --- generic page headings + prose -------------------------------------- */
.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 1.75rem 0 0;
  color: var(--text);
}
.page-subtitle {
  margin: 0.3rem 0 0;
  color: var(--subtext);
}
.prose {
  margin-top: 1.1rem;
  color: var(--text);
  max-width: 68ch;
}
.prose h2 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.5rem;
  color: var(--lavender);
}
.prose h3 {
  font-size: 1rem;
  margin: 1.25rem 0 0.4rem;
  color: var(--text);
}
.prose p { margin: 0.6rem 0; }
.prose a { color: var(--blue); text-decoration: none; }
.prose a:hover { text-decoration: underline; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: 0.3rem 0; }
.prose code {
  font-family: "Maple Mono NF", "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.85em;
  background: var(--surface0);
  border: 1px solid var(--surface1);
  border-radius: 5px;
  padding: 0.1rem 0.35rem;
}
.prose strong { color: var(--text); }
.prose blockquote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--mauve);
  color: var(--subtext);
}
.empty-note { color: var(--subtext); }

/* --- year-grouped lists (publications, talks) --------------------------- */
.year-label {
  font-family: "Maple Mono NF", "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--peach);
  margin: 1.75rem 0 0.6rem;
}
.pub-list, .talk-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.pub, .talk {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--surface1);
}
.pub-title, .talk-title {
  color: var(--text);
  font-weight: 500;
}
.pub-title a, .talk-title a { color: var(--text); text-decoration: none; }
.pub-title a:hover, .talk-title a:hover { color: var(--blue); }
.pub-authors {
  font-size: 0.88rem;
  color: var(--subtext);
}
.pub-meta, .talk-meta {
  font-size: 0.85rem;
  color: var(--overlay1);
}
.pub-doi { color: var(--sapphire); text-decoration: none; }
.pub-doi:hover { text-decoration: underline; }

/* talk type chip */
.talk-type {
  font-family: "Maple Mono NF", "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--overlay1);
  width: max-content;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--surface1);
  border-radius: 5px;
  margin-bottom: 0.15rem;
}
.talk-type--invited { color: var(--green); border-color: var(--green); }
.talk-type--poster  { color: var(--peach); border-color: var(--peach); }

/* --- software projects --------------------------------------------------- */
.project-list {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.project {
  padding: 1.1rem 1.25rem;
  border-radius: 10px;
  background: var(--surface0);
  border: 1px solid var(--surface1);
}
.project-name {
  font-family: "Maple Mono NF", "JetBrains Mono", ui-monospace, monospace;
  font-size: 1.05rem;
  margin: 0;
  color: var(--text);
}
.project-role {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--mauve);
}
.project-desc {
  margin: 0.6rem 0 0;
  color: var(--subtext);
}
.tags {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.tag {
  font-family: "Maple Mono NF", "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  color: var(--subtext);
  background: var(--mantle);
  border: 1px solid var(--surface1);
  border-radius: 5px;
  padding: 0.1rem 0.45rem;
}
.project-links { margin-top: 0.85rem; }

/* --- CV ------------------------------------------------------------------ */
.cv-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.cv-download { align-self: center; }
.cv-section { margin-top: 1.75rem; }
.cv-entries {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.cv-entry {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.25rem 1rem;
}
.cv-period {
  font-family: "Maple Mono NF", "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.85rem;
  color: var(--overlay1);
  padding-top: 0.1rem;
}
.cv-entry-heading { color: var(--text); font-weight: 600; }
.cv-entry-org { color: var(--subtext); font-size: 0.92rem; }
.cv-entry-detail { color: var(--subtext); font-size: 0.9rem; margin-top: 0.2rem; }

@media (max-width: 560px) {
  .cv-entry { grid-template-columns: 1fr; }
  .cv-period { padding-top: 0; }
}

/* --- header top row + theme toggle -------------------------------------- */
.site-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.theme-toggle {
  flex: none;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  background: var(--surface0);
  color: var(--text);
  border: 1px solid var(--surface1);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.theme-toggle:hover {
  color: var(--blue);
  border-color: var(--blue);
  transform: translateY(-1px);
}

/* Smooth the theme swap across everything that carries a colour. :where()
   keeps specificity at 0 so the snappy 0.15s hover transitions on pills/links
   still win — hover stays crisp, only the light/dark swap eases.
   (Skipped for reduced-motion users below.) */
:where(body, body *) {
  transition:
    background-color 0.5s ease,
    color 0.5s ease,
    border-color 0.5s ease,
    box-shadow 0.5s ease;
}

/* Pills/links carry their own snappy 0.15s hover transition, which would
   otherwise make them hard-cut on a theme swap. While JS holds .theme-anim on
   <html> (just for the toggle moment), override them to ease too; afterwards
   they revert and hover stays crisp. Wrapped in no-preference so reduced-motion
   users still get the instant swap from the rule above. */
@media (prefers-reduced-motion: no-preference) {
  .theme-anim .nav-pill,
  .theme-anim .link-pill,
  .theme-anim .service,
  .theme-anim .theme-toggle {
    transition:
      background-color 0.5s ease,
      color 0.5s ease,
      border-color 0.5s ease,
      box-shadow 0.5s ease;
  }
}

/* Dark-mode grid: the shared theme draws it very faint (0.025). Bump it for
   this site only — :not([data-theme="light"]) covers explicit dark and the
   JS-off no-attribute fallback. */
:root:not([data-theme="light"]) body::before {
  background-image:
    linear-gradient(rgba(205,214,244,0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(205,214,244,0.16) 1px, transparent 1px);
}

/* --- light theme: warm cream paper --------------------------------------
   The shared mocha styles.css defines the dark palette on :root and is left
   untouched. Here we redefine the same --vars under [data-theme="light"] and
   re-skin the few spots the theme hardcoded dark rgba values. Dark stays the
   default (no attribute, or data-theme="dark").

   The light side is warm cream stationery: a soft cream "desk" (body) with the
   .card as a sheet of cream paper, a faint warm grid printed across it. Ink
   colours (sepia text, ink-blue links, amber labels) sit on top like pen on the
   pad. Green is demoted to a small olive accent only. */
:root[data-theme="light"] {
  --base:     #f3ead4;  /* desk: warm cream stock */
  --mantle:   #ece1c7;
  --crust:    #e2d4b4;
  --surface0: #faf4e4;  /* pill / sub-card fills (lighter cream) */
  --surface1: #d9c8a3;  /* borders / grid-line (warm tan) */
  --overlay0: #b3a17e;
  --overlay1: #8c7a5a;  /* muted labels */
  --text:     #3a3326;  /* sepia ink */
  --subtext:  #5f5642;
  --blue:     #2f6ae0;  /* ink-blue links */
  --lavender: #4a6fa5;  /* headings / active pill / cursor (ink blue) */
  --sapphire: #1f7a96;  /* doi (teal) */
  --mauve:    #8a5e9c;  /* minor: project-role, blockquote */
  --green:    #5a7d2e;  /* prompt ~ , invited talks (muted olive accent) */
  --peach:    #c4661a;  /* year labels (amber pen) */
}
:root[data-theme="light"] body {
  /* the cream pad is the page itself */
  background:
    radial-gradient(ellipse at 30% 0%, rgba(150,120,70,0.06), transparent 60%),
    var(--base);
}
:root[data-theme="light"] body::before {
  /* faint warm grid printed across the pad */
  background-image:
    linear-gradient(rgba(120,98,58,0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,98,58,0.11) 1px, transparent 1px);
}
:root[data-theme="light"] .card {
  /* a sheet of cream paper resting on the pad */
  background: rgba(250, 245, 230, 0.82);
  border-color: #ddccac;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 18px 40px -24px rgba(58,51,38,0.30);
}

@media (prefers-reduced-motion: reduce) {
  :where(body, body *) { transition: none; }
}

/* --- landing: hero photo, clickable selected-work, slim home nav -------- */
.hero-head { display: flex; align-items: center; gap: 1rem; }
.hero-photo {
  width: 112px; height: 112px; flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--surface1);
  background: var(--surface0);
}
.hero-photo--placeholder { display: grid; place-items: center; }
.hero-photo--placeholder::after {
  content: "photo";
  font-family: "Maple Mono NF", "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.7rem; letter-spacing: 0.08em;
  color: var(--overlay0);
}
.hero-id { min-width: 0; }

/* a whole project card as a link, no underline */
.project--link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.project--link:hover { border-color: var(--lavender); transform: translateY(-1px); }
.project--link .project-name { color: var(--lavender); }

/* scope badge (Helmholtz / European / open source) on selected-work cards */
.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.scope-badge {
  flex: none;
  font-family: "Maple Mono NF", "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: var(--subtext);
  background: var(--surface0);
  border: 1px solid var(--surface1);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  white-space: nowrap;
}
.scope-flag { font-size: 0.95em; }

.more-link {
  display: inline-block;
  margin-top: 1rem;
  font-family: "Maple Mono NF", "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.9rem;
  color: var(--blue);
  text-decoration: none;
}
.more-link:hover { text-decoration: underline; }

/* slim text nav at the foot of the home page (top nav is hidden on home) */
.home-nav {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--surface1);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
}
.home-nav-link {
  font-family: "Maple Mono NF", "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.85rem;
  color: var(--subtext);
  text-decoration: none;
}
.home-nav-link:hover { color: var(--blue); }

/* small muted note at the foot of a page (e.g. the homelab line on /software/) */
.software-note {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--surface1);
  color: var(--subtext);
  font-size: 0.9rem;
}
.software-note a { color: var(--blue); text-decoration: none; }
.software-note a:hover { text-decoration: underline; }

/* language chips: filled, to set them apart from the outline topic tags */
.tag--lang {
  background: var(--lavender);
  border-color: var(--lavender);
  color: var(--base);
  font-weight: 600;
}
/* table-like labelled rows: a fixed-width label column + chips */
.meta-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: 0.55rem;
}
.meta-label {
  flex: none;
  width: 4.5rem;
  font-family: "Maple Mono NF", "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--overlay1);
}
.meta-row .tags { margin-top: 0; }

/* inline code in a project description (e.g. `esm-tools`) */
.project-desc code {
  font-family: "Maple Mono NF", "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.85em;
  background: var(--surface0);
  border: 1px solid var(--surface1);
  border-radius: 5px;
  padding: 0.05rem 0.3rem;
}

/* contact: a clean aligned list (label column + linked handle) */
.contact-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.contact-item { display: flex; align-items: center; gap: 0.75rem; }
.contact-icon { flex: none; display: inline-flex; color: var(--overlay1); }
.contact-icon svg { width: 1.1rem; height: 1.1rem; display: block; }
.contact-icon img { width: 1.1rem; height: 1.1rem; display: block; border-radius: 2px; }
.contact-label {
  flex: none;
  width: 5.5rem;
  font-family: "Maple Mono NF", "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--overlay1);
}
.contact-link { color: var(--blue); text-decoration: none; word-break: break-word; }
.contact-link:hover { text-decoration: underline; }
