:root {
  --bg-main: #FAF8F3;  /* Using the warmer shade everywhere */
  --bg-element: #F8F6F1;  /* Slightly different for depth but still warm */
  --bg-nav: #FAF8F3;  /* Same as main background */
  --text-primary: #333333;  /* Softer dark grey instead of harsh black */
  --text-secondary: #5A5A5A;  /* Slightly darker for better contrast with new primary */
  --text-muted: #8B8680;
  --shadow-light: #FFFFFF;
  --shadow-dark: #D1CFC8;
  --accent-warm: #8B8680;
  --border-subtle: #E8E6E1;
}

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

body {
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: 'EB Garamond', Georgia, serif;  /* Changed to EB Garamond */
  font-size: 19px;  /* Slightly larger for better readability with Garamond */
  line-height: 1.75;  /* Slightly tighter for Garamond */
  overflow-x: hidden;
}

/* Fixed Left Navigation - Matt Deitke Style */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;  /* Increased from 280px */
  height: 100vh;
  background: var(--bg-nav);
  border-right: 1px solid var(--border-subtle);
  padding: 2.5rem 2rem;  /* Increased padding */
  z-index: 1000;
  overflow-y: auto;
  box-shadow: inset -8px 0 16px var(--shadow-light), 
              4px 0 12px var(--shadow-dark);
}

.nav-profile {
  text-align: center;
  margin-bottom: 2rem;
}

.nav-photo {
  width: 160px;  /* Increased from 120px */
  height: 160px;  /* Increased from 120px */
  border-radius: 20px;  /* Increased border radius */
  overflow: hidden;
  margin: 0 auto 1.5rem;  /* Increased margin */
  box-shadow: 16px 16px 32px var(--shadow-dark),
              -16px -16px 32px var(--shadow-light);
  cursor: pointer;
}

.nav-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Fullscreen modal for profile photo */
.photo-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.photo-modal.open {
  display: flex;
}

.photo-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 20px;
  box-shadow: none;
}

/* Slider inside photo modal for gallery posts */
.modal-slider {
  display: flex;
  gap: 10px;
  max-width: 90%;
  max-height: 90%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.modal-slider img {
  flex: 0 0 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  scroll-snap-align: center;
}

.modal-slider::-webkit-scrollbar {
  display: none;
}

/* Navigation arrows for modal slider */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-nav.prev {
  left: 20px;
}

.modal-nav.next {
  right: 20px;
}

.nav-name {
  font-family: 'Inter', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.nav-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.nav-btn {
  padding: 8px 16px;
  background: var(--bg-main);
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  box-shadow: 4px 4px 8px var(--shadow-dark), 
              -4px -4px 8px var(--shadow-light);
}

.nav-btn:hover {
  box-shadow: 2px 2px 6px var(--shadow-dark), 
              -2px -2px 6px var(--shadow-light);
}

.nav-social {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.nav-social-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--bg-main);
  color: var(--text-muted);
  transition: all 0.3s ease;
  box-shadow: 3px 3px 6px var(--shadow-dark), 
              -3px -3px 6px var(--shadow-light);
}

.nav-social-icon:hover {
  color: var(--text-primary);
  box-shadow: 2px 2px 4px var(--shadow-dark), 
              -2px -2px 4px var(--shadow-light);
}

.nav-social-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.nav-menu {
  list-style: none;
}

.nav-menu li {
  margin-bottom: 0.5rem;
}

.nav-menu a {
  display: block;
  padding: 8px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.nav-menu a:hover, .nav-menu a.active {
  color: var(--text-primary);
  background: var(--bg-main);
  box-shadow: inset 2px 2px 4px var(--shadow-dark),
              inset -2px -2px 4px var(--shadow-light);
}

/* Navigation Divider Line */
.nav-divider {
  margin: 0.75rem 0;
  padding: 0;
  height: 1px;
  background: var(--border-subtle);
  opacity: 0.5;
  list-style: none;
  pointer-events: none; /* ensure divider does not block links below */
}

/* Better centering and sizing for main content */
.main-content {
  margin-left: 320px;  /* Account for sidebar */
  width: calc(100vw - 320px);  /* Take remaining viewport width */
  display: flex;
  flex-direction: column;
  align-items: center;  /* Center content horizontally */
  padding: 3rem 2rem 2rem 2rem;  /* Even padding */
  min-height: 100vh;  /* Full screen height */
}

/* Constrain content width but center it */
.main-content > * {
  width: 100%;
  max-width: 800px;  /* Limit content width */
}

/* Typography - Harvard Law Review Style */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h2 {
  font-size: 1.8rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.3rem;
  font-weight: 600;
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  text-align: justify;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--accent-warm);
}

/* Header Section - Matt Deitke Style */
.header-intro {
  margin-bottom: 4rem;  /* Increased spacing */
  padding: 2.5rem;  /* Increased padding */
  background: var(--bg-element);
  border-radius: 20px;  /* Larger border radius */
  box-shadow: inset 8px 8px 16px var(--shadow-dark), 
              inset -8px -8px 16px var(--shadow-light);
}

.intro-text {
  font-size: 1.25rem;  /* Slightly bigger text */
  line-height: 2;  /* More line height */
  color: var(--text-secondary);
  text-align: justify;
}

/* Publications Section - Matt Deitke Style */
.section-header {
  text-align: left;
  margin-bottom: 2.5rem;  /* Increased */
  padding-bottom: 1.5rem;  /* Increased */
  border-bottom: 1px solid var(--border-subtle);
}

.section-header h2 {
  font-size: 2rem;  /* Bigger section titles */
  margin-bottom: 0;
}

.toggle-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.toggle-btn {
  padding: 8px 20px;
  background: var(--bg-element);
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;  /* Fast response */
  box-shadow: 4px 4px 8px var(--shadow-dark), 
              -4px -4px 8px var(--shadow-light);
}

.toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 5px 5px 10px var(--shadow-dark), 
              -5px -5px 10px var(--shadow-light);
}

.toggle-btn:active {
  transform: translateY(0);
  transition: none;  /* Instant click */
}

.toggle-btn.active {
  color: var(--text-primary);
  box-shadow: inset 2px 2px 6px var(--shadow-dark), 
              inset -2px -2px 6px var(--shadow-light);
  transition: color 0.3s ease;  /* Only animate color */
}

/* Publication Cards - Exact Matt Deitke Layout */
.publications-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.publications-grid.active {
  display: flex;
  opacity: 1;
}

.publications-grid:not(.active) {
  display: none;
}

.publication-card {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-element);
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 8px 8px 16px var(--shadow-dark), 
              -8px -8px 16px var(--shadow-light);
}

.publication-card:hover {
  transform: translateY(-1px);
  box-shadow: 10px 10px 20px var(--shadow-dark), 
              -10px -10px 20px var(--shadow-light);
}

.pub-thumbnail {
  width: 120px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 4px 4px 8px var(--shadow-dark);
  background: var(--bg-main);
}

.pub-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pub-details {
  flex: 1;
}

.pub-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  color: var(--text-primary);
}

.pub-authors {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.pub-venue {
  font-size: 0.9rem;
  color: var(--accent-warm);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.pub-links {
  display: flex;
  gap: 0.75rem;
}

.pub-link {
  padding: 4px 12px;
  background: var(--bg-main);
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  box-shadow: 3px 3px 6px var(--shadow-dark), 
              -3px -3px 6px var(--shadow-light);
  transition: all 0.3s ease;
}

.pub-link:hover {
  box-shadow: 2px 2px 4px var(--shadow-dark), 
              -2px -2px 4px var(--shadow-light);
}

/* Software Section */
.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.software-card {
  padding: 1.5rem;
  background: var(--bg-element);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 8px 8px 16px var(--shadow-dark), 
              -8px -8px 16px var(--shadow-light);
}

.software-card:hover {
  transform: translateY(-2px);
  box-shadow: 10px 10px 20px var(--shadow-dark), 
              -10px -10px 20px var(--shadow-light);
}

.software-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg-main);
  box-shadow: inset 2px 2px 4px var(--shadow-dark), 
              inset -2px -2px 4px var(--shadow-light);
}

.software-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.software-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Contact Section */
.contact-section {
  background: var(--bg-element);
  border-radius: 16px;
  padding: 2.5rem 2.5rem 2.8rem 2.5rem;
  margin-top: 3rem;
  box-shadow: inset 6px 6px 12px var(--shadow-dark),
              inset -6px -6px 12px var(--shadow-light);
}

.contact-section .section-header {
  text-align: center;
  margin: 0 0 2rem 0;
  padding: 0;
  border-bottom: none;
}

.contact-section .section-header h2 {
  font-size: 2rem;
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

.contact-form {
  display: grid;
  gap: 1.2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.form-input {
  padding: 14px 18px;
  background: var(--bg-main);
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text-primary);
  box-shadow: inset 3px 3px 6px var(--shadow-dark),
              inset -3px -3px 6px var(--shadow-light);
}

.form-input:focus {
  outline: none;
  box-shadow: inset 4px 4px 8px var(--shadow-dark),
              inset -4px -4px 8px var(--shadow-light);
}

.form-textarea {
  grid-column: 1 / -1;
  min-height: 120px;
  resize: vertical;
  font-family: 'EB Garamond', Georgia, serif;  /* Updated to match body font */
}

.submit-btn {
  grid-column: 1 / -1;
  justify-self: center;
  padding: 14px 32px;
  margin-top: 1.5rem;
  background: var(--bg-main);
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 6px 6px 12px var(--shadow-dark),
              -6px -6px 12px var(--shadow-light);
}

.submit-btn:hover {
  box-shadow: 4px 4px 8px var(--shadow-dark),
              -4px -4px 8px var(--shadow-light);
}

/* Hamburger Menu Toggle */
 .menu-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1001;
  padding: 12px;
  background: var(--bg-main);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 4px 4px 8px var(--shadow-dark),
              -4px -4px 8px var(--shadow-light);
  display: none;  /* Hidden by default, shown on mobile */
  transition: all 0.2s ease;
 }

.menu-toggle:hover {
  box-shadow: 3px 3px 6px var(--shadow-dark), 
              -3px -3px 6px var(--shadow-light);
}

.menu-toggle:active {
  box-shadow: inset 2px 2px 4px var(--shadow-dark), 
              inset -2px -2px 4px var(--shadow-light);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-primary);
  fill: none;
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle.open .icon-burger {
  display: none;
}

.menu-toggle.open .icon-close {
  display: block;
}

/* Responsive Design */

@media (max-width: 768px) {
  .main-content {
    padding: 1.5rem 1rem;
  }

  .main-content > * {
    max-width: 100%;
  }

  .nav-photo {
    width: 140px;
    height: 140px;
  }

  .nav-name {
    font-size: 1.2rem;
  }

  .software-grid {
    grid-template-columns: 1fr;
  }

  .publication-card {
    flex-direction: column;
    text-align: center;
  }

  .pub-thumbnail {
    align-self: center;
  }
}

/* ============================================
   VIEW TOGGLE - Buttons to switch views
   ============================================ */
.view-toggle-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  padding: 1rem;
  background: var(--bg-element);
  border-radius: 12px;
  box-shadow: inset 4px 4px 8px var(--shadow-dark),
              inset -4px -4px 8px var(--shadow-light);
}

.view-toggle-btn {
  padding: 10px 28px;
  background: var(--bg-main);
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;  /* Fast click response */
  box-shadow: 4px 4px 8px var(--shadow-dark),
              -4px -4px 8px var(--shadow-light);
}

.view-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 3px 3px 6px var(--shadow-dark),
              -3px -3px 6px var(--shadow-light);
}

.view-toggle-btn:active {
  transform: translateY(0);
  transition: none;  /* Instant response on click */
}

.view-toggle-btn.active {
  color: var(--text-primary);
  box-shadow: inset 2px 2px 5px var(--shadow-dark),
              inset -2px -2px 5px var(--shadow-light);
  transition: color 0.3s ease;  /* Only animate color, not shadow */
}

/* ============================================
   TIMELINE STYLES - Two Column Layout
   ============================================ */

/* Timeline Labels at Top */
.timeline-labels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto 40px auto;
  padding: 0 20px;
  text-align: center;
}

.timeline-label-left {
  text-align: right;
  padding-right: 60px;
}

.timeline-label-right {
  text-align: left;
  padding-left: 60px;
}

.timeline-labels h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-warm);
  margin: 0;
  padding: 10px 20px;
  background: var(--bg-element);
  border-radius: 8px;
  display: inline-block;
  box-shadow: 4px 4px 8px var(--shadow-dark),
              -4px -4px 8px var(--shadow-light);
}

/* Timeline Container */
.timeline-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Center Line */
.timeline-line {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100px;
  bottom: 0;
  width: 2px;
  background: var(--border-subtle);
}

/* Timeline Items Base */
.timeline-item {
  position: relative;
  margin-bottom: 50px;
  width: 50%;
}

/* Left Side Items (Education) */
.timeline-item-left {
  left: 0;
  padding-right: 40px;
}

.timeline-item-left .timeline-content {
  text-align: right;
}

.timeline-item-left .timeline-dot {
  position: absolute;
  right: -10px;
  top: 0;
}

/* Arrow pointing from left content to center line */
.timeline-item-left .timeline-content::after {
  content: '';
  position: absolute;
  top: 20px;
  right: -8px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent var(--bg-element);
}

/* Right Side Items (Work Experience) */
.timeline-item-right {
  left: 50%;
  padding-left: 40px;
}

.timeline-item-right .timeline-content {
  text-align: left;
}

.timeline-item-right .timeline-dot {
  position: absolute;
  left: -10px;
  top: 0;
}

/* Arrow pointing from right content to center line */
.timeline-item-right .timeline-content::after {
  content: '';
  position: absolute;
  top: 20px;
  left: -8px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 10px 10px 0;
  border-color: transparent var(--bg-element) transparent transparent;
}

/* Timeline Dot (Center) */
.timeline-dot {
  width: 20px;
  height: 20px;
  background: var(--bg-main);
  border: 3px solid var(--accent-warm);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 4px var(--bg-main),
              4px 4px 8px var(--shadow-dark);
  transition: all 0.3s ease;
}

/* Timeline Content Cards */
.timeline-content {
  position: relative;
  background: var(--bg-element);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 8px 8px 16px var(--shadow-dark),
              -8px -8px 16px var(--shadow-light);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-2px);
  box-shadow: 10px 10px 20px var(--shadow-dark),
              -10px -10px 20px var(--shadow-light);
}

/* Timeline Date */
.timeline-date {
  display: inline-block;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1rem;
  color: var(--accent-warm);
  margin-bottom: 0.5rem;
}

/* Timeline Headings */
.timeline-content h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0.5rem 0;
}

.timeline-content h4 {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.timeline-content p {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
  text-align: inherit;
}

/* Hover effect on dots */
.timeline-item:hover .timeline-dot {
  background: var(--accent-warm);
  transform: scale(1.2);
  box-shadow: 0 0 0 4px var(--bg-main),
              0 0 20px rgba(139, 134, 128, 0.4),
              6px 6px 12px var(--shadow-dark);
}

/* ============================================
   MOBILE RESPONSIVE - Single Column
   ============================================ */

@media (max-width: 768px) {
  /* Hide desktop labels, show mobile label */
  .timeline-labels {
    grid-template-columns: 1fr;
    margin-bottom: 30px;
  }
  
  .timeline-label-left {
    display: none;
  }
  
  .timeline-label-right {
    text-align: center;
    padding: 0;
  }
  
  .timeline-label-right h3 {
    display: block;
    width: fit-content;
    margin: 0 auto;
  }
  
  /* Move line back to left side */
  .timeline-line {
    left: 20px;
    transform: translateX(0);
    top: 80px;
  }
  
  /* Make all items full width and left-aligned */
  .timeline-item {
    width: 100%;
    padding-left: 50px;
    padding-right: 0;
    left: 0 !important;
  }
  
  .timeline-item-left,
  .timeline-item-right {
    padding-left: 50px;
    padding-right: 0;
  }
  
  /* Reset text alignment for mobile */
  .timeline-item-left .timeline-content,
  .timeline-item-right .timeline-content {
    text-align: left;
  }
  
  /* Move all dots to the left */
  .timeline-item-left .timeline-dot,
  .timeline-item-right .timeline-dot {
    left: 10px;
    right: auto;
  }
  
  /* Remove desktop arrows */
  .timeline-item-left .timeline-content::after,
  .timeline-item-right .timeline-content::after {
    display: none;
  }
  
  /* Smaller padding on mobile */
  .timeline-content {
    padding: 20px;
  }
  
  .timeline-content h3 {
    font-size: 1.2rem;
  }
  
  .timeline-content h4 {
    font-size: 0.95rem;
  }
  
  .timeline-content p {
    font-size: 0.95rem;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .timeline-item {
    padding-left: 40px;
    margin-bottom: 30px;
  }
  
  .timeline-item-left,
  .timeline-item-right {
    padding-left: 40px;
  }
  
  .timeline-content {
    padding: 15px;
  }
  
  .timeline-labels h3 {
    font-size: 0.9rem;
    padding: 8px 16px;
  }
}

/* Mobile and Tablet Styles */
@media (max-width: 1024px) {
  /* Show hamburger menu on mobile/tablet */
  .menu-toggle {
    display: block !important;
  }
  
  /* Ensure view toggle works on mobile */
  .view-toggle-container {
    margin-bottom: 2rem;
    padding: 0.75rem;
  }
  
  .view-toggle-btn {
    padding: 8px 20px;
    font-size: 0.85rem;
  }

  /* Rest of existing mobile styles... */
  .sidebar {
    width: 320px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    width: 100vw;
    padding: 4rem 1.5rem 2rem 1.5rem;  /* Add top padding for hamburger */
  }

  .main-content > * {
    width: 100%;
    max-width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .view-toggle-btn {
    padding: 7px 16px;
    font-size: 0.8rem;
  }

  .main-content {
    padding: 3.5rem 1rem 1.5rem 1rem;  /* Adjust for smaller screens */
  }
}

/* ============================================
   SMOOTH TRANSITIONS FOR VIEW SWITCHING
   ============================================ */

/* Fade transition for all content views */
.content-view {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.content-view.active {
  display: block;
  opacity: 1;
}

.content-view:not(.active) {
  display: none;
}

/* Smooth transition for publication grids */
