:root {
  card-w: min(46rem, 92vw);
  pad: 15px;
  radius: 16px;             /* ← semicolon */
}

body{
    font-family: Segoe UI, system-ui, -apple-system, Arial, sans-serif;
    font-family: Segoe, sans-serif;
    font-size: clamp(1rem, 1.5vw, 2rem); 
    margin: 0;                         /* Reset margin (not just top) */
    padding-top: 5px;                /* Replace margin-top for consistency */
    width: 100%;                      
    color: #222222;
    min-height: 100vh;
    background: linear-gradient(180deg, #fafafa 0%, #e0f7fa 100%);

}

.avatar {
    width: 50px;       /* adjust to fit your layout */
    height: 50px;
    border-radius: 50%; /* makes it perfectly round */
    object-fit: cover;  /* ensures it fills the circle without distortion */
    border: 2px solid #ccc; /* optional: adds a thin border */
    margin-top: 10px;
}

/* for logo and avatar*/
.header {
  background: transparent;
  display: flex;
  margin-top: 1px; ;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}


.header img {
    width: clamp(4rem, 8vw, 6rem);
    height: auto;
    border-radius: 50%;
}


.title{
    width: clamp(20rem, 80vw, 55rem); 
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    font-size: clamp(1.8rem, 3vw, 3rem); 
    font-weight: bold; 
    margin-top: clamp(.8rem, 1vh, 0.5rem);
    z-index: 1;
}

.login{
    width: clamp(20rem, 80vw, 55rem); 
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    font-size: clamp(1.2rem, 2vw, 1.3rem); 
    margin-top: 10px;
    z-index: 1;
}

.wrap{
    /*min-height: 100vh;  from top */
    display: grid;
    place-items: center;
    padding: 24px;
  }

.row{
    display: grid;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
  }

/* stack on mobile, two columns on wider screens */
@media (min-width: 900px){
.row{
  display: grid;
  grid-template-columns: 1fr; /* always one column */
  gap: 20px;
  width: 100%;
  width: clamp(20rem, 80vw, 55rem);
}
    
}

.card{
    display: grid;
    grid-template-columns: 15% 85%;
    align-items: start;   /* 👈 aligns grid items to the top */
    column-gap: 6px;
    width: clamp(20rem, 80vw, 50rem);
    margin-left: auto;
    margin-right: auto;
    margin-top: 3px;
    /*grid-template-columns: 20% 1fr; only the first is set*/
    padding: 5px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    transform: translateZ(0);
    opacity: 0;               /* start hidden; animation will set to 1 */
  }

.card img{
    width: clamp(3rem, 8vw, 7rem);
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 12px;
    margin-left: 3px;
    border: 1px solid #e1e1e1;
  }
.card img:hover{
    background: #cfcfcf;     /* change color */
    color: white;              /* change text color */
    border: black;
    transform: scale(1.05);    /* slightly larger */
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.3), inset 0 4px 18px rgba(0, 0, 10, 0.1);
}

.card-text {
    align-self: start;  /* 👈 overrides for this item only */
}
  .card h2{
    margin: 0 0 6px 0;
    font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  }
  .card p{
    margin: 0;
    line-height: 1.2;
    color: #333;
    font-size: clamp(.95rem, 1.8vw, 1.6rem);  /* grammar font */
  }

  /* hover lift */
  .card:hover{
    background: #e9e9e9;
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(193,193, 225, .12);
  }

  /* Slide-in animations */
  @keyframes slideInLeft {
    from { transform: translateX(-110%); opacity: 0; }
    to   { transform: translateX(0);      opacity: 1; }
  }
  @keyframes slideInRight {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
  }

  /* Assign animations */
  .from-left  { animation: slideInLeft  .7s ease-out forwards; }
  .from-right { animation: slideInRight .7s ease-out forwards; }

  /* Small entrance delay so they don’t hit at the exact same time */
  .from-left  { animation-delay: .12s; }
  .from-right { animation-delay: .28s; }

  /* Accessibility: respect reduced motion */
  @media (prefers-reduced-motion: reduce){
    .card, .from-left, .from-right{
      animation: none !important;
      opacity: 1;
      transform: none;
    }
    .card:hover{ transform: none; }
  }
  
  
  /*page navigation button */
.button-bar {
  background: transparent;
  display: flex;
  margin-top: clamp(4rem, 10vh, 8rem); 
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}

.button-bar button{
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.linkButton {
    padding: 12px 30px;
    background-color: #9b4e00;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    animation: pulse 1.2s infinite;
}
