/* CSS Variables and Design Tokens */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-elevated: #30363d;
  --border-default: #30363d;
  --border-muted: #21262d;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent-primary: #58a6ff;
  --accent-secondary: #f78166;
  --accent-success: #56d364;
  --accent-warning: #e3b341;
  --shadow-medium: 0 8px 24px rgba(1, 4, 9, 0.8);
  --shadow-large: 0 16px 32px rgba(1, 4, 9, 0.8);
}

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.011em;
}

/* Layout Components */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.main-content {
  max-width: 800px;
  margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 16px 0;
  color: var(--text-primary);
}

h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

p {
  margin: 0 0 16px 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 32px;
}

/* Header */
.site-header {
  background-color: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-default);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}

.site-title:hover {
  color: var(--accent-primary);
  text-decoration: none;
}

/* Navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-trigger {
  display: none;
}

.menu-icon {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  border-color: var(--border-default);
  text-decoration: none;
}

/* Main content */
.page-content {
  padding: 64px 0;
  min-height: calc(100vh - 200px);
}

/* Hero section */
.hero {
  text-align: center;
  margin-bottom: 80px;
}

.hero-title {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Summary section */
.summary {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-medium);
}

.summary p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin: 0;
}

/* Section titles */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--text-primary);
  position: relative;
  padding-left: 16px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
  border-radius: 2px;
}

/* Card Components */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-large);
  border-color: var(--accent-primary);
}

.card:hover::before {
  opacity: 1;
}

/* Experience Components */
.experience {
  margin-bottom: 64px;
}

.experience-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.experience-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.experience-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-large);
  border-color: var(--accent-primary);
}

.experience-item:hover::before {
  opacity: 1;
}

.experience-header {
  margin-bottom: 16px;
}

.experience-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.company-name {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.duration {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.025em;
}

.company-category {
  margin: 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-tag {
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-elevated));
  color: var(--accent-primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-default);
  letter-spacing: 0.025em;
}

.description ul {
  margin: 16px 0;
  padding-left: 0;
  list-style: none;
}

.description li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.description li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: bold;
}

/* Tags and Skills */
.skills, .post-tags, .blog-post-tags {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag, .post-tag, .blog-tag {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border-default);
  transition: all 0.2s ease;
}

.skill-tag:hover, .post-tag:hover, .blog-tag:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  transform: translateY(-1px);
}

/* Education section */
.education {
  margin-bottom: 64px;
}

.education-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
}

.education-item h3 {
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.degree {
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.gpa {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-family: 'JetBrains Mono', monospace;
}

/* Blog Components */
.blog-grid {
  display: grid;
  gap: 32px;
  margin-bottom: 64px;
}

.blog-post-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.blog-post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.blog-post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-large);
  border-color: var(--accent-primary);
}

.blog-post-card:hover::before {
  opacity: 1;
}

.blog-post-meta, .post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-family: 'JetBrains Mono', monospace;
}

.blog-post-date, .post-date {
  color: var(--text-muted);
}

.blog-post-category, .post-category {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-default);
}

.blog-post-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 16px 0;
  line-height: 1.2;
}

.blog-post-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-post-title a:hover {
  color: var(--accent-primary);
}

.blog-post-excerpt {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  font-size: 1.1rem;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid var(--accent-primary);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.blog-read-more:hover {
  background-color: var(--accent-primary);
  color: var(--bg-primary);
  text-decoration: none;
  transform: translateY(-1px);
}

.blog-read-more svg {
  transition: transform 0.2s ease;
}

.blog-read-more:hover svg {
  transform: translateX(2px);
}

.no-posts {
  text-align: center;
  padding: 64px 32px;
  color: var(--text-secondary);
}

.no-posts h3 {
  color: var(--text-primary);
  margin-bottom: 16px;
}

/* Post Layout Specific */
.post-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-default);
}

.post-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 24px 0;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.post-excerpt {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-style: italic;
}

.post-content {
  line-height: 1.8;
  color: var(--text-secondary);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  color: var(--text-primary);
  margin: 48px 0 24px 0;
  line-height: 1.3;
}

.post-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

.post-content h2 {
  font-size: 2rem;
  font-weight: 600;
  position: relative;
  padding-left: 16px;
}

.post-content h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
  border-radius: 2px;
}

.post-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.post-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

.post-content p {
  margin: 0 0 24px 0;
  line-height: 1.8;
}

.post-content ul,
.post-content ol {
  margin: 24px 0;
  padding-left: 0;
}

.post-content li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  line-height: 1.7;
}

.post-content ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: bold;
}

.post-content ol {
  counter-reset: item;
}

.post-content ol li {
  counter-increment: item;
}

.post-content ol li::before {
  content: counter(item) '.';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: bold;
  font-family: 'JetBrains Mono', monospace;
}

.post-content blockquote {
  margin: 32px 0;
  padding: 24px;
  background: var(--bg-secondary);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--text-primary);
}

.post-content code {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
}

.post-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
  overflow-x: auto;
  position: relative;
}

.post-content pre code {
  background: none;
  color: var(--text-primary);
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.post-content a {
  color: var(--accent-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.post-content a:hover {
  border-bottom-color: var(--accent-primary);
  text-decoration: none;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 32px 0;
  box-shadow: var(--shadow-medium);
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
}

.post-content th,
.post-content td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-default);
}

.post-content th {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
}

.post-content td {
  color: var(--text-secondary);
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border-default);
}

.back-to-blog {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}

.back-to-blog:hover {
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  border-color: var(--accent-primary);
  text-decoration: none;
}

/* Table Components */
.miles-table {
  width: 100%;
  max-width: 500px;
  border-collapse: separate;
  border-spacing: 0;
  font-family: sans-serif;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-top: 1em;
}

.miles-table thead {
  background: rgba(0, 0, 0, 0.5);
  font-weight: bold;
  font-size: 16px;
}

.miles-table th,
.miles-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.miles-table tbody tr:last-child td {
  border-bottom: none;
}

.miles-table tbody tr:hover {
  background-color: #000;
}

.cost-footer {
  margin-top: 1em;
  font-weight: 600;
  font-size: 1em;
}

/* Form Components */
input[type="number"], input[type="text"], input[type="email"] {
  min-width: 220px;
  font-size: 1.1em;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-default);
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  transition: border 0.2s;
  outline: none;
}

input[type="number"]:focus, input[type="text"]:focus, input[type="email"]:focus {
  border-color: var(--accent-primary);
}

button {
  height: 42px;
  font-size: 1.1em;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--accent-primary);
  color: var(--text-primary);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: var(--accent-secondary);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .page-content {
    padding: 32px 0;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero {
    margin-bottom: 48px;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .summary, .experience-item, .education-item, .blog-post-card, .card {
    padding: 24px;
  }

  .nav-links {
    display: none;
  }

  .menu-icon {
    display: block;
    padding: 8px;
    cursor: pointer;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    color: var(--text-secondary);
  }

  .nav-trigger:checked ~ .nav-links {
    display: flex;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 16px;
    flex-direction: column;
    min-width: 200px;
    box-shadow: var(--shadow-medium);
  }

  .nav-link {
    width: 100%;
    text-align: left;
    margin: 4px 0;
  }

  .post-title {
    font-size: 2rem;
  }

  .post-excerpt {
    font-size: 1.1rem;
  }

  .post-meta, .blog-post-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .post-content h1 {
    font-size: 2rem;
  }

  .post-content h2 {
    font-size: 1.5rem;
  }

  .post-navigation {
    flex-direction: column;
    gap: 16px;
  }

  .post-content pre {
    padding: 16px;
    font-size: 0.85rem;
  }

  .blog-post-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  .summary, .experience-item, .card {
    padding: 20px;
  }

  .company-category {
    flex-direction: column;
    align-items: flex-start;
  }

  .skills {
    flex-direction: column;
    align-items: flex-start;
  }
}