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

:root {
  --primary-bg: rgb(238, 234, 220);
  --text-color: #000000;
  --text-secondary: #666666;
  --hover-color: #333333;
  --border-color: #e5e5e5;
  --spacing-unit: 8px;
}

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  background-color: var(--primary-bg);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

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

.container {
  max-width: 1400px;
  width: 90%;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
}

/* Header */
.header {
  padding: 56px 0 28px;
}

.header-content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
}

.header-main {
  display: flex;
  gap: 36px;
  align-items: center;
  width: 1100px;
  max-width: 100%;
}

.photo-wrapper {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-photo-header {
  width: 140%;
  height: 140%;
  object-fit: cover;
  transform: scaleX(-1);
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.name-and-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.title-separator {
  font-size: 28px;
  color: #999;
  font-weight: 300;
}

.site-title {
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin: 0;
  color: var(--text-color);
}

.subtitle {
  font-size: 28px;
  font-weight: 400;
  color: #666;
  margin: 0;
}

.tagline {
  font-size: 48px;
  font-weight: 400;
  color: var(--text-color);
  margin: 0;
  line-height: 1.3;
  max-width: 800px;
  letter-spacing: -1px;
}

.tooltip-term {
  position: relative;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: #999;
  text-underline-offset: 4px;
  cursor: help;
}

.tooltip-term::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #1a1a1a;
  color: white;
  padding: 16px 20px;
  border-radius: 6px;
  font-size: 18px;
  line-height: 1.5;
  width: 400px;
  max-width: calc(100vw - 20px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: 0;
  font-weight: 400;
}

.tooltip-term::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 8px solid transparent;
  border-top-color: #1a1a1a;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  z-index: 1001;
}

.tooltip-term:hover::after,
.tooltip-term:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(-12px);
}

.tooltip-term:hover::before {
  transform: translateX(-50%) translateY(0px);
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
  align-items: center;
}

.main-nav a,
.main-nav button {
  font-size: 18px;
  font-weight: 400;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
  font-family: inherit;
}

.work-toggle {
  display: none;
}

.work-toggle::after {
  content: " ▾";
  font-size: 14px;
}

/* Main Content */
.main-content {
  padding: 60px 0 100px;
  overflow: visible;
}

.main-content:has(.filter-buttons) {
  padding-top: 0;
}

/* Section Title */
.section-title {
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  margin: 0 0 24px;
  color: var(--text-color);
}

.subsection-title {
  font-size: 20px;
  font-weight: 600;
  text-align: left;
  margin: 60px 0 30px;
  color: var(--text-color);
  grid-column: 1 / -1;
}

/* Filter Buttons */
.filter-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 10px 24px;
  font-size: 16px;
  font-weight: 400;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  color: var(--text-color);
}

.filter-btn:hover {
  border-color: #333;
  background: #f8f8f8;
}

.filter-btn.active {
  background: #333;
  color: white;
  border-color: #333;
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
  margin-bottom: 80px;
  overflow: visible;
}

.portfolio-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hidden {
  display: none !important;
}

.portfolio-item.top-featured {
  grid-column: span 1;
}

/* Featured portfolio items - two-column card layout */
.portfolio-item[data-featured="true"]:not(.hidden) {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 0;
  text-decoration: none;
  color: inherit;
  overflow: visible;
}

/* Gradient background container for featured cards */
.portfolio-item[data-featured="true"] .portfolio-link {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 20px;
  padding: 28px;
  border-radius: 6px;
  margin-bottom: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  overflow: visible;
}

/* Image inside gradient container */
.portfolio-item[data-featured="true"] .portfolio-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  flex-shrink: 0;
}

.portfolio-item[data-featured="true"] .portfolio-link > img.portfolio-image,
.portfolio-item[data-featured="true"] .portfolio-link > video.portfolio-image {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.portfolio-item[data-featured="true"]
  .portfolio-link
  > .portfolio-image-composite {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}

.portfolio-image-base {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.portfolio-image-overlay {
  position: absolute;
  top: 12%;
  right: 5%;
  width: 220px;
  max-width: 30%;
  transform: scaleX(-1);
}

/* Portfolio tags container */
.portfolio-item[data-featured="true"] .portfolio-tags {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  overflow: visible;
}

/* Individual tag pill */
.portfolio-item[data-featured="true"] .portfolio-tag {
  background: rgba(255, 255, 255, 0.45);
  color: #444;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  box-shadow: none;
  cursor: help;
  position: relative;
  transition: all 0.2s ease;
}

.portfolio-item[data-featured="true"] .portfolio-tag:hover {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(255, 255, 255, 0.7);
  color: #222;
}

/* Tooltip on hover */
.portfolio-item[data-featured="true"] .portfolio-tag::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%);
  background: #1a1a1a;
  color: white;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  white-space: normal;
  width: 240px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 100;
  line-height: 1.4;
}

.portfolio-item[data-featured="true"] .portfolio-tag:hover::after {
  opacity: 1;
}

/* Five-color gradient pattern - Medium soft tones */
.portfolio-item[data-featured="true"]:nth-of-type(1) .portfolio-link {
  background: linear-gradient(135deg, #90cfff 0%, #7bbfff 100%);
}

.portfolio-item[data-featured="true"]:nth-of-type(2) .portfolio-link {
  background: linear-gradient(135deg, #c9b0ff 0%, #b89fff 100%);
}

.portfolio-item[data-featured="true"]:nth-of-type(3) .portfolio-link {
  background: linear-gradient(135deg, #ffcc99 0%, #ffbd88 100%);
}

.portfolio-item[data-featured="true"]:nth-of-type(4) .portfolio-link {
  background: linear-gradient(135deg, #ffb8d4 0%, #ffa8c8 100%);
}

.portfolio-item[data-featured="true"]:nth-of-type(5) .portfolio-link {
  background: linear-gradient(135deg, #c9b0ff 0%, #b89fff 100%);
}

.portfolio-item[data-featured="true"]:nth-of-type(6) .portfolio-link {
  background: linear-gradient(135deg, #90cfff 0%, #7bbfff 100%);
}

.portfolio-item[data-featured="true"]:nth-of-type(7) .portfolio-link {
  background: linear-gradient(135deg, #90cfff 0%, #7bbfff 100%);
}

.portfolio-item[data-featured="true"]:nth-of-type(8) .portfolio-link {
  background: linear-gradient(135deg, #c9b0ff 0%, #b89fff 100%);
}

.portfolio-item[data-featured="true"][data-project="presidents"]
  .portfolio-link {
  background: linear-gradient(135deg, #a8e6cf 0%, #93dbc1 100%);
}

a[href="projects/svod.html"].portfolio-item[data-featured="true"].theme-history-vault
  .portfolio-link {
  background: linear-gradient(135deg, #ecd39a 0%, #d6aa4d 100%);
}

a[href="projects/lifetime-movie-club.html"].portfolio-item[data-featured="true"].theme-lifetime-movie-club
  .portfolio-link {
  background: linear-gradient(135deg, #f0bfd2 0%, #da7b9b 100%);
}

/* Portfolio text section */
.portfolio-item[data-featured="true"] .portfolio-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  max-width: none;
  width: 100%;
  padding: 0;
}

.portfolio-item[data-featured="true"] .portfolio-title {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.portfolio-item[data-featured="true"] .portfolio-category {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
  color: #666;
}

.portfolio-item[data-featured="true"] .portfolio-description {
  font-size: 16px;
  line-height: 1.6;
  color: #555;
  margin: 0;
}

/* Keep filtered featured sets in a stable 2x2 grid */
.portfolio-grid:has(.portfolio-item.top-featured:not(.hidden)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
}

.portfolio-item.top-featured:not(.recent-small):not([data-featured="true"]) {
  grid-column: span 2;
}

.portfolio-item.top-featured.recent-small {
  grid-column: span 1;
}

.portfolio-item.top-featured .portfolio-title {
  font-size: 18px;
}

.portfolio-item.top-featured .portfolio-category {
  font-size: 15px;
}

.portfolio-item.recent-small .portfolio-title {
  font-size: 16px;
}

.portfolio-item.recent-small .portfolio-category {
  font-size: 14px;
}

.portfolio-item.top-featured .portfolio-link {
  max-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.portfolio-item.recent-small .portfolio-link {
  max-height: 200px;
}

.portfolio-link {
  display: block;
  overflow: hidden;
  border-radius: 6px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.portfolio-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Non-featured portfolio item images */
.portfolio-item:not([data-featured="true"]) .portfolio-link img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.portfolio-item:not([data-featured="true"]) .portfolio-link:hover img {
  transform: scale(1.02);
}

.secondary-project {
  gap: 8px;
  max-width: 320px;
}

.secondary-project-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 320px));
  gap: 24px;
  justify-content: start;
  align-items: start;
  grid-column: 1 / -1;
}

.secondary-project .portfolio-link {
  border-radius: 5px;
}

.secondary-project .portfolio-link img {
  max-width: 100%;
}

.secondary-project .portfolio-category {
  font-size: 12px;
  padding: 6px 0 6px 14px;
  border-left-width: 3px;
}

.secondary-project .portfolio-title {
  font-size: 14px;
}

.portfolio-link.external-link {
  position: relative;
}

.external-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  color: var(--text-color);
}

.portfolio-link.external-link:hover .external-icon {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.portfolio-category {
  font-size: 14px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 0;
  display: inline-block;
  padding: 8px 0 8px 20px;
  border-left: 4px solid #666;
}

a[href="projects/svod.html"].theme-history-vault .portfolio-category {
  border-left-color: #ecd39a;
}

a[href="projects/lifetime-movie-club.html"].theme-lifetime-movie-club
  .portfolio-category {
  border-left-color: #d86a94;
}

/* Color-coded borders for portfolio categories on index page */
/* Updated 2026-07-21 */
a[href="projects/segment-opportunity-simulator.html"] .portfolio-category,
a[href="projects/svod.html"] .portfolio-category {
  border-left-color: #90cfff;
}

a[href="projects/agentic.html"] .portfolio-category,
a[href="projects/lifetime-movie-club.html"] .portfolio-category {
  border-left-color: #c9b0ff;
}

a[href="projects/louis-armstrong.html"] .portfolio-category {
  border-left-color: #ffcc99;
}

a[href="projects/silhouette-art.html"] .portfolio-category {
  border-left-color: #ffb8d4;
}

a[href="projects/banned-words.html"] .portfolio-category {
  border-left-color: #c9b0ff;
}

a[data-project="presidents"] .portfolio-category {
  border-left-color: #a8e6cf;
}

.portfolio-title {
  font-size: 16px;
  color: var(--text-color);
  font-weight: 400;
  margin-top: -2px;
}

/* Contact Section */
.contact-section {
  padding: 40px 0;
}

.contact-section h6 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.contact-section a {
  font-size: 18px;
  color: var(--text-color);
}

.contact-section a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  margin-top: 60px;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer p {
  font-size: 16px;
  color: var(--text-secondary);
}

.social-bar {
  display: flex;
  list-style: none;
  gap: 20px;
}

.social-bar a {
  display: block;
  width: 24px;
  height: 24px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.social-bar a:hover {
  opacity: 1;
}

.social-bar img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .header-main {
    gap: 24px;
  }

  .site-title {
    font-size: 40px;
  }

  .subtitle {
    font-size: 22px;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .portfolio-grid:has(.portfolio-item.top-featured:not(.hidden)) {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-item.top-featured:not(.recent-small):not([data-featured="true"]) {
    grid-column: span 1;
  }

  .portfolio-item.recent-small {
    grid-column: span 1;
  }

  /* Featured items on tablet */
  .portfolio-item[data-featured="true"] {
    padding: 0;
    margin-bottom: 0;
  }

  .portfolio-item[data-featured="true"] .portfolio-link {
    margin-bottom: 12px;
    gap: 18px;
    padding: 24px;
  }

  .portfolio-item[data-featured="true"] .portfolio-tags {
    gap: 10px;
  }

  .portfolio-item[data-featured="true"] .portfolio-tag {
    font-size: 13px;
    padding: 8px 16px;
  }

  .portfolio-item[data-featured="true"] .portfolio-tag::after {
    width: 200px;
    font-size: 12px;
  }

  .portfolio-item[data-featured="true"] .portfolio-title {
    font-size: 24px;
  }

  .portfolio-item[data-featured="true"] .portfolio-description {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .container {
    width: 100%;
  }

  .header {
    padding: 28px 24px 0;
  }

  .header-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .header-main {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    text-align: center;
  }

  .photo-wrapper {
    width: 112px;
    height: 112px;
    flex-shrink: 0;
  }

  /* Smaller header on project pages - mobile */
  body:has(.project-page) .header {
    padding: 20px 24px 12px;
  }

  body:has(.project-page) .header-content {
    align-items: center;
  }

  body:has(.project-page) .photo-wrapper {
    width: 50px;
    height: 50px;
  }

  body:has(.project-page) .site-title {
    font-size: 20px;
  }

  body:has(.project-page) .subtitle {
    font-size: 14px;
  }

  body:has(.project-page) .header-main {
    align-items: center;
  }

  .header-text {
    align-items: center;
    width: 100%;
    gap: 16px;
  }

  .name-and-title {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .title-separator {
    display: none;
  }

  .site-title {
    font-size: 28px;
  }

  .subtitle {
    font-size: 18px;
  }

  .tagline {
    font-size: 24px;
    line-height: 1.5;
    max-width: 100%;
    text-align: center;
  }

  .tooltip-term::after {
    font-size: 14px;
    width: 280px;
    max-width: calc(100vw - 40px);
    padding: 12px 16px;
  }

  .filter-buttons {
    margin-top: 16px;
    margin-bottom: 32px;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 0 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-buttons::-webkit-scrollbar {
    display: none;
  }

  .section-title {
    font-size: 20px;
    margin: 0 0 16px;
    padding: 0 24px;
  }

  .subsection-title {
    padding: 0 24px;
  }

  .filter-btn {
    font-size: 14px;
    padding: 8px 16px;
    white-space: nowrap;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .portfolio-grid:has(.portfolio-item.top-featured:not(.hidden)) {
    grid-template-columns: 1fr;
  }

  .portfolio-item.top-featured:not(.recent-small),
  .portfolio-item.recent-small {
    grid-column: span 1;
  }

  .portfolio-item.top-featured .portfolio-link,
  .portfolio-item.recent-small .portfolio-link {
    max-height: none;
  }

  /* ALL portfolio items on mobile - identical styling, no featured differences */
  .portfolio-item,
  .portfolio-item[data-featured="true"] {
    padding: 0 16px !important;
    margin-bottom: 56px !important;
    max-width: none !important;
    background: none !important;
    border-radius: 0 !important;
  }

  .portfolio-item .portfolio-link,
  .portfolio-item[data-featured="true"] .portfolio-link {
    margin-bottom: 8px !important;
    width: 100% !important;
    max-width: none !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    overflow: hidden !important;
    padding: 24px !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  .portfolio-item .portfolio-image,
  .portfolio-item[data-featured="true"] .portfolio-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 6px !important;
  }

  /* Hide tags on mobile */
  .portfolio-item[data-featured="true"] .portfolio-tags {
    display: none !important;
  }

  .portfolio-item .portfolio-text,
  .portfolio-item[data-featured="true"] .portfolio-text,
  .portfolio-item > p {
    padding: 0 24px !important;
    max-width: none !important;
    margin: 0 0 4px 0 !important;
    gap: 16px !important;
  }

  .portfolio-item .portfolio-title,
  .portfolio-item[data-featured="true"] .portfolio-title {
    font-size: 28px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
  }

  .portfolio-item .portfolio-category,
  .portfolio-item[data-featured="true"] .portfolio-category {
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin: 0 !important;
    color: #666 !important;
  }

  .portfolio-item .portfolio-description,
  .portfolio-item[data-featured="true"] .portfolio-description {
    font-size: 17px !important;
    line-height: 1.7 !important;
    color: #555 !important;
    margin: 0 !important;
  }

  .secondary-project-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .main-content {
    padding: 0 0 60px;
  }

  /* Reduce top padding on project pages */
  body:has(.project-page) .main-content {
    padding-top: 12px;
  }

  .main-content:has(.filter-buttons) {
    padding-left: 0;
    padding-right: 0;
  }

  .footer {
    padding: 40px 24px;
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 28px;
  }

  .subtitle {
    font-size: 18px;
  }

  .tagline {
    font-size: 20px;
  }

  .photo-wrapper {
    width: 80px;
    height: 80px;
  }
}

.main-nav .active {
  font-weight: 600;
  position: relative;
}

.main-nav .active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--text-color);
}

/* Portfolio Detail Page Template */
.project-page {
  padding: 40px 0 60px;
}

/* Back to Home link on project pages */
.back-to-home {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 14px;
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
  z-index: 100;
}

.back-to-home:hover {
  color: #000;
}

/* Project Navigation Menu */
.project-nav-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
}

.menu-toggle {
  font-size: 14px;
  color: #666;
  cursor: pointer;
  padding: 8px 12px;
  background: none;
  border: none;
  transition: color 0.2s;
}

.menu-toggle:hover {
  color: #000;
}

.menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 280px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity 0.2s,
    transform 0.2s,
    visibility 0.2s;
  margin-top: 8px;
}

.project-nav-menu:hover .menu-dropdown,
.menu-dropdown:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-section {
  padding: 20px 0;
  border-bottom: 1px solid #e5e5e5;
}

.menu-dropdown > .menu-section:first-child {
  border-bottom: 1px solid #e5e5e5;
}

.menu-dropdown > .menu-section:last-child {
  border-bottom: none;
}

.menu-section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #000;
  padding: 0 24px 8px;
}

.menu-link {
  display: block;
  padding: 10px 24px;
  font-size: 14px;
  color: #333;
  transition: background-color 0.2s;
}

.menu-link:hover {
  background-color: rgb(248, 246, 238);
  color: #000;
}

.menu-link-label {
  display: block;
  font-size: 11px;
  color: #999;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.menu-link-title {
  display: block;
}

/* Mobile hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: #666;
  transition: all 0.3s;
}

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

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

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

/* Smaller header on project pages */
body:has(.project-page) .header {
  padding: 30px 0 20px;
}

body:has(.project-page) .photo-wrapper {
  width: 60px;
  height: 60px;
}

body:has(.project-page) .site-title {
  font-size: 24px;
}

body:has(.project-page) .subtitle {
  font-size: 16px;
}

body:has(.project-page) .title-separator {
  font-size: 16px;
}

body:has(.project-page) .header-main {
  gap: 24px;
  width: auto;
}

.project-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 0;
  border-radius: 6px;
}

.project-header.theme-history-vault,
.project-header.theme-lifetime-movie-club {
  padding: 32px 32px 24px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.06);
}

.project-header.theme-history-vault {
  background: linear-gradient(
    135deg,
    rgba(236, 211, 154, 0.78) 0%,
    rgba(214, 170, 77, 0.92) 100%
  );
}

.project-header.theme-lifetime-movie-club {
  background: linear-gradient(
    135deg,
    rgba(240, 191, 210, 0.78) 0%,
    rgba(218, 123, 155, 0.9) 100%
  );
}

/* Removed color backgrounds for project pages - now using dashed lines instead */
.project-header.accent-red {
  background: none;
}

.project-header.accent-blue {
  background: none;
}

.project-header.accent-green {
  background: none;
}

.project-header.accent-magenta {
  background: none;
}

.project-header.accent-purple {
  background: none;
}

.project-header.accent-teal {
  background: none;
}

.project-header .project-image {
  width: 100%;
  margin: 40px 0 0 0;
  overflow: visible;
}

.project-header .project-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.project-header.theme-history-vault .project-image img,
.project-header.theme-lifetime-movie-club .project-image img {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.project-category {
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px 0;
  color: #666;
  display: inline-block;
  padding: 8px 0 8px 20px;
  border-left: 4px solid #666;
  line-height: 1.5;
}

.project-header.accent-red.theme-history-vault .project-category {
  border-left-color: #ecd39a;
}

.project-header.accent-blue.theme-lifetime-movie-club .project-category {
  border-left-color: #d86a94;
}

/* Color-coded borders for project categories - five colors */
.project-header.accent-red .project-category {
  border-left-color: #90cfff;
}

.project-header.accent-blue .project-category {
  border-left-color: #c9b0ff;
}

.project-header.accent-green .project-category {
  border-left-color: #ffcc99;
}

.project-header.accent-magenta .project-category {
  border-left-color: #ffb8d4;
}

.project-header.accent-purple .project-category {
  border-left-color: #dec0ff;
}

.project-header.accent-teal .project-category {
  border-left-color: #a8e6cf;
}

.project-title {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 16px;
}

.project-meta {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.project-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-meta-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 600;
}

.project-meta-value {
  font-size: 16px;
  color: var(--text-color);
}

.project-content {
  max-width: 1000px;
  margin: 0 auto;
}

.project-section {
  margin-bottom: 80px;
}

.project-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  margin-top: 48px;
  color: #666;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  padding: 8px 0 8px 20px;
  border-left: 4px solid #666;
  display: inline-block;
  line-height: 1.5;
}

.project-header.accent-red.theme-history-vault
  ~ .project-content
  .project-section
  h3 {
  border-left-color: #ecd39a;
}

.project-header.accent-blue.theme-lifetime-movie-club
  ~ .project-content
  .project-section
  h3 {
  border-left-color: #d86a94;
}

/* Color-coded borders for h3 headings - five colors */
.project-header.accent-red ~ .project-content .project-section h3 {
  border-left-color: #90cfff;
}

.project-header.accent-blue ~ .project-content .project-section h3 {
  border-left-color: #c9b0ff;
}

.project-header.accent-green ~ .project-content .project-section h3 {
  border-left-color: #ffcc99;
}

.project-header.accent-magenta ~ .project-content .project-section h3 {
  border-left-color: #ffb8d4;
}

.project-header.accent-purple ~ .project-content .project-section h3 {
  border-left-color: #dec0ff;
}

.project-section .section-subheading {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 24px;
  margin-top: 0;
  color: var(--text-color);
  font-style: normal;
}

.project-section p {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 20px;
  color: #555;
}

.project-section ul,
.project-section ol {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 20px;
  color: #555;
  padding-left: 24px;
  margin-left: 0;
}

.project-section ul li,
.project-section ol li {
  margin-bottom: 16px;
}

.project-image {
  width: 100%;
  margin: 40px 0;
  overflow: visible;
}

.project-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.project-image video {
  display: block;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.project-image iframe {
  display: block;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: none;
}

.project-image-caption {
  font-size: 16px !important;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 12px;
  font-style: italic;
  line-height: 1.5;
}

.project-images-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
  margin: 40px 0;
  flex-wrap: wrap;
}

.project-images-row .project-image {
  flex: 0 1 calc(33.333% - 14px);
  max-width: 300px;
  margin: 0;
}

.notion-link-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 48px;
  border-radius: 6px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.notion-link-card h3 {
  color: white;
  margin-bottom: 16px;
}

.notion-link-card p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 32px;
  font-size: 16px;
}

.notion-link-button {
  display: inline-block;
  background: white;
  color: #667eea;
  padding: 16px 32px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.notion-link-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  color: #667eea;
}

.project-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 60px;
  border-top: 1px solid var(--border-color);
  margin-top: 80px;
}

.project-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
  transition: transform 0.2s ease;
}

.project-nav-link:hover {
  transform: translateX(-4px);
}

.project-nav-link.next:hover {
  transform: translateX(4px);
}

/* Project Detail Page Responsive - Tablet */
@media (max-width: 1024px) {
  .project-header {
    padding: 0;
  }

  .project-title {
    font-size: 30px;
  }

  .project-section .section-subheading {
    font-size: 30px;
  }

  .project-section p {
    font-size: 16px;
  }
}

/* Project Detail Page Responsive - Mobile */
@media (max-width: 768px) {
  .project-header {
    padding: 18px 0;
    text-align: left;
  }

  /* .project-header > :not(.project-image):not(.hero-grid) {
    padding: 0 24px;
  } */

  .project-meta {
    justify-content: flex-start;
  }

  .project-header .project-image iframe {
    height: 400px;
  }

  .project-header .hero-grid {
    grid-template-columns: 1fr !important;
  }

  .project-category {
    font-size: 16px;
    font-weight: 600;
    padding: 8px 0 8px 20px;
    line-height: 1.5;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #666;
    display: inline-block;
    border-left: 4px solid #666;
  }

  .project-title {
    font-size: 28px;
    text-align: left;
  }

  .project-meta {
    gap: 24px;
  }

  .project-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 32px;
    padding: 8px 0 8px 20px;
    line-height: 1.5;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #666;
    display: inline-block;
    border-left: 4px solid #666;
  }

  .project-section .section-subheading {
    font-size: 26px;
  }

  .project-section p {
    font-size: 15px;
  }

  .project-section ul,
  .project-section ol {
    font-size: 15px;
    padding-left: 20px;
    margin-left: 0;
  }

  .project-image-caption {
    font-size: 16px !important;
  }

  .desktop-only-iframe {
    display: block;
  }

  .desktop-only-iframe iframe {
    height: 500px !important;
  }

  .project-page {
    padding: 110px 24px 80px;
  }

  .back-to-home {
    top: 16px;
    left: 16px;
    font-size: 13px;
  }

  /* Mobile project navigation menu */
  .project-nav-menu {
    top: 16px;
    right: 16px;
  }

  .menu-toggle {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .menu-dropdown {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    margin-top: 0;
    border-radius: 0;
    border: none;
    border-left: 1px solid #e5e5e5;
    transform: none;
    transition: right 0.3s ease;
    overflow-y: auto;
  }

  .menu-dropdown.active {
    right: 0;
    opacity: 1;
    visibility: visible;
  }

  .menu-section {
    padding: 20px 0;
  }

  .menu-section-title {
    padding: 0 24px 12px;
    font-size: 13px;
  }

  .menu-link {
    padding: 12px 24px;
    font-size: 15px;
  }

  .project-navigation {
    flex-direction: row;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
  }

  .desktop-only-caption {
    display: none;
  }

  .notion-link-card {
    padding: 32px 24px;
  }

  .notion-link-button {
    padding: 14px 24px;
    font-size: 15px;
  }

  /* Mobile fixes for inline grid styles */
  .project-section div[style*="grid-template-columns"],
  .project-content div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Mobile fixes for centered images with max-width */
  .project-image[style*="max-width: 70%"] {
    max-width: 100% !important;
  }
}
