/* Custom styles */

/* Stanford cardinal color */
:root {
  --stanford-cardinal: #8C1515;
  --stanford-cardinal-light: #B83A4B;
  --stanford-cardinal-dark: #620D0D;
  --main-font: "Gill Sans", sans-serif;
}

/* Global font settings */
body {
  font-family: var(--main-font);
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Container stability */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Maintain aspect ratios for images */
.profile-pic {
  width: 100%;
  max-width: 256px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 5px;
  border: 3px solid var(--stanford-cardinal);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-pic:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Stable grid layout */
.columns {
  display: flex;
  flex-wrap: wrap;
  margin: -0.75rem;
}

.column {
  flex: 1;
  padding: 0.75rem;
  min-width: 0; /* Prevent overflow */
}

.column.is-two-thirds {
  flex: 2;
}

.column.is-one-third {
  flex: 1;
  min-width: 280px;
}

/* Add spacing to the top of the page */
main {
  padding-top: 1rem;
  min-height: calc(100vh - 200px); /* Ensure minimum height */
}

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

/* Style for the hero section */
.hero {
  background-color: #f5f5f5;
  padding: 3rem 0;
}

/* Add bottom margin to section titles */
.title {
  margin-bottom: 1.5rem;
  font-family: var(--main-font);
}

/* Style for the news items */
.content ul li {
  margin-bottom: 1.5rem;
}

.content ul li strong {
  display: block;
  color: var(--stanford-cardinal);
  font-size: 0.9rem;
}

/* Footer styling */
.footer {
  padding: 3rem 1.5rem;
  background-color: #fafafa;
  margin-top: auto; /* Push to bottom */
}

/* Make sure images don't overflow their containers */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Links */
a {
  color: var(--stanford-cardinal);
  transition: color 0.2s;
}

a:hover {
  color: var(--stanford-cardinal-light);
}

/* Section headings */
h1, h2, h3 {
  color: var(--stanford-cardinal);
  font-family: var(--main-font);
}

/* Button styling */
.button.is-outlined {
  border-color: var(--stanford-cardinal);
  color: var(--stanford-cardinal);
}

.button.is-outlined:hover {
  background-color: var(--stanford-cardinal);
  color: white;
}

/* Box styling for projects */
.box {
  margin-bottom: 2rem;
  border-top: 3px solid var(--stanford-cardinal);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.box:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.box h3 {
  margin-bottom: 1rem;
}

/* Project images */
.box .image img {
  border-radius: 4px;
  transition: opacity 0.3s ease;
}

.box .image img:hover {
  opacity: 0.9;
}

/* Publication styling */
.publication {
  margin-bottom: 1.5rem;
}

/* Stanford-specific styling */
.stanford-bg {
  background-color: var(--stanford-cardinal);
  color: white;
}

/* Navigation active state */
.navbar-item.is-active {
  background-color: #f5f5f5;
  color: var(--stanford-cardinal);
}

/* Font overrides for Bulma elements */
.navbar-item, .button, p, li, .content, .subtitle {
  font-family: var(--main-font);
}

/* Responsive adjustments with stable ratios */
@media screen and (max-width: 1024px) {
  .container {
    padding: 0 1rem;
  }
}

@media screen and (max-width: 768px) {
  .columns {
    flex-direction: column;
  }
  
  .column.is-one-third {
    order: -1; /* Move profile pic to top on mobile */
    text-align: center;
    min-width: auto;
  }
  
  .profile-pic {
    max-width: 200px;
    margin: 0 auto 2rem auto;
  }
  
  .title.is-1 {
    font-size: 2rem;
    text-align: center;
  }
  
  .bio-content {
    text-align: left;
  }
  
  .links-section {
    text-align: center;
  }
}

/* More aggressive mobile breakpoint for desktop browser simulation */
@media screen and (max-width: 600px) {
  /* Hide the entire profile container and show content differently */
  .profile-container {
    display: none !important;
  }
  
  /* Show mobile content */
  .mobile-bio-content {
    display: block !important;
  }
  
  /* Create a mobile-only layout */
  .home .main-content {
    padding: 1rem;
  }
  
  .container {
    padding: 0 0.75rem;
  }
  
  .title.is-1 {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .simple-link {
    display: block;
    margin: 0.5rem auto;
    width: fit-content;
  }
}

@media screen and (max-width: 480px) {
  /* Hide the entire profile container and show content differently */
  .profile-container {
    display: none !important;
  }
  
  /* Show mobile content */
  .mobile-bio-content {
    display: block !important;
  }
  
  /* Create a mobile-only layout */
  .home .main-content {
    padding: 1rem;
  }
  
  .container {
    padding: 0 0.75rem;
  }
  
  .title.is-1 {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .simple-link {
    display: block;
    margin: 0.5rem auto;
    width: fit-content;
  }
}

/* Prevent layout shift during loading */
.profile-container {
  min-height: 400px;
}

/* Ensure consistent spacing */
* {
  box-sizing: border-box;
}

/* Stable viewport units */
.main-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  width: 100%;
}

/* Smooth transitions for all interactive elements */
* {
  transition: all 0.2s ease;
} 