/* ==========================================================================
   TRAN THANH NONG - PORTFOLIO DESIGN SYSTEM
   Modern, Accessible, High-Performance CSS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=JetBrains+Mono:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  /* Color Palette - Dark Theme (Default) */
  --bg-primary: #0a0f1d;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.65);
  --bg-subtle: #1e293b;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;
  
  --accent-primary: #38bdf8;       /* Electric Sky Blue */
  --accent-secondary: #818cf8;     /* Indigo/Violet */
  --accent-emerald: #10b981;       /* Active / Success */
  --accent-amber: #f59e0b;         /* Highlight / Warning */
  --accent-cyan-glow: rgba(56, 189, 248, 0.25);
  --accent-purple-glow: rgba(129, 140, 248, 0.25);
  
  --border-color: rgba(148, 163, 184, 0.12);
  --border-hover: rgba(56, 189, 248, 0.35);
  --border-highlight: rgba(56, 189, 248, 0.6);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px -5px rgba(56, 189, 248, 0.3);
  
  /* Typography */
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Spacing */
  --container-max: 1200px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Override */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(248, 250, 252, 0.8);
  --bg-subtle: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #f8fafc;
  
  --accent-primary: #0284c7;
  --accent-secondary: #6366f1;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-cyan-glow: rgba(2, 132, 199, 0.15);
  --accent-purple-glow: rgba(99, 102, 241, 0.15);
  
  --border-color: rgba(203, 213, 225, 0.8);
  --border-hover: rgba(2, 132, 199, 0.4);
  --border-highlight: rgba(2, 132, 199, 0.7);
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.15);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  font-weight: 400;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
  position: relative;
}

/* Background Gradients */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  transition: opacity var(--transition-normal);
}

[data-theme="light"] .ambient-orb {
  opacity: 0.12;
}

.ambient-orb-1 {
  top: -10%;
  right: -5%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
}

.ambient-orb-2 {
  top: 40%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
}

.ambient-orb-3 {
  bottom: -10%;
  right: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-emerald) 0%, transparent 70%);
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
h4 { font-size: 1.15rem; }

p {
  color: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

code, .font-mono {
  font-family: var(--font-mono);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 0.825rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.section-title {
  margin-bottom: 0.75rem;
}

.section-subtitle {
  max-width: 650px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* Buttons & Interactive Elements */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), #0284c7);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--accent-cyan-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
  filter: brightness(1.1);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
}

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

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Header & Navbar */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.brand-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 2px 8px var(--accent-cyan-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
  padding: 0.25rem 0;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-normal);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.mobile-menu-btn {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  padding-top: 8rem;
  padding-bottom: 4.5rem;
  position: relative;
}

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

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

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

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-name {
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-name {
  background: linear-gradient(135deg, #0f172a 30%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title {
  font-size: 1.35rem;
  color: var(--accent-primary);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.hero-summary {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.meta-item a:hover {
  color: var(--accent-primary);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Terminal / Code Card Visual */
.hero-visual {
  position: relative;
}

.terminal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  overflow: hidden;
  position: relative;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.terminal-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-color);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

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

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

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

.terminal-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
}

.code-line {
  margin-bottom: 0.35rem;
}

.code-prompt { color: var(--accent-emerald); }
.code-cmd { color: var(--accent-primary); }
.code-keyword { color: #f43f5e; }
.code-var { color: #38bdf8; }
.code-str { color: #a78bfa; }
.code-num { color: #fbbf24; }
.code-comment { color: var(--text-muted); }

/* Bento Stats Grid */
.bento-section {
  padding: 2.5rem 0;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
}

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

.bento-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.bento-card:nth-child(2) .bento-icon {
  background: rgba(129, 140, 248, 0.1);
  color: var(--accent-secondary);
}

.bento-card:nth-child(3) .bento-icon {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
}

.bento-card:nth-child(4) .bento-icon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber);
}

.bento-value {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.bento-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.bento-desc {
  font-size: 0.825rem;
  color: var(--text-muted);
}

/* Skills & Architecture Section */
.skills-section {
  padding: 5rem 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.skill-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
}

.skill-category-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

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

.skill-header-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-header h3 {
  font-size: 1.2rem;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.925rem;
  font-weight: 500;
}

.skill-name {
  color: var(--text-primary);
}

.skill-exp {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-primary);
}

.skill-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: var(--radius-full);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.skill-tag:hover {
  border-color: var(--border-hover);
  color: var(--accent-primary);
}

/* Projects Showcase */
.projects-section {
  padding: 5rem 0;
}

.project-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
  position: relative;
}

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

.project-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.project-category-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-primary);
  font-weight: 600;
  text-transform: uppercase;
}

.project-role {
  font-size: 0.85rem;
  color: var(--accent-emerald);
  font-weight: 500;
}

.project-title {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

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

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

.project-highlights {
  list-style: none;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.project-highlight-item {
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.highlight-bullet {
  color: var(--accent-primary);
  font-size: 1rem;
  line-height: 1;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.stack-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

/* Experience Timeline */
.experience-section {
  padding: 5rem 0;
}

.timeline {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background: var(--border-color);
}

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

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

.timeline-node {
  position: absolute;
  left: 12px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-cyan-glow);
  z-index: 1;
}

.timeline-node.current {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 12px var(--accent-emerald);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
}

.timeline-content:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.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-primary);
  font-weight: 600;
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.timeline-duties {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.timeline-duty {
  font-size: 0.925rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.timeline-duty-icon {
  color: var(--accent-primary);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

/* Certifications & Education Grid */
.certs-education-section {
  padding: 5rem 0;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.cert-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.cert-badge-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  border: 2px solid rgba(245, 158, 11, 0.25);
}

.cert-card:nth-child(2) .cert-badge-icon {
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-primary);
  border-color: rgba(56, 189, 248, 0.25);
}

.cert-card:nth-child(3) .cert-badge-icon {
  background: rgba(129, 140, 248, 0.1);
  color: var(--accent-secondary);
  border-color: rgba(129, 140, 248, 0.25);
}

.cert-title {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.cert-issuer {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.cert-year {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--accent-primary);
}

/* Contact & Footer Section */
.contact-section {
  padding: 5rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  position: relative;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem;
  backdrop-filter: blur(20px);
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.contact-channels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.channel-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.channel-box:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.channel-icon {
  color: var(--accent-primary);
}

.channel-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.channel-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.social-link:hover {
  color: var(--accent-primary);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-highlight);
  color: var(--text-primary);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1), toast-out 0.3s ease 2.7s forwards;
  pointer-events: auto;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-channels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  /* -- Navbar & Header Fixes -- */
  .navbar {
    height: 3.75rem;
    gap: 0.5rem;
  }

  .nav-brand {
    font-size: 1rem;
    gap: 0.5rem;
    min-width: 0;
    flex-shrink: 1;
  }

  .nav-brand > span:last-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-badge {
    width: 2rem;
    height: 2rem;
    font-size: 0.85rem;
    flex-shrink: 0;
  }

  .nav-actions {
    flex-shrink: 0;
    gap: 0.5rem;
  }

  /* Hide "CV / Print" text on mobile — icon only */
  .nav-actions .btn-secondary span {
    display: none;
  }

  .nav-actions .btn-secondary {
    padding: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    gap: 0;
  }

  .theme-toggle {
    width: 2.25rem;
    height: 2.25rem;
  }

  .nav-links {
    position: fixed;
    top: 3.75rem;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1rem;
    flex-direction: column;
    gap: 0.25rem;
    display: none;
    z-index: 99;
    box-shadow: var(--shadow-lg);
  }
  
  .nav-links.open {
    display: flex;
  }

  .nav-links .nav-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: background var(--transition-fast), color var(--transition-fast);
  }

  .nav-links .nav-link:hover,
  .nav-links .nav-link.active {
    background: var(--bg-subtle);
  }

  .nav-links .nav-link::after {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
    width: 2.25rem;
    height: 2.25rem;
  }

  /* -- Hero Section -- */
  .hero-section {
    padding-top: 6rem;
    padding-bottom: 3rem;
  }

  .hero-status {
    font-size: 0.78rem;
    padding: 0.3rem 0.75rem;
  }

  .hero-title {
    font-size: 1.15rem;
  }

  .hero-summary {
    font-size: 0.95rem;
  }

  .hero-meta {
    gap: 0.75rem;
    font-size: 0.8rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  /* -- Bento Stats -- */
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .bento-card {
    padding: 1.25rem 1rem;
  }

  .bento-value {
    font-size: 1.75rem;
  }

  /* -- Skills -- */
  .skills-section {
    padding: 3rem 0;
  }

  .skill-category-card {
    padding: 1.5rem;
  }

  /* -- Projects -- */
  .projects-section {
    padding: 3rem 0;
  }

  .project-filters {
    gap: 0.5rem;
    margin-bottom: 1.75rem;
  }

  .filter-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.9rem;
  }

  .project-card {
    padding: 1.5rem;
  }

  /* -- Experience Timeline -- */
  .experience-section {
    padding: 3rem 0;
  }

  .timeline-content {
    padding: 1.25rem;
  }

  .timeline-header {
    flex-direction: column;
    gap: 0.35rem;
  }

  /* -- Certifications -- */
  .certs-education-section {
    padding: 3rem 0;
  }

  .cert-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .cert-card {
    padding: 1.5rem 1.25rem;
  }

  /* -- Contact -- */
  .contact-card {
    padding: 2rem 1.25rem;
  }

  .contact-channels {
    gap: 1rem;
  }
  
  /* -- Footer -- */
  .footer-content {
    flex-direction: column;
    justify-content: center;
  }

  /* -- Section Headers -- */
  .section-header {
    margin-bottom: 2.5rem;
  }

  .section-tag {
    font-size: 0.75rem;
  }
}

/* Small phones (iPhone SE, Galaxy S series, etc.) */
@media (max-width: 400px) {
  .container {
    padding: 0 0.75rem;
  }

  .nav-brand {
    font-size: 0.9rem;
    gap: 0.4rem;
  }

  .brand-badge {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
  }

  /* Hide CV button entirely on very small screens */
  .nav-actions .btn-secondary {
    display: none;
  }

  .hero-section {
    padding-top: 5.5rem;
    padding-bottom: 2rem;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .hero-cta .btn {
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
  }

  .terminal-body {
    padding: 1rem;
    font-size: 0.78rem;
  }
}

/* Print Optimization */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  
  .site-header, .ambient-bg, .theme-toggle, .project-filters, .toast-container, .hero-cta, .social-links, .mobile-menu-btn {
    display: none !important;
  }
  
  .hero-section {
    padding-top: 0 !important;
  }
  
  .terminal-card, .bento-card, .project-card, .timeline-content, .cert-card, .skill-category-card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    background: #ffffff !important;
    page-break-inside: avoid;
  }
  
  h1, h2, h3, h4, p, span {
    color: #000000 !important;
  }
}
