:root {
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --primary-accent: #2563eb;
  --primary-accent-hover: #1d4ed8;
  --badge-bg: #eff6ff;
  --badge-text: #1d4ed8;
  --tag-bg: #f1f5f9;
  --tag-text: #475569;
  --nav-bg: rgba(255, 255, 255, 0.9);
  --bottom-bar-bg: rgba(255, 255, 255, 0.92);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  --bg-primary: #0b0f19;
  --bg-surface: #111827;
  --bg-card: #151f32;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #1e293b;
  --primary-accent: #3b82f6;
  --primary-accent-hover: #60a5fa;
  --badge-bg: rgba(59, 130, 246, 0.15);
  --badge-text: #93c5fd;
  --tag-bg: #1e293b;
  --tag-text: #cbd5e1;
  --nav-bg: rgba(17, 24, 39, 0.9);
  --bottom-bar-bg: rgba(17, 24, 39, 0.92);
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  padding-bottom: 75px;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--primary-accent);
}

.controls-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-btn {
  background: var(--tag-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: border-color 0.15s ease;
}

.control-btn:hover {
  border-color: var(--primary-accent);
}

.btn-download {
  background: var(--primary-accent);
  color: #ffffff !important;
  padding: 0.45rem 0.95rem;
  border-radius: 6px;
  font-weight: 600 !important;
  text-decoration: none;
  font-size: 0.88rem;
  transition: background-color 0.15s ease;
}

.btn-download:hover {
  background: var(--primary-accent-hover);
}

/* Split Hero Section */
.hero {
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  padding: 3rem 1.5rem;
}

.hero-container {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.hero-image-wrapper {
  flex-shrink: 0;
}

.hero-image {
  width: 175px;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  display: block;
}

.badge {
  display: inline-block;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.hero-text-wrapper h1 {
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1.2;
}

.tagline {
  color: var(--primary-accent);
  font-weight: 600;
  font-size: 1.02rem;
  margin: 0.4rem 0 0.8rem;
}

.bio {
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.6;
  margin-bottom: 1.1rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.contact-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.contact-links a:hover {
  color: var(--primary-accent);
}

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

.btn-primary, .btn-secondary {
  padding: 0.55rem 1.15rem;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--primary-accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-accent-hover);
}

.btn-secondary {
  background: var(--tag-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--primary-accent);
}

/* Main Container */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.75rem 1.25rem;
}

.section {
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

/* Original Card Styles */
.project-card, .timeline-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1.6rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease;
}

.project-card:hover, .timeline-item:hover {
  border-color: var(--primary-accent);
}

.project-header, .timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.45rem;
}

.project-header h3, .timeline-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.date, .timeline-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.role, .timeline-subtitle {
  color: var(--primary-accent);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

.timeline-institution {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

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

.project-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.6rem 0 1rem;
}

.p-pill {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.project-summary {
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

ul {
  padding-left: 1.3rem;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

ul li {
  margin-bottom: 0.5rem;
  line-height: 1.55;
}

.project-actions {
  margin-top: 1.1rem;
}

.btn-project-link {
  display: inline-block;
  color: var(--primary-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.btn-project-link:hover {
  text-decoration: underline;
}

/* Tableau Embed Container */
.tableau-embed-container {
  width: 100%;
  min-height: 850px;
  margin: 1.5rem 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #ffffff;
  contain: layout paint;
}

/* Skills */
.skills-grid-portfolio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.3rem;
}

.skill-group-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1.4rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.skill-group-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-accent);
  margin-bottom: 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-color);
}

.skill-group-card ul {
  list-style: none;
  padding-left: 0;
}

.skill-group-card ul li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
}

/* Sticky Bottom Banner */
.bottom-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 58px;
  background-color: var(--bottom-bar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  transform: translateZ(0);
}

.bottom-banner a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  gap: 2px;
  transition: color 0.15s ease;
}

.bottom-banner a .icon {
  font-size: 1.15rem;
}

.bottom-banner a:hover {
  color: var(--primary-accent);
}

footer {
  text-align: center;
  padding: 2.2rem 1.5rem 3.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .hero-container {
    flex-direction: column;
    text-align: center;
    gap: 1.8rem;
  }
  .contact-links, .hero-cta {
    justify-content: center;
  }
  .nav-links {
    display: none;
  }
}
