/* ============================================================
   Eric Araújo — custom.css
   Minimalist palette: one accent (Calvin maroon), neutrals only.
   Gold appears only in blockquotes — a meaningful, restrained use.
   Typography: Inter.
   ============================================================ */

/* --- Google Fonts ------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

/* --- CSS variables ----------------------------------------- */
:root {
  --color-accent:        #6E1C2E;   /* Calvin maroon — the only hue */
  --color-accent-light:  #9a2e47;
  --color-gold:          #C49A2C;   /* used only for blockquote accent */
  --color-text:          #1a1a1a;
  --color-text-muted:    #666666;
  --color-bg:            #ffffff;
  --color-border:        #e5e1dc;

  --font-body: 'Inter', system-ui, sans-serif;
}

/* --- Base typography --------------------------------------- */
body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--color-text);
  background-color: var(--color-bg);
  font-size: 1rem;
  line-height: 1.75;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  color: var(--color-accent);
  font-weight: 600;
  line-height: 1.25;
  margin-top: 1.75em;
  margin-bottom: 0.4em;
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; border-bottom: 1px solid var(--color-border); padding-bottom: 0.3em; }
h3 { font-size: 1.05rem; color: var(--color-text); font-weight: 500; }

/* --- Links ------------------------------------------------- */
a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.15s ease;
}
a:hover {
  text-decoration-color: var(--color-accent-light);
}

/* --- Horizontal rules -------------------------------------- */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}

/* --- Blockquotes ------------------------------------------- */
blockquote {
  border-left: 3px solid var(--color-gold);
  margin: 1.5rem 0;
  padding: 0.5rem 1.25rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* --- Quarto callout boxes ---------------------------------- */

.callout-note {
  border-left-color: var(--color-accent) !important;
  background: rgba(110, 28, 46, 0.03);
}
.callout-note .callout-header {
  background: rgba(110, 28, 46, 0.06) !important;
}
.callout-note .callout-title-container {
  color: var(--color-accent);
}

.callout-tip {
  border-left-color: var(--color-gold) !important;
  background: rgba(196, 154, 44, 0.04);
}
.callout-tip .callout-title-container {
  color: #7a600a;
}

.callout-caution {
  border-left-color: #888 !important;
  background: rgba(0, 0, 0, 0.03);
}
.callout-caution .callout-title-container {
  color: #555;
}

.callout-important,
.callout-warning {
  border-left-color: var(--color-accent-light) !important;
  background: rgba(154, 46, 71, 0.04);
}

/* Collapsible callout header (teaching semester dropdowns) */
.callout.callout-style-default .callout-header {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text);
}
.callout.callout-style-default .callout-header:hover {
  color: var(--color-accent);
}

/* --- Sidebar links ---------------------------------------- */
.sidebar-navigation .nav-link,
.sidebar-navigation .sidebar-link {
  color: var(--color-text) !important;
}

.sidebar-navigation .nav-link:hover,
.sidebar-navigation .sidebar-link:hover {
  color: var(--color-accent) !important;
}

.sidebar-navigation .nav-link.active,
.sidebar-navigation .active > .nav-link,
.sidebar-navigation .sidebar-link.active {
  color: var(--color-accent) !important;
  font-weight: 600;
}

/* --- Navbar ------------------------------------------------ */
.navbar-nav .nav-link {
  color: var(--color-accent) !important;
  font-size: 0.875rem;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0.25rem 0.75rem !important;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.navbar-nav .nav-link:hover {
  border-color: var(--color-accent);
  background: rgba(110, 28, 46, 0.06);
}

.navbar-brand {
  font-weight: 600;
  color: var(--color-accent) !important;
}

.navbar-logo {
  height: 36px !important;
  max-height: 36px !important;
  width: auto !important;
}

/* --- Publication list ------------------------------------- */
.publications-list li {
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
  border-left: 2px solid transparent;
  transition: border-color 0.15s ease;
}
.publications-list li:hover {
  border-left-color: var(--color-accent);
}

/* --- Home page: hide auto title --------------------------- */
body.home-page #title-block-header {
  display: none !important;
}

/* --- Home hero -------------------------------------------- */
body.home-page .home-hero {
  display: flex;
  align-items: flex-start;
  gap: 2.25rem;
  margin-bottom: 2rem;
}

body.home-page .home-hero .quarto-figure {
  flex-shrink: 0;
  width: 160px;
  margin: 0;
  padding: 0;
  /* nudge down so the photo center visually aligns with the name */
  padding-top: 0.35rem;
}

body.home-page .home-hero .home-hero-text {
  min-width: 0;  /* prevents flex children from overflowing */
}

body.home-page .home-hero .home-hero-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

body.home-page .home-hero figcaption {
  display: none;
}

/* hero name — no top margin so it sits flush with the photo */
body.home-page .home-hero h1 {
  font-size: 2.1rem;
  font-weight: 700;
  margin-top: 0.1rem;
  margin-bottom: 0.2rem;
  line-height: 1.15;
}

/* link chip row */
.hero-links {
  margin-top: 1rem;
}

.hero-links p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
}

.hero-links a {
  display: inline-block;
  padding: 0.25rem 0.85rem;
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none !important;
  color: var(--color-accent) !important;
  transition: background 0.15s, color 0.15s;
}

.hero-links a:hover {
  background: var(--color-accent);
  color: #fff !important;
  text-decoration: none !important;
}

/* --- Footer ----------------------------------------------- */
.site-footer {
  background: var(--color-bg);
  border-top: 2px solid var(--color-accent);
  padding: 1.5rem 0;
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.site-footer-inner {
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-footer-logo {
  height: 53px;
  width: auto;
  opacity: 0.9;
}

.site-footer-name {
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.9rem;
}

.site-footer-role {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.site-footer-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.site-footer-links a {
  color: var(--color-accent);
  text-decoration: none;
  font-size: 0.85rem;
}

.site-footer-links a:hover {
  text-decoration: underline;
}

.site-footer-links .copyright {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

/* --- Dark mode overrides ---------------------------------- */
/* Quarto adds class "quarto-dark" to <body> when dark mode  */
body.quarto-dark {
  --color-accent:        #C49A2C;   /* Calvin gold — warm, readable on dark bg */
  --color-accent-light:  #d4aa45;
  --color-gold:          #C49A2C;
  --color-text:          #dee2e6;
  --color-text-muted:    #adb5bd;
  --color-bg:            #222222;   /* darkly body background */
  --color-border:        #444444;
  background-color: var(--color-bg);
}

/* callout header tints for dark bg */
body.quarto-dark .callout-note .callout-header {
  background: rgba(196, 154, 44, 0.12) !important;
}
body.quarto-dark .callout-tip .callout-header {
  background: rgba(212, 170, 69, 0.1) !important;
}
body.quarto-dark .callout-caution .callout-header {
  background: rgba(255, 255, 255, 0.06) !important;
}
body.quarto-dark .callout-important .callout-header,
body.quarto-dark .callout-warning .callout-header {
  background: rgba(196, 154, 44, 0.12) !important;
}

/* footer border adapts */
body.quarto-dark .site-footer {
  border-top-color: var(--color-accent);
  background: var(--color-bg);
}

/* logo swaps */
body.quarto-dark .navbar-logo {
  content: url('files/Calvin_College_White.png');
}

/* darker navbar in dark mode */
body.quarto-dark .navbar {
  background-color: #111111 !important;
  border-bottom: 1px solid #2a2a2a;
}

.site-footer-logo-dark { display: none; }
body.quarto-dark .site-footer-logo-light { display: none; }
body.quarto-dark .site-footer-logo-dark  { display: block; }

/* chip hover on dark bg — dark text on gold fill */
body.quarto-dark .hero-links a:hover {
  color: #1a1a1a !important;
}

/* photo shadow on dark bg */
body.quarto-dark .home-hero-photo {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

/* --- Responsive ------------------------------------------- */
@media (max-width: 640px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.2rem; }

  body.home-page .home-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  body.home-page .home-hero .quarto-figure {
    width: 130px;
  }

  body.home-page .home-hero .home-hero-photo {
    width: 130px;
    height: 130px;
        object-position: top center;
    justify-content: center;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
