/* ─────────────────────────────────────────
   GUNRAJ MEHTA — style.css
   Identity: multi-domain senior engineer
   Palette: deep navy-black + warm stone
   Type: Syne (display) · Inter (body) · JetBrains Mono (labels)
───────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=Inter:wght@400;500&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #090A0F;
  --surface:     #111319;
  --border:      #1E222D;
  --subtle:      #2A2F3D;
  --accent:      #6366F1;
  --accent-dim:  rgba(99,102,241,0.1);
  --accent-glow: rgba(99,102,241,0.22);
  --text:        #F0F2F5;
  --muted:       #525A6B;
  --reading:     #8C94A4;
  --green:       #10B981;

  --display: 'Syne', sans-serif;
  --body:    'Inter', sans-serif;
  --mono:    'JetBrains Mono', monospace;

  --max-site:  1100px;
  --max-read:   680px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* ── NAV ─────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9,10,15,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-site);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-ext {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  transition: border-color 0.15s, color 0.15s;
}
.nav-ext:hover { border-color: var(--accent); color: var(--accent); }

/* ── WRAP ────────────────────────────────── */
.wrap {
  max-width: var(--max-site);
  margin: 0 auto;
  padding: 0 2rem;
}

.read-wrap {
  max-width: var(--max-read);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── HERO ────────────────────────────────── */
.hero {
  padding: 6rem 0 5rem;
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}

.hero-name {
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-name em { font-style: normal; color: var(--accent); }

.hero-tagline {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

/* Career Arc */
.arc {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.arc-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.arc-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--subtle);
  background: var(--subtle);
}

.arc-node.arc-now .arc-dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.arc-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}
.arc-label strong { display: block; color: var(--text); font-size: 0.72rem; }
.arc-node.arc-now .arc-label,
.arc-node.arc-now .arc-label strong { color: var(--accent); }

.arc-line {
  height: 1px; width: 3.5rem;
  background: var(--subtle);
  flex-shrink: 0;
  margin-top: 4px;
}

.arc-next { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; flex-shrink: 0; }
.arc-next-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px dashed var(--border);
  background: transparent;
}
.arc-next-label { font-family: var(--mono); font-size: 0.65rem; color: var(--border); }

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.arc-cursor { animation: blink 1.2s step-end infinite; }

.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.btn {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.6rem 1.25rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s;
  display: inline-block;
}
.btn:hover { border-color: var(--subtle); color: var(--text); }

.btn-accent {
  background: var(--accent);
  color: #100C06;
  border-color: transparent;
  font-weight: 600;
}
.btn-accent:hover { opacity: 0.88; color: #100C06; border-color: transparent; }

/* ── SECTION ─────────────────────────────── */
.section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

/* ── WRITING LIST ────────────────────────── */
.post-list { display: flex; flex-direction: column; }

.post-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.post-row:first-child { border-top: 1px solid var(--border); }
.post-row:hover { background: var(--accent-dim); margin: 0 -1rem; padding: 1.25rem 1rem; }

.post-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  flex-shrink: 0;
}

.post-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.post-desc {
  font-size: 0.825rem;
  color: var(--muted);
  margin-top: 0.2rem;
  line-height: 1.5;
}

.post-cat {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.1rem 0.38rem;
  border-radius: 3px;
  flex-shrink: 0;
  align-self: flex-start;
  letter-spacing: 0.04em;
}

/* ── ARTICLE ─────────────────────────────── */
.article-header {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.article-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.article-category {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

.article-title {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.article-desc {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 560px;
}

/* Article body prose */
.prose { padding: 3rem 0 4rem; }

.prose p {
  color: var(--reading);
  line-height: 1.85;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.prose h2 {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 2.75rem 0 0.85rem;
  line-height: 1.2;
}

.prose h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 0.6rem;
}

.prose aside {
  border-left: 2px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 2rem 0;
  background: var(--accent-dim);
  border-radius: 0 4px 4px 0;
}

.prose aside p {
  color: var(--text);
  font-size: 0.9375rem;
  margin-bottom: 0;
  line-height: 1.65;
}

.prose pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.75rem 0;
}

.prose code {
  font-family: var(--mono);
  font-size: 0.825rem;
  color: var(--accent);
  background: var(--surface);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  border: 1px solid var(--border);
}

.prose pre code {
  color: var(--reading);
  background: none;
  padding: 0;
  border: none;
  font-size: 0.8rem;
  line-height: 1.7;
}

.prose ul, .prose ol {
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--reading);
}
.prose li { margin-bottom: 0.4rem; line-height: 1.7; font-size: 1rem; }

/* Article nav */
.article-nav {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.article-nav a {
  font-size: 0.825rem;
  color: var(--muted);
  transition: color 0.15s;
}
.article-nav a:hover { color: var(--text); }

/* ── ABOUT ───────────────────────────────── */
.about-text {
  max-width: 640px;
}
.about-text p {
  color: var(--reading);
  line-height: 1.8;
  margin-bottom: 1.1rem;
  font-size: 0.9375rem;
}
.about-text strong { color: var(--text); font-weight: 500; }

/* ── FOOTER ──────────────────────────────── */
footer {
  padding: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
}

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 4rem 0 3.5rem; }
  .arc-line { width: 2rem; }
  .post-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .post-date { display: inline; margin-right: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, .arc-cursor { animation: none !important; transition: none !important; }
}

/* ── CONTRAST: arc labels more legible ─── */
.arc-label { color: #6B7080; }
.arc-label strong { color: #C0C4D0; }

/* ── SHARE ROW ───────────────────────────── */
.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 2rem 0 1rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

.share-btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
  display: inline-block;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── MOBILE: contact links as buttons ──── */
@media (max-width: 640px) {
  .contact-links { flex-direction: column; align-items: stretch; }
  .contact-link {
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  .hero { padding: 3rem 0 2.5rem; }
  .section { padding-top: 3rem; padding-bottom: 3rem; }
  .hero-actions { gap: 0.6rem; }
  .hero-actions .btn { padding: 0.7rem 1.1rem; font-size: 0.875rem; flex: 1; text-align: center; }
}

/* ── RSS LINK ─────────────────────────── */
.rss-link {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  transition: border-color 0.15s, color 0.15s;
}
.rss-link:hover { border-color: var(--accent); color: var(--accent); }

/* ── EDITOR NOTE ─────────────────────── */
.editor-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.875rem 1.1rem;
  font-size: 0.825rem;
  color: var(--muted);
  margin: 1.5rem 0;
}
.editor-note em { color: var(--text); font-style: normal; font-weight: 500; }

/* ── LIGHT MODE ──────────────────────────
   Triggered by html[data-theme="light"]
   Warm cream — complements the stone accent
─────────────────────────────────────────── */
html[data-theme="light"] {
  --bg:          #F4F5FF;
  --surface:     #EAEBF8;
  --border:      #D0D2EC;
  --subtle:      #B0B3D8;
  --accent:      #4346C8;
  --accent-dim:  rgba(67,70,200,0.1);
  --accent-glow: rgba(67,70,200,0.18);
  --text:        #0D0E14;
  --muted:       #52566B;
  --reading:     #363848;
  --green:       #0B8F69;
}

html[data-theme="light"] body { background: var(--bg); }

html[data-theme="light"] .nav {
  background: rgba(245,241,235,0.9);
}

html[data-theme="light"] .output {
  background: var(--bg);
}

html[data-theme="light"] .input-row {
  background: var(--bg);
}

/* ── THEME TOGGLE BUTTON ─────────────────── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

html[data-theme="light"] body { background: var(--bg); }
html[data-theme="light"] .nav { background: rgba(244,245,255,0.92); }
html[data-theme="light"] .output { background: var(--bg); }
html[data-theme="light"] .input-row { background: var(--bg); }
