/*
  site.css
  Site-specific layout on top of the vendor "main.css" grid/reset (Helios by
  HTML5 UP). Kept separate so template internals stay untouched: nav bar,
  section headers, and the Research Papers / Research Interests / Reviewer /
  Awards list components all live here.
*/

:root {
    --ink: #2E2D29;
    --body: #6D6C69;
    --muted: #9a9892;
    --accent: #43B3E0;
    --accepted: #2E7D46;
    --submitted: #B8860B;
    --extra: #B83A4B;
    --hairline: rgba(0, 0, 0, 0.07);
    --tint: #fafafa;
}

/* ---------- Nav ---------- */

body {
    padding-top: 3.5em;
}

#nav {
    background-color: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--hairline);
    box-shadow: none;
    text-align: left;
    height: 3.5em;
    line-height: normal;
}

#nav .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 1.5em;
}

#nav .nav-brand {
    font-family: "Source Serif 4 Bold", serif;
    font-weight: 700;
    color: var(--ink);
    font-size: 1.05em;
    letter-spacing: -0.01em;
    flex: 0 0 auto;
}

#nav .nav-brand:hover {
    color: var(--accent) !important;
}

#nav .nav-right {
    display: flex;
    align-items: center;
    gap: 1.5em;
    min-width: 0;
}

#nav ul {
    display: flex;
    align-items: center;
    gap: 0.15em;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#nav ul::-webkit-scrollbar {
    display: none;
}

#nav li {
    padding-left: 0;
    flex: 0 0 auto;
}

#nav a {
    color: var(--body);
    font-family: "Source Sans 3", sans-serif;
    font-weight: 600;
    font-size: 0.82em;
    letter-spacing: 0.01em;
    height: auto;
    line-height: normal;
    padding: 0.55em 0.85em;
    border-radius: 6px;
    white-space: nowrap;
}

#nav a:hover {
    background: #f2f1ed;
    color: var(--ink) !important;
}

#nav a.nav-cv {
    color: #fff !important;
    background: var(--ink);
    font-weight: 700;
}

#nav a.nav-cv:hover {
    background: #45443e;
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    width: auto;
    gap: 0.45em;
    border: 1px solid var(--hairline);
    background: transparent;
    color: var(--body);
    font-family: "Source Sans 3", sans-serif;
    font-weight: 600;
    font-size: 0.82em;
    letter-spacing: 0.01em;
    padding: 0.5em 0.85em;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    -moz-transition: background-color .2s ease-in-out, color .2s ease-in-out, border-color .2s ease-in-out;
    -webkit-transition: background-color .2s ease-in-out, color .2s ease-in-out, border-color .2s ease-in-out;
    transition: background-color .2s ease-in-out, color .2s ease-in-out, border-color .2s ease-in-out;
}

.theme-toggle-btn:hover {
    background: #f2f1ed;
    color: var(--ink);
}

.theme-toggle-icon {
    font-size: 1em;
    line-height: 1;
}

/* ---------- Section headers ---------- */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1em 1.5em;
    margin-bottom: 2.25em;
}

.section-header .kicker {
    display: block;
    font-family: "Source Sans 3", sans-serif;
    font-weight: 700;
    font-size: 0.72em;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5em;
}

.section-header h2 {
    margin: 0;
}

/* ---------- Shared "date + line" lists (News / Reviewer / Awards) ---------- */

.entry-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.92em;
    text-align: left;
}

.entry-list li {
    padding: 0.45em 0;
    line-height: 1.7em;
}

.entry-list li:first-child {
    padding-top: 0;
}

.entry-list li:last-child {
    padding-bottom: 0;
}

.entry-list .date {
    display: inline-block;
    min-width: 6.25em;
    color: var(--accent);
    margin-right: 0.25em;
}

/* Neutralize the vendor template's leftover boxed/oversized styling, and
   size the dense conference/journal lists down a bit further than the
   News/Awards entries. */
#review-list {
    background: none;
    text-shadow: none;
    font-size: 0.85em;
}

/* A little breathing room after the last entry, before the next section. */
#news-list {
    margin-bottom: 1em;
}

#awards-list {
    margin-bottom: 2em;
}

/* One flat background across every section (News / Research Papers /
   Interests / Reviewing / Awards) instead of the vendor template's
   alternating tint. */
.wrapper.style3 {
    background-color: #fff;
}

/* Keep back-to-back sections (Interests / Reviewing / Awards) visually
   distinct even though they share the same background. */
.wrapper.style3 + .wrapper.style3 {
    margin-top: 2.5em;
    border-top: 1px solid var(--hairline);
}

.show-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 1.25em;
}

.show-more-btn {
    width: auto;
    border: 1px solid var(--hairline);
    background: transparent;
    color: var(--body);
    font-family: "Source Sans 3", sans-serif;
    font-weight: 600;
    font-size: 0.8em;
    letter-spacing: 0.01em;
    padding: 0.55em 1.1em;
    border-radius: 999px;
    cursor: pointer;
}

.show-more-btn:hover {
    background: #f2f1ed;
    color: var(--ink);
}

.news-item--hidden {
    display: none;
}

/* ---------- Research Interests ---------- */

.interest-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.92em;
    text-align: left;
}

.interest-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.4em 1.5em;
    padding: 0.6em 0;
}

.interest-list li:first-child {
    padding-top: 0;
}

.interest-list li:last-child {
    padding-bottom: 0;
}

.interest-title {
    font-family: "Source Serif 4", serif;
    font-weight: normal;
    color: var(--ink);
    font-size: 1.02em;
}

.interest-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.65em;
    white-space: nowrap;
}

.interest-meta .venue {
    font-family: "Source Serif 4", serif;
    font-weight: normal;
    color: var(--ink);
    font-size: 0.9em;
}

/* ---------- Research Papers ---------- */

.pub-filter-bar {
    display: inline-flex;
    gap: 0.25em;
    background: #f2f1ed;
    padding: 0.3em;
    border-radius: 999px;
    flex: 0 0 auto;
}

.pub-filter-bar .pub-filter {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: "Source Sans 3", sans-serif;
    font-weight: 700;
    font-size: 0.68em;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #8b8a85;
    padding: 0.6em 1em;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.pub-filter-bar .pub-filter:hover {
    color: var(--ink);
}

.pub-filter-bar .pub-filter.is-active {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.pub-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7em;
    font-size: 0.92em;
    text-align: left;
}

.pub-entry {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.26s ease, transform 0.26s ease;
}

.pub-entry.pub-card--hidden {
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
}

.pub-title {
    font-size: 1.18em;
    margin-bottom: 0.35em;
    line-height: 1.4em;
}

.pub-authors {
    color: var(--body);
    font-size: 0.92em;
    line-height: 1.7em;
    margin-bottom: 0;
}

.pub-authors .strong {
    color: var(--ink);
}

.pub-footnote {
    font-size: 0.75em;
    color: var(--muted);
    margin-top: 0.2em;
    margin-bottom: 0;
}

.pub-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65em;
    margin-top: 0.65em;
    margin-bottom: 0;
}

.pub-meta .venue {
    font-family: "Source Serif 4 Bold", serif;
    font-weight: bold;
    color: var(--ink);
    font-size: 0.95em;
}

.pub-pdf {
    font-family: "Source Sans 3", sans-serif;
    font-weight: 700;
    font-size: 0.82em;
}

@media (prefers-reduced-motion: reduce) {
    .pub-entry {
        transition: none;
    }
}

/* ---------- Status badges (shared: Publications + Research Interests) ---------- */

.status-badge {
    display: inline-block;
    font-family: "Source Sans 3", sans-serif;
    font-weight: 700;
    font-size: 0.68em;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.3em 0.7em;
    border-radius: 999px;
    line-height: 1;
    white-space: nowrap;
}

.status-badge--accepted {
    color: var(--accepted);
    background: rgba(46, 125, 70, 0.1);
}

.status-badge--submitted {
    color: var(--submitted);
    background: rgba(184, 134, 11, 0.12);
}

.status-badge--extra {
    color: var(--extra);
    background: rgba(184, 58, 75, 0.1);
}

/* ---------- Footer ---------- */

.wrapper.style4 {
    text-align: center;
}

/* The mapmyvisitors widget sizes itself via its own script rather than CSS,
   and that size isn't reliably tied to our container width across devices —
   so cap it with a hard pixel box to keep it small and consistent everywhere. */
.visitor-map {
    display: flex;
    justify-content: center;
    max-width: 200px;
    max-height: 120px;
    margin: 2.5em auto;
    overflow: hidden;
}

/* ---------- Dark mode ("Lights off") ---------- */

:root.dark-mode {
    --ink: #EDEBE6;
    --body: #B6B4AD;
    --muted: #85837C;
    --accent: #5BC3EE;
    --accepted: #4CAF6D;
    --submitted: #E0A83B;
    --extra: #E2727E;
    --hairline: rgba(255, 255, 255, 0.09);
    --tint: #1a1a1a;
}

.dark-mode body {
    background-color: #121212;
}

.dark-mode body,
.dark-mode input,
.dark-mode textarea,
.dark-mode select {
    color: var(--body);
}

.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode h5,
.dark-mode h6,
.dark-mode b,
.dark-mode strong {
    color: var(--ink);
}

.dark-mode #nav {
    background-color: rgba(18, 18, 18, 0.92);
}

.dark-mode #nav a:hover {
    background: #212121;
    color: var(--ink) !important;
}

.dark-mode #nav a.nav-cv {
    background: var(--ink);
    color: #14141a !important;
}

.dark-mode #nav a.nav-cv:hover {
    background: #d8d6d0;
}

.dark-mode .theme-toggle-btn:hover {
    background: #212121;
    color: var(--ink);
}

.dark-mode .wrapper.style1,
.dark-mode .wrapper.style2,
.dark-mode .wrapper.style3,
.dark-mode .wrapper.review_style1,
.dark-mode #review-list {
    background-color: #121212;
    text-shadow: none;
}

.dark-mode .show-more-btn:hover {
    background: #212121;
    color: var(--ink);
}

.dark-mode .wrapper.style4 {
    background-color: #0c0c0c;
}

.dark-mode .pub-filter-bar {
    background: #1c1c1c;
}

.dark-mode .pub-filter-bar .pub-filter {
    color: #8b8a85;
}

.dark-mode .pub-filter-bar .pub-filter.is-active {
    background: #2a2a2a;
    color: var(--ink);
    box-shadow: none;
}

/* ---------- Responsive ---------- */

@media screen and (max-width: 736px) {

    body {
        padding-top: 3.1em;
    }

    #nav {
        height: 3.1em;
    }

    #nav .nav-inner {
        gap: 0.75em;
    }

    #nav .nav-right {
        gap: 0.75em;
    }

    #nav .nav-brand {
        font-size: 0.95em;
    }

    #nav a {
        padding: 0.5em 0.6em;
        font-size: 0.78em;
    }

    #nav a.nav-cv {
        padding: 0.5em 0.75em;
    }

    .theme-toggle-btn {
        padding: 0.5em 0.65em;
        font-size: 0.78em;
    }

    .section-header {
        align-items: flex-start;
    }

    .interest-list li,
    .pub-meta {
        gap: 0.4em 0.8em;
    }
}
