/* ═══════════════════════════════════════════════════════
   SOULARY — IMMERSIVE DIARY DASHBOARD
   Aesthetic: Aged paper · Leather · Candlelight · Ink
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&family=Lora:ital,wght@0,400;0,500;0,600;1,400;1,500&family=IM+Fell+English:ital@0;1&family=Homemade+Apple&display=swap');

/* ─── DESIGN TOKENS ─── */
:root {
  /* Desk */
  --desk-dark:    #1a0f07;
  --desk-mid:     #2c1a0e;
  --desk-grain:   #3d2618;

  /* Leather binding */
  --leather:      #4e3221;
  --leather-dk:   #3d2618;
  --leather-lt:   #6b4d3a;

  /* Aged paper */
  --paper:        #faf6ea;
  --paper-warm:   #f5f0de;
  --paper-shadow: #e8e0c8;
  --paper-edge:   #ddd5b8;

  /* Ink */
  --ink:          #0d0905;
  --ink-mid:      #1e1409;
  --ink-fade:     #3d2e1e;
  --ink-ghost:    #b8a990;

  /* Accents */
  --gold:         #c9a84c;
  --gold-dim:     rgba(201,168,76,0.35);
  --gold-glow:    rgba(201,168,76,0.12);
  --red-wax:      #8b1a1a;
  --red-wax-lt:   #a52020;
  --red-margin:   rgba(180,60,60,0.28);

  /* Lines */
  --rule:         rgba(0,0,0,0.065);
  --rule-spacing: 34px;

  /* Fonts */
--font-hand:    'Poppins', sans-serif;
--font-body:    'Inter', sans-serif;
--font-formal:  'Roboto', sans-serif;
--font-scrawl:  'Open Sans', sans-serif;
  /* Shadows */
  --shadow-book:  0 24px 70px rgba(0,0,0,0.7), 0 6px 24px rgba(0,0,0,0.45);
  --shadow-soft:  0 3px 14px rgba(0,0,0,0.1);
}

/* ─── RESET ─── */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
}

/* ─── INK PEN CURSOR — global ─── */
html, body, * {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%3E%3Crect%20x%3D%2210%22%20y%3D%222%22%20width%3D%2210%22%20height%3D%2220%22%20rx%3D%223%22%20ry%3D%223%22%20transform%3D%22rotate%2845%2015%2012%29%22%20fill%3D%22%232a1a0d%22%20stroke%3D%22%234e3221%22%20stroke-width%3D%220.6%22%2F%3E%3Crect%20x%3D%2211.5%22%20y%3D%223%22%20width%3D%223%22%20height%3D%2216%22%20rx%3D%221.5%22%20transform%3D%22rotate%2845%2015%2012%29%22%20fill%3D%22rgba%28255%2C255%2C255%2C0.12%29%22%2F%3E%3Crect%20x%3D%2210%22%20y%3D%2219.5%22%20width%3D%2210%22%20height%3D%222.5%22%20transform%3D%22rotate%2845%2015%2012%29%22%20fill%3D%22%23c9a84c%22%2F%3E%3Cpolygon%20points%3D%225%2C27%2012%2C20%208%2C16%202%2C30%22%20fill%3D%22%23c9a84c%22%20stroke%3D%22%239a7a28%22%20stroke-width%3D%220.5%22%2F%3E%3Cline%20x1%3D%223.5%22%20y1%3D%2228.5%22%20x2%3D%2210%22%20y2%3D%2218.5%22%20stroke%3D%22%239a7a28%22%20stroke-width%3D%220.7%22%20opacity%3D%220.8%22%2F%3E%3Ccircle%20cx%3D%222.5%22%20cy%3D%2229.5%22%20r%3D%221.2%22%20fill%3D%22%231c1209%22%20opacity%3D%220.85%22%2F%3E%3C%2Fsvg%3E") 2 30, crosshair !important;
}

html { scroll-behavior: smooth; }

/* ─────────────────────────────────────────────
   BODY — wooden desk surface
───────────────────────────────────────────── */
body {
  min-height: 100vh;
  background: var(--desk-dark);
  font-family: var(--font-body);
  font-size: 20px; /* Increased base font size */
  color: var(--ink);
  overflow-x: hidden;
  position: relative;
}

/* Ensure all interactive elements inherit the larger font size */
input, 
textarea, 
button, 
select {
  font-family: inherit;
  font-size: 18px; /* Larger font for inputs and buttons */
}

/* Larger placeholder text for better clarity */
::placeholder {
  font-size: 18px;
  color: var(--ink-fade);
  opacity: 0.7;
}

/* Wood grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%,  rgba(201,168,76,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 85%, rgba(0,0,0,0.45) 0%,       transparent 55%),
    repeating-linear-gradient(
      92deg,
      transparent 0px, transparent 36px,
      rgba(0,0,0,0.07) 36px, rgba(0,0,0,0.07) 38px,
      transparent 38px, transparent 76px,
      rgba(255,255,255,0.012) 76px, rgba(255,255,255,0.012) 78px
    ),
    repeating-linear-gradient(
      180deg,
      var(--desk-mid)   0px, var(--desk-mid)   4px,
      var(--desk-grain) 4px, var(--desk-grain)  5px,
      var(--desk-mid)   5px, var(--desk-mid)   20px,
      rgba(0,0,0,0.18) 20px, rgba(0,0,0,0.18) 22px
    );
  z-index: 0;
  pointer-events: none;
}

/* Vignette */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 38%, transparent 28%, rgba(0,0,0,0.68) 100%);
  z-index: 0;
  pointer-events: none;
}

/* ─────────────────────────────────────────────
   FLOATING THOUGHTS (existing .thought-particle)
───────────────────────────────────────────── */
.floating-thoughts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.thought-particle {
  position: absolute;
  bottom: -10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(201,168,76,0.6);
  animation: dustFloat linear infinite;
  animation-duration: 20s;
  opacity: 0;
}

.thought-particle::after {
  content: '✦';
  position: absolute;
  top: -10px; left: -8px;
  font-size: 16px;
  color: rgba(201,168,76,0.28);
}

@keyframes dustFloat {
  0%   { transform: translateY(0) translateX(0);      opacity: 0; }
  8%   { opacity: 0.8; }
  50%  { transform: translateY(-52vh) translateX(14px); }
  92%  { opacity: 0.2; }
  100% { transform: translateY(-108vh) translateX(-8px); opacity: 0; }
}

/* ─────────────────────────────────────────────
   MAIN CONTAINER — the open diary book
───────────────────────────────────────────── */
.container {
  position: relative;
  z-index: 10;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 80px;
  animation: bookOpen 0.95s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes bookOpen {
  from { opacity: 0; transform: perspective(1400px) rotateX(6deg) scale(0.96); }
  to   { opacity: 1; transform: perspective(1400px) rotateX(0deg) scale(1);    }
}

/* Leather top cover — appears above the first child */
.container::before {
  content: '';
  display: block;
  height: 20px;
  background: linear-gradient(to bottom, #1a0d05, var(--leather-dk));
  border-radius: 5px 5px 0 0;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.55);
  margin-top: 40px;
}

/* Leather bottom cover — closes the book */
.container::after {
  content: '';
  display: block;
  height: 20px;
  background: linear-gradient(to top, #1a0d05, var(--leather-dk));
  border-radius: 0 0 5px 5px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.55);
  margin-bottom: 44px;
}

/* ─────────────────────────────────────────────
   REVEAL ANIMATIONS
───────────────────────────────────────────── */
.reveal-item {
  opacity: 0;
  transform: translateY(18px);
  animation: revealUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.reveal-item:nth-child(1) { animation-delay: 0.15s; }
.reveal-item:nth-child(2) { animation-delay: 0.28s; }
.reveal-item:nth-child(3) { animation-delay: 0.42s; }
.reveal-item:nth-child(4) { animation-delay: 0.56s; }
.reveal-item:nth-child(5) { animation-delay: 0.70s; }
.reveal-item:nth-child(6) { animation-delay: 0.84s; }
.reveal-item:nth-child(7) { animation-delay: 0.98s; }

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

/* ─────────────────────────────────────────────
   SHARED PAPER STYLES — applied to all sections
───────────────────────────────────────────── */

/* Every section shares the paper background */
.header,
.hero-image,
.feature-cards,
.overview-section,
.recent-section,
.inspiration-box,
.profile-section {
  position: relative;
  overflow: hidden;
}

/* Paper grain on all sections */
.header::before,
.feature-cards::before,
.overview-section::before,
.recent-section::before,
.profile-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.7;
  pointer-events: none;
  z-index: 1;
}

/* Ruled lines on all paper sections */
.header::after,
.feature-cards::after,
.overview-section::after,
.recent-section::after,
.profile-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent 0px,
    transparent calc(var(--rule-spacing) - 1px),
    var(--rule) calc(var(--rule-spacing) - 1px),
    var(--rule) var(--rule-spacing)
  );
  pointer-events: none;
  z-index: 1;
}

/* All direct children of paper sections sit above overlays */
.header > *,
.feature-cards > *,
.overview-section > *,
.recent-section > *,
.inspiration-box > *,
.profile-section > * {
  position: relative;
  z-index: 2;
}

/* ─────────────────────────────────────────────
   HEADER
───────────────────────────────────────────── */
.header {
  background: var(--paper);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 52px 20px 52px;
  border-left: 10px solid var(--leather);
  box-shadow: 0 6px 28px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
}

/* Red margin line (override the ::after ruled lines for ::before) */
/* We use box-shadow trick for the margin since both pseudo-els are used */
.header {
  box-shadow:
    0 6px 28px rgba(0,0,0,0.5),
    0 2px 8px rgba(0,0,0,0.3),
    inset 52px 0 0 -50px var(--red-margin); /* visual margin line */
}

.logo {
  font-family: var(--font-scrawl);
  font-weight: 600;
  font-size: 34px;
  color: var(--ink);
  letter-spacing: -0.5px;
  line-height: 1;
  flex-shrink: 0;
  text-decoration: none;
}

/* Push profile to right */
.user-profile-link { margin-left: auto; text-decoration: none; }

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 16px 7px 7px;
  border-radius: 50px;
  border: 1.5px solid var(--gold-dim);
  background: rgba(201,168,76,0.06);
  transition: background 0.25s, border-color 0.25s;
}
.user-profile:hover {
  background: rgba(201,168,76,0.14);
  border-color: var(--gold);
}

.user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid var(--gold-dim);
  object-fit: cover;
  filter: sepia(15%) contrast(1.05);
}

.user-info { line-height: 1.3; }

.user-name {
  font-family: var(--font-scrawl);
  font-weight: 600;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  display: block;
}

.user-status {
  font-family: var(--font-formal);
  font-weight: 600;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-ghost); font-weight: 600;
  display: block;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.new-entry-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: radial-gradient(ellipse at 40% 30%, var(--red-wax-lt), var(--red-wax));
  color: #faf3e0;
  border: none;
  padding: 10px 22px;
  border-radius: 50px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 14px rgba(139,26,26,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s;
  cursor: pointer;
}
.new-entry-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 10px 26px rgba(139,26,26,0.48);
}

.logout-btn {
  background: transparent;
  border: 1.5px solid rgba(139,26,26,0.3);
  color: var(--red-wax);
  padding: 9px 18px;
  border-radius: 50px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.logout-btn:hover {
  background: rgba(139,26,26,0.07);
  border-color: var(--red-wax);
}

/* ─────────────────────────────────────────────
   HERO IMAGE — photo taped into the diary
───────────────────────────────────────────── */
.hero-image {
  width: 100%;
  height: 320px;
  background: var(--paper-warm);
  box-shadow: 0 4px 20px rgba(0,0,0,0.42);
  border-left: 10px solid var(--leather);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tape strips */
.hero-image::before {
  content: '';
  position: absolute;
  top: 12px; left: 48px;
  width: 64px; height: 18px;
  background: rgba(255,240,170,0.58);
  border: 1px solid rgba(220,195,110,0.45);
  border-radius: 2px;
  transform: rotate(-1.8deg);
  z-index: 5;
}
.hero-image::after {
  content: '';
  position: absolute;
  top: 12px; right: 48px;
  width: 64px; height: 18px;
  background: rgba(255,240,170,0.58);
  border: 1px solid rgba(220,195,110,0.45);
  border-radius: 2px;
  transform: rotate(1.8deg);
  z-index: 5;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: sepia(20%) contrast(1.05) brightness(0.96);
}

/* ─────────────────────────────────────────────
   FEATURE CARDS
───────────────────────────────────────────── */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  background: var(--paper);
  border-left: 10px solid var(--leather);
  padding: 22px 28px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}

.feature-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 12px;
  border-radius: 4px;
  text-decoration: none;
  border-left: 3px solid transparent;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.28s;
}

/* Ruled lines inside each card */
.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent 0px, transparent 24px,
    rgba(0,0,0,0.04) 24px, rgba(0,0,0,0.04) 25px
  );
  pointer-events: none;
  z-index: 0;
}

.feature-card:hover {
  transform: translateY(-5px) rotate(-0.3deg);
  box-shadow: 0 14px 32px rgba(0,0,0,0.22);
}

.feature-card.blue   { background: #ecf2fd; border-left-color: #4a7fd4; }
.feature-card.pink   { background: #fdeef4; border-left-color: #c2556e; }
.feature-card.green  { background: #edf6ee; border-left-color: #4a9e5c; }
.feature-card.gold   { background: #fdf5e6; border-left-color: #c49327; }
.feature-card.purple { background: #f3e8ff; border-left-color: #8b5cf6; }

.feature-icon {
  font-size: 22px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1));
  flex-shrink: 0;
}

.feature-content { position: relative; z-index: 2; min-width: 0; }

.feature-content h3 {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  margin: 0 0 2px;
  white-space: normal;
  line-height: 1.25;
}

.feature-content p {
  font-family: var(--font-formal);
  font-weight: 600;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-fade);
  margin: 0;
}

/* ─────────────────────────────────────────────
   SECTION HEADINGS
───────────────────────────────────────────── */
.section-title {
  font-family: var(--font-scrawl);
  font-weight: 600;
  font-size: 34px;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 5px;
  line-height: 1.2;
}

.section-subtitle {
  font-family: var(--font-formal);
  font-weight: 600;
  font-style: italic;
  font-size: 16px;
  color: var(--ink-mid);
  margin: 0 0 30px;
}

/* ─────────────────────────────────────────────
   OVERVIEW SECTION — stats
───────────────────────────────────────────── */
.overview-section {
  background: var(--paper);
  border-left: 10px solid var(--leather);
  padding: 44px 48px 44px 56px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.36);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-card {
  padding: 26px 22px;
  border-radius: 4px;
  border-left: 3px solid transparent;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.28s ease;
}
.stat-card:hover { transform: translateY(-4px) rotate(0.4deg); }

/* Ruled lines inside stat cards */
.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent 0px, transparent 24px,
    rgba(0,0,0,0.04) 24px, rgba(0,0,0,0.04) 25px
  );
  pointer-events: none;
}

.stat-card > * { position: relative; z-index: 2; }

.stat-card.purple { background: #f3e8ff; border-left-color: #8b5cf6; }
.stat-card.red    { background: #fdeef4; border-left-color: #c2556e; }
.stat-card.green  { background: #edf6ee; border-left-color: #4a9e5c; }

.stat-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--ink-fade);
  font-family: var(--font-body);
  margin-bottom: 12px;
}

.stat-value {
  font-family: var(--font-scrawl);
  font-weight: 600;
  font-size: 54px;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 5px;
}

.stat-label {
  font-family: var(--font-formal);
  font-weight: 600;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-mid); font-weight: 600;
}

/* ─────────────────────────────────────────────
   RECENT HIGHLIGHTS
───────────────────────────────────────────── */
.recent-section {
  background: var(--paper);
  border-left: 10px solid var(--leather);
  padding: 44px 48px 44px 56px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.36);
}

.entry-card {
  border-radius: 4px;
  padding: 22px 24px;
  margin-bottom: 14px;
  border-left: 3px solid transparent;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}
.entry-card:hover {
  transform: translateX(7px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.2);
}

/* Ruled lines in entry cards */
.entry-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent 0px, transparent 28px,
    rgba(0,0,0,0.04) 28px, rgba(0,0,0,0.04) 29px
  );
  pointer-events: none;
}

.entry-card > * { position: relative; z-index: 2; }

.entry-card.pink   { background: #fdeef4; border-left-color: #c2556e; }
.entry-card.yellow { background: #fdf5e6; border-left-color: #c49327; }
.entry-card.blue   { background: #ecf2fd; border-left-color: #4a7fd4; }

.entry-date {
  font-family: var(--font-formal);
  font-weight: 600;
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-ghost); font-weight: 600;
  margin-bottom: 7px;
}

.entry-title {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.2;
}

.entry-content {
  font-family: var(--font-formal);
  font-weight: 600;
  font-style: italic;
  font-size: 16px;
  color: var(--ink-mid);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─────────────────────────────────────────────
   INSPIRATION BOX — leather inlay
───────────────────────────────────────────── */
.inspiration-box {
  background: linear-gradient(135deg, var(--leather) 0%, var(--leather-dk) 100%);
  border-left: 10px solid #1e0f06;
  padding: 40px 52px;
  box-shadow: 0 6px 28px rgba(0,0,0,0.52), inset 0 1px 0 rgba(255,255,255,0.04);
  position: relative;
  overflow: hidden;
}

/* Leather texture */
.inspiration-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.09'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* Embossed gold ruled lines */
.inspiration-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent 0px,
    transparent calc(var(--rule-spacing) - 1px),
    rgba(201,168,76,0.07) calc(var(--rule-spacing) - 1px),
    rgba(201,168,76,0.07) var(--rule-spacing)
  );
  pointer-events: none;
  z-index: 1;
}

.inspiration-box > * { position: relative; z-index: 2; }

.inspiration-title {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 16px;
  letter-spacing: 0.8px;
}

.inspiration-quote {
  font-family: var(--font-formal);
  font-weight: 600;
  font-style: italic;
  font-size: 18px;
  color: rgba(250,246,234,0.9);
  line-height: 1.8;
  border-left: 2px solid var(--gold-dim);
  padding-left: 22px;
}

/* ─────────────────────────────────────────────
   PROFILE SECTION
───────────────────────────────────────────── */
.profile-section {
  background: var(--paper);
  border-left: 10px solid var(--leather);
  padding: 44px 48px 52px 56px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.36);
  border-radius: 0 0 3px 3px;
}

.profile-content { margin-top: 6px; }

.profile-card {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  background: var(--paper-warm);
  border: 1px solid var(--paper-edge);
  border-left: 3px solid var(--red-wax);
  border-radius: 4px;
  padding: 30px 32px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

/* Ruled lines inside profile card */
.profile-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent 0px, transparent 30px,
    rgba(0,0,0,0.04) 30px, rgba(0,0,0,0.04) 31px
  );
  pointer-events: none;
}

.profile-card > * { position: relative; z-index: 2; }

.profile-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 2px solid var(--gold-dim);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  filter: sepia(15%) contrast(1.05);
}

.profile-details { flex: 1; }

.profile-details h3 {
  font-family: var(--font-scrawl);
  font-weight: 600;
  font-size: 32px;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 14px;
}

.profile-details p {
  font-family: var(--font-formal);
  font-weight: 600;
  font-style: italic;
  font-size: 15px;
  color: var(--ink-mid);
  line-height: 2;
  margin: 0;
}

.profile-details strong {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ink-ghost); font-weight: 600;
}

.edit-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 22px;
  background: radial-gradient(ellipse at 40% 30%, var(--red-wax-lt), var(--red-wax));
  color: #faf3e0;
  border: none;
  padding: 11px 26px;
  border-radius: 50px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(139,26,26,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s;
}
.edit-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 26px rgba(139,26,26,0.48);
}

/* ─────────────────────────────────────────────
   SCROLLBAR
───────────────────────────────────────────── */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--desk-dark); }
::-webkit-scrollbar-thumb { background: var(--leather); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--leather-lt); }

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 900px) {
  .feature-cards  { grid-template-columns: repeat(2, 1fr); }
  .stats-grid     { grid-template-columns: repeat(2, 1fr); }
  .header         { padding: 16px 24px; flex-wrap: wrap; gap: 12px; }
  .user-profile-link { margin-left: 0; }
}

@media (max-width: 640px) {
  .container { padding: 0 10px 60px; }

  .header { padding: 14px 16px; gap: 10px; }
  .logo   { font-size: 28px; }
  .user-info { display: none; }

  .feature-cards  { padding: 20px 14px; gap: 10px; grid-template-columns: repeat(2, 1fr); }
  .stats-grid     { grid-template-columns: 1fr; }

  .overview-section,
  .recent-section,
  .profile-section { padding: 32px 24px 32px 36px; border-left-width: 6px; }

  .inspiration-box { padding: 28px 26px; border-left-width: 6px; }

  .section-title  { font-size: 26px; }
  .stat-value     { font-size: 42px; }

  .profile-card   { flex-direction: column; align-items: center; text-align: center; }
  .profile-avatar { margin: 0 auto; }
}

@media (max-width: 420px) {
  .feature-cards { grid-template-columns: 1fr; }
  .hero-image    { height: 140px; }
  .new-entry-btn { font-size: 17px; padding: 9px 16px; }
}


/* ═══════════════════════════════════════════════════════════
   TYPOGRAPHY OVERRIDE — Bold, Dark, High Contrast
   Every word must be readable without effort.
═══════════════════════════════════════════════════════════ */

/* ─── Global ink darkness — override tokens at source ─── */
:root {
  --ink:       #0d0905 !important;   /* near-black warm ink */
  --ink-mid:   #1e1409 !important;   /* dark brown-black */
  --ink-fade:  #2e2214 !important;   /* formerly ghost-grey — now deep brown */
  --ink-ghost: #4a3828 !important;   /* formerly barely visible — now readable */
  --ink-deep:  #0d0905 !important;
}

/* ─── Every text element gets minimum legibility ─── */
body, p, span, div, li, td, th, label, input, textarea, select, button, a {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Caveat handwriting — always bold */
[style*="Caveat"],
.nav-text, .nav-link, .tally-value, .stat-value,
.entry-title, .entry-row-title, .goal-title,
.achievement-title, .section-title, .section-heading,
.feature-content h3, .shortcut-label,
.greeting-name, .profile-inkcard-name,
.form-title, .diary-title, .journal-entry-title,
.write-now-btn, .new-entry-btn, .edit-btn, .logout-scrawl,
.btn-save, .btn-cancel, .btn-add-budget, .btn-add-row, .seal-text,
.text-input, .textarea-large, .date-input, .modern-input, .search-bar {
  font-weight: 700 !important;
  color: var(--ink) !important;
}

/* IM Fell English formal — bump weight & darken */
.section-subtitle, .entry-date, .entry-row-date,
.entry-row-preview, .entry-content,
.tally-label, .tally-footer, .tally-heading,
.form-subtitle, .diary-date-stamp, .greeting-tagline,
.goal-description, .achievement-description, .goal-tag,
.quote-author, .voice-status, .stat-label, .achievements-subtitle,
.intro-text, .pdt-key, .progress-info,
.input-line label, .form-group label, .mood-section label,
.nav-section-label, .embossed-logo, .signup-prompt {
  font-weight: 600 !important;
  color: var(--ink-mid) !important;
  opacity: 1 !important;
}

/* Lora serif — readable weight */
.profile-details p, .quote-text, .inspiration-quote,
.feature-content p, .shortcut-sub {
  font-weight: 600 !important;
  color: var(--ink-mid) !important;
  opacity: 1 !important;
}

/* Entry previews & descriptions — ensure full readability */
.entry-content, .entry-row-preview, .goal-description,
.achievement-description, .inspiration-quote {
  color: var(--ink-mid) !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}

/* Ghost elements that still need to look slightly secondary — but still readable */
.page-number, .spine-title, .meta-tag, .trophy-icon {
  opacity: 0.6 !important;
  font-weight: 600 !important;
}

/* Input placeholders — visible guidetext */
input::placeholder,
textarea::placeholder {
  color: var(--ink-ghost) !important;
  font-weight: 500 !important;
  opacity: 1 !important;
}

/* Labels — maximum weight */
label {
  font-weight: 700 !important;
  color: var(--ink-mid) !important;
}

/* ═══════════════════════════════════════════════════════════
   TO-DO LIST SECTION
   Sits on the same paper surface as the rest of the dashboard
═══════════════════════════════════════════════════════════ */
.todo-section {
  background: var(--paper);
  border-left: 10px solid var(--leather);
  padding: 44px 48px 44px 56px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.36);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.todo-container {
  width: 100%;
  max-width: 520px;
  background: var(--paper-warm);
  padding: 26px 28px;
  border-radius: 6px;
  border: 1px solid var(--paper-edge);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

/* Ruled lines inside the container */
.todo-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent 0px, transparent 30px,
    rgba(0,0,0,0.045) 30px, rgba(0,0,0,0.045) 31px
  );
  pointer-events: none;
  z-index: 0;
}

.todo-container > * { position: relative; z-index: 2; }

.todo-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

#todo-input {
  flex: 1;
  padding: 10px 15px;
  border: 2px solid var(--paper-edge);
  border-radius: 8px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

#todo-input:focus {
  border-color: var(--gold);
}

#todo-input::placeholder {
  color: var(--ink-ghost);
  font-style: italic;
}

#add-todo-btn {
  background: radial-gradient(ellipse at 40% 30%, var(--red-wax-lt), var(--red-wax));
  color: #faf3e0;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(139,26,26,0.35);
}

#add-todo-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 20px rgba(139,26,26,0.45);
}

.todo-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.todo-item {
  display: flex;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid var(--paper-edge);
  gap: 12px;
}

.todo-item:last-child {
  border-bottom: none;
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: var(--ink-ghost);
}

.todo-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--gold);
  flex-shrink: 0;
}

.todo-text {
  flex: 1;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.todo-delete {
  background: none;
  border: none;
  color: var(--ink-ghost);
  font-size: 18px;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0 4px;
  flex-shrink: 0;
  line-height: 1;
}

.todo-delete:hover {
  color: var(--red-wax);
}