/* ====================================================================
   TUSHARBANGERA.COM — shared stylesheet
   Used by index.html, bookshelf.html, photography.html.
   Change a color or font here once, it updates on every page.
   ==================================================================== */

:root {
  --paper:       #FBFBF9;   /* warm off-white background */
  --ink:         #1C1B19;   /* primary text */
  --muted:       #6E6A63;   /* secondary text, labels, captions */
  --indigo:      #34357A;   /* decorative accent — icons, bullets (not links) */
  --indigo-deep: #232357;
  --link:        #0000EE;   /* classic web blue — all real hyperlinks */
  --link-hover:  #0000AA;
  --link-visited:#551A8B;   /* classic visited-link purple */
  --link-visited-hover: #3D0F66;
  --rule:        #E7E3DB;   /* hairline dividers */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.62;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 28px 120px;
}

/* ---------- links: classic web blue / visited purple, underlined ---------- */
a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,238,0.4);
  transition: color .15s ease, border-color .15s ease;
}
a:hover { color: var(--link-hover); border-bottom-color: var(--link-hover); }
a:visited { color: var(--link-visited); border-bottom-color: rgba(85,26,139,0.4); }
a:visited:hover { color: var(--link-visited-hover); border-bottom-color: var(--link-visited-hover); }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 2px; }

/* ---------- top nav (same on every page) — deliberately NOT styled as
   classic links: this is site navigation, not content hyperlinks ---------- */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 56px;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.site-nav a { border-bottom: none; color: var(--muted); }
.site-nav .home { color: var(--ink); font-weight: 500; white-space: nowrap; }
.site-nav .home:hover { color: var(--indigo); }
.site-nav .pages a { margin-left: 16px; white-space: nowrap; }
.site-nav .pages a:hover { color: var(--indigo); }
.site-nav .pages a.current { color: var(--indigo); }

/* ---------- hero: photo + name + headline, side by side ---------- */
.hero { display: flex; align-items: center; gap: 22px; margin-bottom: 8px; }
.photo {
  width: 88px; height: 88px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #ECE8E0;
  border: 1px solid var(--rule);
}
.photo--placeholder {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 28px; font-weight: 500;
  color: var(--indigo); letter-spacing: .02em;
}
.hero-text h1 {
  font-weight: 500;
  font-size: clamp(1.8rem, 5.4vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin: 0 0 6px;
}
.hero-text .tagline {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
@media (max-width: 480px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 16px; }
}

.page-title h1 {
  font-weight: 500;
  font-size: clamp(1.8rem, 5.4vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin: 0 0 8px;
}
.page-title .tagline {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 8px;
}

/* ---------- section labels (mono eyebrows) ---------- */
.label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 52px 0 16px;
}
.label:first-of-type { margin-top: 48px; }

.note {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin: -8px 0 16px;
}

p { margin: 0 0 18px; }
.lead p:last-child { margin-bottom: 0; }

/* ---------- plain lists ---------- */
ul.clean { list-style: none; margin: 0; padding: 0; }
ul.clean > li { margin: 0 0 14px; }
ul.clean > li:last-child { margin-bottom: 0; }

.now li, .principles li { position: relative; padding-left: 22px; }
.now li::before, .principles li::before {
  content: "—";
  position: absolute; left: 0; top: 0;
  color: var(--indigo);
  font-family: var(--mono);
}
.principles li { margin-bottom: 12px; }

/* ---------- row pattern: experience, projects ---------- */
.row {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.row:first-child { border-top: 1px solid var(--rule); }
.row-main { min-width: 0; }
.row-title-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.row-title { font-weight: 500; color: var(--ink); }
.row-sub { color: var(--muted); font-size: 0.85rem; }
.row-year { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.row-desc { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }

/* ---------- writing list ---------- */
.writing li {
  display: flex; justify-content: space-between; gap: 18px;
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  padding: 11px 0;
}
.writing li:first-child { border-top: 1px solid var(--rule); }
.writing .date { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; }

/* ---------- books page ---------- */
.book { padding: 22px 0; border-bottom: 1px solid var(--rule); }
.book:first-child { border-top: 1px solid var(--rule); }
.book-main { flex: 1; }
.book-title { font-weight: 500; }
.book-meta { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-top: 3px; }
.book-note { margin-top: 9px; font-size: 0.92rem; color: var(--ink); }

/* ---------- photos page ---------- */
.photo-year { margin: 48px 0 18px; }
.photo-year:first-of-type { margin-top: 36px; }
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 480px) { .photo-grid { grid-template-columns: 1fr; } }
.photo-item img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
}
.photo-caption { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); margin-top: 8px; }
.photo-item img { cursor: zoom-in; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(28, 27, 25, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  z-index: 1000;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity .2s ease;
  padding: 24px;
}
.lightbox.active { display: flex; opacity: 1; }
.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.lightbox-caption {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--paper);
  letter-spacing: 0.04em;
}
.lightbox-close {
  position: fixed;
  top: 22px; right: 26px;
  background: none;
  border: none;
  color: var(--paper);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  font-family: var(--mono);
  opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; }

/* ---------- footer ---------- */
.elsewhere { font-family: var(--mono); font-size: 0.82rem; line-height: 2.2; }
.elsewhere a { margin-right: 22px; }

footer.page-footer {
  margin-top: 72px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* ---------- projects ---------- */
.more { font-family: var(--mono); font-size: 0.78rem; margin: 16px 0 0; }
@media (max-width: 480px) {
  .site-nav { flex-direction: column; gap: 10px; }
  .site-nav .pages a { margin-left: 0; margin-right: 18px; }
}

/* ---------- how I work with AI ---------- */
.system { padding: 26px 0 8px; border-bottom: 1px solid var(--rule); }
.system:first-of-type { border-top: 1px solid var(--rule); }
.system h2 { font-weight: 500; font-size: 1.2rem; line-height: 1.3; margin: 0 0 8px; }
.system .for { color: var(--muted); margin-bottom: 14px; }
.system .part {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 18px 0 8px;
}
.system ol, .system ul { margin: 0 0 14px; padding-left: 22px; }
.system li { margin-bottom: 6px; }
.system li::marker { color: var(--indigo); font-family: var(--mono); font-size: 0.8rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.split p { font-size: 0.95rem; }
@media (max-width: 480px) { .split { grid-template-columns: 1fr; gap: 0; } }
.habits li { margin-bottom: 10px; }
.diagram { margin: 18px 0 6px; }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram-caption { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); margin: 6px 0 14px; }
