/* ==========================================================================
   GUILHERME W. WENDT, Ph.D. — ACADEMIC PORTAL STYLESHEET
   --------------------------------------------------------------------------
   To customize colors or typography, edit the :root variables below.
   ========================================================================== */

:root {
  --paper:       #FAF8F3;
  --paper-tint:  #F2EFE6;
  --ink:         #141E28;
  --ink-soft:    #2F3B47;
  --muted:       #5F6C78;
  --line:        #E1DACB;
  --accent:      #134E4A;
  --accent-dark: #0B3532;
  --accent-soft: #E7F2F0;
  --gold:        #9A7540;
  --white:       #FFFFFF;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --max: 1160px;
  --radius: 4px;
  --header-h: 74px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .16s ease;
}
a:hover { color: var(--accent-dark); }

::selection { background: var(--accent); color: var(--paper); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

p { margin: 0 0 1.05rem; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -100px; left: 1rem; z-index: 100;
  padding: .65rem 1rem; background: var(--ink); color: var(--paper);
  font-size: .86rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; color: var(--paper); }

/* --------------------------------------------------------------------------
   TOP INSTITUTIONAL BAR & HEADER
   -------------------------------------------------------------------------- */
.inst-bar {
  background: var(--ink);
  color: #C7CFD6;
  font-size: .74rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.inst-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 34px;
  padding-block: .3rem;
}

.inst-bar-left {
  display: flex;
  align-items: center;
  gap: .55rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inst-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34D399;
  flex-shrink: 0;
}

.inst-bar-right {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--mono);
  font-size: .7rem;
  flex-shrink: 0;
}

.mono-link {
  color: #D7DEE4;
  text-decoration: none;
}
.mono-link:hover { color: var(--white); text-decoration: underline; }
.sep { opacity: .45; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 243, .95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: .12rem;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.15;
}
.brand:hover { color: var(--ink); }

.brand-name {
  font-family: var(--serif);
  font-size: 1.24rem;
  font-weight: 600;
  letter-spacing: -.01em;
}
.brand-deg {
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
  font-size: 1.05rem;
}

.brand-sub {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .86rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  padding-block: .35rem;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { font-weight: 600; }

.nav-count {
  font-family: var(--mono);
  font-size: .68rem;
  padding: .08rem .38rem;
  border-radius: 999px;
  background: var(--paper-tint);
  border: 1px solid var(--line);
  color: var(--accent);
}

.nav-cv-pill {
  padding: .3rem .68rem !important;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.nav-cv-pill:hover { border-color: var(--accent); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  padding: .16rem .22rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.lang-switch a {
  padding: .1rem .48rem !important;
  font-size: .7rem !important;
  font-weight: 600;
  letter-spacing: .04em;
  border-radius: 999px;
  color: var(--muted);
}
.lang-switch a[aria-current="true"] {
  background: var(--ink);
  color: var(--paper);
}

.nav-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute; left: 50%; width: 16px; height: 1.5px;
  background: var(--ink); transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bar { top: 50%; transform: translate(-50%, -50%); }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; left: 0; }
.nav-toggle-bar::before { top: -5px; }
.nav-toggle-bar::after  { top: 5px; }

/* --------------------------------------------------------------------------
   BUTTONS & LABELS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .72rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); color: var(--white); }

.btn-ghost { background: var(--white); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: var(--white); color: var(--accent); }

.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.3); color: var(--paper); }
.btn-outline-light:hover { border-color: var(--white); color: var(--white); }

.btn-mini {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .28rem .65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn-mini:hover { border-color: var(--accent); color: var(--accent); }

.text-link {
  display: inline-block;
  font-size: .86rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.text-link:hover { color: var(--accent-dark); text-decoration: underline; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: 1rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

.section-label {
  margin: 0 0 .65rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}
.section-label-light { color: #D4B27A; }

/* --------------------------------------------------------------------------
   HERO & BIBLIOMETRIC STRIP
   -------------------------------------------------------------------------- */
.hero {
  padding: 4.5rem 0 4rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(960px 380px at 85% -10%, rgba(19, 78, 74, .06), transparent 65%),
    var(--paper);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, .85fr);
  gap: 3.5rem;
  align-items: start;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.2vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -.025em;
}
.deg-Inline {
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
  font-size: .75em;
}

.hero-role {
  margin: .95rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.12rem, 1.8vw, 1.32rem);
  font-style: italic;
  color: var(--accent);
}

.hero-lede {
  max-width: 62ch;
  margin-top: 1.35rem;
  font-size: 1.02rem;
  line-height: 1.72;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1.75rem;
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.metric-cell {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.metric-val {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
}

.metric-lbl {
  font-size: .72rem;
  font-weight: 500;
  color: var(--muted);
}

.hero-aside {
  padding: 1.65rem 1.8rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.aside-title {
  margin: 0 0 1rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}

.facts { margin: 0; }
.facts > div { padding: .85rem 0; border-top: 1px solid var(--line); }
.facts > div:first-child { border-top: 0; padding-top: 0; }
.facts dt {
  margin-bottom: .2rem;
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd {
  margin: 0;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.profile-links { display: flex; flex-wrap: wrap; gap: .35rem .8rem; font-weight: 600; font-size: .82rem; }

/* --------------------------------------------------------------------------
   SECTIONS & GRIDS
   -------------------------------------------------------------------------- */
.section { padding: 4.5rem 0; border-bottom: 1px solid var(--line); }
.section-tint { background: var(--paper-tint); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.4rem;
}
.section-head h2 { font-size: clamp(1.85rem, 3.2vw, 2.45rem); }
.section-sub {
  max-width: 64ch;
  margin-top: .5rem;
  font-size: .92rem;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: 3.5rem;
  align-items: start;
}
.split-head h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); }
.split-note {
  margin-top: 1rem;
  padding-left: .9rem;
  border-left: 2px solid var(--gold);
  font-size: .86rem;
  color: var(--muted);
}

.prose { max-width: 65ch; color: var(--ink-soft); font-size: 1rem; }
.prose p + p { margin-top: 1.05rem; }

.mini-timeline {
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: .75rem;
}
.mini-tl-row {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 1rem;
  font-size: .88rem;
}
.mini-tl-period {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--gold);
  padding-top: .15rem;
}

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 2.5rem; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.research-item {
  padding: 1.5rem 1.65rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.research-num {
  display: inline-block;
  margin-bottom: .45rem;
  font-family: var(--serif);
  font-size: .92rem;
  font-style: italic;
  color: var(--gold);
}
.research-item h3 { margin-bottom: .5rem; font-size: 1.2rem; }
.research-item p { margin: 0; font-size: .9rem; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   PUBLICATION REPOSITORY & ENTRIES
   -------------------------------------------------------------------------- */
.id-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.5rem;
}
.id-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .36rem .75rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.id-chip strong { font-family: var(--sans); color: var(--ink); }
.id-chip:hover { border-color: var(--accent); color: var(--accent); }

.pub-controls {
  padding: 1.4rem 1.5rem;
  margin-bottom: 2.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pub-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .8rem;
  margin-bottom: 1rem;
}

.pub-search-input,
.pub-sort-select {
  width: 100%;
  padding: .68rem .95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: .9rem;
}
.pub-search-input:focus,
.pub-sort-select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--white);
}

.pub-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1rem;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .82rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
}
.filter-pill span {
  font-family: var(--mono);
  font-size: .7rem;
  opacity: .75;
}
.filter-pill:hover { border-color: var(--accent); color: var(--accent); }
.filter-pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
}
.toc a {
  padding: .26rem .62rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.toc a:hover { border-color: var(--accent); color: var(--accent); background: var(--paper); }
.toc-cnt { opacity: .6; }

.pub-results-status {
  margin: .85rem 0 0;
  font-size: .8rem;
  color: var(--muted);
}

.pub-list { display: grid; gap: .9rem; }

.pub-entry {
  padding: 1.35rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .16s ease;
}
.pub-entry:hover { border-color: #C4B9A5; }
.pub-entry-featured {
  border-left: 3px solid var(--accent);
}

.pub-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-bottom: .5rem;
}

.pub-year-tag {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 600;
  padding: .12rem .45rem;
  border-radius: 3px;
  background: var(--paper-tint);
  color: var(--ink);
}

.pub-journal-tag {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
}

.pub-q-badge {
  font-size: .68rem;
  font-weight: 600;
  padding: .12rem .48rem;
  border-radius: 3px;
  background: #F5EFE2;
  border: 1px solid #E3D5B8;
  color: #78592B;
}

.pub-cite-count {
  font-family: var(--mono);
  font-size: .68rem;
  padding: .12rem .48rem;
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.pub-entry .pub-title {
  font-family: var(--serif);
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.32;
  margin-bottom: .42rem;
}
.pub-entry .pub-title a {
  color: var(--ink);
  text-decoration: none;
}
.pub-entry .pub-title a:hover { color: var(--accent); text-decoration: underline; }

.pub-authors {
  margin: 0 0 .85rem;
  font-size: .86rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.author-self {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 2px;
}
.pub-biblio-detail { color: var(--muted); }

.pub-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
}

.pub-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .28rem .65rem;
  border-radius: 3px;
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  transition: all .15s ease;
}
.pub-btn:hover { border-color: var(--ink); color: var(--ink); background: var(--white); }

.pub-btn-pdf {
  background: var(--accent-soft);
  border-color: #B7D8D3;
  color: var(--accent);
}
.pub-btn-pdf:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.pub-btn-doi {
  font-family: var(--mono);
  font-size: .7rem;
}

/* --------------------------------------------------------------------------
   MEDIA CARDS
   -------------------------------------------------------------------------- */
.media-card {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1.55rem 1.65rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.media-card-meta {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.media-cat { color: var(--gold); }
.media-outlet { color: var(--muted); }
.media-title {
  font-family: var(--serif);
  font-size: 1.24rem;
  line-height: 1.28;
}
.media-title a { color: var(--ink); text-decoration: none; }
.media-title a:hover { color: var(--accent); }
.media-summary { font-size: .9rem; color: var(--ink-soft); margin: 0; }
.media-links {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: auto;
  padding-top: .5rem;
}

/* --------------------------------------------------------------------------
   CITATION MODAL
   -------------------------------------------------------------------------- */
.cite-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 30, 40, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.cite-modal-backdrop[hidden] { display: none !important; }

.cite-modal {
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: 0 24px 48px rgba(0,0,0,.28);
}

.cite-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}
.cite-modal-head h3 { font-size: 1.3rem; }

.cite-close {
  border: 1px solid var(--line);
  background: var(--white);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 1.2rem;
  cursor: pointer;
}

.cite-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}
.cite-block:last-child { margin-bottom: 0; }
.cite-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .6rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.cite-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--serif);
  font-size: .92rem;
  line-height: 1.55;
  color: var(--ink);
}
.cite-pre-mono {
  font-family: var(--mono);
  font-size: .76rem;
}

/* --------------------------------------------------------------------------
   CURRICULUM VITAE (AUTO-PDF)
   -------------------------------------------------------------------------- */
.cv-toolbar {
  padding: 1.4rem 0;
  background: var(--paper-tint);
  border-bottom: 1px solid var(--line);
}
.cv-toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.cv-toolbar-note { margin: .2rem 0 0; font-size: .82rem; color: var(--muted); }
.cv-toolbar-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }

.cv-scope-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}
.cv-scope-switch a {
  padding: .5rem .85rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}
.cv-scope-switch a.is-active {
  background: var(--ink);
  color: var(--paper);
}

.cv-sheet-wrap { padding: 3rem 0 5rem; }

.cv-sheet {
  max-width: 940px;
  padding: 3.2rem 3.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cv-doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 1.6rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--ink);
}
.cv-doc-kicker {
  margin: 0 0 .35rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--gold);
}
.cv-doc-name { font-size: 2.2rem; margin-bottom: .3rem; }
.cv-doc-role { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.08rem; color: var(--accent); }
.cv-doc-inst { margin: .25rem 0 0; font-size: .86rem; color: var(--muted); }

.cv-doc-meta {
  font-family: var(--mono);
  font-size: .74rem;
  line-height: 1.65;
  color: var(--ink-soft);
  text-align: right;
  flex-shrink: 0;
}
.cv-doc-meta a { color: var(--accent); text-decoration: none; }

.cv-sec { margin-bottom: 2.2rem; }
.cv-sec-title {
  font-family: var(--sans);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: .45rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.cv-p { font-size: .92rem; color: var(--ink-soft); margin-bottom: .75rem; }
.cv-metrics-line {
  padding: .65rem .9rem;
  background: var(--paper);
  border-left: 3px solid var(--accent);
  font-size: .84rem;
}

.cv-row {
  display: grid;
  grid-template-columns: 125px 1fr;
  gap: 1rem;
  padding: .5rem 0;
  font-size: .9rem;
}
.cv-row-date { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.cv-row-note { font-size: .82rem; color: var(--muted); margin-top: .2rem; }

.cv-bullet-list { padding-left: 1.2rem; display: grid; gap: .45rem; font-size: .9rem; color: var(--ink-soft); }

.cv-pub-ol {
  padding-left: 1.8rem;
  display: grid;
  gap: .65rem;
  font-size: .86rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.cv-pub-li { break-inside: avoid; }
.cv-doi-link { font-family: var(--mono); font-size: .75rem; word-break: break-all; }
.cv-inline-badge { font-size: .74rem; color: var(--gold); font-weight: 600; margin-left: .3rem; }

.cv-doc-footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  text-align: center;
}

/* --------------------------------------------------------------------------
   INTERNAL PAGES, ARTICLES, ADMIN, FOOTER
   -------------------------------------------------------------------------- */
.page-hero {
  padding: 3.8rem 0 2.8rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.3rem); }
.page-lede { max-width: 64ch; margin-top: 1rem; font-size: 1.04rem; color: var(--ink-soft); }
.page-body { padding: 3.5rem 0 4.5rem; }

.year-block { margin-bottom: 3.2rem; scroll-margin-top: 95px; }
.year-head {
  display: flex; align-items: baseline; gap: 1rem;
  margin-bottom: 1.1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line);
}
.year-head h2 { font-size: 1.85rem; color: var(--accent); }
.year-head p { margin: 0; font-family: var(--mono); font-size: .74rem; color: var(--muted); }

.section-lab {
  background: radial-gradient(800px 380px at 15% 0%, rgba(154, 117, 64, .16), transparent 70%), var(--ink);
  color: var(--paper);
  border-bottom: 0;
}
.lab-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3.5rem; align-items: start; }
.lab-title { font-size: clamp(2.4rem, 4.5vw, 3.5rem); color: var(--paper); }
.lab-sub { margin-top: .4rem; font-family: var(--serif); font-style: italic; color: #CFC6B7; }
.lab-text { max-width: 58ch; color: #DCD6CA; font-size: 1rem; }

.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.contact-card {
  display: flex; flex-direction: column; gap: .35rem;
  padding: 1.65rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
}
.contact-card .label { font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.contact-card a { font-family: var(--serif); font-size: 1.22rem; color: var(--ink); text-decoration: none; }
.contact-card a:hover { color: var(--accent); }
.contact-card p { margin-top: .3rem; font-size: .86rem; color: var(--muted); }

.profile-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.profile-item {
  display: flex; flex-direction: column; gap: .2rem;
  padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); text-decoration: none; color: var(--ink);
}
.profile-item:hover { border-color: var(--accent); }
.profile-item strong { font-size: .88rem; }
.profile-item span { font-family: var(--mono); font-size: .74rem; color: var(--muted); }

.post-list { display: grid; gap: 1.2rem; max-width: 860px; }

.article { max-width: 740px; margin-inline: auto; }
.article-header { padding-bottom: 1.8rem; margin-bottom: 2.2rem; border-bottom: 1px solid var(--line); }
.article-header h1 { font-size: clamp(2rem, 4.2vw, 2.85rem); line-height: 1.12; }
.article-meta { margin-top: 1rem; font-size: .86rem; color: var(--muted); }
.article-body { font-family: var(--serif); font-size: 1.12rem; line-height: 1.78; color: var(--ink-soft); }
.article-body p { margin-bottom: 1.3rem; }
.references { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-family: var(--sans); font-size: .82rem; color: var(--muted); }
.references h2 { font-family: var(--sans); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: .9rem; }
.references ol { padding-left: 1.2rem; display: grid; gap: .65rem; }
.back-link { display: inline-block; margin-bottom: 1.6rem; font-size: .82rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--accent); }
.note { padding: 1rem 1.25rem; border-left: 2px solid var(--gold); background: var(--paper-tint); font-size: .86rem; color: var(--ink-soft); }

/* Admin styles */
.admin-card {
  padding: 1.65rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.admin-label {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin-bottom: .9rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.admin-input {
  padding: .6rem .8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font-family: var(--sans);
  font-size: .88rem;
  color: var(--ink);
}
.admin-check {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .84rem;
  color: var(--ink-soft);
  margin-top: .4rem;
}
.admin-flash {
  padding: .9rem 1.2rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: .9rem;
  font-weight: 600;
}
.admin-flash-ok { background: var(--accent-soft); border: 1px solid #A7D7D0; color: var(--accent-dark); }
.admin-flash-err { background: #FDECEC; border: 1px solid #F5B5B5; color: #8B1E1E; }

/* Footer */
.site-footer { padding: 3.8rem 0 2rem; background: #101820; color: #C5C0B4; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .9fr; gap: 2.8rem; padding-bottom: 2.6rem; }
.footer-name { margin: 0 0 .45rem; font-family: var(--serif); font-size: 1.22rem; color: var(--paper); }
.footer-note { font-size: .84rem; line-height: 1.6; color: #8F99A2; }
.footer-heading { margin: 0 0 .9rem; font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #8F99A2; }
.footer-links { list-style: none; display: grid; gap: .42rem; }
.footer-links a { font-size: .84rem; color: #C5C0B4; text-decoration: none; }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-top: 1.4rem; border-top: 1px solid #232F3A; font-size: .76rem; color: #8F99A2;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: #C5C0B4; }

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .inst-bar-right { display: none; }
  .hero-grid, .split, .lab-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .metrics-strip { grid-template-columns: repeat(2, 1fr); }
  .profile-list { grid-template-columns: repeat(2, 1fr); }
  .cv-doc-header { flex-direction: column; }
  .cv-doc-meta { text-align: left; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; align-items: flex-start;
    padding: 1rem 1.5rem 1.4rem; background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { width: 100%; padding: .55rem 0; }
  .grid-2, .grid-3, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .pub-search-row { grid-template-columns: 1fr; }
  .cv-sheet { padding: 1.8rem 1.4rem; }
  .cv-row { grid-template-columns: 1fr; gap: .2rem; }
}

/* --------------------------------------------------------------------------
   PRINT / AUTOMATIC PDF CV GENERATION
   -------------------------------------------------------------------------- */
@media print {
  .no-print, .inst-bar, .site-header, .site-footer, .skip-link, .pub-actions { display: none !important; }
  body { background: #fff !important; color: #000 !important; font-size: 10.5pt; line-height: 1.48; }
  .cv-sheet-wrap { padding: 0 !important; }
  .cv-sheet { max-width: 100% !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; }
  .cv-sec { margin-bottom: 1.4rem; }
  .cv-pub-li, .cv-row { break-inside: avoid; }
  a { color: #000 !important; text-decoration: none !important; }
}
