:root {
    --paper: #ffffff;
    --ink: #1f1f1f;
    --muted: #6b6b6b;
    --accent: #3a6ea5;
    --shadow: 0 20px 40px rgba(0,0,0,0.08);
  }

  * {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }

  header {
    padding: 4rem 1rem 2rem;
    text-align: center;
  }

  header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
  }

  header p {
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto;
  }

  main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem 6rem;
    display: flex;
    flex-direction: column;
    gap: 6rem;
  }


.zigzag {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

/* Put odd items in left column */
.card:nth-child(odd) {
  grid-column: 1;
}

/* Put even items in right column */
.card:nth-child(even) {
  grid-column: 2;

  /* THIS creates the diagonal offset */
  transform: translateY(30%);
}

  /* Gallery Row */
  .poster-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    
        filter: none;
        transition: filter 0.3s ease;
  }

  .poster-row.reverse {
    direction: rtl;
  }

  .poster-row.reverse > * {
    direction: ltr;
  }

  /* Poster */
  .poster {
    position: relative;
    background: var(--paper);
    aspect-ratio: 3 / 4;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease;
  }

  .poster:hover{
    cursor: pointer;
    transform: scale(1.1);
    box-shadow: 0 16px 40px rgba(0,0,0,0.18);

  }

  .poster:hover .enlarge-btn {
      background: var(--secondary-light);
  }

  .poster img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .enlarge-btn {
    position: absolute;
    top: 8px;
    right: 8px;
  
    width: 32px;
    height: 32px;
  
    background: var(--secondary);
    color: #fff;
    border: none;
    border-radius: 4px;
  
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
  
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .enlarge-btn:hover {
    background: var(--secondary-light);
  }

  
  /* Hover Hotspots */
  .hotspot {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.9);
    background: rgba(58,110,165,0.25);
    cursor: pointer;
  }

  .hotspot::after {
    content: attr(data-info);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #000;
    padding: 0.75rem 1rem;
    width: 220px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-size: 0.85rem;
  }

  .hotspot:hover::after {
    opacity: 1;
  }

  /* Info Card */
  .info-card {
    background: var(--bg-light);
    padding: 1rem 2rem 1rem 2rem;
    box-shadow: var(--shadow);
    border-radius: 0 0 32px 32px;
    overflow: hidden;
  }

  .info-card h2 {
    margin-top: 0;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .info-card .authors {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
  }

  .info-card p {
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    margin-top:0;
  }

  .info-card .tags {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .tag {
    font-size: 0.75rem;
    background: #eef2f7;
    color: var(--accent);
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
  }


  .conference-tag {
    font-size: 0.8rem;
    background: var(--secondary);
    color: var(--bg-light);
    padding: 0.3rem 0.6rem;
    margin-bottom: 1rem;
    border-radius: 999px;   
      display: table;
    margin-left:auto;

  }


  .info-card a {
  text-decoration: none;
   color: var(--bg-light);
  }

  .paper-tag {
    font-size: 0.7rem;
    background: var(--primary);
    color: var(--bg-light);
    padding: 0.3rem 0.6rem;
    border-radius: 999px;  
    margin-bottom: 1rem;
    display: table;
    cursor: pointer;   
    transition: transform 0.3s ease; 
    
  }
  .paper-tag b{
transform: translateY(-15%);
  }

  .paper-tag:hover {
    transform: scale(1.1);
    box-shadow: 0 16px 40px rgba(0,0,0,0.18); 
  }

  .paper-icon svg{
    width:16px;
    fill:var(--bg-light);
    transform: translateY(25%);
  }



/* Modal */
.modal {
        padding-top: 0px;
        box-sizing: border-box;
    display: none;
    position: fixed;
    z-index: 999;
  
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
  }
  
  .modal-content {
    opacity: 1;
    max-width: 90%;
    max-height: 90%;
  }

  body.modal-open {
    overflow: hidden;
  }
  

  body.modal-open .poster-row {
    filter: blur(6px);
    transition: filter 0.3s ease;
  }
  
  
  /* Close button */
  .close-btn {
    position: absolute;
    top: 60px;
    right: 30px;
  
    font-size: 40px;
    color: white;
    cursor: pointer;
  }
  









  /* Responsive */
  @media (max-width: 900px) {
    .poster-row,
    .poster-row.reverse {
      grid-template-columns: 1fr;
      gap: 2rem;
    }
  }

  /* ================= MOBILE POSTER LAYOUT ================= */

@media (max-width: 900px) {

  .zigzag {
    grid-template-columns: 1fr; /* switch to single column */
    gap: 40px;
  }

  /* reset manual column placement */
  .card:nth-child(odd),
  .card:nth-child(even) {
    grid-column: auto;
  }

  /* remove the zigzag offset */
  .card:nth-child(even) {
    transform: none;
  }

  /* make poster a bit smaller for phones */
  .poster {
    max-width: 500px;
    margin: 0 auto;
  }

  /* keep info card aligned */
  .info-card {
    max-width: 500px;
    margin: 0 auto;
  }

}

@media (max-width: 600px) {
  .poster {
    aspect-ratio: 2 / 3;
  }
}