/* ============================================
   JOURNAL PAGE SPECIFIC STYLES
   For: journal.html
   Dependencies: style.css (main CV styles)
   ============================================ */

/* --------------------------------------------
   SMOOTH SCROLL & ANCHOR OFFSET
--------------------------------------------- */
html {
  scroll-behavior: smooth;
}

/* Prevents fixed header from covering the entry title when scrolling to anchor */
.journal-entry {
  scroll-margin-top: 80px;
}

/* --------------------------------------------
   LEFT COLUMN – ARCHIVE LINKS
--------------------------------------------- */
.archive-link {
  cursor: pointer;
  color: #2c5f8a;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

[data-theme="dark"] .archive-link {
  cursor: pointer;
  color: #fefefe;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.archive-link:hover {
  color: #4f9eff;
  text-decoration: underline;
}

.archive-link i {
  font-size: 0.75rem;
  color: #4f9eff;
}

.left-col ul {
  padding-left: 0;
  margin-top: 0;
}

.left-col ul li {
  list-style: none;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.left-col .fa-check-circle {
  color: #4f9eff;
  margin-right: 8px;
  font-size: 0.8rem;
}

/* ============================================
   JOURNAL ENTRIES CONTAINER & HOVER EFFECTS
   ============================================ */
.journal-entries {
  margin-top: 0.5rem;
}

/* Base styles + fade-in + hover (all combined) */
/* ============================================
   JOURNAL ENTRY HOVER & FADE-IN (Fixed)
   ============================================ */

/* Base styles */
.journal-entry {
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1), 
              box-shadow 0.3s ease, 
              background-color 0.2s ease,
              opacity 0.6s ease,
              transform 0.6s ease;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 2rem;
  background-color: transparent;
  overflow: visible;
  opacity: 0;
  transform: translateY(20px);
}

.journal-entry.fade-in {
  opacity: 1;
  transform: translateY(0) scale(1); /* explicitly set scale to 1 */
}

/* Light mode hover - higher specificity to override fade-in */
.journal-entry.journal-entry:hover {
  transform: scale(1.02) !important;
  box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.2);
  background-color: var(--card-bg);
  z-index: 2;
  position: relative;
}

/* Dark mode hover - higher specificity */
[data-theme="dark"] .journal-entry.journal-entry:hover {
  transform: scale(1.04) !important;
  box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(79, 158, 255, 0.2);
  background-color: var(--card-bg);
  z-index: 2;
  position: relative;
}

.journal-entry:last-child {
  margin-bottom: 0;
}


/* Hover effect for journal entries */
.journal-entry:hover {
  transform: scale(1.01);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
  background-color: var(--card-bg);
  z-index: 1;
  position: relative;
}

/* --------------------------------------------
   ENTRY HEADER (date badge + title)
--------------------------------------------- */
.entry-header {
  margin-bottom: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
}

.entry-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--border-color);
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.entry-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.05rem;
  line-height: 1.4;
}

/* --------------------------------------------
   ENTRY CONTENT (main text)
--------------------------------------------- */
.entry-content {
  color: var(--text-primary);
  line-height: 1.55;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

/* --------------------------------------------
   REFLECTION BOX (blue background with left border)
--------------------------------------------- */
.entry-reflection {
  background: var(--border-color);
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  color: var(--text-primary);
  border-left: 3px solid #4f9eff;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.entry-reflection i {
  margin-top: 2px;
  color: #4f9eff;
  flex-shrink: 0;
  font-size: 0.85rem;
}

/* --------------------------------------------
   RESPONSIVE DESIGN (mobile)
--------------------------------------------- */
@media (max-width: 700px) {
  .entry-header {
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-start;
  }
  
  .entry-title {
    font-size: 1rem;
  }
  
  .entry-date {
    white-space: normal;
  }
  
  .entry-content {
    font-size: 0.9rem;
  }
  
  .entry-reflection {
    font-size: 0.8rem;
    padding: 0.6rem 0.8rem;
  }
  
.journal-entry {
  opacity: 1 !important;
  transform: none !important;
  display: block !important;
}
}

/* --------------------------------------------
   FADE-IN ON SCROLL (inherits from main style.css)
--------------------------------------------- */
.journal-entry {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.journal-entry.fade-in {
  opacity: 1;
  transform: translateY(0);
}