/* ========================================
   DESIGN SYSTEM — Dark Terminal Aesthetic
   Rajneesh Sharma Portfolio
   ======================================== */

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

/* --- CSS Custom Properties --- */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-tertiary: #1a1a24;
  --bg-card: #13131d;
  --bg-card-hover: #1a1a28;

  --text-primary: #e4e4ed;
  --text-secondary: #9494a8;
  --text-muted: #5c5c72;
  --text-dim: #3a3a4f;

  --accent: #64ffda;
  --accent-dim: rgba(100, 255, 218, 0.15);
  --accent-glow: rgba(100, 255, 218, 0.08);
  --accent-secondary: #7c8cf8;
  --accent-secondary-dim: rgba(124, 140, 248, 0.15);

  --border: #1e1e2e;
  --border-hover: #2a2a3e;
  --border-accent: rgba(100, 255, 218, 0.2);

  --success: #4ade80;
  --warning: #fbbf24;
  --error: #f87171;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  --leading-tight: 1.25;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  --max-width: 800px;
  --max-width-wide: 1100px;
  --nav-height: 64px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(100, 255, 218, 0.06);

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* --- Light Theme (Claude Artifact inspired) --- */
[data-theme="light"] {
  --bg-primary: #F5F0E8;
  --bg-secondary: #EDE8DF;
  --bg-tertiary: #E6E0D6;
  --bg-card: #FDFAF5;
  --bg-card-hover: #F8F3EB;

  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #7a7a7a;
  --text-dim: #b8b0a4;

  --accent: #C45A2C;
  --accent-dim: rgba(196, 90, 44, 0.12);
  --accent-glow: rgba(196, 90, 44, 0.06);
  --accent-secondary: #8B6914;
  --accent-secondary-dim: rgba(139, 105, 20, 0.12);

  --border: #D9D2C7;
  --border-hover: #C8C0B4;
  --border-accent: rgba(196, 90, 44, 0.3);

  --success: #2D8A4E;
  --warning: #B8860B;
  --error: #C53030;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(196, 90, 44, 0.06);

  --nav-bg: rgba(245, 240, 232, 0.85);
  --nav-bg-mobile: rgba(245, 240, 232, 0.97);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: var(--leading-normal);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Dot grid background */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: radial-gradient(circle, var(--text-dim) 0.5px, transparent 0.5px);
  background-size: 32px 32px;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

a { color: var(--accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--text-primary); }

::selection { background: var(--accent-dim); color: var(--accent); }

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

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--wide {
  max-width: var(--max-width-wide);
}

.section {
  padding: var(--space-4xl) 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-label::before {
  content: '>';
  opacity: 0.5;
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
  line-height: var(--leading-tight);
}

/* ========== NAVBAR ========== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xl);
  background: var(--nav-bg, rgba(10, 10, 15, 0.8));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background var(--transition-base);
}

.navbar__logo {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.navbar__logo span {
  color: var(--accent);
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.navbar__links a {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  position: relative;
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--transition-base);
}

.navbar__links a:hover {
  color: var(--accent);
}

.navbar__links a:hover::after {
  width: 100%;
}

.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.navbar__hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-secondary);
  transition: all var(--transition-base);
}

.navbar__hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.navbar__hamburger.active span:nth-child(2) {
  opacity: 0;
}

.navbar__hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
}

.hero__terminal {
  width: 100%;
}

.hero__prompt {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.hero__prompt .dollar {
  color: var(--accent);
}

.hero__name {
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-md);
}

.hero__title {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.hero__title .chevron {
  color: var(--accent);
  font-size: var(--text-sm);
}

.hero__subtitle {
  font-size: var(--text-base);
  color: var(--text-muted);
  margin-bottom: var(--space-2xl);
  max-width: 540px;
  line-height: var(--leading-relaxed);
}

.hero__cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

/* ========== ABOUT ========== */
.about__text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-2xl);
  max-width: 680px;
}

.about__skills-group {
  margin-bottom: var(--space-xl);
}

.about__skills-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
}

.about__skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ========== EXPERIENCE ========== */
.timeline {
  position: relative;
  padding-left: var(--space-2xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.timeline__item {
  position: relative;
  margin-bottom: var(--space-2xl);
}

.timeline__item:last-child {
  margin-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: calc(-1 * var(--space-2xl) + 3px);
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  z-index: 1;
}

.timeline__item:first-child .timeline__dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-dim);
}

.timeline__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-xs);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.timeline__company {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
}

.timeline__period {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline__role {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.timeline__location {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.timeline__achievements {
  list-style: none;
}

.timeline__achievements li {
  position: relative;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.timeline__achievements li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: var(--text-sm);
}

/* ========== SKILLS ========== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}

.skills-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

.skills-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.skills-card__icon {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
}

.skills-card__title {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.skills-card__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* ========== BLOG PREVIEW ========== */
.blog-preview__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.blog-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.blog-card__date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.blog-card__title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  line-height: var(--leading-tight);
}

.blog-card__excerpt {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-md);
  flex: 1;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.blog-card__tags {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.blog-card__reading-time {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
}

.blog-empty {
  text-align: center;
  padding: var(--space-3xl) 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent);
  transition: gap var(--transition-base);
}

.view-all-link:hover {
  gap: var(--space-md);
  color: var(--accent);
}

/* ========== FOOTER ========== */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) 0;
}

.footer__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__links {
  display: flex;
  gap: var(--space-lg);
}

.footer__links a {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  transition: color var(--transition-fast);
}

.footer__links a:hover {
  color: var(--accent);
}

.footer__copyright {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-dim);
}

/* ========== BADGE / PILL ========== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.badge:hover {
  border-color: var(--border-accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.badge--accent {
  color: var(--accent);
  border-color: var(--border-accent);
  background: var(--accent-dim);
}

.badge--tag {
  font-size: 0.65rem;
  padding: 2px 6px;
}

/* ========== BUTTON ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  box-shadow: var(--shadow-glow);
}

.btn--primary {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.btn--primary:hover {
  background: rgba(100, 255, 218, 0.25);
}

.btn--danger {
  border-color: rgba(248, 113, 113, 0.3);
  color: var(--error);
}

.btn--danger:hover {
  background: rgba(248, 113, 113, 0.1);
  border-color: var(--error);
}

.btn--small {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-xs);
}

/* ========== INPUT ========== */
.input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition-fast);
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.input::placeholder {
  color: var(--text-dim);
}

textarea.input {
  resize: vertical;
  min-height: 120px;
  line-height: var(--leading-relaxed);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

.animate-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger > .animate-in:nth-child(1) { transition-delay: 0ms; }
.stagger > .animate-in:nth-child(2) { transition-delay: 80ms; }
.stagger > .animate-in:nth-child(3) { transition-delay: 160ms; }
.stagger > .animate-in:nth-child(4) { transition-delay: 240ms; }
.stagger > .animate-in:nth-child(5) { transition-delay: 320ms; }
.stagger > .animate-in:nth-child(6) { transition-delay: 400ms; }

/* ========== BLOG PAGE ========== */
.page-header {
  padding-top: calc(var(--nav-height) + var(--space-3xl));
  padding-bottom: var(--space-xl);
}

.page-header__back {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  transition: color var(--transition-fast);
}

.page-header__back:hover {
  color: var(--accent);
}

/* ========== BLOG POST PAGE ========== */
.post-header {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.post-header__date {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.post-header__title {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-md);
}

.post-header__meta {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.post-header__reading-time {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.post-header__tags {
  display: flex;
  gap: var(--space-xs);
}

/* Markdown Rendered Content */
.markdown-body {
  color: var(--text-primary);
  line-height: var(--leading-relaxed);
}

.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
  color: var(--text-primary);
  font-weight: 600;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  line-height: var(--leading-tight);
}

.markdown-body h1 { font-size: var(--text-3xl); }
.markdown-body h2 { font-size: var(--text-2xl); border-bottom: 1px solid var(--border); padding-bottom: var(--space-sm); }
.markdown-body h3 { font-size: var(--text-xl); }
.markdown-body h4 { font-size: var(--text-lg); }

.markdown-body p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.markdown-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.markdown-body ul, .markdown-body ol {
  padding-left: var(--space-xl);
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.markdown-body li { margin-bottom: var(--space-xs); }

.markdown-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: var(--space-md);
  margin: var(--space-lg) 0;
  color: var(--text-muted);
  font-style: italic;
}

.markdown-body code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 2px 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent);
}

.markdown-body pre {
  margin: var(--space-lg) 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border);
}

.markdown-body pre code {
  display: block;
  padding: var(--space-lg);
  background: none;
  border: none;
  border-radius: 0;
  overflow-x: auto;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-primary);
}

.markdown-body img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
}

.markdown-body th, .markdown-body td {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  text-align: left;
}

.markdown-body th { background: var(--bg-tertiary); font-weight: 600; color: var(--text-primary); }
.markdown-body td { color: var(--text-secondary); }

.markdown-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-2xl) 0;
}

/* ========== ADMIN / EDITOR ========== */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.admin-login__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  width: 100%;
  max-width: 400px;
}

.admin-login__title {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.admin-login__subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.admin-login__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.admin-login__error {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--error);
  padding: var(--space-sm);
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: var(--radius-sm);
  display: none;
}

.admin-login__error.show {
  display: block;
}

/* Admin Dashboard */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.admin-header__actions {
  display: flex;
  gap: var(--space-sm);
}

.admin-post-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.admin-post-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  transition: border-color var(--transition-fast);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.admin-post-item:hover {
  border-color: var(--border-hover);
}

.admin-post-item__info {
  flex: 1;
  min-width: 200px;
}

.admin-post-item__title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.admin-post-item__meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: flex;
  gap: var(--space-md);
}

.admin-post-item__actions {
  display: flex;
  gap: var(--space-sm);
}

/* Editor */
.editor-container {
  padding-top: calc(var(--nav-height) + var(--space-xl));
  padding-bottom: var(--space-2xl);
  min-height: 100vh;
}

.editor-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.editor-topbar__actions {
  display: flex;
  gap: var(--space-sm);
}

.editor-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.editor-fields--full {
  grid-column: 1 / -1;
}

.editor-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
  display: block;
}

.editor-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  min-height: 500px;
}

.editor-pane {
  display: flex;
  flex-direction: column;
}

.editor-pane__header {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.editor-textarea {
  flex: 1;
  width: 100%;
  padding: var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  outline: none;
  resize: none;
  line-height: 1.7;
  tab-size: 2;
}

.editor-textarea:focus {
  border-color: var(--accent);
}

.editor-preview {
  flex: 1;
  padding: var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow-y: auto;
}

.editor-toolbar {
  display: flex;
  gap: 2px;
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-bottom: none;
}

.editor-toolbar button {
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.editor-toolbar button:hover {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--border-accent);
}

/* Status indicator */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.status-badge--published {
  color: var(--success);
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.status-badge--draft {
  color: var(--warning);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent);
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-base);
  z-index: 9999;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  :root {
    --text-5xl: 2.25rem;
    --text-4xl: 1.875rem;
    --text-3xl: 1.5rem;
    --space-4xl: 3rem;
  }

  .container { padding: 0 var(--space-md); }

  .navbar__links {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--nav-bg-mobile, rgba(10, 10, 15, 0.95));
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: var(--space-xl);
    gap: var(--space-lg);
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
  }

  .navbar__links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .navbar__hamburger {
    display: flex;
  }

  .theme-toggle {
    margin-right: var(--space-md);
  }

  .editor-split {
    grid-template-columns: 1fr;
  }

  .editor-fields {
    grid-template-columns: 1fr;
  }

  .hero__name {
    font-size: var(--text-4xl);
  }

  .timeline__header {
    flex-direction: column;
  }

  .footer__content {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    justify-content: center;
  }

  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }

  .blog-preview__grid {
    grid-template-columns: 1fr;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  :root {
    --text-5xl: 1.875rem;
    --text-4xl: 1.5rem;
    --text-3xl: 1.25rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .hero__cta {
    flex-direction: column;
  }

  .hero__cta .btn {
    text-align: center;
    justify-content: center;
  }
}

/* ========== THEME TOGGLE ========== */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  flex-shrink: 0;
  margin-left: auto;
  margin-right: var(--space-xl);
}

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

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.theme-icon--sun,
.theme-icon--moon {
  display: none;
}

/* ========== LIGHT THEME OVERRIDES ========== */
[data-theme="light"] body::before {
  background-image: none;
}

[data-theme="light"] .btn--primary {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

[data-theme="light"] .btn--primary:hover {
  background: #B5491F;
  border-color: #B5491F;
  color: #fff;
}

[data-theme="light"] .btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: none;
}

[data-theme="light"] .cursor-blink {
  background: var(--accent);
}

[data-theme="light"] .skills-card:hover {
  box-shadow: var(--shadow-md);
}

[data-theme="light"] .blog-card:hover {
  box-shadow: var(--shadow-md);
}

[data-theme="light"] ::selection {
  background: rgba(196, 90, 44, 0.2);
  color: var(--accent);
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: var(--border);
}

[data-theme="light"] .markdown-body code {
  background: var(--bg-tertiary);
  color: var(--accent);
}

[data-theme="light"] .markdown-body pre {
  background: #2d2d2d !important;
  border-color: #3a3a3a;
}

[data-theme="light"] .markdown-body pre code {
  color: #e4e4ed;
  background: none;
}

[data-theme="light"] .editor-textarea {
  background: var(--bg-card);
  color: var(--text-primary);
}

[data-theme="light"] .status-badge--published {
  color: var(--success);
  background: rgba(45, 138, 78, 0.1);
  border-color: rgba(45, 138, 78, 0.2);
}

[data-theme="light"] .status-badge--draft {
  color: var(--warning);
  background: rgba(184, 134, 11, 0.1);
  border-color: rgba(184, 134, 11, 0.2);
}

[data-theme="light"] .toast {
  background: var(--bg-card);
  color: var(--accent);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg);
}
