/* Shared by every page of sam-deegan.com. Edit here, not in a page.
   Page-specific rules stay in each page's own <style>, loaded after this. */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root { --navy-dark: #fafafa; --navy-light: #ffffff; --text-primary: #04204c; --text-secondary: #444444; --accent-teal: #0056a4; --accent-blue: #04204c; --border-color: #d8e0e6; --card-shadow: 2px 3px 6px rgba(0, 0, 0, 0.05), 6px 10px 22px rgba(0, 0, 0, 0.10); }
nav { position: sticky; top: 0; z-index: 1000; background-color: var(--navy-dark); border-bottom: 1px solid var(--border-color); backdrop-filter: blur(10px); padding: 1rem 2rem; }
nav ul { list-style: none; display: flex; justify-content: center; gap: 2rem; max-width: 1200px; margin: 0 auto; flex-wrap: wrap; }
nav a { color: var(--text-secondary); text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: color 0.3s ease; position: relative; padding-bottom: 0.25rem; }
nav a:hover, nav a.active { color: var(--accent-teal); }
nav a.active::after { content: ''; position: absolute; bottom: -0.5rem; left: 0; right: 0; height: 2px; background-color: var(--accent-teal); }
@keyframes fadeInUp {from {opacity: 0;transform: translateY(20px);} to {opacity: 1;transform: translateY(0);}}
.publication-card, .publication-item, .talk-item, .education-card, .timeline-content, .contact-detail-box, .contact-form-section, .contact-details-section, .contact-info, .course-card, .philosophy-box, .skill-category { border-color: #e6ebef; }
.publication-card:hover, .publication-item:hover, .talk-item:hover, .education-card:hover, .course-card:hover, .skill-category:hover, .timeline-item:hover .timeline-content { box-shadow: 3px 5px 10px rgba(0, 0, 0, 0.07), 10px 16px 32px rgba(0, 0, 0, 0.15); }
.page-header { padding: 3.5rem 2rem 3rem; }
.page-header h1 { margin-bottom: 0.25rem; }
.page-header p { font-size: 1.05rem; line-height: 1.7; max-width: 640px; margin: 0 auto; }
body { color: #212529; }
nav { background-color: #ffffff; border-bottom: 1px solid var(--border-color); }
nav a { color: #04204c; }
nav a:hover, nav a.active { color: #0056a4; }
.hero h1, .page-header h1 { color: #04204c; }
.hero-subtitle, .hero-affiliation, .page-header p, .hero-bio { color: #444444; }
h1, h2, h3, .section-title, .publication-title, .talk-title, .project-title, .degree, .experience-title { color: #04204c; }
.year-header { color: #0056a4; border-bottom-color: #0056a4; }
.btn-primary { background-color: #61b77c; color: #1b1b1a; border-color: #61b77c; font-weight: 700; }
.btn-primary:hover { background-color: #4da068; border-color: #4da068; color: #1b1b1a; transform: translateY(-2px); box-shadow: 3px 5px 10px rgba(0, 0, 0, 0.07), 10px 16px 32px rgba(0, 0, 0, 0.15); }
.btn-secondary { color: #0056a4; border-color: #0056a4; }
.btn-secondary:hover { background-color: #0056a4; color: #ffffff; transform: translateY(-2px); box-shadow: 3px 5px 10px rgba(0, 0, 0, 0.07), 10px 16px 32px rgba(0, 0, 0, 0.15); }
a { color: #0056a4; }
.social-icon { background-color: #ffffff; color: #0056a4; border-color: #0056a4; }
.social-icon:hover { background-color: #0056a4; color: #ffffff; }
footer { background-color: #eef2f5; color: #444444; border-top: 1px solid var(--border-color); }
.publication-image.figure { background: #ffffff; }
.publication-card, .publication-item, .talk-item, .project-card, .education-card, .timeline-content { background-color: #ffffff; }
/* Brand at the left on every width; on phones it also carries the Menu button. */
.nav-top { display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: inline-flex; align-items: center; gap: 0.55rem; color: #04204c; font-weight: 700; font-size: 1rem; text-decoration: none; padding-bottom: 0; white-space: nowrap; }
.nav-brand img { width: 28px; height: 28px; border-radius: 50%; display: block; }
.nav-brand:hover { color: #0056a4; }
.nav-brand.active { color: #04204c; }
.nav-brand.active::after { display: none; }
.nav-toggle { display: none; }
@media (min-width: 769px) { .nav-top { position: absolute; left: 2rem; top: 50%; transform: translateY(-50%); } }
@media (max-width: 768px) {
    nav { padding: 0.7rem 1.25rem; }
    .nav-toggle { display: inline-block; font-family: inherit; font-size: 0.9rem; font-weight: 600; color: #04204c; background: #ffffff; border: 1px solid #d8e0e6; border-radius: 6px; padding: 0.4rem 0.8rem; cursor: pointer; }
    .nav-toggle:hover { border-color: #0056a4; color: #0056a4; }
    nav ul { display: none; flex-direction: column; align-items: flex-start; }
    nav.is-open ul { display: flex; padding-top: 0.6rem; }
    nav ul li { width: 100%; }
    nav ul a { display: block; padding: 0.3rem 0; font-size: 0.95rem; }
    nav a.active::after { display: none; }
}
