:root {
  --text-color: #333;
  --text-muted: #555;
  --bg-color: #fefdfb;
  --link-color: #0070f3;
  --border-color: #eaeaea;
  --codeblock-bg-color: #2d2d2d;
}
:root.dark {
  --text-color: #eaeaea;
  --text-muted: #a0a0a0;
  --bg-color: #0e0e0e;
  --link-color: #efaf00;
  --border-color: #333;
   --codeblock-bg-color: #24242b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 4rem);
}

main {
  flex: 1;
}

header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

h1.site-title {
  font-size: 1.8rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

#theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform 0.2s ease;
}

#theme-toggle:hover svg {
  transform: scale(1.1);
}

.moon-icon {
  display: block;
}

.sun-icon {
  display: none;
}

:root.dark .moon-icon {
  display: none;
}

:root.dark .sun-icon {
  display: block;
}

h1.site-title a {
  color: var(--text-color);
  text-decoration: none;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

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

nav a.active {
  color: var(--text-color);
  font-weight: 600;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-color);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

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

.post-list {
  list-style: none;
  padding: 0;
}

.post-item {
  margin-bottom: 2rem;
}

.post-title {
  font-size: 1.25rem;
  margin: 0 0 0.25rem 0;
}

.post-title a {
  text-decoration: none;
  color: var(--text-color);
}

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

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

.post-summary {
  font-size: 0.95rem;
  color: var(--text-color);
}

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

/* Blog List Customizations */
.section-caption {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.blog-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-item {
  border-radius: 6px;
  transition: background-color 0.2s ease, transform 0.2s ease;
  margin-bottom: 0.25rem;
  margin-left: -1rem;
  margin-right: -1rem;
  border-bottom: 1px solid var(--border-color);
}

.blog-item:last-child {
  border-bottom: none;
}

.blog-item:hover {
  background-color: var(--border-color);
  transform: translateX(4px);
}

.blog-item-link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  text-decoration: none;
  color: var(--text-color);
  padding: 0.75rem 1rem;
  border-radius: 6px;
}

.blog-item-link:hover {
  color: var(--text-color);
}

.blog-item-title {
  font-size: 1.1rem;
  font-weight: 500;
}

.blog-item-date {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: 1rem;
}

/* Portfolio Specific Styles */
.portfolio-header {
  margin-bottom: 2.5rem;
}
.portfolio-intro {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-color);
  margin-bottom: 3rem;
}
.portfolio-section {
  margin-bottom: 3.5rem;
}
.portfolio-section-title {
  font-size: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 1.5rem;
  margin-left: 0.5rem;
  border-left: 2px solid var(--border-color);
}
.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.95rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--link-color);
  border: 2px solid var(--bg-color);
}
.timeline-role {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  color: var(--text-color);
}
.timeline-company {
  font-size: 1rem;
  font-weight: 500;
  color: var(--link-color);
  margin: 0 0 0.5rem 0;
}
.timeline-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.75rem;
}
.timeline-body {
  font-size: 0.95rem;
  color: var(--text-color);
}
.timeline-body ul {
  padding-left: 1.25rem;
  margin: 0;
}
.timeline-body li {
  margin-bottom: 0.4rem;
}

/* Skill Badges */
.skill-category {
  margin-bottom: 1.5rem;
}
.skill-category-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}
.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.skill-badge {
  background-color: var(--border-color);
  color: var(--text-color);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background-color 0.2s;
}
.skill-badge:hover {
  background-color: var(--link-color);
  color: #fff;
}

/* Simple List (for certs & contributions) */
.simple-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.simple-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}
.simple-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--link-color);
  font-weight: bold;
}

.social-icon {
  color: var(--text-color);
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
}
.social-icon:hover {
  color: var(--link-color);
}

/* Code Blocks */
pre {
  background-color: var(--codeblock-bg-color) !important;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-color);
}

code {
  background-color: var(--border-color) !important;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.85em;
}

pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 1em;
}
