/* Shared style for the pages under aleemont.dev (CV, papers, thesis).
   Same tokens as the portfolio (github.com/aleemont1/aleemont1.github.io,
   site/assets/style.css): copy changes from there, don't fork the look. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --bg: #fafaf9; --fg: #1c1917; --muted: #6b6560; --border: #e7e5e4; --surface: #f0efed;
  --accent: #c2410c; --accent-soft: #fff1e6;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0f11; --fg: #ececee; --muted: #9a9aa2; --border: #25252a; --surface: #1a1a1f;
  --accent: #fb923c; --accent-soft: #2a170b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f0f11; --fg: #ececee; --muted: #9a9aa2; --border: #25252a; --surface: #1a1a1f;
    --accent: #fb923c; --accent-soft: #2a170b;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  max-width: 46rem; margin: 0 auto; padding: 1.5rem 1.25rem 3rem;
  background: var(--bg); color: var(--fg);
  font: 1.0625rem/1.7 var(--font); font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 0.25rem; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: 2.25rem; margin: 0; }
h2 { font-size: 1.35rem; margin: 2.5rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
p, li { text-wrap: pretty; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.role { color: var(--muted); margin: 0.15rem 0 1.75rem; }
.mono, .when { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }

/* Header: name back to aleemont.dev, a few links, language and theme */
.site-header { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 1rem; margin-bottom: 3.5rem; }
.brand { color: var(--fg); font-weight: 650; letter-spacing: -0.02em; text-decoration: none; margin-right: auto; }
.nav { display: flex; gap: 1rem; font-size: 0.9375rem; }
.nav a { color: var(--muted); text-decoration: none; padding: 0.5rem 0; }
.nav a:hover { color: var(--fg); }
.actions { display: flex; }
.icon-btn {
  display: inline-grid; place-items: center; min-width: 2.5rem; height: 2.5rem; padding: 0 0.5rem;
  border: 0; border-radius: 0.6rem; background: none; color: var(--muted); cursor: pointer;
  text-decoration: none; font: 600 0.75rem/1 var(--mono);
}
.icon-btn:hover, .icon-btn[aria-pressed="true"] { background: var(--surface); color: var(--fg); }
.icon-btn svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.theme-toggle .ic-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ic-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .ic-moon { display: none; }
}
@media (scripting: none) { .theme-toggle { display: none; } }

/* Text links in a row */
.links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0 0 1rem; }
.links a, .links span { padding: 0.3rem 0; }

/* Dated or labelled rows */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.9rem 0; border-top: 1px solid var(--border); }
.rows li:last-child { border-bottom: 1px solid var(--border); }
.rows p { margin: 0; }
.rows .when { padding-top: 0.2rem; }
.row-head { font-weight: 600; }
.row-text { color: var(--muted); font-size: 0.9688rem; }

/* A document card: preview image next to text */
.doc { display: grid; grid-template-columns: 11rem 1fr; gap: 1.5rem; align-items: start; }
.doc-preview { display: block; border: 1px solid var(--border); border-radius: 0.5rem; overflow: hidden; background: var(--surface); }
.doc-preview img { display: block; width: 100%; height: auto; }

/* Abstract and other quoted blocks */
.abstract { margin: 0; padding: 1.25rem; border: 1px solid var(--border); border-radius: 0.75rem; }
.abstract p:last-child { margin-bottom: 0; }

.site-footer { margin-top: 4rem; padding-top: 1.25rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.875rem; }
.site-footer p { margin: 0.25rem 0; }
.site-footer a { color: inherit; }

@media (max-width: 34rem) {
  body { padding: 1rem 1rem 2.5rem; }
  .site-header { margin-bottom: 2.5rem; }
  .nav { order: 3; width: 100%; }
  h1 { font-size: 1.9rem; }
  .rows li { grid-template-columns: 1fr; gap: 0.1rem; }
  .doc { grid-template-columns: 8rem 1fr; gap: 1rem; }
}
@media (prefers-reduced-motion: no-preference) {
  a, .icon-btn { transition: color 0.15s, background-color 0.15s; }
  body { transition: background-color 0.25s, color 0.25s; }
}
