/* Reset and base styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1em;
  color: #333332;
  background: #fff;
  line-height: 1.6;
}

a img {
  border: none;
}

/* Header styles */
header {
  height: 80px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}

.branding {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-title {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  /* container will shrink-wrap to the width of "CODECUBE" */
}

.title-main {
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: #1A202C;
  /* no special width—just sizes to its text */
}

.title-sub {
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  color: #4A90E2;
  width: 100%;       /* fill the full width of .site-title */
  text-align: center; /* center the text */
}

#site-logo {
  width: auto;
  height: 48px;
}

/* Navigation styles - Mobile first */
.site-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  margin-left: 2rem;
}

.site-nav .nav-menu-toggle {
  display: none;
}

.site-nav .nav-list {
  display: flex;
  flex-direction: row;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
  align-items: center;
}

.site-nav .nav-list li {
  margin: 0;
}

.site-nav .nav-list a {
  text-decoration: none;
  color: #333332;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
}

.site-nav .nav-list a:hover {
  color: #4A90E2;
}

.site-nav .nav-module-picker {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex-shrink: 0;
  align-items: flex-start;
}

.site-nav .nav-module-label {
  color: #718096;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav .nav-module-select {
  min-width: 12rem;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  border: 1px solid #d2d6dc;
  border-radius: 6px;
  background: #fff;
  color: #1A202C;
  font: inherit;
}

.site-nav .nav-module-select:hover {
  border-color: #4A90E2;
}

.site-nav .nav-module-select:focus {
  outline: none;
  border-color: #4A90E2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

/* Tablet and desktop styles */
@media (min-width: 768px) {
  .site-nav .nav-list {
    flex-direction: row;
  }
}

/* Mobile styles - collapsed navigation */
@media (max-width: 767px) {
  header {
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 1rem 1.5rem;
  }
  
  #site-logo {
    height: 60px; /* Larger logo on mobile */
  }
  
  .site-title .title-main {
    font-size: 1.4rem; /* Slightly larger text on mobile */
  }
  
  .site-nav {
    display: contents;
    margin: 0;
  }

  .site-nav .nav-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    grid-column: 2;
    justify-self: end;
    padding: 0.6rem 0.85rem;
    border: 1px solid #d2d6dc;
    border-radius: 999px;
    background: #fff;
    color: #1A202C;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
  }

  .site-nav .nav-menu-toggle:hover,
  .site-nav .nav-menu-toggle:focus {
    border-color: #4A90E2;
    color: #1d4f91;
  }

  .site-nav .nav-menu-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
  }

  .site-nav .nav-menu-toggle img {
    width: 20px;
    height: 20px;
  }
  
  .site-nav .nav-list {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    padding-top: 0.75rem;
  }

  .site-nav.nav-open .nav-list {
    display: flex;
  }
  
  .site-nav .nav-list li {
    width: 100%;
  }
  
  .site-nav .nav-list a {
    display: block;
    padding: 0.75rem 0;
  }

  .site-nav .nav-module-picker {
    grid-column: 1 / -1;
    justify-self: end;
    max-width: 100%;
  }

  .site-nav .nav-module-select {
    max-width: 100%;
  }

  body:has(.codecube-app-shell) {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  body:has(.codecube-app-shell) main {
    height: auto;
    min-height: calc(100vh - 104px);
    overflow: visible;
  }

  .codecube-app-shell {
    min-height: calc(100vh - 104px);
  }

  .codecube-app-tabs {
    align-items: stretch;
    flex-direction: column;
    padding: 0.75rem 1rem;
  }

  .codecube-app-body {
    overflow: visible;
    padding: 0.75rem;
  }
}

/* Main content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

main:has(> article) {
  max-width: 801px;
}

body:has(.codecube-app-shell) {
  height: 100vh;
  overflow: hidden;
}

body:has(.codecube-app-shell) main {
  max-width: none;
  width: 100%;
  height: calc(100vh - 80px);
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body:has(.codecube-app-shell) footer {
  display: none;
}

.codecube-app-page,
.codecube-app-page > .estimation-app-root,
.codecube-app-shell {
  min-height: 0;
  height: 100%;
}

.codecube-app-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #f1f5f9;
  color: #0f172a;
}

.codecube-app-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  z-index: 3;
}

.codecube-app-body {
  min-height: 0;
  overflow: auto;
  padding: 1rem;
}

.codecube-app-pane-grid {
  min-height: 0;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1A202C;
  margin: 0;
  line-height: 1.2;
}

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

/* Partners carousel placeholder */
.partners-carousel {
  min-height: 2rem;
  margin-bottom: 4rem;
  /* Reserved for later implementation */
  display: none; /* Hidden until implemented */
}

/* Latest posts section */
.latest-posts {
  margin-bottom: 4rem;
}

.latest-posts h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1A202C;
  margin-bottom: 2rem;
  text-align: center;
}

.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Mobile-specific adjustments for posts */
@media (max-width: 767px) {
  .post-list {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 1.25rem;
  }
}

.post-item {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.post-item-with-hero {
  padding: 0;
  overflow: hidden;
}

.post-hero {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.post-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.post-item-with-hero:hover .post-hero-image {
  transform: scale(1.05);
}

.post-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.post-item-with-hero .post-content {
  margin: 0;
}

.post-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-item h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.post-item h3 a {
  text-decoration: none;
  color: #1A202C;
}

.post-item h3 a:hover {
  color: #4A90E2;
}

.post-date {
  display: block;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.post-summary {
  font-size: 0.9rem;
  color: #4b5563;
  margin: 0;
  line-height: 1.5;
  flex-grow: 1;
}

/* Responsive adjustments for hero images */
@media (max-width: 767px) {
  .post-hero {
    height: 160px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .post-hero {
    height: 180px;
  }
}

/* Hero image for single post pages */
.post-hero-single {
  width: 100%;
  margin: 1.5rem 0 2rem 0;
  overflow: hidden;
  border-radius: 8px;
}

.post-hero-single-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  display: block;
}

.post-supplemental {
  margin: 2rem 0 1.5rem 0;
  padding-top: 1rem;
  border-top: 1px solid #e5e5e5;
}

.archive-notice {
  margin: 1rem 0;
  padding: 1rem;
  border-left: 4px solid #4A90E2;
  background: #f8fbff;
  color: #334155;
  font-size: 0.95rem;
}

.archive-notice h2 {
  margin: 0 0 0.5rem 0;
  color: #1A202C;
  font-size: 1rem;
}

.archive-notice p {
  margin: 0.5rem 0 0 0;
}

.archive-notice a {
  font-weight: 600;
}

.archive-original-url span {
  font-weight: 600;
}

.archive-original-url code {
  color: #475569;
  word-break: break-word;
}

.archive-landing {
  max-width: 840px;
  margin: 0 auto;
}

.archive-landing h1 {
  font-size: 2.25rem;
  color: #1A202C;
}

.archive-wayback {
  margin-top: 2rem;
}

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

.archive-post-list li {
  border-bottom: 1px solid #e5e5e5;
  padding: 1rem 0;
}

.archive-post-list h3 {
  margin: 0 0 0.25rem 0;
}

.archive-post-list time {
  display: block;
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.archive-post-list p {
  margin: 0;
  color: #4b5563;
}

.post-jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem 0;
}

.post-jump-link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: #f0f6ff;
  border: 1px solid #cfe0fb;
  color: #1d4f91;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.post-jump-link:hover {
  background: #e1efff;
  color: #163d71;
}

.article-flow-thumb {
  width: min(42%, 260px);
  max-width: 260px;
  height: auto;
  border-radius: 10px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  background: #fff;
  margin-bottom: 1rem;
}

.article-flow-thumb--left {
  float: left;
  margin-right: 1.25rem;
}

.article-flow-thumb--right {
  float: right;
  margin-left: 1.25rem;
}

.article-flow-clear {
  clear: both;
}

@media (max-width: 767px) {
  .post-hero-single {
    margin: 1rem 0 1.5rem 0;
  }
  
  .post-hero-single-image {
    max-height: 250px;
  }

  .post-jump-links {
    margin: 0.75rem 0 1.25rem 0;
  }

  .article-flow-thumb,
  .article-flow-thumb--left,
  .article-flow-thumb--right {
    float: none;
    width: 100%;
    max-width: none;
    display: block;
    margin: 1rem 0;
  }
}

/* Archive section */
.archive {
  border-top: 2px solid #e5e5e5;
  padding-top: 2rem;
}

.archive h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #1A202C;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Years list styling */
.archive > div:first-of-type {
  margin-bottom: 2rem;
  line-height: 1.8;
}

.archive > div:first-of-type a {
  color: #4A90E2;
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.archive > div:first-of-type a:hover {
  background-color: #f0f8ff;
}

.archive-wayback-link {
  margin: 0 0 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid #4A90E2;
  background: #f8fbff;
  color: #334155;
}

/* Mobile and tablet improvements for years list */
@media (max-width: 1024px) {
  .archive > div:first-of-type {
    font-size: 1.1rem;
    line-height: 2;
  }
  
  .archive > div:first-of-type a {
    padding: 0.5rem 0.75rem;
    margin: 0.25rem 0.25rem 0.25rem 0;
    display: inline-block;
    font-size: 1rem;
  }
}

.titleicon {
  width: 24px;
  height: 24px;
}

.archive h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1A202C;
  margin: 2rem 0 1rem 0;
}

#archivelist {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
}

#archivelist li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
}

#archivelist .entry-title a {
  text-decoration: none;
  color: #1A202C;
  font-weight: 500;
  font-size: 1.1rem;
}

#archivelist .entry-title a:hover {
  color: #4A90E2;
}

#archivelist .published {
  color: #6b7280;
  font-size: 0.9rem;
}

#archivelist .entry-summary {
  margin: 0.5rem 0 0 0;
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Footer */
footer {
  background: #f8f9fa;
  padding: 2rem 1.5rem;
  text-align: center;
  border-top: 1px solid #e5e5e5;
  color: #6b7280;
  font-size: 0.9rem;
}

footer a {
  color: #4A90E2;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Utility classes */
blockquote {
  border-left: 4px solid #4A90E2;
  padding-left: 1rem;
  margin: 1rem 0;
  font-style: italic;
  color: #4b5563;
}

pre {
  font-family: Consolas, 'Courier New', monospace;
  font-size: 0.9em;
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  border: 1px solid #e5e5e5;
}

/* Additional utility styles from original */
#author { 
  font-weight: bold; 
}

/* ===== POST HEADER SECTION ===== */

/* Post header container - provides visual separation from content */
.post-header {
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: #f8f9fa;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  border-left: 4px solid #4A90E2;
}

/* Byline section - always visible */
.post-header .byline {
  font-weight: 600;
  color: #333332;
  margin: 0;
  line-height: 1.6;
}

.post-header .byline a {
  color: #4A90E2;
  text-decoration: none;
}

.post-header .byline a:hover {
  text-decoration: underline;
}

.post-header .byline time {
  color: #6b7280;
  font-weight: 500;
}

/* Category pill styling */
.category-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  margin-left: 0.5rem;
  background: #e5e5e5;
  color: #4b5563;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 12px;
  vertical-align: middle;
}

/* ===== EXPANDABLE PANEL COMPONENT ===== */

/* Base panel container */
.expandable-panel {
  margin-top: 1rem;
  border-top: 1px solid #e5e5e5;
  padding-top: 0.75rem;
}

/* Panel header/trigger button */
.expandable-panel-header {
  margin: 0;
}

.expandable-panel-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: #4b5563;
  text-align: left;
  transition: color 0.2s ease;
}

.expandable-panel-trigger:hover {
  color: #4A90E2;
}

.expandable-panel-trigger:focus {
  outline: 2px solid #4A90E2;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Triangle icon indicator */
.expandable-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

/* Rotate icon when expanded */
.expandable-panel--expanded .expandable-panel-icon {
  /* The JS handles changing the character, but we could also rotate */
}

/* Panel content area */
.expandable-panel-content {
  overflow: hidden;
  transition: height 0.3s ease;
}

/* Collapsed state */
.expandable-panel--collapsed .expandable-panel-content {
  height: 0;
  overflow: hidden;
}

/* Expanded state */
.expandable-panel--expanded .expandable-panel-content {
  height: auto;
  overflow: visible;
}

/* Content padding when visible */
.expandable-panel-content > div {
  padding: 0.75rem 0 0.25rem 0;
}

/* Temporal context styling within expandable panel */
.expandable-panel .temporal-context-container {
  margin: 0;
}

.expandable-panel .temporal-context {
  margin: 0 0 0.5rem 0;
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.expandable-panel .temporal-context:last-child {
  margin-bottom: 0;
}

.expandable-panel .temporal-context-label {
  color: #6b7280;
}

.expandable-panel .temporal-context-link {
  color: #4A90E2;
  text-decoration: none;
  font-weight: 500;
}

.expandable-panel .temporal-context-link:hover {
  text-decoration: underline;
}

.expandable-panel .temporal-context-role {
  color: #6b7280;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .expandable-panel-content,
  .expandable-panel-icon {
    transition: none;
  }
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .post-header {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .expandable-panel-trigger {
    font-size: 0.85rem;
    padding: 0.75rem 0;
  }
  
  .expandable-panel .temporal-context {
    font-size: 0.85rem;
  }
}

/* Table styling for blog content */
.hentry table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.95em;
  border-radius: 4px;
  overflow: hidden;
}

.hentry table thead {
  background: #f5f5f5;
  border-bottom: 2px solid #4A90E2;
}

.hentry table thead th {
  padding: 10px;
  text-align: left;
  font-weight: 600;
}

.hentry table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e5e5;
}

.hentry table tbody tr:nth-child(even) {
  background: #f9f9f9;
}

/* Content images */
.hentry img, main img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1rem 0;
}

/* Code styling */
code {
  background: #f1f3f4;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: Consolas, 'Courier New', monospace;
  font-size: 0.9em;
}

/* Lists in content */
.hentry li {
  padding-bottom: 10px;
}

/* Resume styles */
.resume {
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  background-color: #fdfdfd;
  color: #333;
}

.resume h1,
.resume h2,
.resume h3 {
  color: #2c3e50;
}

.resume h1 {
  border-bottom: 2px solid #ccc;
  padding-bottom: .3em;
}

.resume h3 {
  border-bottom:1px solid black;
}

.resume section {
  margin-top: 2em;
}

/* Two-column layout for desktop and iPad */
.resume .two-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

.resume .column {
  flex: 1 1 calc(50% - 1rem);
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.resume ul {
  padding-left: 1.2rem;
}

/* Mobile layout - single column */
@media (max-width: 767px) {
  .resume {
    padding: 1rem;
  }
  
  .resume .two-columns {
    flex-direction: column;
  }
  
  .resume .column {
    flex: 1 1 100%;
  }
}

/* Print layout */
@media print {
  /* Hide header and footer during print */
  header,
  footer {
    display: none !important;
  }
  
  /* Adjust main content for print */
  main {
    padding: 0;
    margin: 0;
    max-width: none;
  }
  
  /* Resume print styles */
  .resume {
    max-width: none;
    margin: 0;
    line-height: 1.5;
  }
  
  /* Preserve two-column layout for print */
  .resume .two-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
    page-break-inside: avoid;
  }
  
  .resume .column {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 0;
    page-break-inside: avoid;
  }
  
  /* Adjust typography for print */
  .resume h1 {
    font-size: 18px;
    margin: 0 0 0.5rem 0;
    page-break-after: avoid;
  }
  
  .resume h2 {
    font-size: 14px;
    margin: 1rem 0 0.5rem 0;
    page-break-after: avoid;
  }
  
  .resume h3 {
    font-size: 12px;
    margin: 0.75rem 0 0.25rem 0;
    page-break-after: avoid;
  }
  
  .resume p {
    margin: 0 0 0.5rem 0;
    font-size: 11px;
    orphans: 2;
    widows: 2;
  }
  
  .resume ul {
    margin: 0 0 0.5rem 0;
    padding-left: 1rem;
  }
  
  .resume li {
    margin: 0 0 0.25rem 0;
    font-size: 10px;
    page-break-inside: avoid;
    orphans: 2;
    widows: 2;
  }
  
  /* Ensure sections don't break poorly */
  .resume section {
    margin-top: 0.5rem;
  }
  
  /* Remove any background colors for print */
  .resume {
    background-color: white !important;
    color: black !important;
  }
  
  /* Full resume print styles */
  .resume-full .time-period {
    page-break-inside: avoid;
  }
  
  .resume-full .main-job,
  .resume-full .side-work {
    page-break-inside: avoid;
  }
}

/* ===== FULL RESUME STYLES ===== */
/* Main job and side work layout with float mechanism */

.resume-full .time-period {
  clear: both;
  margin-bottom: 2rem;
  overflow: auto; /* Clearfix for floats */
}

/* When there's no side work, main job flows full width */
.resume-full .time-period.no-side-work .main-job {
  width: 100%;
}

/* When there's side work, use two-column layout */
.resume-full .time-period.has-side-work .main-job {
  float: left;
  width: 58%;
  padding-right: 2rem;
}

.resume-full .time-period.has-side-work .side-work {
  float: right;
  width: 38%;
  padding-left: 1rem;
  border-left: 2px solid #e5e5e5;
}

.resume-full .main-job h3 {
  margin-top: 0;
  color: #2c3e50;
  border-bottom: 1px solid #333;
}

.resume-full .side-work h4 {
  margin-top: 0;
  color: #4A90E2;
  font-size: 1.1em;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.2em;
}

.resume-full .side-job {
  margin-bottom: 1.5rem;
}

.resume-full .side-job:last-child {
  margin-bottom: 0;
}

.resume-full .main-job p,
.resume-full .side-work p {
  margin: 0.5rem 0;
  line-height: 1.5;
}

.resume-full .main-job ul,
.resume-full .side-work ul {
  margin-top: 0.75rem;
  padding-left: 1.2rem;
}

.resume-full .additional-info {
  clear: both;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 3px solid #ccc;
}

/* Mobile layout - stack everything */
@media (max-width: 767px) {
  .resume-full .time-period.has-side-work .main-job,
  .resume-full .time-period.has-side-work .side-work {
    float: none;
    width: 100%;
    padding: 0;
    border: none;
  }
  
  .resume-full .time-period.has-side-work .side-work {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e5e5e5;
    border-left: none;
  }
}

/* Print styles for full resume */
@media print {
  .resume-full .time-period.has-side-work .main-job {
    width: 58%;
  }
  
  .resume-full .time-period.has-side-work .side-work {
    width: 38%;
  }
  
  .resume-full .time-period {
    page-break-inside: avoid;
  }
  
  .resume-full .main-job,
  .resume-full .side-work {
    page-break-inside: avoid;
  }
  
  .resume-full .additional-info {
    margin-top: 1.5rem;
    padding-top: 1rem;
  }
}

/* Social media links - modern responsive layout */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.social-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.social-icon {
  width: 90px;
  height: 90px;
  border-radius: 8px;
}

/* Projects section */
.projects-section {
  margin: 2rem 0;
}

.project {
  display: flex;
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #4A90E2;
}

.project-logo {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.project-icon {
  width: 80px;
  height: 80px;
}

.project-icon-emoji {
  font-size: 4rem;
  line-height: 1;
}

.project-content {
  flex: 1;
}

.project-content h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.4rem;
  color: #1A202C;
}

.project-content p {
  margin: 0 0 1rem 0;
  line-height: 1.6;
}

.project-screenshot {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 0 1rem 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

/* About page: hero, featured project, open-source index, founder */
.about-hero {
  margin: 0 0 2.5rem 0;
  padding: 2.5rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  color: #fff;
}

.about-hero .about-eyebrow {
  margin: 0 0 0.75rem 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: #93c5fd;
}

.about-hero .about-lede {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.6;
  color: #e5e7eb;
  max-width: 42rem;
}

.about-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.about-nav a {
  padding: 0.45rem 1rem;
  border: 1px solid #4b5563;
  border-radius: 999px;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.about-nav a:hover {
  border-color: #93c5fd;
  color: #fff;
}

.project-featured {
  flex-direction: column;
  gap: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #4A90E2;
}

.project-featured .project-content h3 {
  font-size: 1.8rem;
}

.project-featured .project-screenshot {
  width: 100%;
}

.oss-index {
  margin: 1rem 0 2rem 0;
}

.oss-row {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.oss-row:first-child {
  border-top: 1px solid #e2e8f0;
}

.oss-name {
  flex: 0 0 10rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: #1A202C;
}

.oss-desc {
  flex: 1;
  line-height: 1.6;
  color: #2d3748;
}

.oss-links {
  display: flex;
  gap: 0.9rem;
  flex-shrink: 0;
}

.oss-links a {
  color: #4A90E2;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.oss-links a:hover {
  text-decoration: underline;
}

.founder-bio p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #4a5568;
}

@media (max-width: 768px) {
  .about-hero {
    padding: 1.5rem;
  }

  .oss-row {
    flex-direction: column;
    gap: 0.3rem;
  }

  .oss-name {
    flex: none;
  }
}

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

.project-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #4A90E2;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.project-link:hover {
  background: #357ABD;
  color: white;
}

/* Mobile responsiveness for social and projects */
@media (max-width: 768px) {
  .social-links {
    gap: 0.75rem;
    padding: 1rem;
  }
  
  .social-icon {
    width: 70px;
    height: 70px;
  }
  
  .project {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .project-logo {
    align-self: center;
  }
  
  .project-icon {
    width: 60px;
    height: 60px;
  }
  
  .project-icon-emoji {
    font-size: 3rem;
  }
  
  .project-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .social-links {
    gap: 0.75rem;
  }
  
  .social-icon {
    width: 60px;
    height: 60px;
  }
}

/* Post navigation styles */
.post-navigation {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
  margin-bottom: 1.5rem;
}

.post-navigation .nav-previous:last-child,
.post-navigation .nav-next:last-child {
  margin-bottom: 0;
}

.post-navigation p {
  margin: 0 0 0.5rem 0;
}

.post-navigation p:last-child {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.4;
}

.post-navigation a {
  text-decoration: none;
  color: #4A90E2;
  font-weight: 500;
}

.post-navigation a:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .post-navigation {
    display: flex;
    gap: 2rem;
  }
  
  .post-navigation .nav-previous,
  .post-navigation .nav-next {
    flex: 1;
    margin-bottom: 0;
  }
}

/* ===== TIMELINE COMPONENT ===== */

/* CSS Custom Properties for Theming */
.timeline {
  /* Layout and spacing */
  --timeline-spine-width: 2px;
  --timeline-spine-color: #e5e7eb;
  --timeline-gap-x: 2rem;
  --timeline-gap-y: 2rem;
  
  /* Bubble styling */
  --timeline-bubble-size: 3rem;
  --timeline-bubble-bg: #ffffff;
  --timeline-bubble-border: 2px solid #e5e7eb;
  --timeline-bubble-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  
  /* Card styling */
  --timeline-card-max-width: 400px;
  --timeline-card-radius: 0.5rem;
  --timeline-card-border: 1px solid #e5e7eb;
  --timeline-card-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
  
  /* Colors */
  --timeline-text-primary: #1f2937;
  --timeline-text-secondary: #6b7280;
  --timeline-accent-color: #3b82f6;
  
  /* Responsive breakpoint */
  --timeline-mobile-breakpoint: 900px;
}

/* Base timeline container */
.timeline {
  position: relative;
  margin: 3rem 0;
  min-height: 200px;
}

/* Desktop layout (≥ 900px) */
@media (min-width: 900px) {
  /* Center spine - vertical line running through middle */
  .timeline-spine {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: var(--timeline-spine-width);
    background: var(--timeline-spine-color);
    transform: translateX(-50%);
    z-index: 1;
  }

  /* Overlay containing all bubbles */
  .timeline-overlay {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: var(--timeline-bubble-size);
    transform: translateX(-50%);
    z-index: 2;
    pointer-events: none;
  }

  /* Individual timeline bubbles */
  .timeline-bubble {
    position: absolute;
    width: var(--timeline-bubble-size);
    height: var(--timeline-bubble-size);
    background: var(--timeline-bubble-bg);
    border: var(--timeline-bubble-border);
    border-radius: 50%;
    box-shadow: var(--timeline-bubble-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--timeline-text-secondary);
  }

  /* Bubble positioning using CSS Anchor Positioning (progressive enhancement) */
  @supports (anchor-name: --timeline-anchor) {
    .timeline-card[data-timeline-item] {
      anchor-name: --timeline-anchor;
    }
    
    .timeline-bubble[data-timeline-item] {
      position-anchor: --timeline-anchor;
      top: anchor(top);
    }
  }

  /* Bubble connectors - horizontal lines extending toward cards */
  .timeline-connector {
    position: absolute;
    top: 50%;
    width: var(--timeline-gap-x);
    height: 2px;
    background: var(--timeline-spine-color);
    transform: translateY(-50%);
  }

  .timeline-bubble--left .timeline-connector {
    right: 100%;
  }

  .timeline-bubble--right .timeline-connector {
    left: 100%;
  }

  /* Timeline content container with two columns */
  .timeline-content {
    display: flex;
    gap: calc(var(--timeline-gap-x) * 2 + var(--timeline-bubble-size));
    min-height: 100%;
  }

  .timeline-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--timeline-gap-y);
  }

  .timeline-column--left {
    align-items: flex-end;
    text-align: right;
  }

  .timeline-column--right {
    align-items: flex-start;
    text-align: left;
    /* Add top padding to stagger right column cards - ensure bubble height clearance */
    padding-top: calc(var(--timeline-bubble-size) + var(--timeline-gap-y));
  }

  /* Timeline cards */
  .timeline-card {
    max-width: var(--timeline-card-max-width);
    background: #ffffff;
    border: var(--timeline-card-border);
    border-radius: var(--timeline-card-radius);
    box-shadow: var(--timeline-card-shadow);
    padding: 1.5rem;
    position: relative;
  }

  /* Hide inline dates on desktop - bubbles show dates instead */
  .timeline-card-date {
    display: none;
  }
}

/* Mobile layout (≤ 900px) */
@media (max-width: 900px) {
  /* Hide desktop-specific elements */
  .timeline-spine,
  .timeline-overlay {
    display: none;
  }

  /* Single column layout - change to flex column to enable ordering */
  .timeline-content {
    display: flex;
    flex-direction: column;
    gap: var(--timeline-gap-y);
    position: relative;
    padding-left: 1rem;
  }

  /* Both columns become invisible containers, their children will be reordered */
  .timeline-column--left,
  .timeline-column--right {
    display: contents; /* This makes the column div "disappear" and its children participate in parent flex */
  }

  /* Order timeline cards chronologically by their data-timeline-item attribute */
  .timeline-card[data-timeline-item="0"] { order: 0; }
  .timeline-card[data-timeline-item="1"] { order: 1; }
  .timeline-card[data-timeline-item="2"] { order: 2; }
  .timeline-card[data-timeline-item="3"] { order: 3; }
  .timeline-card[data-timeline-item="4"] { order: 4; }
  .timeline-card[data-timeline-item="5"] { order: 5; }
  .timeline-card[data-timeline-item="6"] { order: 6; }
  .timeline-card[data-timeline-item="7"] { order: 7; }
  .timeline-card[data-timeline-item="8"] { order: 8; }
  .timeline-card[data-timeline-item="9"] { order: 9; }
  .timeline-card[data-timeline-item="10"] { order: 10; }
  .timeline-card[data-timeline-item="11"] { order: 11; }
  .timeline-card[data-timeline-item="12"] { order: 12; }
  .timeline-card[data-timeline-item="13"] { order: 13; }
  .timeline-card[data-timeline-item="14"] { order: 14; }
  .timeline-card[data-timeline-item="15"] { order: 15; }
  .timeline-card[data-timeline-item="16"] { order: 16; }
  .timeline-card[data-timeline-item="17"] { order: 17; }
  .timeline-card[data-timeline-item="18"] { order: 18; }
  .timeline-card[data-timeline-item="19"] { order: 19; }

  /* Optional subtle left rule for mobile */
  .timeline-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--timeline-spine-color);
    border-radius: 2px;
  }

  /* Mobile cards */
  .timeline-card {
    background: #ffffff;
    border: var(--timeline-card-border);
    border-radius: var(--timeline-card-radius);
    box-shadow: var(--timeline-card-shadow);
    padding: 1.5rem;
    position: relative;
  }

  /* Show inline dates on mobile */
  .timeline-card-date {
    display: block;
    font-size: 0.875rem;
    color: var(--timeline-text-secondary);
    margin-bottom: 0.5rem;
  }
}

/* Common card styles */
.timeline-card-header {
  margin-bottom: 1rem;
}

.timeline-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--timeline-text-primary);
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}

.timeline-card-content {
  color: var(--timeline-text-primary);
  line-height: 1.6;
}

.timeline-card-content > *:first-child {
  margin-top: 0;
}

.timeline-card-content > *:last-child {
  margin-bottom: 0;
}

/* Timeline card content - image styling */
.timeline-card-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
  margin: 1rem 0;
}

/* Print styles */
@media print {
  .timeline {
    --timeline-card-shadow: none;
    --timeline-bubble-shadow: none;
  }

  /* Hide overlay elements in print */
  .timeline-spine,
  .timeline-overlay {
    display: none !important;
  }

  /* Single column layout for print */
  .timeline-content {
    display: block !important;
  }

  .timeline-column--right {
    display: none !important;
  }

  .timeline-column--left {
    display: block !important;
    padding-left: 0 !important;
  }

  .timeline-column--left::before {
    display: none !important;
  }

  /* Show dates inline for print */
  .timeline-card-date {
    display: block !important;
  }

  /* Ensure cards don't break across pages */
  .timeline-card {
    break-inside: avoid;
    margin-bottom: 1rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .timeline {
    --timeline-spine-color: #000000;
    --timeline-bubble-border: 2px solid #000000;
    --timeline-card-border: 2px solid #000000;
    --timeline-text-primary: #000000;
    --timeline-text-secondary: #000000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .timeline-bubble {
    transition: none !important;
  }
}

/* Timeline modifiers for different themes */
.timeline--compact {
  --timeline-gap-y: 1rem;
  --timeline-bubble-size: 2.5rem;
  --timeline-card-max-width: 350px;
}

.timeline--spacious {
  --timeline-gap-y: 3rem;
  --timeline-bubble-size: 3.5rem;
  --timeline-card-max-width: 500px;
}

.timeline--contrast {
  --timeline-spine-color: #374151;
  --timeline-bubble-bg: #1f2937;
  --timeline-bubble-border: 2px solid #374151;
  --timeline-accent-color: #10b981;
}

.timeline--contrast .timeline-bubble {
  color: #ffffff;
}

/* Accessibility improvements */
.timeline-bubble {
  /* Bubbles are decorative */
  user-select: none;
}

.timeline-card:focus {
  outline: 2px solid var(--timeline-accent-color);
  outline-offset: 2px;
}

/* Support for loading states */
.timeline[data-loading="true"] .timeline-bubble {
  opacity: 0.5;
}

/* Animation for timeline entrance (respects reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .timeline-card {
    animation: timelineCardEntrance 0.6s ease-out;
  }
  
  .timeline-card:nth-child(odd) {
    animation-delay: 0.1s;
  }
  
  .timeline-card:nth-child(even) {
    animation-delay: 0.2s;
  }
  
  @keyframes timelineCardEntrance {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
