/* ─────────────────────────────────────────────────────────────────────────────
   SHADCN UI REUSABLE COMPONENTS
   Ultra-clean, production-grade black & white / Zinc components
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Buttons (Shadcn Variants) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  height: var(--btn-h-md);
  padding-inline: 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  user-select: none;
  text-decoration: none;
  line-height: 1;
}

.btn:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* Primary (Solid Dark Zinc) */
.btn-default {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}
.btn-default:hover {
  background: hsl(var(--primary) / 0.9);
  color: hsl(var(--primary-foreground));
  transform: translateY(-1px);
}

/* Secondary (Soft Zinc Surface) */
.btn-secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-color: transparent;
}
.btn-secondary:hover {
  background: hsl(var(--border));
  color: hsl(var(--foreground));
}

/* Outline (Subtle Border) */
.btn-outline {
  background: transparent;
  color: hsl(var(--foreground));
  border-color: hsl(var(--input));
}
.btn-outline:hover {
  background: hsl(var(--secondary));
  border-color: hsl(var(--foreground) / 0.3);
  color: hsl(var(--foreground));
  transform: translateY(-1px);
}

/* Ghost (Hover-only Surface) */
.btn-ghost {
  background: transparent;
  color: hsl(var(--muted-foreground));
  border-color: transparent;
}
.btn-ghost:hover {
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
}

/* Link */
.btn-link {
  background: transparent;
  color: hsl(var(--foreground));
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 0;
  height: auto;
}
.btn-link:hover {
  color: hsl(var(--muted-foreground));
}

/* Sizes */
.btn-sm {
  height: var(--btn-h-sm);
  padding-inline: 0.75rem;
  font-size: 0.8125rem;
  gap: 0.375rem;
}

.btn-lg {
  height: var(--btn-h-lg);
  padding-inline: 1.5rem;
  font-size: 0.9375rem;
  border-radius: var(--radius-md);
  font-weight: 600;
}

.btn-icon {
  width: var(--btn-h-md);
  padding: 0;
}
.btn-icon.btn-sm {
  width: var(--btn-h-sm);
  padding: 0;
}
.btn-icon.btn-lg {
  width: var(--btn-h-lg);
  padding: 0;
}

/* ── Badges (Shadcn Variants) ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: var(--badge-h);
  padding-inline: 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  line-height: 1;
  white-space: nowrap;
}

.badge-default {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.badge-secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-color: hsl(var(--border));
}

.badge-outline {
  background: transparent;
  color: hsl(var(--foreground));
  border-color: hsl(var(--border));
}

.badge-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: var(--radius-full);
  background: hsl(var(--primary));
}

.badge-dot.pulse {
  animation: badgePulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes badgePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ── Cards (Shadcn UI Hierarchy) ── */
.card {
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--duration-normal) ease;
}

.card-interactive {
  cursor: pointer;
}
.card-interactive:hover {
  border-color: hsl(var(--foreground) / 0.28);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-header {
  padding: 1.5rem 1.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: hsl(var(--card-foreground));
}

.card-description {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

.card-content {
  padding: 0.75rem 1.5rem 1.5rem;
  flex: 1;
}

.card-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid hsl(var(--border-subtle));
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: hsl(var(--muted));
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid hsl(var(--border-subtle));
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease-spring);
}

.card:hover .card-thumb img {
  transform: scale(1.025);
}

/* ── Tech Pill Primitive (Standardized Optical Weight) ── */
.tech-pills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.875rem;
  height: 2.375rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  box-shadow: var(--shadow-subtle);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  user-select: none;
}

.tech-pill:hover {
  background: hsl(var(--secondary));
  border-color: hsl(var(--foreground) / 0.28);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.tech-pill-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: hsl(var(--foreground));
}

.tech-pill-icon svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: currentColor;
}

.tech-pill-icon i {
  font-size: 1rem;
}

.tech-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding-inline: 0.25rem;
  border-radius: var(--radius-full);
  background: hsl(var(--muted));
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: hsl(var(--muted-foreground));
  font-weight: 600;
  margin-left: 0.125rem;
}

/* ── Modals & Dialogs (Accessible, Smooth Backdrop) ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal) ease, visibility var(--duration-normal) ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-xl);
  max-width: 44rem;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  transform: scale(0.96) translateY(8px);
  transition: transform var(--duration-normal) var(--ease-spring);
  display: flex;
  flex-direction: column;
}

.modal-overlay.open .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid hsl(var(--border));
  position: sticky;
  top: 0;
  background: hsl(var(--card));
  z-index: 10;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.modal-icon-badge {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: hsl(var(--foreground));
}

.modal-icon-badge svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}

.modal-icon-badge i {
  font-size: 1.35rem;
}

.modal-close-btn {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  border: 1px solid hsl(var(--border));
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  transition: all var(--duration-fast) ease;
}

.modal-close-btn:hover {
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
  border-color: hsl(var(--foreground) / 0.2);
}

.modal-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal-desc-box {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
  background: hsl(var(--secondary));
  padding: 1.125rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid hsl(var(--border));
}

.modal-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.75rem;
}

/* ── Lightbox Image Modal ── */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-normal) ease;
}

.lightbox-modal.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-image-wrap {
  max-width: 90vw;
  max-height: 85vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-image-wrap img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border) / 0.4);
  box-shadow: var(--shadow-modal);
}

.lightbox-caption {
  margin-top: 1rem;
  color: hsl(var(--primary-foreground));
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background: hsl(var(--foreground) / 0.15);
  border: 1px solid hsl(var(--primary-foreground) / 0.2);
  color: hsl(var(--primary-foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.lightbox-close:hover {
  background: hsl(var(--foreground) / 0.3);
  transform: scale(1.05);
}

/* ── Site Header / Navigation ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: hsl(var(--background) / 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
}

.nav,
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 4rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
}

.nav-brand-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8125rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  transition: all var(--duration-fast) ease;
}

.nav-link:hover,
.nav-link.active {
  color: hsl(var(--foreground));
  background: hsl(var(--secondary));
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ── Section Headers ── */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.section-badge {
  width: fit-content;
}

/* ── Accordion (Exclusive Open / Clean shadcn Collapsible) ── */
.accordion {
  display: flex;
  flex-direction: column;
  border-top: 1px solid hsl(var(--border));
}

.accordion-item {
  border-bottom: 1px solid hsl(var(--border));
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: hsl(var(--foreground));
  cursor: pointer;
  text-align: left;
  transition: color var(--duration-fast) ease;
}

.accordion-trigger:hover {
  color: hsl(var(--muted-foreground));
}

.accordion-icon {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform var(--duration-normal) ease;
  color: hsl(var(--muted-foreground));
}

details[open] .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  padding-bottom: 1.5rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ── Scroll Reveal Micro-interaction ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms var(--ease-spring), transform 500ms var(--ease-spring);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Site Footer ── */
.site-footer {
  border-top: 1px solid hsl(var(--border));
  padding-block: 3.5rem;
  background: hsl(var(--background));
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

/* ── Avatar Primitive ── */
.avatar {
  position: relative;
  display: flex;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: var(--radius-full);
  border: 1px solid hsl(var(--border));
}

.avatar-img {
  aspect-ratio: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Hero Section ── */
.hero {
  padding-top: clamp(3rem, 6vw, 5.5rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 52rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

/* ── Work Grid & Selected Projects ── */
.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.work-num {
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: hsl(var(--muted-foreground));
  letter-spacing: 0.08em;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* ── Separator / Divider ── */
.separator {
  height: 1px;
  width: 100%;
  background: hsl(var(--border));
  border: 0;
  flex-shrink: 0;
}

/* ── Tech Header Row ── */
.tech-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* ── Work Together / Contact CTA ── */
.work-together-section {
  padding-block: clamp(4rem, 8vw, 6.5rem);
}

.work-together-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .work-together-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
  }
}

.work-together-title {
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: hsl(var(--foreground));
  margin-bottom: 1rem;
}

.work-together-desc {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: hsl(var(--muted-foreground));
  max-width: 36rem;
}

.work-together-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.work-together-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  color: inherit;
  box-shadow: var(--shadow-subtle);
  transition: all var(--duration-fast) ease;
  width: 100%;
}

.work-together-card:hover {
  border-color: hsl(var(--foreground) / 0.3);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.work-together-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-md);
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: hsl(var(--foreground));
  font-size: 1.25rem;
}

.work-together-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.work-together-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex-grow: 1;
  min-width: 0;
}

.work-together-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.work-together-val {
  font-size: 0.9375rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-together-arrow {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  transition: transform var(--duration-fast) ease, color var(--duration-fast) ease;
  flex-shrink: 0;
}

.work-together-card:hover .work-together-arrow {
  transform: translateX(4px);
  color: hsl(var(--foreground));
}

/* ── Content Container & Inner Pages ── */
.content-container {
  width: 100%;
  max-width: 56rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.page-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  color: hsl(var(--foreground));
}

.page-subtitle {
  color: hsl(var(--muted-foreground));
  font-size: 1.0625rem;
  line-height: 1.6;
}

.category-title {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: hsl(var(--foreground));
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.interactive-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  background: hsl(var(--secondary));
  border: 1px dashed hsl(var(--border));
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin-top: 1.25rem;
  margin-bottom: 2rem;
}


