/* ============================================================
   Julien Eychenne — Academic site
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&family=JetBrains+Mono:wght@400&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:          #F7F6F2;
  --surface:     #FFFFFF;
  --text:        #1A1A1A;
  --text-muted:  #6B6B6B;
  --accent:      #3D5A73;
  --accent-dim:  #CDDAE3;
  --border:      #E0DDD7;
  --rule:        #3D5A73;

  --font-body:   'Source Serif 4', Georgia, serif;
  --font-ui:     'Inter', system-ui, sans-serif;
  --font-mono:   'JetBrains Mono', monospace;

  --nav-w:       200px;
  --content-w:   680px;
  --gap:         2rem;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;    /* 17px */
  line-height: 1.75;
  min-height: 100vh;
}

/* ── Layout ──────────────────────────────────────────────── */
.site-wrapper {
  display: flex;
  max-width: calc(var(--nav-w) + var(--content-w) + 6rem);
  margin: 0 auto;
  padding: 0 1.5rem;
  gap: 0;
}

/* ── Navigation ──────────────────────────────────────────── */
.site-nav {
  width: var(--nav-w);
  flex-shrink: 0;
  padding: 3rem 2rem 3rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.nav-name {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.3;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  padding: 0.3rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  margin-left: -0.75rem;
  transition: color 0.15s, border-color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}

.nav-footer {
  margin-top: auto;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--border);
  line-height: 1.5;
}

/* ── Content area ────────────────────────────────────────── */
.site-content {
  flex: 1;
  max-width: var(--content-w);
  /* Signature element: thin blue rule along the left */
  border-left: 1px solid var(--rule);
  padding: 3rem 0 4rem 3rem;
  min-height: 100vh;
}

/* ── Page header ─────────────────────────────────────────── */
.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.page-header .subtitle {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-muted);
}

/* ── Bio block (homepage) ────────────────────────────────── */
.bio-portrait {
  margin-bottom: 1.75rem;
}

.bio-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  display: block;
}

.bio-lang {
  margin-bottom: 2rem;
}

.bio-lang:last-of-type {
  margin-bottom: 2.5rem;
}

.lang-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.725rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.bio-lang p + p { margin-top: 0.85rem; }

/* ── Section headings ────────────────────────────────────── */
.section-label {
  font-family: var(--font-ui);
  font-size: 0.725rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
  display: block;
}

h2 {
  font-family: var(--font-ui);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* ── In-page jump nav ────────────────────────────────────── */
.jump-nav {
  font-family: var(--font-ui);
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0;
}

.jump-nav a {
  color: var(--accent);
  text-decoration: none;
}
.jump-nav a:hover { text-decoration: underline; }
.jump-nav .sep { color: var(--border); margin: 0 0.4rem; }

/* ── Publication list ────────────────────────────────────── */
.pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pub-list li {
  font-family: var(--font-body);
  font-size: 0.975rem;
  line-height: 1.65;
  padding-left: 1.1rem;
  border-left: 2px solid var(--border);
  transition: border-color 0.15s;
}

.pub-list li:hover { border-left-color: var(--accent-dim); }

.pub-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.pub-link {
  font-family: var(--font-ui);
  font-size: 0.725rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent-dim);
  padding: 0.1rem 0.5rem;
  border-radius: 2px;
  transition: background 0.12s, color 0.12s;
}

.pub-link:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Tool / script list ──────────────────────────────────── */
.tool-item {
  margin-bottom: 1.1rem;
}

.tool-item a.tool-name {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent);
  text-decoration: none;
}

.tool-item a.tool-name:hover { text-decoration: underline; }

.tool-item .tool-desc {
  font-size: 0.9375rem;
  color: var(--text);
  display: block;
}

/* ── General prose ───────────────────────────────────────── */
p { margin-bottom: 0.85rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration-color: var(--accent-dim);
  text-underline-offset: 3px;
}

a:hover { text-decoration-color: var(--accent); }

em, i { font-style: italic; }

.back-top {
  font-family: var(--font-ui);
  font-size: 0.775rem;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-block;
  margin-top: 1.5rem;
}

.back-top:hover { color: var(--accent); }

/* ── Contact / info row ──────────────────────────────────── */
.info-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.info-row a { color: var(--accent); }

.orcid-line a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.orcid-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 740px) {
  .site-wrapper {
    flex-direction: column;
    padding: 0 1rem;
  }

  .site-nav {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: column;
    padding: 1.5rem 0 1rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }

  .nav-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
  }

  .nav-links a {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    border-bottom: 2px solid transparent;
    padding-bottom: 0.1rem;
  }

  .nav-links a:hover,
  .nav-links a.active {
    border-left-color: transparent;
    border-bottom-color: var(--accent);
  }

  .nav-footer { display: none; }

  .site-content {
    border-left: none;
    border-top: 1px solid var(--rule);
    padding: 1.75rem 0 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
