:root {
  /* Light Mode (Default) - Lighter colors */
  --color-text: #1a1a1a;
  --color-text-secondary: #737373;
  --color-link: #0066cc;
  --color-link-hover: #0052a3;
  --color-bg: #ffffff;
  --color-border: #e5e5e5;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-size-base: 18px;
  --font-size-large: 22px;
  --line-height: 1.6;

  /* Layout */
  --max-width: 600px;
  --spacing: 2rem;
}

/* Dark Mode - Applied via class */

body.dark-mode {
  --color-text: #e5e5e5;
  --color-text-secondary: #a3a3a3;
  --color-link: #4d9fff;
  --color-link-hover: #80b3ff;
  --color-bg: #0a0a0a;
  --color-border: #333333;
}

/* Reset */

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

html {
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-sans);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
  padding: 3rem 1.5rem;
  transition: background 0.2s ease, color 0.2s ease;
}

/* Container */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Typography */

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

p {
  margin-bottom: 1.5rem;
}

strong {
  font-weight: 600;
}

/* Links */

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-link-hover);
}

/* Intro Text */

.intro-text {
  font-size: var(--font-size-large);
  line-height: var(--line-height);
  margin-bottom: var(--spacing);
}

/* Section Links */

.section-links {
  margin: calc(var(--spacing) * 1.5) 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-link {
  display: block;
  padding: 1.25rem 0;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  transition: all 0.15s ease;
}

.section-link:hover {
  color: var(--color-link);
  padding-left: 0.5rem;
}

.section-link strong {
  display: block;
  margin-bottom: 0.25rem;
}

/* Contact Links */

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: calc(var(--spacing) * 1.5);
}

.contact-links a {
  font-size: 1rem;
}

/* Footer */

footer {
  margin-top: calc(var(--spacing) * 2);
  padding-top: var(--spacing);
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

/* Theme Toggle Button */

.theme-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 100;
}

.theme-toggle:hover {
  border-color: var(--color-link);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--color-text);
}

/* Responsive */

@media (max-width: 640px) {
  body {
    padding: 2rem 1rem;
  }

  .intro-text {
    font-size: var(--font-size-base);
  }

  .contact-links {
    gap: 1rem;
  }

  .theme-toggle {
    top: 1rem;
    right: 1rem;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
  }
}

/* Resume Button */

.resume-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--color-link);
  color: white !important;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.resume-button:hover {
  background: var(--color-link-hover);
  color: white !important;
  transform: translateY(-1px);
}

/* Back to Top Button */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 99;
}

.back-to-top:hover {
  border-color: var(--color-link);
  transform: translateY(-2px);
}

.back-to-top.visible {
  display: flex;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  color: var(--color-text);
}

/* ==================== PAGE STYLES ==================== */

/* Page Title */

.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
  position: relative;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 2.5rem;
  height: 3px;
  background: linear-gradient(90deg, var(--color-link), transparent);
  border-radius: 2px;
}

/* Back Link */

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

.back-link a {
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.back-link a:hover {
  opacity: 1;
}

/* ==================== EXPERIENCE LIST ==================== */

.experience-list {
  display: flex;
  flex-direction: column;
}

.experience-item {
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border);
}

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

.job-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.job-company {
  margin-bottom: 0.5rem;
}

.job-meta {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.job-description {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.responsibilities-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.responsibilities-list {
  margin-bottom: 1.5rem;
  padding-left: 1.25rem;
}

.responsibilities-list li {
  margin-bottom: 0.5rem;
  color: var(--color-text-secondary);
  position: relative;
}

.responsibilities-list li::marker {
  color: var(--color-link);
}

/* ==================== PROJECTS GRID ==================== */

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-card {
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  transition: all 0.2s ease;
}

.project-card:hover {
  border-color: var(--color-link);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.dark-mode .project-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.project-header {
  margin-bottom: 1rem;
}

.project-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.project-title a {
  color: var(--color-text);
  transition: color 0.15s ease;
}

.project-title a:hover {
  color: var(--color-link);
}

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

.project-summary {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.project-highlights {
  margin-bottom: 1rem;
  padding-left: 1.25rem;
}

.project-highlights li {
  margin-bottom: 0.4rem;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.project-highlights li::marker {
  color: var(--color-link);
}

/* ==================== TECH TAGS ==================== */

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

.tech-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-link);
  background: rgba(0, 102, 204, 0.08);
  border-radius: 100px;
  transition: all 0.15s ease;
}

body.dark-mode .tech-tag {
  background: rgba(77, 159, 255, 0.12);
}

.tech-tag:hover {
  background: rgba(0, 102, 204, 0.15);
  transform: translateY(-1px);
}

body.dark-mode .tech-tag:hover {
  background: rgba(77, 159, 255, 0.2);
}

/* ==================== PAGINATION ==================== */

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  justify-content: center;
}

.pagination-btn {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-link);
  background: rgba(0, 102, 204, 0.08);
  border-radius: 100px;
  transition: all 0.15s ease;
  text-decoration: none;
  cursor: pointer;
}

body.dark-mode .pagination-btn {
  background: rgba(77, 159, 255, 0.12);
}

.pagination-btn:hover {
  background: rgba(0, 102, 204, 0.15);
  transform: translateY(-1px);
}

body.dark-mode .pagination-btn:hover {
  background: rgba(77, 159, 255, 0.2);
}

.pagination-active {
  background: rgba(0, 102, 204, 0.2) !important;
  color: var(--color-link);
  cursor: default;
  pointer-events: none;
}

body.dark-mode .pagination-active {
  background: rgba(77, 159, 255, 0.25) !important;
}

.pagination-active:hover {
  transform: none;
  background: rgba(0, 102, 204, 0.2) !important;
}

body.dark-mode .pagination-active:hover {
  background: rgba(77, 159, 255, 0.25) !important;
}

/* ==================== CERTIFICATIONS ==================== */

.certifications-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cert-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  transition: all 0.2s ease;
}

.cert-card:hover {
  border-color: var(--color-link);
  transform: translateX(4px);
}

.cert-badge {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.1), rgba(0, 102, 204, 0.05));
  border-radius: 12px;
  font-size: 1.5rem;
}

body.dark-mode .cert-badge {
  background: linear-gradient(135deg, rgba(77, 159, 255, 0.15), rgba(77, 159, 255, 0.05));
}

.cert-content {
  flex: 1;
  min-width: 0;
}

.cert-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--color-text);
  line-height: 1.3;
}

.cert-issuer {
  font-size: 0.9rem;
  color: var(--color-link);
  margin-bottom: 0.5rem;
}

.cert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

.cert-credential {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
  font-family: 'SF Mono', Monaco, monospace;
}

/* ==================== MOBILE RESPONSIVE ==================== */

@media (max-width: 640px) {
  .project-card {
    padding: 1.25rem;
  }

  .tech-tags {
    gap: 0.375rem;
  }

  .tech-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }

  .cert-card {
    padding: 1rem;
  }

  .cert-badge {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .cert-title {
    font-size: 0.95rem;
  }
}