/* ==========================================================================
   MINIMALIST PERSONAL WEBSITE STYLESHEET
   Typography: Poppins
   Accent: Purple (#6b3ba7 light / #d5b3ff dark) - 60-30-10 rule
   Aesthetic: Content-first, zero animations, pure clarity.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

:root {
  /* Light Theme (Clean Paper & Purple Accent #6b3ba7) */
  --bg: #faf9f6;
  --bg-secondary: #f3f1ec;
  --text: #1a1a1c;
  --text-muted: #5c5852;
  --text-subtle: #878279;
  --border: #e4e1d8;
  --code-bg: #eeebe3;
  --card-bg: #ffffff;

  /* Accent: Purple #6b3ba7 (< 10%) */
  --accent: #6b3ba7;
  --link: #6b3ba7;
  --link-hover: #502782;
  --selection: rgba(107, 59, 167, 0.18);
  --badge-bg: rgba(107, 59, 167, 0.08);
  --badge-text: #6b3ba7;
  --nav-active: #6b3ba7;

  /* Typography Stack: Poppins */
  --font-main: "Poppins", "Noto Sans Devanagari", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;

  /* Layout */
  --max-width: 680px;
  --line-height: 1.75;
}

[data-theme="dark"] {
  /* Dark Theme (Deep Charcoal Canvas & Purple Accent #d5b3ff) */
  --bg: #131315;
  --bg-secondary: #1c1c20;
  --text: #e5e5e8;
  --text-muted: #a3a3ab;
  --text-subtle: #73737c;
  --border: #28282e;
  --code-bg: #1f1f25;
  --card-bg: #18181c;

  /* Accent: Lavender Purple #d5b3ff (< 10%) */
  --accent: #d5b3ff;
  --link: #d5b3ff;
  --link-hover: #e9d8ff;
  --selection: rgba(213, 179, 255, 0.28);
  --badge-bg: rgba(213, 179, 255, 0.14);
  --badge-text: #d5b3ff;
  --nav-active: #d5b3ff;
}

/* Zero Animations & Instant Rendering */
*, *::before, *::after {
  box-sizing: border-box;
  transition: none !important;
  animation: none !important;
}

::selection {
  background-color: var(--selection);
  color: var(--text);
}

html {
  font-size: 16px;
  background-color: var(--bg);
  color: var(--text);
  color-scheme: light dark;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  font-weight: 400;
  line-height: var(--line-height);
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   Layout Container
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem 1.25rem;
}

/* --------------------------------------------------------------------------
   Navigation & Header
   -------------------------------------------------------------------------- */
.site-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.site-avatar {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  object-fit: cover;
  display: block;
}

.site-title {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.site-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.15rem;
  font-size: 0.92rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding-bottom: 2px;
}

.nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--nav-active);
  font-weight: 600;
  border-bottom: 2px solid var(--nav-active);
}

/* Minimalist Theme Toggle */
.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.2;
}

.theme-toggle-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background-color: var(--bg-secondary);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  color: var(--text);
  line-height: 1.35;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  letter-spacing: -0.015em;
  font-weight: 600;
}

h1 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-top: 0;
}

h2 {
  font-size: 1.3rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
  margin-top: 2.5rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 500;
}

p {
  margin-top: 0;
  margin-bottom: 1.25rem;
  font-weight: 400;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--link-hover);
}

strong {
  font-weight: 600;
  color: var(--text);
}

em {
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Page Date Stamp */
.page-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1.5rem;
  margin-bottom: 0;
}

/* Blockquotes with 2px solid purple accent border */
blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  border-left: 2px solid var(--accent);
  color: var(--text-muted);
  font-style: italic;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* Lists */
ul, ol {
  margin: 0 0 1.25rem 0;
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.45rem;
}

/* Code */
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background-color: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

pre {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background-color: var(--code-bg);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  border: 1px solid var(--border);
  line-height: 1.5;
  margin: 1.5rem 0;
}

pre code {
  background: none;
  padding: 0;
}

/* --------------------------------------------------------------------------
   Post & Article Styling
   -------------------------------------------------------------------------- */
.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.article-title {
  margin-bottom: 0.5rem;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.article-meta .separator {
  color: var(--text-subtle);
}

/* Subtle Badges / Tags with purple accent tint */
.tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  background-color: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid transparent;
  padding: 0.12rem 0.48rem;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 500;
}

.tag:hover {
  text-decoration: none;
  border-color: var(--accent);
}

/* Work in Progress / Note Box */
.empty-state-box {
  background-color: var(--bg-secondary);
  border-left: 2px solid var(--accent);
  padding: 1.25rem 1.4rem;
  margin: 2rem 0 1.5rem 0;
  border-radius: 0 4px 4px 0;
}

.empty-state-box p {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.65;
}

/* Sidenotes */
.sidenote-box {
  background-color: var(--bg-secondary);
  border-left: 2px solid var(--accent);
  padding: 0.85rem 1.1rem;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  border-radius: 0 4px 4px 0;
}

.sidenote-box p:last-child {
  margin-bottom: 0;
}

.sidenote-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.35rem;
  display: block;
}

/* Footnotes */
.footnotes {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footnotes ol {
  padding-left: 1.2rem;
}

/* --------------------------------------------------------------------------
   Footer - Identical across all pages
   Left: Email, LinkedIn, Instagram
   Right: "Static · No trackers"
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-note {
  font-size: 0.85rem;
  color: var(--text-subtle);
}

/* --------------------------------------------------------------------------
   Mobile Responsiveness
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  html {
    font-size: 15.5px;
  }

  .container {
    padding: 1.5rem 1rem 3rem 1rem;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}
