/* ==========================================================================
   Bui Hoang Ha Portfolio - Modern Design System
   Light & Dark Mode, Glassmorphism, Micro-interactions, Responsive
   ========================================================================== */

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

/* --- Root & Theme Variables --- */
:root {
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', var(--font-sans);
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Light Theme (Default) */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --bg-header: rgba(255, 255, 255, 0.85);

  --text-dark: #0f172a;
  --text-main: #334155;
  --text-light: #64748b;
  --text-muted: #94a3b8;

  --border: #e2e8f0;
  --border-focus: #cbd5e1;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-light: #eef2ff;
  --accent-glow: rgba(79, 70, 229, 0.12);
  --gradient-accent: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  --gradient-hero: linear-gradient(135deg, #1e1b4b 0%, #4338ca 50%, #0284c7 100%);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.15);

  --code-bg: #f8fafc;
  --code-border: #e2e8f0;
  --code-text: #0f172a;

  --badge-bg: #f1f5f9;
  --badge-text: #475569;
  --badge-border: #e2e8f0;
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-body: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #162036;
  --bg-surface-subtle: #1e293b;
  --bg-header: rgba(9, 13, 22, 0.85);

  --text-dark: #f8fafc;
  --text-main: #cbd5e1;
  --text-light: #94a3b8;
  --text-muted: #64748b;

  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 255, 255, 0.18);

  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-light: rgba(99, 102, 241, 0.15);
  --accent-glow: rgba(99, 102, 241, 0.25);
  --gradient-accent: linear-gradient(135deg, #6366f1 0%, #38bdf8 100%);
  --gradient-hero: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #818cf8 100%);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.2);

  --code-bg: #0b1120;
  --code-border: rgba(255, 255, 255, 0.1);
  --code-text: #e2e8f0;

  --badge-bg: rgba(255, 255, 255, 0.06);
  --badge-text: #cbd5e1;
  --badge-border: rgba(255, 255, 255, 0.1);
}

/* Base reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.65;
  font-weight: 400;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  position: relative;
  overflow-x: hidden;
}

/* Ambient glow in background */
body::before {
  content: '';
  position: fixed;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -250px;
  left: -250px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Container */
.container {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem 1.25rem 4rem;
  position: relative;
  z-index: 1;
}

@media (min-width: 640px) {
  .container {
    padding: 2rem 2rem 5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 2.5rem 2.5rem 6rem;
  }
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 1rem;
  z-index: 50;
  margin-bottom: 2.5rem;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 0.75rem 1.25rem;
  transition: all var(--transition-normal);
}

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

.header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.avatar-wrapper {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal);
}

.avatar-wrapper:hover .avatar-img {
  transform: scale(1.06);
}

/* Status indicator badge (Open to work) */
.status-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 13px;
  height: 13px;
  background-color: #10b981;
  border: 2px solid var(--bg-surface);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.status-indicator::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  border: 2px solid #10b981;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.9; }
  70% { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-dark);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.brand-role {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Navigation Links */
.nav-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background-color: var(--accent-light);
}

/* Theme Toggle Button */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.theme-toggle-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border);
  color: var(--text-dark);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    display: none;
  }

  .nav-links.nav-open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
}

/* Legacy Header Fallback (for existing HTML files before rewrite) */
header:not(.site-header) {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
}

@media (min-width: 640px) {
  header:not(.site-header) {
    flex-direction: row;
    gap: 2rem;
    padding: 1.5rem 2rem;
  }
}

header:not(.site-header) .header-avatar {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

header:not(.site-header) .header-avatar img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border);
}

header:not(.site-header) .logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
  text-decoration: none;
  display: block;
}

header:not(.site-header) nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

header:not(.site-header) nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

header:not(.site-header) nav a:hover {
  color: var(--accent);
  background-color: var(--accent-light);
}

/* ==========================================================================
   Main Layout & Card Sections
   ========================================================================== */
.content-grid {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.card-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2rem 1.5rem;
  position: relative;
  transition: box-shadow var(--transition-normal), border-color var(--transition-normal);
}

@media (min-width: 640px) {
  .card-section {
    padding: 3rem 2.5rem;
  }
}

.card-section:hover {
  border-color: var(--border-focus);
}

.section-header {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  color: var(--text-dark);
  margin-top: 0;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .section-header {
    font-size: 2rem;
  }
}

.section-header::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.35em;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  align-self: flex-start;
}

.hero-pill-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-dark);
  margin: 0;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3.25rem;
  }
}

.hero-title .text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.7;
  margin: 0;
}

@media (min-width: 640px) {
  .hero-subtitle {
    font-size: 1.25rem;
  }
}

.hero-subtitle .highlight-rails {
  color: #e11d48;
  font-weight: 600;
}

.hero-subtitle .highlight-ai {
  color: #8b5cf6;
  font-weight: 600;
}

.hero-description {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.7;
  margin: 0;
}

/* Metric / Highlight Badges Grid */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 0.5rem;
}

@media (min-width: 768px) {
  .hero-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hero-stat-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: all var(--transition-normal);
}

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

.hero-stat-value {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Hero Actions / Buttons */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.925rem;
  font-weight: 600;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
  line-height: 1;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-secondary {
  background: var(--bg-surface-subtle);
  color: var(--text-dark);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.btn-copy-email {
  background: var(--bg-surface);
  border-color: var(--border);
  color: var(--text-main);
}

.btn-copy-email:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-copy-email.copied {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

/* Social pills in hero */
.hero-socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.social-pill:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-1px);
}

.info-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

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

.project-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.project-badge {
  display: inline-block;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.project-icon-link {
  color: var(--text-muted);
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.project-card:hover .project-icon-link {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

.project-description {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.65;
  margin: 0 0 1.5rem 0;
  flex-grow: 1;
}

.project-tech-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  align-items: center;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.775rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-md);
  background: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--badge-border);
}

.tech-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.tech-rails { background: #e11d48; }
.tech-python { background: #3b82f6; }
.tech-javascript { background: #eab308; }
.tech-docker { background: #0ea5e9; }
.tech-aws { background: #f97316; }
.tech-ml { background: #8b5cf6; }
.tech-postgresql { background: #336791; }
.tech-css { background: #06b6d4; }

.project-action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.5rem;
  text-decoration: none;
}

.project-action-link svg {
  transition: transform var(--transition-fast);
}

.project-card:hover .project-action-link svg {
  transform: translateX(4px);
}

/* ==========================================================================
   Experience & Education Timeline
   ========================================================================== */
.timeline-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-left: 1.75rem;
  margin: 1.5rem 0 2.5rem;
}

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

.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-dot {
  position: absolute;
  top: 6px;
  left: -1.75rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
  z-index: 2;
}

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

.timeline-role {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
}

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

.timeline-date {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-surface-subtle);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.65;
  margin: 0;
}

.timeline-bullets {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.25rem;
  color: var(--text-main);
}

.timeline-bullets li {
  margin-bottom: 0.5rem;
  font-size: 0.925rem;
  line-height: 1.6;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

/* ==========================================================================
   Skills Grid
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

@media (min-width: 640px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.skill-category {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition-normal);
}

.skill-category:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.skill-category h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-category h4 svg {
  color: var(--accent);
}

.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.skill-pill {
  font-size: 0.825rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-main);
}

/* ==========================================================================
   Blog & Articles Section
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.blog-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
  position: relative;
  text-decoration: none;
  color: inherit;
}

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

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

.blog-category-tag {
  display: inline-block;
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.tag-rails { background: rgba(225, 29, 72, 0.12); color: #e11d48; border: 1px solid rgba(225, 29, 72, 0.25); }
.tag-ai { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; border: 1px solid rgba(139, 92, 246, 0.25); }
.tag-api { background: rgba(14, 165, 233, 0.12); color: #0ea5e9; border: 1px solid rgba(14, 165, 233, 0.25); }
.tag-personal { background: rgba(22, 163, 74, 0.12); color: #16a34a; border: 1px solid rgba(22, 163, 74, 0.25); }
.tag-mlops { background: rgba(249, 115, 22, 0.12); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.25); }

.blog-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.35;
  margin: 0 0 0.75rem 0;
}

.blog-title a {
  color: inherit;
  text-decoration: none;
}

.blog-excerpt {
  font-size: 0.925rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0 0 1.25rem 0;
  flex-grow: 1;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.blog-read-more svg {
  transition: transform var(--transition-fast);
}

.blog-card:hover .blog-read-more svg {
  transform: translateX(4px);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-card {
  background: var(--gradient-hero);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 2.5rem 1.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-xl);
}

@media (min-width: 640px) {
  .contact-card {
    padding: 3.5rem 3rem;
  }
}

.contact-card h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}

.contact-card p {
  font-size: 1.1rem;
  max-width: 580px;
  margin: 0;
  opacity: 0.9;
  line-height: 1.65;
}

.contact-card .contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.contact-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.925rem;
  text-decoration: none;
  transition: all var(--transition-normal);
}

.contact-link-btn:hover {
  background: #ffffff;
  color: #0f172a;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .site-footer {
    flex-direction: row;
  }
}

.site-footer a {
  color: var(--text-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* Back to Top Floating Button */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-dark);
  box-shadow: var(--shadow-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--transition-normal);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text-dark);
  color: var(--bg-surface);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast-notification.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Article / Blog Post Internal Pages (blog_1.html to blog_5.html)
   ========================================================================== */
.blog-content {
  background: var(--bg-surface);
  padding: 2rem 1.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  margin-top: 1.5rem;
}

@media (min-width: 640px) {
  .blog-content {
    padding: 3.5rem 3rem;
  }
}

.blog-content h1 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.blog-content h2 {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.blog-content h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.blog-content p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-main);
}

.blog-content pre {
  background: var(--code-bg);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--code-border);
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--code-text);
  line-height: 1.6;
}

.blog-content code {
  font-family: var(--font-mono);
  background: var(--code-bg);
  color: var(--accent);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  font-size: 0.875rem;
  border: 1px solid var(--code-border);
}

.blog-content pre code {
  background: none;
  padding: 0;
  border: none;
  color: inherit;
}

.blog-content blockquote {
  border-left: 4px solid var(--accent);
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--accent-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-dark);
}

.blog-content ul, .blog-content ol {
  margin: 1.5rem 0;
  padding-left: 1.75rem;
  color: var(--text-main);
}

.blog-content li {
  margin-bottom: 0.65rem;
  line-height: 1.7;
}

.back-link {
  margin-bottom: 1.5rem;
}

.back-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.back-link a:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
  transform: translateX(-3px);
}

.author-info {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-style: italic;
  color: var(--text-light);
  text-align: center;
}
