/* ==========================================================================
   Site overrides, layered after the compiled theme (styles.min.css).
   Palette, typography, section rhythm, timeline, publications, dark mode,
   and scroll-reveal styling all live here so the minified theme file
   never needs to be edited. Loaded last in head.html.
   ========================================================================== */

:root {
    color-scheme: light dark;
    --bg: #fcfbf9;
    --text: #2f3235;
    --text-muted: #6d7175;
    --heading: #24272a;
    --accent: #8c6d00;
    --accent-strong: #6f5600;
    --border: #e7e3da;
    --icon-bg: #27292a;
    --icon-fg: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #14161a;
        --text: #d8d6d1;
        --text-muted: #9b988f;
        --heading: #edebe6;
        --accent: #d9a92e;
        --accent-strong: #e8bd55;
        --border: #2b2f36;
        --icon-bg: #262a31;
        --icon-fg: #f0efeb;
    }
}

/* --------------------------------------------------------------------------
   Typography & palette
   -------------------------------------------------------------------------- */

html {
    scroll-behavior: smooth;
    /* keep anchor targets clear of the fixed top bar on mobile */
    scroll-padding-top: 4.5rem;
}

@media (min-width: 992px) {
    html {
        scroll-padding-top: 0;
    }
}

body {
    font-family: 'Mulish', Muli, -apple-system, BlinkMacSystemFont, 'Segoe UI',
        Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading);
}

a {
    color: var(--accent);
}

a:hover, a:focus {
    color: var(--accent-strong);
}

.text-primary {
    color: var(--accent) !important;
}

.subheading {
    color: var(--text-muted);
}

/* Bootstrap's .text-black-50 is unreadable on a dark background */
.text-black-50 {
    color: var(--text-muted) !important;
}

.social-icons a {
    background-color: var(--icon-bg);
    color: var(--icon-fg) !important;
}

.social-icons a:hover {
    background-color: var(--accent);
    color: var(--bg) !important;
}

#sideNav .navbar-toggler {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Desktop nav sits on the profile photo with no scrim, so shadow the
   labels for legibility and mark the in-view section (set by site.js). */
#sideNav .navbar-nav .nav-link {
    position: relative;
}

@media (min-width: 992px) {
    #sideNav .navbar-nav .nav-link {
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
    }
}

#sideNav .navbar-nav .nav-link.active::after {
    content: "";
    position: absolute;
    left: 1rem;
    bottom: 0.1rem;
    width: 1.6rem;
    height: 2px;
    border-radius: 2px;
    background-color: #f0c04a;
}

@media (min-width: 992px) {
    #sideNav .navbar-nav .nav-link.active::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

#about h1 {
    letter-spacing: 4px;
}

#title-sub {
    letter-spacing: 1px;
}

/* --------------------------------------------------------------------------
   Section rhythm: natural heights with consistent padding instead of
   every section being stretched to 100vh. The hero keeps some presence.
   -------------------------------------------------------------------------- */

section.resume-section {
    padding: 3.5rem 1.25rem !important;
}

section.resume-section + section.resume-section {
    border-top: 1px solid var(--border);
}

@media (min-width: 992px) {
    section.resume-section {
        min-height: auto;
        padding: 4.5rem 4rem !important;
    }

    section#about {
        min-height: 70vh;
    }
}

/* --------------------------------------------------------------------------
   Timeline treatment for Experience / Education
   -------------------------------------------------------------------------- */

.timeline {
    position: relative;
    border-left: 2px solid var(--border);
    padding-left: 1.75rem;
    margin-left: 0.3rem;
}

.timeline .resume-item {
    position: relative;
}

.timeline .resume-item::before {
    content: "";
    position: absolute;
    top: 0.45rem;
    left: calc(-2.15rem - 1px);
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background-color: var(--accent);
    /* ring of page background so the dot sits cleanly on the rail */
    box-shadow: 0 0 0 4px var(--bg);
}

.timeline .resume-item:last-child {
    margin-bottom: 0 !important;
}

/* --------------------------------------------------------------------------
   Publications
   -------------------------------------------------------------------------- */

.pub-legend {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.pub-item {
    padding: 1.15rem 0;
}

.pub-item + .pub-item {
    border-top: 1px solid var(--border);
}

.pub-title {
    font-family: 'Mulish', Muli, -apple-system, BlinkMacSystemFont, 'Segoe UI',
        Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.45;
    text-transform: none;
    color: var(--heading);
    margin-bottom: 0.35rem;
}

.pub-authors {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.pub-authors strong {
    color: var(--text);
    font-weight: 800;
}

.pub-venue {
    font-size: 0.92rem;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.pub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pub-links a, .pub-tag {
    display: inline-block;
    font-size: 0.78rem;
    line-height: 1;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--accent);
    border-radius: 999px;
    color: var(--accent);
}

.pub-links a:hover, .pub-links a:focus {
    background-color: var(--accent);
    color: var(--bg);
    text-decoration: none;
}

.pub-tag {
    border-color: var(--border);
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Scroll-reveal. The .reveal class is only ever added by site.js, so
   content stays visible when JavaScript is unavailable.
   -------------------------------------------------------------------------- */

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal.revealed {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
