/* --------------------------
   Argillander: editorial tech
   -------------------------- */

:root {
  color-scheme: light dark;

  --bg: #0b0c10;
  --surface: #0f1117;
  --surface-2: #121520;
  --text: #e9eef7;
  --muted: #aab3c4;
  --border: rgba(255,255,255,.12);

  --accent: #7dd3fc;      /* cyan */
  --accent-2: #a7f3d0;    /* mint */
  --link: #9ad1ff;

  --radius: 14px;
  --radius-sm: 10px;

  --wrap: 980px;
  --wrap-prose: 78ch;

  --shadow: 0 10px 28px rgba(0,0,0,.35);

  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Garamond, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

html[data-theme="light"] {
  --bg: #fbfbfc;
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --text: #0b1020;
  --muted: #556074;
  --border: rgba(10,16,32,.12);

  --accent: #0ea5e9;
  --accent-2: #059669;
  --link: #0b5fff;

  --shadow: 0 12px 26px rgba(10,16,32,.10);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #fbfbfc;
    --surface: #ffffff;
    --surface-2: #f6f7fb;
    --text: #0b1020;
    --muted: #556074;
    --border: rgba(10,16,32,.12);

    --accent: #0ea5e9;
    --accent-2: #059669;
    --link: #0b5fff;

    --shadow: 0 12px 26px rgba(10,16,32,.10);
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html {
  height: 100%;
  overflow-y: scroll;       /* always reserve scrollbar */
  scrollbar-gutter: stable; /* modern browsers */
}



body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  line-height: 1.65;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: 50px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
background: url('/assets/img/background_slide_edited.svg') right 0 bottom -0.9rem / cover no-repeat;  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.header,
.main {
  position: relative;
  z-index: 1;
}

.main {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 42px 22px 70px;
  background: color-mix(in srgb, var(--bg) 30%, var(--surface) 18%);
  border-radius: 24px 24px 0 0;
}




a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(125,211,252,.55);
}

html[data-theme="light"] a,
:root:not([data-theme]) a {
  text-decoration-color: rgba(14,165,233,.35);
}

a:hover {
  text-decoration-color: rgba(167,243,208,.85);
}


.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }.muted { color: var(--muted); }
.dot { padding: 0 8px; color: var(--muted); }

.skip { position:absolute; left:-999px; top:auto; width:1px; height:1px; overflow:hidden; }
.skip:focus {
  left: 16px; top: 16px; width:auto; height:auto;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  z-index: 999;
}


/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.78);
  border-bottom: 1px solid var(--border);
}
html[data-theme="dark"] .header,
:root[data-theme="dark"] .header {
  background: rgba(15, 17, 23, .72);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  padding: 12px 22px;
  flex-wrap: wrap;
}

/* Brand as wordmark (not link-looking) */
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: var(--text);
}
.brand:hover { text-decoration: none; }

.brand__title {
  color: var(--text);
  font-weight: 780;
  letter-spacing: -0.03em;
  line-height: 1.05;
  white-space: nowrap;
}

/* Inline tagline with dot; hide when space is tight */
.brand__tag {
  color: var(--muted);
  font-size: 0.9rem;
  opacity: .85;
  white-space: nowrap;
  position: relative;
  padding-left: 10px;
}
.brand__tag::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--muted);
}
@media (max-width: 860px) {
  .brand__tag { display: none; }
}

/* Nav becomes clean second row when needed */
.nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;

  flex: 1 1 420px;
  min-width: 320px;
}
@media (max-width: 980px) {
  .nav {
    flex-basis: 100%;
    justify-content: flex-start;
    padding-top: 2px;
  }
}

.nav a {
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--text);
  position: relative;
  font-weight: 600;
  font-size: 0.95rem;
  opacity: .88;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 140ms ease, opacity 140ms ease;
  border-radius: 999px;
  opacity: .85;
}
.nav a:hover { opacity: 1; }
.nav a:hover::after { transform: scaleX(1); }

.main { padding: 42px 22px 70px; 
  flex: 1; /* pushes footer to bottom when content is short */
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.06); }

.btn--ghost {
  background: transparent;
}

/* ---------- Hero ---------- */
.hero { padding: 8px 0 6px; }

.hero__title {
  font-family: var(--serif);
  font-weight: 720;
  font-size: clamp(2.35rem, 3.2vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.hero__lead {
  margin: 0 0 18px;
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 60ch;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  padding: 16px 16px 14px;
  box-shadow: none; /* less “template-y” */
  border-color: var(--border);
}

.card {
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(125,211,252,.35);
}
html[data-theme="light"] .card:hover,
:root:not([data-theme]) .card:hover {
  border-color: rgba(14,165,233,.25);
}

html[data-theme="light"] .card,
:root:not([data-theme]) .card {
  background: linear-gradient(180deg, rgba(10,16,32,.02), rgba(10,16,32,.01));
}

.card h2 { margin: 0 0 8px; font-size: 1.02rem; letter-spacing: -0.01em; }
.card p { margin: 0 0 10px; }

.card a {
  text-decoration: none;
  font-weight: 650;
  color: var(--text);
}
.card a:hover {
  text-decoration: underline;
  text-decoration-color: rgba(167,243,208,.85);
}

@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
}

/* ---------- Sections + Lists ---------- */
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.section__head h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}


.list { list-style: none; padding: 0; margin: 0; }

.list__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.list__item a {
  font-weight: 680;
  letter-spacing: -0.01em;
}

.list__item .muted { font-size: 0.95rem; }

/* ---------- Prose ---------- */
/* CV readability: stronger hierarchy */
.prose h2 {
  margin-top: 2.4rem;        /* more separation between sections */
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.prose h2:first-of-type {
  margin-top: 1.2rem;
  padding-top: 0;
  border-top: none;
}

/* Entries under a section */
.prose h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.35rem;
}

/* Tighten the metadata + paragraph stack */
.prose h3 + .muted {
  margin-top: 0;
  margin-bottom: 0.5rem;
}
.prose h3 + p.muted {
  margin-top: 0;
  margin-bottom: 0.55rem;
}

/* Make hr an "entry separator", not a big block divider */
.prose hr {
  margin: 1rem 0;
  border: none;
  border-top: 1px solid color-mix(in srgb, var(--border), transparent 30%);
}

/* Optional: reduce list density in CV */
.prose ul {
  margin-top: 0.6rem;
  margin-bottom: 0.9rem;
}

.posthead { margin-bottom: 18px; }
.posthead__title { margin: 0 0 6px; }

.tag {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.tag:hover { color: var(--text); }

/* ---------- Code blocks ---------- */
pre {
  overflow: auto;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
}
code {
  font-family: var(--mono);
  font-size: 0.95em;
  border-radius: 8px;
  padding: 1px 6px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
}
pre code {
  border: none;
  background: transparent;
  padding: 0;
}

/* ---------- Footer ---------- */
.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;

  border-top: 1px solid var(--border);
  padding: 22px 0;
  background: var(--bg);
  box-shadow: 0 -8px 24px rgba(0,0,0,.06);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}


.pubsep {
  padding: 0 0.45em;
  color: var(--muted);
}



.news {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news__item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.news__meta {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.news__tags { display: inline-flex; gap: 6px; flex-wrap: wrap; }

.news__text p { margin: 0; } /* keep it tight */

.news__title {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin: 2px 0 6px;
}

.news__title a {
  text-decoration: none;
  font-weight: 700;
  color: var(--text);
}

.news__title a:hover {
  text-decoration: underline;
  text-decoration-color: rgba(125,211,252,.55);
}

.news__permalink {
  font-size: 0.95rem;
  text-decoration: none;
  opacity: 0.75;
}

.news__permalink:hover {
  opacity: 1;
  text-decoration: none;
}

/* Tags: pastel, distinct, theme-safe */
.tag { box-shadow: 0 1px 0 rgba(0,0,0,.06); 
font-weight: 650; letter-spacing: -0.01em; }
html[data-theme="dark"] .tag { box-shadow: 0 1px 0 rgba(255,255,255,.06); }

/* Dark mode (default): slightly brighter tints */
.tag--paper { background: rgba(167,243,208,.16); border-color: rgba(167,243,208,.55); }
.tag--workshop { background: rgba(216,180,254,.16); border-color: rgba(216,180,254,.55); }
.tag--conference { background: rgba(125,211,252,.16); border-color: rgba(125,211,252,.55); }
.tag--project { background: rgba(250,204,21,.14); border-color: rgba(250,204,21,.50); }
.tag--teaching {background: rgba(251, 113, 133, .14); border-color: rgba(251, 113, 133, .50);}
.tag--funding {background: rgba(129, 140, 248, .14); border-color: rgba(129, 140, 248, .50);}
.tag--other { background: rgba(148,163,184,.12); border-color: rgba(148,163,184,.45); }

/* Hero: text + portrait without overlap */
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  align-items: start;
}

.hero__photo { 
    margin: 0; 
    justify-self: end; 
    margin-top: 6px; 
}

.hero__photo img {
  display: block;
  width: 100%;
  max-width: 420px;
  max-height: 260px;
  height: auto;
  object-fit: cover;
  border-radius: 18px;
    border: 1px solid rgba(10,16,32,.10);
  box-shadow: 0 10px 24px rgba(10,16,32,.08);
  background: var(--surface);
}

/* Stack on smaller screens */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__photo { justify-self: start; }
  .hero__photo img { max-width: 320px; }
}


.section { margin-top: 46px; }



/* Contact cards */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 24px;
}
@media (max-width: 980px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  padding: 16px 16px 14px;
}
html[data-theme="light"] .contact-card,
:root:not([data-theme]) .contact-card {
  background: linear-gradient(180deg, rgba(10,16,32,.02), rgba(10,16,32,.01));
}

.contact-card h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.contact-card--wide { grid-column: 1 / -1; }

/* Contact list inside card */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  display: flex;
  align-items: baseline; /* or center */
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.contact-list li.contact-email a {
  font-weight: 700;
}

/* Right-align values */
.contact-list li > a {
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

/* Divider between email and phone */
.contact-list li.contact-row:first-of-type {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.contact-label {
  flex: 0 0 90px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Link styling */
.contact-list a {
  text-decoration: none;
}
.contact-list a:hover {
  text-decoration: underline;
  text-decoration-color: rgba(125,211,252,.55);
}



/* Profiles: 2-column buttons with visible pastel accents */
.icon-list {
  list-style: none;
  padding: 0;
  margin: 0;

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 980px) {
  .icon-list { grid-template-columns: 1fr; }
}

.icon-list a {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 12px 14px;
  border-radius: 12px;                 /* slightly less “pill-y” */
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);   /* simpler background */
  text-decoration: none;

  position: relative;
  overflow: hidden;                     /* for accent bar */
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

html[data-theme="light"] .icon-list a,
:root:not([data-theme]) .icon-list a {
  border: 1px solid rgba(10,16,32,.10);
  background: rgba(10,16,32,.02);
}

.icon-list a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: rgba(148,163,184,.65);   /* default */
  opacity: .9;
}

.icon-list a:hover {
  transform: translateY(-1px);
  border-color: rgba(125,211,252,.35);
}

.icon-list i.ai,
.icon-list i.fa-brands {
  font-size: 1.55rem;   /* slightly larger */
  width: 1.8em;
  text-align: center;
  color: var(--muted);
  flex: 0 0 auto;
}

.icon-list span {
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Visible pastel tints per service */
.icon-list a[href*="scholar.google"] { background: rgba(125,211,252,.10); }
.icon-list a[href*="scholar.google"]::before { background: rgba(125,211,252,.80); }

.icon-list a[href*="orcid.org"] { background: rgba(167,243,208,.10); }
.icon-list a[href*="orcid.org"]::before { background: rgba(167,243,208,.80); }

.icon-list a[href*="researchgate"] { background: rgba(216,180,254,.10); }
.icon-list a[href*="researchgate"]::before { background: rgba(216,180,254,.80); }

.icon-list a[href*="linkedin.com"] { background: rgba(125,211,252,.08); }
.icon-list a[href*="linkedin.com"]::before { background: rgba(125,211,252,.75); }

.icon-list a[href*="github.com"] { background: rgba(148,163,184,.08); }
.icon-list a[href*="github.com"]::before { background: rgba(148,163,184,.75); }

/* Light theme: dial back the tint a bit */
html[data-theme="light"] .icon-list a[href*="scholar.google"],
:root:not([data-theme]) .icon-list a[href*="scholar.google"] { background: rgba(14,165,233,.08); }
html[data-theme="light"] .icon-list a[href*="orcid.org"],
:root:not([data-theme]) .icon-list a[href*="orcid.org"] { background: rgba(5,150,105,.07); }
html[data-theme="light"] .icon-list a[href*="researchgate"],
:root:not([data-theme]) .icon-list a[href*="researchgate"] { background: rgba(147,51,234,.06); }
html[data-theme="light"] .icon-list a[href*="linkedin.com"],
:root:not([data-theme]) .icon-list a[href*="linkedin.com"] { background: rgba(14,165,233,.06); }
html[data-theme="light"] .icon-list a[href*="github.com"],
:root:not([data-theme]) .icon-list a[href*="github.com"] { background: rgba(71,85,105,.05); }


/* Optional: make icons match the service accent */
.icon-list a[href*="scholar.google"] i { color: rgba(125,211,252,.95); }
.icon-list a[href*="orcid.org"] i      { color: rgba(167,243,208,.95); }
.icon-list a[href*="researchgate"] i   { color: rgba(216,180,254,.95); }
.icon-list a[href*="linkedin.com"] i   { color: rgba(125,211,252,.90); }
.icon-list a[href*="github.com"] i     { color: rgba(148,163,184,.95); }

html[data-theme="light"] .icon-list i,
:root:not([data-theme]) .icon-list i { color: rgba(10,16,32,.65); } /* base for light */
html[data-theme="light"] .icon-list a[href*="scholar.google"] i,
:root:not([data-theme]) .icon-list a[href*="scholar.google"] i { color: rgba(14,165,233,.95); }
html[data-theme="light"] .icon-list a[href*="orcid.org"] i,
:root:not([data-theme]) .icon-list a[href*="orcid.org"] i { color: rgba(5,150,105,.95); }
html[data-theme="light"] .icon-list a[href*="researchgate"] i,
:root:not([data-theme]) .icon-list a[href*="researchgate"] i { color: rgba(147,51,234,.85); }
html[data-theme="light"] .icon-list a[href*="linkedin.com"] i,
:root:not([data-theme]) .icon-list a[href*="linkedin.com"] i { color: rgba(14,165,233,.90); }
html[data-theme="light"] .icon-list a[href*="github.com"] i,
:root:not([data-theme]) .icon-list a[href*="github.com"] i { color: rgba(71,85,105,.85); }