* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body, html {
    width: 100%;
    height: 100%;
    background: #0c0c0c;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Cinzel', serif;
  }
  
  .book-wrapper {
    perspective: 2000px;
    width: 100%;
    max-width: 100%;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  
  .book {
    position: relative;
    width: 800px;
    height: 600px;
    transform-style: preserve-3d;
    transition: transform 1.5s ease;
  }
  
  .book.flip {
    transform: rotateY(-180deg);
  }
  
/* Flip only this! */
   .book-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 2;
    transform-origin: left;
    transform-style: preserve-3d;
    transition: transform 1.5s ease;
    background: linear-gradient(135deg, #1a1a1a, #2b2b2b);
    border: 8px solid #111;
    border-radius: 10px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
    overflow: hidden;
  }

  .book-page {
    position: absolute;
    width: 1000px;
    height: 700px;
    transform-origin: left;
    transform-style: preserve-3d;
    transition: transform 1s ease;
    pointer-events: none;
  }
  
  .profile-container {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  
  .profile-photo img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #888;
    box-shadow: 0 0 20px rgba(255, 223, 128, 0.3);
  }
  
  .profile-info {
    flex: 1;
    min-width: 250px;
  }
  
  .profile-name {
    font-size: 2rem;
    color: #f9e18b;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 5px #c9a227;
  }
  
  .personal-details {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1rem;
  }
  
  .personal-details li {
    margin-bottom: 0.3rem;
    color: #f5eec7;
  }
  
  .skills h3 {
    margin-bottom: 0.5rem;
    color: #c9a227;
  }
  
  .skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .skill-tags span {
    background: #2b2b2b;
    color: #f5eec7;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.95rem;
    border: 1px solid #444;
    box-shadow: 0 0 5px rgba(249, 225, 139, 0.2);
  }
  
  .profile-intro p {
    font-style: italic;
    font-size: 1rem;
    color: #e0d4b7;
    line-height: 1.6;
    border-top: 1px dashed #555;
    padding-top: 1rem;
    text-align: center;
  }
  

  .book-page .page-front,
  .book-page .page-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background: #1a1a1a;
    color: #f5eec7;
    padding: 2rem;
    box-shadow: inset 0 0 30px rgba(255, 223, 128, 0.1);
  }
  
  .book-page .page-back {
    transform: rotateY(180deg);
  }
  
  .book-page.flipped {
    transform: rotateY(-180deg);
  }
  
  
  .book-cover.opened {
    transform: rotateY(-180deg);
  }

  .book-spine {
    width: 80px;
    background: linear-gradient(to right, #0d0d0d, #1c1c1c);
    box-shadow: inset -4px 0 8px rgba(0, 0, 0, 0.8);
  }
  
  .book-front {
    flex: 1;
    background: radial-gradient(circle at center, #2a2a2a 0%, #0f0f0f 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    position: relative;
  }
  
  .book-front::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 4px solid #222;
    border-radius: 10px;
    pointer-events: none;
  }
  
  .book-front h1 {
    font-size: 3.5rem;
    color: #f9e18b;
    letter-spacing: 2px;
    text-shadow:
      0 0 10px #f9e18b,
      0 0 20px #f4d35e,
      0 0 30px #c9a227;
    margin-bottom: 2.5rem;
  }
  
  #open-book-btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    background: #1a1a1a;
    color: #f9e18b;
    border: 2px solid #444;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(249, 225, 139, 0.3);
  }
  
  #open-book-btn:hover {
    background: #292929;
    border-color: #777;
    box-shadow: 0 0 15px rgba(249, 225, 139, 0.6);
  }
  
  /* Inner pages now show behind the cover */
  .book-inner {
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
  }
  
  .left-page {
    width: 90%;
    height: 100%;
    background: #111;
    color: #f5eec7;
    font-family: 'Cinzel', serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    border: 2px solid #2b2b2b;
    border-radius: 10px;
    box-shadow: inset 0 0 30px rgba(255, 223, 128, 0.1);
    overflow-y: auto;
  }
  
  
  .left-page h2, .right-page h2 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: #3e2e1c;
    margin-bottom: 1rem;
  }
  
  .book-container {
    width: 1000px;
    height: 700px;
    max-width: 100%;
    max-height: 90vh;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1.5s ease;
  }
  

  #close-book-btn {
    margin-top: 2rem;
    padding: 0.7rem 1.4rem;
    font-size: 1rem;
    background: #3a2e1c;
    color: #f9e18b;
    border: 2px solid #444;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(249, 225, 139, 0.2);
  }
  
  #close-book-btn:hover {
    background: #513f28;
    box-shadow: 0 0 15px rgba(249, 225, 139, 0.4);
  }
  
  .left-page {
    background: #1a1a1a;
    color: #f5eec7;
    font-family: 'Cinzel', serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    border-right: 2px solid #2b2b2b;
  }
  
  /* Profile Image */
  .profile-img img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #888;
    box-shadow: 0 0 20px rgba(255, 223, 128, 0.3);
    margin-bottom: 1.5rem;
  }
  
  /* About Text */
  .bio-text {
    font-size: 1rem;
    line-height: 1.7;
    font-style: italic;
    color: #e0d4b7;
    border-top: 1px dashed #444;
    border-bottom: 1px dashed #444;
    padding: 1rem 0;
    margin: 1rem 0;
    text-align: center;
    width: 90%;
  }
  
  /* Stats Section */
  .stats-section {
    width: 100%;
    margin-top: 1rem;
    text-align: left;
  }
  
  .stats-section h3 {
    color: #c9a227;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 5px #000;
  }
  
  .stats-section ul {
    list-style: square;
    padding-left: 1.5rem;
  }
  
  .stats-section li {
    margin: 0.3rem 0;
    font-size: 1rem;
    color: #f9e18b;
  }


  .nav-buttons {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 10;
  }
  
  #close-book-btn {
    margin: 0 auto;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    background: #3a2e1c;
    color: #f9e18b;
    border: 2px solid #444;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(249, 225, 139, 0.2);
  }
  
  #close-book-btn:hover {
    background: #513f28;
    box-shadow: 0 0 15px rgba(249, 225, 139, 0.4);
  }
  
  #prev-page-btn,
  #next-page-btn {
    background: transparent;
    color: #f5eec7;
    font-size: 2rem;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
  }
  
  #prev-page-btn:hover,
  #next-page-btn:hover {
    color: #ffcf70;
  }
  

  .pages {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
  }
  
  .page {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: rotateY(90deg);
    transition: all 0.6s ease-in-out;
    padding-right: 1rem;
    pointer-events: none;
  }
  
  .page.active {
    opacity: 1;
    transform: rotateY(0deg);
    pointer-events: all;
  }

  .flip-book {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 2000px;
  }
  
  .flip-page {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    transition: transform 1s ease;
    z-index: 2;
  }
  
  .flip-page.flipped {
    transform: rotateY(-180deg);
  }
  
  /* Front & back of page */
  .front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    padding: 2rem;
    color: #f5eec7;
    backface-visibility: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
  }
  
  .front {
    z-index: 2;
  }
  
  .back {
    transform: rotateY(180deg);
  }


  .profile-tiles {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
  }
  
  .tile {
    width: 180px;
    height: 230px;
    background: #1b1b1b;
    border: 2px solid #444;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #f9e18b;
    box-shadow: 0 0 10px rgba(255, 223, 128, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
  }
  
  .tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
    transition: filter 0.3s ease;
  }
  
  .tile-label {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.8);
    padding: 0.5rem;
    font-size: 1rem;
    text-align: center;
    font-weight: bold;
    letter-spacing: 1px;
    border-top: 1px solid #333;
  }
  
  .tile:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 223, 128, 0.4);
  }
  
  .tile:hover img {
    filter: brightness(1);
  }
  
  .skill-tags {
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
 
  @media (max-width: 768px) {
    .book-container,
    .book-cover,
    .book-inner {
      width: 90vw;
      height: 80vh;
    }
  
    .left-page {
      padding: 1.5rem;
    }
  
    .profile-img img {
      width: 100px;
      height: 100px;
    }
  
    .book-front h1 {
      font-size: 2rem;
    }
  
    #open-book-btn,
    #close-book-btn {
      font-size: 0.9rem;
      padding: 0.6rem 1.2rem;
    }
  
    .stats-section h3 {
      font-size: 1.2rem;
    }
  
    .bio-text {
      font-size: 0.95rem;
    }
  }

  @media (max-width: 768px) {
    .book-container, .book-cover, .book-inner, .book-page {
      width: 94vw;
      height: 195vw;
      max-height: unset;
      font-size: 2.5vw !important;
    }
  
    .page-front,
    .page-back {
      padding: 1.5rem;
    }

    h2.profile-name {
      font-size: 2.6vw !important;
    }

    span {
      font-size: 2.6vw !important;
    }

    .profile-intro p {
      font-size: 2.6vw !important;
    }
  
    .tile {
      width: 39%;
      height: 143px;
    }

    .tile-label {
      font-size: 2.6vw !important;
    }

    .profile-container {
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 1rem;
      text-align: center;
      width: 100%;
    }
    
  
    .profile-photo img {
      width: 100px;
      height: 100px;
    }
    
  
    .profile-info {
      width: 100%;
      padding: 0 1rem;
    }
    
  
    .profile-tiles {
      flex-direction: row;
      align-items: center;
      gap: 1rem;
    }
  
    .tile {
      width: 29%;
      height: 161px;
      padding: 0 !important;
    }
  
    .tile-label {
      font-size: 0.95rem;
    }
  
    .profile-intro p {
      font-size: 0.95rem;
      padding: 0 0.5rem;
    }
  
    .stats-section ul {
      padding-left: 1rem;
    }
  
    .nav-buttons {
      flex-direction: row;
      justify-content: space-between;
      padding: 0 1rem;
    }
  
    #prev-page-btn,
    #next-page-btn,
    #close-book-btn {
      font-size: 0.9rem;
    }

    .book-spine {
      width: 32px !important;
    }
  }
  