:root {
  /* Design Tokens - Light Mode */
  --bg-color: #f8f9fa;
  --surface-color: #ffffff;
  --text-color: #212529;
  --text-muted: #6c757d;
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --border-color: #e9ecef;
  --code-bg: #f1f3f5;
  
  /* Shadows & Radius */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-round: 50%;

  /* Typography */
  --font-main: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --base-font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --line-height: 1.6;

  /* Spacing */
  --container-max-width: 860px;
  --padding-inline: clamp(1rem, 5vw, 2.5rem);
}

/* Design Tokens - Dark Mode Overrides */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --primary-color: #6366f1;
    --primary-hover: #818cf8;
    --border-color: #334155;
    --code-bg: #0f172a;
    --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 -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  }
}

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  font-size: var(--base-font-size);
  line-height: var(--line-height);
  color: var(--text-color);
  background-color: var(--bg-color);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding-left: var(--padding-inline);
  padding-right: var(--padding-inline);
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

h1 { font-size: clamp(2rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

p {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

pre {
  overflow-x: auto;
  background-color: var(--code-bg);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

th, td {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  text-align: left;
}

th {
  background-color: var(--code-bg);
  font-weight: 600;
}

/* Header & Navigation */
.header {
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.logo a {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-color);
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

/* Blog Post List (Homepage) */
.post-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-item {
  background-color: var(--surface-color);
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.3s ease;
}

.post-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.post-item h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.6rem;
}

.post-item h2 a {
  color: var(--text-color);
}

.post-item h2 a:hover {
  color: var(--primary-color);
}

.post-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.post-meta a.tag {
  background-color: var(--code-bg);
  color: var(--primary-color);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-left: 0.25rem;
  font-weight: 500;
}

.post-meta a.tag:hover {
  background-color: var(--primary-color);
  color: #ffffff;
}

/* About Page Styles */
.about-page {
  padding: 2.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* Profile Intro Card */
.about-profile {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  background-color: var(--surface-color);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.avatar-container {
  flex-shrink: 0;
}

.about-avatar {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-round);
  object-fit: cover;
  border: 4px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
}

.about-avatar:hover {
  transform: scale(1.05);
}

.profile-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.profile-info h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2.2rem;
}

.profile-tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* Social Buttons */
.about-social {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: all 0.2s ease;
}

.social-btn:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

/* Biography Content */
.about-bio {
  font-size: 1.1rem;
  line-height: 1.75;
}

.about-bio h1, .about-bio h2 {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

/* Skills Grid */
.about-skills h2, .about-timeline h2 {
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.4rem;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}

.skill-chip {
  background-color: var(--surface-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.skill-chip:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  transform: scale(1.05);
}

/* Career Timeline */
.timeline {
  position: relative;
  margin-top: 1rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 6px);
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-round);
  background-color: var(--primary-color);
  border: 2px solid var(--bg-color);
  transition: transform 0.2s ease;
}

.timeline-item:hover::before {
  transform: scale(1.4);
}

.timeline-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.25rem;
}

.timeline-year {
  font-size: 0.85rem;
  font-weight: 700;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-sm);
}

.timeline-company {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.timeline-role {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
}

.timeline-desc {
  color: var(--text-muted);
  margin: 0;
}

/* Footer Section */
.footer {
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 4rem;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

.footer-container p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-social {
  display: flex;
  gap: 1.25rem;
}

.footer-social .social-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-social .social-link:hover {
  color: var(--primary-color);
}

/* Pagination container */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0;
}

/* Responsive Media Queries */
@media (max-width: 680px) {
  .about-profile {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }
  
  .about-social {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header-container, .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .timeline-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}