/* =========================
   GLOBAL
   ========================= */

:root {
  --accent: #2f5d7c;
  --accent-dark: #23485f;
  --text: #2f3437;
  --muted: #6f767d;
  --border: #e6e8eb;
  --soft-bg: #f7f9fb;
  --white: #ffffff;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background-color: var(--white);
  line-height: 1.7;
  font-size: 16px;
}


/* =========================
   PAGE LAYOUT / WIDTH
   ========================= */

/* Override Quarto's centered article grid */
.page-columns {
  display: block !important;
}

/* Keep every page aligned to the same content area */
main.content {
  width: calc(100% - 4rem) !important;
  max-width: 1100px !important;

  margin-left: auto !important;
  margin-right: auto !important;

  padding-top: 1.8rem;
  padding-bottom: 4rem;
}

/* Make title blocks follow the same width */
.quarto-title-block {
  width: 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
}


/* =========================
   NAVIGATION BAR
   ========================= */

.navbar {
  background-color: #f5f5f5 !important;

  border-bottom: 1px solid #dddddd;

  box-shadow: 0 2px 10px rgba(0,0,0,.04);

  padding-top: .55rem;
  padding-bottom: .55rem;
}

.navbar-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: #444 !important;
}

.navbar-nav .nav-link {

  color: #555 !important;
  font-size: .84rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: .45rem .7rem;
  border-bottom: none !important;
  transition: color .2s ease;
}

.navbar-nav .nav-link:hover {
  color: #2f5d7c !important;
}

.navbar-nav .nav-link.active {
  color: #222 !important;
  font-weight: 700;
  border-bottom: none !important;
  background: transparent !important;
}


/* =========================
   TYPOGRAPHY
   ========================= */

h1, h2, h3, h4 {
  color: #1f2529;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.15rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-top: 2.8rem;
  margin-bottom: 1.4rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.05rem;
  font-weight: 650;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

p {
  margin-bottom: 1rem;
}

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

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


/* =========================
   HOMEPAGE NAME + TITLE
   ========================= */

.position-title {
  color: var(--muted);
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 1.8rem;
}


/* =========================
   BIOGRAPHY SECTION
   ========================= */

.bio-container {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;

  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.8rem;

  box-shadow: 0 8px 24px rgba(25, 35, 45, 0.05);
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.bio-photo img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.bio-text {
  font-size: 1rem;
  line-height: 1.75;
  color: #3b4146;
}


/* =========================
   LISTS
   ========================= */

ul, ol {
  padding-left: 1.35rem;
}

li {
  margin-bottom: 0.45rem;
}


/* =========================
   RESEARCH PAGE
   ========================= */

.content ol li,
.content ul li {
  line-height: 1.65;
}

.content strong {
  color: #22282c;
}


/* =========================
   BUTTONS
   ========================= */

.btn-primary {

    background-color: #4f5b66 !important;
    border-color: #4f5b66 !important;
    color: white !important;
    border-radius: 6px;
    padding: .5rem 1rem;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #37424c !important;
    border-color: #37424c !important;
}


/* =========================
   HORIZONTAL RULES
   ========================= */

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  margin-bottom: 2rem;
}


/* =========================
   FOOTER
   ========================= */

.nav-footer {
  border-top: 1px solid var(--border);
  background-color: #fafbfc;
}


/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 900px) {
  #quarto-content,
  .page-columns,
  main.content {
    max-width: 92%;
  }

  .bio-container {
    grid-template-columns: 180px 1fr;
    gap: 1.4rem;
  }
}

@media (max-width: 700px) {
  main.content {
    padding-top: 1.5rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  .bio-container {
    grid-template-columns: 1fr;
  }

  .bio-photo img {
    max-width: 190px;
  }

  .navbar-nav .nav-link {
    margin-left: 0;
    margin-right: 0;
  }
}

/* =========================
   QUICK LINKS
   ========================= */

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid #dfe3e6;
}

.quick-links a {
  font-weight: 600;
  color: #4f5b66;
  text-decoration: none;
}

.quick-links a:hover {
  color: #222;
  text-decoration: underline;
}


/* =========================
   CV PAGE
   ========================= */

main.content h2 {
  margin-top: 2.8rem;
}

main.content h3 {
  margin-top: 1.5rem;
}

.btn-primary {
  background-color: #4f5b66 !important;
  border-color: #4f5b66 !important;
  color: white !important;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-weight: 500;
}

.btn-primary:hover {
  background-color: #37424c !important;
  border-color: #37424c !important;
}

/* =========================
   CV PREVIEW
   ========================= */

.cv-preview {
  width: 100%;
  max-width: 820px;
  margin-top: 3rem;
  margin-left: 0;
}

.cv-preview iframe {
  width: 100%;
  height: 1400px;
  border: 1px solid #aaa;
  background: #fff;
}