* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  font-family: 'Poppins', sans-serif;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  height: 100vh;
  background: #FFF6F4;
  color: #4A3267;
  perspective: 1000px;
}

/* Book Container */
.book-container {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
  background: #FFF6F4;
  padding-top: 20px;
}

.book {
  position: relative;
  width: 90vw;
  max-width: 1200px;
  height: 80vh;
  transform-style: preserve-3d;
  transition: transform 0.8s ease-in-out;
}

/* Chapter Indicator - Fixed positioning and styling */
.chapter-indicator {
  position: fixed;
  top: 50%;
  right: 120px;
  transform: translateY(-50%);
  background: #4A3267;
  color: #FFF6F4;
  padding: 15px 12px;
  border-radius: 15px 0 0 15px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 1.4rem;
  font-weight: 600;
  z-index: 1001;
  transition: all 0.3s ease;
  border: 2px solid #DE628A;
  min-width: 40px;
  text-align: center;
}

.chapter-indicator:hover {
  padding-left: 20px;
  background: #DE628A;
  color: #FFF6F4;
}

/* Page Styles - Fixed transforms and positioning */
.page {
  position: absolute;
  width: 100%;
  height: 100%;
  background: #FFF6F4;
  border-radius: 15px;
  box-shadow: 0 15px 40px rgba(74, 50, 103, 0.3);
  transform-style: preserve-3d;
  transform-origin: left center;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: grab;
  overflow: hidden;
  will-change: transform;
  z-index: 10;
  border: 2px solid #DE628A;
}

.page:active {
  cursor: grabbing;
}

.page.dragging {
  transition: none;
  cursor: grabbing;
}

.page.flipped {
  transform: rotateY(-180deg);
  z-index: 1;
}

.page.flipping {
  transform: rotateY(-90deg);
  z-index: 10;
}

/* Page Content - Fixed overflow and spacing */
.page-content {
  padding: 40px 25px 25px 25px;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  color: #4A3267;
  position: relative;
  z-index: 2;
  overflow-y: auto;
  overflow-x: hidden;
  word-wrap: break-word;
  box-sizing: border-box;
}

.scrollable-content {
  height: 100%;
  overflow-y: auto;
  padding-right: 10px;
}

.scrollable-content::-webkit-scrollbar {
  width: 8px;
}

.scrollable-content::-webkit-scrollbar-track {
  background: rgba(74, 50, 103, 0.1);
  border-radius: 10px;
}

.scrollable-content::-webkit-scrollbar-thumb {
  background: #DE628A;
  border-radius: 10px;
}

.scrollable-content::-webkit-scrollbar-thumb:hover {
  background: #4A3267;
}

.page-front, .page-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 15px;
}

.page-back {
  transform: rotateY(180deg);
  background: #FFF6F4;
}

.page-back-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

.page-back-content h2 {
  font-size: 2.4rem;
  color: #4A3267;
  margin-bottom: 2rem;
  font-weight: 600;
}

.back-ornament {
  font-size: 3rem;
  color: #DE628A;
  animation: pulse 2s ease-in-out infinite;
}

/* Professional Cover Page - Fixed layout and proportions */
.professional-cover {
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 30px 20px 15px 20px;
  background: #4A3267;
  color: #FFF6F4;
  text-align: center;
  overflow-y: auto;
  box-sizing: border-box;
}

.cover-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
  width: 100%;
}

.cover-image-container {
  margin-bottom: 1.5rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.cover-image {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 4px solid #FFF6F4;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  object-fit: cover;
  object-position: center top;
}

.cover-title-section {
  text-align: center;
  width: 100%;
}

.cover-name {
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: #FFF6F4;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.1;
}

.cover-role {
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: #FFF6F4;
  opacity: 0.9;
}

.cover-education {
  font-size: 1.4rem;
  color: #FFF6F4;
  opacity: 0.8;
  margin-bottom: 0.8rem;
}

.cover-availability {
  font-size: 1.2rem;
  color: #FFF6F4;
  opacity: 0.9;
  background: rgba(222, 98, 138, 0.3);
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  display: inline-block;
  border: 1px solid #FFF6F4;
  margin-bottom: 1rem;
}

.cover-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin: 1rem 0;
  max-width: 100%;
  width: 100%;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: #DE628A;
  padding: 1.2rem;
  border-radius: 12px;
  border: 2px solid #FFF6F4;
  min-height: 70px;
  transition: all 0.3s ease;
}

.highlight-item.featured-highlight {
  background: #DE628A;
  color: #FFF6F4;
  border: 3px solid #FFF6F4;
  box-shadow: 0 8px 25px rgba(222, 98, 138, 0.4);
  transform: scale(1.08);
  padding: 1.5rem;
  min-height: 80px;
}

.highlight-item:hover {
  transform: translateY(-3px) scale(1.02);
}

.highlight-item.featured-highlight:hover {
  transform: translateY(-3px) scale(1.1);
}

.highlight-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.highlight-text {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  word-wrap: break-word;
}

.featured-highlight .highlight-text {
  font-size: 1.3rem;
  font-weight: 700;
}

.cover-cta {
  text-align: center;
  margin-top: auto;
  padding-top: 1rem;
}

.cta-text {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: #FFF6F4;
  opacity: 0.9;
}

.cta-arrow {
  font-size: 1.2rem;
  color: #FFF6F4;
  animation: pulse 2s ease-in-out infinite;
}

/* Typography - Fixed sizes and spacing */
.chapter-title {
  font-size: 2.8rem;
  color: #4A3267;
  margin-bottom: 2rem;
  font-weight: 700;
  border-bottom: 3px solid #DE628A;
  padding-bottom: 1rem;
}

.section-title {
  font-size: 2.2rem;
  color: #4A3267;
  margin-bottom: 1.5rem;
  font-weight: 600;
  border-left: 4px solid #DE628A;
  padding-left: 1rem;
}

.story-content {
  font-size: 1.4rem;
  line-height: 1.7;
  color: #4A3267;
}

.story-content h3 {
  color: #4A3267;
  font-size: 1.8rem;
  margin: 2rem 0 1rem 0;
  font-weight: 600;
}

.story-content p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

.intro-text {
  font-size: 1.6rem;
  font-weight: 500;
  color: #4A3267;
  background: rgba(222, 98, 138, 0.1);
  padding: 2rem;
  border-radius: 10px;
  border-left: 4px solid #DE628A;
  margin-bottom: 2rem;
}

/* Content Cards - Fixed styling */
.content-card {
  background: #FFF6F4;
  border: 2px solid #DE628A;
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  overflow: hidden;
  word-wrap: break-word;
}

.content-card.featured {
  border-color: #4A3267;
  background: rgba(222, 98, 138, 0.05);
}

.content-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(222, 98, 138, 0.3);
}

.content-card h3 {
  color: #4A3267 !important;
  font-size: 1.8rem !important;
  margin-bottom: 0.8rem !important;
  word-wrap: break-word !important;
  line-height: 1.3 !important;
}

.content-meta {
  color: #DE628A;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
}

.content-description {
  color: #4A3267;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}

.content-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.content-link {
  display: inline-block;
  background: #DE628A;
  color: #FFF6F4;
  padding: 0.8rem 1.5rem;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.content-link:hover {
  background: #4A3267;
  transform: translateY(-2px);
}

.content-link.secondary {
  background: #4A3267;
}

.content-link.secondary:hover {
  background: #DE628A;
}

/* Interactive buttons */
.section-button {
    display: inline-block;
    background: #4A3267;
    color: #FFF6F4;
    padding: 1.2rem 2.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1.4rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #DE628A;
    margin: 0.5rem;
}

.section-button:hover {
    background: #DE628A;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(74, 50, 103, 0.3);
    color: #FFF6F4;
}

/* Metrics and Tags */
.metric {
  background: #DE628A;
  color: #FFF6F4;
  padding: 0.6rem 1.1rem;
  border-radius: 20px;
  font-size: 1.1rem;
  font-weight: 500;
  display: inline-block;
  margin: 0.3rem;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.skill-category {
  background: rgba(222, 98, 138, 0.1);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.skill-category:hover {
  transform: translateY(-5px);
  border-color: #DE628A;
  background: rgba(222, 98, 138, 0.15);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #DE628A;
}

.languages-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin: 2rem 0;
}

.lang-tag {
  background: #4A3267;
  color: #FFF6F4;
  padding: 0.6rem 1.1rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.lang-tag:hover {
  background: #DE628A;
  transform: translateY(-2px);
}

/* Media */
.media-container {
    margin: 1.5rem auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(222, 98, 138, 0.3);
    max-width: 600px;
    border: 2px solid #DE628A;
    display: block;
}

.media-container video, .media-container img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    display: block;
}

.media-container video {
    max-height: 250px;
}

.media-description {
  background: #DE628A;
  padding: 1rem;
  text-align: center;
  color: #FFF6F4;
  font-size: 1.1rem;
}

/* Contact Page */
.contact-final {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  text-align: center;
  background: #4A3267;
  color: #FFF6F4;
}

.contact-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #FFF6F4;
}

.contact-subtitle {
  font-size: 1.6rem;
  margin-bottom: 3rem;
  color: #FFF6F4;
  opacity: 0.9;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.contact-method {
  background: #DE628A;
  padding: 2rem;
  border-radius: 15px;
  transition: all 0.3s ease;
  border: 2px solid #FFF6F4;
}

.contact-method.primary {
  border: 3px solid #FFF6F4;
  background: #DE628A;
  color: #FFF6F4;
}

.contact-method:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(255, 246, 244, 0.3);
}

.contact-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.contact-method h3 {
  color: #FFF6F4;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.contact-method.primary h3 {
  color: #FFF6F4;
}

.contact-method p {
  color: #FFF6F4;
  opacity: 0.8;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.contact-method.primary p {
  color: #FFF6F4;
  opacity: 0.9;
}

.contact-btn {
  display: inline-block;
  background: #FFF6F4;
  color: #4A3267;
  padding: 1rem 2rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid #FFF6F4;
}

.contact-btn:hover {
  background: #4A3267;
  color: #FFF6F4;
  transform: translateY(-2px);
}

.availability-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  font-size: 1.4rem;
  color: #FFF6F4;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #DE628A;
  animation: pulse 2s ease-in-out infinite;
}

.closing-message {
  max-width: 600px;
  margin: 0 auto;
}

.closing-message blockquote {
  font-size: 1.6rem;
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #FFF6F4;
  opacity: 0.9;
}

.closing-message cite {
  color: #FFF6F4;
  font-weight: 600;
}

/* Navigation - Fixed header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 5%;
  background: #4A3267;
  z-index: 1000;
  border-bottom: 2px solid #DE628A;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 2.4rem;
  color: #FFF6F4;
  font-weight: 700;
  transition: 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
  color: #DE628A;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: #FFF6F4;
  font-size: 1.4rem;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  transition: all 0.3s ease;
  display: block;
  opacity: 0.9;
}

.nav-link:hover {
  background: #DE628A;
  transform: translateY(-2px);
  color: #FFF6F4;
  opacity: 1;
}

/* Page Controls - Fixed positioning */
.page-controls {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  z-index: 1000;
}

.page-btn {
  padding: 12px 24px;
  background: #4A3267;
  color: #FFF6F4;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1.3rem;
  transition: all 0.3s ease;
  border: 2px solid #DE628A;
}

.page-btn:hover {
  background: #DE628A;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(222, 98, 138, 0.4);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Page Indicators - Fixed positioning */
.page-indicators {
  position: fixed;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(222, 98, 138, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid #DE628A;
}

.indicator.active {
  background: #DE628A;
  transform: scale(1.3);
  box-shadow: 0 0 15px rgba(222, 98, 138, 0.6);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .book {
    width: 95vw;
    height: 85vh;
  }

  .cover-highlights {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .chapter-indicator {
    right: 10px;
    font-size: 1rem;
  }
}

@media (max-width: 1024px) {
  .cover-highlights {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .highlight-item {
    padding: 1rem;
    min-height: 60px;
  }

  .highlight-text {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .page-content {
    padding: 15px;
  }

  .professional-cover {
    padding: 10px 15px;
  }

  .cover-name {
    font-size: 2.6rem;
  }

  .cover-image {
    width: 200px;
    height: 200px;
  }

  .chapter-title {
    font-size: 2.2rem;
  }

  .nav-menu {
    flex-direction: column;
    gap: 1rem;
  }

  .page-controls {
    bottom: 20px;
  }

  .page-indicators {
    right: 15px;
  }
  
  .chapter-indicator {
    right: 80px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .content-links {
    flex-direction: column;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cover-highlights {
    grid-template-columns: 1fr;
    margin: 0.8rem 0;
  }

  .highlight-item {
    padding: 0.8rem;
    gap: 0.8rem;
  }

  .highlight-text {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .cover-image {
    width: 180px;
    height: 180px;
  }

  .cover-name {
    font-size: 2.2rem;
  }

  .content-card {
    padding: 1.5rem;
  }

  .highlight-item {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
    gap: 0.5rem;
  }

  .highlight-text {
    font-size: 0.9rem;
  }

  .professional-cover {
    padding: 8px 12px;
  }
}