/* ================================================
   sethpruitt.net — stylesheet
   ================================================ */

:root {
    --maroon:       #8b2332;
    --maroon-dark:  #6e1a28;
    --maroon-light: #f0dde0;
    --maroon-pale:  #faf3f4;
    --border:       #dfc8cb;
    --text:         #1a1a1a;
    --text-muted:   #555;
    --white:        #ffffff;
    --shadow:       0 1px 5px rgba(100,20,30,0.10);
    --shadow-hover: 0 3px 10px rgba(100,20,30,0.15);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--maroon-light);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

a {
    color: var(--maroon);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ---- Header ---- */

header {
    background: var(--maroon);
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.header-inner {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 58px;
}

.site-name a {
    font-size: 1.35em;
    font-weight: bold;
    color: var(--white);
    letter-spacing: 0.01em;
    text-decoration: none;
}

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

nav {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    font-weight: 500;
}

nav a.nav-link {
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

nav a.nav-link:hover,
nav a.nav-link.active {
    background: rgba(255,255,255,0.18);
    color: var(--white);
    text-decoration: none;
}

/* Dropdown */

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    color: rgba(255,255,255,0.88);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s, color 0.15s;
    font-size: 0.9em;
    font-weight: 500;
    background: none;
    border: none;
    user-select: none;
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active {
    background: rgba(255,255,255,0.18);
    color: var(--white);
}

.nav-dropdown-toggle .arrow {
    font-size: 0.7em;
    transition: transform 0.2s;
}

.nav-dropdown-toggle.open .arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    min-width: 280px;
    max-height: 480px;
    overflow-y: auto;
    z-index: 200;
}

.dropdown-menu.open {
    display: block;
}

.dropdown-section-label {
    font-size: 0.72em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--maroon);
    padding: 10px 14px 4px;
    border-top: 1px solid var(--border);
}

.dropdown-section-label:first-child {
    border-top: none;
}

.dropdown-menu a {
    display: block;
    padding: 6px 14px;
    font-size: 0.88em;
    color: var(--text);
    text-decoration: none;
    line-height: 1.4;
    transition: background 0.1s;
}

.dropdown-menu a:hover {
    background: var(--maroon-light);
    color: var(--maroon);
    text-decoration: none;
}

/* ---- Page wrapper ---- */

.page {
    max-width: 980px;
    margin: 0 auto;
    padding: 40px 28px 70px;
}

/* ---- Section headings ---- */

h2.section-heading {
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--maroon);
    border-bottom: 2px solid var(--maroon);
    padding-bottom: 6px;
    margin: 44px 0 20px;
}

/* ---- Home page ---- */

.home-layout {
    display: flex;
    gap: 36px;
    align-items: flex-start;
}

.home-photo {
    flex: 0 0 210px;
}

.home-photo img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.home-content p {
    margin-bottom: 14px;
}

.cv-links {
    margin-bottom: 16px;
    font-size: 0.92em;
    font-weight: 500;
}

.contact-block {
    font-size: 0.875em;
    color: #444;
    line-height: 1.9;
    margin-top: 20px;
    padding: 14px 18px;
    background: var(--maroon-pale);
    border-left: 3px solid var(--maroon);
    border-radius: 0 4px 4px 0;
}

.contact-block a {
    color: var(--maroon);
}

/* ---- Awards ---- */

.awards-list {
    list-style: none;
    padding: 0;
}

.awards-list li {
    padding: 6px 12px;
    margin-bottom: 4px;
    font-size: 0.95em;
    background: var(--white);
    border-radius: 4px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.15s;
}

.awards-list li:hover {
    box-shadow: var(--shadow-hover);
}

.awards-list li a {
    color: var(--text);
    text-decoration: none;
}

.awards-list li a:hover {
    color: var(--maroon);
}

/* ---- Filter buttons ---- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
    padding: 18px 20px;
    background: var(--white);
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.filter-bar-label {
    font-size: 0.72em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    width: 100%;
    margin-bottom: 2px;
}

.filter-btn {
    font-size: 0.8em;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1.5px solid var(--maroon);
    background: var(--white);
    color: var(--maroon);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.filter-btn:hover {
    background: var(--maroon-light);
}

.filter-btn.active {
    background: var(--maroon);
    color: var(--white);
}

/* ---- Paper cards ---- */

.paper-section {
    /* wrapper for heading + papers */
}

.paper {
    background: var(--white);
    border-radius: 6px;
    box-shadow: var(--shadow);
    padding: 22px 24px;
    margin-bottom: 16px;
    transition: box-shadow 0.15s;
}

.paper:hover {
    box-shadow: var(--shadow-hover);
}

.paper-title {
    font-weight: bold;
    font-size: 1.01em;
    line-height: 1.4;
    margin-bottom: 4px;
}

.paper-title a {
    color: var(--text);
    text-decoration: none;
}

.paper-title a:hover {
    color: var(--maroon);
    text-decoration: underline;
}

.paper-venue {
    font-size: 0.92em;
    margin-bottom: 3px;
    color: #333;
}

.paper-venue .journal {
    font-style: italic;
}

.paper-venue .lead {
    font-style: italic;
    color: var(--text-muted);
}

.paper-authors {
    font-size: 0.9em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.paper-links {
    font-size: 0.85em;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
    margin-bottom: 12px;
}

.paper-links a {
    display: inline-block;
    margin-right: 12px;
    color: var(--maroon);
    border-bottom: 1px solid var(--border);
    padding-bottom: 1px;
    transition: border-color 0.15s;
}

.paper-links a:hover {
    border-color: var(--maroon);
    text-decoration: none;
}

.paper-abstract {
    font-size: 0.915em;
    color: #2a2a2a;
    line-height: 1.62;
}

/* ---- Abstract toggle ---- */
.abstract-toggle {
    margin-top: 10px;
    cursor: pointer;
}
.abstract-toggle .abstract-label {
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--maroon);
    text-transform: uppercase;
    user-select: none;
    display: inline-block;
    margin-bottom: 4px;
}
.abstract-toggle .abstract-label .abstract-arrow {
    font-style: normal;
    margin-left: 3px;
}
.abstract-toggle .abstract-sentence,
.abstract-toggle .abstract-full {
    font-size: 0.915em;
    color: #2a2a2a;
    line-height: 1.62;
    margin: 0;
}
.abstract-toggle:hover .abstract-label {
    text-decoration: underline;
}
.abstract-toggle.no-expand {
    cursor: default;
}
.abstract-toggle.no-expand:hover .abstract-label {
    text-decoration: none;
}

.paper-award {
    font-size: 0.85em;
    color: #7a5000;
    margin-top: 8px;
}

.paper-award a {
    color: #7a5000;
}

.paper-note {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-top: 6px;
}

.rr-badge {
    display: inline-block;
    font-size: 0.72em;
    font-weight: bold;
    color: var(--white);
    background: var(--maroon);
    padding: 1px 7px;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
}

.paper-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 12px;
}

.tag {
    font-size: 0.72em;
    font-weight: 500;
    padding: 2px 9px;
    border-radius: 12px;
    background: var(--maroon-light);
    color: var(--maroon-dark);
    border: 1px solid var(--border);
}

/* ---- Downloads page ---- */

.dl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.dl-group {
    background: var(--white);
    border-radius: 6px;
    box-shadow: var(--shadow);
    padding: 18px 20px;
    transition: box-shadow 0.15s;
}

.dl-group:hover {
    box-shadow: var(--shadow-hover);
}

.dl-group h3 {
    font-size: 0.88em;
    font-weight: bold;
    color: var(--maroon-dark);
    margin-bottom: 10px;
    line-height: 1.4;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.dl-group ul {
    list-style: none;
    padding: 0;
}

.dl-group ul li {
    font-size: 0.9em;
    padding: 3px 0;
}

.dl-group ul li + li {
    border-top: 1px dotted var(--border);
    margin-top: 4px;
    padding-top: 6px;
}

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

footer {
    text-align: center;
    padding: 20px;
    font-size: 0.8em;
    color: rgba(139,35,50,0.5);
    background: var(--maroon-light);
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

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

@media (max-width: 640px) {
    header { padding: 0 16px; }
    .header-inner { height: 52px; }
    .site-name a { font-size: 1.1em; }
    .page { padding: 24px 16px 50px; }
    .home-layout { flex-direction: column; }
    .home-photo { flex: 0 0 auto; width: 150px; }
    .dl-grid { grid-template-columns: 1fr; }
    .dropdown-menu { min-width: 240px; }
}
