body,h1,h2,h3,h4,h5,h6 {font-family: "Lato", sans-serif;}
body, html {
  height: 100%;
  color: #777;
  line-height: 1.8;
}

/* Create a Parallax Effect */
.bgimg-1, .bgimg-2, .bgimg-3 {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* First image (Logo. Full height) */
.bgimg-1 {
  background-image: url("resources/GlacierGrinellTrail3.jpg");
  min-height: 100%;
}

/* Second image (Experience) */
.bgimg-2 {
  background-image: url("resources/BelowTheTetons.jpg");
  min-height: 400px;
}

/* Third image (Contact) */
.bgimg-3 {
  background-image: url("resources/GrandTetonSunset_FullSize.jpg");
  min-height: 400px;
}

.w3-wide {letter-spacing: 10px;}
.w3-hover-opacity {cursor: pointer;}

/* Compact modal (add these lines) */
#modal01.compact-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#modal01.compact-modal .modal-card {
  background: #fff;
  border-radius: 8px;
  max-width: 900px;
  width: 90%;
  max-height: 90%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  overflow: auto;
  position: relative;
  padding: 16px;
  text-align: center;
}
.modal-image {
  max-width: 100%;
  max-height: 60vh;
  display: block;
  margin: 0 auto 12px;
}
.modal-caption {
  color: #333;
  font-size: 14px;
  text-align: left;
}
.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #444;
}
@media (max-width:480px){
  .modal-image { max-height: 50vh; }
  .modal-card { padding: 8px; }
  .modal-caption { font-size:13px; }
}

.tile-container {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  justify-items: center;
  padding: 10px;
}

.tile {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 150px;
  background: rgb(255, 255, 255);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid black;
}

.tile img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  cursor: pointer;
}

.tile-wide {
  aspect-ratio: 3 / 1;
  width: 100%;
  max-width: 450px;
  background: rgb(255, 255, 255);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid black;
}

.tile-wide img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  cursor: pointer;
}

.year-section {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.year-header {
    background: #f8f9fa;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    user-select: none;
}

.year-header:hover {
    background: #e9ecef;
}

.year-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #2c3e50;
}

.year-count {
    font-size: 0.9em;
    color: #6c757d;
    margin-left: 10px;
}

.toggle-icon {
    font-size: 1.2em;
    color: #6c757d;
    transition: transform 0.3s;
}

.year-section.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.publications {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.year-section.collapsed .publications {
    max-height: 0;
}

.publication {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.publication:last-child {
    border-bottom: none;
}

.pub-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.4;
}

.pub-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s;
}

.pub-title a:hover {
    color: #3498db;
}

.pub-authors {
    color: #555;
    margin-bottom: 6px;
    font-size: 0.95em;
}

.pub-authors .me {
    font-weight: 600;
    color: #2c3e50;
}

.pub-venue {
    color: #6c757d;
    font-style: italic;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.pub-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.pub-link {
    display: inline-block;
    padding: 4px 12px;
    background: #e9ecef;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85em;
    transition: background 0.2s;
}

.pub-link:hover {
    background: #3498db;
    color: white;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.5em;
    }

    .year-title {
        font-size: 1.1em;
    }
}