/* CSS Custom Properties for Theme Management */
:root {
  --font-primary: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 12px;
  --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-large: 0 10px 15px rgba(0, 0, 0, 0.5), 0 4px 6px rgba(0, 0, 0, 0.4);
}

/* Light Theme - Softer Light Mode */
[data-theme="light"] {
  --bg-primary: #f7f7f7;
  --bg-secondary: #eeeeee;
  --bg-tertiary: #e0e0e0;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-tertiary: #808080;
  --accent-primary: #000000;
  --accent-secondary: #2c2c2c;
  --border-color: #cccccc;
  --nav-bg: rgba(247, 247, 247, 0.95);
  --card-bg: #ffffff;
}

/* Dark Theme - Pure Monochrome */
[data-theme="dark"] {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #141414;
  --text-primary: #ffffff;
  --text-secondary: #dddddd;
  --text-tertiary: #999999;
  --accent-primary: #ffffff;
  --accent-secondary: #f5f5f5;
  --border-color: #2a2a2a;
  --nav-bg: rgba(0, 0, 0, 0.8);
  --card-bg: #0a0a0a;
}

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

/* Override all default link styles with higher specificity */
a, a:link, a:visited, a:hover, a:active {
  color: inherit !important;
  text-decoration: none !important;
}

/* More specific overrides for education and course links */
.education-degree a, .education-degree a:link, .education-degree a:visited, .education-degree a:hover, .education-degree a:active {
  color: inherit !important;
  text-decoration: none !important;
}

.education-school a, .education-school a:link, .education-school a:visited, .education-school a:hover, .education-school a:active {
  color: inherit !important;
  text-decoration: none !important;
}

.work-description a, .work-description a:link, .work-description a:visited, .work-description a:hover, .work-description a:active {
  color: inherit !important;
  text-decoration: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: var(--transition-smooth);
  overflow-x: hidden;
}

/* Animated Background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 60%, var(--bg-tertiary) 100%);
  opacity: 0.85;
}

/* Floating Navigation */
.floating-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 2rem;
  pointer-events: none;
}

.floating-nav-left {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin-right: 1rem;
  pointer-events: all;
}

.floating-home,
.floating-blog {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border-radius: 8px;
  transition: var(--transition-smooth);
  text-align: center;
  min-width: 80px;
}

.floating-home:hover,
.floating-blog:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.floating-home.active,
.floating-blog.active {
  color: var(--text-primary);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  font-weight: 600;
}

.floating-theme-toggle {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}

.floating-theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--text-tertiary);
}


.theme-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  position: relative;
}

.icon-moon,
.icon-sun {
  color: var(--text-secondary);
  transition: all 0.3s ease;
  position: absolute;
}

.theme-toggle:hover .icon-moon,
.theme-toggle:hover .icon-sun {
  color: var(--text-primary);
  transform: rotate(180deg);
}

/* Initially show moon icon (for light mode) */
.icon-sun {
  display: none;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger .bar {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  margin: 3px 0;
  transition: var(--transition-smooth);
}

.hamburger.active .bar:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Main Content */
.main-content {
  padding: 2rem;
  min-height: 100vh;
}

/* Home Layout */
.home-layout {
  width: 100%;
}

/* Hero Section - Stacked Layout */
.hero-section {
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
}

/* Top Section - Photo and Description Side by Side */
.profile-section {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  padding: 2.5rem;
  border-radius: 16px;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-image {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-photo {
  width: 280px;
  height: 280px;
  border-radius: 12px;
  object-fit: cover;
  border: 4px solid var(--accent-primary);
  box-shadow: var(--shadow-large);
  transition: var(--transition-smooth);
}

.profile-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.6);
}

.profile-placeholder {
  display: none;
  width: 280px;
  height: 280px;
  border-radius: 12px;
  background: var(--bg-tertiary);
  border: 2px dashed var(--border-color);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

.profile-placeholder span {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.profile-placeholder code {
  background: var(--bg-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.profile-photo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.education-info {
  width: 320px;
}

.education-degree {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  line-height: 1.3;
  white-space: nowrap;
  text-align: left;
}

.education-school {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.university-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 2px;
}

span.degree-link, .degree-link {
  color: var(--text-primary) !important;
  text-decoration: underline !important;
  text-decoration-color: var(--text-tertiary) !important;
  transition: var(--transition-smooth);
}

span.degree-link:hover, .degree-link:hover {
  color: var(--accent-primary) !important;
  text-decoration-color: var(--accent-primary) !important;
}

span.university-link, .university-link {
  color: var(--text-secondary) !important;
  text-decoration: none !important;
  transition: var(--transition-smooth);
}

span.university-link:hover, .university-link:hover {
  color: var(--text-primary) !important;
}

.location {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-left: 1rem;
}

span.course-link, .course-link {
  color: var(--text-secondary) !important;
  text-decoration: underline !important;
  text-decoration-color: var(--text-tertiary) !important;
  transition: var(--transition-smooth);
}

span.course-link:hover, .course-link:hover {
  color: var(--text-primary) !important;
  text-decoration-color: var(--text-primary) !important;
}

/* Remove underlines only from TA'd courses in the teaching section - MAXIMUM SPECIFICITY */
.teaching-column .teaching-list .course-item .course-details .course-subitem a span.course-link,
.teaching-column .teaching-list .course-item .course-details .course-subitem a .course-link {
  text-decoration: none !important;
  text-decoration-color: transparent !important;
  text-decoration-line: none !important;
  border-bottom: none !important;
}

.teaching-column .teaching-list .course-item .course-details .course-subitem a:hover span.course-link,
.teaching-column .teaching-list .course-item .course-details .course-subitem a:hover .course-link {
  text-decoration: none !important;
  text-decoration-color: transparent !important;
  text-decoration-line: none !important;
  border-bottom: none !important;
}

.profile-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.linkedin-icon {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
}

.linkedin-icon:hover {
  color: #0077b5;
  transform: translateY(-1px);
}

.education-period {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  font-weight: 500;
  text-align: left;
}

.profile-info h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.tagline {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 300;
}

.work-description {
  margin-bottom: 3rem;
}

.work-description p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  text-align: left;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  text-align: center;
  letter-spacing: 0.3px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  min-width: 120px;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.cta-button:hover::before {
  left: 100%;
}

.cta-button.primary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.cta-button.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cta-button.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Dual Section - Two Column Layout */
.dual-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Experience Column - Left Side */
.experience-column {
  width: 100%;
}

/* Teaching Column - Right Side */
.teaching-column {
  width: 100%;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-primary);
  text-align: center;
}

.timeline-container {
  position: relative;
}

.timeline-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--text-primary);
  text-align: center;
}

/* Left Timeline for Experience */
.left-timeline {
  position: relative;
  padding: 2rem 2rem 1rem 2rem;
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
}

/* Teaching Experience List */
.teaching-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.course-item {
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.course-item:hover {
  background: var(--card-bg);
  border-color: var(--text-tertiary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.course-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  text-align: center !important;
}

.course-code {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.course-details {
  margin-top: 0.75rem;
  margin-left: 0.5rem;
}

.course-subitem {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  padding-left: 0;
  position: relative;
  line-height: 1.4;
}

.course-subitem:last-child {
  margin-bottom: 0;
}

.course-subitem::before {
  content: '';
  position: absolute;
  left: 0;
  color: var(--text-tertiary);
  font-weight: bold;
}

.course-subitem a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.course-subitem a:hover {
  color: var(--text-primary);
}

.course-link {
  text-decoration: underline;
  text-decoration-color: var(--text-tertiary);
  transition: var(--transition-smooth);
}

.course-subitem a:hover .course-link,
.youtube-link:hover .course-link {
  text-decoration-color: var(--text-primary);
}

.course-award {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-style: italic;
  margin-top: 0.25rem;
  padding-left: 1rem;
}

.youtube-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

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


.course-description {
  margin-top: 0.5rem;
}

.course-description p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 0.5rem 0;
  opacity: 0.9;
}

.course-description p:last-child {
  margin-bottom: 0;
}

/* Left Timeline Line */
.timeline-line-left {
  position: absolute;
  left: 1.5rem;
  top: 2rem;
  bottom: 2.5rem;
  width: 2px;
}

[data-theme="dark"] .timeline-line-left {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.2));
}

[data-theme="light"] .timeline-line-left {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
}

/* Left Timeline Items */
.timeline-item-left {
  position: relative;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  padding-left: 0.5rem;
}

.timeline-item-left:first-child {
  margin-top: 1rem;
}

.timeline-item-left:last-child {
  margin-bottom: 0;
}

/* Left Timeline Dots */
.timeline-dot-left {
  position: absolute;
  left: calc(3rem - 6px);
  top: 1rem;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  z-index: 10;
}

.timeline-dot-left.future {
  background: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.5);
  animation: pulse 2s infinite;
}

/* Left Timeline Content */
.timeline-content-left {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: left;
  transition: var(--transition-smooth);
}

.timeline-content-left:hover {
  transform: translateY(-2px);
}

.timeline-item.left .timeline-content {
  text-align: right;
}

.timeline-item.right .timeline-content {
  text-align: left;
}

/* Timeline Header */
.timeline-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.timeline-item.left .timeline-header {
  flex-direction: row-reverse;
}

.timeline-item.right .timeline-header {
  flex-direction: row;
}

/* Company Logo */
.company-logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  position: relative;
}

.company-logo a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.company-logo a:hover {
  transform: scale(1.05);
}

.timeline-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.timeline-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.company-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px;
}

.logo-placeholder {
  display: none;
  width: 100%;
  height: 100%;
  background: #ffffff;
  color: #000000;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
}

/* Company Name - Main Title */
.company-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.company-name a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.company-name a:hover {
  color: var(--accent-primary);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Job Title - Subtitle */
.job-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

/* Timeline Period */
.timeline-period {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Location */
.location {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-weight: 500;
  display: flex;
  align-items: center;
}

.location::before {
  content: '📍';
  margin-right: 0.4rem;
  font-size: 0.8rem;
}

/* Override for Duke University location */
.education-school .location {
  margin-left: 0;
}

.education-school .location::before {
  content: '—';
  margin-right: 0.4rem;
  font-size: inherit;
  color: inherit;
}

.timeline-item.left .location {
  justify-content: flex-end;
}

.timeline-item.right .location {
  justify-content: flex-start;
}

/* Future role styling */
.timeline-item.future .company-name {
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.timeline-item.future .timeline-period {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.timeline-item.future .logo-placeholder {
  background: var(--text-secondary);
}

/* Work Details */
.work-details {
  margin-top: 0.5rem;
}

.work-details p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
  font-style: italic;
  opacity: 0.9;
}

/* Add subtle connecting lines */
.timeline-item.left .timeline-content::after {
  content: '';
  position: absolute;
  right: -0.75rem;
  top: 2rem;
  width: 0.75rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), transparent);
  opacity: 0.6;
}

.timeline-item.right .timeline-content::after {
  content: '';
  position: absolute;
  left: -0.75rem;
  top: 2rem;
  width: 0.75rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
  opacity: 0.6;
}

/* Blog Styles */
.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 0;
}

.blog-header {
  text-align: center;
  margin-bottom: 4rem;
}

.blog-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.blog-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.blog-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: var(--transition-smooth);
  border: 1px solid var(--border-color);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-large);
}

.blog-card-content {
  padding: 2rem;
}

.blog-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.blog-category {
  background: var(--accent-primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-weight: 500;
}

.blog-card-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.blog-card-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

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

.blog-excerpt {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.read-more {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.read-more:hover {
  color: var(--accent-secondary);
}

/* Post Layout with Sidebar TOC */
.post-layout {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 0;
}

.toc-sidebar {
  position: fixed;
  left: 2rem;
  top: 8rem;
  width: 250px;
  max-height: calc(100vh - 10rem);
  overflow-y: auto;
  z-index: 100;
}

.toc-content {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.toc-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

#toc {
  font-size: 0.9rem;
}

#toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#toc li {
  list-style: none;
}

#toc a {
  display: block;
  padding: 0.25rem 0;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
  border-radius: 4px;
  padding-left: 0.5rem;
}

#toc a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Nested headings */
#toc .toc-list-item {
  margin: 0;
}

#toc .toc-list-item .toc-list {
  padding-left: 1rem;
  margin-top: 0.25rem;
}

/* Active section highlighting */
#toc .is-active-link {
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--accent-primary);
  padding-left: 0.75rem;
}

/* Post Styles */
.post {
  width: 100%;
}

.post-header {
  text-align: center;
  margin-bottom: 3rem;
}

.post-meta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.post-category {
  background: var(--accent-primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-weight: 500;
}

.post-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.post-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.post-content {
  margin-bottom: 3rem;
}

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

.post-content h1 { font-size: 2.5rem; }
.post-content h2 { font-size: 2rem; }
.post-content h3 { font-size: 1.5rem; }

.post-content p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

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

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

.post-content code {
  background: var(--bg-tertiary);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
}

.post-content pre {
  background: var(--bg-tertiary);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content blockquote {
  border-left: 4px solid var(--accent-primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-secondary);
}

.post-content ul,
.post-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.post-content li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.post-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.nav-previous,
.nav-next {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.nav-previous:hover,
.nav-next:hover {
  color: var(--accent-secondary);
}

.back-to-blog {
  text-align: center;
}

.back-to-blog a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.back-to-blog a:hover {
  color: var(--accent-primary);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.empty-state h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-content p {
  color: var(--text-secondary);
  margin: 0;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: var(--nav-bg);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .hamburger {
    display: flex;
  }

  .main-content {
    padding: 1rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .blog-card-content {
    padding: 1.5rem;
  }

  .post {
    padding: 2rem 0;
  }

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

  .post-navigation {
    flex-direction: column;
    text-align: center;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  /* Hide TOC on mobile */
  .toc-sidebar {
    display: none;
  }

  .hero-content h1 {
    font-size: clamp(2rem, 8vw, 4rem);
  }

  .hero-content p {
    font-size: 1.1rem;
  }

  /* Mobile Layout */
  .hero-section {
    gap: 3rem;
    padding: 2rem 1rem;
  }

  /* Mobile Dual Section */
  .dual-section {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .profile-image {
    justify-content: center;
  }

  .profile-photo {
    width: 250px;
    height: 250px;
  }

  .profile-placeholder {
    width: 250px;
    height: 250px;
  }

  .profile-section {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .profile-info h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .tagline {
    font-size: 1.2rem;
  }

  .work-description p {
    font-size: 1rem;
  }

  .cta-buttons {
    justify-content: center;
  }

  /* Mobile Timeline - Stack Vertically */
  .timeline-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  .compact-timeline {
    padding: 1rem 0;
  }

  .timeline-line {
    left: 20px;
    transform: none;
  }

  .timeline-item {
    margin-bottom: 2rem;
    padding-left: 3rem;
    padding-right: 0;
    justify-content: flex-start;
  }

  .timeline-item.left,
  .timeline-item.right {
    padding-left: 2rem;
    padding-right: 0;
    justify-content: flex-start;
  }

  /* Remove connecting lines on mobile */
  .timeline-item.left .timeline-content::after,
  .timeline-item.right .timeline-content::after {
    display: none;
  }

  .timeline-dot {
    left: 20px;
    transform: translateX(-50%);
  }

  .timeline-content {
    max-width: none;
    text-align: left;
  }

  .timeline-item.left .timeline-content,
  .timeline-item.right .timeline-content {
    text-align: left;
  }

  .timeline-item.left .company-logo,
  .timeline-item.right .company-logo {
    margin-left: 0;
    margin-right: auto;
  }

  .timeline-item.left .location,
  .timeline-item.right .location {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .nav-container {
    height: 60px;
  }

  .main-content {
    margin-top: 60px;
    min-height: calc(100vh - 60px);
  }

  .nav-menu {
    top: 60px;
  }

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

  .blog-description {
    font-size: 1rem;
  }
}