/* ═══════════════════════════════════════════════════════════
   SAGAR VARYANI — Personal Website
   Mobile-first, static, no backend required
═══════════════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:         #F4F1EB;
  --bg-section: #FAF8F3;
  --bg-warm:    #EDE9E0;
  --bg-dark:    #0D1B2A;

  /* Brand colours */
  --navy:       #1E3A5F;
  --navy-dim:   #2D527A;
  --sage:       #446A58;
  --sage-bg:    #DFF0E7;
  --sage-bd:    #9EC8AF;
  --gold:       #A8823C;

  /* Text */
  --t-body:     #4A5568;
  --t-muted:    #6B7787;
  --t-ghost:    #9AAAB6;

  /* UI */
  --border:     #DBD6CC;
  --border-lt:  #E6E2D8;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; overflow-x: hidden; }
body  {
  background: var(--bg);
  color: var(--t-body);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.65;
}
img   { display: block; max-width: 100%; }
a     { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Reveal animations ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity  0.65s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.26s; }
.reveal.delay-4 { transition-delay: 0.42s; }
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Typography helpers ─────────────────────────────────── */
.serif { font-family: 'EB Garamond', Georgia, serif; }
.mono  { font-family: 'IBM Plex Mono', monospace; }

.mono-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--t-muted);
}
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--t-muted);
  margin-bottom: 0.625rem;
}
.eyebrow-dark { color: #4A6070; }

/* Counters: hidden on mobile, gold on desktop */
.counter {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  color: var(--gold);
  flex-shrink: 0;
  display: none;
  user-select: none;
}
.counter-on-dark { color: #4A6070; }
@media (min-width: 640px) {
  .counter { display: block; }
}

/* ── Layout ─────────────────────────────────────────────── */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding-left:  1.125rem;
  padding-right: 1.125rem;
}
@media (min-width: 640px) {
  .container { padding-left: 3rem; padding-right: 3rem; }
}

/* ── Sections ───────────────────────────────────────────── */
.section       { position: relative; padding: 3.5rem 0; }
.section-light { background: var(--bg-section); border-top: 1px solid var(--border); }
.section-dark  { background: var(--bg-dark); }
.section-warm  { background: var(--bg-warm); border-top: 1px solid #D8D3C8; }

@media (min-width: 640px) {
  .section { padding: 5.5rem 0; }
}

.section-hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (min-width: 640px) {
  .section-hdr { margin-bottom: 3.5rem; }
}

.section-h2 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(2.5rem, 9vw, 4.75rem);
  color: var(--navy);
  line-height: 1;
  margin-bottom: 0.75rem;
}
.section-h2-light { color: #fff; }

.section-sub {
  font-size: 0.875rem;
  color: var(--t-muted);
  max-width: 380px;
  line-height: 1.65;
}
.section-sub-dark { color: #4A6070; }

/* ── DOT GRID ───────────────────────────────────────────── */
.dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #A8A49C 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.25;
  pointer-events: none;
}
@media (min-width: 640px) { .dot-grid { opacity: 0.35; } }

/* ── NAV ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0.625rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  padding: 0.3rem;
  border-radius: 9999px;
  border: 1px solid rgba(219, 214, 204, 0.85);
  background: rgba(244, 241, 235, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: calc(100vw - 10px);
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: rgba(244, 241, 235, 0.97);
  box-shadow: 0 1px 8px rgba(0,0,0,0.07);
}
.nav-link {
  display: inline-block;
  padding: 0.24rem 0.5rem;
  border-radius: 9999px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.56rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--t-muted);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
  line-height: 1.5;
}
.nav-link.active { background: var(--navy); color: #fff; }
.nav-link:hover:not(.active) { color: var(--navy); }

/* Mobile: short labels */
.nav-full  { display: none; }
.nav-short { display: inline; }

@media (min-width: 600px) {
  .nav { top: 1rem; padding: 0.375rem; }
  .nav-link { padding: 0.35rem 0.75rem; font-size: 0.65rem; letter-spacing: 0.11em; }
  .nav-full  { display: inline; }
  .nav-short { display: none; }
}

/* ── INTRO SECTION ──────────────────────────────────────── */
.intro-section {
  position: relative;
  overflow: hidden;
}

/* Mobile: block, content starts near top */
.intro-container {
  position: relative;
  z-index: 1;
  padding-top:    5rem;
  padding-bottom: 3.5rem;
}

/* Desktop: vertically centered */
@media (min-width: 768px) {
  .intro-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100svh;
    min-height: 100vh;
  }
  .intro-container {
    padding-top:    7rem;
    padding-bottom: 5rem;
  }
}

/* Identity row: photo + meta (left) + counter (right) */
.intro-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}
@media (min-width: 640px) { .intro-identity { margin-bottom: 2.25rem; } }

.intro-identity-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.intro-counter { /* inherits .counter — hidden on mobile, visible on desktop */ }

.profile-photo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 10%;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
}
@media (min-width: 640px) {
  .profile-photo { width: 2.875rem; height: 2.875rem; }
}

.intro-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  min-width: 0;
}
.meta-sep {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.625rem;
  color: var(--border);
}

.intro-heading {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(2rem, 8.5vw, 4.5rem);
  color: var(--navy);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 680px;
  margin-bottom: 1.25rem;
}
@media (min-width: 640px) { .intro-heading { margin-bottom: 1.75rem; } }

/* Horizontal rule below heading */
.intro-rule {
  width: 3.5rem;
  height: 1px;
  background: var(--border);
  margin-bottom: 1.25rem;
}
@media (min-width: 640px) { .intro-rule { margin-bottom: 1.75rem; } }

.intro-sub {
  font-size: 0.9375rem;
  color: var(--t-body);
  line-height: 1.65;
  max-width: 460px;
  margin-bottom: 0.5rem;
}
.intro-note {
  font-size: 0.875rem;
  color: var(--t-muted);
  line-height: 1.65;
  margin-bottom: 2.25rem;
}
@media (min-width: 640px) { .intro-note { margin-bottom: 3rem; } }

/* Left-bordered callout */
.intro-callout {
  border-left: 2.5px solid var(--sage);
  padding-left: 1rem;
  margin-bottom: 3rem;
}
@media (min-width: 640px) {
  .intro-callout { padding-left: 1.25rem; margin-bottom: 4rem; }
}
.intro-callout p {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.9375rem;
  color: var(--sage);
  line-height: 1.6;
  max-width: 480px;
}
@media (min-width: 640px) { .intro-callout p { font-size: 1.0625rem; } }

.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}
.scroll-line {
  display: inline-block;
  width: 1.75rem;
  height: 1px;
  background: var(--border);
  transition: width 0.35s ease, background 0.3s;
}
.scroll-hint:hover .scroll-line { width: 3.25rem; background: var(--navy); }
.scroll-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--t-ghost);
  transition: color 0.2s;
}
.scroll-hint:hover .scroll-text { color: var(--navy); }

/* ── JOURNEY ─────────────────────────────────────────────── */
.j-entry {
  position: relative;
  border-bottom: 1px solid var(--border);
  padding: 1.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 560px) {
  .j-entry {
    flex-direction: row;
    gap: 3rem;
    padding: 2.25rem 0;
    align-items: flex-start;
  }
  .j-entry:hover {
    background: rgba(235,231,224,0.45);
    margin: 0 -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Present role: sage left border */
.j-entry.present {
  border-left: 2.5px solid var(--sage);
  padding-left: 0.875rem;
  margin-left: -0.875rem;
}
@media (min-width: 560px) {
  .j-entry.present:hover { margin-left: -1.5rem; padding-left: 1.5rem; }
}

.j-meta {
  flex-shrink: 0;
}
@media (min-width: 560px) { .j-meta { width: 145px; padding-top: 0.25rem; } }

.j-period {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  color: var(--t-muted);
  line-height: 1.6;
  margin-bottom: 0.3rem;
}
.j-company {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 0.125rem;
}
.j-role {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  color: var(--t-muted);
}

/* Now badge */
.now-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  margin-top: 0.625rem;
}
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  animation: pulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}

.j-headline {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(1.2rem, 3.5vw, 1.625rem);
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 0.625rem;
}
.j-text {
  font-size: 0.875rem;
  color: var(--t-body);
  line-height: 1.8;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.875rem;
}
.tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  background: var(--sage-bg);
  color: var(--sage);
  border: 1px solid var(--sage-bd);
}

/* ── CURIOSITY MAP ───────────────────────────────────────── */

/* Desktop map */
.cmap-desktop {
  display: none;
  position: relative;
  height: 420px;
}
@media (min-width: 640px) { .cmap-desktop { display: block; } }

.cmap-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

/* SVG lines — default dashed, active sage */
.cline {
  stroke: #1E2D3D;
  stroke-width: 1;
  stroke-dasharray: 3 6;
  transition: stroke 0.25s, stroke-width 0.25s;
}
.cline.hi {
  stroke: var(--sage);
  stroke-width: 1.5;
  stroke-dasharray: none;
}

/* Node pills */
.cnode {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 0.4rem 0.875rem;
  border-radius: 9999px;
  border: 1px solid #1E2D3D;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.8125rem;
  color: #667788;
  white-space: nowrap;
  cursor: default;
  user-select: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  z-index: 10;
}
.cnode:hover, .cnode.hov {
  background: var(--bg);
  color: var(--navy);
  border-color: var(--bg);
  box-shadow: 0 2px 16px rgba(0,0,0,0.35);
  z-index: 20;
}
.cnode.conn { border-color: var(--sage); color: #c8dcd4; }
.cnode.dim  { border-color: #141F2A; color: #222E38; }

/* Tooltip */
.cmap-tip {
  position: absolute;
  background: var(--bg);
  color: var(--navy);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.75rem;
  line-height: 1.6;
  padding: 0.625rem 0.875rem;
  width: 230px;
  white-space: normal;
  z-index: 30;
  pointer-events: none;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}

/* Mobile curiosity */
.cmap-mobile { display: block; }
@media (min-width: 640px) { .cmap-mobile { display: none; } }

.cpills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.cpill {
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
  border: 1px solid #1E2D3D;
  color: #667788;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.8125rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.cpill:active { transform: scale(0.96); }
.cpill.active { background: var(--bg); color: var(--navy); border-color: var(--bg); }

.cmap-info { margin-top: 1rem; min-height: 3rem; }
.cmap-hint {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #334455;
}
.cmap-card {
  padding: 1rem 1.25rem;
  background: #0F2030;
  border: 1px solid #1E2D3D;
}
.cmap-card-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.375rem;
}
.cmap-card-text {
  font-size: 0.875rem;
  color: #AABBCC;
  line-height: 1.7;
}

/* ── CURRENTLY (ledger rows) ─────────────────────────────── */
.c-ledger { border-top: 1px solid var(--border); }

.c-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-lt);
  transition: background 0.2s;
}
.c-row:hover {
  background: #F0EDE6;
  margin: 0 -1.125rem;
  padding-left: 1.125rem;
  padding-right: 1.125rem;
}

@media (min-width: 500px) {
  .c-row {
    flex-direction: row;
    gap: 2rem;
    align-items: baseline;
  }
  .c-row:hover {
    margin: 0 -3rem;
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

.c-key {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy);
  flex-shrink: 0;
  min-width: 110px;
}
@media (min-width: 640px) { .c-key { min-width: 130px; } }

.c-val {
  font-size: 0.875rem;
  color: var(--t-body);
  line-height: 1.75;
}

/* ── NOTES ───────────────────────────────────────────────── */
.notes-empty {
  border: 1px dashed #C8C2B6;
  padding: 2.5rem 1.75rem;
}
@media (min-width: 640px) { .notes-empty { padding: 3rem 2rem; } }

.notes-msg {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t-ghost);
}

/* ── CONTACT ─────────────────────────────────────────────── */
.contact-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
}
.contact-pre {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.125rem;
  font-style: italic;
  color: var(--t-muted);
  margin-bottom: 0.875rem;
}
.contact-cta {
  display: block;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(2.5rem, 10vw, 5rem);
  color: var(--navy);
  line-height: 1;
  transition: color 0.3s;
  margin-bottom: 0;
}
.contact-cta:hover { color: var(--sage); }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
@media (min-width: 500px) {
  .contact-links { flex-direction: row; gap: 2.5rem; }
}

.contact-link-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.375rem;
}
.contact-link {
  font-size: 0.875rem;
  color: var(--navy);
  transition: color 0.2s;
}
.contact-link:hover { color: var(--sage); }

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.footer-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  color: var(--t-ghost);
}

/* ── Global guards ───────────────────────────────────────── */
html, body { max-width: 100%; overflow-x: hidden; }
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.note-item {
  border: 1px solid var(--border);
  background: var(--bg-section);
  padding: 1rem 1.25rem;
}

.note-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.note-item summary::-webkit-details-marker {
  display: none;
}

.note-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.3rem;
  color: var(--navy);
}

.note-date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  color: var(--t-muted);
}

.note-content {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  line-height: 1.8;
  color: var(--t-body);
  max-width: 65ch;
}

.note-content p {
  margin-bottom: 1rem;
}

.note-content p:last-child {
  margin-bottom: 0;
}
