/* Blog Layout Styles - Inspired by minimal book-like design */

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

html, body {
  margin: 0;
  padding: 0;
}

:root {
  --bg-beige: #ffffff;
  --bg-beige-light: #fafafa;
  --bg-beige-dark: #f5f5f5;
  --card-white: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #6a6a6a;
  --border-light: rgba(0, 0, 0, 0.1);
  --accent-black: #1a1a1a;
  --accent-green: #4ade80;
  --accent-green-light: #86efac;
  --accent-blue: #60a5fa;
  --accent-blue-light: #93c5fd;
  --accent-purple: #a78bfa;
  --accent-purple-light: #c4b5fd;
  --accent-orange: #fb923c;
  --accent-orange-light: #fdba74;
}

/* Override base styles for blog page */
body {
  margin: 0 !important;
  min-height: 100vh;
  background: #ffffff !important;
  font-family: 'Source Serif 4', Georgia, serif !important;
  color: var(--text-primary) !important;
  line-height: 1.75;
  position: relative;
}

/* Hide default page shell if it exists */
.page-shell {
  display: none !important;
}

.blog-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 1;
}

/* Override base link styles */
.blog-container a {
  text-decoration: none;
  color: inherit;
}

/* Top Navigation */
.top-nav {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
  width: 100%;
}

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

.nav-tab {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

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

.nav-tab.active {
  color: var(--text-primary);
  font-weight: 500;
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-black);
  border-radius: 1px;
}

.nav-actions {
  display: flex;
  gap: 0.5rem;
}

.icon-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.icon-btn:hover {
  color: var(--text-primary);
}

/* Blog Layout - Two Column */
.blog-layout {
  display: grid !important;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
  width: 100%;
}

/* Full Width Layout (no sidebar) */
.blog-layout-full {
  grid-template-columns: 1fr;
  max-width: 900px;
  margin: 0 auto;
}

/* Main Article Area */
.article-main {
  min-width: 0;
}

.article-card {
  background: var(--card-white) !important;
  border-radius: 16px;
  padding: 3rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  display: block !important;
  width: 100%;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.article-separator {
  color: var(--text-muted);
  opacity: 0.5;
}

.article-category {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.category-notes {
  background: rgba(76, 222, 128, 0.15);
  color: #16a34a;
}

.category-design {
  background: rgba(96, 165, 250, 0.15);
  color: #2563eb;
}

.category-research {
  background: rgba(167, 139, 250, 0.15);
  color: #7c3aed;
}

.article-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 2rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.article-image {
  margin: 2rem 0;
}

.image-placeholder {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  margin-bottom: 0.75rem;
}

.image-caption {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  margin: 0;
}

.article-content {
  margin-top: 2rem;
}

.article-content p {
  margin: 0 0 1.5rem;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-primary);
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.article-content h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 500;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.article-quote {
  margin: 2rem 0;
  padding-left: 1.5rem;
  border-left: 3px solid var(--accent-black);
  font-style: italic;
  color: var(--text-secondary);
}

.article-quote p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.6;
}

/* Sidebar */
.blog-sidebar {
  position: sticky;
  top: 2rem;
  align-self: start;
}

.sidebar-card {
  background: var(--card-white) !important;
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  display: block !important;
  width: 100%;
}

.sidebar-title {
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.sidebar-subtitle {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0 0 2rem;
  line-height: 1.6;
}

/* Filter Buttons */
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: 24px;
  background: var(--card-white);
  color: var(--text-secondary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
  background: #fafafa;
}

.filter-btn.active {
  background: var(--accent-black);
  color: white;
  border-color: var(--accent-black);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-btn.active:hover {
  background: #2a2a2a;
  border-color: #2a2a2a;
}

.filter-btn.active svg {
  stroke: white;
}

.filter-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

/* Article List */
.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.article-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
}

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

.article-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: color 0.2s ease;
}

.article-link:hover {
  color: var(--accent-black);
}

.article-item.active .article-link {
  color: var(--accent-black);
}

.article-item-title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  line-height: 1.4;
  color: var(--text-primary);
}

.article-item.active .article-item-title {
  color: var(--accent-black);
}

.article-item-meta {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.article-item[data-category="design"] .article-item-meta {
  position: relative;
  padding-left: 1rem;
}

.article-item[data-category="design"] .article-item-meta::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--accent-blue);
}

.article-item[data-category="research"] .article-item-meta {
  position: relative;
  padding-left: 1rem;
}

.article-item[data-category="research"] .article-item-meta::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--accent-purple);
}

.article-item[data-category="notes"] .article-item-meta {
  position: relative;
  padding-left: 1rem;
}

.article-item[data-category="notes"] .article-item-meta::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--accent-green);
}

/* Responsive Design */
/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .blog-container {
    padding: 1.5rem;
  }

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

  .blog-sidebar {
    position: static;
  }

  .article-card {
    padding: 2rem;
  }

  .content-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .article-title {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
  }

  .project-item-header {
    gap: 1.25rem;
  }

  .company-logo {
    width: 50px;
    height: 50px;
  }
}

/* Mobile (up to 768px) */
@media (max-width: 768px) {
  .blog-container {
    padding: 1rem;
  }

  .top-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 0;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .nav-tab {
    font-size: 0.875rem;
  }

  .page-header {
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .page-description {
    font-size: 1rem;
    max-width: 100%;
  }

  .shuffle-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }

  .article-card {
    padding: 1.5rem;
    border-radius: 12px;
  }

  .article-title {
    font-size: clamp(1.5rem, 5vw, 1.8rem);
    margin-bottom: 1rem;
  }

  .article-content {
    font-size: 1rem;
  }

  .article-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
  }

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

  .content-grid .project-card {
    grid-column: 1;
  }

  .project-card {
    margin-bottom: 1.5rem;
  }

  .project-card .card-image {
    height: 220px;
    padding: 1.25rem;
  }

  .card-content {
    padding: 1.25rem;
  }

  .card-title {
    font-size: 1.125rem;
  }

  .card-author {
    font-size: 0.875rem;
  }

  .project-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }

  .project-item-header {
    gap: 1rem;
    flex-direction: row;
    align-items: center;
  }

  .company-logo {
    width: 48px;
    height: 48px;
  }

  .project-item h2 {
    font-size: 1.25rem;
  }

  .project-meta {
    font-size: 0.875rem;
  }

  .project-location {
    font-size: 0.8125rem;
  }

  .expanded-content {
    padding: 1.25rem;
  }

  .expanded-content h4 {
    font-size: 1.125rem;
    margin-top: 1.5rem;
  }

  .project-figure {
    margin: 1.5rem 0;
  }

  .project-figure figcaption {
    font-size: 0.8125rem;
    padding: 0 0.5rem;
  }

  .project-links {
    flex-direction: column;
    gap: 0.75rem;
  }

  .project-link {
    width: 100%;
    justify-content: center;
  }

  .about-content {
    flex-direction: column;
    gap: 2rem;
  }
  
  .about-image {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .work-history,
  .interests {
    font-size: 1rem;
    line-height: 1.6;
  }

  .see-also {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Small Mobile (up to 480px) */
@media (max-width: 480px) {
  .blog-container {
    padding: 0.75rem;
  }

  .top-nav {
    padding: 0.5rem 0;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .nav-tab {
    font-size: 0.8125rem;
  }

  .article-card {
    padding: 1.25rem;
    border-radius: 12px;
  }

  .article-title {
    font-size: 1.5rem;
  }

  .article-content {
    font-size: 0.9375rem;
  }

  .page-description {
    font-size: 0.9375rem;
  }

  .shuffle-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.75rem;
  }

  .shuffle-btn svg {
    width: 16px;
    height: 16px;
  }

  .project-card .card-image {
    height: 200px;
    padding: 1rem;
  }

  .card-content {
    padding: 1rem;
  }

  .card-title {
    font-size: 1rem;
  }

  .card-author {
    font-size: 0.8125rem;
  }

  .card-preview {
    font-size: 0.875rem;
  }

  .expand-indicator {
    margin-top: 1rem;
    padding-top: 1rem;
    font-size: 0.8125rem;
  }

  .project-item-header {
    gap: 0.75rem;
  }

  .company-logo {
    width: 40px;
    height: 40px;
  }

  .project-item h2 {
    font-size: 1.125rem;
  }

  .expanded-content {
    padding: 1rem;
    font-size: 0.9375rem;
  }

  .about-image {
    max-width: 250px;
  }

  .work-history,
  .interests {
    font-size: 0.9375rem;
  }
}

/* Hide filtered items */
.article-item.hidden {
  display: none;
}

/* About page styles */
.about-content {
  display: flex;
  flex-direction: row;
  gap: 3rem;
  align-items: flex-start;
}

.about-image {
  flex-shrink: 0;
  width: 200px;
  max-width: 200px;
}

.about-image img {
  width: 200px;
  height: auto;
  max-width: 200px;
  border-radius: 8px;
  box-shadow: none;
  opacity: 1;
  mix-blend-mode: normal;
  filter: contrast(1.05) saturate(1.1);
  object-fit: contain;
}

.about-text {
  flex: 1;
}

.work-history,
.interests {
  font-size: 1.0625rem;
  line-height: 1.75;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
}

.see-also {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.see-also span {
  margin-right: 0.5rem;
}

.see-also a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease;
}

.see-also a:hover {
  color: var(--text-primary);
}

/* Projects page styles */
.project-item {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}

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

.project-item-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.company-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
}

.project-item-info {
  flex: 1;
}

.project-item h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.project-meta {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin: 0 0 0.25rem;
}

.project-location {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  margin: 0;
}

.project-description {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-primary);
  margin-top: 1rem;
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
}

/* Section Divider */
.section-divider {
  height: 1px;
  background: var(--border-light);
  margin: 3rem 0;
  width: 100%;
}

/* Content Grid - Card Layout */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  grid-auto-rows: min-content;
  gap: 2rem;
  width: 100%;
  align-items: start;
}

/* Project Cards Grid - Full Width */
/* Project cards in projects page span full width, but reading cards should be in grid */
.content-grid .project-card:not(.reading-card) {
  grid-column: 1 / -1;
}

/* Content Cards */
.content-card {
  background: var(--card-white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  pointer-events: auto;
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
}

.card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f5f5f5;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.image-placeholder-card {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-placeholder-card svg {
  width: 100%;
  height: 100%;
}

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

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.card-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.375rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  flex: 1;
}

.card-author {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-muted);
  font-style: italic;
  white-space: nowrap;
}
  margin-left: auto;
}

.card-preview {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin: 0;
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
}

/* Blur effect for project card previews - NO TRUNCATION */
.project-card .card-preview.preview-text {
  opacity: 0.8;
  filter: blur(0.3px);
  transition: opacity 0.3s ease, filter 0.3s ease;
  display: block !important;
  overflow: visible !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;
  white-space: normal !important;
  word-wrap: break-word !important;
}

.project-card .card-preview.preview-text.blurred {
  opacity: 0.8;
  filter: blur(0.3px);
}

.project-card.is-expanded .card-preview.preview-text {
  display: none !important;
}

.project-card .card-preview.preview-text:not(.blurred) {
  opacity: 1;
  filter: blur(0);
}

/* Regular content cards (non-project cards) */
.content-card .card-preview {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.8;
  filter: blur(0.3px);
}

.content-card:hover .card-preview {
  opacity: 1;
  filter: blur(0);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.content-card:hover .card-title {
  color: var(--accent-black);
}

/* Page Header (for Readings page) */
.page-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

/* Page Description */
.page-description {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0 auto 2.5rem;
  font-style: italic;
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
  text-align: center;
  max-width: 600px;
}

/* Shuffle Button */
.shuffle-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--card-white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.shuffle-btn:hover {
  background: var(--bg-beige-dark);
  border-color: var(--text-primary);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.shuffle-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.shuffle-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* Expandable Project Cards */
.project-card {
  background: var(--card-white);
  border-radius: 16px;
  overflow: visible;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  margin-bottom: 0;
  position: relative;
  isolation: isolate;
  contain: layout style;
  height: fit-content;
  align-self: start;
}

/* Reading cards with shadowy brush effect */
.project-card.reading-card {
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.04),
    -2px 2px 12px rgba(0, 0, 0, 0.05),
    2px -2px 12px rgba(0, 0, 0, 0.03);
  position: relative;
}

.project-card.reading-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(0, 0, 0, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(0, 0, 0, 0.02) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 10%, rgba(0, 0, 0, 0.015) 0%, transparent 40%);
  border-radius: 18px;
  z-index: -1;
  pointer-events: none;
}

.project-card.reading-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.008) 2px, rgba(0, 0, 0, 0.008) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0, 0, 0, 0.008) 2px, rgba(0, 0, 0, 0.008) 4px);
  border-radius: 16px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.project-card-header {
  cursor: pointer;
  transition: background-color 0.2s ease;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  position: relative;
  z-index: 1;
}

.project-card-header:hover {
  background-color: rgba(0, 0, 0, 0.01);
}

.reading-card .project-card-header {
  background-color: transparent;
}

.reading-card .card-content {
  position: relative;
  z-index: 1;
}

.project-card:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.12);
}

.project-card.reading-card:hover {
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 8px 24px rgba(0, 0, 0, 0.08),
    0 12px 32px rgba(0, 0, 0, 0.06),
    -3px 3px 16px rgba(0, 0, 0, 0.07),
    3px -3px 16px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

.project-card.reading-card:hover {
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 8px 24px rgba(0, 0, 0, 0.08),
    0 12px 32px rgba(0, 0, 0, 0.06),
    -3px 3px 16px rgba(0, 0, 0, 0.07),
    3px -3px 16px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

.project-card .card-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: #ffffff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Reading cards: images should fill the frame */
.reading-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Specific image positioning adjustments */
.reading-card .card-image img[src*="symposium2"] {
  object-position: center 50%;
}

.reading-card .card-image img[src*="LiarsPoker2"] {
  object-position: center 50%;
}

.reading-card .card-image img[src*="inferno2"] {
  object-position: center 50%;
}

.reading-card .card-image img[src*="Browning2"] {
  object-position: center 50%;
}

.reading-card .card-image img[src*="Letters"] {
  object-position: center 50%;
}

.reading-card .card-image img[src*="gentleman in moscow"] {
  object-position: center 80%;
}

.reading-card .card-image img[src*="TheAlchemist2"] {
  object-position: center 50%;
}

.reading-card .card-image img[src*="KiteRunner2"] {
  object-position: center 40%;
}

.reading-card .card-image img[src*="TheBookThief"] {
  object-position: center 50%;
}

.reading-card .card-image img[src*="The Double2"] {
  object-position: center 50%;
}

.reading-card .card-image img[src*="Crime and Punishment 2"] {
  object-position: center 40%;
}

.reading-card .card-image img[src*="ThePrince2"] {
  object-position: center 60%;
}

.reading-card .card-image img[src*="The Stranger2"] {
  object-position: center 50%;
}

.project-card .card-image .image-placeholder-card {
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
}

.project-card .card-image .image-placeholder-card[style*="display: block"] {
  display: flex !important;
}

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

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.card-header-row .card-title {
  flex: 1;
  margin: 0;
}

.card-header-row .card-title-row {
  flex: 1;
  margin: 0;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  font-family: 'Source Serif 4', Georgia, serif;
}

.status-current {
  background: #1a1a1a;
  color: #ffffff;
}

.status-completed {
  background: #6a6a6a;
  color: #ffffff;
}

/* Expand Indicator */
.expand-indicator {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.875rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.expand-indicator strong {
  font-weight: 600;
  color: var(--text-secondary);
}

.expand-indicator svg {
  transition: transform 0.3s ease;
  color: var(--text-muted);
  flex-shrink: 0;
}

.project-card.is-expanded .expand-indicator {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

/* Expanded Content */
.project-card-expanded {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  position: relative;
  z-index: 0;
  width: 100%;
  box-sizing: border-box;
  display: block;
  background: var(--card-white);
  border-radius: 0 0 16px 16px;
}

/* Only show expanded content when the parent card has is-expanded */
.project-card:not(.is-expanded) > .project-card-expanded {
  max-height: 0 !important;
  display: block;
  overflow: hidden;
}

.project-card.is-expanded > .project-card-expanded {
  display: block;
  overflow: visible;
}

.expanded-content {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-primary);
  position: relative;
}

.expanded-content h4 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  margin: 2rem 0 1rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.expanded-content h4:first-child {
  margin-top: 0;
}

.expanded-content p {
  font-size: 1rem;
  line-height: 1.75;
  margin: 0 0 1.25rem;
  color: var(--text-primary);
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
}

.expanded-content ul {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.expanded-content li {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
}

.expanded-content strong {
  font-weight: 500;
  color: var(--text-primary);
}

/* Project Links */
.project-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  transition: all 0.2s ease;
}

.project-link:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.02);
}

.project-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Project Award Badge */
.project-award {
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  background: rgba(76, 222, 128, 0.1);
  border-left: 3px solid var(--accent-green);
  border-radius: 4px;
}

.project-award strong {
  color: #16a34a;
  font-size: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* Project Figures */
.project-figure {
  margin: 2rem 0;
  text-align: center;
}

.project-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 0.75rem;
}

.project-figure figcaption {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
  max-width: 700px;
  margin: 0 auto;
}

.project-figure video {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 0.75rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* YouTube Video Container */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto 0.75rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

/* YouTube Link Container (fallback when embed fails) */
.video-link-container {
  max-width: 800px;
  margin: 0 auto 0.75rem;
}

.youtube-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  border-radius: 8px;
  text-decoration: none;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.youtube-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #ff1a1a 0%, #e60000 100%);
}

.youtube-link-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.youtube-link-content svg {
  width: 64px;
  height: 64px;
  fill: white;
}

.youtube-link-content span {
  font-size: 1.125rem;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--border-light);
  background: transparent;
}

.site-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

@media (max-width: 768px) {
  .site-footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
  }
  
  .site-footer p {
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  .site-footer {
    margin-top: 2rem;
    padding: 1rem 0;
  }
  
  .site-footer p {
    font-size: 0.75rem;
  }
}

