/* Warm dark minimalist layout */
:root {
  --bg: #141312;        /* warm charcoal */
  --panel: #1a1918;     /* optional panel color */
  --text: #e6e2dd;      /* warm off-white */
  --muted: #b5afa6;     /* muted nav text */
  --line: #2f2d2a;      /* subtle divider lines */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* Layout grid */
.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  padding: 48px;
  position: relative;
  background: var(--bg);
}

.name a,
.name a:hover,
.name a:visited,
.name a:active {
  text-decoration: none;
  color: inherit;
}


/* Move sidebar links slightly to the right under the name */
.sidebar .nav {
  margin-left: 18px;
}

.nav a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  margin: 6px 0;
}

.nav a:hover {
  color: var(--text);
}

/* Logout button */
.logout {
  margin-top: 18px;
  margin-left: 18px; /* matches nav indent */
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 6px 10px;
  cursor: pointer;
}

.logout:hover {
  color: var(--text);
  border-color: var(--muted);
}

/* Short divider aligned with nav + logout */
.sidebar::after {
  content: "";
  position: absolute;
  right: 0;
  top: 110px;     /* adjust up/down */
  height: 340px;  /* adjust length */
  width: 1px;
  background: var(--line);
}

/* Main content */
.content {
  padding: 28px 28px 60px;
  min-width: 0; /* prevents overflow */
}

/* Centered container (used on journal/home pages) */
.center {
  max-width: 760px;
  margin: 0 auto;
}

/* Home hero image */
.hero-img {
  width: 100%;
  max-width: 760px;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--line);
}

/* Post list */
.postlist {
  list-style: none;
  padding-left: 0;
  margin-top: 18px;
}

.postlist li {
  margin: 18px 0;
}

.plink {
  color: #8ab4f8;
  text-decoration: none;
  font-size: 20px;
}

.plink:hover {
  text-decoration: underline;
}

/* Post content */
.post {
  max-width: 760px;
  margin: 0 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.75; /* nicer reading */
}

.post h1 {
  margin-top: 0;
  margin-bottom: 24px;
  font-weight: 500;
}

/* Images inside posts (not too big) */
.post img {
  max-width: 640px;
  width: 100%;
  height: auto;
  display: block;
  margin: 24px auto;
  border: 1px solid var(--line);
}

/* Any images that appear in content areas */
.post-content img,
.content img {
  max-width: 700px;
  width: 100%;
  height: auto;
  display: block;
  margin: 30px auto;
  border: 1px solid var(--line);
}

/* Code blocks: prevent horizontal scrolling */
pre, code {
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 100%;
}
/* Sidebar name: never underline */
.name a,
.name a:hover {
  opacity: 0.85;
}
.name a:focus,
.name a:active,
.name a:visited {
  text-decoration: none !important;
  color: inherit;
}

/* Mobile fixes */
@media (max-width: 720px) {

  /* Stack sidebar above content */
  .layout {
    grid-template-columns: 1fr;
  }

  /* Sidebar spacing */
  .sidebar {
    padding: 22px;
  }

  /* Remove the vertical divider line on mobile */
  .sidebar::after {
    display: none;
  }

  /* Remove indents on mobile (keeps it clean) */
  .sidebar .nav,
  .sidebar .logout {
    margin-left: 0;
  }

  /* Make content padding smaller */
  .content {
    padding: 18px 18px 48px;
  }

  /* Let containers use full width */
  .center,
  .post {
    max-width: 100%;
  }

  /* Images: always fit the phone */
  .hero-img,
  .post img,
  .post-content img,
  .content img {
    max-width: 100%;
    height: auto;
  }
}
/* Journal index */
.journal-month{
  margin: 2.25rem 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #cfcfcf;
  letter-spacing: 0.02em;
}

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

.journal-item{
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.journal-link{
  text-decoration: none;   /* removes underline */
  color: #9ec3d6;
}

.journal-link:hover{
  text-decoration: none;   /* keeps it clean on hover */
  color: #d7effa;
}

.journal-date{
  color: #7d7d7d;
  font-size: 0.9rem;
  white-space: nowrap;
}
/* Journal links: never blue, never underlined */
.journal-link,
.journal-link:visited,
.journal-link:active {
  color: var(--text);
  text-decoration: none;
}

.journal-link:hover {
  color: var(--muted);
  text-decoration: none;
}
/* Journal index — cleaner */
.journal-month{
  margin: 2.25rem 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.journal-list{
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}

.journal-item{
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
}

.journal-item:last-child{
  border-bottom: 0;
}

.journal-date{
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
  opacity: 0.8;
}
/* Journal: make rows feel like buttons (clean, subtle) */
.journal-item {
  transition: background 160ms ease, transform 160ms ease;
}

.journal-item:hover {
  background: rgba(255,255,255,0.03);
}

.journal-item:active {
  transform: translateY(1px);
}

/* Make the title a bit stronger */
.journal-link {
  font-weight: 500;
  letter-spacing: 0.01em;
}
/* Books page */
.muted { color: var(--muted); }

.books{
  margin-top: 26px;
  max-width: 760px;
}

.book{
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  padding: 18px 0;
  align-items: start;
}

.book-cover{
  width: 110px;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: block;
}

.book-title{
  display: inline-block;
  font-size: 22px;
  font-weight: 600;
  color: #8ab4f8;     /* same vibe as your links */
  text-decoration: none;
  line-height: 1.25;
}

.book-title:hover{
  text-decoration: none;
  color: #b9d4ff;
}

.book-author{
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.book-text{
  margin-top: 14px;
  color: var(--text);
  opacity: 0.92;
  line-height: 1.75;
}

.book-divider{
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
  opacity: 0.9;
}

/* Mobile: stack cover on top */
@media (max-width: 720px){
  .book{
    grid-template-columns: 1fr;
  }
  .book-cover{
    width: 140px;
  }
}
/* ===== Books page ===== */
.books {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.books h1 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.books-intro {
  color: #b5b5b5;
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.book {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  align-items: flex-start;
}

.book img {
  width: 90px;
  height: auto;
  border-radius: 2px;
  flex-shrink: 0;
}

.book-content h2 {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0;
  color: #58a6ff; /* subtle blue */
}

.book-content h3 {
  font-size: 0.85rem;
  font-weight: 400;
  color: #9aa0a6;
  margin: 0.25rem 0 0.75rem;
}

.book-content p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #d0d0d0;
  margin: 0;
}

/* divider like screenshot */
.book:not(:last-child)::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: #222;
  margin-top: 2rem;
}

/* mobile */
@media (max-width: 520px) {
  .book {
    flex-direction: column;
  }
  .book img {
    width: 110px;
  }
}

