/* =========================================================
   Shekhar Luitel - Developer Portfolio Design System (2026)
   Modern, high-craft, terminal-accented engineering aesthetic
   ========================================================= */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, Monaco, monospace;

  /* Dark Theme (Default) */
  --bg-body: #07090e;
  --bg-surface: #0e131f;
  --bg-surface-elevated: #151d2e;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-terminal: #090d16;
  --terminal-text: #f8fafc;
  --terminal-dim: #94a3b8;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(56, 189, 248, 0.35);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --accent-indigo: #818cf8;
  --accent-amber: #f59e0b;
  --glow-cyan: rgba(56, 189, 248, 0.15);
  --glow-emerald: rgba(16, 185, 129, 0.15);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --header-height: 72px;
}

[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-terminal: #0d1322;
  --terminal-text: #f8fafc;
  --terminal-dim: #94a3b8;
  --border-subtle: #e2e8f0;
  --border-active: rgba(2, 106, 161, 0.45);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent-cyan: #026aa1;
  --accent-emerald: #047857;
  --accent-indigo: #4338ca;
  --accent-amber: #b45309;
  --glow-cyan: rgba(2, 106, 161, 0.12);
  --glow-emerald: rgba(4, 120, 87, 0.12);
  --shadow-card: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
  color-scheme: dark;
}

[data-theme="light"] {
  color-scheme: light;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background Grid / Ambient Glow */
.bg-grid-overlay {
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.08), transparent 45%),
    radial-gradient(circle at 90% 40%, rgba(129, 140, 248, 0.05), transparent 40%),
    radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 32px 32px;
  pointer-events: none;
  z-index: -1;
}

[data-theme="light"] .bg-grid-overlay {
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.06), transparent 45%),
    radial-gradient(circle at 90% 40%, rgba(99, 102, 241, 0.04), transparent 40%),
    radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* Container */
.container {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* Typography Helpers */
.font-mono {
  font-family: var(--font-mono);
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-indigo) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent-cyan);
}

.badge-status {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
}

.btn-outline {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
  background: var(--bg-surface-elevated);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  min-height: var(--header-height);
  height: auto;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  display: flex;
  align-items: center;
}

[data-theme="light"] .site-header {
  background: rgba(248, 250, 252, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-cyan);
}

.brand-code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-cyan);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 1.5vw, 1.5rem);
  list-style: none;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding-block: 0.25rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-cyan);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-cyan);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.theme-toggle-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  padding-block: 4.5rem 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-eyebrow {
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-top: 1.75rem;
  margin-top: 1.5rem;
  scroll-margin-top: calc(var(--header-height) + 30px);
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Hero Card / Code Sandbox Side */
.hero-visual {
  position: relative;
}

.portrait-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

.portrait-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
  filter: contrast(1.05);
}

.portrait-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(7, 9, 14, 0.95), transparent);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.portrait-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff !important;
}

.portrait-info p {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

/* Interactive Developer Terminal Section */
.terminal-card {
  background: var(--bg-terminal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  font-family: var(--font-mono);
  margin-block: 2.5rem;
}

.terminal-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  gap: 0.45rem;
}

.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-title {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 1.25rem;
  color: var(--terminal-text, #f8fafc);
  font-size: 0.88rem;
  min-height: 180px;
  max-height: 320px;
  overflow-y: auto;
}

.terminal-line {
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.prompt-symbol {
  color: var(--accent-emerald);
  margin-right: 0.5rem;
  font-weight: 700;
}

.command-highlight {
  color: var(--accent-cyan);
}

.output-dim {
  color: var(--terminal-dim, #94a3b8);
}

.terminal-input-row {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
}

.terminal-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--terminal-text, #f8fafc);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  flex: 1;
}

.terminal-quick-cmds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-subtle);
  align-items: center;
}

.quick-cmd-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.quick-cmd-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
}

/* Sections Common */
.section {
  padding-block: 4rem;
}

.section-header {
  margin-bottom: 2.75rem;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-desc {
  color: var(--text-secondary);
  max-width: 620px;
  margin-top: 0.5rem;
  font-size: 1.05rem;
}

/* Experience Section (Timeline) */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-indigo), var(--border-subtle));
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

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

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.timeline-card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: all 0.25s;
}

.timeline-card:hover {
  border-color: var(--border-active);
  transform: translateX(4px);
  box-shadow: var(--shadow-card);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.timeline-role {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-company {
  color: var(--accent-cyan);
  font-weight: 600;
}

.timeline-duration {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.75rem;
}

.timeline-bullets li {
  position: relative;
  padding-left: 1.25rem;
}

.timeline-bullets li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-emerald);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  gap: 1.75rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-indigo));
  opacity: 0;
  transition: opacity 0.3s;
}

.project-card:hover {
  border-color: var(--border-active);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6);
}

.project-card:hover::before {
  opacity: 1;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.project-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.project-type {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-highlights {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.project-highlights span::before {
  content: '✓ ';
  color: var(--accent-emerald);
  font-weight: bold;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* Skills Matrix */
.skills-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.skill-tab-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.skill-tab-btn.active, .skill-tab-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all 0.2s;
}

.skill-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.skill-card-icon {
  font-size: 1.4rem;
}

.skill-card-title {
  font-weight: 600;
  font-size: 1.05rem;
}

.skill-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Education & Credentials Section */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  gap: 1.5rem;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.edu-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.edu-status-badge {
  position: static;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.edu-degree {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  flex: 1;
}

.edu-institution {
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 0.65rem;
}

.edu-meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.edu-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 0.85rem;
  transition: all 0.2s;
}

.contact-item:hover {
  border-color: var(--accent-cyan);
}

.contact-item-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
  margin-right: 0.5rem;
}

.contact-icon {
  font-size: 1.25rem;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.contact-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.contact-value {
  font-weight: 600;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.copy-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.copy-btn:hover {
  color: var(--accent-cyan);
  background: var(--bg-surface-elevated);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding-block: 2.5rem;
  margin-top: 4rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-socials {
  display: flex;
  gap: 1.25rem;
}

.footer-socials a:hover {
  color: var(--accent-cyan);
}

/* Toast notification */
.toast-msg {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--accent-emerald);
  color: var(--text-primary);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Blog & Engineering Notes Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  gap: 1.75rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  text-decoration: none;
  overflow: hidden;
}

.blog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald));
  opacity: 0;
  transition: opacity 0.3s;
}

.blog-card:hover {
  border-color: var(--border-active);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5);
}

.blog-card:hover::before {
  opacity: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.blog-badge {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent-cyan);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-badge-atlassian {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.35);
  color: #38bdf8;
}

.blog-badge-linux {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.blog-badge-git {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.blog-badge-career {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.35);
  color: #a78bfa;
}

/* Blog Publication Hub Clearance */
.blog-hub-main {
  padding-top: calc(var(--header-height) + 2.5rem) !important;
}

/* Blog Publication Toolbar & Category Filtering */
.blog-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.75rem;
  margin-bottom: 2.25rem;
}

.blog-search-box {
  position: relative;
  max-width: 580px;
  width: 100%;
}

.blog-search-box input {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-full);
  padding: 0.75rem 1.25rem 0.75rem 2.85rem;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.blog-search-box input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
  background: var(--bg-surface-elevated);
}

.blog-search-box .search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.blog-categories-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.category-pill {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}

.category-pill:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
  transform: translateY(-1px);
}

.category-pill.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

.category-pill .pill-count {
  font-size: 0.72rem;
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.09);
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
}

/* Dev.to-style Featured Spotlight Card */
.devto-featured-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.75rem;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 8px 30px -10px rgba(0, 0, 0, 0.4);
}

.devto-featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-indigo));
  z-index: 2;
}

.devto-featured-card:hover {
  border-color: var(--border-active);
  transform: translateY(-3px);
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.55);
}

.devto-featured-cover {
  width: 100%;
  height: 210px;
  max-height: 220px;
  overflow: hidden;
  position: relative;
  background: var(--bg-surface);
}

.devto-featured-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  transition: transform 0.4s ease;
}

.devto-featured-card:hover .devto-featured-cover img {
  transform: scale(1.02);
}

.devto-featured-body {
  padding: 1.75rem 2rem;
}

.devto-featured-title {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.3;
  margin: 0.6rem 0 0.85rem;
}

.devto-featured-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.devto-featured-card:hover .devto-featured-title a {
  color: var(--accent-cyan);
}

.devto-featured-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* Dev.to-style Feed Grid & Cards */
.devto-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.devto-card:hover {
  border-color: var(--border-active);
  transform: translateY(-3px);
  box-shadow: 0 16px 35px -10px rgba(0, 0, 0, 0.45);
}

.devto-cover-wrap {
  width: 100%;
  height: 175px;
  max-height: 185px;
  overflow: hidden;
  position: relative;
  background: var(--bg-surface);
}

.devto-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  transition: transform 0.35s ease;
}

.devto-card:hover .devto-cover-img {
  transform: scale(1.03);
}

.devto-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.devto-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.devto-author-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.devto-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-cyan);
  flex-shrink: 0;
}

.devto-author-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.devto-author-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.devto-post-date {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.devto-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.devto-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.devto-card:hover .devto-card-title a {
  color: var(--accent-cyan);
}

.devto-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.devto-tag {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  transition: all 0.15s ease;
}

.devto-tag:hover {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.3);
}

.devto-tag .tag-hash {
  color: var(--accent-cyan);
  opacity: 0.7;
}

.devto-excerpt {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.devto-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.84rem;
}

.devto-meta-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.devto-reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.devto-reaction-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.devto-reaction-btn.liked {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.devto-reaction-btn.liked .heart-icon {
  fill: #ef4444;
  stroke: #ef4444;
  animation: heartPulse 0.35s ease;
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.devto-discussion-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.devto-discussion-link:hover {
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.25);
  background: rgba(6, 182, 212, 0.06);
}

.devto-meta-pill {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.blog-card.hidden, .devto-card.hidden {
  display: none !important;
}

.empty-results-msg {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  grid-column: 1 / -1;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
}

.blog-card-title {
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.blog-card:hover .blog-card-title {
  color: var(--accent-cyan);
}

.blog-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.95rem;
  font-size: 0.85rem;
}

.blog-read-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-cyan);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

.blog-card:hover .blog-read-link, .devto-card:hover .blog-read-link {
  text-decoration: underline;
}

/* Blog Article Media & Related Posts */
.article-figure {
  margin: 2rem 0 2.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.article-figure img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center 25%;
  max-height: 380px;
}

.article-figure figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.related-posts-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-subtle);
}

.related-posts-header {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* AI Quick Summary & GEO Direct Answer Block */
.ai-quick-summary {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0 2.25rem;
}

.ai-quick-summary .summary-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.ai-quick-summary ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

.ai-quick-summary li {
  margin-bottom: 0.45rem;
}

.ai-quick-summary li:last-child {
  margin-bottom: 0;
}

/* FAQ Section for Google & AI Search */
.article-faq-section {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-subtle);
}

.faq-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-card:hover {
  border-color: var(--border-active);
}

.faq-card summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}

.faq-card summary::-webkit-details-marker {
  display: none;
}

.faq-card summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  transition: transform 0.2s;
}

.faq-card[open] summary::after {
  content: '−';
}

.faq-card-body {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.85rem;
}

/* Responsive Media Queries */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.4);
    z-index: 100;
  }
  .nav-menu.open {
    display: flex;
  }
  .mobile-menu-btn {
    display: block;
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: 1rem;
  }
  .hero-section {
    padding-block: 2.5rem 2rem;
  }
  .hero-title {
    font-size: clamp(1.85rem, 8vw, 2.5rem);
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .projects-grid, .edu-grid, .blog-grid {
    grid-template-columns: 1fr;
  }
  .timeline {
    padding-left: 1.25rem;
  }
  .timeline::before {
    left: 4px;
  }
  .timeline-marker {
    left: -1.25rem;
    width: 14px;
    height: 14px;
  }
  .timeline-card {
    padding: 1.15rem;
  }
  .terminal-header .terminal-title {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

