/* Components CSS - Cards, Buttons, Pills, Tags */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 20px;
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  font-weight: var(--font-medium);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary {
  background-color: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

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

.btn-secondary {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-text);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-text-muted);
  border-color: transparent;
}

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

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  gap: 6px;
}

.btn-sm svg {
  width: 14px;
  height: 14px;
}

/* Cards */
.card {
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--color-text-subtle);
  box-shadow: var(--shadow-md);
}

.card:active {
  transform: scale(0.99);
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
}

.card-description {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

/* Pillars section accent */
.pillars-section {
  position: relative;
}

.pillars-section::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 300px;
  background: linear-gradient(0deg,
    color-mix(in srgb, var(--color-ai-first) 3%, transparent) 0%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* Pillar cards (3 Things I Do) */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  position: relative;
  z-index: 1;
  align-items: stretch;
}

@media (max-width: 768px) {
  .pillars-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

.pillar-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-6);
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.pillar-card:hover {
  border-color: var(--color-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.pillar-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  min-height: 3.5em;
}

.pillar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.pillar-icon svg {
  width: 24px;
  height: 24px;
}

.pillar-title {
  font-size: var(--text-base);
  font-family: var(--font-mono);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
  color: var(--color-text);
}

.pillar-tagline {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
  line-height: 1.2;
  min-height: 72px; /* Force consistent height for 2 lines */
}

.pillar-description {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-5);
  min-height: 4.5em;
}

.pillar-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto; /* Align to bottom */
  padding-top: var(--space-4);
}

/* Tags / Pills */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: var(--font-medium);
  border-radius: var(--radius-sm);
  background-color: var(--color-bg-subtle);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-subtle);
}

.tag-primary {
  background-color: var(--color-text);
  color: var(--color-bg);
}

/* All tags use neutral styling - no colored tags */
.tag-simulation,
.tag-dashboards,
.tag-ai-first,
.tag-ai-cad,
.tag-backend,
.tag-utilities,
.tag-teaching,
.tag-research {
  /* Same as base .tag */
}

/* Featured section accent */
.featured-section {
  position: relative;
}

.featured-section .grid {
  gap: var(--space-4);
}

.featured-section .reveal {
  height: 100%;
}

.featured-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 0%,
    color-mix(in srgb, var(--color-dashboards) 4%, transparent) 0%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 0;
}

/* Featured project card */
.featured-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-fast);
  cursor: pointer;
  z-index: 1;
}

.featured-card:hover {
  border-color: var(--color-text-subtle);
}

.featured-card:active {
  transform: scale(0.99);
  border-color: var(--color-text-subtle);
}

.featured-media {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background-color: var(--color-bg-subtle);
  flex-shrink: 0;
}

.featured-placeholder {
  position: relative;
  overflow: hidden;
  background: var(--color-bg-subtle);
}

.featured-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--color-border) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.5;
}

.featured-placeholder-text {
  position: relative;
  z-index: 1;
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  font-weight: var(--font-medium);
  color: var(--color-text-subtle);
  text-align: center;
  padding: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.featured-content {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.featured-title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-1);
}

.featured-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: var(--leading-relaxed);
  white-space: normal;
  word-break: break-word;
  min-height: 2.6em;
}

.featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: auto;
}

/* Teaching section */
.teaching-section {
  overflow: visible;
  position: relative;
}

.teaching-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  background: linear-gradient(180deg,
    color-mix(in srgb, #db2777 3%, transparent) 0%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* Teaching positions grid */
.teaching-positions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

/* Teaching position card - compact chip style */
.teaching-position-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.teaching-position-card:hover {
  border-color: var(--color-text-subtle);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.teaching-position-card:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.teaching-position-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background-color: var(--color-bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  font-family: var(--font-mono);
  color: var(--color-text-muted);
}

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

.teaching-position-name {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teaching-position-role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teaching-position-duration {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--color-text-subtle);
  margin-top: 2px;
}

/* Position card with many topics - spans 2 columns */
.teaching-position-card.has-many-topics {
  grid-column: span 2;
}

/* Position card topics - pill style */
.teaching-position-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: var(--space-2);
}

.teaching-topic-pill {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  color: var(--color-text-subtle);
  background-color: var(--color-bg-subtle);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Legacy teaching card (keeping for reference) */
.teaching-card {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.teaching-card:hover {
  border-color: var(--color-text-subtle);
}

.teaching-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--color-bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: var(--font-semibold);
  color: var(--color-text-muted);
}

.teaching-info {
  flex: 1;
}

.teaching-name {
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-1);
}

.teaching-program {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.teaching-duration {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
  margin-top: var(--space-2);
}

@media (max-width: 900px) {
  .teaching-positions-grid {
    grid-template-columns: 1fr;
  }

  .teaching-position-card.has-many-topics {
    grid-column: span 1;
  }
}

/* Workshops grid */
.workshops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-4);
}

/* Workshop card - structured display */
.workshop-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  width: 100%;
}

.workshop-card:hover {
  border-color: var(--color-text-subtle);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.workshop-card:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.workshop-card-content {
  flex: 1;
  min-width: 0;
}

.workshop-card-title {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-1);
  line-height: 1.3;
}

.workshop-card-event {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.workshop-card-meta {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.workshop-card-year {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: var(--font-medium);
  padding: 2px 8px;
  background-color: var(--color-bg-subtle);
  border-radius: var(--radius-sm);
  color: var(--color-text-subtle);
}

.workshop-card-format {
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 2px 8px;
  background-color: rgba(219, 39, 119, 0.1);
  border-radius: var(--radius-sm);
  color: #db2777;
}

.workshop-card-indicators {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.workshop-card-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
}

.workshop-card-badge.youtube {
  background-color: rgba(255, 0, 0, 0.1);
  color: #ff0000;
}

.workshop-card-badge.video {
  background-color: rgba(219, 39, 119, 0.1);
  color: #db2777;
}

.workshop-card-arrow {
  color: var(--color-text-subtle);
  transition: transform var(--transition-fast);
}

.workshop-card:hover .workshop-card-arrow {
  transform: translateX(4px);
  color: var(--color-text);
}

/* Workshop modal specifics */
.workshop-video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  background-color: #000;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
}

.workshop-image-container {
  width: 100%;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
}

.workshop-image-container .workshop-media-image {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: contain;
  display: block;
}

.workshop-video-iframe,
.workshop-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workshop-modal-header {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.workshop-modal-icon {
  font-size: 64px;
  font-family: var(--font-mono);
  font-weight: var(--font-bold);
  color: rgba(255, 255, 255, 0.3);
}

.workshop-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.workshop-meta-pill {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: var(--font-medium);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.workshop-meta-pill.event {
  background-color: var(--color-bg-subtle);
  color: var(--color-text);
}

.workshop-meta-pill.year {
  background-color: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

.workshop-meta-pill.format {
  background-color: rgba(219, 39, 119, 0.1);
  color: #db2777;
}

/* Related projects in workshop modal */
.workshop-related-projects {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

.related-projects-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.related-projects-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.related-project-card {
  display: block;
  padding: var(--space-4);
  background-color: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  width: 100%;
}

.related-project-card:hover {
  border-color: var(--color-text-subtle);
  background-color: var(--color-bg-elevated);
  transform: translateX(4px);
}

.related-project-title {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  margin-bottom: 4px;
}

.related-project-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Modal navigation */
.workshop-modal-nav {
  position: relative;
}

.modal-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, transform 0.2s;
  z-index: 10;
}

.modal-nav-btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.modal-nav-prev {
  left: -60px;
}

.modal-nav-next {
  right: -60px;
}

.modal-nav-indicator {
  display: flex;
  justify-content: center;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
}

/* Workshop hover preview card */
.workshop-card {
  position: relative;
}

.workshop-preview-card {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 320px;
  background: var(--color-bg-elevated);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 100;
  pointer-events: none;
}

.workshop-preview-card.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.workshop-preview-media {
  position: relative;
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.workshop-preview-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workshop-preview-youtube-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.6);
}

.workshop-preview-icon {
  font-size: 48px;
  font-family: var(--font-mono);
  font-weight: var(--font-bold);
  color: rgba(255, 255, 255, 0.5);
}

.workshop-preview-info {
  padding: var(--space-4);
}

.workshop-preview-title {
  font-size: 14px;
  font-weight: var(--font-semibold);
  color: var(--color-text);
  margin-bottom: 4px;
}

.workshop-preview-event {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .workshops-grid {
    grid-template-columns: 1fr;
  }

  /* Hide hover previews on mobile */
  .workshop-preview-card {
    display: none;
  }

  /* Move nav buttons inside modal on mobile */
  .modal-nav-prev {
    left: 8px;
  }

  .modal-nav-next {
    right: 8px;
  }

  .modal-nav-btn {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.7);
  }
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: var(--space-8);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--color-border);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-8);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-8) - 4px);
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-primary);
}

.timeline-date {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.timeline-title {
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-1);
}

.timeline-org {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Publication item */
.publication-item {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.publication-title {
  font-weight: var(--font-medium);
  margin-bottom: var(--space-1);
}

.publication-venue {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.publication-year {
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
}

/* Links */
.link {
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

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

/* Contact links */
.contact-links {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 16px;
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  font-weight: var(--font-medium);
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-link:hover {
  border-color: var(--color-text-subtle);
  color: var(--color-text);
}

/* Awards badge */
.award-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background-color: color-mix(in srgb, var(--color-research) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-research) 30%, transparent);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--color-research);
}

/* NDA indicator */
.nda-indicator {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

/* Tech Stack Button & Preview */
.tech-stack-wrapper {
  position: relative;
  z-index: 50;
}

.tech-stack-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 14px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  font-weight: var(--font-medium);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tech-stack-button:hover {
  border-color: var(--color-text-subtle);
  color: var(--color-text);
}

.tech-stack-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--color-bg-subtle);
  border-radius: var(--radius-full);
  font-size: 10px;
  color: var(--color-text-subtle);
}

/* Tech Stack Hover Preview - Full */
.tech-stack-preview {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 320px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 100;
  pointer-events: none;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.tech-stack-preview.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.tech-stack-preview-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.tech-stack-preview-cat-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.tech-stack-preview-cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tech-stack-preview-cat-name {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: var(--font-medium);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tech-stack-preview-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-stack-preview-item {
  display: inline-block;
  padding: 4px 10px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
}

/* Tech Stack Modal */
.tech-stack-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: var(--space-4);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tech-stack-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tech-stack-modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tech-stack-modal-close:hover {
  background: var(--color-bg-subtle);
  color: var(--color-text);
}

.tech-stack-modal-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-6);
}

.tech-stack-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

@media (max-width: 480px) {
  .tech-stack-modal-grid {
    grid-template-columns: 1fr;
  }
}

.tech-stack-modal-category {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.tech-stack-modal-cat-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.tech-stack-modal-cat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tech-stack-modal-cat-name {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-text);
}

.tech-stack-modal-items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tech-stack-modal-item {
  display: inline-block;
  padding: 6px 12px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .tech-stack-preview {
    display: none;
  }

  /* Mobile minimum font sizes for readability */
  .teaching-topic-pill {
    font-size: 12px;
    padding: 4px 10px;
  }

  .teaching-position-duration {
    font-size: 12px;
  }

  .workshop-card-year,
  .workshop-card-format {
    font-size: 12px;
  }

  .tech-stack-preview-cat-name {
    font-size: 12px;
  }

  .tech-stack-count {
    font-size: 11px;
  }

  .tag {
    font-size: 12px;
    padding: 8px 14px;
    min-height: 36px;
  }
}

/* Copy for AI button - icon only */
.nav-copy-ai-btn {
  position: relative;
  padding: 10px !important;
  min-width: 44px;
  justify-content: center;
}

.nav-copy-ai-btn.copied {
  color: #059669;
  border-color: #059669;
}

.nav-copy-ai-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 10px;
  background: var(--color-text);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--color-bg);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  pointer-events: none;
  z-index: 100;
}

.nav-copy-ai-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--color-text);
}

.nav-copy-ai-btn:hover .nav-copy-ai-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-copy-ai-btn.copied .nav-copy-ai-tooltip {
  background: #059669;
}

.nav-copy-ai-btn.copied .nav-copy-ai-tooltip::after {
  border-top-color: #059669;
}

@media (max-width: 768px) {
  .nav-copy-ai-tooltip {
    display: none;
  }
}
