:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a2234;
  --bg-card-hover: #1f2a40;
  --border: #2a3548;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --green: #10b981;
  --orange: #f59e0b;
  --purple: #8b5cf6;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.1rem;
}

.logo:hover { color: var(--text-primary); }

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.main-nav {
  display: flex;
  gap: 0.25rem;
}

.main-nav a {
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: 0.2s;
}

/* Hero */
.hero {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
}

.hero-with-bg {
  background: var(--bg-primary) url('/images/hero-bg.webp') center/cover no-repeat;
}

.hero-with-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(10, 14, 23, 0.92) 0%, rgba(10, 14, 23, 0.75) 55%, rgba(10, 14, 23, 0.5) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: var(--accent-glow);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  max-width: 800px;
  margin-bottom: 1.25rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-glow {
  position: absolute;
  top: -200px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover { color: var(--text-primary); }

.btn-sm { padding: 0.4rem 1rem; font-size: 0.8rem; }

.btn-block { width: 100%; margin-top: 1rem; }

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-secondary); }

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
}

.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-header p { color: var(--text-secondary); }

.page-header-banner {
  padding: 4rem 0 3rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--border);
  position: relative;
  min-height: 200px;
  max-height: 320px;
  overflow: hidden;
}

.page-header-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 14, 23, 0.94) 0%, rgba(10, 14, 23, 0.7) 100%);
}

.page-header-overlay {
  position: relative;
  z-index: 1;
}

.page-header-overlay p {
  color: var(--text-secondary);
  max-width: 640px;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); font-size: 0.85rem; }

/* Topic Grid */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  width: 100%;
}

.topic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  transition: all 0.25s;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.topic-card-media {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 62.5%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.topic-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.topic-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
}

.topic-card-body h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.topic-card-body p { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 0.75rem; }

.topic-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--text-primary);
}

.topic-icon { font-size: 2rem; display: block; margin-bottom: 0.75rem; }
.topic-card h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.topic-card p { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 0.75rem; }
.topic-count { font-size: 0.75rem; color: var(--accent); font-weight: 600; }

/* Split Panel */
.split-panel {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}

.check-list {
  list-style: none;
  margin: 1.5rem 0 2rem;
}

.check-list li {
  padding: 0.5rem 0 0.5rem 1.75rem;
  position: relative;
  color: var(--text-secondary);
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.profile-title { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1rem; }

.profile-contact {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.cert-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }

.badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  background: var(--accent-glow);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 999px;
  color: var(--accent);
}

/* Service Grid */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.service-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.service-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* Knowledge Base Tabs */
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.tab-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem 0.4rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.tab-thumb {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.tab-item:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.tab-item.active {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

.tab-icon { font-size: 1rem; }

.topic-header {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.topic-banner-img {
  width: 140px;
  height: 88px;
  max-width: 140px;
  max-height: 88px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.topic-icon-lg { font-size: 3rem; }

.topic-header h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.topic-header p { color: var(--text-secondary); }

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.article-meta { margin-bottom: 0.75rem; }

.article-type {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.article-type.config {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent);
}

.article-type.knowledge {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple);
}

.article-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.article-card > p { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 1rem; }

.article-detail {
  margin-top: 1rem;
  animation: fadeIn 0.3s ease;
}

.article-detail.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.code-block-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.copy-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}

.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }

pre {
  margin: 0;
  padding: 1rem;
  background: #0d1117;
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
}

code {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: #c9d1d9;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Consulting */
.consulting-intro {
  max-width: 720px;
  margin-bottom: 2.5rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.consulting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.consulting-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.consulting-card.featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), var(--bg-card));
}

.consulting-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.consulting-card h3 { font-size: 1.05rem; margin-bottom: 0.75rem; }

.consulting-card ul {
  list-style: none;
  padding: 0;
}

.consulting-card li {
  padding: 0.35rem 0 0.35rem 1.25rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.consulting-card li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.cta-panel {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem 2rem;
}

.cta-panel h2 { margin-bottom: 0.75rem; }
.cta-panel p { color: var(--text-secondary); margin-bottom: 1.5rem; max-width: 500px; margin-left: auto; margin-right: auto; }

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* Resume */
.resume-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.resume-sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.sidebar-block h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.sidebar-block a,
.sidebar-block span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.cert-item {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.cert-item strong { display: block; margin-bottom: 0.15rem; }

.cert-status {
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}

.cert-status.certified {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
}

.cert-status.progress {
  background: rgba(245, 158, 11, 0.15);
  color: var(--orange);
}

.skill-group { margin-bottom: 0.75rem; }
.skill-group strong { font-size: 0.8rem; display: block; margin-bottom: 0.25rem; }
.skill-group ul { list-style: none; padding: 0; }
.skill-group li { font-size: 0.8rem; color: var(--text-secondary); padding: 0.1rem 0; }

.resume-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.resume-block h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.highlight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.highlight-tag {
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
}

.experience-item {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.experience-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.exp-header h3 { font-size: 1rem; }
.company { color: var(--text-secondary); font-size: 0.85rem; }
.period { font-size: 0.8rem; color: var(--accent); white-space: nowrap; font-weight: 500; }

.experience-item ul {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.experience-item li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.tool-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.tool-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 2rem;
  background: var(--bg-secondary);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-brand p { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.25rem; }

.footer-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
}

.footer-copy {
  width: 100%;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 900px) {
  .split-panel,
  .resume-layout {
    grid-template-columns: 1fr;
  }

  .resume-sidebar { position: static; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
  }

  .main-nav.open { display: flex; }

  .hero { padding: 4rem 0 3rem; }

  .articles-grid,
  .consulting-grid {
    grid-template-columns: 1fr;
  }

  .exp-header { flex-direction: column; }
}
