:root {
  --bg: #09090b;
  --bg-grid: rgba(255, 255, 255, 0.03);
  --surface: #111114;
  --surface-hover: #18181c;
  --surface-subtle: #0d0d10;
  --border: #27272a;
  --border-strong: #3f3f46;
  --text: #fafafa;
  --text-secondary: #d4d4d8;
  --text-muted: #a1a1aa;
  --accent: #2dd4bf;
  --accent-dim: rgba(45, 212, 191, 0.12);
  --accent-border: rgba(45, 212, 191, 0.3);
  --accent-ink: #042f2e;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="light"] {
  --bg: #fafafa;
  --bg-grid: rgba(9, 9, 11, 0.035);
  --surface: #ffffff;
  --surface-hover: #f4f4f5;
  --surface-subtle: #f4f4f5;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #09090b;
  --text-secondary: #27272a;
  --text-muted: #52525b;
  --accent: #0f766e;
  --accent-dim: rgba(15, 118, 110, 0.08);
  --accent-border: rgba(15, 118, 110, 0.25);
  --accent-ink: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px rgba(0, 0, 0, 0.04);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, var(--bg-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--bg-grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

/* Top Utility Bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

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

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.btn:active {
  transform: translateY(1px);
}

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

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

.btn-mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Card Surface */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

/* Hero Section */
.hero {
  padding: 28px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}

.avatar-wrap {
  width: 112px;
  height: 112px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--surface-subtle);
  flex-shrink: 0;
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin: 0 0 6px;
  letter-spacing: 0.02em;
}

.hero-name {
  margin: 0;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.hero-title {
  margin: 6px 0 0;
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-summary {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--text-muted);
  max-width: 68ch;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

/* Filter Bar */
.filter-section {
  margin-bottom: 24px;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0;
}

.filter-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill:hover {
  border-color: var(--accent);
  color: var(--text);
}

.pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

/* Main Grid */
.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.column-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

/* Experience & Project Cards */
.entry-card {
  padding: 22px;
}

.entry-card:hover {
  border-color: var(--border-strong);
}

.entry-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
}

.entry-role {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.entry-company {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-muted);
  white-space: nowrap;
}

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

.entry-bullets {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 14px;
}

.entry-bullets li {
  margin-bottom: 6px;
}

.entry-bullets li:last-child {
  margin-bottom: 0;
}

.entry-summary {
  margin: 10px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag {
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.tag:hover,
.tag.tag-match {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-dim);
}

/* Sidebar Cards */
.sidebar-card {
  padding: 20px;
}

.sidebar-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cert-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.cert-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.cert-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.cert-issuer {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.skill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.lang-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.edu-school {
  font-size: 14.5px;
  font-weight: 600;
  margin: 10px 0 2px;
}

.edu-degree {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
}

.empty-state {
  padding: 20px;
  font-size: 13.5px;
  color: var(--text-muted);
  text-align: center;
}

/* Footer */
.site-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.visitor-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  background: var(--accent-dim);
  color: var(--accent);
}

/* Responsive */
@media (max-width: 860px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .page {
    padding: 18px 14px 36px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .avatar-wrap {
    width: 84px;
    height: 84px;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Clean Black-on-White Print / PDF Layout */
@media print {
  :root,
  [data-theme="light"] {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-subtle: #ffffff;
    --border: #d4d4d8;
    --border-strong: #a1a1aa;
    --text: #000000;
    --text-secondary: #18181b;
    --text-muted: #3f3f46;
    --accent: #0f766e;
    --accent-dim: transparent;
    --accent-border: #d4d4d8;
    --shadow: none;
  }

  body {
    background: #ffffff !important;
    background-image: none !important;
  }

  .topbar,
  .filter-section,
  .site-footer,
  .no-print {
    display: none !important;
  }

  .page {
    max-width: 100%;
    padding: 0;
  }

  .card {
    box-shadow: none;
    break-inside: avoid;
  }

  .main-grid {
    grid-template-columns: 1.65fr 1fr;
    gap: 16px;
  }
}
