/*
 * Digital Physics Group — Publications
 * Shared stylesheet  v2.0
 * Place at: digitalphysics.se/publications/style.css
 * Each article's index.html links to: ../style.css
 */

/* ===== TOKENS ===================================================== */
:root {
  --green:   #1E4D3A;
  --green2:  #2C6B50;
  --tint:    #ECF5F0;
  --text:    #181F1C;
  --muted:   #556860;
  --bg:      #FFFFFF;
  --line:    #C4D9CF;
  --nav-h:   56px;
  --col:     672px;
  --wide:    896px;
  --serif:   'Figtree', system-ui, sans-serif;
  --sans:    'Figtree', system-ui, sans-serif;
  --ui:      'Figtree', system-ui, sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --green:  #4DBF8E;
    --green2: #6DD4A8;
    --tint:   #0C271C;
    --text:   #DEF0E8;
    --muted:  #7AA292;
    --bg:     #111916;
    --line:   #1D3829;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --green:  #4DBF8E;
  --green2: #6DD4A8;
  --tint:   #0C271C;
  --text:   #DEF0E8;
  --muted:  #7AA292;
  --bg:     #111916;
  --line:   #1D3829;
}

/* ===== RESET ====================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-padding-top: calc(var(--nav-h) + 20px); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ===== NAV ======================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
  padding: 0 24px; gap: 12px; z-index: 100;
}
/* Safe-area bar behind fixed nav on mobile */
body::before {
  content: ""; position: fixed;
  inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 101; background: var(--bg);
}
.nav-logo-link { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.nav-logo-img  { height: 32px; width: auto; display: block; }
/* Fallback badge shown if umu_logo.png fails to load */
.nav-badge {
  width: 30px; height: 30px;
  background: var(--green); border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 10px;
  font-weight: 800; color: white; letter-spacing: 0.06em;
}
.nav-crumb {
  font-family: var(--ui); font-size: 13px;
  color: var(--muted); text-decoration: none;
  margin-left: auto;
}
.nav-crumb:hover { color: var(--green); }

/* ===== LAYOUT ===================================================== */
.page {
  padding-top: calc(var(--nav-h) + 64px);
  padding-bottom: 100px;
}
.col  { max-width: var(--col);  margin: 0 auto; padding: 0 24px; }
.wide { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }

/* ===== PAPER TITLE ================================================ */
.paper-header {
  text-align: center;
  max-width: 600px; margin: 0 auto 52px; padding: 0 24px;
}
h1.paper-title {
  font-family: var(--sans);
  font-size: clamp(22px, 4.5vw, 38px);
  font-weight: 800; line-height: 1.13;
  letter-spacing: -0.03em; color: var(--text);
}

/* ===== CITATION =================================================== */
.citation {
  border-left: 3px solid var(--green);
  background: var(--tint);
  padding: 14px 18px;
  font-family: var(--ui); font-size: 14px; line-height: 1.65;
  margin-bottom: 52px;
}
.citation em { font-style: italic; }
.citation a  { color: var(--green); text-decoration: none; border-bottom: 1px solid var(--line); }
.citation a:hover { border-bottom-color: var(--green); }

/* ===== SECTION LABEL ============================================== */
.section { margin-top: 52px; }
.sec-label {
  font-family: var(--sans);
  font-size: 12px; font-weight: 700; color: var(--green);
  letter-spacing: 0.06em; margin-bottom: 14px;
  display: flex; align-items: center; gap: 12px;
}
.sec-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ===== ABSTRACT =================================================== */
p.abstract { font-size: 16.5px; line-height: 1.8; }

/* ===== FIGURE ===================================================== */
.fig-img { width: 100%; height: auto; display: block; }
.fig-placeholder {
  background: var(--tint); border: 1px dashed var(--line);
  padding: 56px 24px; text-align: center;
  font-family: var(--ui); font-size: 14px;
  color: var(--muted); font-style: italic;
}
.fig-caption {
  font-family: var(--ui); font-size: 13px;
  color: var(--muted); line-height: 1.5; margin-top: 10px;
}

/* ===== VIDEO ====================================================== */
.video-wrap {
  position: relative; padding-bottom: 56.25%; height: 0;
  overflow: hidden;
  box-shadow: 0 6px 32px rgba(30, 77, 58, 0.15);
}
.video-wrap iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; border: 0;
}

/* ===== DOWNLOADS ================================================== */
.dl-note { font-family: var(--ui); font-size: 14px; color: var(--muted); font-style: italic; }
.dl-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.dl-list a {
  font-family: var(--ui); font-size: 15px;
  color: var(--green); text-decoration: none;
  border-bottom: 1px solid var(--line); padding-bottom: 1px;
}
.dl-list a:hover { border-bottom-color: var(--green); }

/* ===== ACKNOWLEDGEMENTS =========================================== */
.ack {
  font-family: var(--ui); font-size: 14px;
  color: var(--muted); line-height: 1.7;
  padding-top: 28px; border-top: 1px solid var(--line); margin-top: 52px;
}

/* ===== FOOTER ===================================================== */
.footer {
  margin-top: 72px; text-align: center; padding: 0 24px;
  font-family: var(--ui); font-size: 13px; color: var(--muted);
}
.footer a { color: var(--green2); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ===== RESPONSIVE ================================================= */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .col, .wide { padding: 0 16px; }
  h1.paper-title { font-size: 22px; }
  .video-wrap { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
