html,
:root {
    --bg-color: rgb(20, 20, 20);
  }
  @view-transition {
    navigation: auto;
  }
  
  body {
    align-items: center;
    background-color: var(--bg-color);
    display: flex;
    height: 80vh;
    justify-content: center;
    margin: 0px;
    padding: 0px;
  }
  
  #cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;  
    max-width: 916px;
    width: calc(100% - 20px);
  }

  .cards{
    container: cardbox / size;
  }

  /*making container for cards*/

  .header{
    width: 300px
  }
  
  #cards:hover > .githubcard::after,
  #cards:hover > .card::after {
    opacity: 1;
  }
  
  .githubcard,
  .card {
    background-color: rgba(154, 154, 154, 0.056);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    height: 260px;
    flex-direction: column;
    position: relative;
    width: 300px;  
  }

  .videocard { 
    opacity: 0.5;
    width: 250%;
    justify-content: center;
  }



  .githubcard:hover::before,
  .card:hover::before {
    opacity: 1;
  }
  

  .githubcard::before,
  .githubcard::after,
  .card::before,
  .card::after {
    border-radius: inherit;
    content: "";
    height: 100%;
    left: 0px;
    opacity: 0;
    position: absolute;
    top: 0px;
    transition: opacity 500ms;
    width: 100%;
  }
  
  .githubcard::before,
  .card::before {
    background: radial-gradient(
      800px circle at var(--mouse-x) var(--mouse-y), 
      rgba(255, 255, 255, 0.162),
      transparent 40%
    );
    z-index: 3;
  }
  
  .githubcard::after,
  .card::after {  
    background: radial-gradient(
      600px circle at var(--mouse-x) var(--mouse-y), 
      rgba(255, 255, 255, 0),
      transparent 40%
    );
    z-index: 1;
  }
  
  .githubcard > .card-content,
  .card > .card-content {
    background-color: var(--card-color);
    border-radius: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    inset: 1px;
    padding: 10px;
    position: absolute;
    z-index: 2;
  }
  
  /* -- ↓ ↓ ↓ extra card content styles ↓ ↓ ↓ -- */
  
  h1, h2, h3, h4, span {
    color: rgb(0, 0, 0);
    font-family: "Rubik", sans-serif;
    font-weight: 400;
    margin: 0px;
  }
  
  i {  
    color: rgb(240, 240, 240);
  }
  
  .card-image {
    align-items: center;
    display: flex;
    height: 140px;
    justify-content: center;
    overflow: hidden;
  }
  
  .card-image > i {
    font-size: 6em;
    opacity: 0.25;
  }
  
  .card-info-wrapper {
    align-items: center;
    display: flex;
    flex-grow: 1;
    justify-content: flex-start;
    padding: 0px 20px;
  }
  
  .card-info {
    align-items: flex-start;
    display: flex;
    gap: 10px;
  }
  
  .card-info > i {  
    font-size: 1em;
    height: 20px;
    line-height: 20px;
  }
  
  .card-info-title > h3 {
    font-size: 1.1em;
    line-height: 20px;
  }
  
  .card-info-title > h4 {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85em;
    margin-top: 8px;
    overflow: hidden;
    white-space: nowrap;
    width: 0%;
    transition: width 1s linear;

  }




  .githubcard > .card-content > .card-info-wrapper > .card-info > .card-info-title > h4 {
    border-right: 1px solid rgba(0, 0, 0, 0.683);
    animation: blink 1s step-end infinite;
  }

  .githubcard:hover .card-info-title > h4 {
    width: 100%;
    animation: blink 1s step-end infinite;
  }

  .card:hover .card-info-title > h4 {
    width: 100%;
  }

  @keyframes typing {
    from { width: 0%; }
    to { width: 100%; }
  }

  @keyframes reversetyping {
    from { width: 100%; }
    to { width: 0%; }
  }

  @keyframes blink {
    50% { border-color: transparent; }
  }
  
  /* -- ↓ ↓ ↓ some responsiveness ↓ ↓ ↓ -- */
  @media (width < 963px) or (orientation: portrait){
    body {
      align-items: center;
      background-color: var(--bg-color);
      display: flex;
      margin: 0px;
      justify-content: center;
      align-items: start;
      padding: 0px;

    }
    
    #cards {
      display: flex;
      flex-wrap: wrap;
      flex-flow: column;
      justify-content: center;
      align-items: center;
      gap: 8px;  
      height: auto;
    }


    .githubcard,
    .card {
      background-color: rgba(154, 154, 154, 0.056);
      border-radius: 10px;
      cursor: pointer;
      display: flex;
      height: 30vh;
      flex-direction: column;
      position: relative;
      width: 65vw;  
    }

    .card-info > i {  
      font-size: 3em;
      height: 20px;
      line-height: 20px;
    }
    
    .card-info-title > h3 {
      font-size: 2.5em;
      line-height: 20px;
    }
    
    .card-info-title > h4 {
      color: rgba(255, 255, 255, 0.5);
      font-size: 2em;
      margin-top: 8px;
      overflow: hidden;
      white-space: nowrap;
      width: 0%;
      transition: width 1s linear;
  
    }
  
  
  
  
    .githubcard > .card-content > .card-info-wrapper > .card-info > .card-info-title > h4 {
      border-right: 1px solid rgba(0, 0, 0, 0.683);
      animation: blink 1s step-end infinite;
    }

    .card-image {
      align-items: center;
      display: flex;
      height: 140px;
      justify-content: center;
      flex-grow: 1;
      overflow: hidden;
    }
    
    .card-image > i {
      font-size: 6em;
      opacity: 0.25;
    }
    
    .card-info-wrapper {
      align-items: center;
      display: flex;
      justify-content: flex-start;
      padding: 0px 20px;
    }
  

  }


