/* ============================================================
   priyaaank.com — styles
   Dual-tone: warm off-white surfaces + a single dark ink.
   ============================================================ */

:root {
  --bg:           #f6f4ef;   /* main background */
  --card:         #ffffff;
  --sidebar:      #1d1d1f;   /* near-black */
  --sidebar-soft: #2c2c2f;

  --ink:    #1d1d1f;
  --ink-2:  #4a4a4d;
  --muted:  #8a8784;
  --rule:   #e6e2d8;
  --tint:   #efebe0;         /* subtle warm fill */

  --sans:  "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
}
a:hover { text-decoration-color: var(--ink); }

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

/* ---------- Sidebar ---------- */
aside.sidebar {
  background: var(--sidebar);
  color: #e8e6f3;
  padding: 32px 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow-y: auto;
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #3a3a3d;
  display: grid;
  place-items: center;
  color: #e8e6e0;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 600;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile .name {
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.1;
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.profile .role {
  font-size: 0.82rem;
  color: #b9b5d4;
  letter-spacing: 0.02em;
}

.nav-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #807c9d;
  margin: 4px 0 4px;
}
nav.primary { display: flex; flex-direction: column; gap: 2px; }
nav.primary a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #d4d1e7;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
nav.primary a:hover { background: var(--sidebar-soft); color: #fff; }
nav.primary a.active { background: var(--sidebar-soft); color: #fff; }
nav.primary a .dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
  background: #6f6f72;
}
nav.primary a.active .dot,
nav.primary a:hover .dot { background: #ffffff; }
nav.primary a .ext {
  margin-left: auto;
  color: #807c9d;
  font-size: 0.78rem;
}

.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.resume-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--ink);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.resume-btn:hover { background: #e8e6e0; }
.resume-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.resume-btn .arrow { margin-left: auto; }

.socials { display: flex; gap: 14px; }
.socials a {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--sidebar-soft);
  color: #d4d1e7;
  text-decoration: none;
}
.socials a:hover { background: #3a3858; color: #fff; }
.socials svg { width: 15px; height: 15px; }

/* ---------- Main ---------- */
main {
  padding: 56px 64px 80px;
  max-width: 880px;
}

/* Hero (homepage) */
.hero { margin-bottom: 56px; }
.greeting {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: var(--tint);
  color: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}
.greeting .wave {
  display: inline-block;
  transform-origin: 70% 70%;
  animation: wave 2.5s ease-in-out infinite;
}
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

.hero h1 {
  font-family: var(--serif);
  font-size: 3.4rem;
  line-height: 1.05;
  margin: 0 0 0.4em;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero h1 em { font-style: italic; color: var(--ink); }
.hero p {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 38em;
  margin: 0 0 1em;
}
.hero p a { font-weight: 600; }

/* Currently — stat-grid style: one subtle card per item, mirrors the
   health-dashboard widget aesthetic (uppercase label on top, body
   text below). */
.currently {
  margin-top: 36px;
}
.currently .head {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 14px;
}
.currently .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 4px var(--tint);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--tint); }
  50%     { box-shadow: 0 0 0 7px transparent; }
}
.currently-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}
.currently-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 120px;
  transition: border-color 0.15s;
}
.currently-card:hover { border-color: #cdc7b6; }
.currently-card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.currently-card-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  flex: 0 0 auto;
}
/* Cycle a warm accent across the dots so each card reads as its
   own item. Colors lifted from the health dashboard palette. */
.currently-card:nth-child(3n+1) .currently-card-tag::before { background: #b45309; } /* amber  */
.currently-card:nth-child(3n+2) .currently-card-tag::before { background: #0f766e; } /* teal   */
.currently-card:nth-child(3n)   .currently-card-tag::before { background: #4d6a3a; } /* sage   */
.currently-card-text {
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink);
  margin-top: auto;
}

/* Section header */
.section-head {
  margin: 64px 0 22px;
  display: flex; align-items: baseline; gap: 14px;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: 1.9rem;
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.section-head .label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* Section cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.card {
  background: var(--card);
  border-radius: 14px;
  padding: 22px 24px;
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--ink);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -14px rgba(0, 0, 0, 0.25);
  border-color: var(--ink);
}
.card .top {
  display: flex; align-items: center; justify-content: space-between;
}
.card .icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--tint);
  color: var(--ink);
}
.card .icon svg { width: 18px; height: 18px; }
.card .badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.card h3 {
  font-family: var(--serif);
  font-size: 1.45rem;
  margin: 4px 0 0;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.55;
}
.card .cta {
  margin-top: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
.card:hover .cta { text-decoration-color: var(--ink); }

/* Elsewhere */
.elsewhere {
  margin-top: 42px;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.elsewhere a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
}
.elsewhere a:hover { border-color: var(--ink); }
.elsewhere svg { width: 14px; height: 14px; }

/* Page footer */
footer.bottom {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between;
  font-size: 0.83rem;
  color: var(--muted);
}

/* ---------- Page / Post (Writing, Health, About, etc.) ---------- */
article.page,
article.post {
  max-width: 680px;
}
article.page h1,
article.post h1 {
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 0.3em;
}
article .subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 2em;
}
article.post .meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 2em;
}
.prose p { margin: 1em 0; line-height: 1.7; }
.prose h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin: 2em 0 0.5em;
  font-weight: 500;
}
.prose h3 {
  font-size: 1.1rem;
  margin: 1.6em 0 0.4em;
}
.prose ul, .prose ol { padding-left: 1.4em; line-height: 1.7; }
.prose code {
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  background: var(--tint);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}
.prose pre {
  background: var(--tint);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.88em;
}
.prose pre code { background: none; padding: 0; }
.prose blockquote {
  border-left: 3px solid var(--ink);
  margin: 1.4em 0;
  padding: 0.2em 1em;
  color: var(--ink-2);
}
.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5em auto;
  border-radius: 4px;
}

/* Post list (writing index, health index) */
ul.post-list { list-style: none; padding: 0; margin: 0; }
ul.post-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
ul.post-list li:last-child { border-bottom: none; }
ul.post-list a {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  letter-spacing: -0.01em;
}
ul.post-list a:hover { text-decoration: underline; text-decoration-color: var(--ink); }
ul.post-list .meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-left: 12px;
  font-weight: 500;
}
ul.post-list .excerpt {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ---------- Tag filter (writing index, opt-in) ---------- */
.tag-filter {
  margin: 0 0 28px;
}
.filter-search {
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-family: var(--sans);
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  display: block;
  margin-bottom: 14px;
}
.filter-search:focus {
  outline: none;
  border-color: var(--ink);
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-chips .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--sans);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.filter-chips .chip:hover { border-color: var(--ink); }
.filter-chips .chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.filter-chips .chip .count {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--tint);
  color: var(--ink-2);
  padding: 1px 7px;
  border-radius: 999px;
  line-height: 1.5;
}
.filter-chips .chip.active .count {
  background: rgba(255,255,255,0.18);
  color: #fff;
}
.filter-empty {
  margin-top: 20px;
  color: var(--muted);
  font-style: italic;
}

/* Per-post inline tags shown in the post list */
ul.post-list .tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
ul.post-list .tag {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--ink-2);
  border: 1px solid var(--rule);
  user-select: none;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
ul.post-list .tag:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* ---------- Right timeline column ---------- */
aside.timeline {
  padding: 56px 32px 80px 28px;
  border-left: 1px solid var(--rule);
  background: var(--bg);
}
.timeline > h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin: 0 0 6px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.timeline > .sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 28px;
}
.timeline .year {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 12px;
}
.timeline .year:first-of-type { margin-top: 0; }
.timeline .year::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.timeline ol.events {
  list-style: none;
  padding: 0 0 0 22px;
  margin: 0;
  position: relative;
}
.timeline ol.events::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--rule);
}
.timeline .event {
  position: relative;
  padding: 0 0 16px;
}
.timeline .event::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 6px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 3px var(--bg);
}
.timeline .event .when {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}
.timeline .event .note {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 11px 13px;
  position: relative;
}
.timeline .event .note::before,
.timeline .event .note::after {
  content: "";
  position: absolute;
  left: -7px;
  top: 12px;
  width: 0; height: 0;
  border: 7px solid transparent;
  border-right-color: var(--rule);
  border-left: 0;
}
.timeline .event .note::after {
  left: -6px;
  border-right-color: var(--card);
}
.timeline .event h3 {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0 0 3px;
  color: var(--ink);
  line-height: 1.35;
}
.timeline .event p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.83rem;
  line-height: 1.5;
}

/* ---------- Bookshelf (timeline of finished books) ---------- */
.bookshelf .bs-year { margin: 36px 0 44px; }
.bookshelf .bs-year-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 8px;
  margin-bottom: 20px;
}
.bookshelf .bs-year-head h2 {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}
.bookshelf .bs-count {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.bookshelf .bs-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: 22px;
}
.bookshelf .bs-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 18px;
  align-items: baseline;
}
.bookshelf .bs-date {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  padding-top: 4px;
}
.bookshelf .bs-line {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.bookshelf .bs-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.3;
}
.bookshelf .bs-title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.bookshelf .bs-title a:hover { border-bottom-color: var(--ink-2); }
.bookshelf .bs-rating {
  color: #b45309;       /* amber */
  letter-spacing: 1.5px;
  font-size: 0.95rem;
  white-space: nowrap;
}
.bookshelf .bs-star-empty { color: var(--rule); }
.bookshelf .bs-meta {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 4px;
}
.bookshelf .bs-author { font-weight: 500; color: var(--ink-2); }
.bookshelf .bs-tag { color: var(--muted); }
.bookshelf .bs-sep { margin: 0 8px; opacity: 0.5; }
.bookshelf .bs-note {
  margin: 8px 0 0;
  color: var(--ink-2);
  line-height: 1.55;
  font-size: 0.95rem;
  max-width: 60ch;
}
.bookshelf .bs-empty,
.bookshelf .bs-status {
  color: var(--muted);
  font-style: italic;
  margin-top: 24px;
}
.bookshelf .bs-status[hidden] { display: none; }
.bookshelf .bs-section-reading .bs-year-head h2 {
  display: flex; align-items: center; gap: 12px;
}
.bookshelf .bs-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #b45309;          /* amber, matches the dashboard accent */
  animation: bs-pulse 2s ease-in-out infinite;
  display: inline-block;
}
@keyframes bs-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.14); }
  50%      { box-shadow: 0 0 0 7px rgba(180, 83, 9, 0); }
}
.bookshelf .bs-date-label {
  text-transform: lowercase;
  letter-spacing: 0.04em;
  font-weight: 500;
  color: var(--muted);
  margin-right: 2px;
}
.bookshelf .bs-date--empty { display: block; }
/* "Did not finish" — slightly recede so it sits below the timeline
   without competing visually with the year sections. */
.bookshelf .bs-section-abandoned { opacity: 0.85; }
.bookshelf .bs-section-abandoned .bs-year-head h2 { color: var(--ink-2); }
.bookshelf .bs-section-abandoned .bs-title { color: var(--ink-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .app { grid-template-columns: 260px minmax(0, 1fr); }
  aside.timeline {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid var(--rule);
    padding: 40px 64px 60px;
  }
  .timeline ol.events { max-width: 560px; }
}

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  aside.sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 20px 24px;
    gap: 16px;
  }
  .profile { flex-direction: row; align-items: center; gap: 12px; flex: 1; }
  .profile .name { font-size: 1.25rem; }
  .avatar { width: 44px; height: 44px; font-size: 1.1rem; }
  .nav-label { display: none; }
  nav.primary { flex-direction: row; flex-wrap: wrap; gap: 4px; width: 100%; order: 3; }
  nav.primary a { padding: 7px 10px; font-size: 0.88rem; }
  .sidebar-foot { flex-direction: row; align-items: center; border-top: none; padding-top: 0; margin: 0; gap: 10px; }
  .resume-btn { padding: 8px 12px; font-size: 0.85rem; }
  main { padding: 36px 24px 60px; }
  .hero h1 { font-size: 2.4rem; }
  .cards { grid-template-columns: 1fr; }
  aside.timeline { padding: 32px 24px 60px; }
  .bookshelf .bs-item { grid-template-columns: 1fr; gap: 6px; }
  .bookshelf .bs-date { padding-top: 0; }
}
