* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', miniver;
}

/* ════════════════════════════════════════════
   CSS Custom Properties (Design Tokens)
════════════════════════════════════════════ */
:root {
  --ink:        #1a1a1a;
  --muted:      #666666;
  --faint:      #6f6f6f;
  --serif:      Georgia, 'Times New Roman', serif;
  --sans:       'Poppins', sans-serif;
  --dot-past:   #1e1e1e;
  --dot-now:    chartreuse;
  --dot-future: #c8c8c8;
}

body.dark {
  --ink:        #e0e0e0;
  --muted:      #999999;
  --faint:      #828282;
  --dot-past:   #cccccc;
  --dot-now:    chartreuse;
  --dot-future: #575757;
}

/* ════════════════════════════════════════════
   Page Layout (shared centering wrapper)
════════════════════════════════════════════ */
.page {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}


/* Font Styling Google Fonts */
.poppins-thin {
    font-family: "Poppins", sans-serif;
    font-weight: 100;
    font-style: normal;
  }
  
  .poppins-extralight {
    font-family: "Poppins", sans-serif;
    font-weight: 200;
    font-style: normal;
  }
  
  .poppins-light {
    font-family: "Poppins", sans-serif;
    font-weight: 300;
    font-style: normal;
  }
  
  .poppins-regular {
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
  }
  
  .poppins-medium {
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    font-style: normal;
  }
  
  .poppins-semibold {
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    font-style: normal;
  }
  
  .poppins-bold {
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-style: normal;
  }
  
  .poppins-extrabold {
    font-family: "Poppins", sans-serif;
    font-weight: 800;
    font-style: normal;
  }
  
  .poppins-black {
    font-family: "Poppins", sans-serif;
    font-weight: 900;
    font-style: normal;
  }
  
  .poppins-thin-italic {
    font-family: "Poppins", sans-serif;
    font-weight: 100;
    font-style: italic;
  }
  
  .poppins-extralight-italic {
    font-family: "Poppins", sans-serif;
    font-weight: 200;
    font-style: italic;
  }
  
  .poppins-light-italic {
    font-family: "Poppins", sans-serif;
    font-weight: 300;
    font-style: italic;
  }
  
  .poppins-regular-italic {
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: italic;
  }
  
  .poppins-medium-italic {
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    font-style: italic;
  }
  
  .poppins-semibold-italic {
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    font-style: italic;
  }
  
  .poppins-bold-italic {
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-style: italic;
  }
  
  .poppins-extrabold-italic {
    font-family: "Poppins", sans-serif;
    font-weight: 800;
    font-style: italic;
  }
  
  .poppins-black-italic {
    font-family: "Poppins", sans-serif;
    font-weight: 900;
    font-style: italic;
  }
  
  .miniver-regular {
    font-family: "Miniver", cursive;
    font-weight: 400;
    font-style: normal;
  }

  /* Banner Scroll Animation */

  .scroll-container {
    width: 100%; /* Or any specific width you want */
    overflow: hidden; /* Hides the text outside the container */
    white-space: nowrap; /* Prevents the text from wrapping to a new line */
    box-sizing: border-box;
}

.scroll-text {
    display: inline-block;
    background: chartreuse;
    color: black;
    padding-left: 100%; /* Starts the text off-screen to the right */
    animation: scroll 25s linear infinite; /* Adjust duration (15s) for speed */
}

@keyframes scroll {
    0% {
        transform: translateX(0); /* Initial position */
    }
    100% {
        transform: translateX(-100%); /* Moves the text entirely off-screen to the left */
    }
}

/* Optional: Pause animation on hover */
.scroll-text:hover {
    animation-play-state: paused;
}

  /* Index HTML Styling*/

body {
    margin: 0 auto;
    padding: 0 auto;
    background: rgb(236, 236, 236);
    font-family: 'Poppins, miniver';
}

body.dark {
  background: #121212;
  color: #e0e0e0;
}

/* Navbar Styling */

.navbar {
    display: flex;
    justify-content: space-between;
    margin: 10px 20px 40px 20px;
}

.navbar-logo {
    display: flex;
    justify-content: start;
    width: 90px;
    height: 90px;
    padding: 10px;
    margin: 20px 5px;
    transition: 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.5);
    box-shadow: 0px 0px 8px 8px rgb(red, green, blue);
}

.navbar-menu {
    display: flex;
    flex-direction: row;
    margin: 20px 5px;
    justify-content: space-evenly;
    align-items: center;
    padding: 10px;
    width: auto;
    flex-wrap: wrap;
}

.navbar-items a {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-family: 'Poppins';
    font-size: large;
    font-weight: 700;
    color: rgb(0, 68, 255);
    transition: 0.5s ease;
    padding: 10px;
    width: 100%;
}

.navbar-items a:hover {
    color: black;
    background: chartreuse;
    border-radius: 50px;
}

.navbar-items {
    list-style-type: none;
}

/* Theme Toggle Dark Mode */

.theme-toggle {
  display: flex;
  justify-content: center;
  padding: 5px;
}

#theme-toggle {
  display: flex;
  justify-content: flex-end;
  padding: 10px;
  font-size: 60px;
  border: none;
  background: none;
  margin: 5px auto;
  transition: 0.5s ease;
}

.fa-power-off {
  display: flex;
}

#theme-toggle:hover {
  color: chartreuse;
  border-radius: 30px;
  transform: scale(1.1);
}

body.dark #theme-toggle {
  color: chartreuse;
  transition: 0.5s ease;
}

body.dark #theme-toggle:hover {
  color: blue;
  transform: scale(1.1);
}

body.dark #open-modal {
  border: 2px solid white;
  background: none;
  color: white;
  transition: 0.5s ease;
}

body.dark #open-modal:hover {
  color: chartreuse;
  border: 2px solid chartreuse;
  transform: scale(1.1);
}

/* Modal Dialog */
.modal {
  display: flex;
  justify-content: center;
  margin: 12px auto;
}

#open-modal {
  padding: .5rem;
  border: 2px solid black;
  border-radius: 20px;
  font-size: 15px;
  font-family: 'Helvetica', sans-serif;
  font-weight: 700;
  transition: 0.5s ease;
  color: black;
  background-color: rgb(183, 183, 183);
}

#open-modal:hover {
  background: chartreuse;
  transform: scale(1.1);
}

dialog {
  border: none;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

dialog button {
  color: black;
  background-color: chartreuse;
  border: none;
  border-radius: 20px;
  padding: 6px 12px;
  margin: 20px 30px 20px 0px;
  transition: 0.5s ease;
  border: 2px solid black;
  font-size: 15px;
}

dialog button:hover {
  transform: scale(1.1);
  color: white;
  background-color: blue;
  border: 2px solid grey;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

/* Home page About Section Styling*/
.about {
    display: flex;
    margin: 30px 20px;
    border: 2px solid rgb(224, 224, 224);
    border-radius: 30px;
    padding: 20px;
    justify-content: center;
    box-shadow: 2px 2px 10px 5px rgba(0, 0, 0, 0.046); /* Offset 2px, Blur 10px, Spread 5px, semi-transparent black color */
}

.about-hero {
    display: flex;
    flex-direction: column;
    border: none;
    padding: 10px 20px;
}

.about-title {
    padding: 0px 30px;
    font-size: 50px;
    display: flex;
    justify-content: center;
    text-align: left;
    margin-bottom: 60px;
}

.about-title:hover {
    transform: translateX(25px);
}

.about-description {
    display: flex;
    justify-content: center;
    text-align: left;
    font-family: 'Helvetica', sans-serif;
    padding: 5px 20px;
    font-size: 24px;
    margin-bottom: 60px;
}

.about-btn {
    display: flex;
    justify-content: center;
    font-family: 'Helvetica', sans-serif;
    font-size: 30px;
    font-weight: 500;
    outline: none;
    color: blue;
    padding: 10px 20px;
    border: none;
    width: 100%;
    border-radius: 20px;
    background: transparent;
}

.about-btn a {
    justify-content: center;
    text-decoration: none;
    color: black;
    background-color: chartreuse;
    padding: 10px 20px;
    border: lightgrey;
    border-radius: 50px;
    transition: 0.5s ease;
}

.about-btn a:hover {
    color: whitesmoke;
    background: blue;
}

/* Home page Books Section Styling*/
.books {
  display: flex;
  margin: 30px 20px;
  border: 2px solid rgb(224, 224, 224);
  border-radius: 30px;
  padding: 20px;
  justify-content: center;
  box-shadow: 2px 2px 10px 5px rgba(0, 0, 0, 0.046); /* Offset 2px, Blur 10px, Spread 5px, semi-transparent black color */
}

.books-hero {
  display: flex;
  flex-direction: column;
  border: none;
  padding: 10px 20px;
}

.books-title {
  padding: 0px 30px;
  font-size: 50px;
  display: flex;
  justify-content: center;
  text-align: left;
  margin-bottom: 60px;
}

.books-title:hover {
  transform: translateX(25px);
}

.books-description {
  display: flex;
  justify-content: center;
  text-align: left;
  font-family: 'Helvetica', sans-serif;
  padding: 5px 20px;
  font-size: 24px;
  margin-bottom: 60px;
}

.books-btn {
  display: flex;
  justify-content: center;
  font-family: 'Helvetica', sans-serif;
  font-size: 30px;
  font-weight: 500;
  outline: none;
  color: blue;
  padding: 10px 20px;
  border: none;
  width: 100%;
  border-radius: 20px;
  background: transparent;
}

.books-btn a {
  justify-content: center;
  text-decoration: none;
  color: black;
  background-color: chartreuse;
  padding: 10px 20px;
  border: lightgrey;
  border-radius: 50px;
  transition: 0.5s ease;
}

.books-btn a:hover {
  color: whitesmoke;
  background: blue;
}

/* Temporary About Page styling*/

.about-backbtn-text {
    display: block;
    text-align: center;
    color: blue;
}

.about-backbtn {
    text-decoration: none;
    color: chartreuse;
    background: black;
    padding: 5px;
    border-radius: 20px;
    margin: 5px;
    transition: 0.5s ease;
}

.about-backbtn:hover {
    font-size: 40px;
    color: blue;
    background: whitesmoke;
}

/* Temporary Books Page styling*/

.books-backbtn-text {
  display: block;
  text-align: center;
  color: blue;
}

.books-backbtn {
  text-decoration: none;
  color: chartreuse;
  background: black;
  padding: 5px;
  border-radius: 20px;
  margin: 5px;
  transition: 0.5s ease;
}

.books-backbtn:hover {
  font-size: 40px;
  color: blue;
  background: whitesmoke;
}

/* Life Game Styling */
/* Steps hidden by default */
.step {
  display: none;
  font-family: "Poppins", sans-serif;
}
 
/* Step 1 — flex for vertical centering */
#step1.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
  animation: appear 0.4s ease both;
}
 
/* Step 2 — standard block */
#step2.active {
  display: block;
  animation: appear 0.4s ease both;
}
 
@keyframes appear {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
 
/* ════════════════════════════════════════════
   Step 1 — Entry screen
════════════════════════════════════════════ */
.wordmark {
  font-size: 30px;
  font-weight: 800;
  text-transform: uppercase;
  color: blue;
  margin-bottom: 48px;
  font-family: "Poppins", sans-serif;
}
 
.entry-h {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 18px;
  font-family: "Poppins", sans-serif;
}
 
.entry-h b {
  font-style: none;
  color: var(--muted);
  font-family: "Poppins", sans-serif;
  font-weight: 300;
}
 
.entry-p {
  font-size: 15px;
  color: var(--muted);
  max-width: 380px;
  margin-bottom: 52px;
  line-height: 1.7;
}
 
.field-label {
  display: block;
  font-size: 20px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
}
 
/* ── Date of birth — three selects ── */
.dob-fields {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.dob-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dob-sublabel {
  font-size: 20px;
  color: var(--muted);
  font-family: "Poppins", sans-serif;
  font-weight: 700;
}

.field-select {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--faint);
  color: var(--ink);
  font-family: "Poppins", sans-serif;
  font-size: 20px;
  padding: 8px 28px 12px 0;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
  transition: border-color 0.2s;
  /* Custom chevron arrow */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  min-width: 80px;
}

.field-select:focus {
  border-color: var(--ink);
}

/* Month select is wider */
#dob-month {
  min-width: 130px;
}
 
.go-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0;
  transition: color 0.2s;
}
 
.go-btn:hover:not(:disabled) {
  color: var(--ink);
}
 
.go-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
 
.arrow {
  display: inline-block;
  width: 32px;
  height: 1px;
  background: currentColor;
  position: relative;
  transition: width 0.2s;
}
 
.arrow::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  width: 6px;
  height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}
 
.go-btn:hover:not(:disabled) .arrow {
  width: 44px;
}
 
.note {
  margin-top: 64px;
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.04em;
}
 
/* ════════════════════════════════════════════
   Step 2 — Visualisation
════════════════════════════════════════════ */
#step2 {
  padding-top: 56px;
  padding-bottom: 88px;
}
 
.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 48px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--faint);
  gap: 12px;
  flex-wrap: wrap;
}
 
.topbar-h {
  font-family: "Helvetica Neue", sans-serif;
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 400;
  letter-spacing: -0.01em;
}
 
.topbar-h span {
  color: var(--muted);
  font-style: italic;
}
 
.back {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
  white-space: nowrap;
  font-family: "Helvetica Neue", sans-serif;
}
 
.back:hover {
  color: var(--ink);
}
 
.sec-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
  font-family: "Helvetica Neue", sans-serif;
}
 
/* ── Grid ── */
.grid-section {
  margin-bottom: 48px;
}

.legend {
  display: flex;
  gap: 18px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  font-family: "Helvetica Neue", sans-serif;
}

.leg {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
}

.pip {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}

.grid-outer {
  overflow-x: auto;
}

.grid-caption {
  font-size: 11px;
  color: var(--faint);
  font-family: "Poppins", sans-serif;
  margin-bottom: 14px;
  line-height: 1.6;
}

#grid {
  display: grid;
  gap: 2px;
  position: relative;
  margin-left: 30px;
}

.w {
  aspect-ratio: 1;
  background: var(--dot-future);
}

.w.past {
  background: var(--dot-past);
}

.w.now {
  background: var(--dot-now);
}

.dec-lbl {
  position: absolute;
  left: -28px;
  font-size: 9px;
  color: var(--faint);
  letter-spacing: 0.04em;
  line-height: 1;
  user-select: none;
}
 
/* ── Progress ── */
.prog-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}
 
.prog-track {
  flex: 1;
  height: 1px;
  background: var(--faint);
  position: relative;
  overflow: hidden;
}
 
.prog-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--dot-now);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}
 
.prog-pct {
  font-family: "Helvetica Neue", sans-serif;
  font-size: 17px;
  color: var(--muted);
  white-space: nowrap;
  min-width: 42px;
  text-align: right;
}
 
/* ── Stats ── */
.stats-section {
  margin-bottom: 16px;
}
 
.stat-group {
  margin-bottom: 44px;
}
 
.stat-list {
  list-style: none;
}
 
.stat-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--faint);
  font-size: 14px;
}
 
.stat-list li:first-child {
  border-top: 1px solid var(--faint);
}
 
.s-name {
  color: var(--muted);
  max-width: 58%;
  line-height: 1.45;
}
 
.s-val {
  font-family: "Helvetica Neue", sans-serif;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-align: right;
  flex-shrink: 0;
}
 
.s-sub {
  font-size: 11px;
  color: var(--faint);
  display: block;
  text-align: right;
  margin-top: 2px;
  line-height: 1.4;
}
 
/* ════════════════════════════════════════════
   Responsive — Tablet (≤ 768px)
════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Navbar */
  .navbar {
    margin: 8px 12px 20px 12px;
  }
  .navbar-logo {
    width: 68px;
    height: 68px;
    margin: 10px 4px;
  }
  .navbar-items a {
    font-size: 15px;
    padding: 8px;
  }
  #theme-toggle {
    font-size: 44px;
  }

  /* Home sections */
  .about-title,
  .books-title {
    font-size: 34px;
    margin-bottom: 36px;
  }
  .about-description,
  .books-description {
    font-size: 18px;
    margin-bottom: 36px;
  }
  .about-btn,
  .books-btn {
    font-size: 22px;
  }

  /* Footer */
  .footer-content {
    margin: 48px 24px;
  }
}

/* ════════════════════════════════════════════
   Responsive — Mobile (≤ 480px)
════════════════════════════════════════════ */
@media (max-width: 480px) {
  /* Navbar */
  .navbar {
    margin: 6px 8px 8px 8px;
    flex-wrap: wrap;
    align-items: center;
  }
  .navbar-logo {
    width: 50px;
    height: 50px;
    margin: 6px 4px;
  }
  .navbar-menu {
    width: 100%;
    padding: 4px 0;
    margin: 0;
    justify-content: space-around;
  }
  .navbar-items a {
    font-size: 12px;
    padding: 6px 4px;
  }
  .theme-toggle {
    justify-content: flex-end;
    padding: 4px 8px;
  }
  #theme-toggle {
    font-size: 30px;
    padding: 6px;
    margin: 0;
  }

  /* Home sections */
  .about,
  .books {
    margin: 10px 8px;
    padding: 12px;
    border-radius: 16px;
  }
  .about-title,
  .books-title {
    font-size: 20px;
    padding: 0 8px;
    margin-bottom: 20px;
  }
  .about-description,
  .books-description {
    font-size: 14px;
    padding: 4px 8px;
    margin-bottom: 20px;
  }
  .about-btn,
  .books-btn {
    font-size: 15px;
    padding: 6px 12px;
  }

  /* Modal */
  dialog {
    width: calc(100vw - 32px);
    max-width: 100%;
  }

  /* Footer */
  .footer-content {
    margin: 24px 12px;
  }
  .footer-description {
    font-size: 12px;
  }

  /* Life page — Step 1 */
  .wordmark {
    font-size: 20px;
    margin-bottom: 24px;
  }
  .dob-fields {
    gap: 16px;
  }
  .field-select {
    font-size: 17px;
  }
  #dob-month {
    min-width: 110px;
  }
  .note {
    margin-top: 40px;
  }

  /* Life page — Step 2 */
  #step2 {
    padding-top: 28px;
    padding-bottom: 48px;
  }
  .topbar {
    margin-bottom: 28px;
  }

  /* Life page — Stats */
  .stat-list li {
    flex-direction: column;
    gap: 4px;
  }
  .s-name {
    max-width: 100%;
  }
  .s-val {
    text-align: left;
    font-size: 20px;
  }
  .s-sub {
    text-align: left;
  }
}

/* Footer */

.footer-content {
    display: flex;
    justify-content: center;
    margin: 90px;
    width: auto;
}

.footer-description {
    display: flex;
    text-align: center;
    justify-content: center;
    width: 100%;
    font-size: 15px;
}