#art-notebook {
  margin-top: 0rem;
  margin-bottom: 1rem;
  padding-top: 2rem;   /* adjust as needed */
  padding-bottom: 2rem;
}

.art-container-hero {
  max-height: 600px;
  margin-top: 2rem;
}

main {
  margin: 0;
  padding: 0;
}

/* --- Notebook Container --- */
/* Notebook starts hidden below */
.notebook {
  opacity: 0;
  transform: translateY(100px); /* starts 100px lower */
  transition: transform 1s ease-out, opacity 1s ease-out;
}

/* When in view */
.notebook.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Sticky notes start hidden and scaled down */
.sticky-note {
  opacity: 0;
  transform: translateY(-50%) scale(0.8);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

/* Sticky notes visible */
.sticky-note.visible {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* Optional: Tabs slide in one by one */
.tabs .tab {
  opacity: 0;
  transform: translateX(20px);
  transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.tabs .tab.visible {
  opacity: 1;
  transform: translateX(0);
}


.notebook {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  gap: 0;
  margin: -2rem auto;
  margin-bottom: 2rem;
  height: 600px;  /* reasonable notebook height */
  width: 900px;   /* total width including spiral */
}


/* --- Spiral --- */
.spiral {
  position: absolute;      
  top: 50%;                
  left: 135px;               
  transform: translateY(-50%); 
  z-index: 20;             
  height: 100%;      
  width: auto;      
}

.spiral img {
  height: 100%;  
  width: auto;   
  display: block;
}

/* Cover Page of Journal */
.cover-page {
  position: absolute;
  top: 0;
  left: 0;
  width: 600px;   /* same as .pages width */
  height: 100%;   /* match notebook height */
  z-index: 15;    /* behind spiral (20), above pages (2) */
  opacity: 1;
  transform: translateY(50px);  /* start slightly below */
  transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

.cover-page img {
  width: 100%;
  height: 100%;
  object-fit: cover;  /* same as .normal-page */
  display: block;
}

/* Slide up */
.cover-page.slide-up {
  transform: translateY(0);
  opacity: 1;
}

/* Hide after animation */
.cover-page.hide {
  opacity: 0;
  pointer-events: none;
}


/* --- Pages Container --- */
.pages {
  position: relative;
  width: 600px;  /* page width */
  height: 100%;
}

/* --- Individual Page --- */
.page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  visibility: hidden;
  z-index: 1;
}

.page.active {
  visibility: visible;
  z-index: 2;
}

/* --- Page Background --- */
.page-background {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Normal Page Image */
.normal-page {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hotspot on top-right */
.hotspot {
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  cursor: pointer;
  z-index: 5;
}
.hotspot:hover {
  opacity: 1;
}

.hotspot img {
  width: 80px;     /* force display size */
  height: 80px;
  display: block;
}


/* Page Content */
.page-content {
  position: absolute;
  top: 15px;
  left: 40px;
  right: 40px;
  bottom: 0px;
  z-index: 6;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.page-content h2 {
  margin-bottom: 0;
  margin-top: 0;
}

.page-content h3 {
  margin-bottom: 0;
  margin-top: 0;
}
.page-content p {
  margin: 0;
  line-height: 29px;
}

/* Rows for text + image */
.page-row {
  display: flex;
  gap: 20px;
}
.text-section { flex: 1; }
.image-section { flex: 1; }
.image-section img { max-width: 100%; height: auto; }

/* --- Sticky Notes Navigation --- */
.sticky-note {
  position: absolute;
  top: 50%;
  width: 120px;
  height: 80px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  z-index: 1;
  cursor: pointer;
  transform: translateY(-50%) scale(1); 
}
.sticky-note.left { left: -90px; }

.sticky-note.right { right: -90px; }

.sticky-note img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transition: transform 0.2s ease;
  transform-origin: center;
}

.sticky-note:hover {
    transform: translateY(-50%) scale(1.05);
}

/* Notebook-style Tabs */
.tabs {
  position: absolute;
  top: 50px;  
  right: 110px; 
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2; 
}

/* Individual tab */
.tabs .tab {
  width: 80px;   
  height: 80px;  
  border-radius: 0 8px 8px 0; 
  border: none;
  position: relative;
  right: 0; 
  transition: right 0.2s ease, background-color 0.2s ease;
}

/* Active tab: slightly popped out */
.tabs .tab.active {
  right: -20px; /* pops out slightly more than rest */
}

/* Hover effect: tab pops further right */
.tabs .tab:hover {
  right: -15px;
  cursor: pointer;
}

/* Tooltip text on hover */
.tabs .tab::after {
  position: absolute;
  left: 100%;  /* show to right of tab */
  top: 50%;
  transform: translateY(-50%);
  background-color: #fff;
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}


.tabs .tab:hover::after {
  opacity: 1;
  transform: translate(10px, -50%);
}

.tab-intro { background-color: #f2a0e0; }
.tab-toc { background-color: #6fa8dc; }
.tab-hyoo { background-color: #93c47d; }
.tab-ta { background-color: #e06666; }
.tab-usda { background-color: #f6b26b; }
.tab-vol { background-color: #8e7cc3; }


/* Hidden hover text by default */
.tab-hover-text {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(50%);
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 4px 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
}

/* Show hover text when tab hovered */
.tab:hover .tab-hover-text {
  opacity: 1;
  transform: translate(10px, -50%);
}


/* TOC Hover and Click Effects */
.toc-links {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.toc-links li {
  margin: 0.5rem 0;
}

.toc-links a {
  position: relative;
  text-decoration: none;
  color: #6b2aa5;
  font-weight: 500;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

/* underline animation */
.toc-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 0;
  background-color: #6b2aa5;
  transition: width 0.3s ease-in-out;
}

.toc-links a:hover::after,
.toc-links a:focus::after {
  width: 100%;
}

.toc-links a:hover,
.toc-links a:focus {
  color: #541d82;
  outline: none;
}

/* Responsiveness */
@media (max-width: 1100px)  {
  .sticky-note.left {
      opacity: 0;
    }
    .sticky-note.right {
      opacity: 0;
    }
  #lab-notebook {
    margin-right: -4rem;
  }
}
@media (max-width: 830px) {
  #lab-notebook {
    display: flex;
    justify-content: center;
    margin: 0 auto;
  }

  .notebook {
    transform: scale(0.8);   /* scale the whole notebook */
    transform-origin: top center;  /* scale from top so it stays centered */
    width: 95;   /* keep original width for internal layout */
    max-width: 95vw;
    height: 600px;  /* keep original height */
    margin: 2rem auto; 
  }

  .tabs {
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row !important;
    gap: 15px;
    width: 90%;
    justify-content: center;
  }

  .tabs .tab {
    width: 80px !important;   /* wider for mobile */
    min-width: 60px;          /* ensures minimum tappable size */
    height: 90px !important;  /* taller */
    border-radius: 10px;
    right: auto;               /* remove desktop right shift */
    transform: translateY(0);  /* reset transforms */
  }

   /* Active tab pops up vertically */
  .tabs .tab.active {
    transform: translateY(-15px) !important; /* pop up vertically */
    right: auto;
  }

  /* Hover effect on mobile */
  .tabs .tab:hover {
    transform: translateY(-10px) !important;
    right: auto;
  }

  /* Tooltip text adjustments */
  .tab-hover-text {
    top: -35px;       /* move above the tab */
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 100;
  }

   .tab:hover .tab-hover-text {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px); /* slight upward motion */
  }

  /* shift spiral left slightly */
  .spiral {
    display: none;
  }
  
}

  
/* --- Index Course Section --- */
.wrapper-style {
  position: relative;
  width: 100%;
  margin-left: calc(-50vw + 50%);
  margin-top: -2rem;

  background-image: url("images/paper-background.png");
  background-repeat: repeat-x;
  background-position: center top;
  background-size: contain;

  display: block;
  justify-content: center;
  align-items: center;
  background-attachment: scroll;
  padding: 3rem 0;
  border-radius: 12px;
  z-index: 10;
  overflow: visible;
}

.paper-content {
  display: flex;
  padding: 6rem 0rem 10rem;

   /* Animate on scroll */
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.paper-content.visible {
  opacity: 1;
  transform: translateY(0);
}

.card-stack {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 50vh;
  display: flex;
  justify-content: center;
  align-items: center;
  
}

/* Each Card Container */
.card {
  position: absolute;
  width: 700px;
  aspect-ratio: 7 / 4;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  transform-origin: center center;
  transition: all 0.5s ease, opacity 0.5s ease, z-index 0.5s;
  opacity: 0.7;           
  z-index: 1;                
  pointer-events: auto;  
}

/* Show TOC card by default */
#toc-card {
  opacity: 1;
  z-index: 10;
  pointer-events: auto;
}

/* Active card: front and center */
.card.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 20;
  transform: translate(0,0) scale(1) rotate(0deg);
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

/* Stack behind active card */
.card:not(.active) {
  opacity: 0.7;
  pointer-events: none;
  transition: all 0.5s ease;
}

.card.active a {
  pointer-events: auto;
}


/* Background image of index card */
.card-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Card Content over BG Image */
.card-content {
  position: relative;
  z-index: 2;
  width: 90%;
  height: 90%;
  padding: 40px 30px;
  color: #222;
  overflow-y: auto;
  line-height: 26.5px;  
}

.card-content ul {
  margin: 0;
  padding: 0;
  list-style-position: inside;
  list-style-type: disc;
  padding-left: 1.2em;
}

.card-content li {
  margin: 0;
  padding: 0;
  line-height: inherit; /* same as card-content */
  list-style-type: none;
}

/* Titles and Typography */
.card-content h2 {
  margin-top: 0.5rem;
  font-size: 1.5rem;
  text-align: center;
}

.card-content p {
  text-align: center;
  font-size: 1rem;
  color: #555;
}

/* TOC Course Navigation */
.course-nav ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0 0;
  text-align: center;
}

.course-nav li {
  margin: 0.6rem 0;
}

.course-nav a,
.course-btn {
  position: relative;
  text-decoration: none;
  color: #6b2aa5;
  font-weight: 500;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

/* underline animation for hover on nav course and course btn*/
.course-nav a::after,
.course-btn::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 0;
  background-color: #6b2aa5;
  transition: width 0.3s ease-in-out;
}

.course-nav a:hover::after,
.course-btn:hover::after,
.course-nav a:focus::after,
.course-btn:focus::after {
  width: 100%;
}

.course-nav a:hover,
.course-btn:hover,
.course-nav a:focus,
.course-btn:focus {
  color: #541d82;
  outline: none;
}

/* Index Card Stack */
/* Top card is centered */
.card:nth-child(1) {
  transform: translate(0px, 0px) scale(1) rotate(0deg);
  z-index: 8;
  opacity: 1;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Slight fanning with alternating angles */
.card:nth-child(2) {
  transform: translate(-12px, 10px) scale(0.98) rotate(-2deg);
  z-index: 7;
  opacity: 0.92;
  box-shadow: 0 10px 18px rgba(0,0,0,0.12);
}
.card:nth-child(3) {
  transform: translate(8px, 18px) scale(0.96) rotate(2deg);
  z-index: 6;
  opacity: 0.88;
  box-shadow: 0 12px 20px rgba(0,0,0,0.10);
}
.card:nth-child(4) {
  transform: translate(-10px, 26px) scale(0.94) rotate(-1.5deg);
  z-index: 5;
  opacity: 0.84;
  box-shadow: 0 14px 22px rgba(0,0,0,0.09);
}
.card:nth-child(5) {
  transform: translate(12px, 34px) scale(0.92) rotate(1.5deg);
  z-index: 4;
  opacity: 0.8;
  box-shadow: 0 16px 24px rgba(0,0,0,0.08);
}
.card:nth-child(6) {
  transform: translate(-14px, 42px) scale(0.90) rotate(-1deg);
  z-index: 3;
  opacity: 0.75;
  box-shadow: 0 18px 26px rgba(0,0,0,0.07);
}
.card:nth-child(7) {
  transform: translate(10px, 50px) scale(0.88) rotate(2deg);
  z-index: 2;
  opacity: 0.70;
  box-shadow: 0 20px 28px rgba(0,0,0,0.06);
}
.card:nth-child(8) {
  transform: translate(0px, 58px) scale(0.86) rotate(0deg);
  z-index: 1;
  opacity: 0.65;
  box-shadow: 0 22px 30px rgba(0,0,0,0.05);
}


/* X button on the index cards */
.close-card {
  position: absolute;
  top: 30px;
  right: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  font-size: 20px;
  cursor: pointer;
  z-index: 1002;
  width: 36px;       /*  give it a fixed size for a circular button */
  height: 36px;      /* matches width for perfect circle */
  display: flex;     /* center the "X" */
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.15);
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.close-card:hover {
  background: rgba(255, 255, 255, 1);  /* slightly stronger on hover */
  transform: scale(1.1);                /* subtle hover scale effect */
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.2);
}

.prev-card,
.next-card {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  font-size: 20px;
  color: #222;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.15);
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover effect */
.prev-card:hover,
.next-card:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1) translateY(-50%);
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.2);
}

.prev-card {
  top: 50%;
  left: 5px;
  transform: translateY(-50%);
}

.next-card {
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
}

/* Responsiveness Index Card Section */
@media (max-width: 1030px) {
  #lab-notebook {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding-top: 2rem;   /* adjust as needed */
  padding-bottom: 2rem;
  }
}

@media (max-width: 950px) {
  .wrapper-style {
    background-size: cover; /* Fill more of the screen vertically */
    background-position: center top;
    padding: 3rem 1rem; /* Prevent overflow */
  }

  .card-stack {
    transform: scale(1.2); /* Slightly smaller stack */
    flex-wrap: wrap; /* Allow cards to wrap if needed */
    gap: 0.75rem;
  }
}

@media (max-width: 950px) {
  .card {
    width: 70%;
    aspect-ratio: 7 / 4;
  }
  .card-content {
    padding-top: 30px;  /* adjust for smaller card height */
    line-height: 20px;   /* smaller line spacing */
  }
  #lab-notebook {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding-top: 2rem;   /* adjust as needed */
    padding-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  .card-stack {
    justify-content: flex-start; /* moves stack to the left */
    padding-left: 3.5rem;          /* add some spacing from the edge */
  }

  /* slightly reduce width so it fits better */
  .card {
    width: 80%; /* or any % that fits nicely */
  }
  .course-nav a,
  .course-btn {
    font-size: 1rem;
  }
  
}



@media (max-width: 650px) {
  .card-content h2 {
    font-size: 1rem;
  }
  .card-content p {
    font-size: 0.9rem;
  }
  .course-nav a {
    font-size: 0.8rem;
  }
  .card-content, .course-btn {
    padding-top: 20px;
    line-height: 15px;
    font-size: 0.8rem;
  }
  .card-stack {
    padding-left: 3.5rem;
  }
  .card-content {
    max-height: 80%;
  }
}


/* Project Layout Latest */
.latest-projects {
    padding: 60px 20px;
    text-align: center;
    margin-top: -10rem;
}

.latest-projects h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    color: #333;
}

.projects-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.project-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    width: 300px;
    min-width: 250px;
    padding: 20px;
    position: relative;
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
}

.image-wrapper {
    position: relative;
}

.image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

.tape {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    width: 80px;
    height: 20px;
    background: #f6e58d;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.project-card h3 {
    margin: 15px 0 10px;
    font-size: 1.2rem;
    color: #222;
}

.project-card p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    text-decoration: none;
    color: #fff;
    background-color: #6b2aa5;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.3s;
}

.read-more:hover {
    background-color: #541d82;
}

@media (max-width: 980px) {
    .projects-container {
        justify-content: center;
    }
}

@media (max-width: 650px) {
  .project-container {
    flex-direction: column;
    gap: 40px;
    align-items: center;
  }
  .project-card {
    width: 90%;
  }
}


/* Software and Applications */
#software-section {
  text-align: center;
  padding: 60px 20px;
  color: #333;
}

.software-category {
  margin-bottom: 50px;
}

.software-category h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #333;
  position: relative;
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  justify-content: center;
}

.software-card {
  background-color: #ebd5c5;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.software-card:hover {
  transform: scale(1.05);
}

.software-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.software-card h4 {
  margin-top: 10px;
  font-size: 1rem;
  cursor: default;
}

.software-card p {
  font-size: 0.9rem;
  color: #555;
  cursor: default;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .software-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .software-card img {
    width: 50px;
    height: 50px;
  }
}

/* Section container */
#software-section {
  position: relative;
  text-align: center;
  padding: 60px 20px;
  background-color: #fdfaf7;
  color: #333;
  overflow: hidden;
  margin-top: -7.5rem;
}

/* Grid background behind the cards */
#software-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 200%; /* larger so movement doesn’t reveal edges */
  height: 200%;
  background-image: 
    linear-gradient(#ccc 1px, transparent 1px),
    linear-gradient(90deg, #ccc 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.1;
  z-index: 0;
  pointer-events: none;
  animation: move-grid 60s linear infinite;
}

/* Animation: slow diagonal movement */
@keyframes move-grid {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 200px 200px, 200px 200px;
  }
}

/* Ensure the cards stay above the grid */
.software-category {
  position: relative;
  z-index: 1;
}




