/* Custom CSS v2 for Matthew Guthaus's Personal Web */

/* Import a modern font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-accent: #FD3519;
  --primary-accent-hover: #e62b12;
  --text-main: #2d3436;
  --text-muted: #636e72;
  --bg-soft: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: #e9ecef;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  color: var(--text-main);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
}

/* Sidebar Polishing */
.sidebar {
  padding: 3rem 2rem;
  background-color: var(--bg-white);
  border-right: 1px solid var(--border-color);
}

.sidebar-header {
    text-align: center;
}

.sidebar .logo-container img {
  border: 4px solid var(--bg-white);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.sidebar .logo-container img:hover {
  transform: scale(1.02);
}

.sidebar h2 {
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  margin-top: 1.5rem;
  line-height: 1.2;
}

.sidebar h3 {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.75rem;
}

.sidebar .menu ul li a {
  font-weight: 600;
  font-size: 1rem;
  padding: 0.6rem 0;
  transition: var(--transition);
}

.sidebar .menu ul li a:hover {
  color: var(--primary-accent);
  padding-left: 5px;
}

/* Publication Card Styling - Refined */
.publications-list ul, 
article .content ul {
  list-style: none;
  padding-left: 0;
}

article .content ul li {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary-accent);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

article .content ul li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(253, 53, 25, 0.2);
}

article .content ul li a {
  font-size: 1.2rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.6rem;
  color: var(--text-main);
  text-decoration: none;
  line-height: 1.35;
}

article .content ul li a:hover {
  color: var(--primary-accent);
}

article .content ul li em {
  display: block;
  font-style: normal;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Year Headers in Publications */
article .content h2 {
  margin-top: 4rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

/* Latest News Section on Home */
.news-container {
  margin-top: 3rem;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

.news-card {
  display: block;
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: var(--bg-soft);
  border-radius: 8px;
  text-decoration: none !important;
  color: inherit !important;
  transition: var(--transition);
  border: 1px solid transparent;
}

.news-card:hover {
  background: var(--bg-white);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
  transform: translateX(5px);
}

.news-date {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-accent);
  margin-bottom: 0.25rem;
  display: block;
}

.news-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: block;
}

.news-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  display: block;
}

/* Filter Controls */
.filter-controls {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-soft);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

#pub-search {
  flex-grow: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
}

#filter-year {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-white);
  font-family: inherit;
  font-size: 0.95rem;
  min-width: 120px;
}

#pub-search:focus, #filter-year:focus {
  outline: none;
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(253, 53, 25, 0.1);
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  margin-left: 0.5rem;
  vertical-align: middle;
  letter-spacing: 0.03em;
}

.badge-phd { background: #ffeaa7; color: #d35400; border: 1px solid #fab1a0; }
.badge-ms { background: #81ecec; color: #0097e6; border: 1px solid #74b9ff; }
.badge-bs { background: #55efc4; color: #00b894; border: 1px solid #00d2d3; }
.badge-alumni { background: #dfe6e9; color: #636e72; border: 1px solid #b2bec3; }
.badge-current { background: #dff9fb; color: #130f40; border: 1px solid #c7ecee; }

/* Student List Styling */
.content ul li {
  margin-bottom: 0.75rem;
  list-style: none;
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  background-color: var(--primary-accent);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1000;
  font-size: 1.5rem;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  transform: translateY(-5px);
  background-color: var(--primary-accent-hover);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sidebar {
    padding: 2rem 1rem;
  }
  
  article .content ul li {
    padding: 1.25rem;
  }

  .filter-controls {
    flex-direction: column;
  }
}
