:root {
  --bg: #080808;
  --card-bg: #0f0f0f;
  --text-main: #e0e0e0;
  --text-muted: #888;
  --line-color: #333;
  --active-color: #ff9f43;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Crimson Pro", serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-body);
}

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.04;
  pointer-events: none;
  z-index: 90;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  z-index: 100;
  font-family: var(--font-display);
  font-size: 0.8rem;
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.back-link {
  text-decoration: none;
  color: #ccc;
  display: flex;
  gap: 8px;
  align-items: center;
  transition: color 0.3s;
  font-weight: 500;
}
.back-link:hover {
  color: #fff;
}
#current-chapter {
  color: var(--active-color);
  font-weight: bold;
  text-shadow: 0 0 10px rgba(255, 159, 67, 0.3);
}

.intro-header {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 8rem);
  line-height: 0.9;
  letter-spacing: -2px;
}
.highlight {
  color: var(--active-color);
  font-style: italic;
}

.intro-sub {
  font-size: 1.2rem;
  margin-top: 2rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  max-width: 500px;
}

.scroll-hint {
  position: absolute;
  bottom: 50px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.scroll-hint .line {
  width: 1px;
  height: 40px;
  background: white;
}

.timeline-container {
  position: relative;
  padding: 100px 0;
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
}

.timeline-guide {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line-color);
  transform: translateX(-50%);
}

.draw-line {
  width: 2px;
  background: var(--active-color);
  box-shadow: 0 0 15px var(--active-color);
  margin-left: -0.5px;
  height: 0%;
  position: absolute;
  top: 0;
  left: 0;
}

.memory-node {
  display: flex;
  justify-content: flex-end;
  width: 50%;
  padding-right: 80px;
  position: relative;
  margin-bottom: 200px;
  opacity: 0.2;
  transition: opacity 0.5s;
}

.memory-node.right-side {
  align-self: flex-end;
  justify-content: flex-start;
  padding-right: 0;
  padding-left: 80px;
  margin-left: 50%;
}

.content-card {
  text-align: right;
  max-width: 400px;
}
.right-side .content-card {
  text-align: left;
}

.content-card h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #fff;
}

.content-card p {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #aaa;
}

.date-marker {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--bg);
  color: var(--active-color);
  font-family: var(--font-display);
  font-weight: bold;
  padding: 8px 12px;
  border: 1px solid var(--line-color);
  width: max-content;
  min-width: 60px;
  text-align: center;
  z-index: 10;
  transform: translate(50%, -50%);
}
.right-side .date-marker {
  right: auto;
  left: 0;
  transform: translate(-50%, -50%);
}

.mood-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  margin-top: 15px;
  padding: 5px 10px;
  border: 1px solid #333;
  color: #666;
  border-radius: 50px;
}
.mood-tag.warning {
  border-color: #ff4757;
  color: #ff4757;
}
.mood-tag.success {
  border-color: #2ed573;
  color: #2ed573;
}
.memory-node.active {
  opacity: 1;
}
.memory-node.active .date-marker {
  background: var(--active-color);
  color: black;
  box-shadow: 0 0 20px var(--active-color);
}

.wisdom-section {
  padding: 100px 5%;
  background-color: #050505;
  border-top: 1px solid #1a1a1a;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-header {
  text-align: center;
  margin-bottom: 5rem;
  max-width: 600px;
}
.section-header .label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 3px;
  color: #555;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: 3rem;
  color: #fff;
  margin: 10px 0;
}
.section-header p {
  font-size: 1.1rem;
  color: #888;
}

.focus-grid {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin-bottom: 5rem;
}

.mentor-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #333;
  padding: 2.5rem 2rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  opacity: 1 !important;
  transform: translate(0) !important;
}

.mentor-card:hover {
  border-color: #666;
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-5px);
}

.mentor-card.active {
  border-color: var(--active-color) !important;
  box-shadow: 0 0 20px rgba(255, 159, 67, 0.2),
    inset 0 0 20px rgba(255, 159, 67, 0.05);
  background: #0f0f0f;
  z-index: 10;
}

.mentor-card.active .icon {
  color: var(--active-color);
  text-shadow: 0 0 10px rgba(255, 159, 67, 0.6);
  transform: scale(1.1);
}

.mentor-card.active h3 {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}
.mentor-card.active p {
  color: #eeeeee !important;
  font-weight: 500;
}

.mentor-card h3 {
  font-family: var(--font-display);
  color: #ccc;
  font-size: 1.2rem;
  letter-spacing: 1px;
  margin-bottom: 5px;
  transition: color 0.3s;
}
.mentor-card p {
  font-size: 0.9rem;
  color: #666;
  transition: color 0.3s;
}
.mentor-card .icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: #444;
  transition: all 0.3s;
}

.select-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--active-color);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.mentor-card.active .select-indicator {
  transform: scaleX(1);
}

#speech-display {
  transition: none;
}

.fade-out {
  opacity: 0;
  filter: blur(5px);
}

.monolith-speech {
  width: 100%;
  max-width: 800px;
  border-left: 2px solid var(--active-color);
  padding-left: 40px;
  margin-bottom: 5rem;
  position: relative;
}

.speech-content blockquote {
  font-family: var(--font-body);
  font-size: 1.8rem;
  line-height: 1.6;
  color: #d1d1d1;
  font-style: italic;
}

.speech-content strong {
  color: var(--active-color);
  font-weight: 400;
}

.speech-content cite {
  display: block;
  margin-top: 2rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 2px;
  color: #555;
  text-transform: uppercase;
}

.outro {
  height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.outro h2 {
  font-family: var(--font-display);
  font-size: 3rem;
  margin-bottom: 2rem;
}
.signature {
  font-family: "Crimson Pro", serif;
  font-style: italic;
  font-size: 2rem;
  color: #555;
}

@media (max-width: 768px) {
  .timeline-guide {
    left: 20px;
  }

  .memory-node,
  .memory-node.right-side {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    padding: 0 0 0 60px;
    text-align: left;
  }
  .content-card,
  .right-side .content-card {
    text-align: left;
  }

  .date-marker,
  .right-side .date-marker {
    left: 0;
    right: auto;
    transform: translateY(-50%) translateX(-50%);
    left: 20px;
    transform: translate(-50%, -50%);
  }

  .section-header h2 {
    font-size: 2rem;
  }
  .speech-content blockquote {
    font-size: 1.2rem;
  }
  .monolith-speech {
    padding-left: 20px;
  }

  .focus-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .mentor-card {
    padding: 1.5rem 1rem;
    min-height: 160px;
  }

  .mentor-card .icon {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .mentor-card h3 {
    font-size: 0.9rem;
  }

  .mentor-card p {
    font-size: 0.8rem;
  }

  h1 {
    font-size: 3rem;
  }

  .top-nav {
    padding: 1rem;
    font-size: 0.75rem;
  }
}
