/* ==========================================================================
   Nitin Jogad — Personal Site
   Hybrid direction: bold, dark, gold-accented masthead / hero / footer
   bookending a calmer ivory editorial body. Finance motifs throughout —
   ticker tape, ledger rule, sparkline, currency mark, indexed entries.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@600;700;800;900&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Serif:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  /* dark register */
  --black: #100E0A;
  --black-soft: #1B1812;
  --cream-on-black: #F3EEE1;
  --cream-on-black-soft: #B9B2A0;

  /* light register */
  --bg: #FAF8F3;
  --bg-alt: #F1ECE1;
  --ink: #1C1B18;
  --ink-soft: #55524A;
  --ink-faint: #8C887C;
  --line: #DFD9C8;
  --line-soft: #EAE5D8;

  /* accents */
  --gold: #C8963C;
  --gold-bright: #E3B45C;
  --gold-dim: rgba(200, 150, 60, 0.28);
  --up-green: #3E6B4F;

  --display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --serif: 'IBM Plex Serif', Georgia, serif;
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;

  --max: 760px;
  --max-wide: 1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--ink);
}

p { margin: 0 0 1.3em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.container-wide { max-width: var(--max-wide); margin: 0 auto; padding: 0 28px; }

/* ---------- Masthead (dark, sitewide) ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--black);
  border-bottom: 1px solid rgba(227, 180, 92, 0.16);
}

.nav {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--cream-on-black);
  text-transform: uppercase;
}

.nav-logo .mark { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cream-on-black-soft);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-bright);
}

.nav-cta {
  border: 1px solid var(--gold);
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--gold-bright) !important;
}

.nav-cta:hover { background: var(--gold); color: var(--black) !important; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--cream-on-black); margin: 5px 0; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 57px 0 0 0;
    background: var(--black);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 28px 30px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav-links.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links li { width: 100%; border-bottom: 1px solid rgba(227, 180, 92, 0.12); }
  .nav-links a { display: block; padding: 14px 0; font-size: 13px; }
  .nav-cta { border: none; padding: 14px 0; }
  .nav-cta:hover { background: none; color: var(--gold-bright) !important; }
}

/* ---------- Ticker tape ---------- */

.ticker {
  background: var(--black-soft);
  border-bottom: 1px solid rgba(227, 180, 92, 0.14);
  overflow: hidden;
  white-space: nowrap;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  animation: ticker-scroll 38s linear infinite;
  will-change: transform;
}

.ticker-track span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream-on-black-soft);
  padding: 9px 22px;
  display: inline-flex;
  align-items: center;
  gap: 22px;
}

.ticker-track .up { color: var(--gold-bright); }
.ticker-track .sep { color: var(--gold); opacity: 0.6; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* ---------- Dark hero ---------- */

.hero-dark {
  position: relative;
  background: var(--black);
  color: var(--cream-on-black);
  padding: 84px 0 74px;
  overflow: hidden;
}

.hero-dark .chart-motif,
.hero-dark .rupee-motif {
  position: absolute;
  pointer-events: none;
  opacity: 0.5;
}

.hero-dark .chart-motif { right: -30px; top: 30px; width: 46%; max-width: 480px; }
.hero-dark .rupee-motif {
  right: 4%;
  bottom: -6%;
  font-family: var(--display);
  font-size: 320px;
  line-height: 1;
  color: rgba(227, 180, 92, 0.06);
  font-weight: 800;
}

.status-line {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #59C77E;
  box-shadow: 0 0 0 4px rgba(89, 199, 126, 0.16);
}

.hero-dark h1 {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 0.94;
  letter-spacing: -0.005em;
  color: #fff;
  max-width: 15ch;
  margin-bottom: 0.3em;
}

.hero-dark h1 .gold { color: var(--gold-bright); }

.hero-dark .lede {
  position: relative;
  z-index: 1;
  font-family: var(--sans);
  font-size: 18px;
  color: var(--cream-on-black-soft);
  max-width: 58ch;
  margin-top: 20px;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid var(--gold);
  transition: all 0.15s ease;
}

.btn-primary { background: var(--gold); color: var(--black); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-bright); border-color: var(--gold-bright); }

.btn-secondary { background: transparent; color: var(--cream-on-black); border-color: rgba(243, 238, 225, 0.35); }
.btn-secondary:hover { border-color: var(--gold-bright); color: var(--gold-bright); }

/* buttons on ivory sections */
.btn-ink-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-ink-primary:hover { background: var(--gold); border-color: var(--gold); color: var(--black); }
.btn-ink-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ink-secondary:hover { background: var(--ink); color: var(--bg); }

/* ---------- Sections ---------- */

section { padding: 64px 0; }
section + section { border-top: 1px solid var(--line-soft); }
section.hero-dark + section { border-top: none; }
.dark-block + section { border-top: none; }

.section-title { font-size: 30px; margin-bottom: 8px; }

.section-kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 14px;
}

.lead { font-size: 19px; color: var(--ink-soft); max-width: 56ch; }
.prose p { max-width: 66ch; }
.prose h3 { margin-top: 1.6em; font-size: 22px; }

/* candlestick divider — decorative, not data */
.candle-divider { padding: 30px 0; }
.candle-strip { display: block; width: 100%; height: 64px; }
.candle-strip .wick { stroke: var(--ink-faint); stroke-width: 1.5; }
.candle-strip .body-up { fill: var(--gold); }
.candle-strip .body-down { fill: var(--bg); stroke: var(--ink-faint); stroke-width: 1.5; }

/* ledger rule — subtle ruled-paper texture behind a section */
.ledger {
  background-image: repeating-linear-gradient(
    to bottom, transparent, transparent 33px, var(--line-soft) 34px
  );
}

/* ---------- Cards / grids ---------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

@media (max-width: 760px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.card { padding: 30px; background: var(--bg-alt); border-radius: 4px; border-top: 2px solid var(--gold); }
.card h3 { font-family: var(--sans); font-weight: 600; font-size: 17px; margin-bottom: 10px; }
.card p { color: var(--ink-soft); margin-bottom: 0; font-size: 15.5px; }

.numbered { display: flex; gap: 22px; padding: 28px 0; border-top: 1px solid var(--line-soft); }
.numbered:last-child { border-bottom: 1px solid var(--line-soft); }

.numbered .num {
  font-family: var(--mono);
  color: var(--gold);
  font-size: 15px;
  font-weight: 600;
  flex: 0 0 34px;
  padding-top: 2px;
}

.numbered h3 { font-family: var(--sans); font-weight: 600; font-size: 18px; margin-bottom: 8px; }
.numbered p { color: var(--ink-soft); margin-bottom: 0; }

/* ---------- Pull quote ---------- */

.pull {
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  line-height: 1.45;
  color: var(--ink);
  max-width: 34ch;
  margin: 8px 0 0;
}

.pull-block { padding: 8px 0 8px 26px; border-left: 2px solid var(--gold); }

/* ---------- Sparkline motif ---------- */

.sparkline { display: block; width: 100%; height: auto; }
.sparkline path { fill: none; stroke: var(--gold); stroke-width: 2; }
.sparkline .fill { stroke: none; fill: url(#sparkFill); opacity: 0.14; }
.sparkline circle { fill: var(--gold-bright); }

/* ---------- Timeline ---------- */

.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); margin-left: 6px; }
.timeline li { position: relative; padding: 0 0 34px 30px; }
.timeline li::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline .t-title { font-family: var(--sans); font-weight: 600; font-size: 18px; margin-bottom: 4px; }
.timeline .t-idx { font-family: var(--mono); color: var(--gold); font-size: 12.5px; margin-right: 8px; }
.timeline .t-desc { color: var(--ink-soft); font-size: 15.5px; }
.timeline .t-open .t-title { color: var(--ink-faint); font-style: italic; }

/* ---------- Journal ---------- */

.journal-list { list-style: none; margin: 0; padding: 0; }
.journal-item { display: block; padding: 26px 0; border-top: 1px solid var(--line-soft); }
.journal-item:last-child { border-bottom: 1px solid var(--line-soft); }

.journal-item .j-cat {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 8px;
}

.journal-item h3 { font-family: var(--serif); font-size: 21px; margin-bottom: 6px; transition: color 0.15s ease; }
.journal-item:hover h3 { color: var(--gold); }
.journal-item .j-excerpt { color: var(--ink-soft); font-size: 15.5px; margin-bottom: 0; }

.journal-hero .j-meta { font-family: var(--mono); font-size: 12.5px; color: var(--cream-on-black-soft); margin-top: 18px; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Photo placeholders ---------- */

.photo {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4 / 5;
  background: linear-gradient(155deg, #23201A 0%, #171410 60%, #0E0C09 100%);
  border: 1px solid rgba(227, 180, 92, 0.25);
  display: flex;
  align-items: flex-end;
  padding: 18px;
}

.photo.wide { aspect-ratio: 16 / 10; }

.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.photo-label {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: rgba(16, 14, 10, 0.7);
  padding: 5px 10px;
  border-radius: 3px;
}

/* ---------- Scrolling image gallery ---------- */

.gallery-scroll {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}

.gallery-track {
  display: flex;
  align-items: center;
  gap: 18px;
  width: max-content;
  animation: gallery-scroll 32s linear infinite;
}

.gallery-scroll:hover .gallery-track { animation-play-state: paused; }

.gallery-track img {
  height: 280px;
  width: auto;
  flex-shrink: 0;
  border-radius: 4px;
  border: 1px solid rgba(227, 180, 92, 0.25);
  object-fit: cover;
}

@keyframes gallery-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 760px) {
  .gallery-track img { height: 190px; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-track { animation: none; overflow-x: auto; }
  .gallery-scroll { overflow-x: auto; }
}

/* ---------- Contact ---------- */

.contact-email {
  font-family: var(--mono);
  font-size: 21px;
  color: var(--gold-bright);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 4px;
  display: inline-block;
}
.contact-email:hover { color: #fff; border-color: #fff; }

/* ---------- Dark CTA band ---------- */

.cta-dark { background: var(--black); color: var(--cream-on-black); }
.cta-dark .section-kicker { color: var(--gold); }
.cta-dark h2 { color: #fff; }
.cta-dark .lead { color: var(--cream-on-black-soft); }

/* ---------- Footer (dark) ---------- */

.site-footer { background: var(--black); border-top: 1px solid rgba(227, 180, 92, 0.14); padding: 40px 0 50px; color: var(--cream-on-black); }
.footer-inner { max-width: var(--max-wide); margin: 0 auto; padding: 0 28px; display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; }
.footer-name { font-family: var(--mono); font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; color: var(--cream-on-black); }
.footer-tag { color: var(--cream-on-black-soft); font-size: 13px; }
.footer-nav { display: flex; gap: 20px; list-style: none; padding: 0; margin: 0; }
.footer-nav a { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--cream-on-black-soft); }
.footer-nav a:hover { color: var(--gold-bright); }

/* ---------- Utility ---------- */

.mt-0 { margin-top: 0; }
.center { text-align: center; }
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.tag {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 6px 13px;
  border-radius: 999px;
}
.tag-row.on-dark .tag { color: var(--cream-on-black-soft); border-color: rgba(227, 180, 92, 0.3); }

/* ---------- Scroll reveal ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 760px) {
  .hero-dark h1 { font-size: 34px; }
  .hero-dark .rupee-motif { font-size: 200px; }
  .section-title { font-size: 25px; }
  .pull { font-size: 21px; }
  section { padding: 46px 0; }
}
