/* ============================================
   THE ACCIDENTAL PM — shah-kruti.github.io
   Shared Stylesheet
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #ffffff;
  color: #1a1035;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* --- Typography Scale --- */
h1 { font-size: 2.75rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: 2rem;    font-weight: 600; line-height: 1.2;  letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; font-weight: 500; line-height: 1.35; }
h4 { font-size: 1rem;    font-weight: 500; line-height: 1.4;  }
p  { color: #4a4760; line-height: 1.75; }

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

/* --- Color Tokens --- */
:root {
  --purple-900: #1a1035;
  --purple-700: #3d2fa0;
  --purple-600: #6c5fc7;
  --purple-400: #a99ef5;
  --purple-200: #c4bcf0;
  --purple-100: #e0dcff;
  --purple-50:  #f0eeff;
  --purple-25:  #f8f7ff;

  --gray-700: #4a4760;
  --gray-500: #6b6880;
  --gray-400: #9896a8;
  --gray-200: #dddbe8;
  --gray-100: #f1f0f5;
  --gray-50:  #f8f8fb;

  --white: #ffffff;
  --nav-bg: #1a1035;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(26,16,53,0.08);
  --shadow-md: 0 4px 16px rgba(26,16,53,0.10);
}

/* --- Container --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Navigation --- */
nav {
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--purple-600);
  border-radius: 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.logo-last { color: var(--purple-400); }

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

.nav-links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  font-weight: 400;
  transition: color 0.2s;
  letter-spacing: 0.01em;
}

.nav-links a:hover,
.nav-links a.active { color: #ffffff; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--purple-600);
  color: #ffffff;
}
.btn-primary:hover { background: var(--purple-700); }

.btn-outline {
  background: transparent;
  color: var(--purple-600);
  border: 1.5px solid var(--purple-200);
}
.btn-outline:hover {
  background: var(--purple-50);
  border-color: var(--purple-400);
}

.btn-white {
  background: #ffffff;
  color: var(--purple-700);
}
.btn-white:hover { background: var(--purple-50); }

/* --- Section Spacing --- */
section { padding: 3.5rem 0; }

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple-600);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--purple-900);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.section-sub {
  font-size: 1.0625rem;
  color: var(--gray-500);
  max-width: 560px;
  line-height: 1.7;
}

/* --- Cards --- */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--purple-200);
}

.card-accent {
  background: var(--purple-50);
  border-color: var(--purple-100);
}

/* --- Tags / Pills --- */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--purple-50);
  color: var(--purple-700);
  border: 1px solid var(--purple-100);
}

.tag-gray {
  background: var(--gray-100);
  color: var(--gray-500);
  border-color: var(--gray-200);
}

/* --- Section Rule (——·——) --- */
.section-rule {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0.5rem 0 1.75rem;
}
.section-rule .sr-line { height: 3px; width: 48px; background: var(--purple-600); border-radius: 2px; }
.section-rule .sr-dot  { width: 7px; height: 7px; border-radius: 50%; background: var(--purple-600); flex-shrink: 0; }

/* --- Divider --- */
.divider {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 3rem 0;
}

/* --- Page Hero (inner pages) --- */
.page-hero {
  background: var(--purple-25);
  border-bottom: 1px solid var(--purple-100);
  padding: 3rem 0 2.5rem;
}

.page-hero .section-title { font-size: 2.5rem; }

/* --- Footer --- */
footer {
  background: var(--nav-bg);
  color: rgba(255,255,255,0.5);
  padding: 2.5rem 0;
  font-size: 0.875rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #ffffff;
}

.footer-logo span { color: var(--purple-400); }

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: rgba(255,255,255,0.5);
  font-size: 0.8125rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: #ffffff; }

.footer-built {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  width: 100%;
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 1rem;
}

/* --- Utility --- */
.text-purple { color: var(--purple-600); }
.text-muted  { color: var(--gray-400); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* --- Grid Helpers --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.5rem; }

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* --- Hero 2-col layout --- */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@keyframes svgFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.svg-float-1 { animation: svgFloat 5s ease-in-out infinite; }
.svg-float-2 { animation: svgFloat 5s ease-in-out infinite 1.2s; }
.svg-float-3 { animation: svgFloat 5s ease-in-out infinite 2.4s; }
.svg-float-4 { animation: svgFloat 5s ease-in-out infinite 0.6s; }
.svg-float-5 { animation: svgFloat 5s ease-in-out infinite 1.8s; }

@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-illus-wrap { display: none; }
}

/* --- Story 2-col grid (road + text) --- */
.story-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 768px) {
  .story-grid { grid-template-columns: 1fr; }
  .story-grid .road-col { display: none; }
}

/* --- Career Timeline --- */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 6px;
  bottom: 0;
  width: 2px;
  background: var(--purple-100);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.25rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-2.5rem + 1px);
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--purple-600);
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 2px var(--purple-600);
}

.timeline-date {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--purple-600);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.timeline-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.2rem;
  line-height: 1.4;
}

.timeline-org {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* ============================================
   Dark Mode
   ============================================ */

body { transition: background-color 0.25s ease, color 0.25s ease; }

[data-theme="dark"] {
  /* Section / hero backgrounds — dark but slightly lifted */
  --purple-25:  #171428;
  --purple-50:  #1e1a40;
  --purple-100: #2a2258;
  --purple-200: #3a2e70;

  /* Card surfaces */
  --white:      #1c1933;

  /* Gray-toned areas: light gray → dark gray-purple */
  --gray-50:    #1a1733;
  --gray-100:   #201d3a;
  --gray-200:   #2e2b4e;
  --gray-400:   #7875a0;
  --gray-500:   #9e9bb8;
  --gray-700:   #c8c5e0;

  /* Nav/footer stay deepest */
  --nav-bg:     #0d0a20;
}

/* Base */
[data-theme="dark"] body         { background: #13102a; color: #e0dcff; }
[data-theme="dark"] p            { color: #9e9bb8; }

/* Headings — !important beats inline color:var(--purple-900) on some elements */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4           { color: #e0dcff !important; }
[data-theme="dark"] .section-title { color: #e0dcff !important; }

/* Labels & subtitles */
[data-theme="dark"] .section-label { color: var(--purple-400); }
[data-theme="dark"] .section-sub   { color: #9e9bb8; }

/* Timeline */
[data-theme="dark"] .timeline::before { background: var(--purple-200); }
[data-theme="dark"] .timeline-item::before { border-color: #13102a; }
[data-theme="dark"] .timeline-title { color: var(--gray-700); }

/* White cards in dark mode */
[data-theme="dark"] .card {
  background: #faf9ff;
  border-color: #e0dcff;
}

[data-theme="dark"] .card-accent {
  background: #ede9ff;
  border-color: #c4bcf0;
}

[data-theme="dark"] .card h3,
[data-theme="dark"] .card h4 { color: #1a1035 !important; }

[data-theme="dark"] .card p  { color: #4a4760 !important; }

[data-theme="dark"] .card:hover {
  border-color: #a99ef5;
  box-shadow: 0 4px 20px rgba(108,95,199,0.18);
}

[data-theme="dark"] .card .tag {
  background: #e0dcff;
  color: #3d2fa0;
  border-color: #c4bcf0;
}

/* Tags */
[data-theme="dark"] .tag {
  background: rgba(169,158,245,0.12);
  color: #c4bcf0;
  border-color: rgba(169,158,245,0.25);
}
[data-theme="dark"] .tag-gray {
  background: rgba(255,255,255,0.06);
  color: var(--gray-400);
  border-color: rgba(255,255,255,0.1);
}

/* --- Theme Toggle Button --- */
#theme-toggle {
  background: none;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.7);
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
  margin-left: 1rem;
}

#theme-toggle:hover { border-color: rgba(255,255,255,0.5); color: #ffffff; }

#theme-toggle .icon-moon { display: block; }
#theme-toggle .icon-sun  { display: none; }
[data-theme="dark"] #theme-toggle .icon-moon { display: none; }
[data-theme="dark"] #theme-toggle .icon-sun  { display: block; }

/* Dark-mode footer */
[data-theme="dark"] footer { background: #ffffff; }
[data-theme="dark"] .footer-built { color: var(--purple-600); border-top-color: #e0dcff; }
