/* Navigation Styles */
.navbar {
    background-color: rgba(255, 251, 245, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid #e2e2e2;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0;
}

.navbar .container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75em 5%;
    max-width: 50em;
    margin: 0 auto;
    position: relative;
}

.navbar ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2em;
}

.navbar li::before {
    display: none;
}

.navbar a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5em 1em;
    border-radius: 0.25em;
    transition: all 0.2s ease;
    border-bottom: none;
}

.navbar a:hover {
    background-color: rgba(0, 170, 255, 0.1);
    color: #00aaff;
    filter: brightness(1);
}

/* Hamburger Menu Styles */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5em;
    position: absolute;
    right: 5%;
    z-index: 1001;
    background: transparent;
    border: 0;
    color: inherit;
    font: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background-color: #333;
    margin: 2px 0;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 251, 245, 0.98);
    backdrop-filter: blur(10px);
    z-index: 999;
    padding-top: 80px;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2em;
}

.mobile-menu li::before {
    display: none;
}

.mobile-menu a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.2em;
    padding: 1em 2em;
    border-radius: 0.25em;
    transition: all 0.2s ease;
    border-bottom: none;
}

.mobile-menu a:hover {
    background-color: rgba(0, 170, 255, 0.1);
    color: #00aaff;
}

/* Body padding to account for fixed navbar */
body {
    padding-top: 0;
}

/* Extend main content to fill space */
main[role="main"] {
    padding-top: 5em;
}

/* Social Icons */
.social-list {
    list-style-type: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.2em;
}

.social-list li {
    display: flex;
    align-items: center;
    margin: 0;
}

.social-list li::before {
    display: none;
}

.social-list a {
    border-bottom: 0;
    transition: filter 0.2s ease;
}

.social-list a:hover {
    filter: brightness(3);
}

.social-list li:not(:last-child)::after {
    content: "✦";
    display: inline-block;
    margin: 0 0.25em;
    font-size: 0.5em;
    color: #8C1515; /* #333;*/
    vertical-align: middle;
}

/* Trophy icon */
.gold-trophy {
    font-size: 1rem;
}

.press-icon {
    color: #b32400;      /* or reuse the gold if you like */
    font-size: 1rem;
}


/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Section spacing */
section {
    scroll-margin-top: 5em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar ul {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .social-list li:not(:last-child)::after {
        margin: 0 1.5em;
    }

    .papers-toggle { flex-wrap: nowrap; }
}

/* Profile image improvements */
.profile-img {
    width: 11vmax;
    max-width: 150px;
    min-width: 120px;
    height: auto;
    border-radius: 1vmax;
    display: block;
    margin: 0 auto;
}

/* Content spacing improvements */
.intro-section {
    margin-bottom: 2em;
}

/* Recent updates box styling */
.recent-updates {
    border: 1px solid #e2e2e2;
    padding: 15px;
    border-radius: 5px;
    margin: 3em 0 0em 0;
    line-height: 1.6;
}

.recent-updates em {
    line-height: 1.6;
}

/* Comment Conference styling with automatic arrow and spacing */
commentConf {
    font-style: italic;
    font-weight: normal;
    filter: brightness(0.9);
    color: black;
    line-height: 100%;
    font-size: 0.95em;
}

commentConf::before {
    content: "▹\00A0\00A0";
    font-style: normal;
}

/* Match linked red highlight brightness, e.g. "Best Short Paper" */
.dimmed-highlight {
    filter: brightness(0.85);
}

/* Remove dashes from publication lists */
#publications ul li::before {
    display: none;
}

#publications ul {
    padding-left: 0;
}

#publications ul li {
    margin-left: 0;
}

/* Tighten title-to-author spacing for publication entries */
#publications .paper-item {
    line-height: 1.25rem;
    margin-bottom: 0.75rem;
}

#publications citeTitle {
    display: block;
    line-height: inherit;
    margin-bottom: 0.15em;
}

#publications citeTitle + br {
    display: none;
}

#publications .paper-item > p:not(.thesis-meta) {
    line-height: inherit;
    margin: 0;
}

#publications .paper-item auth,
#publications .paper-item conf,
#publications .paper-item commentConf,
#publications .paper-item strong {
    line-height: inherit;
}

#publications .paper-note {
    display: block;
    line-height: inherit;
    margin-top: 0.12rem;
}

#publications[data-view="selected"] .hide-in-selected {
    display: none;
}

/* Papers toggle */
.papers-toggle {
    display: flex;
    align-items: center;
    gap: 0.6em;
    margin-bottom: 1.25em;
    font-size: 0.9em;
    color: #555;
}

.papers-toggle-label {
    font-variant: small-caps;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    color: #777;
}

.papers-toggle-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.15em;
    border-radius: 999px;
    background-color: #f7f3eb;
    border: 1px solid #e2e2e2;
}

.papers-toggle-pill button {
    border: none;
    background: transparent;
    font: inherit;
    padding: 0.25em 0.9em;
    border-radius: 999px;
    cursor: pointer;
    color: #555;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.papers-toggle-pill button:hover {
    background-color: rgba(0, 170, 255, 0.06);
}

.papers-toggle-pill button.active {
    background-color: #fff;
    color: #00aaff;
    box-shadow: 0 0 0 1px rgba(0, 170, 255, 0.18);
}

#publications .paper-item {
    margin-top: 0.85em;
    transition: opacity 0.15s ease;
}

.year-separator {
    margin-top: 1.5em;
}

#publications .year-separator {
    margin-left: 0;
    list-style: none;
}

#publications .year-separator::before,
#publications .year-separator::after {
    content: '';
    display: block;
    position: static;
    flex: 1;
    height: 1px;
    background: #b8b8b8;
}

#publications .year-separator::before {
    margin-right: 10px;
}

#publications .year-separator::after {
    margin-left: 10px;
}

#publications .year-separator > * {
    margin-top: 0;
}

@media (max-width: 768px) {
    .papers-toggle {
flex-wrap: wrap;
    }
}

/* Header row for "Selected Works" + toggle */
.papers-header-row {
    display: flex;
    align-items: center;
    gap: 0.75em;
    margin-bottom: 0.4em; /* smaller so Preprints sits closer */
}

.papers-header-row h2 {
    margin: 0;
}

/* Keep the toggle on the right and slightly smaller */
.papers-header-row .papers-toggle {
    margin-left: auto;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .papers-header-row {
flex-direction: column;
align-items: flex-start;
    }
}

#preprints-heading {
    margin-top: -1.35em; /* prevents extra gap below the toggle row */
}
	/* Thesis highlight (subtle callout, no left stripe) */
#publications .thesis-item {
    border: 1px solid #e2e2e2;
    background-color: rgba(255, 251, 245, 0.85);
    padding: 0.85em 1em;
    border-radius: 6px;
    margin-top: 0.75em;
}

/* Use default font (inherit), no small-caps */
#publications .thesis-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    font: inherit;         /* key change: default font */
    color: #8C1515;
    font-size: 0.95em;
}

#publications .thesis-icon {
    color: #8C1515;
    font-size: 1rem;
}

#publications .thesis-meta {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin: 0.25em 0 0;
}

/* Ensure custom tag behaves nicely in flex rows */
#publications .thesis-meta conf {
    display: inline-block;
    line-height: 1.2;
}

/* Prevent the icon from affecting baseline math */
#publications .thesis-icon {
    line-height: 1;
}

/* -----------------------------
   (3) Thesis meta: on phones, stack the two tags (one per line)
-------------------------------- */
@media (max-width: 480px) {
    #publications .thesis-meta {
flex-direction: column;
align-items: flex-start;
gap: 0.15em;
    }
    /* Keep each “tag line” from wrapping awkwardly side-by-side */
    #publications .thesis-meta .red,
    #publications .thesis-meta conf {
white-space: nowrap;
    }
}

/* -----------------------------
   (4) Mobile margins: add left/right padding for main content containers
   Applies to Papers / Awards / Service (and other sections) on mobile.
-------------------------------- */
@media (max-width: 768px) {
    main[role="main"] .container {
padding-left: 6%;
padding-right: 6%;
box-sizing: border-box;
    }
}

/* -----------------------------
   (5) Keep “Selected Works” + toggle on one line on mobile
   Use shorter labels on small screens.
-------------------------------- */
.papers-toggle-pill .toggle-label-short {
    display: none;
}

@media (max-width: 768px) {
    /* Override your earlier mobile rule that forces a column layout */
    .papers-header-row {
flex-direction: row;
align-items: center;
flex-wrap: nowrap;
    }
    .papers-header-row h2 {
margin: 0;
white-space: nowrap;
    }
    .papers-header-row .papers-toggle {
margin-left: auto;
    }
}

@media (max-width: 480px) {
    .papers-toggle {
font-size: 0.82em;
gap: 0.5em;
flex-wrap: nowrap;
    }
    .papers-toggle-pill button {
padding: 0.22em 0.6em;
    }

    .papers-toggle-pill .toggle-label-full {
display: none;
    }
    .papers-toggle-pill .toggle-label-short {
display: inline;
    }

    .papers-header-row h2 {
font-size: 1.15em;
    }
}

/* -----------------------------
   (6) Applies a red tint filter to icon images with class "stanford-red-icon".
-------------------------------- */
.social-list a:hover { filter: none; }

:root { --stanford-cardinal: #8C1515; } /* reference only */

:root {
  --stanford-red-filter: invert(20%) sepia(104%) saturate(4800%)
                hue-rotate(352deg) brightness(60%) contrast(152%);
}

.social-list img.stanford-red-icon {
  filter: var(--stanford-red-filter);
}
.social-list a:hover img.stanford-red-icon {
  filter: var(--stanford-red-filter) brightness(1.08);
}

/* Paper resource links (Slides / Talk / Code / Poster / Demo / Summary / arXiv / Tweet, etc.) */
#publications a.paper-resource {
    color: #555;
    text-decoration: none;
    border-bottom: 0;          /* important if your global style uses border-bottom for links */
    white-space: nowrap;       /* optional: keeps "Short Talk" from splitting */
}

#publications a.paper-resource:visited {
    color: #555;
}

#publications a.paper-resource:hover {
    color: rgba(150,150,150,1);
    text-decoration: none;
    border-bottom: 2px solid rgba(200,200,200,1);
}

#publications conf:has(~ a.paper-resource) {
  display: inline-block;
  margin-right: 1em;
}
